@font-face { font-family: 'Titan One'; src: url('../assets/titan-one-latin.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Baloo 2'; src: url('../assets/baloo2-latin.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
:root {
  --ink: #102233; --paper: #fffdf6; --lime: #c8f25a; --sun: #ffd166; --coral: #ff6b5e; --sky: #4fb8f0;
  --display: 'Titan One', 'Baloo 2', system-ui, sans-serif; --body: 'Baloo 2', system-ui, sans-serif;
  --accent: var(--lime);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0f2233; overflow: hidden; color: var(--paper); font-family: var(--body); -webkit-font-smoothing: antialiased; }
#world { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100vw; height: 100vh; display: block; }
#overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
#overlay > * { pointer-events: auto; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- lobby */
.lobby { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none !important; }
.lobby > * { pointer-events: auto; }
.lobby::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgba(8,20,32,.55) 0%, rgba(8,20,32,0) 26%, rgba(8,20,32,0) 58%, rgba(8,20,32,.78) 100%); pointer-events: none; }
.lobby-top { position: absolute; top: 3.2vh; left: 3.4vw; right: 3.4vw; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: .6vw; font-family: var(--display); letter-spacing: .02em; filter: drop-shadow(0 .3vh 0 rgba(0,0,0,.25)); }
.logo b { font-size: 3.1vh; font-weight: 400; }
.logo em { font-style: normal; font-size: 3.1vh; color: var(--lime); }
.logo-ball { width: 3.6vh; height: 3.6vh; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #efffa0, var(--lime) 55%, #8fbf2a); box-shadow: inset -.4vh -.4vh 0 rgba(0,0,0,.12); position: relative; }
.logo-ball::after { content: ''; position: absolute; top: 18%; right: -6%; bottom: 18%; left: -6%; border: .35vh solid #fff; border-left-color: transparent; border-right-color: transparent; border-radius: 50%; }
.room-pill { display: flex; align-items: center; gap: .6vw; background: rgba(10,26,40,.6); border-radius: 99px; padding: .8vh 1.4vw; font-size: 1.8vh; font-weight: 700; backdrop-filter: blur(4px); }
.room-pill i { width: 1.1vh; height: 1.1vh; border-radius: 50%; background: var(--sun); box-shadow: 0 0 1vh var(--sun); }
.room-pill.live i { background: #7bd88f; box-shadow: 0 0 1vh #7bd88f; }
.hero { position: absolute; left: 3.4vw; top: 12vh; filter: drop-shadow(0 .6vh 0 rgba(0,0,0,.28)); }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 11vh; line-height: .95; letter-spacing: .01em; animation: hero-in .5s cubic-bezier(.2,1.6,.4,1) both; }
.hero p { margin: .6vh 0 0; font-family: var(--display); font-size: 3.4vh; color: var(--accent); letter-spacing: .12em; }
@keyframes hero-in { from { transform: translateY(2vh) scale(.92); opacity: 0; } }
.join { position: absolute; right: 3.4vw; top: 12vh; width: 21vh; background: var(--paper); color: var(--ink); border-radius: 2.6vh; padding: 1.6vh; box-shadow: 0 1.2vh 0 rgba(0,0,0,.2); display: grid; gap: 1vh; justify-items: center; transform: rotate(1.5deg); }
.qr-box { width: 17.8vh; height: 17.8vh; display: grid; place-items: center; background: #fff; border-radius: 1.4vh; overflow: hidden; }
.qr-box img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-box img:not([src]) { display: none; }
.join-copy { display: grid; justify-items: center; line-height: 1.05; }
.join-copy b { font-family: var(--display); font-weight: 400; font-size: 2.2vh; }
.join-copy span { font-size: 2.6vh; font-weight: 800; letter-spacing: .25em; color: #5b6c7c; }
.join-copy small { font-size: 1.4vh; font-weight: 700; color: #5b6c7c; opacity: .8; margin-top: .4vh; }
.roster { display: flex; flex-wrap: wrap; gap: .6vh; justify-content: center; min-height: 4.4vh; }
.avatar { width: 4.4vh; height: 4.4vh; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 2.1vh; color: #fff; box-shadow: inset 0 -.4vh 0 rgba(0,0,0,.2); animation: pop-in .4s cubic-bezier(.2,1.8,.4,1) both; text-shadow: 0 .2vh 0 rgba(0,0,0,.2); }
.avatar.ready { outline: .4vh solid #7bd88f; }
@keyframes pop-in { from { transform: scale(.2); opacity: 0; } }
.tiles { position: absolute; left: 3.4vw; right: 3.4vw; bottom: 4vh; display: flex; gap: 1.2vw; justify-content: center; align-items: flex-end; }
.tile { width: 14.5vh; height: 14.5vh; border: 0; border-radius: 3vh; background: var(--paper); color: var(--ink); display: grid; place-items: center; grid-template-rows: 1fr auto; padding: 1.8vh .6vh 1.4vh; box-shadow: 0 .9vh 0 rgba(0,0,0,.25); transition: transform .18s cubic-bezier(.2,1.6,.4,1), box-shadow .18s; position: relative; }
.tile svg { width: 7.6vh; height: 7.6vh; }
.tile span { font-family: var(--display); font-size: 1.9vh; letter-spacing: .03em; }
.tile.on { transform: translateY(-2.2vh) scale(1.12); box-shadow: 0 1.3vh 0 rgba(0,0,0,.25), 0 0 0 .6vh var(--tc, var(--lime)); }
.tile:not(.on):hover { transform: translateY(-.8vh); }
.tile .badge { position: absolute; top: -1vh; right: -1vh; background: var(--coral); color: #fff; font-size: 1.4vh; font-weight: 800; padding: .2vh .8vh; border-radius: 99px; }
.play-btn { position: absolute; left: 3.4vw; top: 33vh; border: 0; border-radius: 99px; background: var(--accent); color: var(--ink); font-family: var(--display); font-size: 3.6vh; padding: 1.5vh 4vh; box-shadow: 0 .9vh 0 rgba(0,0,0,.28); animation: breathe 1.6s ease-in-out infinite; }
.play-btn span { font-size: 2.6vh; }
@keyframes breathe { 50% { transform: scale(1.05); } }

/* ---------------------------------------------------------------- intro */
.intro { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none !important; }
.intro-venue { font-family: var(--display); font-size: 2.6vh; letter-spacing: .4em; color: var(--sun); animation: slide-down .5s both; filter: drop-shadow(0 .3vh 0 rgba(0,0,0,.3)); }
.intro-title { font-family: var(--display); font-size: 14vh; line-height: 1; animation: slam .6s .15s cubic-bezier(.2,1.8,.4,1) both; filter: drop-shadow(0 .8vh 0 rgba(0,0,0,.3)); }
.intro-sub { font-size: 3vh; font-weight: 800; animation: slide-down .5s .4s both; text-shadow: 0 .3vh 0 rgba(0,0,0,.35); }
.intro-players { margin-top: 3vh; display: flex; gap: 2vw; align-items: center; }
.intro-player { background: var(--paper); color: var(--ink); border-radius: 99px; padding: .9vh 2.4vh; font-family: var(--display); font-size: 2.6vh; box-shadow: 0 .6vh 0 rgba(0,0,0,.25); border-left: 1.4vh solid var(--pc); animation: slam .5s both; }
.intro-vs { font-family: var(--display); font-size: 4vh; color: var(--sun); filter: drop-shadow(0 .4vh 0 rgba(0,0,0,.3)); }
@keyframes slam { from { transform: scale(2.2); opacity: 0; } }
@keyframes slide-down { from { transform: translateY(-3vh); opacity: 0; } }

/* ---------------------------------------------------------------- calibrate */
.calibrate { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; background: rgba(8,20,32,.35); }
.calib-card { background: var(--paper); color: var(--ink); border-radius: 4vh; padding: 4vh 5vh; text-align: center; box-shadow: 0 1.4vh 0 rgba(0,0,0,.25); width: min(80vw, 88vh); animation: slam .45s cubic-bezier(.2,1.6,.4,1) both; }
.calib-card h2 { font-family: var(--display); font-weight: 400; font-size: 4.4vh; margin: 2vh 0 .4vh; }
.calib-card p { font-size: 2.4vh; margin: 0 0 2.4vh; color: #4a5d70; }
.calib-phone { display: flex; align-items: center; justify-content: center; gap: 2vh; height: 12vh; }
.phone-shape { width: 5vh; height: 9vh; border-radius: 1.2vh; background: var(--ink); position: relative; transform: rotate(-60deg); animation: point 1.6s ease-in-out infinite; }
.phone-shape span { position: absolute; top: .6vh; right: .6vh; bottom: .6vh; left: .6vh; border-radius: .7vh; background: var(--lime); }
.beam { width: 16vh; height: 1vh; border-radius: 99px; background: repeating-linear-gradient(90deg, var(--sun) 0 2vh, transparent 2vh 3.2vh); animation: beam .8s linear infinite; }
.tv-shape { width: 13vh; height: 8vh; border-radius: 1vh; border: .9vh solid var(--ink); background: #8fd2f2; }
@keyframes point { 50% { transform: rotate(-78deg) translateY(-.4vh); } }
@keyframes beam { to { background-position: 3.2vh 0; } }
.calib-list { display: flex; gap: 1.4vh; justify-content: center; flex-wrap: wrap; }
.calib-chip { display: flex; align-items: center; gap: 1vh; background: #eef2f5; border-radius: 99px; padding: .8vh 1.8vh .8vh .8vh; font-weight: 800; font-size: 2.2vh; }
.calib-chip i { width: 3.4vh; height: 3.4vh; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 1.8vh; }
.calib-chip.ready { background: #dff7d9; }
.calib-chip.ready i::after { content: '✓'; }

/* ---------------------------------------------------------------- countdown */
.count { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; pointer-events: none !important; font-family: var(--display); font-size: 26vh; color: var(--paper); filter: drop-shadow(0 1.2vh 0 rgba(0,0,0,.3)); }
.count span { animation: slam .5s cubic-bezier(.2,1.8,.4,1) both; }
.count span.go { color: var(--accent); font-size: 20vh; }

/* ---------------------------------------------------------------- in-game UI layer */
.ui-layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none !important; overflow: hidden; }
.vignette { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none !important; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(6,14,24,.38) 100%); }
.banners { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; }
.banner { grid-area: 1 / 1; text-align: center; animation: banner-in .45s cubic-bezier(.2,1.6,.4,1) both; transition: opacity .35s, transform .35s; }
.banner.out { opacity: 0; transform: scale(.9) translateY(-2vh); }
.banner-text { font-family: var(--display); font-size: 10vh; line-height: 1; color: var(--paper); filter: drop-shadow(0 .9vh 0 rgba(0,0,0,.3)); -webkit-text-stroke: .5vh var(--ink); paint-order: stroke fill; }
.banner-text .ch { display: inline-block; animation: ch-pop .5s cubic-bezier(.2,2,.4,1) both; }
.banner-sub { margin-top: 1.2vh; display: inline-block; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 2.6vh; padding: .6vh 2.2vh; border-radius: 99px; letter-spacing: .06em; }
.banner-gold .banner-text { color: var(--sun); font-size: 12vh; }
.banner-round .banner-text { color: var(--accent); font-size: 13vh; }
.banner-bad .banner-text { color: var(--coral); }
.banner-small { align-self: start; margin-top: 18vh; }
.banner-small .banner-text { font-size: 6vh; }
.banner-announce .banner-text { font-size: 8vh; color: var(--sky); }
@keyframes banner-in { from { transform: scale(1.8); opacity: 0; } }
@keyframes ch-pop { from { transform: translateY(4vh) scale(.3); opacity: 0; } }
.pops { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.pop { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-size: calc(4.4vh * var(--s, 1)); color: var(--c); white-space: nowrap; -webkit-text-stroke: .35vh var(--ink); paint-order: stroke fill; filter: drop-shadow(0 .4vh 0 rgba(0,0,0,.3)); animation: pop-rise 1.3s cubic-bezier(.2,1.4,.4,1) both; }
.pop-big { animation: pop-slam 1.3s cubic-bezier(.2,1.6,.4,1) both; }
.pop-speed { font-family: var(--body); font-weight: 800; -webkit-text-stroke: 0; background: rgba(10,26,40,.8); padding: .2vh 1.2vh; border-radius: 99px; }
@keyframes pop-rise { 0% { transform: translate(-50%, -30%) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -60%) scale(1.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -140%) scale(1); opacity: 0; } }
@keyframes pop-slam { 0% { transform: translate(-50%, -50%) scale(2.6) rotate(-6deg); opacity: 0; } 18% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1.05) rotate(-3deg); opacity: 0; } }
.screen-flash { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: var(--c, #fff); opacity: 0; }
.screen-flash.go { animation: flash .35s ease-out; }
@keyframes flash { from { opacity: var(--a, .5); } }
.speed-lines { position: absolute; top: -10%; right: -10%; bottom: -10%; left: -10%; opacity: 0; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.55) 0deg .6deg, transparent .6deg 7deg); -webkit-mask: radial-gradient(circle at 50% 50%, transparent 32%, #000 70%); mask: radial-gradient(circle at 50% 50%, transparent 32%, #000 70%); }
.speed-lines.go { animation: lines .55s ease-out; }
@keyframes lines { 0% { opacity: .9; transform: scale(1.15); } 100% { opacity: 0; transform: scale(1); } }

/* scoreboard (broadcast style) */
.scoreboard { position: absolute; left: 2.2vw; top: 2.6vh; display: grid; gap: .3vh; filter: drop-shadow(0 .5vh 0 rgba(0,0,0,.25)); }
.scoreboard:empty { display: none; }
.sb-title { font-size: 1.5vh; font-weight: 800; letter-spacing: .14em; background: var(--ink); color: var(--sun); padding: .3vh 1.2vh; border-radius: 1vh 1vh 0 0; justify-self: start; }
.sb-row { display: grid; grid-template-columns: 1.2vh minmax(16vh, auto) 2vh 5vh 6.6vh; align-items: center; gap: 1vh; background: var(--paper); color: var(--ink); padding: .5vh .6vh .5vh 1vh; font-weight: 800; font-size: 2.5vh; border-radius: .8vh; }
.sb-row i { width: 1.2vh; height: 3vh; border-radius: 99px; }
.sb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vh; }
.sb-serve { color: #9bc92a; font-size: 1.6vh; }
.sb-games { font-family: var(--display); font-weight: 400; text-align: center; background: #e7edf2; border-radius: .6vh; }
.sb-pts { font-family: var(--display); font-weight: 400; text-align: center; background: var(--ink); color: var(--sun); border-radius: .6vh; }
.corner-info { position: absolute; right: 2.2vw; top: 2.6vh; }
.hud-hint { position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); background: rgba(10,26,40,.7); padding: .8vh 2.2vh; border-radius: 99px; font-weight: 700; font-size: 2vh; pointer-events: none !important; }

/* ---------------------------------------------------------------- pause & results */
.pause, .results { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; background: rgba(8,20,32,.55); backdrop-filter: blur(3px); }
.pause-card, .results-card { background: var(--paper); color: var(--ink); border-radius: 4vh; padding: 4vh 5vh; display: grid; gap: 1.4vh; justify-items: center; box-shadow: 0 1.4vh 0 rgba(0,0,0,.25); animation: slam .4s cubic-bezier(.2,1.6,.4,1) both; min-width: 50vh; }
.pause-card h2, .results-card h2 { font-family: var(--display); font-weight: 400; font-size: 6vh; margin: 0; }
.big-btn { border: 0; background: var(--accent); color: var(--ink); font-family: var(--display); font-size: 3vh; padding: 1.3vh 4vh; border-radius: 99px; box-shadow: 0 .7vh 0 rgba(0,0,0,.2); }
.ghost-btn { border: 0; background: #e8eef3; color: var(--ink); font-weight: 800; font-size: 2.2vh; padding: 1vh 3vh; border-radius: 99px; }
.results-crown { font-size: 7vh; color: var(--sun); line-height: 1; filter: drop-shadow(0 .5vh 0 rgba(0,0,0,.15)); animation: slam .6s .2s both; }
.results-list { display: grid; gap: 1vh; width: 100%; }
.result-row { display: grid; grid-template-columns: 4vh 1fr auto; gap: 1.4vh; align-items: center; background: #eef3f6; border-radius: 2vh; padding: 1vh 1.6vh; animation: slide-down .4s both; }
.result-row.win { background: #fff3c4; }
.result-rank { font-family: var(--display); font-size: 3vh; text-align: center; }
.result-name { font-weight: 800; font-size: 2.8vh; display: flex; align-items: center; gap: 1vh; }
.result-name i { width: 2vh; height: 2vh; border-radius: 50%; }
.result-stats { display: flex; gap: .8vh; flex-wrap: wrap; justify-content: flex-end; }
.stat { background: #fff; border-radius: 1.2vh; padding: .3vh 1.1vh; font-size: 1.7vh; font-weight: 700; color: #4a5d70; }
.stat b { color: var(--ink); font-size: 2.1vh; margin-right: .4vh; }
.results-actions { display: flex; gap: 1.4vh; margin-top: 1vh; }
.debug { position: absolute; left: 1vw; bottom: 1vh; background: rgba(0,0,0,.6); font: 12px ui-monospace, monospace; padding: 6px 8px; border-radius: 6px; white-space: pre; pointer-events: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; } }

/* boxing HUD */
.scoreboard.sb-boxing { left: 0; right: 0; top: 2vh; }
.bx-hud { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2.4vw; padding: 0 3vw; align-items: center; }
.bx-name { display: flex; align-items: center; gap: .8vh; font-family: var(--display); font-size: 2.8vh; color: var(--paper); filter: drop-shadow(0 .3vh 0 rgba(0,0,0,.4)); }
.bx-name i { width: 1.8vh; height: 1.8vh; border-radius: 50%; }
.bx-name .kd { color: var(--coral); font-size: 1.8vh; }
.bx-side.right .bx-name { justify-content: flex-end; flex-direction: row-reverse; }
.bx-bar { margin-top: .6vh; height: 2.6vh; background: rgba(8,14,28,.75); border: .4vh solid var(--paper); border-radius: 99px; overflow: hidden; }
.bx-bar span { display: block; height: 100%; border-radius: 99px; transition: width .25s cubic-bezier(.2,1.4,.4,1), background .3s; }
.bx-side.right .bx-bar span { margin-left: auto; }
.bx-mid { background: var(--ink); color: var(--paper); padding: .7vh 2.2vh; border-radius: 1.6vh; text-align: center; display: grid; line-height: 1.05; box-shadow: 0 .5vh 0 rgba(0,0,0,.3); }
.bx-mid b { font-family: var(--display); font-weight: 400; font-size: 2vh; color: var(--sun); letter-spacing: .08em; }
.bx-mid span { font-family: var(--display); font-size: 3.6vh; }
.sw-hud { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2.4vw; padding: 0 3vw; align-items: center; }
.sw-side { display: flex; align-items: center; gap: 1vh; font-family: var(--display); font-size: 3vh; color: var(--paper); filter: drop-shadow(0 .35vh 0 rgba(0,0,0,.35)); }
.sw-side.right { justify-content: flex-end; }
.sw-side i { width: 2vh; height: 2vh; border-radius: 50%; }
.sw-side em { display: flex; gap: .6vh; }
.sw-side em b { width: 2.4vh; height: 2.4vh; border-radius: 50%; border: .4vh solid var(--paper); background: rgba(0,0,0,.3); }
.sw-side em b.won { background: var(--sun); box-shadow: 0 0 1.2vh var(--sun); }
/* bowling score sheet */
.scoreboard.sb-bowling { left: 50%; transform: translateX(-50%); top: 1.8vh; }
.bw-sheet { display: grid; gap: .4vh; }
.bw-row { display: flex; align-items: stretch; gap: .25vh; background: rgba(13,19,40,.82); border-radius: 1vh; padding: .35vh; opacity: .72; }
.bw-row.on { opacity: 1; outline: .3vh solid var(--accent); }
.bw-name { display: flex; align-items: center; gap: .7vh; width: 15vh; padding: 0 .8vh; font-family: var(--display); font-size: 2vh; color: var(--paper); white-space: nowrap; overflow: hidden; }
.bw-name i { width: 1.4vh; height: 1.4vh; border-radius: 50%; flex: none; }
.bw-f { display: grid; grid-template-rows: auto auto; background: var(--paper); color: var(--ink); border-radius: .5vh; width: 6vh; text-align: center; }
.bw-f.now { background: #fff3c4; box-shadow: inset 0 0 0 .25vh var(--sun); }
.bw-f em { display: flex; justify-content: flex-end; font-style: normal; font-weight: 800; font-size: 1.6vh; line-height: 2.1vh; }
.bw-f em i { font-style: normal; width: 2vh; border-left: .15vh solid #d0d6de; }
.bw-f b { font-family: var(--display); font-weight: 400; font-size: 2vh; line-height: 2.3vh; }
.bw-total { display: grid; place-items: center; min-width: 6.5vh; font-family: var(--display); font-size: 2.8vh; color: var(--sun); }
/* archery */
.reticle { position: absolute; width: calc(7vh * var(--k, 1)); height: calc(7vh * var(--k, 1)); transform: translate(-50%, -50%); border: .45vh solid rgba(255,255,255,.95); border-radius: 50%; box-shadow: 0 0 0 .3vh rgba(16,34,51,.55), inset 0 0 0 .3vh rgba(16,34,51,.4); transition: width .08s, height .08s, border-color .2s; pointer-events: none; }
.reticle::before, .reticle::after { content: ''; position: absolute; left: 50%; top: 50%; background: rgba(255,255,255,.95); box-shadow: 0 0 0 .2vh rgba(16,34,51,.5); transform: translate(-50%, -50%); }
.reticle::before { width: .45vh; height: 2.2vh; }
.reticle::after { width: 2.2vh; height: .45vh; }
.reticle.gold { border-color: var(--sun); }
.reticle.tired { border-color: #ff7a6a; animation: reticle-shake .16s linear infinite; }
@keyframes reticle-shake { 0%, 100% { margin: 0; } 25% { margin: .25vh 0 0 -.25vh; } 75% { margin: -.25vh 0 0 .25vh; } }
.reticle.full { animation: ret 0.6s ease-in-out infinite; }
@keyframes ret { 50% { box-shadow: 0 0 0 .3vh rgba(16,34,51,.55), 0 0 2vh var(--sun); } }
.scoreboard.sb-archery { left: 2.2vw; top: 2.6vh; }
.ar-board { display: grid; gap: .3vh; min-width: 30vh; }
.ar-row { display: grid; grid-template-columns: 1.4vh 1fr auto 5vh; gap: 1vh; align-items: center; background: var(--paper); color: var(--ink); border-radius: .8vh; padding: .4vh 1vh; font-weight: 800; font-size: 2.1vh; opacity: .8; }
.ar-row.on { opacity: 1; box-shadow: inset .6vh 0 0 var(--accent); }
.ar-dot { width: 1.4vh; height: 1.4vh; border-radius: 50%; }
.ar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 18vh; }
.ar-end { display: flex; gap: .3vh; }
.ar-end i { font-style: normal; font-family: var(--display); font-size: 1.7vh; background: #e7edf2; border-radius: .5vh; min-width: 2.6vh; text-align: center; }
.ar-end i.gold { background: #ffe38a; }
.ar-row b { font-family: var(--display); font-weight: 400; text-align: right; }
.ar-wind { justify-self: start; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 1.8vh; padding: .3vh 1.2vh; border-radius: 99px; }
.ar-wind b { color: var(--sun); font-size: 2.4vh; }

/* Motion reminder: see-through, no card, only during the countdown. */
.guide { position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%); display: flex; align-items: center; gap: 3vh; pointer-events: none; z-index: 30; opacity: .88; filter: drop-shadow(0 .5vh 1vh rgba(0, 0, 0, .35)); animation: guide-in .5s ease-out both; transition: opacity .6s ease; }
.guide.out { opacity: 0; }
.guide[hidden] { display: none; }
@keyframes guide-in { from { opacity: 0; transform: translateX(-50%) translateY(2vh); } }
.guide-art svg { display: block; width: 30vh; height: auto; }
.guide-extra:empty, .guide-who:empty { display: none; }
.guide-extra svg { display: block; width: 18vh; height: auto; opacity: .9; }
.guide-who { display: none; }
/* Moment of the match: a Polaroid of the best (or funniest) beat. */
/* The Polaroid sits top-left, small: the winner celebrates between it and the card. */
.moment { position: absolute; left: 2.6vw; top: 4.5vh; margin: 0; width: 34vh; padding: 1.3vh 1.3vh .8vh; background: #fffdf6; border-radius: .6vh; box-shadow: 0 2vh 4vh rgba(0,0,0,.4); transform: rotate(-5deg); animation: moment-in .9s .6s cubic-bezier(.2,1.3,.4,1) both; z-index: 2; }
.moment[hidden] { display: none; }
@keyframes moment-in { from { transform: translateY(8vh) rotate(-18deg) scale(.6); opacity: 0; } }
.moment-img canvas { display: block; width: 100%; height: auto; border-radius: .3vh; animation: develop 1.8s 1.1s ease-out both; }
@keyframes develop { from { filter: brightness(2.4) saturate(0); } }
.moment figcaption { display: flex; align-items: center; gap: 1.2vh; padding-top: 1.2vh; color: var(--ink); }
.moment figcaption i { width: 5vh; height: 5vh; border-radius: 50%; background: center / cover no-repeat #fff; box-shadow: 0 0 0 .45vh var(--pc, #fff); flex: none; }
.moment figcaption b { font: 400 3vh/1 var(--display); letter-spacing: .02em; }
/* ---- golf: backswing bar (left), club + distance (bottom-left), hole map (right) */
.golf-bar { position: absolute; left: 2.6vw; top: 31vh; bottom: 16vh; width: 5vh; border-radius: 3vh; background: rgba(16,34,51,.55); box-shadow: 0 0 0 .5vh #fff, 0 .8vh 0 .5vh rgba(0,0,0,.2); overflow: hidden; }
.golf-bar i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #4fd1c5; border-radius: 0 0 3vh 3vh; transition: height .05s linear, background .15s; }
.golf-bar b { position: absolute; z-index: 1; left: 0; right: 0; bottom: 78.3%; height: 8.7%; background: rgba(127,243,160,.3); border-top: .35vh solid #fff; border-bottom: .35vh solid #fff; }
.golf-bar::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 13%; background: repeating-linear-gradient(135deg, rgba(255,107,94,.55) 0 .8vh, rgba(255,107,94,.3) .8vh 1.6vh); }
.golf-club { position: absolute; left: 2.2vw; bottom: 4vh; display: flex; align-items: center; gap: 1.2vh; background: rgba(16,34,51,.72); color: #fff; border-radius: 99px; padding: .6vh 2.2vh .6vh .6vh; box-shadow: 0 0 0 .4vh #fff, 0 .6vh 0 .4vh rgba(0,0,0,.2); }
.golf-club i { width: 5.6vh; height: 5.6vh; border-radius: 50%; background: #7bd88f; color: #102233; font-family: var(--display); font-style: normal; display: grid; place-items: center; font-size: 3.2vh; }
.golf-club b { font-family: var(--display); font-weight: 400; font-size: 3.2vh; letter-spacing: .04em; }
.golf-club small { font-weight: 800; font-size: 2.4vh; opacity: .85; }
.golf-map { position: absolute; right: 2.2vw; top: 3vh; width: 27vh; height: 36vh; border-radius: 2.6vh; box-shadow: 0 0 0 .45vh #fff, 0 .8vh 0 .45vh rgba(0,0,0,.2); }
.golf-wind { position: absolute; right: 2.2vw; top: 41vh; width: 27vh; display: flex; align-items: center; justify-content: center; gap: 1.2vh; background: rgba(16,34,51,.72); color: #fff; border-radius: 99px; padding: .7vh 1.6vh; box-shadow: 0 0 0 .4vh #fff, 0 .6vh 0 .4vh rgba(0,0,0,.2); }
.golf-wind svg { width: 4.6vh; height: 4.6vh; transition: transform .4s; }
.golf-wind b { font-family: var(--display); font-weight: 400; font-size: 3vh; letter-spacing: .04em; }
.golf-wind.calm svg { opacity: .35; }

/* ---------------------------------------------------------------- awards */
/* Bottom-left ribbons, stamped in one by one: the roast of the match. */
.awards { position: absolute; left: 2.6vw; bottom: 4.5vh; width: min(44vw, 86vh); display: flex; flex-direction: column; gap: 1.2vh; z-index: 3; pointer-events: none; }
.award { display: flex; align-items: center; gap: 1.6vh; background: var(--paper); color: var(--ink); border-radius: 99px; padding: .9vh 2.8vh .9vh .9vh; box-shadow: 0 .8vh 0 rgba(0,0,0,.2), 0 1.6vh 3vh rgba(0,0,0,.25); border: .45vh solid #ffc93c; animation: award-in .55s cubic-bezier(.2,1.6,.4,1) both; transform-origin: 12% 50%; }
.award.fun { border-color: #ff6fae; background: #fff4fa; }
@keyframes award-in { 0% { opacity: 0; transform: translateX(-20vw) rotate(-8deg) scale(1.25); } 70% { opacity: 1; transform: translateX(1vw) rotate(1deg) scale(.98); } }
.aw-face { position: relative; flex: none; width: 8vh; height: 8vh; border-radius: 50%; background: center 30% / cover no-repeat var(--pc); box-shadow: 0 0 0 .45vh var(--pc); display: grid; place-items: center; font-style: normal; font: 400 4vh/1 var(--display); color: #fff; }
.aw-face em { position: absolute; right: -1.2vh; bottom: -1vh; font-style: normal; font-size: 4.2vh; line-height: 1; filter: drop-shadow(0 .4vh 0 rgba(0,0,0,.25)); animation: award-icon 1.6s ease-in-out infinite; }
@keyframes award-icon { 50% { transform: rotate(-12deg) scale(1.12); } }
.aw-t { display: grid; gap: .2vh; min-width: 0; }
.aw-t b { font: 400 3.3vh/1 var(--display); letter-spacing: .03em; color: #b27a00; white-space: nowrap; }
.award.fun .aw-t b { color: #d6337f; }
.aw-t span { font-weight: 700; font-size: 2.1vh; line-height: 1.2; opacity: .85; }
.aw-t strong { font-weight: 800; }

/* ---------------------------------------------------------------- couch reactions */
.reacts { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none !important; overflow: hidden; z-index: 40; }
.react { position: absolute; bottom: -10vh; width: 7.5vh; height: 7.5vh; margin-left: -3.75vh; animation: react-up 2.5s cubic-bezier(.25,.8,.4,1) forwards; }
.react i { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; background: center 30% / cover no-repeat var(--pc); box-shadow: 0 0 0 .5vh var(--pc), 0 .8vh 1.6vh rgba(0,0,0,.35); display: grid; place-items: center; font: 400 3.4vh/1 var(--display); color: #fff; font-style: normal; }
.react em { position: absolute; right: -2.2vh; top: -2.4vh; font-style: normal; font-size: 5.2vh; line-height: 1; filter: drop-shadow(0 .4vh 0 rgba(0,0,0,.25)); animation: react-wob .5s ease-in-out infinite alternate; }
.react.burst { width: 0; height: 0; margin: 0; animation-duration: 3s; }
.react.burst em { position: absolute; right: auto; top: auto; left: 0; bottom: 0; font-size: 9vh; transform: translateX(-50%); }
@keyframes react-up {
  0% { transform: translate(0, 0) scale(.4); opacity: 0; }
  12% { transform: translate(calc(var(--sway) * .2), -14vh) scale(1.08); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(var(--sway), -58vh) scale(.9); opacity: 0; }
}
@keyframes react-wob { from { transform: rotate(-10deg) scale(1); } to { transform: rotate(10deg) scale(1.12); } }

/* ---------------------------------------------------------------- instant replay */
body.replaying .ui-layer > :not(.screen-flash) { opacity: 0 !important; transition: opacity .2s; }
.replay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none !important; z-index: 30; }
.replay[hidden] { display: none; }
.rp-bar { position: absolute; left: 0; right: 0; height: 9vh; background: #0b1622; animation: rp-bar .35s cubic-bezier(.2,1,.3,1) both; }
.rp-bar.top { top: 0; transform-origin: top; } .rp-bar.bottom { bottom: 0; transform-origin: bottom; }
@keyframes rp-bar { from { transform: scaleY(0); } }
.rp-badge { position: absolute; left: 3vw; top: 11.5vh; display: flex; align-items: center; gap: 1.2vh; padding: .8vh 2vh .8vh 1.4vh; border-radius: 1vh; background: rgba(11,22,34,.82); color: #fff; font: 400 3.4vh/1 var(--display); letter-spacing: .12em; animation: rp-in .45s .1s cubic-bezier(.2,1.5,.4,1) both; }
.rp-badge i { width: 1.8vh; height: 1.8vh; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 1.2vh #ff3b3b; animation: rp-dot 1s steps(2, jump-none) infinite; }
.rp-badge b { font-weight: 400; color: var(--sun); letter-spacing: .06em; margin-left: .6vh; }
.rp-badge b:empty { display: none; }
@keyframes rp-in { from { transform: translateX(-30vw); } }
@keyframes rp-dot { 50% { opacity: .15; } }
