@font-face {
  font-family: Oswald;
  src: url("oswald-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Outfit;
  src: url("outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Outfit;
  src: url("outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #07080b;
  --panel: #12141b;
  --panel-2: #1a1d26;
  --gold: #f0c14b;
  --gold-deep: #a87820;
  --ivory: #f4efe4;
  --muted: #c4baab;
  --line: rgba(240, 193, 75, 0.38);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--ivory);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Outfit, "Trebuchet MS", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: inherit; }

h1, h2, h3, p { overflow-wrap: break-word; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.app {
  width: min(880px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(240, 193, 75, 0.16), transparent 55%),
    linear-gradient(180deg, #101218 0%, var(--ink) 28%);
}

.mast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--safe-t)) 14px 6px;
  min-width: 0;
}

.crest {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #1a1204;
  background: linear-gradient(145deg, #fff1c2, #f0c14b 42%, #a87820);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 74% 100%, 0 100%);
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 24px;
  line-height: 1;
}

.wordmark { min-width: 0; }

.wordmark span {
  display: block;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.wordmark strong {
  display: block;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: clamp(18px, 5vw, 30px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 14px 12px;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }

.stub {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ivory);
  background: #151821;
  border: 1px solid var(--line);
  padding: 9px 16px 9px 18px;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stub[aria-current="page"] {
  background: linear-gradient(180deg, #fff1c2, #e0b03a 58%, #a87820);
  color: #1a1204;
  border-color: transparent;
}

.page {
  padding: 0 12px calc(28px + var(--safe-b));
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hero {
  position: relative;
  margin: 0 12px 12px;
  overflow: hidden;
  min-width: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 42px) 100%, 0 100%);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  min-height: clamp(300px, 70vw, 480px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px 16px 36px;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.05) 10%, rgba(7, 8, 11, 0.9) 78%);
}

.hero h1, .ticket h2, .section-title, .sheet h2 {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}

.hero h1 {
  font-size: clamp(42px, 12vw, 78px);
  line-height: 0.88;
  text-transform: uppercase;
}

.lede { margin: 0; max-width: 36rem; color: var(--ivory); }

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ticket {
  background: linear-gradient(180deg, rgba(28, 32, 42, 0.96), rgba(14, 16, 22, 0.96));
  border: 1px solid var(--line);
  padding: 14px;
  min-width: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.ticket h2 { font-size: clamp(22px, 6vw, 32px); line-height: 1; }

.ticket p { margin: 8px 0 0; }

.quiet { color: var(--muted); font-size: 14px; }

.ticket .btn-gold, .ticket .btn-ghost { margin-top: 12px; }

.skills, .grid-cards, .stat-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.skill h2 { font-size: 22px; }

.duo {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.duo img {
  width: 108px;
  height: 156px;
  object-fit: cover;
  object-position: center top;
}

.banner-photo {
  margin: 0 12px 12px;
  height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-width: 0;
}

.banner-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.cup-photo {
  height: 240px;
  background: #0c0d11;
}

.cup-photo img { object-fit: contain; object-position: center; }

.photo {
  height: 132px;
  overflow: hidden;
  margin-bottom: 4px;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leather-card, .honor-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.orb-img, .medal, .orb {
  width: 88px;
  height: 88px;
}

.orb-img, .medal { object-fit: contain; }

.orb {
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #5c5c5c, #121212 62%),
    repeating-linear-gradient(35deg, transparent 0 9px, rgba(217, 211, 199, 0.45) 9px 10px);
}

.orb.aurum {
  background:
    radial-gradient(circle at 32% 28%, #fff1c2, #c8962e 42%, #1a1408 72%);
  box-shadow: inset 0 0 0 2px #f0c14b;
}

.is-locked { opacity: 0.62; }

.is-selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }

.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat {
  border: 1px solid var(--line);
  padding: 10px;
  background: rgba(18, 20, 27, 0.8);
  min-width: 0;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 28px;
  line-height: 1;
}

.section-title { font-size: 28px; }

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.log li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid rgba(240, 193, 75, 0.2);
  padding-bottom: 8px;
  font-size: 14px;
}

.steps { display: grid; gap: 10px; }

.step-no {
  font-family: Oswald, "Arial Narrow", sans-serif;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.frame-demo {
  height: 160px;
  border: 3px solid #e0b03a;
  background:
    linear-gradient(180deg, rgba(240, 193, 75, 0.08), transparent 40%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(240, 193, 75, 0.15) 18px 19px),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(240, 193, 75, 0.15) 18px 19px),
    #0c1410;
  position: relative;
  overflow: hidden;
}

.demo-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 42%;
  width: 16px;
  background: linear-gradient(180deg, rgba(240, 193, 75, 0.1), #f0c14b, rgba(240, 193, 75, 0.1));
  transform: skewX(-8deg);
}

.demo-mark {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--gold);
  left: 61%;
  top: 28%;
  transform: rotate(45deg);
}

.demo-gloves {
  position: absolute;
  width: 54px;
  height: 36px;
  border: 1px dashed var(--gold);
  border-radius: 50%;
  left: 38%;
  top: 46%;
}

.btn-gold, .btn-ghost, .sheet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  text-decoration: none;
  max-width: 100%;
  font-family: Oswald, "Arial Narrow", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 15px;
}

.btn-gold {
  border: 0;
  color: #1a1204;
  background: linear-gradient(180deg, #fff1c2, #e0b03a 55%, #a87820);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.btn-ghost, .sheet-link {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
}

.btn-gold:disabled, .btn-ghost:disabled { opacity: 0.45; }

body[data-page="strike"] {
  overflow: hidden;
  overscroll-behavior: none;
}

body[data-page="strike"] .mast {
  padding: calc(4px + var(--safe-t)) 12px 0;
}

body[data-page="strike"] .wordmark span { display: none; }

body[data-page="strike"] .wordmark strong { font-size: 18px; }

body[data-page="strike"] .crest {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

body[data-page="strike"] .rail { padding: 4px 12px 4px; }

body[data-page="strike"] .stub {
  padding: 5px 12px 5px 14px;
  font-size: 12px;
}

body[data-page="strike"] .dock {
  gap: 6px;
  padding: 6px 10px 8px;
}

body[data-page="strike"] .coach {
  top: 6px;
  bottom: auto;
  padding: 6px 8px;
}

body[data-page="strike"] .coach p {
  font-size: 12px;
  line-height: 1.3;
}

body[data-page="strike"] .app {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.match {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-b);
}

.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  min-width: 0;
}

.hud-block { min-width: 0; flex: 1; }

.hud-block.end { text-align: right; }

.hud-block strong, .hud-block span, .mark-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-block strong {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.hud-block span, .mark-line {
  color: var(--muted);
  font-size: 12px;
}

.mark-line { margin: 2px 12px 6px; }

#sound-toggle {
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  min-height: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.pips { display: flex; gap: 5px; flex: 0 0 auto; }

.pip {
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.pip.goal { background: var(--gold); }

.pip.miss { border-color: #8d8478; background: transparent; }

.pip.wait { opacity: 0.35; }

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 10px;
  border: 1px solid var(--line);
  background: #07080b;
  touch-action: none;
}

#pitch {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.coach, .banner, .sheet {
  position: absolute;
  z-index: 2;
  background: rgba(7, 8, 11, 0.9);
  border: 1px solid var(--line);
}

.coach[hidden], .banner[hidden], .sheet[hidden] { display: none !important; }

.coach, .banner {
  left: 8px;
  right: 8px;
  padding: 10px 12px;
}

.coach { bottom: 8px; }

.coach p, .banner span, .banner strong { margin: 0; }

.banner {
  top: 8px;
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: calc(100% - 16px);
  margin: 0 auto;
}

.banner strong {
  font-family: Oswald, "Arial Narrow", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 22px;
}

.sheet {
  inset: 8px;
  overflow: auto;
  z-index: 4;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}

body[data-page="strike"] .sheet:not([hidden]) {
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: calc(12px + var(--safe-b));
  width: min(520px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100dvh - 108px);
  transform: translateX(-50%);
}

.sheet .btn-gold, .sheet .btn-ghost, .sheet .sheet-link { width: 100%; }

.dock {
  display: grid;
  gap: 8px;
  padding: 8px 12px 10px;
  min-width: 0;
}

.pulse-label, .curl-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}

.pulse-track {
  position: relative;
  height: 12px;
  margin-top: 4px;
  background: #1b1e27;
  border: 1px solid var(--line);
  overflow: hidden;
}

.pulse-sweet {
  position: absolute;
  left: 58%;
  width: 18%;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, #fff1c2, #e0b03a);
}

.pulse-mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  margin-left: -1px;
  background: #fff8e8;
  box-shadow: 0 0 8px #fff1c2;
}

.curl-line input {
  width: 100%;
  accent-color: #f0c14b;
  min-width: 0;
}

.curl-line { flex-wrap: wrap; }

.curl-line input { flex: 1 1 140px; }

.dock-note {
  margin: 0;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 8px;
}

.dock-actions .btn-gold, .dock-actions .btn-ghost { width: 100%; }

.is-hot {
  border-color: var(--gold);
  color: #1a1204;
  background: var(--gold);
}

@media (min-width: 700px) {
  .grid-cards { grid-template-columns: 1fr 1fr; }
  .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  .duo { grid-template-columns: 84px minmax(0, 1fr); }
  .duo img { width: 84px; height: 124px; }
  .leather-card, .honor-card { grid-template-columns: 72px minmax(0, 1fr); }
  .orb-img, .medal, .orb { width: 72px; height: 72px; }
  .log li { grid-template-columns: minmax(0, 1fr); }
  body[data-page="strike"] .btn-gold,
  body[data-page="strike"] .btn-ghost {
    font-size: 13px;
    letter-spacing: 0.06em;
    padding: 0 8px;
    min-height: 44px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  body[data-page="strike"] .rail { display: none; }

  body[data-page="strike"] .mast {
    padding-top: calc(4px + var(--safe-t));
    padding-bottom: 2px;
  }

  body[data-page="strike"] .wordmark span { display: none; }

  body[data-page="strike"] .crest { width: 34px; height: 34px; font-size: 18px; }

  .match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(188px, 34vw);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
  }

  .match-head { grid-column: 1; grid-row: 1; min-width: 0; }

  .stage {
    grid-column: 1;
    grid-row: 2;
    margin-bottom: 8px;
  }

  .dock {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    overflow: auto;
    padding-right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-hot { transition: none; }
}
