:root { --blue: #1e5bd8; --blue-deep: #0b2a6b; --gold: #f5c518; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b2a6b; color: #fff; font-family: Inter, system-ui, sans-serif; }
body { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse 75% 70% at 50% 46%, transparent 55%, rgba(4, 14, 45, .38) 100%); }
#flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; }
#flash.good { animation: flash .45s ease-out; box-shadow: inset 0 0 120px 30px #37d67a; }
#flash.bad { animation: flash .9s ease-out; box-shadow: inset 0 0 160px 60px #e03131; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

#hud { position: fixed; inset: 0; pointer-events: none; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left)); }
#hud .top { display: flex; align-items: flex-start; gap: 8px; }
.grow { flex: 1; }
.icon {
  pointer-events: auto; width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer;
  display: grid; place-items: center; text-decoration: none;
  background: rgba(8, 20, 55, .7); color: #fff; font: 800 16px Inter, sans-serif;
}
.icon.off { opacity: .45; text-decoration: line-through; }
.box { background: rgba(8, 20, 55, .7); border-radius: 12px; padding: 6px 12px; line-height: 1.1; }
.label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.sm { font-size: 12px; opacity: .85; }
#score { font: 40px 'Bebas Neue', sans-serif; }

.clue {
  position: absolute; left: 50%; top: max(10px, env(safe-area-inset-top)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 20px);
  background: rgba(8, 20, 55, .82); border: 2px solid var(--gold); border-radius: 18px; padding: 8px 18px 8px 8px;
}
.clue.boss { border-color: #ff5252; background: rgba(70, 8, 16, .88); }
.clue.boss .label { color: #ff8f8f; }
.clue.pop { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: translateX(-50%) scale(.7); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.clue img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: #dfe7f7; border: 3px solid #fff; flex: none; }
.clue .label { white-space: nowrap; }
.clue img.blurred { filter: blur(7px); }
.clue .name { font: 44px/0.95 'Bebas Neue', sans-serif; letter-spacing: .02em; white-space: nowrap; }
.clue .name.long { font-size: 30px; }
.clue .sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }

.steer-hint {
  position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; padding: 0 22px;
  font-weight: 800; font-size: 14px; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); opacity: .9; transition: opacity .4s;
}
.steer-hint.gone { opacity: 0; }

.screen {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 20px; text-align: center; background: rgba(8, 22, 64, .78); backdrop-filter: blur(3px);
}
.screen h1 { margin: 0; font: 400 clamp(56px, 13vw, 110px)/0.9 'Bebas Neue', sans-serif; letter-spacing: .03em; color: #fff; text-shadow: 0 5px 0 var(--blue); }
.screen p { margin: 0; max-width: 460px; line-height: 1.45; }
.screen a { color: #cfdcff; font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.keys { font-size: 14px; opacity: .9; }
.warn { font-size: 14px; color: #ffd9d9; }
.btn {
  border: 0; cursor: pointer; border-radius: 99px; padding: 12px 44px 10px; margin-top: 6px;
  background: var(--gold); color: #0b2a6b; font: 32px 'Bebas Neue', sans-serif; letter-spacing: .05em;
  box-shadow: 0 6px 0 #a8850a;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a8850a; }
.btn:focus-visible, .icon:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---- start menu: a panel on one side, the pitch and the runner on the other ---- */
.menu { position: fixed; inset: 0; display: flex; pointer-events: none; }
.menu-panel {
  position: relative; pointer-events: auto; width: min(480px, max(40vw, 400px)); height: 100%;
  padding: max(40px, env(safe-area-inset-top)) 44px max(26px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #0d2f7e 0%, #081f57 42%, #050f30 100%);
  box-shadow: 18px 0 50px rgba(2, 8, 28, .55);
}
.menu-panel::after {   /* a thin gold edge, brightest in the middle */
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
}
.mview { height: 100%; display: flex; flex-direction: column; animation: viewIn .28s cubic-bezier(.2, .8, .3, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

/* main menu */
.crest { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.crest::before { content: ''; width: 26px; height: 3px; border-radius: 2px; background: var(--gold); }
.menu-head h1 { margin: 14px 0 14px; font: 400 clamp(72px, 8.6vw, 124px)/0.82 'Bebas Neue', sans-serif; letter-spacing: .02em; text-shadow: 0 6px 0 #0a1f5c, 0 18px 30px rgba(0, 0, 0, .35); }
.menu-head h1 span { display: block; color: var(--gold); text-shadow: 0 6px 0 #6e5405, 0 18px 30px rgba(0, 0, 0, .35); }
.tag { margin: 0; max-width: 300px; font-size: 14.5px; line-height: 1.5; color: #b9c8f2; }

.mnav { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.mitem {
  --hl: 0; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; padding: 10px 18px 9px 30px; border: 0; border-radius: 4px 14px 14px 4px; cursor: pointer;
  text-align: left; text-decoration: none; color: #9fb2e6; font-family: Inter, sans-serif;
  background: linear-gradient(90deg, rgba(245, 197, 24, calc(var(--hl) * .2)), rgba(245, 197, 24, 0) 85%);
  transition: color .15s, background .15s, padding .18s;
}
.mitem::before {   /* the gold bar beside the chosen item */
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 2px;
  background: var(--gold); transform: scaleY(var(--hl)); transition: transform .18s;
}
.mitem::after {
  content: '›'; position: absolute; right: 18px; top: 50%; transform: translate(calc((1 - var(--hl)) * -10px), -50%);
  font: 400 40px/1 'Bebas Neue', sans-serif; color: var(--gold); opacity: var(--hl); transition: opacity .15s, transform .18s;
}
.mi-label { font: 400 44px/0.95 'Bebas Neue', sans-serif; letter-spacing: .06em; }
.mi-sub { font-size: 12px; font-weight: 600; letter-spacing: .02em; opacity: .75; max-height: 0; overflow: hidden; transition: max-height .18s; }
/* the chosen item: whichever is hovered or focused, and Play when neither is */
.mitem:hover, .mitem:focus-visible, .mnav:not(:hover):not(:focus-within) .primary { --hl: 1; color: #fff; padding-left: 36px; outline: 0; }
.mitem:hover .mi-sub, .mitem:focus-visible .mi-sub, .mnav:not(:hover):not(:focus-within) .primary .mi-sub { max-height: 2em; }
.mitem.primary .mi-label { color: var(--gold); }
.mitem:active { transform: translateX(3px); }

.mfoot { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: #8ea2d8; }
.mfoot .keys { font-size: 12px; opacity: 1; }
kbd { display: inline-block; min-width: 20px; padding: 1px 5px; margin-right: 3px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .25); border-bottom-width: 2px; font: 700 10px Inter, sans-serif; text-align: center; color: #dbe4ff; }
.ver { font-variant-numeric: tabular-nums; letter-spacing: .08em; white-space: nowrap; opacity: .8; }

/* settings */
.set-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.set-head h2 { margin: 0; font: 400 50px/1 'Bebas Neue', sans-serif; letter-spacing: .04em; }
.back {
  width: 42px; height: 42px; flex: none; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .2); cursor: pointer;
  background: rgba(255, 255, 255, .05); color: #fff; font: 400 34px/1 'Bebas Neue', sans-serif; padding-bottom: 3px;
}
.back:hover { border-color: var(--gold); color: var(--gold); }
.set-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.srow { padding: 12px 0 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.srow:last-child { border-bottom: 0; }
.s-name { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.s-name svg { width: 17px; height: 17px; fill: currentColor; }
.s-name .boss-face { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .4); }
/* On / Off settings: the name and the switch on one line */
.srow.pair { display: grid; grid-template-columns: 1fr 150px; align-items: center; column-gap: 12px; }
.srow.pair .s-name { margin-bottom: 0; }
.srow.pair .s-desc { grid-column: 1 / -1; }
.srow.pair .seg button { padding-top: 6px; padding-bottom: 4px; font-size: 19px; }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 13px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35); }
.seg button {
  flex: 1 1 0; min-width: 0; padding: 8px 4px 6px; border: 0; border-radius: 9px; cursor: pointer; white-space: nowrap;
  background: none; color: #9fb2e6; font: 400 21px/1 'Bebas Neue', sans-serif; letter-spacing: .05em;
  transition: background .15s, color .15s;
}
.seg button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.seg button.on { background: linear-gradient(#ffd83a, #f5c518); color: #0b2a6b; box-shadow: 0 2px 0 #9b7a08; }
.seg button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.s-desc { margin: 8px 2px 0; min-height: 1.4em; font-size: 12.5px; line-height: 1.45; color: #b9c8f2; }
.s-desc b { color: var(--gold); }
.link.inline { padding: 0 2px; font-size: 12.5px; color: var(--gold); }
#setDone { margin-top: 14px; }

.play {
  border: 0; cursor: pointer; border-radius: 14px; padding: 11px 22px 8px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(#ffd83a, #f5c518); color: #0b2a6b; font: 36px/1 'Bebas Neue', sans-serif; letter-spacing: .08em;
  box-shadow: 0 6px 0 #a8850a, 0 12px 24px rgba(0, 0, 0, .35);
}
.play:hover { filter: brightness(1.06); }
.play:active { transform: translateY(4px); box-shadow: 0 2px 0 #a8850a; }
.play:focus-visible, .back:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

[lang="km"] { font-family: Battambang, 'Noto Sans Khmer', 'Khmer OS', sans-serif; }

/* ---- voice control: the setup card ---- */
.vpanel { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(4, 12, 40, .74); backdrop-filter: blur(4px); }
.vcard {
  width: min(440px, 100%); max-height: 100%; overflow-y: auto; padding: 22px 22px 16px; text-align: center;
  border-radius: 22px; border: 3px solid var(--gold); box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  background: linear-gradient(165deg, #143c9e, #0b2a6b 60%, #071b47);
}
.vcard h2 { margin: 6px 0; font: 400 40px/1 'Bebas Neue', sans-serif; letter-spacing: .03em; }
.vp-note { margin: 0 0 16px; font-size: 12.5px; line-height: 1.45; color: #c9d6fb; }
.vp-words { display: flex; gap: 12px; }
.vw {
  flex: 1; padding: 10px 8px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06); transition: transform .15s, border-color .15s, background .15s;
}
.vw span { display: block; font-size: 34px; line-height: 1.6; font-weight: 700; color: #fff; }
.vw small { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #c9d6fb; }
.vw.ask { border-color: var(--gold); background: rgba(245, 197, 24, .16); animation: ask .8s ease-in-out infinite alternate; }
.vw.done { border-color: #37d67a; }
.vw.hit { border-color: #37d67a; background: rgba(55, 214, 122, .32); transform: scale(1.06); }
@keyframes ask { to { transform: scale(1.05); } }
.vp-meter { height: 10px; margin: 16px 6px 10px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.vp-meter i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #37d67a, #f5c518 70%, #ff6b4a); }
.vp-status { min-height: 2.9em; margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.vp-btns { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.play.small { font-size: 30px; padding: 9px 42px 6px; }
.vp-btns .link { font-size: 13px; color: #cfdcff; }

/* ---- voice control during a run: a live meter, and the word it heard ---- */
.voice-pill {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(8, 20, 55, .72);
}
.voice-pill svg { width: 18px; height: 18px; fill: var(--gold); }
.voice-pill .lv { width: 64px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.voice-pill .lv i { display: block; height: 100%; width: 0; background: #37d67a; }
.heard {
  position: absolute; top: 44%; padding: 4px 16px 2px; border-radius: 14px; pointer-events: none;
  background: rgba(8, 20, 55, .82); border: 2px solid var(--gold); color: #fff; font-size: 30px; font-weight: 700;
  animation: heard .75s ease-out forwards;
}
.heard.l { left: 7%; }
.heard.r { right: 7%; }
@keyframes heard { from { opacity: 0; transform: scale(.7); } 20% { opacity: 1; transform: scale(1.08); } to { opacity: 0; transform: translateY(-16px); } }
@media (prefers-reduced-motion: reduce) {
  .vw.ask { animation: none; }
  .heard { animation-duration: 1.2s; animation-name: fade; }
  @keyframes fade { from { opacity: 1; } to { opacity: 0; } }
}
/* Tall screens (phones held upright): the pitch on top, the panel as a sheet underneath. */
@media (max-aspect-ratio: 1/1) {
  .menu { flex-direction: column; justify-content: flex-end; }
  .menu-panel {
    width: 100%; height: auto; max-height: 80%; display: flex; flex-direction: column;
    padding: 22px max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    border-radius: 24px 24px 0 0; box-shadow: 0 -14px 40px rgba(2, 8, 28, .55);
  }
  .menu-panel::after { top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 3px; border-radius: 24px 24px 0 0; background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold) 75%, transparent); }
  .mview { height: auto; min-height: 0; flex: 1; }
  .menu-head h1 { margin: 6px 0 4px; font-size: clamp(54px, 16vw, 84px); }
  .menu-head h1 span { display: inline; }
  .tag { display: none; }
  .mnav { margin-top: 16px; }
  .mi-label { font-size: 38px; }
  .mfoot { margin-top: 14px; padding-top: 10px; }
  .mfoot .keys { display: none; }
  .mfoot { justify-content: center; }
  .set-head h2 { font-size: 40px; }
  .seg button { font-size: 18px; }
  .menu-panel { max-height: 84%; }
  .srow { padding: 9px 0; }
  .s-name { margin-bottom: 7px; }
  .s-desc { margin-top: 6px; }
}
/* Laptop-height screens: a smaller title and tighter spacing. */
@media (max-height: 860px) and (min-aspect-ratio: 1/1) {
  .menu-panel { padding-top: max(28px, env(safe-area-inset-top)); padding-bottom: 18px; }
  .menu-head h1 { font-size: clamp(60px, 11.5vh, 112px); }
  .srow { padding: 9px 0; }
  .s-name { margin-bottom: 7px; }
}
/* Short screens (phones on their side): tighter, and the small print goes. */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .menu-panel { padding: 14px 26px 10px max(26px, env(safe-area-inset-left)); width: min(440px, 50vw); }
  .menu-head h1 { font-size: 52px; margin: 4px 0 0; }
  .menu-head h1 span { display: inline; }
  .tag, .mfoot .keys, .mi-sub, .s-desc { display: none; }
  .mi-label { font-size: 32px; }
  .mitem { padding-top: 5px; padding-bottom: 4px; }
  .mfoot { margin-top: 8px; padding-top: 6px; }
  .set-head { padding-bottom: 6px; }
  .set-head h2 { font-size: 34px; }
  .back { width: 34px; height: 34px; font-size: 28px; }
  .srow { padding: 5px 0; }
  .s-name { margin-bottom: 4px; }
  .seg button { padding: 6px 4px 4px; font-size: 17px; }
  .play { font-size: 26px; padding: 7px 16px 4px; }
  #setDone { margin-top: 6px; }
}
.link { border: 0; background: none; cursor: pointer; color: #fff; font: 600 15px Inter, sans-serif; text-decoration: underline; padding: 6px; }
#over .eyebrow.won { color: var(--gold); font-size: 30px; }
#over .eyebrow { color: #ff8f8f; font-size: 16px; }
.answer { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 600; background: rgba(0, 0, 0, .3); border-radius: 99px; padding: 6px 22px 6px 6px; }
.answer img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #dfe7f7; border: 2px solid #fff; }
.answer b { font: 34px 'Bebas Neue', sans-serif; color: var(--gold); vertical-align: -4px; margin-left: 4px; }
.result { display: flex; flex-direction: column; align-items: center; }
.result span { font: clamp(80px, 20vw, 130px)/0.9 'Bebas Neue', sans-serif; }
.result small { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.newbest { font: 30px 'Bebas Neue', sans-serif; color: var(--gold); animation: pulse .7s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }

@media (max-width: 520px) {
  .clue { top: calc(max(10px, env(safe-area-inset-top)) + 96px); }
  .clue .name { font-size: 38px; }
  .clue img { width: 84px; height: 84px; }
}
@media (max-height: 420px) {
  .clue img { width: 52px; height: 52px; }
  .clue .name { font-size: 32px; }
  .screen { gap: 6px; }
  .screen h1 { font-size: 52px; }
  .result span { font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .clue.pop, .newbest, #flash.good, #flash.bad { animation: none; }
  .mview { animation: none; }
  .mitem, .mitem::before, .mitem::after { transition: none; }
}

/* ---- the Settings PIN ---- */
.mi-label .lock { width: 22px; height: 22px; margin-left: 6px; fill: currentColor; opacity: .7; vertical-align: 2px; }
.pincard { width: min(340px, 100%); }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 14px 0 6px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); transition: background .1s, border-color .1s; }
.pin-dots i.f { background: var(--gold); border-color: var(--gold); }
.pin-dots.bad { animation: shake .4s; }
.pin-dots.bad i { border-color: #ff6b6b; background: #ff6b6b; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
#pinMsg { min-height: 1.5em; margin-bottom: 8px; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.pin-pad button {
  height: 56px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .16); cursor: pointer;
  background: rgba(255, 255, 255, .07); color: #fff; font: 400 32px/1 'Bebas Neue', sans-serif; letter-spacing: .04em;
}
.pin-pad button:hover { border-color: rgba(255, 255, 255, .45); }
.pin-pad button:active { background: rgba(245, 197, 24, .3); transform: scale(.96); }
.pin-pad .pk-sm { font: 700 14px Inter, sans-serif; color: #c9d6fb; }
.pin-change {
  justify-self: end; width: 150px; padding: 7px 4px 5px; border-radius: 10px; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .2); background: none; color: #fff; font: 400 19px/1 'Bebas Neue', sans-serif; letter-spacing: .05em;
}
.pin-change:hover { border-color: var(--gold); color: var(--gold); }
@media (max-height: 520px) { .pin-pad button { height: 40px; font-size: 24px; } .pin-dots { margin: 6px 0 2px; } .pincard h2 { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { .pin-dots.bad { animation: none; } }
#pinOk { margin: 6px auto 2px; }
#pinOk:disabled { opacity: .4; cursor: default; }


/* ---- menu: Khmer title, club logo, the chosen setup, and a filled Play button ---- */
/* the club's logo (crest and name) at the top; it stands in for the small "Visakha FC" line */
.crest .club-logo { display: block; height: 128px; width: auto; margin: -6px 0 0 -8px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); }
.crest:has(.club-logo)::before, .crest:has(.club-logo) span { display: none; }
.menu-head h1.km-title {
  margin: 16px 0 14px; font: 700 clamp(46px, 5.4vw, 76px)/1.28 'Google Sans', Battambang, 'Noto Sans Khmer', sans-serif;
  letter-spacing: 0; text-shadow: 0 4px 0 #0a1f5c, 0 14px 26px rgba(0, 0, 0, .35);
}
.menu-head h1.km-title span { display: block; color: var(--gold); text-shadow: 0 4px 0 #6e5405, 0 14px 26px rgba(0, 0, 0, .35); }
.screen h1.km-title { font: 700 clamp(40px, 9vw, 72px)/1.3 'Google Sans', Battambang, sans-serif; text-shadow: 0 4px 0 var(--blue); }

.setup { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.setup span {
  padding: 5px 11px 4px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06);
  font: 400 17px/1 'Bebas Neue', sans-serif; letter-spacing: .07em; color: #dbe4ff; white-space: nowrap;
}
.setup span:first-child { border-color: var(--gold); color: var(--gold); }
.setup .best { margin-left: auto; border: 0; background: none; color: #9fb2e6; padding-right: 0; }
.setup .best:empty { display: none; }

#playBtn {
  --hl: 0; align-items: center; justify-content: center; flex-direction: row; gap: 14px;
  padding: 12px 22px 12px; margin-bottom: 8px; border-radius: 16px; color: #0b2a6b;
  background: linear-gradient(#ffd83a, #f5c518); box-shadow: 0 6px 0 #a8850a, 0 14px 28px rgba(0, 0, 0, .35);
  transition: filter .15s, transform .1s, box-shadow .1s;
}
#playBtn::before { display: none; }
#playBtn::after { content: '▶'; position: static; transform: none; opacity: 1; font: 400 22px/1 Inter, sans-serif; color: #0b2a6b; }
#playBtn .mi-label { font: 700 40px/1.25 'Google Sans', Battambang, sans-serif; letter-spacing: 0; color: #0b2a6b; }
#playBtn .mi-sub { display: none; }
#playBtn:hover, #playBtn:focus-visible { filter: brightness(1.07); padding-left: 22px; }
#playBtn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
#playBtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a8850a; }
/* while the player photos load: greyed, with the load filling the button, and the count under it */
#playBtn.loading { cursor: progress; filter: none; color: #fff;
  background: linear-gradient(90deg, rgba(245, 197, 24, .55) calc(var(--load, 0) * 100%), rgba(255, 255, 255, .1) 0); box-shadow: none; }
#playBtn.loading .mi-label, #playBtn.loading::after { color: rgba(255, 255, 255, .75); }
#playBtn.loading .mi-sub { display: block; max-height: none; position: absolute; left: 0; right: 0; bottom: -22px; text-align: center; color: var(--gold); opacity: 1; }
#playBtn.loading { margin-bottom: 30px; }
/* Exit: a quiet item under Play */
#exitBtn { align-items: center; padding: 6px 18px; }
#exitBtn .mi-label { font-size: 30px; }
#exitBtn::after, #exitBtn::before { display: none; }
#exitBtn .mi-sub { display: none; }
#exitBtn:hover, #exitBtn:focus-visible { padding-left: 18px; color: var(--gold); background: none; }
/* the version, which is also the hidden way into Settings */
button.ver { border: 0; background: none; color: inherit; font: inherit; padding: 6px 2px; cursor: default; -webkit-tap-highlight-color: transparent; }

@media (max-aspect-ratio: 1/1) {

  .crest .club-logo { height: 76px; margin: -4px 0 0 -6px; }
  .menu-head h1.km-title { margin: 6px 0 4px; font-size: clamp(36px, 10.5vw, 56px); line-height: 1.3; }
  .menu-head h1.km-title span { display: inline; }
  #playBtn .mi-label { font-size: 34px; }
}
@media (max-height: 860px) and (min-aspect-ratio: 1/1) {
  .menu-head h1.km-title { font-size: clamp(42px, 8vh, 70px); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .crest .club-logo { height: 70px; margin-top: -4px; }
  .menu-head h1.km-title { font-size: 34px; margin: 2px 0 0; line-height: 1.3; }
  .menu-head h1.km-title span { display: inline; }
  .setup { margin-bottom: 6px; }
  .setup span { font-size: 14px; }
  #playBtn { padding: 6px 16px; }
  #playBtn .mi-label { font-size: 28px; }
  #exitBtn .mi-label { font-size: 24px; }
}
