@font-face {
  font-family: "Zen Kaku Gothic New";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ZenKakuGothicNew-Regular.ttf") format("truetype");
}

:root {
  color: #153c6c;
  background: #e9e8e2;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
}

button,
select,
input {
  font: inherit;
}

.preview {
  width: 100%;
  padding: 20px;
}

.comparison-header {
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto 10px;
}

.land-direction-controls {
  display: flex;
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto 18px;
  padding: 10px;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid rgb(34 71 109 / 12%);
  border-radius: 10px;
  background: rgb(244 244 240 / 92%);
  color: #243d5a;
}

.land-direction-controls[hidden] {
  display: none;
}

.land-direction-controls strong {
  padding: 0 5px;
  font-size: 13px;
}

.land-direction-controls button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid #bec9d3;
  border-radius: 7px;
  background: #fff;
  color: #183e6d;
  cursor: pointer;
}

.land-direction-controls button[aria-pressed="true"] {
  border-color: #315f8d;
  background: #315f8d;
  color: #fff;
}

.land-direction-controls span {
  color: #68798b;
  font-size: 12px;
}

.comparison-header--second {
  margin-top: 30px;
}

.comparison-title {
  margin: 0;
  color: #1c466f;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.stage-shell {
  position: relative;
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f7f7f0;
  box-shadow: 0 16px 50px rgb(24 47 75 / 12%);
  -webkit-overflow-scrolling: touch;
}

.stage-page-space {
  position: relative;
  width: 100%;
}

.stage-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 1620px;
  transform-origin: top left;
  background: #f7f7f0 url("../img/bg_fv.png") center top / 1440px 1056px no-repeat;
}

/* 同じ粒を、背景の上か陸地の上のどちらか一層だけに表示する。 */
.stage-page::before,
.stage-page::after,
.land-study-surface::before,
.land-study-surface::after {
  position: absolute;
  inset: 0;
  content: "";
  display: none;
  background: url("../img/noise_fv.png") repeat 0 0 / 512px 512px;
  opacity: 0.75;
  pointer-events: none;
}
.stage-page[data-noise-mode="background"]::before,
.land-study-surface[data-noise-mode="background"]::before {
  display: block;
  z-index: 0;
}
.stage-page[data-noise-mode="all"]::after,
.land-study-surface[data-noise-mode="all"]::after {
  display: block;
  z-index: 1;
}
/* 陸地canvasの上、鳥・コピー・ヘッダーの下。 */
.noise-controls {
  position: sticky;
  top: 10px;
  z-index: 30;
  background: rgb(244 244 240 / 97%);
}

.stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 820px;
  overflow: hidden;
  z-index: 2;
  transform-origin: top left;
  background: transparent;
}

.land-shader {
  position: absolute;
  top: 641px;
  left: 565px;
  z-index: 1;
  display: block;
  width: 660px;
  height: 521px;
  pointer-events: none;
}

.has-land-shader .land,
.has-land-shader .land-continuation {
  display: none;
}

.stage::after {
  display: none;
}

.site-header {
  position: absolute;
  top: 30px;
  left: 34px;
  right: 38px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: block;
}

.brand-logo {
  display: block;
  width: 132px;
  height: auto;
}

.global-nav {
  display: flex;
  gap: 35px;
  align-items: center;
  color: #002659;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.hero-copy {
  position: absolute;
  top: 568px;
  left: 81px;
  z-index: 3;
}

.hero-copy p {
  margin: 0 0 22px;
  color: #002659;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.04em;
}

.hero-copy .copy-subtitle {
  color: #527094;
  font-size: 14px;
}

.land {
  position: absolute;
  top: 641px;
  left: 565px;
  z-index: 1;
  width: 660px;
  height: 360px;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 48% 48% 0 0;
}

.land::before {
  position: absolute;
  inset: 0;
  content: "";
  background: url("../land/gradient_spring_preview01.png") center top / cover no-repeat;
  transform-origin: center;
  animation: none;
}

.land[data-land-direction="clockwise"]::before {
  animation: none;
}

.continuation-stage {
  position: absolute;
  top: 820px;
  left: 0;
  width: 1440px;
  height: 800px;
  overflow: hidden;
  z-index: 2;
  background: transparent;
}

.continuation-stage::after {
  display: none;
}

.land-continuation {
  position: absolute;
  top: -179px;
  left: 565px;
  z-index: 1;
  width: 660px;
  height: 521px;
  background: url("../land/gradient_spring_preview01.png") center top / 660px auto no-repeat;
}

.land[data-land-direction="counterclockwise"]::before {
  animation: none;
}

.land[data-land-direction="paused"]::before {
  animation-play-state: paused;
}

@keyframes land-rotate-clockwise {
  to {
    transform: rotate(360deg);
  }
}

@keyframes land-rotate-counterclockwise {
  to {
    transform: rotate(-360deg);
  }
}

.bird {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  will-change: transform;
}

.bird img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 150px;
  height: auto;
  transform: translate(-7.6px, -60.5px);
  transform-origin: 7.6px 60.5px;
  user-select: none;
  -webkit-user-drag: none;
}

.guide {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: none;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.guide.is-visible {
  display: block;
}

.guide path {
  fill: none;
  stroke: #e65b50;
  stroke-width: 2;
  stroke-dasharray: 8 8;
}

.guide circle {
  fill: #e65b50;
}

.guide text {
  fill: #c8473e;
  font-size: 14px;
}

.status {
  display: none;
}

.controls {
  display: flex;
  width: min(1440px, calc(100vw - 40px));
  margin: 16px auto 0;
  padding: 10px;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid rgb(34 71 109 / 12%);
  border-radius: 10px;
  background: rgb(244 244 240 / 92%);
  color: #243d5a;
  box-shadow: 0 8px 24px rgb(24 47 75 / 10%);
  backdrop-filter: blur(10px);
}

.controls button,
.controls select {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid #bec9d3;
  border-radius: 7px;
  background: #fff;
  color: #183e6d;
  cursor: pointer;
}

.controls button:hover,
.controls select:hover {
  border-color: #5277a0;
}

.speed-control,
.guide-control {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 8px;
  font-size: 13px;
}

.timeline-control {
  display: grid;
  flex: 1 1 320px;
  min-width: 260px;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.timeline-control input {
  width: 100%;
}

.note {
  width: min(1440px, calc(100vw - 40px));
  margin: 10px auto 0;
  color: #68798b;
  font-size: 12px;
}

@media (max-width: 760px) {
  .preview {
    padding: 10px;
  }

  .stage-shell,
  .comparison-header,
  .controls,
  .land-direction-controls,
  .note {
    width: calc(100vw - 20px);
  }
}

/* 自転する陸地だけを、FVと同じ背景色で全体確認する。 */
.land-study {
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto 24px;
  color: #243d5a;
}
.land-study summary { cursor: pointer; padding: 12px 0; }
.land-study p { font-size: 13px; line-height: 1.7; }
.land-study-canvas {
  display: block;
  width: min(660px, 100%);
  height: auto;
  aspect-ratio: 660 / 521;
  background: transparent;
  position: relative;
  z-index: 1;
}
.land-study-surface {
  position: relative;
  width: min(660px, 100%);
  background: #f7f7f0;
  isolation: isolate;
}
.land-direction-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}

.land-angle-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.land-angle-control input { width: clamp(120px, 16vw, 240px); }
.land-angle-control output { min-width: 4ch; font-variant-numeric: tabular-nums; }
.land-direction-controls select {
  min-height: 38px;
  color: inherit;
  background: #fff;
  border: 1px solid #bec9d3;
  border-radius: 7px;
}

/* 流動の時刻は停止中も表示し、基準との比較に使う。 */
.land-flow-time { min-width: 5ch; font-size: 13px; font-variant-numeric: tabular-nums; }

.controls button[aria-pressed="true"] {
  background: #e1eee6;
  border-color: #729482;
  color: #254c39;
}

/* 日本語2行をひとつのマスク内で上げ、英語は別に表示する。 */
.hero-copy .copy-line {
  display: block;
  overflow: hidden;
}
.hero-copy .copy-line-text {
  display: block;
  transform: translateY(105%);
}

.hero-copy .copy-main {
  margin-bottom: 22px;
}
.hero-copy .copy-main p {
  margin: 0;
}
