/* ============================================================
   深蓝潜行 / Deep Blue Dive
   ============================================================ */
:root {
  --ink: #eaf7f6;
  --muted: #9bb9bd;
  --deep: #041923;
  --deep-2: #062b3a;
  --glass: rgba(5, 28, 39, 0.58);
  --glass-strong: rgba(4, 22, 33, 0.82);
  --line: rgba(190, 242, 238, 0.16);
  --line-strong: rgba(190, 242, 238, 0.28);
  --mint: #9ef0dd;
  --aqua: #62ddcf;
  --coral: #ff7a57;
  --coral-dark: #df5438;
  --gold: #ffd380;
  --danger: #ff6b65;
  --font-ui: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-display: "Arial Black", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "Bahnschrift", "DIN Alternate", "Consolas", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

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

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2%, 1.5%, 0); }
  50% { transform: translate3d(1.4%, -1%, 0); }
  75% { transform: translate3d(-1%, -2%, 0); }
  100% { transform: translate3d(2%, 1%, 0); }
}

.screen-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 44%, transparent 42%, rgba(0, 12, 20, 0.18) 74%, rgba(0, 9, 15, 0.55) 100%),
    linear-gradient(180deg, rgba(2, 14, 22, 0.34), transparent 16%, transparent 78%, rgba(2, 12, 18, 0.4));
}

.damage-flash {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(255, 54, 45, 0.52) 100%);
  transition: opacity 0.42s ease-out;
}

.damage-flash.is-active {
  opacity: 1;
  transition: opacity 0.06s ease-out;
}

/* ============================================================
   HUD
   ============================================================ */
.hud {
  position: absolute;
  inset: 0;
  z-index: 8;
  padding: clamp(16px, 2.4vw, 34px);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.hud.hud-hidden {
  opacity: 0;
}

.hud-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
}

.hud-cluster {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  pointer-events: none;
}

.hud-right {
  justify-content: flex-end;
}

.hud-left {
  flex-wrap: wrap;
}

.glass {
  background: linear-gradient(145deg, rgba(7, 36, 48, 0.72), rgba(3, 20, 30, 0.56));
  border: 1px solid var(--line);
  box-shadow:
    0 16px 45px rgba(0, 10, 17, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.brand-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 58px;
  padding: 0 17px 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(3, 23, 33, 0.78), rgba(6, 34, 45, 0.32));
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.brand-mark {
  width: 31px;
  height: 31px;
  color: var(--mint);
  display: grid;
  place-items: center;
  border: 1px solid rgba(158, 240, 221, 0.3);
  border-radius: 50%;
  background: rgba(98, 221, 207, 0.08);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-chip strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.15;
}

.brand-chip small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: 0.16em;
}

.oxygen-card {
  width: 224px;
  padding: 11px 14px 10px;
  border-radius: 4px;
  pointer-events: none;
}

.meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.meter-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: #c7e7e3;
}

.o2-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.meter-value {
  font-family: var(--font-mono);
  color: var(--mint);
  line-height: 1;
}

.meter-value b {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.meter-value small {
  font-size: 9px;
  opacity: 0.6;
  margin-left: 1px;
}

.meter-track {
  position: relative;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(0, 11, 17, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.meter-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #4bd5c4, #b8f6de 72%, #ecffef);
  box-shadow: 0 0 14px rgba(116, 244, 214, 0.45);
  transition: background 0.3s ease;
}

.meter-ticks {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(2, 20, 24, 0.55) calc(10% - 1px), rgba(2, 20, 24, 0.55) 10%);
  opacity: 0.55;
}

.oxygen-card.is-low .meter-fill {
  background: linear-gradient(90deg, #ff7a57, #ffc266);
  box-shadow: 0 0 15px rgba(255, 122, 87, 0.55);
}

.oxygen-card.is-low .meter-value {
  color: #ffc266;
}

.oxygen-card.is-critical .meter-fill {
  background: linear-gradient(90deg, #ff5348, #ff8c73);
  animation: o2Pulse 0.85s ease-in-out infinite;
}

.oxygen-card.is-critical .meter-value {
  color: #ff8278;
}

@keyframes o2Pulse {
  50% { opacity: 0.45; filter: brightness(1.35); }
}

.hazard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}

.hazard-row > span {
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.hearts {
  display: flex;
  gap: 4px;
}

.heart {
  width: 15px;
  height: 14px;
  position: relative;
  filter: drop-shadow(0 0 5px rgba(255, 112, 100, 0.3));
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 8px;
  height: 12px;
  border-radius: 8px 8px 0 0;
  background: var(--coral);
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.heart::before {
  left: 7px;
}

.heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.heart.is-empty::before,
.heart.is-empty::after {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.heart.is-empty {
  filter: none;
}

.depth-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 210px;
  padding-top: 1px;
  pointer-events: none;
  text-shadow: 0 2px 14px rgba(0, 16, 25, 0.5);
}

.depth-label {
  font-size: 9px;
  letter-spacing: 0.32em;
  color: #c4e4e2;
  text-transform: uppercase;
}

.depth-number {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
  font-family: var(--font-mono);
}

.depth-number b {
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #f3fffb;
}

.depth-number small {
  font-size: 11px;
  color: var(--aqua);
  letter-spacing: 0.1em;
}

.depth-rule {
  position: relative;
  width: 122px;
  height: 1px;
  margin: 8px 0 5px;
  background: linear-gradient(90deg, transparent, rgba(190, 242, 238, 0.5), transparent);
}

.depth-rule i {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--mint);
  transition: left 0.3s ease;
}

.depth-max {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: rgba(205, 235, 232, 0.62);
}

.depth-max b {
  font-weight: 500;
  color: rgba(230, 251, 247, 0.9);
}

.boat-compass {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 3px 9px 3px 6px;
  border: 1px solid rgba(190, 242, 238, 0.13);
  border-radius: 20px;
  background: rgba(4, 24, 33, 0.36);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: rgba(213, 243, 239, 0.72);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.boat-compass.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.boat-compass svg {
  width: 11px;
  height: 11px;
  color: var(--mint);
  transform: rotate(var(--boat-angle, 0deg));
  transition: transform 0.2s linear;
}

.score-card {
  min-width: 190px;
  padding: 10px 13px 9px;
  border-radius: 4px;
  pointer-events: none;
}

.score-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.score-line + .score-line {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.score-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.score-line strong {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.score-line strong small {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
}

.score-line strong.accent {
  color: var(--gold);
}

.codex-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.codex-line > span {
  margin-right: 1px;
}

.codex-dots {
  display: flex;
  gap: 4px;
  flex: 1;
}

.codex-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(158, 240, 221, 0.32);
  background: transparent;
  transition: all 0.3s ease;
}

.codex-dots i.is-found {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: 0 0 7px rgba(158, 240, 221, 0.9);
}

.codex-line b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  color: #d3f2ed;
}

.hud-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #c7e6e3;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(24, 72, 83, 0.55);
}

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

.icon-btn .icon-off {
  display: none;
}

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

.icon-btn.is-muted .icon-off {
  display: block;
  opacity: 0.7;
}

.hud-bottom {
  position: absolute;
  left: clamp(16px, 2.4vw, 34px);
  right: clamp(16px, 2.4vw, 34px);
  bottom: clamp(16px, 2.4vw, 30px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.control-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(214, 242, 238, 0.68);
  pointer-events: none;
}

.control-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid rgba(198, 243, 237, 0.2);
  border-radius: 2px;
  background: rgba(0, 10, 16, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #d9f7f2;
}

.auto-attack {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(158, 240, 221, 0.12);
  border-radius: 3px;
  background: rgba(4, 25, 34, 0.4);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.auto-attack.is-locked {
  opacity: 1;
  border-color: rgba(255, 211, 128, 0.35);
  background: rgba(45, 35, 16, 0.36);
}

.auto-pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.auto-pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(158, 240, 221, 0.5);
  border-radius: 50%;
  animation: autoPing 1.6s ease-out infinite;
}

.auto-attack.is-locked .auto-pulse {
  background: var(--gold);
  box-shadow: 0 0 9px var(--gold);
}

.auto-attack.is-locked .auto-pulse::after {
  border-color: rgba(255, 211, 128, 0.5);
  animation-duration: 0.8s;
}

@keyframes autoPing {
  0% { transform: scale(0.55); opacity: 0.9; }
  80%, 100% { transform: scale(1.55); opacity: 0; }
}

.auto-attack small {
  display: block;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.18em;
  color: rgba(200, 235, 231, 0.46);
}

.auto-attack strong {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #d5f2ed;
}

.auto-attack.is-locked strong {
  color: var(--gold);
}

/* combo */
.combo {
  position: absolute;
  right: clamp(20px, 3vw, 45px);
  top: 48%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  opacity: 0;
  transform: translateX(12px) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1);
  pointer-events: none;
  text-shadow: 0 4px 22px rgba(0, 14, 20, 0.7);
}

.combo.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.combo span {
  font-size: 8px;
  letter-spacing: 0.36em;
  color: var(--gold);
  margin-right: 3px;
}

.combo strong {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  font-style: italic;
  color: #fff4d9;
  letter-spacing: -0.06em;
}

.combo-bar {
  width: 74px;
  height: 2px;
  margin-top: 5px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.combo-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transform-origin: right center;
}

/* toast */
.toast {
  position: absolute;
  left: 50%;
  top: clamp(132px, 15vh, 160px);
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 244px;
  max-width: min(420px, 86vw);
  padding: 10px 17px 10px 11px;
  border: 1px solid rgba(190, 242, 238, 0.16);
  border-radius: 3px;
  background: linear-gradient(110deg, rgba(4, 26, 36, 0.9), rgba(5, 36, 45, 0.7));
  box-shadow: 0 18px 45px rgba(0, 12, 18, 0.28);
  backdrop-filter: blur(13px);
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.18, 1.2, 0.36, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-icon {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--mint);
  background: rgba(98, 221, 207, 0.1);
  border: 1px solid rgba(98, 221, 207, 0.28);
}

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

.toast strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #effffb;
}

.toast span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(198, 232, 227, 0.68);
}

/* action prompt */
.action-prompt {
  position: absolute;
  left: 50%;
  bottom: clamp(82px, 10vh, 110px);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.18, 1.2, 0.36, 1);
}

.action-prompt.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.action-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 258px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 216, 173, 0.3);
  border-radius: 3px;
  background: linear-gradient(110deg, rgba(255, 122, 87, 0.94), rgba(216, 73, 49, 0.92));
  box-shadow: 0 14px 36px rgba(61, 17, 8, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn .keycap {
  display: grid;
  place-items: center;
  width: 43px;
  height: 33px;
  border: 1px solid rgba(255, 245, 224, 0.45);
  border-radius: 2px;
  background: rgba(79, 22, 10, 0.19);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: #ffe9d7;
}

.action-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  text-align: left;
}

.action-copy b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #fff8ed;
}

.action-copy small {
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(255, 236, 214, 0.68);
}

.action-arrow {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff3e8;
  background: rgba(255, 255, 255, 0.12);
}

.action-arrow svg {
  width: 15px;
  height: 15px;
}

.depth-warning {
  position: absolute;
  left: 50%;
  top: 31%;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  color: #ffb6a5;
  font-size: 11px;
  letter-spacing: 0.3em;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.depth-warning.is-visible {
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1);
  animation: warningBreathe 1.8s ease-in-out infinite;
}

.warning-line {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 133, 110, 0.7));
}

.depth-warning .warning-line:last-child {
  transform: scaleX(-1);
}

@keyframes warningBreathe {
  50% { opacity: 0.52; }
}

/* ============================================================
   START SCREEN
   ============================================================ */
.start-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 17, 27, 0.92) 0%, rgba(3, 21, 30, 0.72) 34%, rgba(3, 21, 30, 0.12) 66%, rgba(3, 17, 26, 0.12) 100%),
    linear-gradient(180deg, rgba(2, 13, 21, 0.34), transparent 32%, transparent 62%, rgba(2, 13, 21, 0.45));
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.start-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-screen::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(30px, 7vw, 110px);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(158, 240, 221, 0.17) 18%, rgba(158, 240, 221, 0.17) 82%, transparent);
  pointer-events: none;
}

.start-grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(158, 240, 221, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158, 240, 221, 0.11) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.8), transparent 55%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.8), transparent 55%);
}

.start-panel {
  position: absolute;
  left: clamp(50px, 11vw, 180px);
  top: 50%;
  width: min(510px, 44vw);
  transform: translateY(-52%);
  z-index: 2;
  animation: startEnter 1s cubic-bezier(0.18, 1, 0.3, 1) both;
}

@keyframes startEnter {
  from { opacity: 0; transform: translateY(-48%); }
  to { opacity: 1; transform: translateY(-52%); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(198, 240, 234, 0.7);
}

.eyebrow i {
  font-style: normal;
  color: rgba(158, 240, 221, 0.33);
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.start-panel h1 {
  margin: 25px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(70px, 9.2vw, 132px);
  font-weight: 900;
  line-height: 0.83;
  letter-spacing: -0.08em;
  color: #f6fffa;
  text-shadow: 0 8px 60px rgba(0, 12, 20, 0.38);
}

.start-panel h1 em {
  position: relative;
  margin-left: clamp(30px, 4vw, 60px);
  font-style: normal;
  color: var(--coral);
  text-shadow: 0 8px 60px rgba(0, 12, 20, 0.38);
}

.start-panel h1 em::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: 13%;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(255, 122, 87, 0.55);
  border-radius: 50%;
}

.lead {
  max-width: 370px;
  font-size: clamp(12px, 1.15vw, 15px);
  line-height: 2;
  letter-spacing: 0.13em;
  color: rgba(226, 248, 244, 0.72);
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 25px;
}

.feature-tags span {
  padding: 6px 11px;
  border: 1px solid rgba(190, 242, 238, 0.16);
  border-radius: 2px;
  background: rgba(8, 38, 48, 0.27);
  font-size: 9px;
  letter-spacing: 0.13em;
  color: rgba(211, 242, 237, 0.72);
}

.touch-hint {
  display: none;
  margin-top: 17px;
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: rgba(198, 232, 227, 0.58);
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 238px;
  height: 58px;
  margin-top: 31px;
  padding: 0 18px 0 23px;
  border: 1px solid rgba(255, 209, 173, 0.35);
  border-radius: 3px;
  background: linear-gradient(115deg, #ff8160, #dd5436);
  box-shadow:
    0 18px 45px rgba(74, 20, 7, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff8ef;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.start-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.05);
  box-shadow: 0 23px 55px rgba(74, 20, 7, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.start-btn:active {
  transform: translateY(0);
}

.start-btn-copy {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.start-btn-key {
  margin-left: auto;
  padding: 4px 6px;
  border: 1px solid rgba(255, 243, 226, 0.4);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.09em;
  color: rgba(255, 245, 231, 0.68);
}

.start-btn svg {
  width: 18px;
  height: 18px;
}

.start-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 30px;
  padding-top: 17px;
  border-top: 1px solid rgba(190, 242, 238, 0.12);
  max-width: 420px;
}

.start-controls div {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(198, 232, 227, 0.53);
}

.start-controls kbd {
  height: 18px;
  border-color: rgba(190, 242, 238, 0.16);
}

.no-sushi {
  margin-top: 21px;
  font-size: 8px;
  letter-spacing: 0.32em;
  color: rgba(158, 240, 221, 0.36);
}

.start-meta {
  position: absolute;
  right: clamp(30px, 5vw, 80px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 22px;
  opacity: 0.55;
}

.meta-vertical {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(209, 242, 237, 0.7);
}

.meta-depth {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.meta-depth i {
  display: block;
  height: 1px;
  background: rgba(209, 242, 237, 0.45);
}

.meta-depth i:nth-child(1) { width: 54px; }
.meta-depth i:nth-child(2) { width: 35px; opacity: 0.7; }
.meta-depth i:nth-child(3) { width: 20px; opacity: 0.45; }
.meta-depth i:nth-child(4) { width: 8px; opacity: 0.25; }

.meta-depth span {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.2em;
  color: rgba(209, 242, 237, 0.5);
}

.start-badge {
  position: absolute;
  right: clamp(30px, 5.5vw, 92px);
  bottom: clamp(30px, 5vh, 55px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(216, 247, 241, 0.55);
}

.start-badge svg {
  width: 57px;
  height: 57px;
  opacity: 0.8;
}

.start-badge span {
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0.22em;
  text-align: center;
}

/* ============================================================
   SUMMARY + PAUSE
   ============================================================ */
.summary-wrap,
.pause-wrap {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 15, 23, 0.42);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.summary-wrap.is-visible,
.pause-wrap.is-visible {
  opacity: 1;
  visibility: visible;
}

.summary-card,
.pause-card {
  position: relative;
  width: min(500px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 27px 30px 23px;
  border: 1px solid rgba(190, 242, 238, 0.2);
  border-radius: 4px;
  background:
    linear-gradient(145deg, rgba(6, 34, 45, 0.97), rgba(3, 20, 30, 0.96)),
    radial-gradient(circle at 80% 0%, rgba(98, 221, 207, 0.2), transparent 50%);
  box-shadow: 0 30px 90px rgba(0, 8, 14, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.45s cubic-bezier(0.18, 1, 0.3, 1);
  overflow: hidden;
}

.summary-wrap.is-visible .summary-card,
.pause-wrap.is-visible .pause-card {
  transform: translateY(0) scale(1);
}

.summary-card::before,
.pause-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), var(--gold) 45%, transparent 90%);
}

.summary-topline {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.26em;
  color: rgba(158, 240, 221, 0.55);
}

.summary-topline span:first-child {
  color: var(--mint);
}

.summary-card h2,
.pause-card h2 {
  margin: 21px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #f6fffb;
}

.summary-card > p,
.pause-card > p {
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.11em;
  color: rgba(198, 232, 227, 0.62);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 25px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
}

.summary-stats > div {
  padding: 15px 12px 13px;
  background: rgba(3, 20, 29, 0.78);
}

.summary-stats span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.17em;
  color: var(--muted);
}

.summary-stats strong {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  color: #f1fffb;
}

.summary-stats strong small {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
}

.summary-discovery {
  margin-top: 13px;
  padding: 8px 11px;
  border-left: 2px solid var(--gold);
  background: rgba(255, 211, 128, 0.06);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(232, 247, 242, 0.88);
}

.summary-discovery b {
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 500;
}

.summary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 49px;
  margin-top: 22px;
  border: 1px solid rgba(255, 209, 173, 0.32);
  border-radius: 3px;
  background: linear-gradient(110deg, #ff7a57, #d94f33);
  box-shadow: 0 12px 30px rgba(64, 18, 7, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.23);
  color: #fff8ef;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.summary-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.summary-btn kbd {
  margin-left: 2px;
  border-color: rgba(255, 243, 227, 0.38);
  background: rgba(69, 17, 6, 0.2);
}

.summary-btn svg {
  width: 16px;
  height: 16px;
  margin-left: auto;
}

.summary-stay {
  width: 100%;
  height: 32px;
  margin-top: 7px;
  border: 1px solid rgba(190, 242, 238, 0.12);
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(211, 242, 237, 0.62);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.summary-stay:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}

.summary-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.22em;
  color: rgba(158, 240, 221, 0.35);
}

.pause-wrap {
  background: rgba(2, 15, 23, 0.3);
}

.pause-card {
  width: min(430px, 100%);
  padding: 30px;
}

.pause-card h2 {
  margin-top: 18px;
}

.pause-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 25px;
}

.pause-actions .summary-btn {
  margin-top: 0;
}

.pause-actions .summary-btn kbd {
  margin-left: auto;
}

.ghost-btn {
  height: 42px;
  border: 1px solid rgba(190, 242, 238, 0.16);
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(211, 242, 237, 0.7);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ghost-btn:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================================
   TOUCH / MOBILE PORTRAIT
   ============================================================ */
.touch-controls {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  display: none;
}

.joystick {
  position: absolute;
  left: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 122px;
  height: 122px;
  border-radius: 50%;
  border: 1px solid rgba(190, 242, 238, 0.22);
  background: rgba(4, 27, 37, 0.08);
  box-shadow: inset 0 0 40px rgba(80, 200, 190, 0.045);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
  touch-action: none;
  transition: opacity 0.25s ease;
}

.joystick-ring {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed rgba(190, 242, 238, 0.24);
}

.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  border: 1px solid rgba(211, 251, 245, 0.48);
  background: rgba(98, 221, 207, 0.16);
  box-shadow: 0 0 22px rgba(98, 221, 207, 0.14);
  transition: transform 0.06s linear;
}

.action-pad {
  position: absolute;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.weapon-btn {
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 50%;
  border-color: rgba(190, 242, 238, 0.26);
  background: rgba(5, 29, 39, 0.58);
  color: rgba(220, 250, 244, 0.88);
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 10px 26px rgba(0, 9, 14, 0.24);
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
}

.weapon-btn:active {
  transform: scale(0.94);
  border-color: rgba(255, 211, 128, 0.5);
}

.weapon-swap {
  display: grid;
  place-items: center;
  color: var(--mint);
}

.weapon-swap svg {
  width: 19px;
  height: 19px;
}

.weapon-name {
  max-width: 58px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weapon-btn small {
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.12em;
  color: rgba(195, 232, 227, 0.46);
}

.attack-btn {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 216, 173, 0.38);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(145deg, #ff8866, #d84e32);
  box-shadow:
    0 12px 30px rgba(69, 19, 7, 0.38),
    0 0 0 7px rgba(255, 122, 87, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff8ed;
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.1s ease, filter 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}

.attack-btn::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 227, 0.18);
  pointer-events: none;
}

.attack-btn:active {
  transform: scale(0.93);
  filter: brightness(1.08);
}

.attack-btn.is-interact {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.24), transparent 40%),
    linear-gradient(145deg, #ffd47c, #d99432);
  border-color: rgba(255, 245, 205, 0.55);
  color: #392208;
}

.attack-btn.is-interact .attack-icon {
  color: #4a2b08;
}

.attack-btn.is-ranged {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(145deg, #4e8d97, #1f5867);
  border-color: rgba(158, 240, 221, 0.45);
  color: #eafffa;
}

.attack-btn.is-surface {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 40%),
    linear-gradient(145deg, #68d7c5, #259286);
  border-color: rgba(220, 255, 245, 0.45);
  color: #03231f;
}

.attack-icon {
  display: grid;
  place-items: center;
  color: currentColor;
}

.attack-icon svg {
  width: 28px;
  height: 28px;
}

.attack-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 1px;
  pointer-events: none;
}

.attack-copy b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.attack-copy small {
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.14em;
  opacity: 0.7;
}

/* Near-treasure prompt */
.interact-hint {
  position: absolute;
  left: 50%;
  bottom: 165px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 10px;
  border: 1px solid rgba(255, 211, 128, 0.32);
  border-radius: 3px;
  background: rgba(7, 26, 31, 0.82);
  box-shadow: 0 14px 34px rgba(0, 8, 13, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.interact-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.interact-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 211, 128, 0.28);
  background: rgba(255, 211, 128, 0.08);
  color: var(--gold);
}

.interact-icon svg {
  width: 16px;
  height: 16px;
}

.interact-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.interact-copy b {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #fff3d7;
}

.interact-copy small {
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(255, 231, 190, 0.58);
}

@keyframes attackPulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(69, 19, 7, 0.38), 0 0 0 7px rgba(255, 122, 87, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
  50% { box-shadow: 0 12px 30px rgba(69, 19, 7, 0.38), 0 0 0 12px rgba(255, 122, 87, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

.attack-btn.is-ready {
  animation: attackPulse 1.8s ease-in-out infinite;
}

@media (pointer: coarse) {
  .touch-controls {
    display: block;
  }

  .control-legend {
    display: none;
  }

  .action-prompt {
    display: none;
  }

  .hud-bottom {
    bottom: 18px;
  }

  .auto-attack {
    display: none;
  }

  .combo {
    top: 34%;
  }

  .start-btn-key,
  .action-btn .keycap,
  .summary-btn kbd {
    display: none;
  }

  .touch-hint {
    display: block;
  }

  .interact-hint {
    left: auto;
    right: 18px;
    bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    transform: translateY(10px);
    max-width: calc(100vw - 190px);
  }

  .interact-hint.is-visible {
    transform: translateY(0);
  }

  .touch-controls.is-surface .joystick {
    opacity: 0.14;
    pointer-events: none;
  }

  .touch-controls.is-surface .weapon-btn {
    display: none;
  }

  .touch-controls.is-hidden {
    display: none !important;
  }
}

@media (orientation: portrait) and (pointer: coarse) and (max-width: 520px) {
  .joystick {
    left: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 116px;
    height: 116px;
  }

  .joystick-knob {
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
  }

  .action-pad {
    right: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    gap: 9px;
  }

  .attack-btn {
    width: 86px;
    height: 86px;
  }

  .weapon-btn {
    width: 60px;
    height: 60px;
  }

  .interact-hint {
    right: 14px;
    bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .brand-chip {
    display: none;
  }

  .oxygen-card {
    width: 200px;
  }

  .score-card {
    min-width: 160px;
  }

  .depth-gauge {
    min-width: 160px;
  }

  .hud-top {
    gap: 14px;
  }

  .start-panel {
    width: min(500px, 58vw);
  }

  .start-meta {
    display: none;
  }
}

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

  .hud-top {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left right"
      "depth depth";
    gap: 8px 8px;
  }

  .hud-left {
    grid-area: left;
    gap: 6px;
  }

  .hud-right {
    grid-area: right;
    gap: 4px;
  }

  .depth-gauge {
    grid-area: depth;
    margin-top: -1px;
    transform: scale(0.78);
    transform-origin: top center;
    pointer-events: none;
  }

  .oxygen-card {
    width: 146px;
    padding: 7px 9px 7px;
  }

  .meter-label {
    font-size: 9.5px;
    letter-spacing: 0.15em;
  }

  .meter-value b {
    font-size: 15px;
  }

  .hazard-row {
    margin-top: 7px;
  }

  .hazard-row > span {
    font-size: 8.5px;
  }

  .heart {
    width: 13px;
    height: 12px;
  }

  .heart::before,
  .heart::after {
    width: 7px;
    height: 10px;
  }

  .heart::before {
    left: 6px;
  }

  .score-card {
    width: 122px;
    min-width: 122px;
    padding: 7px 9px;
  }

  .score-line {
    gap: 6px;
  }

  .score-label {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .score-line strong {
    font-size: 15px;
  }

  .score-line strong.accent {
    font-size: 16px;
  }

  .codex-line {
    display: none;
  }

  .hud-buttons {
    flex-direction: row;
    gap: 4px;
  }

  .icon-btn {
    width: 30px;
    height: 30px;
  }

  .icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .hud-bottom {
    left: 10px;
    right: 10px;
    bottom: 12px;
  }

  .control-legend {
    display: none;
  }

  .auto-attack {
    padding: 7px 9px;
  }

  .toast {
    top: 168px;
    min-width: 0;
    width: calc(100vw - 28px);
  }

  .action-prompt {
    bottom: 84px;
  }

  .action-btn {
    min-width: 225px;
  }

  .start-screen {
    background:
      linear-gradient(180deg, rgba(3, 17, 27, 0.36), rgba(3, 17, 27, 0.78) 54%, rgba(3, 15, 23, 0.94)),
      linear-gradient(90deg, rgba(3, 17, 27, 0.5), transparent);
  }

  .start-screen::after {
    left: 24px;
  }

  .start-panel {
    left: 30px;
    right: 30px;
    top: auto;
    bottom: 7vh;
    width: auto;
    transform: none;
    animation: startEnterMobile 1s cubic-bezier(0.18, 1, 0.3, 1) both;
  }

  @keyframes startEnterMobile {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .start-panel h1 {
    margin: 16px 0 17px;
    font-size: clamp(58px, 18vw, 92px);
  }

  .start-panel h1 em {
    margin-left: 28px;
  }

  .lead {
    font-size: 11px;
  }

  .feature-tags {
    margin-top: 17px;
  }

  .start-btn {
    margin-top: 21px;
  }

  .start-controls,
  .start-badge {
    display: none;
  }

  .no-sushi {
    margin-top: 15px;
  }

  .summary-card {
    padding: 22px 20px 19px;
  }

  .summary-stats strong {
    font-size: 21px;
  }

  .summary-stats > div {
    padding: 12px 9px;
  }

  .combo strong {
    font-size: 34px;
  }
}

@media (max-height: 620px) {
  .start-panel {
    transform: translateY(-46%) scale(0.9);
    transform-origin: left center;
  }

  .start-panel h1 {
    font-size: 64px;
    margin: 13px 0;
  }

  .feature-tags,
  .no-sushi {
    display: none;
  }

  .start-controls {
    margin-top: 16px;
  }

  .start-btn {
    height: 49px;
    margin-top: 18px;
  }
}

@media (max-width: 360px) {
  .hud {
    padding: 8px;
  }

  .oxygen-card {
    width: 128px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .score-card {
    width: 104px;
    min-width: 104px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
  }

  .meter-label {
    font-size: 8.5px;
    letter-spacing: 0.08em;
  }

  .meter-value b {
    font-size: 14px;
  }

  .score-label {
    font-size: 7.5px;
    letter-spacing: 0.03em;
  }

  .score-line strong {
    font-size: 14px;
  }

  .score-line strong.accent {
    font-size: 14px;
  }

  .score-line {
    gap: 3px;
  }

  .heart {
    width: 12px;
  }

  .heart::before,
  .heart::after {
    width: 6px;
    height: 9px;
  }

  .heart::before {
    left: 5px;
  }

  .hud-top {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen-grain {
    animation: none;
  }

  .auto-pulse::after,
  .oxygen-card.is-critical .meter-fill,
  .depth-warning.is-visible {
    animation: none;
  }
}

/* Dynamic visibility helpers */
.auto-attack.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.touch-controls.is-hidden {
  display: none !important;
}
