/* Caretta Party: a beach party in Nadidle's bay (docs/caretta/FRONTEND.md, ART.md §6). The bay is seen from the beach:
   the sky on top (painted by Turkey's clock), the sea with the turtles' ring, the sand at the bottom. The pictures
   come from scripts/art/party.py; parti.js places them. Type: Departure Mono, as in Nadidle. */
@font-face { font-family: "Departure Mono"; src: url("/parti/DepartureMono.woff2") format("woff2"); font-display: swap; }
:root {
  --cream: #F4EAD5; --ink: #14233f; --navy: #1D2B4F; --teal: #1F9AA8; --red: #C8372D; --gold: #E3B341; --coral: #E86A5C;
  --wood: #9a6434; --wood-d: #6e4320; --wood-l: #b98045;
  --t-malum: #a9bbd6; --t-bilmis: #d9a46b; --t-kiymetli: #4de3ff; --t-nadir: #ff5a6e; --t-mustesna: #c39bff; --t-nadide: #ffd166;
  --px: "Departure Mono", ui-monospace, monospace;
  --s: 1;                       /* the ring's size on this screen (parti.js) */
  --lum: 1;                     /* how bright the sprites are at this hour */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0b3a5c; color: var(--ink); font: 15px/1.4 var(--px); overscroll-behavior: none; }
body { overflow: hidden; }
#app { position: fixed; left: 0; top: 0; width: 100%; height: var(--vh, 100dvh); overflow: hidden; background: #f9c15e; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---- the scene ---- */
.scene { position: absolute; inset: 0; overflow: hidden; user-select: none; isolation: isolate; pointer-events: none; }
.sky { position: absolute; left: 0; right: 0; top: 0; overflow: hidden; }
.sky canvas { position: absolute; left: 0; top: 0; }
#stars { width: 100%; height: 100%; }
.sun { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.moon { image-rendering: pixelated; transform: translate(-50%, -50%); }
.clouds { position: absolute; inset: 0; filter: brightness(var(--cloud, 1)); }
.cloud { position: absolute; left: 0; background: url("img/clouds.png") no-repeat; animation: drift linear infinite; will-change: transform; }
@keyframes drift { from { transform: translateX(var(--from)); } to { transform: translateX(var(--to)); } }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; isolation: isolate; }
.world .bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  /* until the picture has come (a slow phone): sea and sand in its place, not the page's sand colour up to the horizon */
  background: linear-gradient(transparent 31%, #1596cf 31%, #25b3d6 55%, #6fd6c6 76%, #f9c15e 81%); }
.gulet { position: absolute; transform-origin: 50% 93%; animation: rock 4.4s ease-in-out infinite; filter: brightness(var(--lum)); }
.gulet i { position: absolute; background-repeat: no-repeat; background-size: 100% 100%; }
.gulet .hull { inset: 0; background-image: url("img/gulet.png"); }
.gulet .flag { background-image: url("img/flag.png"); transform-origin: 100% 50%; animation: flag 1.1s ease-in-out infinite; }
@keyframes rock { 0%, 100% { transform: rotate(-.7deg); } 50% { transform: rotate(.7deg) translateY(1px); } }
@keyframes flag { 0%, 100% { transform: skewY(-5deg) scaleX(1); } 50% { transform: skewY(5deg) scaleX(.94); } }
.glint { position: absolute; height: 2px; background: #fff; opacity: 0; animation: glint ease-in-out infinite; }
@keyframes glint { 0%, 60%, 100% { opacity: 0; } 30% { opacity: var(--a, .6); } }
/* the picture ends in sand: its last rows melt into the sand colour the page goes on with */
.sandfade { position: absolute; left: 0; right: 0; bottom: 0; height: 6%; background: linear-gradient(transparent, var(--sand)); }
.prop { position: absolute; background-repeat: no-repeat; background-size: 100% 100%; }
/* dusk and night lie over the picture only (its own shape is the mask), never over the painted sky */
.veil { position: absolute; inset: 0; background: #39468f; mix-blend-mode: multiply; opacity: 0; pointer-events: none;
  -webkit-mask: var(--mask) 0 0 / 100% 100% no-repeat; mask: var(--mask) 0 0 / 100% 100% no-repeat; }
.veil.warm { background: #ff9a52; mix-blend-mode: soft-light; }
.light { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle, rgba(255,214,130,.85) 0, rgba(255,190,90,.35) 30%, rgba(255,180,80,0) 70%); animation: flicker 2.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: var(--on, 0); } 45% { opacity: calc(var(--on, 0) * .82); } 60% { opacity: calc(var(--on, 0) * .95); } }
.gull { position: absolute; left: 0; top: 0; animation: fly linear infinite; will-change: transform; }
.gull i { display: block; background: url("img/gulls.png") 0 0 / 400% 100% no-repeat; animation: flap .55s steps(4) infinite; }
.gull.back i { transform: scaleX(-1); }
@keyframes fly { from { transform: translate(var(--from), var(--y0)); } to { transform: translate(var(--to), var(--y1)); } }
@keyframes flap { to { background-position: -400% 0; } }

/* ---- the ring ---- */
.ring { position: absolute; inset: 0; }
.seat { position: absolute; width: 0; height: 0; transition: left .8s cubic-bezier(.3,.7,.3,1), top .8s cubic-bezier(.3,.7,.3,1); --u: calc(1.5 * var(--s) * var(--d, 1)); }
.seat.new { transition: none; }
.body { position: absolute; left: 0; top: 0; width: calc(53px * var(--u)); height: calc(35px * var(--u)); margin: calc(-17.5px * var(--u)) 0 0 calc(-26.5px * var(--u)); filter: brightness(var(--lum)); }
.bob { position: absolute; inset: 0; animation: bob 2.8s ease-in-out infinite; animation-delay: var(--ph, 0s); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(2.5px * var(--s))); } }
.turtle { position: absolute; inset: 0; background: url("img/turtle.png") no-repeat;
  background-size: calc(424px * var(--u)) calc(210px * var(--u));
  background-position: calc(-53px * var(--f, 0) * var(--u)) calc(-35px * var(--l, 0) * var(--u)); }
.seat.flip .turtle { transform: scaleX(-1); }
/* the pass: the header frames (turtle-head.png: front, back, windup, hit, smile; one row per look) lie over the turtle,
   their shell on its shell, while it leaps and turns; --hm mirrors a frame for the turn's other side */
.hturtle { position: absolute; display: none; left: calc(var(--hx) * 1px * var(--u)); top: calc(var(--hy) * 1px * var(--u)); width: calc(var(--hw) * 1px * var(--u)); height: calc(var(--hh) * 1px * var(--u));
  background: url("img/turtle-head.png") no-repeat; background-size: calc(var(--hw) * var(--hn) * 1px * var(--u)) calc(var(--hh) * 6px * var(--u));
  background-position: calc(var(--hw) * -1px * var(--hf, 0) * var(--u)) calc(var(--hh) * -1px * var(--l, 0) * var(--u)); transform: scaleX(var(--hm, 1)); }
.seat.flip .hturtle { transform: scaleX(calc(-1 * var(--hm, 1))); }
.seat.head .hturtle { display: block; }
.seat.head .turtle { visibility: hidden; }
.seat.head .bob { animation: headleap 1.25s cubic-bezier(.3,.7,.4,1); }
@keyframes headleap { 0%, 100% { transform: translateY(0); } 12% { transform: translateY(calc(3px * var(--s))); } 40% { transform: translateY(calc(-24px * var(--s))); } 48% { transform: translateY(calc(-28px * var(--s))); } 72% { transform: translateY(calc(-5px * var(--s))); } 86% { transform: translateY(calc(3px * var(--s))); } }
/* while its holder turns, the ball is tossed up from the water to head height, where the header meets it */
.ball[data-mode="held"] { animation: balltoss .56s cubic-bezier(.3,.6,.5,1) forwards; }
@keyframes balltoss { 0% { transform: translateY(0); } 35% { transform: translateY(calc(4px * var(--s))); } 100% { transform: translateY(calc(-34px * var(--s))); } }
.ball[data-mode="drop"] { animation: balldrop .5s cubic-bezier(.3,.6,.4,1.4); }
@keyframes balldrop { from { transform: translateY(calc(-120px * var(--s))) scale(.5); opacity: 0; } 60% { opacity: 1; } }
/* in the water: the flippers show through it, and a ring of foam lies round the shell */
.seat:not(.dry) .turtle { -webkit-mask: linear-gradient(#000 0 58%, rgba(0,0,0,.42) 78%); mask: linear-gradient(#000 0 58%, rgba(0,0,0,.42) 78%); }
.ripple { position: absolute; left: 8%; right: 8%; top: 52%; height: 34%; border-radius: 50%; border: calc(1.5px * var(--s)) solid rgba(255,255,255,.55);
  background: rgba(0,60,90,.14); animation: ripple 2.8s ease-in-out infinite; animation-delay: var(--ph, 0s); }
@keyframes ripple { 0%, 100% { transform: scale(.94); opacity: .9; } 50% { transform: scale(1.08); opacity: .45; } }
.seat.dry .ripple { border: 0; background: rgba(90,50,10,.22); top: 70%; height: 26%; left: 4%; right: 4%; animation: none; }
.seat.dry .bob { animation: none; }
.towel { position: absolute; left: 50%; top: 58%; width: calc(45px * var(--u) * 1.15); height: calc(25px * var(--u) * 1.15); transform: translate(-50%, -30%);
  background: url("img/prop-towel.png") 0 0 / 100% 100% no-repeat; display: none; }
.seat.wait .towel { display: block; }
.tea { position: absolute; left: 96%; top: 46%; width: calc(16px * var(--u)); height: calc(15px * var(--u)); background: url("img/prop-tea.png") 0 0 / 100% 100% no-repeat; display: none; }
.seat.out .tea { display: block; }
.seat.flip .tea { left: auto; right: 96%; }
.crown { position: absolute; left: 50%; top: -52%; width: calc(14px * var(--u)); height: calc(14px * var(--u)); margin-left: calc(-7px * var(--u)); background: url("img/nazar.png") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated; display: none; animation: bob 1.2s ease-in-out infinite; }
.seat.win .crown { display: block; }
.seat.holder .ripple { border-color: rgba(255,224,130,.95); box-shadow: 0 0 calc(10px * var(--s)) rgba(255,214,102,.7); }
.seat.away .body { opacity: .55; }
.seat.spin .turtle { animation: spin .6s ease-in-out; }
.seat.flip.spin .turtle { animation: spinf .6s ease-in-out; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinf { from { transform: scaleX(-1) rotate(0); } to { transform: scaleX(-1) rotate(360deg); } }
.seat.jump .bob { animation: jump .7s cubic-bezier(.3,.6,.4,1); }
@keyframes jump { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(calc(-26px * var(--s))) rotate(-8deg); } }
.seat.dunk .bob { animation: dunk .5s ease-out; }
@keyframes dunk { 30% { transform: translateY(calc(9px * var(--s))); } }
.seat.catch .bob { animation: catch .3s ease-out; }
@keyframes catch { 40% { transform: translateY(calc(4px * var(--s))); } }
.seat.win .bob { animation: jump .8s cubic-bezier(.3,.6,.4,1) infinite; }

.tag { position: absolute; left: 0; top: calc(18px * var(--u)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; }
.plate { max-width: 104px; padding: 1px 6px 0; border-radius: 3px; background: rgba(13,27,54,.86); color: var(--cream); font-size: 11px; line-height: 15px;
  overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.seat.me .plate { background: var(--teal); color: #fff; }
.plate .star { color: var(--gold); }
.plate .z { color: #9fb0d8; }
.hearts { display: flex; gap: 1px; height: 10px; align-items: center; font-size: 10px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.heart { width: 10px; height: 9px; background: var(--red); clip-path: polygon(10% 0, 40% 0, 50% 12%, 60% 0, 90% 0, 100% 12%, 100% 45%, 50% 100%, 0 45%, 0 12%); filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); }
.heart.e { background: rgba(13,27,54,.45); }
.hearts.hit { animation: hit .5s steps(2) 2; }
@keyframes hit { 50% { opacity: .2; } }
.meter { height: 5px; width: 56px; background: rgba(13,27,54,.7); display: flex; overflow: hidden; border-radius: 2px; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.meter i { display: block; height: 100%; }
/* out of the game, lying on the sand: only the name, over the turtle */
.seat.out .tag { top: auto; bottom: calc(19px * var(--u)); }
.seat.out .hearts, .seat.out .meter, .seat.lobby .hearts, .seat.lobby .meter, .seat.win .hearts, .seat.win .meter, .seat.out .bubble { display: none; }
.seat.out .plate { background: rgba(13,27,54,.6); font-size: 10px; }
.seat.out .body { filter: brightness(var(--lum)) saturate(.6); }

.bubble { position: absolute; left: 0; bottom: calc(21px * var(--u)); transform: translateX(var(--bx, -50%)); min-width: 28px; max-width: 168px; padding: 3px 8px 2px;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; font-size: 13px; line-height: 16px; text-align: center; overflow-wrap: anywhere; z-index: 4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; width: max-content; }
/* the holder's bubble sits above the ball, and rises as the ball swells (--bl: the ball's size now, set by parti.js) */
/* the ball is in front of the nose now, as tall as the head and more: the bubble clears its top (it was half behind it) */
.seat.holder .bubble { bottom: calc((21px + 28px * var(--bl, 1)) * var(--u)); }
.bubble.tier { font-weight: 700; }
.bubble.shake { animation: shake .4s; text-decoration: line-through; color: var(--red); }
@keyframes shake { 20%, 60% { margin-left: -5px; } 40%, 80% { margin-left: 5px; } }

/* the beach ball: it swells and reddens with the time held (never with the fuse) */
/* in front of every turtle and its name, hearts and meter (their z-index is their place on the screen) */
.ball { position: absolute; width: 0; height: 0; z-index: 9000; pointer-events: none; --b: calc(1.15 * var(--s)); filter: brightness(var(--lum)); }
.ball i { position: absolute; left: calc(-22px * var(--b)); top: calc(-20px * var(--b)); width: calc(44px * var(--b)); height: calc(40px * var(--b));
  background: url("img/ball.png") 0 0 / 400% 100% no-repeat; transform-origin: var(--ox, 50%) 70%; transition: transform .7s cubic-bezier(.3,1.6,.5,1), filter .6s; }
/* it swells a lot (owner, 28 Nov 2026: "iyice abartalım"), upwards from where it sits, so the turtle under it stays in view.
   The sheet's frames: with a picture 4 frames wide, frame k is at k/3 of 100% (a negative percentage threw the picture
   out of the box, so the level-5 ball and the burst were never drawn) */
.ball i { transform: scale(var(--bl, 1)); transition: transform var(--blt, .55s) linear, filter .8s; }   /* the size is set every half second and glides between: one even swell, never a jump */
.ball.l2 i { filter: saturate(1.25); }
.ball.l3 i { filter: sepia(.3) saturate(1.9) hue-rotate(-14deg); animation: tremble .3s infinite; }
.ball.l4 i { filter: sepia(.5) saturate(2.6) hue-rotate(-24deg); animation: tremble .16s infinite; }
.ball.l5 i { background-position: 33.333% 0; filter: sepia(.65) saturate(3.2) hue-rotate(-30deg) drop-shadow(0 0 8px rgba(255,60,40,.95)); animation: tremble .08s infinite, throb .5s ease-in-out infinite; }
@keyframes throb { 50% { scale: 1.08; } }
@keyframes tremble { 25% { margin-left: 1.5px; } 75% { margin-left: -1.5px; } }
.ball[data-mode="fly"] i { animation: roll .85s linear; }
.ball[data-mode="land"] { animation: ballland .34s ease-out; }
@keyframes ballland { 30% { transform: translateY(calc(5px * var(--s))) scale(1.18, .8); } 65% { transform: translateY(calc(-4px * var(--s))) scale(.94, 1.08); } }
@keyframes roll { to { rotate: 360deg; } }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 9500; }
.burst, .rag { position: absolute; width: 0; height: 0; --b: calc(1.15 * var(--s)); }
.burst i, .rag i { position: absolute; left: calc(-22px * var(--b)); top: calc(-20px * var(--b)); width: calc(44px * var(--b)); height: calc(40px * var(--b)); background: url("img/ball.png") 66.667% 0 / 400% 100% no-repeat; }
.burst i { animation: burst .32s ease-out forwards; }
@keyframes burst { from { transform: scale(1.6); } to { transform: scale(4.2); opacity: 0; } }
.rag i { background-position: 100% 0; animation: rag 1.6s ease-in forwards; }
@keyframes rag { 0% { transform: translateY(-10px) scale(.9); } 25% { transform: translateY(calc(26px * var(--s))) scale(.8); } 100% { transform: translateY(calc(30px * var(--s))) scale(.75); opacity: 0; } }
.spark { position: absolute; width: 5px; height: 5px; background: var(--c, #fff); animation: spark .7s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.drop { position: absolute; width: 4px; height: 6px; border-radius: 2px; background: #dff6ff; animation: drop .6s cubic-bezier(.2,.6,.6,1) forwards; }
@keyframes drop { 50% { transform: translate(calc(var(--dx) * .6), var(--dy)); } 100% { transform: translate(var(--dx), 6px); opacity: 0; } }
.toast { position: absolute; transform: translateX(-50%); padding: 2px 9px 1px; border-radius: 4px; background: var(--ink); border: 2px solid var(--gold);
  font-size: 13px; color: var(--gold); white-space: nowrap; animation: toast 1.7s ease-out forwards; }
@keyframes toast { 0% { margin-top: 8px; opacity: 0; } 15% { margin-top: 0; opacity: 1; } 75% { opacity: 1; } 100% { margin-top: -34px; opacity: 0; } }
.countdown { position: absolute; left: 50%; transform: translate(-50%, -50%); font-size: 96px; line-height: 1; color: #fff; text-shadow: 0 5px 0 var(--ink), 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 -4px 0 var(--ink); animation: pop .9s ease-out; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } }

/* ---- the top: wooden signs ---- */
.top { position: absolute; left: 0; right: 0; top: 0; z-index: 50; padding: max(8px, env(safe-area-inset-top)) 10px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.top > * { pointer-events: auto; }
.title { margin: 8px 0 0; font: 400 clamp(34px, 10vw, 56px)/1 var(--px); color: #fff; letter-spacing: .02em; text-align: center;
  text-shadow: 0 4px 0 var(--navy), 3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 -3px 0 var(--navy), 3px 4px 0 var(--navy), -3px 4px 0 var(--navy); }
.title span { color: #ffd166; display: block; }
.sign { width: min(100%, 540px); padding: 6px 10px 8px; border: 3px solid var(--wood-d); border-radius: 7px; color: var(--cream);
  background: repeating-linear-gradient(180deg, var(--wood) 0 17px, #8c5a2d 17px 18px, var(--wood-l) 18px 19px); box-shadow: 0 4px 0 rgba(60,32,10,.55), inset 0 2px 0 rgba(255,220,160,.25); }
.sign-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.chip { padding: 1px 7px 0; border-radius: 3px; background: rgba(50,26,8,.55); color: #ffe6b8; letter-spacing: .04em; }
.chip.dim { margin-left: auto; color: #e9cfa6; }
.chip.gold { background: var(--gold); color: #3a2208; }
.card { text-align: center; padding: 4px 2px 0; }
.card-text { font-size: clamp(16px, 4.6vw, 21px); line-height: 1.25; color: #fff; text-shadow: 0 2px 0 rgba(50,26,8,.75); text-wrap: balance; }
.sign.cleared { animation: cleared 1.3s ease-in forwards; }
@keyframes cleared { 25% { transform: scale(1.04) rotate(-1deg); } 100% { transform: translateY(-130%) rotate(3deg); } }
.sign.fresh { animation: fresh .55s cubic-bezier(.3,1.4,.5,1); }
@keyframes fresh { from { transform: translateY(-120%); } }
.room { width: auto; min-width: 230px; text-align: center; padding: 8px 14px 10px; display: flex; align-items: center; gap: 12px; }
.room[hidden] { display: none; }
.room-qr { flex: none; width: 96px; height: 96px; padding: 3px; border: 3px solid var(--wood-d); border-radius: 5px; background: #f4ead5; box-sizing: border-box; }
.room-qr svg { display: block; width: 100%; height: 100%; }
@media (min-width: 900px) { .room-qr { width: 132px; height: 132px; } }
.room-label { font-size: 10px; letter-spacing: .08em; color: #ffe6b8; }
.code-big { font-size: 38px; line-height: 1.15; letter-spacing: .2em; margin-right: -.22em; color: #fff; text-shadow: 0 3px 0 rgba(50,26,8,.75); }
.chip.status { flex: 0 1 auto; min-width: 0; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(13,27,54,.75); color: #fff; }
.chip.status.gold { background: #ffd166; color: #3a2208; animation: nudge 1s ease-in-out infinite; }
.chip.status + .chip.dim { margin-left: 0; }
@keyframes nudge { 50% { transform: scale(1.07); } }

/* ---- the bottom ---- */
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; padding: 0 10px max(10px, env(safe-area-inset-bottom)); pointer-events: none; }
.dock > * { pointer-events: auto; width: min(100%, 540px); }
.panel { padding: 12px 14px; border: 3px solid var(--navy); border-radius: 9px; background: var(--cream); text-align: center; box-shadow: 0 4px 0 rgba(13,27,54,.45); max-height: calc(var(--vh, 100dvh) * .62); overflow: auto; }
.lead { margin: 0 0 8px; font-size: 13px; color: #3d4a66; }
.field { display: block; text-align: left; font-size: 12px; color: #56617a; }
.field input, .join input { display: block; width: 100%; margin-top: 3px; padding: 9px 10px; font-size: 16px; color: var(--ink); background: #fff; border: 2px solid var(--navy); border-radius: 5px; }
.looks { display: flex; justify-content: center; gap: 4px; margin: 10px 0; }
.looks button { flex: 1; max-width: 76px; aspect-ratio: 53 / 40; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #bfe9ee; position: relative; overflow: hidden; }
.looks button[aria-checked="true"] { border-color: var(--navy); background: #7fd6df; box-shadow: 0 2px 0 var(--navy); }
.looks i { position: absolute; left: 50%; top: 52%; --u: .95; width: calc(53px * var(--u)); height: calc(35px * var(--u)); margin: calc(-17.5px * var(--u)) 0 0 calc(-26.5px * var(--u));
  background: url("img/turtle.png") no-repeat; background-size: calc(424px * var(--u)) calc(210px * var(--u)); background-position: 0 calc(-35px * var(--l, 0) * var(--u)); }
.row { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.join input { flex: 0 0 5.6em; width: 5.6em; margin: 0; text-transform: uppercase; text-align: center; letter-spacing: .18em; }
.join .btn { flex: 1; }
.btn { padding: 9px 14px 8px; border: 2px solid var(--navy); border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--navy); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--navy); }
.btn.primary { background: var(--teal); color: #fff; }
.btn.wide { width: 100%; }
.btn.small { margin-top: 4px; padding: 4px 10px 3px; font-size: 12px; border-color: var(--wood-d); box-shadow: 0 2px 0 var(--wood-d); background: #ffe9c4; color: #4a2c12; }
.btn:disabled { opacity: .45; }
.btn[aria-pressed="true"] { background: #d9f3d0; }
.btn.call { background: var(--gold); animation: nudge 1s ease-in-out infinite; }
.msg { color: var(--red); font-size: 13px; min-height: 1.3em; margin: 6px 0 0; }
.sub { color: #56617a; font-size: 12px; margin: 0 0 2px; min-height: 1.2em; }
.lobby .row { margin: 6px 0; }
.lobby .btn { flex: 1; }

.bar { padding: 0; position: relative; text-align: center; }
.bar .msg { position: absolute; left: 50%; bottom: calc(100% + 5px); transform: translateX(-50%); margin: 0; min-height: 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bar .msg:not(:empty) { padding: 2px 10px 1px; border-radius: 4px; background: var(--cream); border: 2px solid var(--red); }
.bar .msg.loud:not(:empty) { background: var(--red); color: #fff; font-size: 16px; padding: 5px 12px 4px; white-space: normal; text-align: center; width: max-content; max-width: 92vw; animation: msgpop .35s ease-out; }
@keyframes msgpop { from { transform: translateX(-50%) scale(.8); } to { transform: translateX(-50%) scale(1); } }
.bar-row { display: flex; gap: 8px; }
.bar input { flex: 1; min-width: 0; padding: 11px 12px 10px; font-size: 16px; color: var(--ink); background: var(--cream); border: 3px solid var(--navy); border-radius: 7px; box-shadow: 0 3px 0 rgba(13,27,54,.45); outline: 0; }
.bar input::placeholder { color: #7a8298; }
.bar.mine input::placeholder { color: #3d4660; }
.bar button { padding: 0 18px; border: 3px solid var(--navy); border-radius: 7px; background: var(--red); color: #fff; font-size: 16px; letter-spacing: .12em; box-shadow: 0 3px 0 rgba(13,27,54,.45); }
.bar button:disabled { background: #b9b2a2; }
.bar.mine input { border-color: #b77a00; background: #fff; box-shadow: 0 3px 0 #b77a00, 0 0 0 3px rgba(255,209,102,.7); }
.watch { margin: 0; padding: 9px 12px 8px; border-radius: 7px; background: rgba(13,27,54,.85); color: #fff; font-size: 13px; }

.over h2 { margin: 0 0 8px; font: 400 20px/1.2 var(--px); color: var(--red); }
.places { margin: 0 0 10px; padding: 0; list-style: none; font-size: 13px; text-align: left; }
.places li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed rgba(13,27,54,.2); }
.places li:first-child { color: #8a5a00; }
.places small { color: #56617a; font-size: 11px; }
.auto { display: block; margin-top: 10px; font-size: 12px; color: #56617a; }

.modal { position: absolute; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(13,27,54,.6); }
.modal-box { width: min(92%, 400px); max-height: 90%; overflow: auto; padding: 16px; border: 3px solid var(--navy); border-radius: 9px; background: var(--cream); text-align: center; }
.modal-box h2 { margin: 0 0 8px; font: 400 17px var(--px); }
.modal-box p { font-size: 13px; color: #3d4a66; }
.settings { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; margin: 10px 0 14px; text-align: left; font-size: 13px; align-items: center; }
.settings .step { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.settings .step b { min-width: 3.2em; text-align: center; font-weight: 400; }
.settings .step button { min-width: 32px; height: 32px; padding: 0 6px; border: 2px solid var(--navy); border-radius: 5px; background: #fff; color: var(--ink); }
.settings .kick { font-size: 11px; border-color: var(--red) !important; color: var(--red) !important; }
.settings hr { grid-column: 1 / -1; width: 100%; border: 0; border-top: 1px dashed rgba(13,27,54,.3); margin: 2px 0; }
#ts { min-height: 70px; display: flex; justify-content: center; margin: 8px 0; }
.banner { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 90; margin: 0; padding: 8px 14px 7px; border: 3px solid var(--navy); border-radius: 7px;
  background: var(--coral); color: #fff; font-size: 14px; white-space: nowrap; }

/* wide screens: bigger type on the signs */
@media (min-width: 900px) {
  .card-text { font-size: 24px; }
  .sign { padding: 8px 14px 10px; }
  .plate { font-size: 13px; line-height: 17px; max-width: 150px; }
  .bubble { font-size: 15px; line-height: 20px; max-width: 240px; }
  .meter { width: 72px; height: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .bob, .ripple, .cloud, .gull, .gull i, .gulet, .gulet .flag, .glint, .ball i, .chip.status, .light, .rglint, .beach-foam, .rgull, .rgull i, .rt-turtle { animation: none !important; }
}

/* ---------- the beach race (race-view.js; RACE.md §3) ---------- */
#app.racing .sky, #app.racing .world, #app.racing #gulls, #app.racing .ring, #app.racing .ball,
#app.onbeach .sky, #app.onbeach .world, #app.onbeach #gulls, #app.onbeach .ring, #app.onbeach .ball { display: none; }
/* the owner's beaches seen from behind the turtles (img/race-back*.webp); race-view.js places the picture (its horizon
   just under the sign) and every turtle (left, top = its feet; --tw = its size there, smaller towards the water) */
.beach { position: absolute; inset: 0; overflow: hidden; background: #2fa9e8 no-repeat; image-rendering: pixelated; }
/* only the chase camera glides: in the whole-beach view the picture must move with the sea's glints and the turtles at
   once (the glide left the glints up in the sky and the sea behind the sign for two seconds, 29 Nov 2026) */
.beach.pov { transition: background-size 2s cubic-bezier(.55,0,.25,1), background-position 2s cubic-bezier(.55,0,.25,1); }
.beach::after { content: ""; position: absolute; inset: 0; background: #39468f; mix-blend-mode: multiply; opacity: var(--dim, 0); pointer-events: none; z-index: 6000; }
/* the living beach: glints on the sea, the foam breathing at the water's edge, a gull crossing, sand kicked up */
.beach-sea { position: absolute; left: 0; right: 0; pointer-events: none; }
.rglint { position: absolute; height: 2px; background: rgba(255,255,255,.85); animation: rglint 3.6s ease-in-out infinite; }
@keyframes rglint { 0%, 100% { opacity: 0; transform: translateX(0); } 50% { opacity: .9; transform: translateX(8px); } }
.beach-foam { position: absolute; left: -2%; right: -2%; height: 9px; border-radius: 50%; background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.75) 45%, rgba(255,255,255,0)); animation: foam 2.8s ease-in-out infinite alternate; pointer-events: none; }
@keyframes foam { from { transform: translateY(-4px) scaleY(.8); opacity: .55; } to { transform: translateY(7px) scaleY(1.5); opacity: 1; } }
.rgull { position: absolute; left: 0; width: 0; height: 0; z-index: 5600; animation: rgull 17s linear infinite; animation-delay: -6s; pointer-events: none; }
.rgull i { position: absolute; width: 60px; height: 53px; transform: scale(var(--gk, 1)); background: url("/parti/img/gulls.png") 0 0 / 240px 53px; animation: rflap .5s steps(4) infinite; image-rendering: pixelated; filter: drop-shadow(0 40px 3px rgba(90,60,20,.18)); }
@keyframes rgull { 0% { transform: translate(-80px, 0); } 45% { transform: translate(110vw, -40px); } 100% { transform: translate(110vw, -40px); } }
@keyframes rflap { to { background-position-x: -240px; } }
.rpuff { position: absolute; margin: -4px 0 0 -4px; border-radius: 50%; background: rgba(250,226,160,.9); animation: rpuff .7s ease-out forwards; pointer-events: none; }
@keyframes rpuff { from { transform: translateY(0) scale(.6); opacity: .9; } to { transform: translateY(14px) scale(2.2); opacity: 0; } }
.rfloat { position: absolute; z-index: 5500; transform: translate(-50%, 0); margin-top: calc(var(--tw) * -1.15); font: 700 13px/1 var(--px); color: #fff; text-shadow: 0 2px 0 rgba(90,50,10,.85), 0 0 3px rgba(90,50,10,.6); white-space: nowrap; animation: rfloat 1.3s ease-out forwards; pointer-events: none; }
.rfloat.me { color: var(--gold); font-size: 17px; }
@keyframes rfloat { from { opacity: 0; transform: translate(-50%, 8px) scale(.7); } 18% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); } to { opacity: 0; transform: translate(-50%, -34px) scale(1); } }
.rt:not(.go):not(.sea):not(.gone) .rt-turtle { animation: ridle 2.4s ease-in-out infinite; animation-delay: var(--ph, 0s); }
@keyframes ridle { 50% { transform: translateY(-2.5%) scaleY(1.03); } }
.rt.arrive::before { content: ""; position: absolute; left: 0; top: calc(var(--tw) * -.35); width: calc(var(--tw) * 1.6); height: calc(var(--tw) * .6); margin-left: calc(var(--tw) * -.8); border: 3px solid rgba(255,255,255,.9); border-radius: 50%; animation: rring 1.1s ease-out forwards; }
@keyframes rring { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.beach-start { position: absolute; border-top: 3px dashed rgba(120,74,20,.4); }
#beach-turtles { position: absolute; inset: 0; }
/* --tw is a real length, so a turtle's size glides with its place. (Its box used to glide while the sprite sheet's
   scale jumped: on the long run into the sea the frame came apart and a slice of the next turtle showed beside it.) */
@property --tw { syntax: "<length>"; inherits: true; initial-value: 40px; }
.rt { position: absolute; width: 0; height: 0; transition: left 2s cubic-bezier(.55,0,.25,1), top 2s cubic-bezier(.55,0,.25,1), --tw 2s cubic-bezier(.55,0,.25,1), opacity .6s; }
/* one square frame of turtle-back.png per --tw; 8 frames across (4 of the crawl, idle, cheer, tired, turned back),
   one row per look. The shell's middle is the cell's middle: the feet are a third of a cell under it */
.rt-turtle { position: absolute; left: calc(var(--tw) * -.5); top: calc(var(--tw) * -.82); width: var(--tw); height: var(--tw); 
  background: url("/parti/img/turtle-back.png") calc(var(--tw) * -4) calc(var(--look, 0) * var(--tw) * -1) / calc(var(--tw) * 8) calc(var(--tw) * 6) no-repeat; image-rendering: pixelated; }
.rt-shadow { position: absolute; left: calc(var(--tw) * -.3); top: calc(var(--tw) * -.3); width: calc(var(--tw) * .6); height: calc(var(--tw) * .22); border-radius: 50%; background: rgba(110,64,10,.3); }
.rt.go .rt-turtle { animation: crawl .44s steps(1) infinite; animation-delay: var(--ph, 0s); }
@keyframes crawl { 0% { background-position-x: 0; } 25% { background-position-x: calc(var(--tw) * -1); } 50% { background-position-x: calc(var(--tw) * -2); } 75% { background-position-x: calc(var(--tw) * -3); } }
.rt.sea .rt-turtle { background-position-x: calc(var(--tw) * -5); animation: seabob 1.6s ease-in-out infinite; animation-delay: var(--ph, 0s); }
@keyframes seabob { 50% { transform: translateY(-12%); } }
.rt.sea .rt-shadow { background: rgba(255,255,255,.45); }
.rt.gone { opacity: 0; transform: translateY(40px); transition: opacity 1.6s ease .5s, transform 2s ease; pointer-events: none; }  /* out of the race: turns back and crawls off */
.rt.gone .rt-turtle { background-position-x: calc(var(--tw) * -7); animation: none; }
.rt.typed::after { content: "✓"; position: absolute; left: calc(var(--tw) * .28); top: calc(var(--tw) * -.95); font-size: 11px; line-height: 1; color: #0b5a2a; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.rt-name { position: absolute; left: 0; top: 2px; transform: translateX(-50%); white-space: nowrap; font: 700 10px/12px var(--px); color: #4a3210; text-shadow: 0 0 2px #fbe6ae, 0 0 2px #fbe6ae; }
.rt.sea .rt-name { color: #fff; text-shadow: 0 1px 0 rgba(0,40,80,.7); }
.rt.me .rt-turtle { filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff); }
.rt.me .rt-name { padding: 0 4px; border-radius: 3px; background: var(--gold); color: #1a1205; text-shadow: none; }
@media (min-width: 900px) and (min-height: 640px) { .rt-name { font-size: 13px; line-height: 16px; } }
.race-time { margin-top: 2px; font-size: 12px; color: #9fd9e6; }
.race-time.low { color: var(--coral); }
.rtoast { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: 6px; background: rgba(3,11,20,.85);
  color: var(--gold); font: 700 15px var(--px); letter-spacing: .06em; text-align: center; white-space: pre-line; width: max-content; max-width: 88%; line-height: 1.5; animation: rtoast 2.6s ease forwards; z-index: 90; }
@keyframes rtoast { 0% { opacity: 0; transform: translate(-50%, -40%); } 12%, 80% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; } }
/* the race's lines on the redesigned sign: the hint and the seconds under the category, the reveal as its own board */
.card-hint { margin-top: 2px; font-size: 11px; color: #ffe6b8; }
.race-time { color: #fff; }
#app.racing .chip.status { white-space: normal; }
#app.racing #room-pill { display: none; }   /* the race's sign is full enough: round, my place, the sea's count, my points */
.banner { pointer-events: auto; cursor: pointer; }

/* ---- the race's sign: the round, my place (large) and the sea's count; the category; my line; the clock as a bar ---- */
.race-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; }
.r-rank { font: 400 24px/1 var(--px); color: #fff; text-shadow: 0 2px 0 rgba(50,26,8,.75); white-space: nowrap; }
.r-rank small { font-size: 11px; letter-spacing: .06em; color: #ffe6b8; text-shadow: none; }
.r-rank.in { color: #9df0a2; }
.r-rank.behind { color: #ffb0a4; }
#app.racing .card-text { min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.race-status { margin-top: 3px; padding: 2px 8px 1px; border-radius: 3px; background: rgba(50,26,8,.55); color: #fff; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-bar { position: relative; height: 14px; margin-top: 5px; border: 2px solid var(--wood-d); border-radius: 4px; background: rgba(50,26,8,.55); overflow: hidden; }
.race-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #7fd0e6; transition: width .26s linear; }
.race-bar b { position: absolute; inset: 0; font: 400 11px/11px var(--px); color: #fff; text-align: center; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.race-bar.low i { background: var(--coral); }
.race-bar.low { animation: nudge .5s ease-in-out infinite; }

/* ---- the pop: a flash ring, PAT!, the scene shakes ---- */
.popring { position: absolute; width: 0; height: 0; }
.popring::before { content: ""; position: absolute; left: calc(-70px * var(--s)); top: calc(-70px * var(--s)); width: calc(140px * var(--s)); height: calc(140px * var(--s)); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0 30%, rgba(255,214,102,.8) 45%, rgba(232,72,60,0) 70%); animation: popring .55s ease-out forwards; }
@keyframes popring { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.pow { position: absolute; transform: translate(-50%, -50%); font: 400 calc(30px * var(--s) + 8px)/1 var(--px); color: #fff; letter-spacing: .04em; white-space: nowrap;
  text-shadow: 0 4px 0 var(--red), 3px 0 0 var(--red), -3px 0 0 var(--red), 0 -3px 0 var(--red), 3px 4px 0 var(--red), -3px 4px 0 var(--red); animation: pow .95s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes pow { from { transform: translate(-50%, -50%) scale(.2) rotate(-12deg); opacity: 0; } 20% { opacity: 1; transform: translate(-50%, -60%) scale(1.25) rotate(-6deg); } 70% { opacity: 1; transform: translate(-50%, -80%) scale(1) rotate(-6deg); } to { opacity: 0; transform: translate(-50%, -110%) scale(.9) rotate(-6deg); } }
.scene.quake { animation: quake .42s linear; }
@keyframes quake { 10% { transform: translate(-6px, 3px); } 30% { transform: translate(5px, -4px); } 50% { transform: translate(-4px, 2px); } 70% { transform: translate(3px, -2px); } 90% { transform: translate(-1px, 1px); } }

/* ---- a new category: the sign says so and the game waits (engine.js swapMs) ---- */
.newcat { position: absolute; left: 50%; top: 31%; transform: translate(-50%, -50%); z-index: 90; padding: 10px 18px 8px; border: 3px solid var(--navy); border-radius: 8px; background: var(--gold); color: #3a2208;
  font: 400 22px/1.2 var(--px); letter-spacing: .08em; text-align: center; white-space: nowrap; box-shadow: 0 4px 0 rgba(13,27,54,.5); animation: newcat 2.3s ease forwards; }
.newcat b { display: block; margin-top: 6px; max-width: 70vw; font-size: 15px; line-height: 1.2; color: var(--navy); white-space: normal; }
.catnow { position: absolute; left: 0; right: 0; bottom: calc(100% + 26px); z-index: 80; box-sizing: border-box; padding: 7px 10px 8px; border: 3px solid var(--navy); border-radius: 8px; background: var(--gold); color: var(--navy);
  text-align: center; box-shadow: 0 4px 0 rgba(13,27,54,.5); pointer-events: none; animation: catnow 3.3s ease forwards; }
.catnow small { display: block; font: 400 10px/1 var(--px); letter-spacing: .12em; color: #5a3a10; }
.catnow b { display: block; margin-top: 3px; font: 400 17px/1.2 var(--px); }
@keyframes catnow { 0% { opacity: 0; transform: translateY(8px); } 8%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.newcat small { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .04em; color: #5a3a10; }
@keyframes newcat { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-4deg); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(2deg); } 18%, 82% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -150%) scale(.8); } }

/* ---- the race's camera ---- */
.cambar { display: flex; gap: 6px; align-items: center; }
.cambar button { padding: 3px 10px 2px; border: 2px solid var(--navy); border-radius: 5px; background: var(--cream); color: var(--ink); font: 400 11px/1.3 var(--px); letter-spacing: .04em; box-shadow: 0 2px 0 rgba(13,27,54,.4); }
.cambar #cam-prev, .cambar #cam-next { font-size: 16px; line-height: 1; padding: 2px 10px 3px; }
.rt.hid { opacity: 0; pointer-events: none; }
.beach.pov .rt.eye .rt-turtle { filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff); }
.beach.pov .rt-name { font-size: 12px; line-height: 14px; }
.beach.pov .rgull { display: none; }

/* ---- the race's reveal: a small cream board under the sign (my answer and its points, the others' as chips) ---- */
.race-intro { width: min(100%, 540px); box-sizing: border-box; padding: 12px 14px 12px; border: 3px solid var(--navy); border-radius: 8px; background: var(--cream); color: var(--ink); box-shadow: 0 4px 0 rgba(13,27,54,.45); text-align: left; }
.race-intro h2 { margin: 0 0 8px; font: 400 18px/1 var(--px); letter-spacing: 1px; color: var(--red); text-align: center; }
.race-intro ol { margin: 0; padding: 0 0 0 22px; font: 15px/1.4 var(--px); }
.race-intro li { margin: 0 0 6px; }
.race-intro b { color: var(--navy); }
.ri-count { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 6px; }
.ri-count small { font: 12px var(--px); opacity: .7; }
.ri-count b { font: 400 34px/1 var(--px); color: var(--red); min-width: 1.2em; text-align: center; }
.reveal { width: min(100%, 540px); box-sizing: border-box; padding: 7px 9px 8px; border: 3px solid var(--navy); border-radius: 8px; background: var(--cream); color: var(--ink);
  box-shadow: 0 4px 0 rgba(13,27,54,.45); font-size: 12px; line-height: 1.3; animation: rvin .35s cubic-bezier(.3,1.5,.5,1); }
@keyframes rvin { from { transform: translateY(-14px) scale(.96); opacity: 0; } }
.rv-me { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.rv-me.none { color: #6a7388; }
.rv-ans { padding: 2px 8px 1px; border-radius: 5px; background: var(--ink); color: var(--c, #fff); font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
.rv-pts { font: 400 20px/1 var(--px); color: var(--red); }
.rv-note { color: #55607a; font-size: 11px; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-height: 44px; overflow: hidden; }
.rv-chip { padding: 1px 7px 0; border-radius: 4px; background: var(--ink); color: var(--c, #fff); font-size: 11px; line-height: 18px; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.rv-chip b { margin-left: 5px; color: #fff; font-weight: 400; }
.rv-chip.more { background: none; color: #55607a; border: 1px dashed #8b93a8; }
.rv-q { margin-top: 5px; color: #17794a; }
.rv-end { margin-bottom: 6px; padding-bottom: 5px; border-bottom: 2px dashed rgba(13,27,54,.25); }
.rv-end > b:first-child { display: block; font-weight: 400; color: var(--red); letter-spacing: .04em; }   /* the heading only: a name in the list ("Sen") stays in its line */
.rv-end b { font-weight: 400; }

/* a big room's lobby: a shoal of small turtles; only my name and the host's show */
.seat.tiny .tag, .seat.tiny .ripple { display: none; }
.seat.tiny.me .tag, .seat.tiny.host .tag { display: block; }
.seat.tiny.me { z-index: 8000 !important; }

/* the lobby on the beach: a player sitting this game out stands faded */
.rt.idle { opacity: .45; }
.rt.idle .rt-turtle { background-position-x: calc(var(--tw) * -6); animation: none !important; }

/* ---- the bug report (report.js) ---- */
.bugbtn { position: absolute; left: 6px; bottom: var(--bugb, 96px); z-index: 70; width: 26px; height: 26px; padding: 0; border: 2px solid var(--navy); border-radius: 50%;
  background: var(--cream); color: var(--red); font: 400 14px/1 var(--px); opacity: .7; box-shadow: 0 2px 0 rgba(13,27,54,.45); }
.bugbtn:active { transform: translateY(1px); }
/* ---- streamer mode: the answer being typed is hidden on this screen (the box below, the bubble and the status above) ---- */
.strmbtn { position: absolute; left: 38px; bottom: var(--bugb, 96px); z-index: 70; height: 26px; padding: 0 8px; border: 2px solid var(--navy); border-radius: 13px;
  background: var(--cream); color: var(--navy); font: 400 10px/1 var(--px); letter-spacing: .5px; opacity: .7; box-shadow: 0 2px 0 rgba(13,27,54,.45); }
.strmbtn[aria-pressed="true"] { background: var(--red); color: #fff; opacity: 1; }
.strmbtn:active { transform: translateY(1px); }
.strmbtn.mini:not([aria-pressed="true"]) { display: none; }
.strmbtn.mini { font-size: 8px; padding: 0 6px; opacity: .8; }
body.streamer #guess { color: transparent; caret-color: var(--ink); }
@supports (-webkit-text-security: disc) { body.streamer #guess { color: inherit; -webkit-text-security: disc; } }
#bug-text { width: 100%; box-sizing: border-box; padding: 8px; border: 2px solid var(--navy); border-radius: 6px; background: #fff; color: var(--ink); font: 14px/1.35 var(--px); resize: none; }
.bug-row { display: flex; gap: 8px; margin-top: 10px; }
.bug-row .btn { flex: 1; }
.bug-msg { margin: 8px 0 0; }
#bug-over { margin-top: 8px; }

/* a watcher sees what a racer typed, over its turtle, for three seconds (race-view.js sayOver) */
.rt-say { position: absolute; left: 0; bottom: calc(var(--tw) * .86); transform: translateX(-50%); max-width: 150px; width: max-content; padding: 2px 7px 1px; border: 2px solid var(--ink); border-radius: 7px;
  background: var(--ink); color: var(--c, #fff); font: 400 12px/15px var(--px); text-align: center; overflow-wrap: anywhere; white-space: normal; animation: rvin .25s cubic-bezier(.3,1.5,.5,1); pointer-events: none; }
.rt-say.miss { background: #fff; color: var(--red); text-decoration: line-through; }

/* ---- the sea moves a little: wave lines drifting in two layers, bubbles rising (the bay and the race's beach) ---- */
.swell { position: absolute; left: 0; right: 0; pointer-events: none; opacity: .28; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 72'><g fill='none' stroke='white' stroke-width='2' stroke-linecap='round'><path d='M8 14 q9 -6 18 0 t18 0'/><path d='M132 8 q8 -5 16 0 t16 0 t16 0'/><path d='M70 36 q10 -6 20 0 t20 0'/><path d='M186 44 q8 -5 16 0 t16 0'/><path d='M22 60 q9 -6 18 0 t18 0 t18 0'/><path d='M150 66 q8 -5 16 0'/></g></svg>") 0 0 / 240px 72px repeat;
  animation: swell 26s linear infinite, swellbob 5s ease-in-out infinite alternate; }
.swell.b { opacity: .13; background-size: 330px 99px; animation: swellb 38s linear infinite, swellbob 7s ease-in-out infinite alternate-reverse; }
@keyframes swell { to { background-position-x: 240px; } }
@keyframes swellb { to { background-position-x: -330px; } }
@keyframes swellbob { from { transform: translateY(-2px); } to { transform: translateY(3px); } }
.beach-sea .swell { background-size: 150px 45px; }
.beach-sea .swell.b { background-size: 210px 63px; }
@keyframes swell150 { to { background-position-x: 150px; } }
@keyframes swell210 { to { background-position-x: -210px; } }
.beach-sea .swell { animation-name: swell150, swellbob; }
.beach-sea .swell.b { animation-name: swell210, swellbob; }
.bub { position: absolute; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(255,255,255,.25); opacity: 0; pointer-events: none; animation: bub ease-in infinite; }
@keyframes bub { 0% { opacity: 0; transform: translateY(6px) scale(.5); } 15% { opacity: .85; } 70% { opacity: .7; transform: translateY(-14px) scale(1); } 80% { opacity: .9; transform: translateY(-16px) scale(1.5); } 85%, 100% { opacity: 0; transform: translateY(-16px) scale(1.8); } }
.beach.pov .swell, .beach.pov .bub { display: none; }
@media (prefers-reduced-motion: reduce) { .swell, .bub { animation: none !important; } }

/* the beta's tag under the title */
.title .beta { display: block; width: max-content; margin: 4px auto 0; padding: 1px 8px 0; border-radius: 4px; background: var(--red); color: #fff; font: 400 12px/16px var(--px); letter-spacing: .12em; text-shadow: none; }

/* the way back to the site, on the door (owner, 29 Nov 2026: "ana sayfaya dön tarzı") */
.homelink { display: block; width: max-content; margin: 8px auto 0; padding: 2px 6px; color: #3d4a66; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.homelink:active { color: var(--ink); }
/* the Discord invite (the home page's link and logo): a quiet line on the door, a line inside the lobby's notice */
.dc { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 8px auto 0; padding: 7px 10px; border: 2px solid #5865F2; border-radius: 8px; color: var(--ink); font-size: 12.5px; line-height: 1.3; text-decoration: none; background: rgba(88,101,242,.08); }
.dc .dc-logo { flex: none; }
.dc b { color: #4450d8; }
.notice .dc { display: inline-flex; margin: 4px 0 0; padding: 3px 7px; font-size: 12px; }

/* ---- the notice under the room's sign: alone in the lobby, nobody will come unless they are sent the code ---- */
.notice { position: relative; display: flex; align-items: center; gap: 8px; width: min(100%, 540px); box-sizing: border-box; margin-top: 8px; padding: 8px 30px 8px 10px; border: 3px solid var(--navy); border-radius: 9px;
  background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 rgba(13,27,54,.45); font-size: 12px; line-height: 1.35; text-align: left; pointer-events: auto; animation: noticein .45s cubic-bezier(.3,1.5,.5,1); }
.notice[hidden] { display: none; }
@keyframes noticein { from { transform: translateY(-18px) scale(.94); opacity: 0; } }
.notice p { margin: 0; flex: 1; }
.notice b { display: block; font: 400 14px/1.2 var(--px); }
.notice .bell { font-style: normal; font-size: 20px; animation: bell 1.6s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bell { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
.notice .btn.small { margin: 0; white-space: nowrap; background: #fff; color: var(--ink); border-color: var(--navy); box-shadow: 0 2px 0 var(--navy); }
.notice .x { position: absolute; top: 2px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 18px; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .notice, .notice .bell { animation: none; } }
