/* =========================================================
   PELICAN COAST — art direction, interface, motion
   ========================================================= */

:root {
  --ink: #0c2229;
  --ink-2: #13343b;
  --ink-3: #21474c;
  --cream: #f3e6d1;
  --cream-dim: #d8c8b0;
  --paper: #faf1e3;
  --coral: #df684c;
  --coral-soft: #e98d70;
  --gold: #e6b475;
  --gold-bright: #f6d399;
  --sea: #78b8b5;
  --sea-bright: #a6ded7;
  --glass: rgba(8, 25, 31, 0.38);
  --glass-strong: rgba(7, 21, 27, 0.7);
  --line: rgba(246, 234, 215, 0.18);
  --line-soft: rgba(246, 234, 215, 0.09);
  --shadow: 0 24px 70px rgba(3, 12, 16, 0.32);
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --sans: "Bahnschrift", "Avenir Next", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07171d;
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-right: 2px;
  border: 1px solid rgba(246, 234, 215, 0.28);
  border-radius: 4px;
  background: rgba(246, 234, 215, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---------- cinematic full-screen texture ---------- */

.color-grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 23, 35, 0.22), transparent 24%, transparent 72%, rgba(4, 14, 18, 0.38)),
    radial-gradient(120% 80% at 52% 38%, transparent 48%, rgba(2, 12, 17, 0.22) 100%);
  mix-blend-mode: multiply;
  z-index: 2;
  transition: background 3s ease;
}

.vignette {
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(2, 9, 13, 0.28) 82%, rgba(1, 7, 10, 0.58) 100%);
  z-index: 3;
  transition: background 0.8s ease, opacity 0.8s ease;
}

.grain {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
  animation: grainShift 0.32s steps(2) infinite;
  z-index: 4;
}

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-1.2%, 0.8%, 0); }
  50% { transform: translate3d(0.7%, -1.1%, 0); }
  75% { transform: translate3d(-0.5%, -0.5%, 0); }
  100% { transform: translate3d(0.9%, 0.4%, 0); }
}

.letterbox {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  background: #041014;
  z-index: 22;
  pointer-events: none;
  transition: height 0.9s cubic-bezier(0.22, 0.8, 0.22, 1);
}

.letterbox.top { top: 0; }
.letterbox.bottom { bottom: 0; }
body.cinematic .letterbox { height: 7.2vh; }
body.pov-mode .vignette {
  background: radial-gradient(ellipse at center, transparent 44%, rgba(2, 9, 13, 0.32) 76%, rgba(1, 7, 10, 0.72) 100%);
}
body.pov-mode .color-grade {
  background:
    linear-gradient(180deg, rgba(7, 20, 30, 0.28), transparent 28%, transparent 66%, rgba(3, 12, 17, 0.46)),
    radial-gradient(100% 80% at 52% 42%, transparent 46%, rgba(2, 10, 14, 0.3) 100%);
}

.screen-flash {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 239, 205, 0.75), rgba(244, 186, 126, 0.15) 46%, transparent 72%);
  opacity: 0;
  mix-blend-mode: screen;
}

.screen-flash.flash {
  animation: catchFlash 0.48s ease-out;
}

.screen-flash.flash-gold {
  animation: catchFlashGold 0.85s ease-out;
}

@keyframes catchFlash {
  0% { opacity: 0.26; }
  100% { opacity: 0; }
}

@keyframes catchFlashGold {
  0% { opacity: 0.42; }
  22% { opacity: 0.16; }
  100% { opacity: 0; }
}

/* ---------- loading ---------- */

.loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 70% at 50% 42%, rgba(27, 58, 66, 0.65), transparent 70%),
    #07181e;
  color: var(--cream);
  transition: opacity 1s ease, visibility 1s ease;
}

.loading.done {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  width: 92px;
  height: 92px;
  color: var(--cream-dim);
  animation: loadingBreathe 4s ease-in-out infinite;
}

.loading-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

@keyframes loadingBreathe {
  0%, 100% { transform: translateY(0) rotate(-1deg); opacity: 0.8; }
  50% { transform: translateY(-5px) rotate(1deg); opacity: 1; }
}

.loading-title {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--paper);
}

.loading-line {
  position: relative;
  width: 170px;
  height: 1px;
  margin-top: 28px;
  background: rgba(246, 234, 215, 0.14);
  overflow: hidden;
}

.loading-line span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-bright), var(--coral));
  transition: width 0.35s ease;
}

.loading-copy {
  margin-top: 15px;
  color: rgba(246, 234, 215, 0.45);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

/* ---------- HUD shell ---------- */

.hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hud.is-playing,
.hud.is-paused {
  opacity: 1;
  visibility: visible;
}

.hud button,
.hud .hint-bar {
  pointer-events: auto;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(22px, env(safe-area-inset-top)) clamp(20px, 4vw, 54px) 0;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  filter: drop-shadow(0 2px 12px rgba(3, 12, 16, 0.35));
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--cream);
  opacity: 0.9;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-en {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.27em;
  color: rgba(246, 234, 215, 0.6);
}

.brand-cn {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.25em;
}

.journey {
  position: absolute;
  left: 50%;
  top: max(12px, env(safe-area-inset-top));
  width: 220px;
  height: 76px;
  transform: translateX(-50%);
  opacity: 0.92;
  transition: opacity 0.6s ease;
}

.journey-arc {
  position: relative;
  width: 100%;
  height: 100%;
}

.journey-arc > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sun-path-dot {
  filter: drop-shadow(0 0 7px rgba(244, 202, 139, 0.9));
  transition: cx 0.5s linear, cy 0.5s linear, fill 1s ease;
}

.journey-center {
  position: absolute;
  top: 41px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-shadow: 0 2px 12px rgba(2, 10, 14, 0.45);
}

.phase-label {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}

.clock-label {
  color: rgba(246, 234, 215, 0.47);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.icon-btn {
  position: relative;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 22, 28, 0.24);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  color: var(--cream);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.icon-btn:hover {
  background: rgba(246, 234, 215, 0.12);
  border-color: rgba(246, 234, 215, 0.34);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.sound-off { display: none; }
.icon-btn.is-muted .sound-on { display: none; }
.icon-btn.is-muted .sound-off { display: block; }

.stat-count {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  color: rgba(246, 234, 215, 0.66);
}

.camera-btn {
  padding-right: 8px;
}

.camera-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(246, 234, 215, 0.1);
  color: rgba(246, 234, 215, 0.7);
  font-family: var(--mono);
  font-size: 8px;
}

/* ---------- catch + speed ---------- */

.left-cluster {
  position: absolute;
  left: clamp(20px, 4vw, 54px);
  top: clamp(125px, 17vh, 185px);
  text-shadow: 0 3px 18px rgba(2, 9, 12, 0.4);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.eyebrow {
  color: rgba(246, 234, 215, 0.45);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  white-space: nowrap;
}

.catch-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 3px;
}

.catch-number {
  font-family: var(--serif);
  font-size: clamp(42px, 5.2vw, 67px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s cubic-bezier(0.2, 1.8, 0.4, 1), color 0.4s ease;
}

.catch-number.pulse {
  animation: catchPulse 0.36s cubic-bezier(0.2, 1.8, 0.4, 1);
  color: var(--gold-bright);
}

@keyframes catchPulse {
  0% { transform: scale(1); }
  38% { transform: scale(1.22) translateY(-3px); }
  100% { transform: scale(1); }
}

.catch-unit {
  color: rgba(246, 234, 215, 0.52);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.catch-sep {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: rgba(246, 234, 215, 0.2);
}

.score-wrap {
  color: rgba(246, 234, 215, 0.82);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.score-wrap small {
  color: rgba(246, 234, 215, 0.4);
  font-size: 9px;
}

.combo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 22px;
  padding: 0 9px;
  margin-top: 8px;
  border: 1px solid rgba(241, 194, 135, 0.28);
  border-radius: 999px;
  background: rgba(11, 31, 37, 0.32);
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.combo-badge.visible {
  opacity: 1;
  transform: translateY(0);
}

.combo-badge i {
  color: rgba(246, 234, 215, 0.46);
  font-family: var(--sans);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.speed-panel {
  position: absolute;
  left: clamp(20px, 4vw, 54px);
  bottom: clamp(26px, 5vh, 50px);
  display: flex;
  align-items: flex-end;
  gap: 15px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.speed-dial {
  position: relative;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  filter: drop-shadow(0 4px 24px rgba(2, 9, 12, 0.25));
}

.speed-dial > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-3deg);
}

#speed-arc {
  transition: stroke-dashoffset 0.24s linear, stroke 0.8s ease;
  filter: drop-shadow(0 0 6px rgba(241, 194, 135, 0.4));
}

.dial-ticks {
  opacity: 0.54;
}

.speed-readout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 13px;
}

#speed-value {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  color: var(--paper);
  text-shadow: 0 2px 18px rgba(2, 9, 12, 0.4);
}

.speed-unit {
  margin-top: 5px;
  color: rgba(246, 234, 215, 0.38);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.mode-chip {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(120, 184, 181, 0.28);
  border-radius: 999px;
  background: rgba(7, 23, 28, 0.52);
  color: var(--sea-bright);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
  transition: opacity 0.35s ease, border-color 0.35s ease;
  backdrop-filter: blur(10px);
}

.mode-chip.manual {
  color: rgba(246, 234, 215, 0.55);
  border-color: rgba(246, 234, 215, 0.14);
}

.auto-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
  animation: autoPulse 1.8s ease-in-out infinite;
}

@keyframes autoPulse {
  0%, 100% { opacity: 0.36; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.12); }
}

.cadence {
  width: 150px;
  padding-bottom: 17px;
}

.cadence-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(246, 234, 215, 0.47);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.cadence-head span:last-child {
  color: rgba(246, 234, 215, 0.7);
  font-variant-numeric: tabular-nums;
}

.cadence-bar {
  width: 100%;
  height: 2px;
  margin-top: 7px;
  background: rgba(246, 234, 215, 0.12);
  overflow: hidden;
}

.cadence-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sea), var(--gold-bright));
  transition: width 0.28s linear;
}

.music-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: rgba(246, 234, 215, 0.4);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.music-note {
  color: var(--gold);
  font-size: 11px;
}

.music-line i {
  width: 1px;
  height: 9px;
  background: rgba(246, 234, 215, 0.15);
  margin: 0 2px;
}

/* ---------- fish radar ---------- */

.fish-radar {
  position: absolute;
  right: clamp(20px, 4vw, 54px);
  bottom: clamp(28px, 5vh, 52px);
  width: clamp(245px, 24vw, 302px);
  padding: 14px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(9, 28, 34, 0.5), rgba(7, 21, 27, 0.27));
  box-shadow: 0 16px 50px rgba(3, 12, 16, 0.15);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.5s ease;
}

.fish-radar.alert {
  border-color: rgba(241, 194, 135, 0.35);
}

.fish-radar.alert::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  pointer-events: none;
  border: 1px solid rgba(241, 194, 135, 0.22);
  animation: radarAlert 2s ease-out infinite;
}

@keyframes radarAlert {
  0% { opacity: 0.7; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.025); }
  100% { opacity: 0; }
}

.radar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.radar-status {
  color: rgba(246, 234, 215, 0.42);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.fish-radar.alert .radar-status {
  color: var(--gold-bright);
}

.lane-map {
  position: relative;
  height: 47px;
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(246, 234, 215, 0.08);
  border-bottom: 1px solid rgba(246, 234, 215, 0.08);
  overflow: hidden;
}

.lane {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 4px;
  border-right: 1px dashed rgba(246, 234, 215, 0.13);
}

.lane:last-of-type {
  border-right: 0;
}

.lane > span {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 234, 215, 0.12), transparent);
}

.lane em {
  color: rgba(246, 234, 215, 0.25);
  font-family: var(--serif);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.1em;
}

.lane-marker {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 33.333%;
  height: 3px;
  transform: translateX(-50%);
  transition: left 0.35s cubic-bezier(0.22, 0.9, 0.28, 1);
}

.lane-marker::before {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--sea-bright);
  box-shadow: 0 0 8px rgba(166, 222, 215, 0.6);
}

.lane-marker::after {
  content: "";
  position: absolute;
  left: calc(50% - 4px);
  bottom: 3px;
  width: 8px;
  height: 6px;
  background: var(--sea-bright);
  clip-path: polygon(50% 0, 100% 100%, 50% 68%, 0 100%);
  filter: drop-shadow(0 0 4px rgba(166, 222, 215, 0.75));
}

.fish-marker {
  position: absolute;
  top: 11px;
  left: 16.666%;
  width: 26px;
  height: 16px;
  color: var(--gold-bright);
  transform: translateX(-50%);
  opacity: 0;
  transition: left 0.5s ease, opacity 0.25s ease, top 0.5s ease;
  filter: drop-shadow(0 0 8px rgba(246, 211, 153, 0.65));
}

.fish-marker svg {
  width: 100%;
  height: 100%;
  animation: fishMarkerBob 1.3s ease-in-out infinite;
}

@keyframes fishMarkerBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
}

.fish-marker.visible {
  opacity: 1;
}

.fish-marker.moonfish {
  color: #a9e7ef;
}

.fish-marker.goldfish {
  color: #ffd37e;
}

.radar-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: rgba(246, 234, 215, 0.44);
  font-size: 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}

#fish-hint {
  overflow: hidden;
  text-overflow: ellipsis;
}

#fish-distance {
  color: rgba(246, 234, 215, 0.3);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.radar-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 1px;
  overflow: hidden;
  opacity: 0.6;
}

.radar-line span {
  display: block;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: radarScan 4s linear infinite;
}

@keyframes radarScan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(430%); }
}

/* ---------- camera caption + hints ---------- */

.camera-caption {
  position: absolute;
  left: clamp(20px, 4vw, 54px);
  bottom: 10.5vh;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.cinematic .camera-caption {
  opacity: 1;
  transform: translateY(0);
}

.camera-num {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  opacity: 0.7;
}

.camera-caption div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#camera-name {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.16em;
}

#camera-desc {
  color: rgba(246, 234, 215, 0.44);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.hint-bar {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 11px 8px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(6, 22, 28, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(246, 234, 215, 0.52);
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hint-bar > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hint-bar kbd {
  height: 17px;
  min-width: 17px;
  font-size: 8px;
  padding: 0 4px;
  opacity: 0.82;
}

.hint-auto {
  color: rgba(246, 234, 215, 0.3);
  padding-left: 2px;
  border-left: 1px solid rgba(246, 234, 215, 0.12);
  padding-left: 14px;
}

.hint-dismiss {
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(246, 234, 215, 0.14);
  border-radius: 999px;
  color: rgba(246, 234, 215, 0.55);
  font-size: 8px;
  letter-spacing: 0.06em;
  transition: background 0.2s ease;
}

.hint-dismiss:hover {
  background: rgba(246, 234, 215, 0.1);
}

.hint-bar.dismissed {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  visibility: hidden;
}

/* ---------- toasts and floaters ---------- */

.toast-stack {
  position: absolute;
  top: 82px;
  right: clamp(20px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  z-index: 24;
}

.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 320px;
  padding: 11px 15px 11px 11px;
  border: 1px solid rgba(246, 234, 215, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 43, 49, 0.9), rgba(7, 23, 29, 0.82));
  box-shadow: 0 12px 36px rgba(3, 10, 14, 0.25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  opacity: 0;
  transform: translateX(18px) scale(0.97);
  animation: toastIn 0.55s cubic-bezier(0.18, 0.9, 0.25, 1) forwards;
}

.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-bright), var(--coral));
}

.toast.toast-achievement {
  border-color: rgba(241, 194, 135, 0.35);
  background: linear-gradient(135deg, rgba(47, 47, 39, 0.92), rgba(12, 30, 33, 0.9));
}

.toast.toast-camera,
.toast.toast-info {
  border-color: rgba(120, 184, 181, 0.26);
}

.toast.leaving {
  animation: toastOut 0.45s ease forwards;
}

@keyframes toastIn {
  0% { opacity: 0; transform: translateX(18px) scale(0.97); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  0% { opacity: 1; transform: translateX(0); max-height: 100px; }
  100% { opacity: 0; transform: translateX(14px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -8px; }
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid rgba(241, 194, 135, 0.3);
  border-radius: 50%;
  background: rgba(241, 194, 135, 0.08);
  color: var(--gold-bright);
}

.toast-icon svg {
  width: 18px;
  height: 18px;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast-title {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.toast-desc {
  color: rgba(246, 234, 215, 0.48);
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

.float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 19;
}

.float-score {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(2, 9, 12, 0.6);
  animation: floatUp 1.15s cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
  white-space: nowrap;
}

.float-score small {
  display: block;
  margin-top: 2px;
  color: rgba(246, 234, 215, 0.65);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-align: center;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.86); }
  18% { opacity: 1; transform: translate(-50%, -56%) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%, -165%) scale(0.96); }
}

/* ---------- start screen ---------- */

.screen {
  position: absolute;
  inset: 0;
  z-index: 50;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}

.start-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh clamp(26px, 7.2vw, 116px) 8vh;
  background:
    linear-gradient(90deg, rgba(3, 14, 18, 0.93) 0%, rgba(4, 17, 22, 0.84) 22%, rgba(4, 17, 22, 0.57) 40%, rgba(4, 17, 22, 0.18) 61%, rgba(4, 17, 22, 0.02) 76%, transparent 92%),
    linear-gradient(0deg, rgba(3, 14, 18, 0.68) 0%, transparent 36%),
    linear-gradient(180deg, rgba(3, 14, 18, 0.24) 0%, transparent 24%);
}

.start-screen.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition-duration: 0.7s;
}

.start-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 80% at 36% 50%, rgba(7, 22, 28, 0.38), transparent 65%);
  pointer-events: none;
}

.start-content {
  position: relative;
  z-index: 2;
  width: min(630px, 57vw);
  animation: introRise 1.4s cubic-bezier(0.18, 0.8, 0.2, 1) both;
}

@keyframes introRise {
  0% { opacity: 0; transform: translateY(22px); }
  100% { opacity: 1; transform: translateY(0); }
}

.start-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(246, 234, 215, 0.55);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.26em;
}

.kicker-line {
  width: 34px;
  height: 1px;
  background: var(--gold);
  opacity: 0.65;
}

.start-content h1 {
  margin: 14px 0 12px;
  font-family: var(--serif);
  font-size: clamp(58px, 8.1vw, 116px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--paper);
  text-shadow: 0 12px 50px rgba(1, 7, 10, 0.35);
}

.start-content h1 span {
  color: var(--coral-soft);
  font-style: italic;
  margin-left: 0.04em;
}

.start-sub {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 42px);
  max-width: 560px;
}

.en-title {
  flex: none;
  margin-top: 6px;
  color: rgba(246, 234, 215, 0.52);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.3em;
}

.start-sub p {
  margin: 0;
  color: rgba(246, 234, 215, 0.74);
  font-family: var(--serif);
  font-size: clamp(13px, 1.3vw, 16px);
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.start-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  min-width: 190px;
  height: 52px;
  padding: 0 21px 0 25px;
  border: 1px solid rgba(250, 241, 227, 0.3);
  border-radius: 3px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 9px 30px rgba(4, 15, 19, 0.18);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.primary-btn svg {
  width: 26px;
  height: 13px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.primary-btn:hover {
  background: #fff8ec;
  transform: translateY(-2px);
  box-shadow: 0 13px 36px rgba(4, 15, 19, 0.28);
}

.primary-btn:hover svg {
  transform: translateX(4px);
}

.primary-btn:active {
  transform: translateY(0) scale(0.99);
}

.ghost-btn {
  height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(246, 234, 215, 0.2);
  border-radius: 3px;
  background: rgba(246, 234, 215, 0.03);
  color: rgba(246, 234, 215, 0.72);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.12em;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ghost-btn:hover {
  background: rgba(246, 234, 215, 0.1);
  border-color: rgba(246, 234, 215, 0.36);
  color: var(--cream);
}

.start-meta {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 36px;
  border-top: 1px solid rgba(246, 234, 215, 0.13);
  border-bottom: 1px solid rgba(246, 234, 215, 0.13);
  width: min(560px, 100%);
}

.start-meta > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 12px 21px;
  border-right: 1px solid rgba(246, 234, 215, 0.1);
}

.start-meta > div:first-child {
  padding-left: 0;
}

.start-meta > div:last-child {
  border-right: 0;
}

.start-meta span {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--gold-bright);
}

.start-meta small {
  color: rgba(246, 234, 215, 0.42);
  font-size: 8px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.start-meta .headphone {
  margin-left: auto;
  padding-right: 0;
  color: rgba(246, 234, 215, 0.38);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.headphone i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--sea-bright);
  box-shadow: 0 0 6px var(--sea-bright);
}

.start-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 15px;
  color: rgba(246, 234, 215, 0.38);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.start-controls kbd {
  border-color: rgba(246, 234, 215, 0.2);
  background: rgba(246, 234, 215, 0.04);
}

.start-foot {
  position: absolute;
  left: clamp(26px, 8vw, 120px);
  right: clamp(26px, 8vw, 120px);
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  z-index: 2;
  color: rgba(246, 234, 215, 0.28);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.scroll-note {
  position: absolute;
  left: 50%;
  bottom: max(23px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: rgba(246, 234, 215, 0.36);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.2em;
  animation: scrollNote 3s ease-in-out infinite;
  z-index: 2;
  display: none;
}

@keyframes scrollNote {
  0%, 100% { opacity: 0.25; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.7; transform: translateX(-50%) translateY(-3px); }
}

/* ---------- modals ---------- */

.modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 11, 15, 0.62);
  backdrop-filter: blur(12px) saturate(0.85);
  -webkit-backdrop-filter: blur(12px) saturate(0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: min(860px, 94vw);
  max-height: min(86vh, 780px);
  overflow: auto;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(246, 234, 215, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(140deg, rgba(19, 48, 53, 0.95), rgba(8, 26, 31, 0.98) 58%, rgba(12, 32, 37, 0.96));
  box-shadow: 0 30px 100px rgba(0, 5, 8, 0.5);
  color: var(--cream);
  transform: translateY(13px) scale(0.985);
  transition: transform 0.45s cubic-bezier(0.18, 0.9, 0.26, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 234, 215, 0.24) transparent;
}

.modal.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241, 194, 135, 0.75), var(--sea), transparent);
}

.modal-close {
  position: absolute;
  top: 19px;
  right: 21px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(246, 234, 215, 0.13);
  border-radius: 50%;
  color: rgba(246, 234, 215, 0.55);
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 200;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: rgba(246, 234, 215, 0.1);
  color: var(--paper);
}

.modal-kicker {
  color: rgba(241, 194, 135, 0.7);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.25em;
}

.modal-card h2 {
  margin: 9px 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.modal-lead {
  max-width: 600px;
  margin: 0;
  color: rgba(246, 234, 215, 0.53);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: 0.04em;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid rgba(246, 234, 215, 0.12);
  border-left: 1px solid rgba(246, 234, 215, 0.12);
}

.help-block {
  padding: 19px 22px;
  border-right: 1px solid rgba(246, 234, 215, 0.12);
  border-bottom: 1px solid rgba(246, 234, 215, 0.12);
}

.help-block h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.help-block p {
  margin: 0;
  color: rgba(246, 234, 215, 0.5);
  font-size: 10px;
  line-height: 1.75;
}

.help-block p b {
  color: rgba(246, 234, 215, 0.82);
  font-family: var(--mono);
  font-weight: 400;
}

.help-block ul {
  margin: 8px 0 0;
  padding-left: 14px;
  color: rgba(246, 234, 215, 0.48);
  font-size: 10px;
  line-height: 1.8;
}

.help-block li::marker {
  color: var(--gold);
}

.key-row {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: rgba(246, 234, 215, 0.63);
  font-size: 10px;
}

.key-row > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.key-row kbd {
  height: 21px;
  min-width: 21px;
  margin-right: 2px;
}

.help-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 25px;
  color: rgba(246, 234, 215, 0.3);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.text-btn {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.12em;
  border-bottom: 1px solid rgba(241, 194, 135, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.text-btn:hover {
  color: var(--paper);
  border-color: var(--paper);
}

/* achievements */
.achievements-card {
  width: min(980px, 95vw);
}

.achievements-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.ach-progress {
  flex: none;
  min-width: 120px;
  text-align: right;
  padding-bottom: 4px;
}

.ach-progress span {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold-bright);
}

.ach-progress small {
  color: rgba(246, 234, 215, 0.34);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  margin-left: 4px;
}

.ach-progress-line {
  width: 100%;
  height: 2px;
  margin-top: 9px;
  background: rgba(246, 234, 215, 0.12);
}

.ach-progress-line i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sea), var(--gold-bright));
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.achievement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

.achievement {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 91px;
  padding: 15px 15px 14px;
  border: 1px solid rgba(246, 234, 215, 0.1);
  background: rgba(246, 234, 215, 0.025);
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.achievement.unlocked {
  border-color: rgba(241, 194, 135, 0.25);
  background: linear-gradient(120deg, rgba(241, 194, 135, 0.075), rgba(120, 184, 181, 0.035));
}

.achievement.unlocked::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -40px;
  width: 108px;
  height: 108px;
  border: 1px solid rgba(241, 194, 135, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.achievement-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid rgba(246, 234, 215, 0.14);
  border-radius: 50%;
  color: rgba(246, 234, 215, 0.25);
  background: rgba(246, 234, 215, 0.025);
}

.achievement.unlocked .achievement-badge {
  border-color: rgba(241, 194, 135, 0.5);
  color: var(--gold-bright);
  background: radial-gradient(circle at 36% 30%, rgba(246, 211, 153, 0.2), rgba(241, 194, 135, 0.03));
  box-shadow: 0 0 22px rgba(241, 194, 135, 0.08);
}

.achievement-badge svg {
  width: 23px;
  height: 23px;
}

.achievement-body {
  min-width: 0;
  padding-top: 1px;
}

.achievement-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(246, 234, 215, 0.42);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.achievement.unlocked .achievement-name {
  color: var(--paper);
}

.achievement-name em {
  display: inline-block;
  padding: 2px 4px;
  border: 1px solid rgba(246, 234, 215, 0.12);
  color: rgba(246, 234, 215, 0.25);
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.achievement.unlocked .achievement-name em {
  border-color: rgba(241, 194, 135, 0.25);
  color: rgba(241, 194, 135, 0.65);
}

.achievement-desc {
  margin-top: 5px;
  color: rgba(246, 234, 215, 0.3);
  font-size: 9px;
  line-height: 1.55;
}

.achievement.unlocked .achievement-desc {
  color: rgba(246, 234, 215, 0.5);
}

.achievement-status {
  margin-left: auto;
  flex: none;
  padding-top: 3px;
  color: rgba(246, 234, 215, 0.18);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.achievement.unlocked .achievement-status {
  color: var(--gold);
}

.achievement-progress {
  width: 100%;
  height: 1px;
  margin-top: 7px;
  background: rgba(246, 234, 215, 0.09);
}

.achievement-progress i {
  display: block;
  height: 100%;
  background: rgba(120, 184, 181, 0.5);
}

/* pause */
.pause-screen {
  z-index: 62;
}

.pause-card {
  width: min(620px, 94vw);
  text-align: center;
  padding: 46px;
}

.pause-card h2 {
  font-size: clamp(38px, 6vw, 58px);
}

.pause-card .modal-lead {
  margin: 0 auto;
}

.pause-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.pause-actions .primary-btn {
  min-width: 180px;
}

.pause-actions .ghost-btn {
  height: 48px;
}

.pause-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid rgba(246, 234, 215, 0.11);
  padding-top: 20px;
}

.pause-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 30px;
  border-right: 1px solid rgba(246, 234, 215, 0.1);
}

.pause-stats > div:last-child {
  border-right: 0;
}

.pause-stats span {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--gold-bright);
}

.pause-stats small {
  color: rgba(246, 234, 215, 0.32);
  font-size: 8px;
  letter-spacing: 0.08em;
}

/* ---------- mobile controls ---------- */

.mobile-controls {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  padding: 0 16px;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
  z-index: 16;
}

.touch-steer,
.touch-drive,
.touch-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.touch-actions {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  gap: 7px;
}

.touch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(246, 234, 215, 0.22);
  border-radius: 50%;
  background: rgba(7, 23, 29, 0.42);
  backdrop-filter: blur(13px) saturate(1.2);
  -webkit-backdrop-filter: blur(13px) saturate(1.2);
  color: rgba(246, 234, 215, 0.8);
  box-shadow: 0 3px 18px rgba(2, 9, 12, 0.12);
  touch-action: none;
  transition: background 0.13s ease, transform 0.13s ease, border-color 0.13s ease;
}

.touch-btn span {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1;
}

.touch-btn small {
  color: rgba(246, 234, 215, 0.42);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.touch-btn.pressed {
  background: rgba(241, 194, 135, 0.24);
  border-color: rgba(241, 194, 135, 0.6);
  transform: scale(0.94);
}

.touch-btn.drive {
  width: 70px;
  height: 70px;
}

.touch-btn.drive.pedal {
  color: var(--ink);
  background: rgba(246, 234, 215, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
}

.touch-btn.drive.pedal small {
  color: rgba(12, 34, 41, 0.55);
}

.touch-btn.drive.pedal.pressed {
  background: var(--gold-bright);
  transform: scale(0.94);
}

.touch-btn.brake span {
  font-size: 27px;
}

.touch-btn.action.small {
  width: 48px;
  height: 48px;
}

.touch-btn.action.small span {
  font-size: 16px;
}

.touch-btn.action.small small {
  font-size: 6px;
}

.touch-device .mobile-controls {
  display: flex;
}

.touch-device .hint-bar {
  display: none;
}

.toast.compact {
  padding-top: 8px;
  padding-bottom: 8px;
}

.toast.compact .toast-icon {
  width: 27px;
  height: 27px;
}

.toast.compact .toast-title {
  font-size: 12px;
}

.toast.compact .toast-desc {
  display: none;
}

/* dynamic classes */
body.hide-hud .hud {
  opacity: 0 !important;
  visibility: hidden;
}

body.hide-hud .letterbox {
  height: 0 !important;
}

body.cinematic .topbar,
body.cinematic .left-cluster,
body.cinematic .speed-panel,
body.cinematic .fish-radar,
body.cinematic .hint-bar {
  opacity: 0;
  transform: translateY(-7px);
  pointer-events: none;
}

body.cinematic .top-actions {
  opacity: 0;
  pointer-events: none;
}

body.cinematic .mobile-controls {
  opacity: 0.7;
}

body.cinematic .camera-caption {
  opacity: 1;
}

.hud.is-paused .topbar,
.hud.is-paused .left-cluster,
.hud.is-paused .speed-panel,
.hud.is-paused .fish-radar,
.hud.is-paused .hint-bar,
.hud.is-paused .mobile-controls {
  opacity: 0.16;
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.webgl-error {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: #07181e;
  color: var(--cream);
  text-align: center;
  padding: 30px;
}

.webgl-error h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.webgl-error p {
  max-width: 440px;
  color: rgba(246, 234, 215, 0.5);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .hint-bar {
    gap: 10px;
  }
  .hint-auto {
    display: none !important;
  }
  .fish-radar {
    width: 235px;
  }
  .speed-panel {
    transform: scale(0.9);
    transform-origin: bottom left;
  }
}

@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: max(14px, env(safe-area-inset-top));
  }
  .brand-mark {
    width: 28px;
    height: 28px;
  }
  .brand-en {
    font-size: 6.5px;
  }
  .brand-cn {
    font-size: 13px;
  }
  .journey {
    display: none;
  }
  .top-actions {
    gap: 5px;
  }
  .icon-btn {
    height: 34px;
    min-width: 34px;
    padding: 0 8px;
  }
  .icon {
    width: 16px;
    height: 16px;
  }
  .stat-count {
    font-size: 8px;
  }
  .camera-key {
    display: none;
  }
  .left-cluster {
    left: 16px;
    top: max(82px, calc(env(safe-area-inset-top) + 64px));
  }
  .eyebrow {
    font-size: 6.5px;
  }
  .catch-number {
    font-size: 38px;
  }
  .catch-unit {
    font-size: 10px;
  }
  .score-wrap {
    font-size: 12px;
  }
  .combo-badge {
    height: 19px;
    font-size: 8px;
  }
  .speed-panel {
    left: 14px;
    bottom: 178px;
    transform: scale(0.68);
  }
  .fish-radar {
    right: 14px;
    bottom: 178px;
    width: 204px;
    padding: 10px 12px 9px;
    transform: scale(0.78);
    transform-origin: bottom right;
  }
  .fish-radar .lane-map {
    height: 38px;
    margin-top: 7px;
  }
  .radar-copy {
    font-size: 8px;
    margin-top: 6px;
  }
  .hint-bar {
    display: none;
  }
  .mobile-controls {
    display: flex;
  }
  .toast-stack {
    top: max(62px, calc(env(safe-area-inset-top) + 52px));
    right: 12px;
    left: 12px;
    align-items: flex-end;
  }
  .toast {
    max-width: min(300px, calc(100vw - 24px));
    padding: 9px 12px 9px 9px;
  }
  .toast-title {
    font-size: 12px;
  }
  .toast-desc {
    font-size: 8px;
  }
  .toast-icon {
    width: 27px;
    height: 27px;
  }
  .start-screen {
    padding: 15vh 22px 11vh;
    justify-content: flex-end;
    background:
      linear-gradient(0deg, rgba(3, 15, 19, 0.92) 0%, rgba(3, 15, 19, 0.65) 42%, rgba(3, 15, 19, 0.12) 75%, transparent 100%),
      linear-gradient(90deg, rgba(3, 15, 19, 0.38), transparent 70%);
  }
  .start-content {
    width: 100%;
  }
  .start-kicker {
    font-size: 7px;
  }
  .start-content h1 {
    font-size: clamp(57px, 19vw, 88px);
    margin: 12px 0 9px;
  }
  .start-sub {
    gap: 14px;
    display: block;
  }
  .en-title {
    display: block;
    margin: 0 0 6px;
  }
  .start-sub p {
    font-size: 11.5px;
    line-height: 1.7;
  }
  .start-actions {
    margin-top: 20px;
    gap: 9px;
  }
  .primary-btn {
    min-width: 160px;
    height: 48px;
    padding: 0 16px 0 20px;
    font-size: 12px;
    gap: 20px;
  }
  .ghost-btn {
    height: 48px;
    padding: 0 15px;
    font-size: 10px;
  }
  .start-meta {
    margin-top: 23px;
    width: 100%;
  }
  .start-meta > div {
    padding: 9px 10px;
  }
  .start-meta > div:first-child {
    padding-left: 0;
  }
  .start-meta span {
    font-size: 16px;
  }
  .start-meta small {
    font-size: 6.5px;
  }
  .start-meta .headphone {
    display: none;
  }
  .start-controls {
    display: none;
  }
  .start-foot {
    display: none;
  }
  .modal {
    padding: 10px;
  }
  .modal-card {
    width: 100%;
    max-height: 92vh;
    padding: 25px 18px;
  }
  .modal-card h2 {
    font-size: 32px;
  }
  .modal-lead {
    font-size: 11px;
  }
  .help-grid {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }
  .help-block {
    padding: 15px 14px;
  }
  .help-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
  }
  .achievements-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ach-progress {
    text-align: left;
    width: 130px;
  }
  .achievement-grid {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 18px;
  }
  .achievement {
    min-height: 76px;
    padding: 11px;
    gap: 10px;
  }
  .achievement-badge {
    width: 36px;
    height: 36px;
  }
  .achievement-badge svg {
    width: 19px;
    height: 19px;
  }
  .achievement-name {
    font-size: 12px;
  }
  .achievement-desc {
    font-size: 8px;
  }
  .pause-card {
    padding: 32px 20px;
  }
  .pause-stats > div {
    padding: 0 15px;
  }
  .pause-stats span {
    font-size: 20px;
  }
  .camera-caption {
    left: 16px;
    bottom: 12vh;
  }
  #camera-name {
    font-size: 15px;
  }
  .float-score {
    font-size: 19px;
  }
}

@media (max-width: 520px) {
  .brand-en {
    display: none;
  }
  .brand-cn {
    font-size: 12px;
    letter-spacing: 0.18em;
  }
  .icon-btn.stat-btn {
    padding: 0 7px;
  }
  .top-actions {
    gap: 3px;
  }
  .stat-count {
    font-size: 7px;
  }
  .fish-radar {
    width: 175px;
    bottom: 170px;
  }
  .speed-panel {
    bottom: 170px;
    transform: scale(0.6);
  }
  .touch-btn {
    width: 58px;
    height: 58px;
  }
  .touch-btn.drive {
    width: 64px;
    height: 64px;
  }
  .touch-actions {
    bottom: 68px;
  }
  .touch-btn.action.small {
    width: 43px;
    height: 43px;
  }
  .start-content h1 {
    font-size: clamp(55px, 20vw, 78px);
  }
  .start-sub p br {
    display: none;
  }
  .start-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .primary-btn {
    width: 100%;
  }
  .ghost-btn {
    width: 100%;
  }
  .start-meta small {
    letter-spacing: 0;
  }
  .pause-stats {
    gap: 0;
  }
  .pause-stats > div {
    padding: 0 10px;
  }
  .toast-stack {
    top: max(56px, calc(env(safe-area-inset-top) + 48px));
  }
}

@media (max-height: 580px) and (orientation: landscape) {
  .start-screen {
    justify-content: center;
    padding-top: 10vh;
    padding-bottom: 8vh;
  }
  .start-content h1 {
    font-size: clamp(50px, 10vh, 76px);
    margin: 8px 0 6px;
  }
  .start-sub p {
    line-height: 1.55;
    font-size: 10.5px;
  }
  .start-meta {
    display: none;
  }
  .start-actions {
    margin-top: 14px;
  }
  .start-controls {
    display: none;
  }
  .speed-panel {
    top: 80px;
    bottom: auto;
    transform: scale(0.58);
    transform-origin: top left;
  }
  .fish-radar {
    top: 68px;
    bottom: auto;
    transform: scale(0.68);
    transform-origin: top right;
  }
  .left-cluster {
    display: none;
  }
  .journey {
    display: none;
  }
  .catch-number {
    font-size: 32px;
  }
  .speed-panel .cadence {
    display: none;
  }
  .mobile-controls {
    padding-bottom: 2px;
  }
  .touch-actions {
    bottom: 4px;
  }
  .camera-caption {
    bottom: 9vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain {
    animation: none;
  }
  .scroll-note,
  .fish-marker svg,
  .radar-line span,
  .auto-dot {
    animation: none;
  }
  .start-content {
    animation-duration: 0.5s;
  }
}
