:root {
  color-scheme: dark;
  font-family: "Arial Narrow", "Roboto Condensed", Geist, ui-sans-serif, system-ui, sans-serif;
  background: #09100c;
  color: #f2f2ea;
  --pp-forest: #123d2b;
  --pp-green: #2f6b49;
  --pp-mint: #9acbae;
  --sr-purple: #7450c8;
  --sr-violet: #aa8bea;
  --brand-ink: #0d1510;
  --brand-paper: #f2f1e8;
  --broadcast-navy: var(--pp-forest);
  --broadcast-blue: var(--pp-green);
  --signal-red: var(--sr-purple);
  --snow: var(--brand-paper);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 0%, rgba(47,107,73,.24), transparent 34%),
    radial-gradient(circle at 90% 84%, rgba(116,80,200,.18), transparent 32%),
    #09100c;
}
body { overscroll-behavior: none; }
button { font: inherit; }
#app { width: min(100%, 460px); margin: 0 auto; padding: 0 0 28px; }
.game-shell {
  position: relative;
  overflow: hidden;
  background: #c9d2d3;
  aspect-ratio: 9 / 16;
  min-height: 620px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  box-shadow: 0 24px 80px rgba(0,0,0,.58);
}
.game-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg, rgba(18,61,43,.20), transparent 22%, transparent 70%, rgba(51,28,87,.28));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.game-shell *,
.game-shell *::before,
.game-shell *::after {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#game,
.touch-zone {
  touch-action: none;
  -webkit-user-drag: none;
}
#game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}
.skier-model {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  image-rendering: auto;
  pointer-events: none;
}
.skier-model[hidden] { display: none; }
.skier-pixel-model { display:none; }
.broadcast-bug {
  position: absolute;
  z-index: 4;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  color: #fff;
  text-align: right;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.42));
}
.broadcast-bug strong { font-size: 10px; letter-spacing: .08em; }
.broadcast-bug small { grid-column: 1 / -1; margin-top: 2px; font-size: 6px; font-weight: 800; letter-spacing: .18em; opacity: .7; }
.broadcast-live { margin-right: 6px; padding: 3px 5px 2px; background: var(--signal-red); font-size: 7px; font-weight: 950; letter-spacing: .12em; }
.race-tabs {
  position: absolute;
  z-index: 6;
  top: max(52px, calc(env(safe-area-inset-top) + 48px));
  right: 12px;
  display: flex;
  gap: 1px;
}
.race-tab {
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  background: rgba(12,39,27,.88);
  color: rgba(255,255,255,.82);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .10em;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.race-tab:hover, .race-tab:focus-visible { background: var(--broadcast-blue); color: #fff; }
.hud {
  position: absolute;
  inset: 12px 12px auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(0,0,0,.8);
}
.hud .kicker,
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: .18em;
  opacity: .7;
}
.hud strong { display:block; margin-top:3px; font-size:18px; letter-spacing:.04em; }
.hud-right { display:grid; gap:4px; font-size:11px; text-align:right; }
.hud-right b { font-size:13px; }

.touch-zone {
  position: absolute;
  bottom: 0;
  width: 50%;
  height: 27%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  font-size: 8px;
  letter-spacing: .16em;
  color: rgba(255,255,255,.88);
  border: 6px solid transparent;
  background: linear-gradient(to top, rgba(17,39,27,.64), rgba(17,39,27,.20));
  background-clip: padding-box;
  font-weight: 900;
}
.touch-left { left: 0; }
.touch-right { right: 0; }

.touch-zone::before { display:none; }
.touch-ski-art {
  position:absolute;
  left:50%;
  bottom:calc(max(14px, env(safe-area-inset-bottom)) + 58px);
  width:76px;
  height:min(118px, calc(100% - 82px));
  object-fit:contain;
  transform-origin:50% 78%;
  pointer-events:none;
  filter:drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 2px 2px rgba(0,0,0,.5));
}
.touch-left .touch-ski-art { transform:translateX(-50%) rotate(8deg); }
.touch-right .touch-ski-art { transform:translateX(-50%) rotate(-8deg); }
.touch-zone.is-active .touch-ski-art { filter:brightness(1.18) drop-shadow(0 0 2px rgba(255,255,255,.95)); }

.touch-zone > span {
  position: absolute;
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 27px);
  z-index: 1;
  padding: 3px 7px;
  font-size: 9px;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

.touch-direction {
  position: relative;
  z-index: 1;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: .16em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.85);
  pointer-events: none;
}

.touch-zone::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,.25);
  pointer-events: none;
  background:
    linear-gradient(currentColor,currentColor) top left / 18px 2px no-repeat,
    linear-gradient(currentColor,currentColor) top left / 2px 18px no-repeat,
    linear-gradient(currentColor,currentColor) top right / 18px 2px no-repeat,
    linear-gradient(currentColor,currentColor) top right / 2px 18px no-repeat,
    linear-gradient(currentColor,currentColor) bottom left / 18px 2px no-repeat,
    linear-gradient(currentColor,currentColor) bottom left / 2px 18px no-repeat,
    linear-gradient(currentColor,currentColor) bottom right / 18px 2px no-repeat,
    linear-gradient(currentColor,currentColor) bottom right / 2px 18px no-repeat;
  color: rgba(255,255,255,.68);
}

.touch-zone.is-active { background: linear-gradient(to top, rgba(17,39,27,.76), rgba(255,255,255,.28)); background-clip: padding-box; color:#fff; }
.touch-zone.is-active::after { color: #fff; }
.gauge {
  position: absolute;
  bottom: 21%;
  width: 26px;
  height: 88px;
  display: grid;
  gap: 5px;
  align-items: stretch;
  justify-items: center;
  pointer-events: none;
}
.gauge { display: none; }
.gauge-left { left: 8px; }
.gauge-right { right: 8px; }
.gauge > span { font-size: 7px; font-weight: 900; opacity: .55; }
.track {
  position: relative;
  width: 7px;
  height: 70px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(4,15,26,.32);
  border-radius: 8px;
  overflow: hidden;
}
.track em {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 42%;
  height: 18%;
  background: rgba(255,255,255,.34);
}
.track i {
  position: absolute;
  left: -3px;
  width: 11px;
  height: 2px;
  top: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255,255,255,.8);
}

.boost-gauge {
  position: absolute;
  left: 50%;
  top: 22.5%;
  bottom: auto;
  width: 92px;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 6px 9px;
  background: linear-gradient(135deg, rgba(170,139,234,.26), rgba(88,53,161,.16));
  border: 1px solid rgba(223,209,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 24px rgba(46,23,88,.12);
  backdrop-filter: blur(11px) saturate(135%);
  -webkit-backdrop-filter: blur(11px) saturate(135%);
  text-shadow: 0 1px 4px rgba(35,18,68,.55);
}
.boost-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  color: rgba(255,255,255,.82);
}
.boost-label b { font-size: 10px; font-variant-numeric: tabular-nums; }
.boost-track {
  display: none;
}
.crouch-state { display: none; }

.race-timing {
  position: absolute;
  z-index: 4;
  top: 67%;
  left: 57%;
  right: 3%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 14px 0 42px;
  color: #102536;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(249,252,253,.78) 34%, rgba(255,255,255,.96));
  border-bottom: 1px solid rgba(31,58,76,.18);
  filter: drop-shadow(0 3px 7px rgba(19,43,60,.12));
  pointer-events: none;
}
.race-timing > strong {
  font: 950 20px/1 Geist, "Arial Narrow", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}
.race-split {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  min-width: 128px;
  height: 22px;
  padding: 0 10px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(244,249,252,.82) 28%, rgba(250,252,253,.96));
  color: rgba(16,37,54,.65);
  font-size: 8px;
  font-weight: 850;
}
.race-split b { font: 950 11px/1 Geist, ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.race-split.is-faster { color:#fff; background:linear-gradient(90deg,rgba(24,165,72,0),rgba(24,165,72,.82) 30%,#18a548); }
.race-split.is-slower { color:#fff; background:linear-gradient(90deg,rgba(216,50,61,0),rgba(216,50,61,.82) 30%,#d8323d); }
.race-timing.is-hidden, .race-split.is-hidden { display:none; }
.boost-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pp-green), var(--sr-violet));
  box-shadow: 0 0 6px rgba(255,255,255,.55);
  transition: width 40ms linear;
}

.start-card, .result-card {
  position: absolute;
  inset: auto 14px 14px;
  z-index: 5;
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(116,80,200,.28), transparent 38%),
    linear-gradient(145deg, rgba(18,61,43,.98), rgba(9,18,12,.97));
  border: 1px solid rgba(255,255,255,.22);
  border-top: 4px solid var(--sr-purple);
  border-left: 4px solid var(--pp-green);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0,0,0,.38);
}
.menu-panel {
  position: absolute;
  z-index: 12;
  inset: 14px;
  padding: 22px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(116,80,200,.24), transparent 34%),
    linear-gradient(155deg, rgba(18,61,43,.99), rgba(7,15,10,.985));
  border: 1px solid rgba(255,255,255,.20);
  border-top: 4px solid var(--broadcast-blue);
  box-shadow: 0 24px 70px rgba(0,0,0,.62);
  backdrop-filter: blur(18px);
  animation: panelEnter .24s ease-out both;
}
@keyframes panelEnter { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.16); }
.panel-head small { display: block; margin-bottom: 4px; color: var(--pp-mint); font-size: 7px; font-weight: 900; letter-spacing: .18em; }
.panel-head h2 { margin: 0; font-size: 27px; font-style: italic; line-height: .95; letter-spacing: -.035em; }
.panel-close { padding: 7px 8px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: #fff; font-size: 7px; font-weight: 900; letter-spacing: .12em; cursor: pointer; }
.panel-intro { margin: 18px 0; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.6; }
.profile-form { display: grid; gap: 12px; }
.profile-form label { display: grid; gap: 6px; }
.profile-form label > span { font-size: 8px; font-weight: 900; letter-spacing: .14em; color: rgba(255,255,255,.58); }
.profile-form input, .profile-form select {
  width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 0; background: rgba(255,255,255,.07); color: #fff; font: 900 14px inherit; letter-spacing: .06em; outline: none;
}
.profile-form input:focus, .profile-form select:focus { border-color: var(--sr-violet); box-shadow: 0 0 0 2px rgba(116,80,200,.24); }
.profile-form select option { color: var(--pp-forest); }
.profile-save { min-height: 48px; margin-top: 5px; padding: 0 14px; display: flex; justify-content: space-between; align-items: center; border: 0; border-left: 5px solid var(--signal-red); background: #fff; color: var(--broadcast-navy); font-weight: 950; cursor: pointer; }
.profile-save small { font-size: 7px; opacity: .54; letter-spacing: .1em; }
.profile-status { margin-top: 16px; padding: 10px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.55); font-size: 8px; font-weight: 900; letter-spacing: .12em; text-align: center; }
.leaderboard-panel { padding: 0; overflow: hidden; background: #8eabc3; border-top-color: rgba(255,255,255,.8); isolation: isolate; }
.leaderboard-mountain { position: absolute; z-index: -2; inset: 0; width: 122%; background: url('./assets/images/leaderboard-mountain.png') center/cover no-repeat; animation: leaderboardPan 24s ease-in-out infinite alternate; }
.leaderboard-panel::after { content:""; position:absolute; z-index:-1; inset:0; pointer-events:none; background: linear-gradient(180deg,rgba(17,40,61,.2),rgba(130,164,193,.18) 37%,rgba(7,22,34,.55)); }
@keyframes leaderboardPan { from { transform: translate3d(-11%,0,0) scale(1.055); } to { transform: translate3d(2.5%,-1.1%,0) scale(1.095); } }
.leaderboard-panel-head { margin: 16px 16px 0; padding: 12px 10px 10px; border-bottom: 0; background: linear-gradient(90deg,rgba(245,250,252,.95),rgba(227,239,247,.75) 74%,transparent); color: #142b3d; }
.leaderboard-panel-head small { color: #243e52; }
.leaderboard-panel-head h2 { font-size: 21px; }
.leaderboard-panel-head .panel-close { border-color: rgba(18,45,64,.35); color: #173247; }
.result-tabs {
  margin: 10px 16px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(16,45,65,.18);
}
.result-subtab {
  min-height: 42px;
  padding: 7px 10px 6px;
  display: grid;
  gap: 2px;
  justify-items: start;
  border: 0;
  border-bottom: 3px solid transparent;
  background: rgba(238,246,250,.74);
  color: rgba(20,48,67,.60);
  cursor: pointer;
}
.result-subtab strong {
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .08em;
}
.result-subtab small {
  font-size: 6px;
  font-weight: 850;
  letter-spacing: .13em;
  opacity: .68;
}
.result-subtab.is-active {
  border-bottom-color: var(--sr-purple);
  background: rgba(251,253,254,.96);
  color: #142f43;
}
.result-view.is-hidden { display: none; }

.classification-board { margin-top: 92px; padding-bottom: 24px; }
.classification-title { height: 27px; padding: 0 15px; display:flex; align-items:center; justify-content:space-between; background: linear-gradient(90deg,rgba(15,42,62,.95),rgba(33,69,96,.76) 76%,transparent); color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.35); }
.classification-title strong { font-size: 10px; letter-spacing: .06em; }
.classification-title span { font-size: 7px; letter-spacing: .12em; opacity:.72; }
.classification-head, .classification-row { display: grid; grid-template-columns: 30px minmax(0,1fr) 52px 45px; gap: 5px; align-items: center; }
.classification-head { min-height: 22px; padding: 0 12px; color: rgba(18,42,59,.65); background: linear-gradient(90deg,rgba(244,249,252,.95),rgba(218,232,242,.82) 86%,transparent); font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.classification-row { min-height: 40px; padding: 4px 12px; color:#162f43; background: linear-gradient(90deg,rgba(251,253,254,.95),rgba(220,234,244,.88) 86%,rgba(220,234,244,.18)); border-top: 1px solid rgba(38,76,104,.18); text-shadow:0 1px rgba(255,255,255,.65); }
.classification-row:nth-child(even) { background: linear-gradient(90deg,rgba(232,242,248,.96),rgba(200,221,236,.86) 86%,rgba(200,221,236,.16)); }
.classification-row:first-child { color:#fff; background:linear-gradient(90deg,rgba(15,51,77,.98),rgba(32,83,119,.9) 84%,rgba(32,83,119,.2)); text-shadow:0 1px 2px rgba(0,0,0,.35); }
.classification-row.is-me { box-shadow: inset 4px 0 var(--sr-violet); }
.classification-rank { text-align:right; color:inherit; font: 950 19px/1 ui-monospace, monospace; letter-spacing:-.08em; }
.classification-athlete { min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr); column-gap: 7px; align-items: center; }
.classification-athlete-copy { min-width:0; display:flex; align-items:baseline; gap:5px; }
.classification-athlete b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; letter-spacing:.015em; }
.classification-country { font-size:7px; font-weight:800; opacity:.65; }
.classification-date { grid-column:2; margin-top:-2px; font-size:6px; font-weight:800; letter-spacing:.08em; opacity:.5; }
.classification-flag { position: relative; display: inline-block; min-width: 22px; height: 15px; overflow: hidden; background: #dfe5e8; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.flag-kr {
  background-color:#fff;
  background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAsCAIAAABeyPmVAAAM/klEQVR42tVae1BV17n/vrX3PoeHgEEwXGgJ5EajAhNQuSO02JBEe0mb66iR22SaCTKJNtJoXuZqosnEGDV1KOokN1qjmZFYG71CyU0I1LwkCQkPbeBgBQGhXlBAICBwDufstdbXP9bhcMI7xnZu9+wZYD/W+n7fY63f99tgb2+v1WolIvjnPBBxcHBQt1qtVqsV/skPnSQBAEkJiBM8R0SMMc65pmn/ALOEELquSylxQqsACJEREQN0x2ZSDIODg7quSyGklH8/AFJKhaG/v58xNlm2u81mk48rBGPsz2f/PH/+/EOHDmm6rmna36mWiEjTNF3X33zzzfj4+NLSUsaYEGLSF9mk4wKiw+FYnbn6/PnzdbW1X3311cWLF1WC3UAwRCSEYIzV19cXFxfX1NQ0NjauXbPGbrdPISYADoeDiOQ4h8vlIqJ169YBQGpq6pUrVwICAoKDg69cuUJEE7z4XQ81WkdHR8iMGYau19TUJCclAcATTzxBRC6Xa4IXHQ7HRDBM0ySi/Lx8AAgKCmpuak5LSwOAdY+ty8vLW52R0drSIoQQQoxrnRCSc8m5FEKK8R4RQojm5ub09PS33377ueeeUy47c+aMxTAAoLysjIhM07weGJxzKWVLS0tYWBgA/M+JE/v27gOA2JjYpotNkZGRAHD48GEiMke7inPhMj0+dseNSJimGGWNclbukVwACAsLa7p4MSE+HgByfpvz2muvvbJ9+4ULF3p6esbz14QwhFCjK/evzlhdVVVlGIZhGJWVlatWrQKAFctXeNB6A5Cce0x3Xe1y1Dc56hpdl9s9192PfdtlRHT/yvsBID09/csvv9Q0zTCMhoYGm80WGhq6OiNjvNQiIofdAQ77GDAUhuzsbACIjo5ubW2NiYkBgL179x46dAgAIiIi2traRsAQpqkMHSg7e/mZl+uT/uPcDxZWT59bFTS3JiyhLv6n//coxmtFn7jBeIVFDXL58mUV+aNHj+7YsQMAFi1a9MUXX/j6+gJAfn7+mKk1FI1RMJRvSkpK/Pz8ELG09MusrCwAuDctrbq6Wl0sLCwcOahpEtE3v/9jTXBMFYTbgubWBMfYps+zBc2xBc6xBd5uC5pjmz635qYY203zqrTIKmvU1ZzfjYiJmrezs/Puu+++KzW1qqrK19dX07TKiooHHngAALKzs0eXooKBDofDx8dn9MIshDh58mRkZOSSJUsGBgYKCgpKSkqys7MXLVpUUlKCiIwxxRRICKbrXftzWx/bxPz9mdUiuQAgxduAgIAAEIZ+oqZLKURvV/j2LTOfX0+cg6Z5CNHl1taFiYnt7e179uwxDCMrKysqKuoPx441NDYqMCPoiaKG48JQBKS2tjY9PT0pKWn58uVpaWmBAQFlZeVz5s5RWxUAgJCoa9f+91TTstV6QAAgDtEzZTp4fiPwmgIZMBTfdEcdPxi06ufEBWjMQ6U+++yzu+5KNQzLp59+unnTJiJ65/jx0NDQMSnWJDAAgHNuGIbL5eru7o6Li+vs7PzdgQOPrlljmqau64oAAWPiSnt94s/5Nz3MaiUpEBA8c9EQ8RkGQYAIBMAQXKY2PfC2Mx8YN4eSlMCYZ9LNmzfv2rUrKSmpqKgoMDAQAIYnHQuGtmXLljFvAwBjTEqp67q/v/+sWbNmhoZu2bpVCDFMcqVETWve9Krz49NaYBAIge44gNvWIf5GAAJQMVBCFIhAxKwW3tGGTA9YupikRMaUWUSUkpLS2dn5/PPPR0dHqwIYj1kjIud8omh4sgsRVTS9w0qSmMb+2tZbOz/t1msdTt3iNtwrAm6wiIxkgHARokvTkcgiuInagG5Bl0sPnj7r6z/pM27ybhY8s0zK1d1tE0xGutQonHMA8HaJJGIAH31eN727V/P1GgeRgDxlIRD9pWln+u9DY0umRbQa/laStzu/SetpTO5rHbD6uFouD3z0eVD6fSQk6prHegXAXYGTtk2AU2Kg48X0A1v7vbqPBv00xP1VYBUoCeAvXHW+wRsj7/6LfxgQAUkArAi45e0ZsQ901bzQViZA9n9eHpR+H3h5FBG/U3/GrptsM4YAUNPhOB0c7Ss5R/RkEyIggkS0StFmCci49Wd/8Z1pmA6NOzXJNWnqfFAT/NjM+ZsifuwH4GhoBgCcmuPHNwayLnG8igGGCETU1388JLbGJziYOzkyCSgRJSBHppH0Bb7lBylXLUGGcJrIBKIAEAAcUTI0XAMFM2LeD77Nv+uqAIDvAwOuLxjo3t78NXBoPmtvWXrBZ/rNpt1fmhYSPpIHc4cO9Gxk6qdB0RofNJGNeh0lIhIdC54jLQYCwPfowfTr7/ol6RrOnDENzZaGoBkrZi1/uPNcat+lYO5woF7lF3okJK7WbybjTumFwb2AESCQBCASF/SAvij/CLUoaex6YeBUm0y1r3+rvwVImH1z8anzVhL9zPJ62L+9PjPeV5pO1KRmBZIadwpA8JQfAg3NR0TqL5cELTFh6Mq3tAXPQv99e3FvYqJpGnlpImr8e5NuJYtmEiFJnQ+iJAdaJDCNO5nkgrFhzWWYmpAChoggKHiaJWLpjwAAGXpj0DSNMQZTW4Emrw3OOWPsWm9vRUUF89JENMakpEWxEQlxETTgYgw5oiKDCCAQJSASgScA7nUYcUiXYQyhz774J7F+c/6VC+lZqdSeXV5WNjAwAIhqy5pkvZnorpSIaBhGb09vYmLinXfe2dzcjIgenUpKqWvs5TUpJARz80FSJ9CQrDIqaxUsRABJaMGn1t7jLZMpPam2tjZl8eLk5GSn02kYhmIoE1jKJtDtmKZdu3btxRdf/Ojjj36ckmK32zMzMz0NKgBoGhNC/iz5tl8size7+nVDd/uZhqUwxc5RbSUeSASGznhX/4aHkubfHsaFVLsQESFjnPOHH37Y5XKlpqa+995727dvH+gfmEiwQhyXUyFiW1tbaWnpypUrIyMjS0pK0tLSzp8/v2PHjs2bN3v4JhERYL/dlbLmiK3msiXY3zQlEQ1XAo2UJBHA0NHV0bdkydz3f5vOcLiSBeeS6NmNG/fu27dgwYK8vLzExMSOjo6iD4rmL5gfGho6pp2Dgw42pvyIgPv27YuLi7NaLJmZmZcuXdq6deuRI0d0TXvppZcqKysNw1C+QUQgCppmLdr3i/i4CNfVPsZA19lQUBRtJ2U9A9A1RkSuq3333Rub/5v7dY254wRARLphWCyWouJi1ZE/+eSTHR0djz/++KDTGRcXd/DgQWXe6HCwcZRC6Ovr6+zsXL9hw9NPPx0VFZWbm3umsnLbtm1OpzMzM9PhcHjylTEUQoaHBJw++NDq/1woBpy8106SNIa6hrrGNI3pGiKC5IJ3D/gxePmZpe9mp/v76Io+e3j01Y6ru3fvzs/PP3Xq1IkTJ/Ly8mJiYrKysn7966z29vaenp5xi2QMgUcIpSoodSczM/P9996fPXv2hx9+KKVMSEgAgPXr149ox7kQqmY+qWxe8czxwDt3wx3bIObF4TNhW9i/73lsZ+H55k4ldXrrTkqezMjIAIDHfvUrIiooKJg9a1ZhYaHqXVesWEFEI/WkiXUq9fSlS5dCQkIA4PChwz09PT899dRPly49e/asn68fIhYXF48QR4SQnLvBtLT3vnu6bndu6X+9/vHm//5k7x/KPyy72N1rV3dNk48WMd555x0ACAkJsdlsixcvfuGFF/r7+4uLi5Us0t7eLoT4bjA8Qx89elTJIufOnVNKYU5OzhtvvKHma2pqGq24mFx4wIw+TJPzb4t/6vXq6uppAQEAcPLkyVdffRUA5s2bV11dXVlRsX///oKCgvH0zylouC4XET344IMAsGzZsoqKCoth+Pj4lJWVLbnnntjY2IaGBjmWh5Qya5rc5XWafGz1Ur1eXl4eHh7+0C9/WVlRqdpmm82WnJzMGKuqqppAjR5SDceHITgXQnR1dak4HDhwYM+ePQBwxx13dHR02O12leLfX04XQiiFqrW1NTLyhwDw1ltv7XjlFRWT1pYW0zTHm2hc1XB0ahUWFjLGfH19i4qKHnnkkeKiYpUhNwSDt1TJOd+/f39mZua7Be/qum61WisqKiaQ06eUVN5riNI/c3JyPABuIAZPTDwi/Nq1a5XyOfHHje8AQ1nc3d19+vRpNeiYxXCjDtM0uWkS0R/z8wcHB4UQckJ/qdqYXODx1kem8Gn0Rn7w9nQ1kwo8U21iVfr+wzB4dropPq2rZmVS+6YuGd2oUEx9OkTUnU7nZGz+//s/W7hcrr8BZeKjHV3DNNMAAAAASUVORK5CYII=");
  background-repeat:no-repeat;
  background-position:center;
  background-size:cover;
}
.flag-at { background: linear-gradient(#d62032 0 33%, #fff 33% 66%, #d62032 66%); }
.flag-ch { background: linear-gradient(#d92736,#d92736); }
.flag-ch::before, .flag-ch::after { content:""; position:absolute; background:#fff; left:50%; top:50%; transform:translate(-50%,-50%); }
.flag-ch::before { width:11px; height:3px; } .flag-ch::after { width:3px; height:11px; }
.flag-fr { background: linear-gradient(90deg,#173c8e 0 33%,#fff 33% 66%,#e02532 66%); }
.flag-it { background: linear-gradient(90deg,#16834d 0 33%,#fff 33% 66%,#d92939 66%); }
.flag-jp { background: radial-gradient(circle at 50% 50%, #bc2035 0 33%, transparent 35%), #fff; }
.flag-de { background: linear-gradient(#181818 0 33%,#cc2431 33% 66%,#e4b72b 66%); }
.flag-us { background: repeating-linear-gradient(#c82335 0 1.15px,#fff 1.15px 2.3px); }
.flag-no, .flag-se { background:#c82335; }
.flag-no::before, .flag-no::after, .flag-se::before, .flag-se::after { content:""; position:absolute; }
.flag-no::before, .flag-se::before { left:6px; top:0; width:4px; height:100%; background:#fff; }
.flag-no::after, .flag-se::after { left:0; top:6px; width:100%; height:4px; background:#fff; }
.flag-se { background:#2462a1; } .flag-se::before, .flag-se::after { background:#e8c631; }
.classification-time, .classification-gap { text-align: right; font: 950 10px ui-monospace, monospace; }
.classification-gap { opacity:.62; font-style: italic; }
.classification-row:first-child .classification-gap { opacity:.85; }
.classification-empty { padding: 60px 12px; text-align: center; color: #173247; background:rgba(247,251,253,.82); font-size: 9px; font-weight:900; letter-spacing: .12em; }
.history-board {
  margin-top: 92px;
  padding-bottom: 24px;
}
.history-head,
.history-row {
  display: grid;
  grid-template-columns: 30px 50px 48px 46px minmax(58px,1fr);
  gap: 7px;
  align-items: center;
}
.history-head {
  min-height: 22px;
  padding: 0 12px;
  color: rgba(18,42,59,.65);
  background: linear-gradient(90deg,rgba(244,249,252,.95),rgba(218,232,242,.82) 86%,transparent);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .1em;
}
.history-row {
  min-height: 38px;
  padding: 4px 12px;
  color: #162f43;
  background: linear-gradient(90deg,rgba(251,253,254,.95),rgba(220,234,244,.88) 86%,rgba(220,234,244,.18));
  border-top: 1px solid rgba(38,76,104,.18);
}
.history-row:nth-child(even) {
  background: linear-gradient(90deg,rgba(232,242,248,.96),rgba(200,221,236,.86) 86%,rgba(200,221,236,.16));
}
.history-row.is-best {
  box-shadow: inset 4px 0 var(--sr-violet);
}
.history-row.is-dnf {
  box-shadow: inset 4px 0 var(--signal-red);
}
.history-row.is-dnf .history-result {
  color: var(--signal-red);
}
.history-run {
  text-align: right;
  font: 900 12px ui-monospace, monospace;
  opacity: .62;
}
.history-date {
  font: 800 8px ui-monospace, monospace;
  opacity: .62;
}
.history-result {
  text-align: right;
  font: 950 9px ui-monospace, monospace;
}
.history-gates {
  text-align: right;
  font: 850 8px ui-monospace, monospace;
  opacity: .62;
}
.history-time {
  text-align: right;
  font: 950 11px ui-monospace, monospace;
}
.history-empty {
  padding: 60px 12px;
  text-align: center;
  color: #173247;
  background: rgba(247,251,253,.82);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}
@media (prefers-reduced-motion: reduce) { .leaderboard-mountain { animation: none; } }
.start-card h1, .result-card h2 {
  margin: 9px 0 14px;
  font-size: clamp(30px, 9vw, 42px);
  line-height: .9;
  letter-spacing: -.045em;
  font-weight: 950;
  font-style: italic;
}
.start-card .title-by {
  margin: -7px 0 14px;
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: .16em;
  text-transform: none;
}
.start-card p, .result-card p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
}
.start-card button, .result-card button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-left: 5px solid var(--signal-red);
  background: var(--snow);
  color: var(--broadcast-navy);
  font-weight: 900;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: pointer;
}
.start-card button small, .result-card button small { font-size: 8px; letter-spacing: .12em; opacity: .55; }
.start-card button:active, .result-card button:active { transform: translateY(1px); }
.event-lockup { display: flex; justify-content: space-between; gap: 12px; font-size: 8px; font-weight: 900; letter-spacing: .13em; color: rgba(255,255,255,.62); }
.event-round { color: var(--sr-violet); }
.start-meta { display: grid; grid-template-columns: 1.15fr .8fr 1.3fr; margin: 0 0 14px; border-block: 1px solid rgba(255,255,255,.16); }
.start-meta span { padding: 9px 7px; border-right: 1px solid rgba(255,255,255,.12); }
.start-meta span:first-child { padding-left: 0; }
.start-meta span:last-child { border-right: 0; }
.start-meta small, .start-meta b { display: block; }
.start-meta small { margin-bottom: 3px; font-size: 7px; letter-spacing: .13em; opacity: .48; }
.start-meta b { font-size: 9px; letter-spacing: .04em; white-space: nowrap; }
.start-meta span:first-child b { color: var(--pp-mint); }
.start-meta span:last-child b { color: var(--sr-violet); }
.is-hidden { display: none; }
.result-grid {
  display:grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin: 12px 0;
}
.result-grid div {
  border: 0;
  border-left: 2px solid var(--broadcast-blue);
  background: rgba(255,255,255,.06);
  padding: 10px;
}
.result-grid span { display:block; font-size:9px; opacity:.55; letter-spacing:.14em; }
.result-grid strong { display:block; margin-top:3px; font-size:18px; }

.prototype-note {
  display: grid;
  gap: 4px;
  padding: 16px 18px 0;
  color: #8393a1;
  text-align: center;
}
.prototype-note strong { font-size: 11px; color:#fff; letter-spacing: .18em; }
.prototype-note span { font-size: 9px; line-height:1.5; letter-spacing: .16em; }

@media (max-width: 390px) {
  .game-shell { min-height: 560px; }
}


.crouch-state {
  margin-top: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  color: rgba(255,255,255,.42);
}
.crouch-state.is-active {
  color: rgba(255,255,255,.96);
}
.start-actions {
  display: grid;
  gap: 8px;
}
.start-card .gyro-button {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.38);
}
.start-card .gyro-button.is-on {
  background: rgba(255,255,255,.14);
  border-color: #fff;
}
.start-card .gyro-button:disabled {
  opacity: .4;
}
.start-card .control-note {
  margin: 10px 0 0;
  font-size: 9px;
  letter-spacing: .08em;
  text-align: center;
  color: rgba(255,255,255,.5);
}


.result-card {
  max-height: calc(100% - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.leaderboard {
  margin: 12px 0 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.16);
}
.leaderboard-head,
.leaderboard-row,
.my-rank {
  display: grid;
  align-items: center;
}
.leaderboard-head {
  grid-template-columns: 1fr auto;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: 9px;
  letter-spacing: .14em;
  color: rgba(255,255,255,.62);
}
.leaderboard-head b { color: #fff; }
.leaderboard-row {
  grid-template-columns: 24px 18px minmax(0,1fr) 42px 44px;
  gap: 5px;
  min-height: 22px;
  padding: 3px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 9px;
}
.leaderboard-row:last-child { border-bottom: 0; }
.leaderboard-row b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: .58;
}
.leaderboard-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: .04em;
  color: rgba(255,255,255,.68);
  font-size: 9px;
  font-weight: 800;
}
.leaderboard-flag {
  width: 18px;
  min-width: 18px;
  height: 12px;
  align-self: center;
}
.leaderboard-gap {
  text-align: right;
  color: rgba(255,255,255,.52);
  font: italic 750 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -.02em;
}
.leaderboard-time {
  text-align: right;
  font: 850 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.leaderboard-row.is-me {
  background: rgba(255,255,255,.11);
}
.leaderboard-row.is-pb-insert {
  position: relative;
  z-index: 2;
  background: linear-gradient(90deg, rgba(116,80,200,.92), rgba(47,107,73,.82));
  box-shadow: 0 8px 22px rgba(7,12,10,.34);
  animation: pbCardInsert 720ms cubic-bezier(.16,1,.3,1) both;
}
.leaderboard-row.is-displaced {
  animation: rankingPushDown 560ms cubic-bezier(.22,1,.36,1) both;
}
@keyframes pbCardInsert {
  from { opacity:0; transform:translate3d(42px,-42px,0) scale(.96); }
  62% { opacity:1; transform:translate3d(-3px,0,0) scale(1.012); }
  to { opacity:1; transform:none; }
}
@keyframes rankingPushDown {
  from { opacity:.22; transform:translateY(-26px); }
  to { opacity:1; transform:none; }
}
.leaderboard-row.is-me .leaderboard-name,
.leaderboard-row.is-me .leaderboard-gap,
.leaderboard-row.is-me b {
  color: #fff;
  opacity: 1;
}
.leaderboard-empty {
  padding: 12px 10px;
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(255,255,255,.42);
}
.my-rank {
  min-height: 30px;
  padding: 7px 10px;
  border-top: 1px solid rgba(255,255,255,.14);
  font: 900 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  background: rgba(255,255,255,.06);
}
.my-rank.is-hidden-rank {
  display: none;
}
.my-rank.is-standard-rank {
  grid-template-columns: 1fr;
}
.my-rank.is-outside-pb {
  position: relative;
  grid-template-columns: 24px 18px minmax(0,1fr) 42px 44px;
  gap: 5px;
  min-height: 28px;
  margin-top: 23px;
  padding: 4px 10px;
  border-top: 0;
  background: linear-gradient(90deg, rgba(116,80,200,.26), rgba(47,107,73,.20));
  box-shadow: inset 3px 0 rgba(170,139,234,.9);
}
.my-rank.is-outside-pb::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -23px;
  height: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.08);
}
.my-rank-position {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: .82;
}
.my-rank-flag {
  width: 18px;
  min-width: 18px;
  height: 12px;
  align-self: center;
}
.my-rank-athlete {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(255,255,255,.84);
  font: 850 9px system-ui, sans-serif;
  letter-spacing: .04em;
}
.my-rank-gap {
  text-align: right;
  color: rgba(255,255,255,.66);
  font: italic 800 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -.02em;
}
.my-rank-time {
  text-align: right;
  font: 900 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #fff;
}
.my-rank.is-pb-reveal {
  animation: outsidePbReveal 680ms cubic-bezier(.16,1,.3,1) both;
}
@keyframes outsidePbReveal {
  from { opacity:0; transform:translateY(12px) scale(.985); }
  65% { opacity:1; transform:translateY(-1px) scale(1.005); }
  to { opacity:1; transform:none; }
}


.finish-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0 12px 18%;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(9,12,13,.06) 0%,
      rgba(9,12,13,.18) 46%,
      rgba(9,12,13,.08) 100%
    );
  animation: finishOverlayIn 4.2s cubic-bezier(.22,1,.36,1) both;
}

.finish-overlay.is-hidden {
  display: none;
}

.finish-overlay-inner {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  width: 100%;
  max-width: 430px;
  padding: 0;
  color:#10293c;
  text-align: left;
  background: linear-gradient(90deg,rgba(255,255,255,.08),rgba(248,251,252,.96) 12%,rgba(255,255,255,.98));
  border: 0;
  border-bottom: 2px solid rgba(20,52,75,.46);
  box-shadow: 0 12px 34px rgba(7,24,38,.24);
  text-shadow: none;
}

.finish-overlay-kicker {
  display:none;
}

.finish-overlay-time {
  padding: 10px 12px;
  font: 950 21px/1 Geist, ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  color: #10293c;
}

.finish-overlay-speed {
  grid-column:3;
  padding: 5px 9px 6px;
  font: 800 7px/1 Geist, ui-monospace, monospace;
  letter-spacing: .08em;
  color: rgba(255,255,255,.74);
  background:#17384f;
}

@keyframes finishOverlayIn {
  0%, 12% { opacity:0; transform:translate3d(36px,8px,0); }
  24%, 88% { opacity:1; transform:none; }
  100% { opacity:0; transform:translateY(5px); }
}


/* Broadcast HUD is rendered on the canvas; suppress the old prototype header. */
.hud {
  display: none;
}

.touch-zone,
.gauge,
.boost-gauge { z-index: 3; }


.finish-overlay-leader {
  grid-column:1 / -1;
  width:100%;
  padding:5px 10px;
  font: 800 7px/1.2 Geist, ui-monospace, monospace;
  letter-spacing:.07em;
  color:rgba(255,255,255,.72);
  background:linear-gradient(90deg,#102d43,rgba(16,45,67,.84) 74%,rgba(16,45,67,.18));
}
.finish-overlay-name {
  min-width:0;
  padding:10px 6px 10px 26px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font: 900 12px/1 Geist, system-ui, sans-serif;
  letter-spacing:.04em;
  color:#10293c;
}
.finish-overlay-delta {
  min-width:72px;
  align-self:stretch;
  display:grid;
  place-items:center;
  padding:7px 10px;
  font: 950 15px/1 Geist, ui-monospace, monospace;
  font-variant-numeric:tabular-nums;
  color: #fff;
  text-shadow: none;
}
.finish-overlay-delta.is-faster {
  background: rgba(28,142,77,.95);
}
.finish-overlay-delta.is-slower {
  background: rgba(190,48,48,.95);
}
.finish-overlay-delta.is-reference {
  background: rgba(35,40,42,.90);
  font-size: 12px;
  letter-spacing: .08em;
}
.finish-overlay-status {
  grid-column:1 / 3;
  padding:5px 10px 6px 26px;
  font:900 7px/1 Geist,system-ui,sans-serif;
  letter-spacing:.12em;
  color:rgba(255,255,255,.86);
  background:#17384f;
}
@media (prefers-reduced-motion: reduce) {
  .finish-overlay, .leaderboard-row.is-pb-insert, .leaderboard-row.is-displaced, .my-rank.is-pb-reveal { animation-duration:1ms; animation-delay:0ms; }
}

/* =========================================================
   SKIgame result presentation v3
   Full-bleed panning mountain + floating pale classification glass
   ========================================================= */

/* RESULT panel: the mountain is the scene, not a picture inside a card. */
.leaderboard-panel {
  position: absolute;
  padding: 0;
  overflow: hidden;
  background: #aabac5;
  border: 1px solid rgba(255,255,255,.62);
  border-top: 3px solid rgba(255,255,255,.90);
  box-shadow: 0 22px 60px rgba(8,18,25,.34);
  isolation: isolate;
}

.leaderboard-panel .leaderboard-mountain {
  position: absolute;
  z-index: 0;
  top: -4%;
  bottom: -4%;
  left: -14%;
  width: 136%;
  height: 108%;
  opacity: .96;
  background:
    url('./assets/images/leaderboard-mountain.png')
    50% 50% / cover no-repeat;
  filter: saturate(.78) contrast(.94) brightness(.94);
  transform-origin: 50% 50%;
  will-change: transform;
  animation: leaderboardPan 18s cubic-bezier(.45,.05,.55,.95) infinite alternate;
}

.leaderboard-panel::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(26,39,49,.24) 0%,
      rgba(238,242,244,.04) 9%,
      rgba(238,242,244,0) 22%,
      rgba(238,242,244,0) 78%,
      rgba(238,242,244,.04) 91%,
      rgba(26,39,49,.24) 100%
    ),
    linear-gradient(
      180deg,
      rgba(229,236,240,.10) 0%,
      rgba(183,201,214,.03) 40%,
      rgba(27,48,64,.20) 100%
    );
}

.leaderboard-panel::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 26px 0 34px -30px rgba(8,22,31,.60),
    inset -26px 0 34px -30px rgba(8,22,31,.60);
}

.leaderboard-panel > :not(.leaderboard-mountain) {
  position: relative;
  z-index: 2;
}

/* Start on the RIGHT edge of the mountain panorama, then reveal the left
   side as the background glides right behind the fixed result viewport. */
@keyframes leaderboardPan {
  from { transform: translate3d(-11%, 0, 0) scale(1.055); }
  to   { transform: translate3d( 2.5%, -1.1%, 0) scale(1.095); }
}

/* Header and tabs float above the moving scenery. */
.leaderboard-panel .leaderboard-panel-head {
  margin: 16px 16px 0;
  padding: 12px 11px 10px;
  color: #23313a;
  background:
    linear-gradient(
      90deg,
      rgba(247,248,249,.94) 0%,
      rgba(237,240,242,.88) 74%,
      rgba(237,240,242,.26) 94%,
      rgba(237,240,242,0) 100%
    );
  border: 1px solid rgba(255,255,255,.36);
  border-left-color: rgba(255,255,255,.62);
  box-shadow: 0 7px 18px rgba(19,42,57,.10);
  backdrop-filter: blur(8px) saturate(85%);
  -webkit-backdrop-filter: blur(8px) saturate(85%);
}

.leaderboard-panel .leaderboard-panel-head small {
  color: rgba(34,49,59,.62);
}
.leaderboard-panel .leaderboard-panel-head .panel-close {
  color: #2e3b44;
  border-color: rgba(46,59,68,.28);
  background: rgba(244,246,247,.36);
}

.leaderboard-panel .result-tabs {
  margin: 8px 16px 0;
  gap: 1px;
  background: transparent;
}
.leaderboard-panel .result-subtab {
  background: rgba(231,235,238,.63);
  color: rgba(39,52,61,.64);
  border-bottom-color: transparent;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.leaderboard-panel .result-subtab.is-active {
  color: #27343d;
  background: rgba(246,247,248,.86);
  border-bottom-color: var(--sr-purple);
}

/* The classification is a pale grey glass sheet whose sides dissolve into
   the moving mountain instead of forming a hard rectangular modal. */
.leaderboard-panel .classification-board,
.leaderboard-panel .history-board {
  position: relative;
  margin: 76px 8px 22px;
  padding: 10px 14px 18px;
  isolation: isolate;
}

.leaderboard-panel .classification-board::before,
.leaderboard-panel .history-board::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -4px;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(231,234,236,0) 0%,
      rgba(231,234,236,.42) 7%,
      rgba(239,241,242,.78) 18%,
      rgba(242,243,244,.84) 50%,
      rgba(239,241,242,.78) 82%,
      rgba(231,234,236,.42) 93%,
      rgba(231,234,236,0) 100%
    );
  backdrop-filter: blur(7px) saturate(78%);
  -webkit-backdrop-filter: blur(7px) saturate(78%);
  box-shadow: 0 10px 26px rgba(20,39,52,.10);
}

.leaderboard-panel .classification-title {
  color: #2a3740;
  text-shadow: none;
  background:
    linear-gradient(
      90deg,
      rgba(214,218,221,0) 0%,
      rgba(214,218,221,.78) 8%,
      rgba(223,226,228,.92) 20%,
      rgba(223,226,228,.92) 80%,
      rgba(214,218,221,.78) 92%,
      rgba(214,218,221,0) 100%
    );
}
.leaderboard-panel .classification-title span {
  color: rgba(42,55,64,.60);
}

.leaderboard-panel .classification-head,
.leaderboard-panel .history-head {
  color: rgba(45,56,64,.62);
  background:
    linear-gradient(
      90deg,
      rgba(247,248,249,0) 0%,
      rgba(247,248,249,.76) 8%,
      rgba(242,244,245,.90) 18%,
      rgba(242,244,245,.90) 82%,
      rgba(247,248,249,.76) 92%,
      rgba(247,248,249,0) 100%
    );
}

.leaderboard-panel .classification-row,
.leaderboard-panel .history-row {
  color: #27343c;
  text-shadow: 0 1px rgba(255,255,255,.65);
  border-top-color: rgba(70,80,88,.10);
  background:
    linear-gradient(
      90deg,
      rgba(247,248,249,0) 0%,
      rgba(247,248,249,.68) 7%,
      rgba(238,240,242,.86) 17%,
      rgba(238,240,242,.88) 83%,
      rgba(247,248,249,.68) 93%,
      rgba(247,248,249,0) 100%
    );
}
.leaderboard-panel .classification-row:nth-child(even),
.leaderboard-panel .history-row:nth-child(even) {
  background:
    linear-gradient(
      90deg,
      rgba(235,237,239,0) 0%,
      rgba(235,237,239,.64) 7%,
      rgba(226,229,231,.84) 17%,
      rgba(226,229,231,.86) 83%,
      rgba(235,237,239,.64) 93%,
      rgba(235,237,239,0) 100%
    );
}

/* Keep P1 readable without turning the whole table back into a dark block. */
.leaderboard-panel .classification-row:first-child {
  color: #26343d;
  text-shadow: 0 1px rgba(255,255,255,.68);
  background:
    linear-gradient(
      90deg,
      rgba(210,214,217,0) 0%,
      rgba(210,214,217,.72) 7%,
      rgba(199,204,208,.92) 17%,
      rgba(199,204,208,.94) 83%,
      rgba(210,214,217,.72) 93%,
      rgba(210,214,217,0) 100%
    );
  box-shadow: inset 3px 0 rgba(116,80,200,.70);
}
.leaderboard-panel .classification-row:first-child .classification-gap {
  opacity: .68;
}

.leaderboard-panel .classification-empty,
.leaderboard-panel .history-empty {
  min-height: 128px;
  display: grid;
  place-items: center;
  color: #2d3c46;
  background:
    linear-gradient(
      90deg,
      rgba(244,246,247,0) 0%,
      rgba(244,246,247,.62) 10%,
      rgba(239,242,244,.76) 22%,
      rgba(239,242,244,.76) 78%,
      rgba(244,246,247,.62) 90%,
      rgba(244,246,247,0) 100%
    );
}

/* DNF / finish-card inline leaderboard: pale grey instead of murky green. */
.result-card .leaderboard {
  border-color: rgba(255,255,255,.26);
  background: rgba(232,235,236,.96);
  color: #243139;
  box-shadow: 0 9px 20px rgba(0,0,0,.14);
}
.result-card .leaderboard-head {
  color: rgba(38,50,58,.64);
  border-bottom-color: rgba(47,60,68,.12);
  background: #dfe3e5;
}
.result-card .leaderboard-head b {
  color: #26333b;
}
.result-card .leaderboard-row {
  color: #26333b;
  border-bottom-color: rgba(49,62,70,.10);
  background: rgba(247,248,248,.86);
}
.result-card .leaderboard-row:nth-child(even) {
  background: rgba(232,235,237,.88);
}
.result-card .leaderboard-row b,
.result-card .leaderboard-time {
  color: #1f2c34;
}
.result-card .leaderboard-name {
  color: rgba(31,44,52,.84);
}
.result-card .leaderboard-gap {
  color: rgba(42,54,62,.54);
}
.result-card .leaderboard-row.is-me {
  background: rgba(224,218,239,.92);
  box-shadow: inset 3px 0 var(--sr-violet);
}
.result-card .leaderboard-row.is-me .leaderboard-name,
.result-card .leaderboard-row.is-me .leaderboard-gap,
.result-card .leaderboard-row.is-me b {
  color: #26313a;
}
.result-card .leaderboard-empty {
  color: rgba(39,51,59,.55);
  background: rgba(241,243,244,.88);
}
.result-card .my-rank {
  color: #26333b;
  border-top-color: rgba(45,58,66,.12);
  background: #d9dddf;
}
.result-card .my-rank.is-outside-pb {
  background: linear-gradient(90deg, rgba(222,217,237,.96), rgba(219,229,223,.96));
  box-shadow: inset 3px 0 rgba(170,139,234,.92);
}
.result-card .my-rank-position,
.result-card .my-rank-athlete,
.result-card .my-rank-gap,
.result-card .my-rank-time {
  color: #26333b;
}

@media (prefers-reduced-motion: reduce) {
  .leaderboard-panel .leaderboard-mountain {
    animation: none;
    /* The static accessibility view starts at the same right-hand framing. */
    transform: translate3d(-11%,0,0) scale(1.055);
  }
}

/* =========================================================
   SKIgame lavender glass cards
   SILVERRATIOO lavender is the presentation tone.
   PRESSPOINT green is reserved for the PRESSPOINT wordmark.
   ========================================================= */

.start-card,
.result-card {
  color: #30273a;
  background:
    radial-gradient(circle at 100% 0%, rgba(170,139,234,.30), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255,255,255,.30), transparent 44%),
    linear-gradient(145deg, rgba(241,236,248,.82), rgba(215,207,230,.72));
  border: 1px solid rgba(255,255,255,.58);
  border-top: 4px solid rgba(150,117,218,.94);
  border-left: 4px solid rgba(170,139,234,.82);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  box-shadow: 0 20px 50px rgba(40,28,56,.22);
}

.start-card h1,
.result-card h2 {
  color: #2d2436;
  text-shadow: none;
}

.start-card p,
.result-card p {
  color: rgba(50,40,61,.88);
}

.start-card .event-lockup {
  color: rgba(67,55,81,.68);
}

.start-card .event-round,
.start-card .title-by {
  color: rgba(116,84,174,.92);
}

.start-card .eyebrow {
  color: rgba(61,50,72,.72);
}

.start-card .brand-presspoint {
  color: var(--pp-green);
  font-weight: 950;
}

.start-card .start-meta {
  border-block-color: rgba(81,66,98,.18);
}

.start-card .start-meta span {
  border-right-color: rgba(81,66,98,.14);
}

.start-card .start-meta small {
  color: rgba(73,60,89,.58);
}

.start-card .start-meta b,
.start-card .start-meta span:first-child b {
  color: #3a3045;
}

.start-card .start-meta span:last-child b {
  color: #7753bf;
}

.start-card .gyro-button {
  background: rgba(255,255,255,.20);
  color: #342a40;
  border: 1px solid rgba(105,85,133,.22);
  border-left: 4px solid rgba(170,139,234,.62);
}

.start-card .gyro-button.is-on {
  background: rgba(170,139,234,.20);
  color: #30263a;
  border-color: rgba(150,117,218,.48);
}

.start-card .control-note {
  color: rgba(62,51,75,.62);
}

.start-card button,
.result-card button {
  background: rgba(250,248,244,.93);
  color: #332a3d;
  border-left-color: var(--sr-violet);
  box-shadow: 0 6px 18px rgba(48,33,67,.10);
}

.start-card button small,
.result-card button small {
  color: rgba(74,61,91,.58);
}

.race-tab {
  background: rgba(58,47,70,.82);
  color: rgba(255,255,255,.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.race-tab:hover,
.race-tab:focus-visible {
  background: rgba(116,80,200,.92);
  color: #fff;
}

.result-card .eyebrow {
  color: rgba(67,54,82,.64);
}

.result-card .result-grid div {
  border-left-color: rgba(150,117,218,.72);
  background: rgba(255,255,255,.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.result-card .result-grid span {
  color: rgba(73,59,91,.58);
}

.result-card .result-grid strong {
  color: #30263a;
}

.result-card .leaderboard {
  border-color: rgba(255,255,255,.34);
  background: rgba(241,237,246,.72);
  color: #2e2537;
  box-shadow: 0 10px 24px rgba(40,27,57,.10);
  backdrop-filter: blur(10px) saturate(112%);
  -webkit-backdrop-filter: blur(10px) saturate(112%);
}

.result-card .leaderboard-head {
  color: rgba(65,52,82,.62);
  border-bottom-color: rgba(79,63,98,.11);
  background: rgba(225,219,235,.76);
}

.result-card .leaderboard-head b {
  color: #342a3d;
}

.result-card .leaderboard-row {
  color: #30273a;
  border-bottom-color: rgba(77,62,95,.09);
  background: rgba(251,249,252,.62);
}

.result-card .leaderboard-row:nth-child(even) {
  background: rgba(238,233,244,.60);
}

.result-card .leaderboard-row b,
.result-card .leaderboard-time {
  color: #2b2234;
}

.result-card .leaderboard-name {
  color: rgba(43,34,52,.84);
}

.result-card .leaderboard-gap {
  color: rgba(66,53,82,.54);
}

.result-card .leaderboard-row.is-me {
  background: rgba(225,216,242,.78);
  box-shadow: inset 3px 0 var(--sr-violet);
}

.result-card .leaderboard-row.is-me .leaderboard-name,
.result-card .leaderboard-row.is-me .leaderboard-gap,
.result-card .leaderboard-row.is-me b {
  color: #30263a;
}

.result-card .leaderboard-empty {
  color: rgba(57,46,70,.55);
  background: rgba(244,241,247,.66);
}

.result-card .my-rank {
  color: #30273a;
  border-top-color: rgba(77,62,95,.11);
  background: rgba(221,214,233,.70);
}

.result-card .my-rank.is-outside-pb {
  background: linear-gradient(
    90deg,
    rgba(228,219,245,.78),
    rgba(237,232,246,.72)
  );
  box-shadow: inset 3px 0 rgba(170,139,234,.92);
}

.result-card .my-rank-position,
.result-card .my-rank-athlete,
.result-card .my-rank-gap,
.result-card .my-rank-time {
  color: #30273a;
}

/* =========================================================
   SKIgame result presentation v4
   Flat edge fade + compact 15-row classification
   ========================================================= */

/* Remove the dark side shading that made the result scene read like a tube. */
.leaderboard-panel::before {
  background:
    linear-gradient(
      180deg,
      rgba(229,236,240,.08) 0%,
      rgba(183,201,214,.02) 42%,
      rgba(27,48,64,.14) 100%
    );
}

.leaderboard-panel::after {
  box-shadow: none;
}

/* Keep the table flat. Transparency is handled by a narrow edge mask,
   not by bright/dark gradients across every row. */
.leaderboard-panel .classification-board {
  margin: 28px 8px 12px;
  padding: 6px 12px 10px;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 5%,
    #000 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 5%,
    #000 95%,
    transparent 100%
  );
}

.leaderboard-panel .classification-board::before {
  inset: 0;
  background: rgba(238,240,242,.68);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.leaderboard-panel .classification-title {
  height: 24px;
  padding: 0 12px;
  color: #2c3942;
  background: rgba(215,219,222,.70);
}

.leaderboard-panel .classification-title strong {
  font-size: 9px;
  letter-spacing: .055em;
}

.leaderboard-panel .classification-title span {
  font-size: 6px;
  letter-spacing: .10em;
}

.leaderboard-panel .classification-head {
  min-height: 18px;
  padding: 0 10px;
  color: rgba(45,56,64,.62);
  background: rgba(246,247,248,.72);
  font-size: 6px;
  letter-spacing: .09em;
}

.leaderboard-panel .classification-row {
  min-height: 29px;
  padding: 2px 10px;
  color: #29363f;
  background: rgba(246,247,248,.66);
  border-top: 1px solid rgba(70,80,88,.09);
  text-shadow: none;
}

.leaderboard-panel .classification-row:nth-child(even) {
  background: rgba(232,235,238,.66);
}

.leaderboard-panel .classification-row:first-child {
  color: #29363f;
  background: rgba(211,215,219,.74);
  text-shadow: none;
  box-shadow: inset 3px 0 rgba(116,80,200,.70);
}

.leaderboard-panel .classification-head,
.leaderboard-panel .classification-row {
  grid-template-columns: 28px minmax(0,1fr) 48px 42px;
  gap: 5px;
}

.leaderboard-panel .classification-rank {
  font: 900 13px/1 ui-monospace, monospace;
  letter-spacing: -.045em;
}

.leaderboard-panel .classification-athlete {
  grid-template-columns: 20px minmax(0,1fr);
  column-gap: 6px;
}

.leaderboard-panel .classification-flag {
  min-width: 20px;
  width: 20px;
  height: 13px;
}

.leaderboard-panel .classification-athlete-copy {
  gap: 4px;
  align-items: center;
}

.leaderboard-panel .classification-athlete b {
  font-size: 9px;
  line-height: 1;
  letter-spacing: .01em;
}

.leaderboard-panel .classification-country {
  font-size: 6px;
  line-height: 1;
  opacity: .56;
}

/* Record date is intentionally omitted in the compact world-ranking view. */
.leaderboard-panel .classification-date {
  display: none;
}

.leaderboard-panel .classification-time,
.leaderboard-panel .classification-gap {
  font-size: 9px;
  line-height: 1;
}

.leaderboard-panel .classification-gap {
  opacity: .58;
}

.leaderboard-panel .classification-row:first-child .classification-gap {
  opacity: .68;
}



/* =========================================================
   SKIgame mountain-only skyline overlay v1
   Keep the skyline unobstructed; UI remains floating overlay only.
   ========================================================= */
.game-shell::after {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 72%,
    rgba(51,28,87,.14) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.broadcast-bug {
  left: 12px;
  right: auto;
  text-align: left;
}

.race-tabs {
  top: max(10px, calc(env(safe-area-inset-top) + 8px));
  right: 10px;
  background: transparent;
}

.race-tab {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(47,38,58,.46);
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(8px) saturate(110%);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
  box-shadow: 0 2px 9px rgba(17,13,22,.14);
}

.race-tab:hover,
.race-tab:focus-visible {
  background: rgba(116,80,200,.68);
  color: #fff;
}


/* =========================================================
   SKIgame result split layout v1
   Personal result is a free overlay; only the leaderboard is a panel.
   ========================================================= */

.result-card {
  position: absolute;
  inset: 0;
  z-index: 7;
  max-height: none;
  overflow: hidden;
  padding: 0;
  color: #30273a;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.result-card.is-hidden {
  display: none;
}

/* Personal result: no enclosing card, only lightweight floating information. */
.result-summary-overlay {
  position: absolute;
  top: 28px;
  left: 22px;
  right: 22px;
  z-index: 2;
  pointer-events: none;
  color: #30273a;
  text-shadow: 0 1px 10px rgba(255,255,255,.72);
}

.result-summary-overlay .result-lockup {
  color: rgba(64,52,79,.56);
  font-size: 7px;
  letter-spacing: .14em;
}

.result-summary-overlay .eyebrow {
  margin: 2px 0 7px;
  color: rgba(74,60,91,.60);
  font-size: 10px;
  line-height: 1.1;
}

.result-summary-overlay h2 {
  margin: 0 0 12px;
  color: #322640;
  font-size: clamp(36px, 10vw, 48px);
  line-height: .88;
  letter-spacing: -.05em;
  text-shadow:
    0 1px 0 rgba(255,255,255,.82),
    0 4px 18px rgba(255,255,255,.34);
}

.result-summary-overlay .result-grid {
  width: min(100%, 388px);
  margin: 0;
  gap: 7px;
}

.result-summary-overlay .result-grid div {
  min-height: 52px;
  padding: 8px 10px;
  border: 0;
  border-left: 2px solid rgba(150,117,218,.78);
  background: rgba(246,242,250,.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.52),
    0 4px 16px rgba(45,32,61,.04);
  backdrop-filter: blur(6px) saturate(108%);
  -webkit-backdrop-filter: blur(6px) saturate(108%);
}

.result-summary-overlay .result-grid span {
  color: rgba(71,57,88,.48);
  font-size: 7px;
  letter-spacing: .13em;
}

.result-summary-overlay .result-grid strong {
  margin-top: 3px;
  color: #33273f;
  font-size: 17px;
}

.result-summary-overlay .result-cause {
  margin: 9px 0 0;
  color: rgba(48,38,59,.84);
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: .02em;
}

/* Ranking is the only actual card/panel in the finish screen. */
.result-card .result-leaderboard-panel {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 82px;
  z-index: 3;
  margin: 0;
  border: 1px solid rgba(255,255,255,.54);
  background: rgba(239,234,246,.86);
  color: #2e2537;
  box-shadow:
    0 14px 34px rgba(34,24,47,.16),
    inset 0 1px 0 rgba(255,255,255,.64);
  backdrop-filter: blur(12px) saturate(112%);
  -webkit-backdrop-filter: blur(12px) saturate(112%);
  pointer-events: auto;
}

.result-card .result-leaderboard-panel .leaderboard-head {
  min-height: 28px;
  padding: 0 10px;
  color: rgba(66,52,84,.58);
  border-bottom: 1px solid rgba(78,62,98,.12);
  background: rgba(225,218,237,.72);
  font-size: 8px;
}

.result-card .result-leaderboard-panel .leaderboard-head b {
  color: #33293d;
  font-size: 8px;
}

.result-card .result-leaderboard-panel .leaderboard-row {
  min-height: 24px;
  padding: 2px 10px;
  color: #30273a;
  border-bottom: 1px solid rgba(78,62,97,.08);
  background: rgba(251,249,252,.64);
}

.result-card .result-leaderboard-panel .leaderboard-row:nth-child(even) {
  background: rgba(236,231,243,.60);
}

.result-card .result-leaderboard-panel .my-rank {
  min-height: 29px;
  color: #30273a;
  border-top: 1px solid rgba(78,62,97,.11);
  background: rgba(221,214,233,.72);
}

.result-actions {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 8px;
  pointer-events: auto;
}

.result-card .result-actions button {
  min-height: 46px;
  margin: 0;
  border: 0;
  border-left: 5px solid var(--sr-violet);
  background: rgba(249,247,244,.92);
  color: #332a3d;
  box-shadow: 0 10px 24px rgba(39,28,53,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.result-card .result-actions .result-menu-button {
  border-left-color: var(--pp-green);
  background: rgba(235,244,239,.9);
}

/* Keep smaller screens readable without re-forming one giant result card. */
@media (max-height: 650px) {
  .result-summary-overlay {
    top: 20px;
  }

  .result-summary-overlay h2 {
    margin-bottom: 9px;
    font-size: 38px;
  }

  .result-summary-overlay .result-grid div {
    min-height: 46px;
    padding: 6px 9px;
  }

  .result-card .result-leaderboard-panel {
    bottom: 72px;
  }

  .result-actions {
    bottom: 14px;
  }
}


/* =========================================================
   SKIgame broadcast standings reference v1
   FIS-style flat broadcast ribbons: translucent, borderless,
   with a soft trailing fade instead of an opaque card.
   ========================================================= */

/* Compact TOP 5 result leaderboard */
.result-card .result-leaderboard-panel {
  left: 16px;
  right: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.result-card .result-leaderboard-panel .leaderboard-head {
  position: relative;
  min-height: 26px;
  padding: 0 44px 0 12px;
  border: 0;
  color: rgba(255,255,255,.84);
  background:
    linear-gradient(
      90deg,
      rgba(28,34,48,.90) 0%,
      rgba(45,49,66,.80) 72%,
      rgba(45,49,66,.34) 90%,
      rgba(45,49,66,0) 100%
    );
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
  box-shadow: none;
}

.result-card .result-leaderboard-panel .leaderboard-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(170,139,234,.92);
}

.result-card .result-leaderboard-panel .leaderboard-head b {
  color: rgba(255,255,255,.96);
}

.result-card .result-leaderboard-panel .leaderboard-list {
  display: grid;
  gap: 1px;
  margin-top: 1px;
}

.result-card .result-leaderboard-panel .leaderboard-row {
  grid-template-columns: 32px 22px minmax(0,1fr) 48px 52px;
  gap: 6px;
  min-height: 29px;
  padding: 2px 36px 2px 8px;
  border: 0;
  color: #1f2934;
  background:
    linear-gradient(
      90deg,
      rgba(249,250,252,.92) 0%,
      rgba(242,244,248,.86) 72%,
      rgba(235,239,245,.58) 88%,
      rgba(235,239,245,.15) 97%,
      rgba(235,239,245,0) 100%
    );
  box-shadow: none;
  text-shadow: 0 1px rgba(255,255,255,.56);
}

.result-card .result-leaderboard-panel .leaderboard-row:nth-child(even) {
  background:
    linear-gradient(
      90deg,
      rgba(230,234,241,.91) 0%,
      rgba(224,229,237,.84) 72%,
      rgba(218,225,234,.55) 88%,
      rgba(218,225,234,.14) 97%,
      rgba(218,225,234,0) 100%
    );
}

.result-card .result-leaderboard-panel .leaderboard-row:first-child {
  background:
    linear-gradient(
      90deg,
      rgba(230,235,244,.96) 0%,
      rgba(217,226,239,.90) 72%,
      rgba(210,221,236,.60) 88%,
      rgba(210,221,236,.15) 97%,
      rgba(210,221,236,0) 100%
    );
}

.result-card .result-leaderboard-panel .leaderboard-rank {
  text-align: right;
  color: #163b59;
  font: 950 17px/1 "Arial Narrow", "Roboto Condensed", ui-sans-serif, sans-serif;
  letter-spacing: -.04em;
  opacity: 1;
}

.result-card .result-leaderboard-panel .leaderboard-flag {
  width: 22px;
  min-width: 22px;
  height: 14px;
}

.result-card .result-leaderboard-panel .leaderboard-athlete {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.result-card .result-leaderboard-panel .leaderboard-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #202a34;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .01em;
}

.result-card .result-leaderboard-panel .leaderboard-country {
  flex: 0 0 auto;
  color: rgba(39,49,59,.54);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .03em;
}

.result-card .result-leaderboard-panel .leaderboard-gap {
  color: rgba(42,50,60,.56);
  font: italic 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.result-card .result-leaderboard-panel .leaderboard-time {
  color: #1d2731;
  font: 950 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.result-card .result-leaderboard-panel .leaderboard-row.is-me {
  background:
    linear-gradient(
      90deg,
      rgba(224,214,244,.96) 0%,
      rgba(224,214,244,.86) 72%,
      rgba(224,214,244,.52) 88%,
      rgba(224,214,244,.12) 97%,
      rgba(224,214,244,0) 100%
    );
  box-shadow: inset 4px 0 rgba(116,80,200,.88);
}

.result-card .result-leaderboard-panel .my-rank {
  min-height: 27px;
  margin-top: 2px;
  padding-right: 38px;
  border: 0;
  color: rgba(255,255,255,.90);
  background:
    linear-gradient(
      90deg,
      rgba(31,37,51,.88) 0%,
      rgba(42,46,61,.74) 72%,
      rgba(42,46,61,.28) 90%,
      rgba(42,46,61,0) 100%
    );
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
}

/* Full WORLD RANKING view: same flat broadcast language, no cylinder/card. */
.leaderboard-panel .classification-board {
  margin: 24px 4px 10px;
  padding: 4px 0 8px;
  -webkit-mask-image: none;
  mask-image: none;
}

.leaderboard-panel .classification-board::before {
  display: none;
}

.leaderboard-panel .classification-title {
  height: 25px;
  padding: 0 48px 0 12px;
  color: rgba(255,255,255,.94);
  background:
    linear-gradient(
      90deg,
      rgba(29,35,49,.90) 0%,
      rgba(43,49,65,.76) 72%,
      rgba(43,49,65,.28) 91%,
      rgba(43,49,65,0) 100%
    );
  text-shadow: 0 1px 2px rgba(0,0,0,.24);
}

.leaderboard-panel .classification-title span {
  color: rgba(255,255,255,.56);
}

.leaderboard-panel .classification-head {
  min-height: 18px;
  padding: 0 44px 0 10px;
  color: rgba(37,48,59,.58);
  background:
    linear-gradient(
      90deg,
      rgba(246,248,250,.84) 0%,
      rgba(239,242,246,.76) 76%,
      rgba(239,242,246,.18) 96%,
      rgba(239,242,246,0) 100%
    );
}

.leaderboard-panel .classification-list {
  display: grid;
  gap: 1px;
}

.leaderboard-panel .classification-row {
  min-height: 29px;
  padding: 2px 42px 2px 8px;
  border: 0;
  color: #1f2a34;
  background:
    linear-gradient(
      90deg,
      rgba(248,250,252,.91) 0%,
      rgba(240,243,247,.84) 74%,
      rgba(231,236,242,.52) 90%,
      rgba(231,236,242,.12) 98%,
      rgba(231,236,242,0) 100%
    );
  text-shadow: 0 1px rgba(255,255,255,.58);
}

.leaderboard-panel .classification-row:nth-child(even) {
  background:
    linear-gradient(
      90deg,
      rgba(226,231,238,.90) 0%,
      rgba(219,225,233,.82) 74%,
      rgba(211,220,230,.50) 90%,
      rgba(211,220,230,.11) 98%,
      rgba(211,220,230,0) 100%
    );
}

.leaderboard-panel .classification-row:first-child {
  color: #1f2a34;
  background:
    linear-gradient(
      90deg,
      rgba(221,228,239,.96) 0%,
      rgba(210,221,235,.88) 74%,
      rgba(202,216,232,.54) 90%,
      rgba(202,216,232,.12) 98%,
      rgba(202,216,232,0) 100%
    );
  box-shadow: inset 4px 0 rgba(116,80,200,.82);
  text-shadow: 0 1px rgba(255,255,255,.62);
}

.leaderboard-panel .classification-head,
.leaderboard-panel .classification-row {
  grid-template-columns: 34px minmax(0,1fr) 52px 48px;
  gap: 7px;
}

.leaderboard-panel .classification-rank {
  text-align: right;
  color: #163b59;
  font: 950 18px/1 "Arial Narrow", "Roboto Condensed", ui-sans-serif, sans-serif;
  letter-spacing: -.04em;
}

.leaderboard-panel .classification-athlete b {
  font-size: 9px;
  font-weight: 900;
}

.leaderboard-panel .classification-country {
  font-size: 7px;
  opacity: .52;
}

.leaderboard-panel .classification-time {
  color: #1d2731;
  font-size: 10px;
  font-weight: 950;
}

.leaderboard-panel .classification-gap {
  color: rgba(42,50,60,.56);
  font-size: 9px;
  font-style: italic;
  opacity: 1;
}


/* =========================================================
   SKIgame result header overlay stack v1
   Text-only result title + vertical CLOSE / LEADERBOARD / MY HISTORY controls
   ========================================================= */

.leaderboard-panel {
  overflow: hidden;
}

/* RESULT title: remove the pale card entirely and leave only typography. */
.leaderboard-panel .leaderboard-panel-head {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 132px;
  z-index: 8;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.leaderboard-panel .leaderboard-panel-head > div {
  min-width: 0;
}

.leaderboard-panel .leaderboard-panel-head small {
  margin: 0 0 4px;
  color: rgba(255,255,255,.72);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .16em;
  text-shadow: 0 1px 3px rgba(14,24,34,.38);
}

.leaderboard-panel .leaderboard-panel-head h2 {
  margin: 0;
  color: rgba(255,255,255,.97);
  font-size: 25px;
  line-height: .92;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -.04em;
  text-shadow:
    0 1px 2px rgba(15,26,36,.28),
    0 4px 14px rgba(15,26,36,.16);
}

/* CLOSE becomes the first item in the vertical control stack. */
.leaderboard-panel .leaderboard-panel-head .panel-close {
  position: absolute;
  top: -2px;
  right: -114px;
  width: 98px;
  min-height: 32px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.30);
  background: rgba(30,36,48,.42);
  color: rgba(255,255,255,.94);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .12em;
  box-shadow: 0 4px 14px rgba(14,24,34,.10);
  backdrop-filter: blur(9px) saturate(110%);
  -webkit-backdrop-filter: blur(9px) saturate(110%);
  pointer-events: auto;
}

/* Existing two tabs become the second/third items in the same visual stack. */
.leaderboard-panel .result-tabs {
  position: absolute;
  top: 54px;
  right: 16px;
  z-index: 9;
  width: 98px;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  background: transparent;
}

.leaderboard-panel .result-subtab {
  min-height: 43px;
  padding: 7px 9px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.26);
  border-bottom-color: rgba(255,255,255,.26);
  background: rgba(32,38,50,.38);
  color: rgba(255,255,255,.88);
  text-align: left;
  box-shadow: 0 4px 14px rgba(14,24,34,.08);
  backdrop-filter: blur(9px) saturate(108%);
  -webkit-backdrop-filter: blur(9px) saturate(108%);
}

.leaderboard-panel .result-subtab strong {
  font-size: 7px;
  line-height: 1.05;
  letter-spacing: .09em;
}

.leaderboard-panel .result-subtab small {
  margin: 0;
  color: rgba(255,255,255,.56);
  font-size: 5px;
  line-height: 1.05;
  letter-spacing: .09em;
  opacity: 1;
}

.leaderboard-panel .result-subtab.is-active {
  color: #fff;
  border-color: rgba(255,255,255,.34);
  border-left: 3px solid rgba(170,139,234,.96);
  border-bottom-color: rgba(255,255,255,.34);
  background: rgba(78,61,112,.56);
  box-shadow: 0 4px 16px rgba(50,37,76,.12);
}

.leaderboard-panel .result-subtab.is-active small {
  color: rgba(255,255,255,.76);
}

/* Give the mountain room to read between title and standings. */
.leaderboard-panel .classification-board,
.leaderboard-panel .history-board {
  margin-top: 126px;
}

/* Reduce any remaining top wash so the mountain stays visible. */
.leaderboard-panel::before {
  background:
    linear-gradient(
      180deg,
      rgba(226,235,241,.02) 0%,
      rgba(202,216,225,.01) 38%,
      rgba(31,48,62,.10) 100%
    );
}

.leaderboard-panel::after {
  box-shadow: none;
}

@media (max-height: 700px) {
  .leaderboard-panel .leaderboard-panel-head {
    top: 14px;
    left: 14px;
    right: 122px;
  }

  .leaderboard-panel .leaderboard-panel-head .panel-close {
    right: -106px;
    width: 92px;
    min-height: 30px;
  }

  .leaderboard-panel .result-tabs {
    top: 48px;
    right: 14px;
    width: 92px;
    gap: 5px;
  }

  .leaderboard-panel .result-subtab {
    min-height: 39px;
    padding: 6px 8px;
  }

  .leaderboard-panel .classification-board,
  .leaderboard-panel .history-board {
    margin-top: 114px;
  }
}


/* =========================================================
   SKIgame result standalone menu v1
   RESULT is a standalone app menu, not an in-game popup.
   ========================================================= */

#app.is-result-menu-open .game-shell,
#app.is-result-menu-open .prototype-note {
  display: none;
}

.result-menu-screen {
  position: relative;
  inset: auto;
  z-index: 1;
  width: 100%;
  min-height: 620px;
  aspect-ratio: 9 / 16;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: #8eabc3;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
}

.result-menu-screen.is-hidden {
  display: none;
}

/* The menu owns its entire screen, so remove every leftover window/frame cue. */
.result-menu-screen::before,
.result-menu-screen::after {
  border: 0;
  box-shadow: none;
}

.result-menu-screen .leaderboard-mountain {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 122%;
  height: 100%;
}

/* Keep the title and right-side controls floating over the independent menu. */
.result-menu-screen .leaderboard-panel-head {
  top: 18px;
  left: 18px;
  right: 132px;
}

.result-menu-screen .result-tabs {
  top: 54px;
  right: 16px;
}

/* Standings occupy the menu itself rather than an inset popup card. */
.result-menu-screen .classification-board,
.result-menu-screen .history-board {
  margin-top: 126px;
  margin-left: 4px;
  margin-right: 4px;
  padding-bottom: 10px;
}

@media (max-width: 390px) {
  .result-menu-screen {
    min-height: 560px;
  }
}


/* =========================================================
   SKIgame result readability + metric polish v2
   Clean data typography, blurred result background, lower result summary,
   and a tighter/aligned metric grid. Pixel styling stays in gameplay only.
   ========================================================= */

:root {
  --result-ui-font:
    Geist,
    "Segoe UI Variable",
    "Segoe UI",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    Arial,
    sans-serif;
  --result-num-font:
    Geist,
    "Segoe UI Variable",
    "Segoe UI",
    Arial,
    sans-serif;
}

/* ---------------------------------------------------------
   FINISH / DNF result overlay
   --------------------------------------------------------- */

.result-card {
  font-family: var(--result-ui-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* Blur the finished course behind the result graphics instead of placing
   another opaque card over it. */
.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(235,240,245,.08) 0%,
      rgba(235,240,245,.11) 44%,
      rgba(225,232,239,.17) 100%
    );
  backdrop-filter: blur(7px) saturate(92%);
  -webkit-backdrop-filter: blur(7px) saturate(92%);
}

.result-summary-overlay,
.result-card .result-leaderboard-panel,
.result-actions {
  z-index: 2;
}

/* Bring the judgement block down from the very top edge. */
.result-summary-overlay {
  top: 52px;
  left: 20px;
  right: 20px;
  font-family: var(--result-ui-font);
  text-shadow: 0 1px 10px rgba(255,255,255,.66);
}

.result-summary-overlay .result-lockup {
  font-family: var(--result-ui-font);
  color: rgba(55,53,66,.52);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .105em;
}

.result-summary-overlay .eyebrow {
  margin: 2px 0 6px;
  font-family: var(--result-ui-font);
  color: rgba(59,53,72,.62);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .025em;
}

.result-summary-overlay h2 {
  margin: 0 0 10px;
  font-family: var(--result-ui-font);
  color: #322640;
  font-size: clamp(34px, 9vw, 45px);
  font-weight: 900;
  line-height: .90;
  letter-spacing: -.045em;
}

/* Compact second-pass metric layout:
   TIME / GATES / LINE / TIMING share one row.
   MAX SPEED sits below at half-width rather than creating a third full row. */
.result-summary-overlay .result-grid {
  width: min(100%, 392px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 5px;
  margin: 0;
}

.result-summary-overlay .result-grid div {
  min-width: 0;
  min-height: 43px;
  padding: 6px 7px 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-left: 2px solid rgba(150,117,218,.72);
  background: rgba(246,243,250,.40);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.48),
    0 3px 12px rgba(38,31,51,.035);
  backdrop-filter: blur(8px) saturate(104%);
  -webkit-backdrop-filter: blur(8px) saturate(104%);
}

.result-summary-overlay .result-grid div:nth-child(5) {
  grid-column: 1 / span 2;
  max-width: none;
}

.result-summary-overlay .result-grid span {
  margin: 0;
  font-family: var(--result-ui-font);
  color: rgba(68,59,81,.47);
  font-size: 6px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: .085em;
  white-space: nowrap;
}

.result-summary-overlay .result-grid strong {
  margin: 4px 0 0;
  font-family: var(--result-num-font);
  color: #31283b;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -.025em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  white-space: nowrap;
}

.result-summary-overlay .result-cause {
  margin: 8px 0 0;
  font-family: var(--result-ui-font);
  color: rgba(42,38,52,.82);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: .005em;
}

/* Keep the compact leaderboard readable with the same clean data face. */
.result-card .result-leaderboard-panel,
.result-card .result-leaderboard-panel *,
.result-card .result-actions button {
  font-family: var(--result-ui-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.result-card .result-leaderboard-panel .leaderboard-rank,
.result-card .result-leaderboard-panel .leaderboard-time,
.result-card .result-leaderboard-panel .leaderboard-gap,
.result-card .my-rank-position,
.result-card .my-rank-gap,
.result-card .my-rank-time {
  font-family: var(--result-num-font);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.result-card .result-leaderboard-panel .leaderboard-rank {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.035em;
}

.result-card .result-leaderboard-panel .leaderboard-name {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.result-card .result-leaderboard-panel .leaderboard-country {
  font-size: 6px;
  font-weight: 650;
}

.result-card .result-leaderboard-panel .leaderboard-time {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.result-card .result-leaderboard-panel .leaderboard-gap {
  font-size: 8px;
  font-weight: 700;
  font-style: normal;
}

.result-card .result-leaderboard-panel {
  bottom: 84px;
}

.result-actions {
  bottom: 18px;
}

.result-card .result-actions button {
  min-height: 44px;
  font-weight: 850;
  letter-spacing: .035em;
}

.result-card .result-actions button span {
  font-size: 12px;
}

.result-card .result-actions button small {
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .07em;
}

/* The athlete's own result is the primary post-race readout. */
.result-card .result-leaderboard-panel .my-rank,
.result-card .result-leaderboard-panel .my-rank.is-outside-pb,
.result-card .result-leaderboard-panel .leaderboard-row.is-me {
  color: #fff;
  border: 0;
  background: var(--pp-green);
  box-shadow: inset 4px 0 rgba(255,255,255,.9), 0 5px 14px rgba(23,63,42,.22);
  text-shadow: 0 1px 2px rgba(9,36,23,.32);
}

.result-card .result-leaderboard-panel .my-rank-position,
.result-card .result-leaderboard-panel .my-rank-athlete,
.result-card .result-leaderboard-panel .my-rank-gap,
.result-card .result-leaderboard-panel .my-rank-time,
.result-card .result-leaderboard-panel .leaderboard-row.is-me .leaderboard-rank,
.result-card .result-leaderboard-panel .leaderboard-row.is-me .leaderboard-name,
.result-card .result-leaderboard-panel .leaderboard-row.is-me .leaderboard-country,
.result-card .result-leaderboard-panel .leaderboard-row.is-me .leaderboard-gap,
.result-card .result-leaderboard-panel .leaderboard-row.is-me .leaderboard-time,
.result-card .result-leaderboard-panel .leaderboard-row.is-me b {
  color: #fff;
  opacity: 1;
}

.result-card .result-leaderboard-panel .my-rank-time {
  font-size: 13px;
  font-weight: 950;
}

/* High-resolution in-race speed bug, aligned with the horizon. */
.race-speed {
  position: absolute;
  z-index: 5;
  top: 26.5%;
  right: 12px;
  min-width: 82px;
  padding: 6px 9px 5px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 5px;
  color: #fff;
  pointer-events: none;
  border: 1px solid rgba(205,188,244,.32);
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(116,80,200,.58), rgba(55,37,85,.30));
  box-shadow: 0 5px 18px rgba(33,21,52,.16), inset 0 1px rgba(255,255,255,.20);
  backdrop-filter: blur(10px) saturate(122%);
  -webkit-backdrop-filter: blur(10px) saturate(122%);
  text-shadow: 0 1px 4px rgba(22,12,40,.62);
}

.race-speed.is-hidden { display: none; }
.race-speed span {
  grid-column: 1 / 3;
  font: 800 6px/1 var(--result-ui-font, system-ui, sans-serif);
  letter-spacing: .16em;
  opacity: .72;
}
.race-speed strong {
  font: 950 22px/.9 var(--result-num-font, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.05em;
}
.race-speed small {
  padding-bottom: 1px;
  font: 800 6px/1 var(--result-ui-font, system-ui, sans-serif);
  letter-spacing: .08em;
  opacity: .72;
}

/* Result hierarchy: official time first, gates and speed as support metrics. */
.result-summary-overlay .result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.result-summary-overlay .result-grid .result-time-main {
  grid-column: 1 / -1;
  min-height: 66px;
  padding: 9px 12px 8px;
  border-left: 4px solid var(--pp-green);
  background: linear-gradient(90deg, rgba(239,247,242,.82), rgba(246,243,250,.52));
}

.result-summary-overlay .result-grid .result-time-main span {
  color: rgba(38,83,58,.66);
  font-size: 7px;
}

.result-summary-overlay .result-grid .result-time-main strong {
  margin-top: 5px;
  color: #26352d;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -.045em;
}

.result-summary-overlay .result-grid .result-metric-secondary {
  min-height: 39px;
  padding: 5px 8px;
}

.result-summary-overlay .result-grid .result-metric-secondary strong {
  font-size: 14px;
}

.result-summary-overlay .result-grid .result-metric-hidden {
  display: none;
}

/* MY HISTORY: one calm glass surface instead of alternating opaque strips. */
.result-menu-screen .history-board {
  padding: 0 10px 12px;
  background: rgba(232,239,243,.34);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 12px 34px rgba(28,43,55,.12), inset 0 1px rgba(255,255,255,.28);
  backdrop-filter: blur(12px) saturate(108%);
  -webkit-backdrop-filter: blur(12px) saturate(108%);
}

.result-menu-screen .history-board::before {
  display: none;
}

.result-menu-screen .history-board .classification-title {
  margin: 0 -10px;
  padding: 0 12px;
  background: rgba(36,42,55,.68);
}

.result-menu-screen .history-head {
  margin: 0 -10px;
  padding: 0 12px;
  color: rgba(38,48,57,.62);
  background: rgba(248,250,251,.28);
  border-bottom: 1px solid rgba(255,255,255,.30);
}

.result-menu-screen .history-list {
  background: rgba(244,248,250,.16);
}

.result-menu-screen .history-row,
.result-menu-screen .history-row:nth-child(even) {
  color: #27343c;
  background: transparent;
  border-top: 1px solid rgba(74,88,98,.13);
  text-shadow: 0 1px rgba(255,255,255,.44);
}

.result-menu-screen .history-row:first-child {
  border-top: 0;
}

.result-menu-screen .history-row.is-best {
  background: rgba(47,107,73,.11);
  box-shadow: inset 3px 0 var(--pp-green);
}

.result-menu-screen .history-row.is-dnf {
  box-shadow: inset 3px 0 rgba(116,80,200,.72);
}

.result-menu-screen .history-row.is-dnf .history-result {
  color: var(--sr-violet);
}

.result-menu-screen .history-rank {
  color: #29343a;
  opacity: .9;
}

/* Personal best placement in the full WORLD RANKING. */
.result-menu-screen .classification-row.is-me,
.result-menu-screen .classification-row.is-me:first-child,
.result-menu-screen .classification-row.is-pb-outside {
  color: #fff;
  background: rgba(47,107,73,.88);
  box-shadow: inset 4px 0 rgba(255,255,255,.9), 0 5px 16px rgba(23,63,42,.16);
  text-shadow: 0 1px 2px rgba(9,36,23,.34);
}

.result-menu-screen .classification-row.is-me .classification-country,
.result-menu-screen .classification-row.is-me .classification-gap,
.result-menu-screen .classification-row.is-pb-outside .classification-country,
.result-menu-screen .classification-row.is-pb-outside .classification-gap {
  color: rgba(255,255,255,.78);
  opacity: 1;
}

.result-menu-screen .classification-pb-spacer {
  height: 30px;
  border-top: 1px solid rgba(255,255,255,.20);
  background: transparent;
}

/* ---------------------------------------------------------
   Standalone RESULT menu
   --------------------------------------------------------- */

.result-menu-screen,
.result-menu-screen button,
.result-menu-screen .classification-board,
.result-menu-screen .history-board {
  font-family: var(--result-ui-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* Keep the moving RESULT panorama unblurred. The foreground table
   supplies its own row contrast; no full-screen frosted veil is needed. */
.result-menu-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.result-menu-screen .leaderboard-panel-head,
.result-menu-screen .result-tabs,
.result-menu-screen .classification-title,
.result-menu-screen .classification-head,
.result-menu-screen .classification-row,
.result-menu-screen .history-head,
.result-menu-screen .history-row {
  font-family: var(--result-ui-font);
}

/* RESULT title/menu controls should look like UI, not game pixels. */
.result-menu-screen .leaderboard-panel-head small {
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .10em;
}

.result-menu-screen .leaderboard-panel-head h2 {
  font-family: var(--result-ui-font);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -.035em;
}

.result-menu-screen .panel-close,
.result-menu-screen .result-subtab {
  font-family: var(--result-ui-font);
}

.result-menu-screen .result-subtab strong {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .055em;
}

.result-menu-screen .result-subtab small {
  font-size: 5px;
  font-weight: 650;
  letter-spacing: .06em;
}

.result-menu-screen .classification-title strong,
.result-menu-screen .classification-title span,
.result-menu-screen .classification-head {
  font-family: var(--result-ui-font);
}

.result-menu-screen .classification-title strong {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
}

.result-menu-screen .classification-title span {
  font-size: 6px;
  font-weight: 650;
  letter-spacing: .06em;
}

.result-menu-screen .classification-head,
.result-menu-screen .history-head {
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .055em;
}

.result-menu-screen .classification-rank,
.result-menu-screen .classification-time,
.result-menu-screen .classification-gap,
.result-menu-screen .history-run,
.result-menu-screen .history-time,
.result-menu-screen .history-score {
  font-family: var(--result-num-font);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.result-menu-screen .classification-rank {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.035em;
}

.result-menu-screen .classification-athlete b {
  font-family: var(--result-ui-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.result-menu-screen .classification-country {
  font-family: var(--result-ui-font);
  font-size: 6px;
  font-weight: 650;
  letter-spacing: .01em;
}

.result-menu-screen .classification-time {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: -.015em;
}

.result-menu-screen .classification-gap {
  font-size: 8px;
  font-weight: 650;
  font-style: normal;
}

.result-menu-screen .history-date {
  font-family: var(--result-ui-font);
  font-size: 7px;
  font-weight: 650;
}

@media (max-height: 700px) {
  .result-summary-overlay {
    top: 46px;
  }

  .result-summary-overlay h2 {
    margin-bottom: 8px;
    font-size: 36px;
  }

  .result-summary-overlay .result-grid div {
    min-height: 39px;
    padding: 5px 6px;
  }

  .result-summary-overlay .result-grid strong {
    font-size: 14px;
  }

  .result-card .result-leaderboard-panel {
    bottom: 76px;
  }

  .result-actions {
    bottom: 12px;
  }
}


/* =========================================================
   SKIgame result placement v3
   Keep the personal result block in the visual center, directly
   above the compact TOP 5 leaderboard instead of at the top edge.
   ========================================================= */

.result-card .result-summary-overlay {
  top: auto;
  bottom: 298px;
  left: 20px;
  right: 20px;
}

@media (max-height: 700px) {
  .result-card .result-summary-overlay {
    top: auto;
    bottom: 288px;
  }
}


/* =========================================================
   SKIgame Final Schuss fever strip v1
   A short, readable finish-sprint cue: crouch + alternating taps.
   ========================================================= */
.final-schuss-hud {
  position: absolute;
  z-index: 5;
  top: 27.5%;
  left: 50%;
  width: min(190px, calc(100% - 44px));
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 14px 7px;
  color: #fff;
  text-align: center;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(116,80,200,0), rgba(116,80,200,.82) 20%, rgba(47,107,73,.82) 80%, rgba(47,107,73,0));
  filter: drop-shadow(0 4px 14px rgba(27,20,42,.22));
  text-shadow: 0 1px 5px rgba(25,16,46,.55);
}
.final-schuss-hud.is-hidden { display: none; }
.final-schuss-hud > span {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .18em;
  opacity: .88;
}
.final-schuss-hud > strong {
  font: 950 20px/1 var(--result-num-font, Geist, "Segoe UI", sans-serif);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}
.final-schuss-hud > small {
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .09em;
  opacity: .78;
}
.final-schuss-hud.is-hit {
  animation: finalSchussHit .16s ease-out;
}
@keyframes finalSchussHit {
  0% { transform: translateX(-50%) scale(.96); filter: brightness(1.35) drop-shadow(0 4px 14px rgba(27,20,42,.22)); }
  100% { transform: translateX(-50%) scale(1); filter: brightness(1) drop-shadow(0 4px 14px rgba(27,20,42,.22)); }
}


/* =========================================================
   SKIgame live TRY + rewarded promotion v1
   ========================================================= */
.try-strip {
  display: grid;
  grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr);
  gap: 8px;
  margin: 10px 0 8px;
}
.try-balance,
.try-ad-button {
  min-height: 54px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(24,31,35,.42);
  backdrop-filter: blur(10px);
}
.try-balance {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "label value"
    "status status";
  align-items: center;
  gap: 1px 8px;
  padding: 8px 10px 7px;
}
.try-balance small {
  grid-area: label;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .13em;
  color: rgba(255,255,255,.64);
}
.try-balance strong {
  grid-area: value;
  justify-self: end;
  font: 950 22px/1 ui-monospace, monospace;
  color: #fff;
}
.try-balance span {
  grid-area: status;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .04em;
  color: rgba(255,255,255,.68);
}
.try-ad-button {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  padding: 8px 12px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(120deg, rgba(47,107,73,.90), rgba(116,80,200,.78));
}
.try-ad-button span {
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .045em;
}
.try-ad-button small {
  font-size: 7px;
  font-weight: 800;
  color: rgba(255,255,255,.74);
}
.try-ad-button:disabled {
  opacity: .42;
  cursor: default;
}
#startButton:disabled {
  opacity: .42;
  cursor: not-allowed;
}


/* =========================================================
   SKIgame start cinematic v1
   ========================================================= */
.game-shell .gauge,
.game-shell .boost-gauge,
.game-shell .touch-zone,
.game-shell .race-tabs,
.game-shell .race-timing,
.game-shell .final-schuss-hud {
  transition: opacity 220ms ease;
}
.game-shell.is-start-cinematic .gauge,
.game-shell.is-start-cinematic .boost-gauge,
.game-shell.is-start-cinematic:not(.is-start-input) .touch-zone,
.game-shell.is-start-cinematic .race-tabs,
.game-shell.is-start-cinematic .race-timing,
.game-shell.is-start-cinematic .race-speed,
.game-shell.is-start-cinematic:not(.is-start-input) .final-schuss-hud {
  opacity: 0 !important;
  pointer-events: none !important;
}
.game-shell.is-start-cinematic .hud {
  background: linear-gradient(180deg,rgba(8,16,20,.30),rgba(8,16,20,0));
}
.game-shell.is-start-cinematic .hud .hud-right {
  opacity: .22;
}
.game-shell.is-start-cinematic #status {
  font-size: 18px;
  letter-spacing: .08em;
}

/* Device-resolution broadcast lower third, independent of the course pixels. */
.start-intro {
  position:absolute;
  z-index:5;
  left:5%;
  right:5%;
  bottom:12%;
  color:#fff;
  pointer-events:none;
  font-variant-numeric:tabular-nums;
  filter:drop-shadow(0 3px 8px rgba(10,23,29,.24));
}
.start-intro[hidden] { display:none; }
.start-intro-caption, .start-intro-detail {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  font-size:9px;
  letter-spacing:.07em;
}
.start-intro-caption { background:linear-gradient(90deg,rgba(18,61,43,.92),rgba(18,61,43,.32)); }
.start-intro-caption span:first-child { font-weight:900; }
.start-intro-athlete {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:43px;
  padding-left:11px;
  border-left:3px solid var(--pp-green);
  color:#182c38;
  background:linear-gradient(90deg,rgba(255,255,255,.98),rgba(235,242,248,.91) 85%,rgba(235,242,248,.65));
}
.start-intro-athlete strong { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:clamp(15px,4.4vw,21px); font-weight:900; }
.start-intro-athlete b { display:grid; place-items:center; align-self:stretch; min-width:48px; background:var(--sr-purple); color:white; font-size:26px; }
.start-intro-detail { margin-left:22%; color:#193d30; background:linear-gradient(90deg,rgba(244,249,247,.55),rgba(244,249,247,.95)); }
.start-intro-detail strong { font-size:12px; }
@media (prefers-reduced-motion: reduce) {
  .game-shell.is-start-cinematic .touch-zone,
  .game-shell.is-start-cinematic .boost-gauge { transition:none; }
}


/* Athlete access: signup before Google auth, full-size BIB after verification. */
.profile-register {display:grid;justify-items:center;gap:10px;text-align:center;padding:34px 5px 22px;}
.profile-register.is-hidden,.profile-registered.is-hidden,.profile-form.is-hidden {display:none;}
.profile-register-icon {width:56px;height:56px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.10);color:#fff;font-size:30px;}
.profile-register h3 {font-size:24px;letter-spacing:-.03em;margin:4px 0 0;}
.profile-register p {margin:0;color:rgba(255,255,255,.76);font-size:12px;line-height:1.6;}
.profile-register small {color:rgba(255,255,255,.55);font-size:10px;letter-spacing:.025em;}
.profile-google-button {width:100%;min-height:52px;display:flex;align-items:center;justify-content:center;margin:12px 0 2px;}
.profile-google-pending {width:100%;min-height:48px;background:#fff;color:#172a23;border:1px solid #dedede;font-size:13px;font-weight:800;}
.profile-google-pending:disabled {opacity:.65;cursor:not-allowed;}
.profile-register .profile-auth-message {min-height:18px;color:#f2d7a0;font-size:11px;}
.profile-text-action {background:transparent;color:rgba(255,255,255,.72);border:0;border-bottom:1px solid rgba(255,255,255,.35);cursor:pointer;font-size:11px;padding:8px 3px;}
.profile-registered {display:grid;justify-items:center;align-content:start;gap:10px;padding:25px 0 8px;}
.profile-card-eyebrow {font-size:9px;letter-spacing:.2em;color:#b9d4c4;font-weight:900;}
.profile-bib-hero {width:100%;padding:26px 12px;display:flex;justify-content:center;background:linear-gradient(145deg,#2a3849,#101d26);border-radius:6px;box-shadow:inset 0 1px rgba(255,255,255,.12);}
.profile-bib-card {width:min(76%,245px);aspect-ratio: .92;display:flex;align-items:center;flex-direction:column;background:#fff;border:6px solid #7450c8;border-radius:9px;padding:12px;color:#162635;box-shadow:0 18px 28px rgba(0,0,0,.32);}
.profile-bib-brand {width:100%;background:#7450c8;color:#fff;text-align:center;font-size:clamp(11px,3vw,15px);font-weight:900;padding:7px 3px;}
.profile-bib-number {margin:auto 0;font-size:clamp(44px,14vw,72px);font-weight:950;letter-spacing:-.055em;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;}
.profile-bib-subbrand {font-family:Georgia,serif;font-weight:800;font-size:14px;margin:0 0 8px;}
.profile-athlete-name {font-size:24px;letter-spacing:.02em;margin-top:8px;}
.profile-athlete-country {font-size:10px;color:#b5c7bd;letter-spacing:.14em;font-weight:900;}
.profile-card-actions {width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px;}
.profile-card-actions button {padding:14px 6px;background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.25);font-size:11px;font-weight:900;cursor:pointer;}
.profile-card-actions button:first-child {background:#fff;color:#173b2d;}
.profile-form {margin-top:18px;}
.profile-form .profile-text-action {justify-self:center;}


/* Compact start lobby: let the slope and start hut remain visible. */
.game-shell .start-card {
  inset: auto 14px 14px;
  padding: 16px 18px 13px;
  display: grid;
  gap: 0;
}
/* The compact start layout must not override the is-hidden state used when
   START RUN launches the countdown. Specificity beats display:grid above. */
.game-shell .start-card.is-hidden {
  display: none;
}
.start-card .event-lockup {font-size:8px;line-height:1.2;}
.start-card .eyebrow {margin:5px 0 0;font-size:11px;letter-spacing:.15em;line-height:1.25;}
.start-card h1 {margin:12px 0 7px;font-size:clamp(34px,9vw,44px);line-height:.87;}
.start-card .title-by {margin:0 0 15px;font-size:10px;}
.start-card .start-meta {
  display:flex;align-items:center;gap:0;margin:0 0 12px;
  border-block:1px solid rgba(81,66,98,.2);
}
.start-card .start-meta span {flex:1;min-width:0;padding:10px 8px;display:flex;align-items:center;}
.start-card .start-meta span:first-child {padding-left:0;}
.start-card .start-meta span:last-child {flex:1.2;}
.start-card .start-meta b {font-size:10px;letter-spacing:.025em;white-space:normal;}
.start-card .start-tip {margin:0 0 14px;font-size:12px;line-height:1.4;}
.start-utility {display:grid;gap:8px;}
.start-card .try-strip {
  display:flex;align-items:stretch;gap:8px;margin:0;
}
.start-card .try-balance {
  min-width:0;flex:1;display:flex;justify-content:space-between;align-items:center;gap:8px;
  min-height:45px;padding:9px 13px;border-radius:8px;
  background:rgba(69,55,84,.14);border:1px solid rgba(89,71,114,.15);
  backdrop-filter:none;box-shadow:none;
}
.start-card .try-balance > span {
  overflow:visible;white-space:normal;font-size:11px;font-weight:900;
  color:#443954;letter-spacing:.1em;
}
.start-card .try-balance strong {font:900 24px/1 ui-monospace,monospace;color:#342945;}
.start-card .try-ad-button {
  min-width:0;flex:1.1;min-height:45px;display:flex;align-items:center;justify-content:space-between;
  gap:8px;padding:0 12px;border-radius:8px;border:1px solid rgba(116,80,200,.35);
  background:rgba(255,255,255,.78);box-shadow:none;color:#46315e;
}
.start-card .try-ad-button > span {font-size:12px;letter-spacing:.035em;white-space:nowrap;}
.start-card .try-ad-button > small {font-size:9px;letter-spacing:0;white-space:nowrap;opacity:.75;color:#6c5880;}
.start-card .start-try-status {
  min-height:0;margin:0;color:#705b84;font-size:10px;line-height:1.25;
}
.start-card .start-try-status:empty {display:none;}
.start-card .start-actions {
  display:grid;grid-template-columns:minmax(0,1fr);gap:8px;
}
.start-card #startButton {
  width:100%;min-width:0;min-height:53px;display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:0 14px;border:0;border-left:5px solid #7450c8;
  background:#fff;color:#30263c;box-shadow:0 5px 16px rgba(48,33,67,.12);
  font-size:16px;letter-spacing:.035em;
}
.start-card #startButton small {font-size:9px;letter-spacing:0;white-space:nowrap;opacity:.65;}
.start-card #gyroButton {
  width:100%;min-width:0;min-height:53px;display:grid;place-items:center;text-align:center;
  padding:0 6px;border:1px solid rgba(116,80,200,.3);border-radius:0;
  background:rgba(255,255,255,.42);box-shadow:none;color:#4d3c63;
  font-size:11px;letter-spacing:.015em;white-space:nowrap;
}
.start-card #gyroButton.is-on {background:rgba(116,80,200,.2);border-color:#7450c8;}
.start-card #gyroButton:disabled {opacity:.5;}
.start-help {
  margin-top:12px;border-top:1px solid rgba(81,66,98,.17);
  color:#574866;font-size:10px;
}
.start-help summary {
  cursor:pointer;list-style:none;padding:10px 0 0;text-align:center;
  font-size:10px;font-weight:800;letter-spacing:.075em;
}
.start-help summary::-webkit-details-marker {display:none;}
.start-help summary::after {content:'  +';color:#7450c8;}
.start-help[open] summary::after {content:'  −';}
.start-card .start-help p {
  margin:7px 0 2px;font-size:10px;line-height:1.6;color:#5c4c6c;text-align:center;
}
@media(max-width:390px) {
  .game-shell .start-card {padding:13px 14px 11px;inset:auto 11px 11px;}
  .start-card h1 {font-size:35px;}
  .start-card .start-meta b {font-size:9px;}
  .start-card #startButton {font-size:14px;padding:0 9px;}
  .start-card .try-ad-button {padding:0 9px;}
}

/* iOS gesture isolation.
   Allow vertical menu scrolling, but never allow pinch-zoom inside the game shell.
   Race surfaces below still override this to touch-action:none. */
.game-shell { touch-action: pan-y; }
.game-shell #game,
.game-shell #skierModel,
.game-shell .touch-zone,
.game-shell .gauge,
.game-shell .boost-gauge,
.game-shell .hud,
.game-shell .race-timing,
.game-shell .race-speed,
.game-shell .start-intro,
.game-shell .final-schuss-hud {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.game-shell .menu-panel,
.game-shell .result-menu-screen {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.game-shell .menu-panel input,
.game-shell .menu-panel textarea,
.game-shell .menu-panel select {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: manipulation;
}
.game-shell .start-card button,
.game-shell .result-card button,
.game-shell .race-tab,
.game-shell .menu-panel button,
.game-shell .result-menu-screen button,
.game-shell .start-help summary {
  touch-action: manipulation;
}

/* Result scene: 10 percentage points less opaque, without blurring the
   panning mountain. Text stays fully opaque for readable timings. */
/* RESULT floats as text over the photo, never as a pale header box.
   Keep CLOSE and the two view tabs in their existing right-hand stack. */
.result-menu-screen.leaderboard-panel .leaderboard-panel-head {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.result-menu-screen.leaderboard-panel .leaderboard-panel-head h2,
.result-menu-screen.leaderboard-panel .leaderboard-panel-head small {
  text-shadow: 0 1px 4px rgba(8,20,34,.64);
}
.result-menu-screen.leaderboard-panel .result-subtab {
  background:rgba(231,235,238,.53);
}
.result-menu-screen.leaderboard-panel .result-subtab.is-active {
  background:rgba(246,247,248,.76);
}
.result-menu-screen.leaderboard-panel .history-board::before {
  background:rgba(238,240,242,.68);
}
.result-menu-screen.leaderboard-panel .history-head {
  background:rgba(246,247,248,.72);
}
.result-menu-screen.leaderboard-panel .history-row {
  background:rgba(246,247,248,.66);
}
.result-menu-screen.leaderboard-panel .history-row:nth-child(even) {
  background:rgba(232,235,238,.66);
}
.result-menu-screen.leaderboard-panel .leaderboard-panel-head,
.result-menu-screen.leaderboard-panel .panel-close,
.result-menu-screen.leaderboard-panel .result-subtab,
.result-menu-screen.leaderboard-panel .classification-board::before,
.result-menu-screen.leaderboard-panel .history-board,
.result-menu-screen.leaderboard-panel .history-board::before {
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
/* Show the existing photograph without added softness or colour filtering. */
.result-menu-screen.leaderboard-panel .leaderboard-mountain {
  filter: none;
}


/* Game mountain viewport -- shared leaderboard asset.
   CSS resolves this file relative to styles.css, just like the proven
   leaderboard background; rewritten mobile routes cannot misresolve it.
   The source picture is fixed. The viewing crop tracks gradually sideways
   during descent; the crop freezes at the last gate before a venue-focused zoom.
   Keep this behind the alpha-enabled game canvas so flags/terrain remain in
   front of the photograph, and avoid a second JS image request on iOS. */
.game-shell {
  isolation: isolate;
  --mountain-descent-position: 0%;
  --mountain-frame-x: 46%;
  --mountain-finish-zoom: 1;
  --mountain-align-x: 0px;
  --mountain-align-y: 0px;
  --mountain-hires-size: 235%;
  --mountain-hires-x: 0px;
  --mountain-hires-y: 0px;
}
.game-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 27.1875%; /* SCENE_HORIZON_Y (174) / logical canvas height (640) */
  pointer-events: none;
  background-color: #b9cbd5;
  background-image: url('./assets/images/mountain-pan-venue-20261002.png');
  background-repeat: no-repeat;
  background-size: auto 235%;
  background-position: var(--mountain-frame-x) var(--mountain-descent-position);
  image-rendering: auto;
  /* Only used if metadata cannot be read. The finish point is aligned
     before this fallback zoom, which pivots around the photo's bottom centre. */
  transform-origin: 50% 100%;
  transform: translate3d(var(--mountain-align-x), var(--mountain-align-y), 0)
    scale(var(--mountain-finish-zoom));
  will-change: background-position, transform;
}
/* Once the original bitmap's dimensions are known, resize the BACKGROUND
   itself rather than enlarging an already rasterized layer. Computed pixel
   offsets pin the finish arch's ground point to the bottom centre throughout
   the two-stage 1x -> 2x -> 7.5x zoom. It resamples the original pixels on iOS. */
.game-shell.has-hires-mountain::before {
  transform: none;
  background-size: auto var(--mountain-hires-size);
  background-position: var(--mountain-hires-x) var(--mountain-hires-y);
  will-change: background-position;
}
@media (prefers-reduced-motion: reduce) {
  .game-shell::before { transform: none; }
}

/* MOUNTAIN PREVIEW -- opt-in (?preview=mountain), never visible in a race.
   The normal game uses the very same ::before crop and zoom rules; this mode
   simply removes the foreground so the actual finish camera can be inspected. */
.game-shell.is-mountain-preview #skierModel,
.game-shell.is-mountain-preview .start-card,
.game-shell.is-mountain-preview .start-intro,
.game-shell.is-mountain-preview .broadcast-bug,
.game-shell.is-mountain-preview .race-tabs,
.game-shell.is-mountain-preview .hud,
.game-shell.is-mountain-preview .touch-zone,
.game-shell.is-mountain-preview .gauge,
.game-shell.is-mountain-preview .boost-gauge,
.game-shell.is-mountain-preview .race-timing,
.game-shell.is-mountain-preview .race-speed,
.game-shell.is-mountain-preview .final-schuss-hud,
.game-shell.is-mountain-preview .finish-overlay {
  display: none !important;
}
.game-shell.is-mountain-preview #game {
  pointer-events: none;
}
.mountain-preview-controls {
  position: absolute;
  z-index: 16;
  top: calc(27.1875% + 16px);
  left: 12px;
  right: 12px;
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: calc(100% - 27.1875% - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  background: rgba(15,25,37,.94);
  color: #f5f7fa;
  box-shadow: 0 16px 44px rgba(12,24,36,.25);
  font: 700 12px/1.4 system-ui, -apple-system, sans-serif;
  touch-action: pan-y;
}
.mountain-preview-heading { display: grid; gap: 3px; }
.mountain-preview-heading strong { font-size: 15px; letter-spacing: .08em; }
.mountain-preview-heading small { color: rgba(245,247,250,.72); font-size: 11px; }
.mountain-preview-presets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.mountain-preview-presets button {
  min-height: 38px;
  padding: 6px 3px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 6px;
  color: #f5f7fa;
  background: rgba(255,255,255,.09);
  font: inherit;
  cursor: pointer;
}
.mountain-preview-presets button.is-active {
  border-color: #a88bed;
  background: #7450c8;
}
.mountain-preview-controls label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mountain-preview-controls input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #a88bed;
  touch-action: none;
}
.mountain-preview-readout {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(245,247,250,.8);
  font-variant-numeric: tabular-nums;
}
.mountain-preview-readout b { color: #fff; }
.mountain-preview-exit {
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.15);
  color: #d9cbff;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
}

.mountain-preview-reset {
  min-height: 30px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  background: rgba(245,247,250,.12);
  color: #f5f7fa;
  font: inherit;
  cursor: pointer;
}
.mountain-preview-reset.is-active {
  border-color: #ff6262;
  background: #8b2727;
}
#mountainPreviewPickHint {
  color: rgba(245,247,250,.70);
  font-size: 10px;
  line-height: 1.4;
}
/* The aiming marker is the bottom-centre of the real skyline, not the middle
   of the full 640px canvas. The user taps the red gate's floor at 1x to
   calibrate that image point for both preview and regular runs. */
.game-shell.is-mountain-preview::after {
  background:
    radial-gradient(circle at 50% 27.1875%,
      transparent 0 4px, rgba(255,70,70,.94) 4.5px 6px, transparent 6.5px),
    linear-gradient(180deg, rgba(18,61,43,.08), transparent 22%);
  box-shadow: none;
}
.game-shell.is-picking-mountain-venue::after {
  background:
    radial-gradient(circle at 50% 27.1875%,
      transparent 0 5px, #ff4848 6px 8px, transparent 8.5px),
    linear-gradient(180deg, rgba(18,61,43,.08), transparent 22%);
}

/* === HD VISUAL RESTORE · 2026-09-29 ===
   HUD layout and positions restored to the pre-pixel version.
   Keep the world, mountain and 3D athlete smoothly rendered. */
#game,
.skier-model,
.game-shell::before { image-rendering:auto; }
.game-shell::before { filter:saturate(.92) contrast(1.04); }


/* =========================================================
   Mobile immersive shell
   Installed PWA: no browser chrome.
   Fullscreen API: hide remaining browser navigation where supported.
   Keep the authored 9:16 game geometry unchanged.
   ========================================================= */
html.webapp-standalone,
html.webapp-standalone body,
html.immersive-fullscreen,
html.immersive-fullscreen body,
html:fullscreen,
html:fullscreen body {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #09100c;
}

html.webapp-standalone #app,
html.immersive-fullscreen #app,
html:fullscreen #app {
  padding-bottom: 0;
}

html.webapp-standalone .prototype-note,
html.immersive-fullscreen .prototype-note,
html:fullscreen .prototype-note {
  display: none;
}

@supports (height: 100dvh) {
  html.webapp-standalone body,
  html.immersive-fullscreen body,
  html:fullscreen body {
    min-height: 100dvh;
  }
}

/* Mobile runtime follows the actual visible viewport height.
   Do not rely only on display-mode/fullscreen detection: some mobile browsers
   can hide all chrome without reporting either state, which otherwise leaves
   the old 9:16 shell and exposes a black strip below it. */
html.mobile-web-runtime,
html.mobile-web-runtime body,
html.webapp-standalone,
html.webapp-standalone body,
html.immersive-fullscreen,
html.immersive-fullscreen body,
html:fullscreen,
html:fullscreen body {
  height: var(--app-viewport-height, 100vh);
  min-height: var(--app-viewport-height, 100vh);
}

html.mobile-web-runtime #app,
html.webapp-standalone #app,
html.immersive-fullscreen #app,
html:fullscreen #app {
  height: var(--app-viewport-height, 100vh);
  min-height: var(--app-viewport-height, 100vh);
  overflow: hidden;
}

html.mobile-web-runtime .game-shell,
html.webapp-standalone .game-shell,
html.immersive-fullscreen .game-shell,
html:fullscreen .game-shell,
html.mobile-web-runtime .result-menu-screen,
html.webapp-standalone .result-menu-screen,
html.immersive-fullscreen .result-menu-screen,
html:fullscreen .result-menu-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

@supports (height: 100dvh) {
  html.mobile-web-runtime,
  html.mobile-web-runtime body,
  html.mobile-web-runtime #app,
  html.webapp-standalone,
  html.webapp-standalone body,
  html.webapp-standalone #app,
  html.immersive-fullscreen,
  html.immersive-fullscreen body,
  html.immersive-fullscreen #app,
  html:fullscreen,
  html:fullscreen body,
  html:fullscreen #app {
    height: var(--app-viewport-height, 100dvh);
    min-height: var(--app-viewport-height, 100dvh);
  }
}

/* CSS-only safety net: if a cached/blocked script fails to add the runtime
   class, a portrait touch device still fills the visible screen instead of
   falling back to the legacy 9:16 shell and exposing a black footer. */
@media (pointer: coarse) and (orientation: portrait) and (max-width: 600px) {
  html,
  body,
  #app {
    height: var(--app-viewport-height, 100dvh);
    min-height: var(--app-viewport-height, 100dvh);
    overflow: hidden;
  }

  #app {
    padding-bottom: 0;
  }

  .game-shell,
  .result-menu-screen {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .prototype-note {
    display: none;
  }
}


/* =========================================================
   Game-only in-app browser gate
   PRESSPOINT homepage can stay inside Kakao/Instagram; the race cannot.
   ========================================================= */
html.inapp-browser-blocked,
html.inapp-browser-blocked body {
  margin:0;
  width:100%;
  min-height:100%;
  overflow:hidden;
  background:#09100c;
  color:#f2f1e8;
}
.inapp-browser-gate {
  width:100%;
  min-height:100vh;
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:
    max(24px,env(safe-area-inset-top))
    max(20px,env(safe-area-inset-right))
    max(24px,env(safe-area-inset-bottom))
    max(20px,env(safe-area-inset-left));
  background:
    radial-gradient(circle at 20% 0%,rgba(47,107,73,.34),transparent 38%),
    radial-gradient(circle at 90% 92%,rgba(116,80,200,.25),transparent 36%),
    #09100c;
}
.inapp-browser-card {
  width:min(100%,390px);
  padding:28px 22px 24px;
  border:1px solid rgba(255,255,255,.18);
  border-top:4px solid #7450c8;
  background:rgba(15,25,21,.92);
  box-shadow:0 28px 80px rgba(0,0,0,.42);
}
.inapp-kicker {
  margin:0 0 12px;
  color:#9acbae;
  font-size:10px;
  font-weight:900;
  letter-spacing:.18em;
}
.inapp-browser-card h1 {
  margin:0 0 16px;
  color:#fff;
  font-size:clamp(28px,8vw,38px);
  line-height:1.02;
  letter-spacing:-.04em;
}
.inapp-copy {
  margin:0 0 20px;
  color:rgba(242,241,232,.78);
  font-size:13px;
  line-height:1.65;
}
.inapp-copy strong { color:#fff; }
.inapp-actions {
  display:grid;
  gap:9px;
}
.inapp-actions button {
  width:100%;
  min-height:52px;
  border:0;
  padding:0 14px;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}
.inapp-primary {
  background:#f2f1e8;
  color:#123d2b;
}
.inapp-secondary {
  border:1px solid rgba(255,255,255,.25)!important;
  background:rgba(255,255,255,.07);
  color:#fff;
}
.inapp-help {
  margin:14px 0 18px;
  color:rgba(242,241,232,.62);
  font-size:11px;
  line-height:1.55;
}
.inapp-browser-card > small {
  display:block;
  color:rgba(242,241,232,.42);
  font-size:8px;
  letter-spacing:.13em;
}


/* =========================================================
   Optional PWA install help
   Never auto-opens; the opening screen only shows a quiet text action.
   ========================================================= */
.pwa-help-trigger {
  display:block;
  margin:8px auto 0;
  padding:3px 2px;
  border:0;
  border-bottom:1px solid rgba(76,60,93,.28);
  background:transparent;
  color:rgba(67,53,82,.66);
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
  cursor:pointer;
}
.pwa-help-trigger[hidden] { display:none!important; }

.pwa-install-sheet {
  position:absolute;
  z-index:30;
  inset:0;
  display:grid;
  place-items:end center;
  padding:
    max(20px,env(safe-area-inset-top))
    14px
    max(18px,env(safe-area-inset-bottom));
  background:rgba(8,14,12,.55);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.pwa-install-sheet.is-hidden { display:none; }

.pwa-install-sheet > * { box-sizing:border-box; }
.pwa-install-sheet {
  color:#30273a;
}
.pwa-install-sheet::before {
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:max(18px,env(safe-area-inset-bottom));
  height:auto;
}
.pwa-install-sheet {
  align-content:end;
}
.pwa-install-sheet .pwa-install-close,
.pwa-install-sheet .pwa-install-kicker,
.pwa-install-sheet h2,
.pwa-install-sheet .pwa-install-body,
.pwa-install-sheet .pwa-install-action,
.pwa-install-sheet > small {
  position:relative;
  z-index:1;
  width:min(100%,420px);
  background:#f0ebf5;
}
.pwa-install-close {
  justify-self:center;
  margin-bottom:-43px;
  padding:11px 15px 0;
  border:0;
  color:#5d4d6c;
  text-align:right;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.pwa-install-kicker {
  margin:0;
  padding:18px 20px 3px;
  border-radius:16px 16px 0 0;
  color:#7450c8;
  font-size:8px;
  font-weight:900;
  letter-spacing:.16em;
}
.pwa-install-sheet h2 {
  margin:0;
  padding:5px 20px 12px;
  color:#30263a;
  font-size:23px;
  line-height:1.06;
  letter-spacing:-.035em;
}
.pwa-install-body {
  padding:3px 20px 12px;
  color:#574866;
  font-size:12px;
  line-height:1.65;
}
.pwa-install-body p { margin:0; }
.pwa-install-body ol { margin:0; padding-left:19px; }
.pwa-install-body li+li { margin-top:5px; }
.pwa-install-action {
  min-height:48px;
  border:0;
  border-top:1px solid rgba(116,80,200,.12);
  color:#fff;
  background:#7450c8!important;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}
.pwa-install-action.is-hidden { display:none; }
.pwa-install-sheet > small {
  padding:10px 20px 17px;
  border-radius:0 0 16px 16px;
  color:rgba(67,53,82,.55);
  font-size:9px;
  line-height:1.4;
}


/* =========================================================
   RESULT navigation + round selector v3
   Horizontal high-contrast controls; standings scroll independently so
   TOP 15 + the separated personal PB never collide with the header.
   ========================================================= */
.result-menu-screen .leaderboard-panel-head {
  position:absolute;
  z-index:12;
  top:max(14px,env(safe-area-inset-top));
  left:14px;
  right:14px;
  width:auto;
  min-height:40px;
  margin:0;
  padding:7px 92px 6px 12px;
  display:flex;
  align-items:center;
  border:1px solid rgba(255,255,255,.26);
  background:rgba(20,26,36,.88);
  color:#fff;
  box-shadow:0 6px 20px rgba(9,16,24,.22);
  backdrop-filter:blur(10px) saturate(115%);
  -webkit-backdrop-filter:blur(10px) saturate(115%);
}

.result-menu-screen .leaderboard-panel-head small {
  margin:0 0 2px;
  color:rgba(255,255,255,.68);
  font-size:6px;
  line-height:1;
}

.result-menu-screen .leaderboard-panel-head h2 {
  margin:0;
  color:#fff;
  font-size:20px;
  line-height:.95;
  text-shadow:none;
}

.result-menu-screen .leaderboard-panel-head .panel-close {
  position:absolute;
  top:0;
  right:0;
  width:82px;
  height:100%;
  min-height:0;
  padding:0;
  border:0;
  border-left:1px solid rgba(28,38,48,.14);
  background:#f2f1e8;
  color:#202a33;
  font-size:8px;
  font-weight:950;
  letter-spacing:.11em;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

.result-menu-screen .result-tabs {
  position:absolute;
  z-index:11;
  top:max(62px,calc(env(safe-area-inset-top) + 54px));
  left:14px;
  right:14px;
  width:auto;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
  background:transparent;
}

.result-menu-screen .result-subtab {
  min-width:0;
  min-height:42px;
  padding:6px 8px 5px;
  display:grid;
  align-content:center;
  justify-items:center;
  gap:2px;
  border:1px solid rgba(255,255,255,.28);
  border-bottom:1px solid rgba(255,255,255,.28);
  border-radius:4px;
  background:rgba(27,34,46,.86);
  color:rgba(255,255,255,.93);
  text-align:center;
  box-shadow:0 5px 16px rgba(11,18,28,.18);
  backdrop-filter:blur(8px) saturate(108%);
  -webkit-backdrop-filter:blur(8px) saturate(108%);
}

.result-menu-screen .result-subtab strong {
  font-size:9px;
  line-height:1.05;
  letter-spacing:.07em;
}

.result-menu-screen .result-subtab small {
  margin:0;
  color:rgba(255,255,255,.64);
  font-size:6px;
  line-height:1.05;
  letter-spacing:.08em;
  opacity:1;
}

.result-menu-screen .result-subtab.is-active {
  border:1px solid rgba(255,255,255,.72);
  border-left:1px solid rgba(255,255,255,.72);
  border-bottom:1px solid rgba(255,255,255,.72);
  background:#7450c8;
  color:#fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 6px 18px rgba(62,42,112,.28);
}

.result-menu-screen .result-subtab.is-active small {
  color:rgba(255,255,255,.82);
}

/* The two result views own the space below the fixed title/tabs. */
.result-menu-screen .result-view {
  position:absolute;
  z-index:4;
  top:max(112px,calc(env(safe-area-inset-top) + 104px));
  left:0;
  right:0;
  bottom:0;
  margin:0;
  padding:0 0 max(14px,env(safe-area-inset-bottom));
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  scrollbar-width:none;
}
.result-menu-screen .result-view::-webkit-scrollbar { display:none; }
.result-menu-screen .result-view.is-hidden { display:none; }

/* Ranking-specific compact round bar. */
.result-menu-screen .ranking-round-toolbar {
  margin:8px 10px 7px;
  min-height:48px;
  padding:7px 9px;
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  gap:9px;
  align-items:center;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(19,25,36,.87);
  color:#fff;
  box-shadow:0 5px 16px rgba(10,17,26,.16);
}

.result-menu-screen .ranking-round-toolbar label {
  min-width:0;
  display:grid;
  gap:3px;
}

.result-menu-screen .ranking-round-toolbar label > span {
  color:rgba(255,255,255,.58);
  font-size:6px;
  font-weight:900;
  letter-spacing:.14em;
}

.result-menu-screen #rankingRoundSelect {
  width:100%;
  min-height:27px;
  margin:0;
  padding:0 25px 0 8px;
  border:1px solid rgba(255,255,255,.35);
  border-radius:3px;
  outline:0;
  background:#7450c8;
  color:#fff;
  font-family:var(--result-ui-font);
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}

.result-menu-screen .ranking-round-meta {
  min-width:0;
  display:grid;
  gap:3px;
}

.result-menu-screen .ranking-round-meta strong {
  overflow:hidden;
  color:#fff;
  font-size:9px;
  line-height:1.1;
  letter-spacing:.045em;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.result-menu-screen .ranking-round-meta small {
  overflow:hidden;
  color:rgba(255,255,255,.60);
  font-size:6px;
  font-weight:800;
  line-height:1.1;
  letter-spacing:.08em;
  white-space:nowrap;
  text-overflow:ellipsis;
}

/* Remove the old large top margin that belonged to the vertical tab stack. */
.result-menu-screen .classification-board,
.result-menu-screen .history-board {
  margin:0 4px 14px;
  padding:4px 0 8px;
}

.result-menu-screen #myHistoryView .history-board {
  margin-top:8px;
}

/* Stronger table contrast over the moving mountain. */
.result-menu-screen .classification-title,
.result-menu-screen .history-board .classification-title {
  height:25px;
  padding:0 12px;
  color:#fff;
  background:rgba(30,36,50,.92);
  text-shadow:none;
}

.result-menu-screen .classification-title span {
  color:rgba(255,255,255,.64);
}

.result-menu-screen .classification-head,
.result-menu-screen .history-head {
  min-height:19px;
  color:#26323b;
  background:rgba(244,246,248,.94);
}

.result-menu-screen .classification-row,
.result-menu-screen .history-row {
  min-height:28px;
  color:#202b34;
  background:rgba(248,249,250,.93);
  border-top:1px solid rgba(37,48,59,.10);
  text-shadow:none;
}

.result-menu-screen .classification-row:nth-child(even),
.result-menu-screen .history-row:nth-child(even) {
  background:rgba(225,230,235,.94);
}

.result-menu-screen .classification-row:first-child {
  color:#202b34;
  background:rgba(206,214,224,.96);
  box-shadow:inset 3px 0 #7450c8;
  text-shadow:none;
}

/* Preserve the existing personal-PB separation treatment. */
.result-menu-screen .classification-pb-spacer {
  height:24px;
  border-top:0;
  background:transparent;
}

.result-menu-screen .classification-row.is-me,
.result-menu-screen .classification-row.is-me:first-child,
.result-menu-screen .classification-row.is-pb-outside {
  color:#fff;
  background:rgba(47,107,73,.96);
  box-shadow:inset 4px 0 #fff,0 5px 16px rgba(23,63,42,.18);
  text-shadow:none;
}

@media (max-height:700px) {
  .result-menu-screen .leaderboard-panel-head {
    top:max(10px,env(safe-area-inset-top));
    min-height:36px;
  }

  .result-menu-screen .result-tabs {
    top:max(52px,calc(env(safe-area-inset-top) + 44px));
  }

  .result-menu-screen .result-subtab {
    min-height:37px;
    padding:5px 7px;
  }

  .result-menu-screen .result-view {
    top:max(96px,calc(env(safe-area-inset-top) + 88px));
  }

  .result-menu-screen .ranking-round-toolbar {
    min-height:43px;
    margin-top:6px;
    padding:5px 8px;
  }

  .result-menu-screen .classification-row,
  .result-menu-screen .history-row {
    min-height:26px;
  }

  .result-menu-screen .classification-pb-spacer {
    height:18px;
  }
}


/* External country flag assets */
.flag-kr {
  background-color:#fff;
  background-image:url('./assets/flags/kr.png') !important;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}
