.cv-dodge-page { min-height: 100vh; }
.dodge-main { padding: clamp(1.15rem, 3vw, 2.5rem) 0 4rem; }
.dodge-back { display: inline-flex; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; font-weight: 800; text-decoration: none; }
.dodge-back:hover, .dodge-back:focus-visible { color: var(--primary); }

.dodge-introduction,
.dodge-game-panel,
.dodge-help {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dodge-introduction { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: clamp(1.15rem, 3vw, 2rem); }
.dodge-introduction .eyebrow { margin-bottom: .35rem; }
.dodge-introduction h1 { margin: 0; font-size: clamp(2.35rem, 6vw, 4.4rem); letter-spacing: -.06em; line-height: .95; }
.dodge-introduction p:not(.eyebrow):not(.dodge-credit) { max-width: 42rem; margin: .75rem 0 0; color: var(--muted); }
.dodge-credit { flex: 0 0 auto; margin: 0; color: var(--accent); font-size: .82rem; font-weight: 900; letter-spacing: .08em; text-align: right; text-transform: uppercase; }

.dodge-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .42fr); align-items: start; gap: clamp(1rem, 3vw, 1.8rem); margin-top: 1.2rem; }
.dodge-game-panel { min-width: 0; padding: clamp(.8rem, 2vw, 1.15rem); }
.dodge-scoreboard { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.dodge-scoreboard span { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.dodge-scoreboard strong { color: var(--text); font-size: 1.05rem; }

.dodge-stage { position: relative; width: min(100%, 30rem); margin: 0 auto; overflow: hidden; aspect-ratio: 3 / 4; border: 1px solid color-mix(in srgb, var(--primary) 55%, var(--line)); border-radius: 1.1rem; background: #071e3f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 16px 32px rgba(7, 28, 63, .26); }
.dodge-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.dodge-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 1.3rem; background: linear-gradient(160deg, rgba(4, 17, 38, .79), rgba(12, 35, 70, .86)); color: #f7fbff; text-align: center; backdrop-filter: blur(5px); }
.dodge-screen[hidden] { display: none; }
.dodge-screen-icon { margin: 0; font-size: clamp(2.4rem, 8vw, 3.7rem); }
.dodge-screen h2 { margin: 0; font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -.04em; }
.dodge-screen p { max-width: 23rem; margin: 0; color: #c9ddfa; }
.dodge-start-button { min-width: min(100%, 13rem); margin-top: .25rem; }
.dodge-screen-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .2rem; }
.dodge-screen-actions .button { text-decoration: none; }
.dodge-pause-screen { background: rgba(4, 17, 38, .9); }
.dodge-gameover-screen { background: linear-gradient(160deg, rgba(51, 15, 36, .9), rgba(8, 23, 52, .94)); }

.dodge-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .65rem; width: min(100%, 30rem); margin: .9rem auto 0; }
.dodge-control-button,
.dodge-pause-button { min-height: 3.45rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--bg-soft); color: var(--text); font-weight: 850; cursor: pointer; touch-action: none; transition: transform .15s ease, border-color .15s ease, background-color .15s ease; }
.dodge-control-button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.dodge-pause-button { padding: 0 .8rem; }
.dodge-control-button:hover, .dodge-control-button:focus-visible, .dodge-pause-button:hover, .dodge-pause-button:focus-visible { border-color: var(--primary); background: var(--surface-hover); transform: translateY(-2px); }
.dodge-control-button:active, .dodge-pause-button:active { transform: translateY(0); }
.dodge-status { min-height: 1.25rem; margin: .75rem 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.dodge-audio-tools { display:flex; grid-column:1/-1; align-items:center; justify-content:center; gap:.55rem; }
.dodge-fullscreen-button { min-height: 2.8rem; padding: 0 1.2rem; }

.dodge-help { min-width: 0; padding: 1.15rem; }
.dodge-help h2 { margin: 0; font-size: 1.25rem; }
.dodge-help ol { display: grid; gap: .7rem; margin: 1rem 0; padding-left: 1.25rem; color: var(--muted); font-size: .9rem; }
.dodge-help li::marker { color: var(--accent); font-weight: 900; }
.dodge-help-note { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.dodge-help-note strong { color: var(--text); }
.dodge-help-footnote { margin: 1rem 0 0; color: var(--muted); font-size: .76rem; }
.dodge-help kbd { display: inline-block; padding: .06rem .32rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: .3rem; background: var(--bg-soft); color: var(--text); font: inherit; font-weight: 850; }

@media (max-width: 900px) {
  .dodge-layout { grid-template-columns: minmax(0, 1fr); }
  .dodge-help { width: min(100%, 30rem); margin: 0 auto; }
}

@media (max-width: 620px) {
  .dodge-main { padding-bottom: 2.5rem; }
  .dodge-introduction { align-items: flex-start; flex-direction: column; }
  .dodge-credit { text-align: left; }
  .dodge-screen-actions { width: 100%; flex-direction: column; }
  .dodge-screen-actions .button { width: 100%; }
  .dodge-control-button span { display: none; }
  .dodge-controls { grid-template-columns: 1fr auto 1fr; }
}

@media (max-width: 390px) {
  .dodge-game-panel { padding: .65rem; }
  .dodge-stage { border-radius: .9rem; }
  .dodge-controls { gap: .45rem; }
  .dodge-control-button, .dodge-pause-button { min-height: 3.2rem; padding: 0 .55rem; }
}

.dodge-layout:fullscreen,
.dodge-layout.is-fullscreen-fallback {
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: clamp(.65rem, 2vw, 1.5rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, .38fr);
  gap: clamp(.75rem, 2vw, 1.5rem);
  overflow: auto;
  background: var(--bg);
}
.dodge-layout:fullscreen .dodge-game-panel,
.dodge-layout.is-fullscreen-fallback .dodge-game-panel { max-height: 100%; overflow: auto; }
.dodge-layout:fullscreen .dodge-stage,
.dodge-layout.is-fullscreen-fallback .dodge-stage { width: min(100%, 54dvh, 31.5rem); aspect-ratio: 3 / 4; }
.dodge-layout:fullscreen .dodge-help,
.dodge-layout.is-fullscreen-fallback .dodge-help { width: auto; max-width: none; margin: 0; }
.dodge-layout:fullscreen .dodge-controls,
.dodge-layout.is-fullscreen-fallback .dodge-controls { width: min(100%, 31.5rem); }
.dodge-layout.is-fullscreen-fallback { position: fixed; inset: 0; z-index: 9999; }
body.has-fullscreen-fallback { overflow: hidden; }

@media (max-width: 700px) and (orientation: portrait) {
  .dodge-layout:fullscreen,
  .dodge-layout.is-fullscreen-fallback { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .dodge-layout:fullscreen .dodge-help,
  .dodge-layout.is-fullscreen-fallback .dodge-help { width: min(100%, 31.5rem); margin: 0 auto; }
}
