/* Căciula — ceramică de Horezu: smalț ocru, farfurii de lut alb, contur brun, buline și valuri pictate.
   Roșii = lut ars, Albaștrii = cobalt, verde = acțiunea „ghicit”. */
:root {
  --glaze: #e9a93a;
  --glaze-d: #c98a22;
  --slip: #fff4dc;
  --slip-2: #fbe5b8;
  --umber: #3b1d10;
  --umber-2: #6e3b1c;
  --muted: #7d5332;
  --clay: #c4441c;
  --clay-d: #8f2c0e;
  --cobalt: #2b5cb8;
  --cobalt-d: #1b3c80;
  --leaf: #3f8f3e;
  --leaf-d: #276626;
  --r0: #b5651d;
  --r1: #2f7d6d;
  --r2: #6e3b1c;
  --line: 3px solid var(--umber);
  --lift: 0 5px 0 var(--umber);
  --display: 'Grandstander', 'Trebuchet MS', system-ui, sans-serif;
  --font: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --spring: cubic-bezier(.2, 1.5, .4, 1);
  --out: cubic-bezier(.2, .8, .3, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--umber);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.4;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  background-color: var(--glaze);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .35), transparent 38%),
    radial-gradient(circle at 92% 96%, rgba(143, 44, 14, .18), transparent 40%),
    radial-gradient(rgba(59, 29, 16, .13) 1.6px, transparent 2px);
  background-size: auto, auto, 24px 24px;
  background-attachment: fixed;
}
/* val pictat sus */
body::before {
  content: ''; position: fixed; inset: 0 0 auto; height: 16px; z-index: 40;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16'%3E%3Crect width='28' height='16' fill='%233b1d10'/%3E%3Cpath d='M0 9 Q7 2 14 9 T28 9' stroke='%23e9a93a' stroke-width='3' fill='none'/%3E%3Ccircle cx='7' cy='12' r='1.6' fill='%23fff4dc'/%3E%3Ccircle cx='21' cy='5' r='1.6' fill='%23fff4dc'/%3E%3C/svg%3E") repeat-x;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(30px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 800; }
p { margin: 0; }
button { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 3px dashed var(--umber); outline-offset: 3px; }

.screen { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.screen.center { align-items: center; text-align: center; justify-content: center; }
.screen.center > .plate, .screen.center > .btn.big, .screen.center > .row { align-self: stretch; }
.grow { flex: 1; min-height: 4px; }
.enter { animation: enter .42s var(--out); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.hint { color: var(--muted); font-size: 16px; }
.hint.small { font-size: 14px; }
.label { font-family: var(--display); font-weight: 700; color: var(--umber-2); font-size: 18px; }
.line { font-weight: 700; color: var(--umber-2); max-width: 32ch; }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- iconițe ---------- */
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ic .f { fill: currentColor; stroke: none; }

/* ---------- butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: var(--line); border-radius: 999px; padding: 13px 22px;
  font-family: var(--display); font-weight: 800; font-size: 19px; cursor: pointer;
  background: var(--slip); box-shadow: var(--lift);
  transition: transform .12s var(--out), box-shadow .12s var(--out), filter .2s, opacity .2s;
  touch-action: manipulation; user-select: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 7px 0 var(--umber); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--umber); transition-duration: .05s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.big { padding: 17px 24px; font-size: 22px; }
.btn.sm { padding: 8px 14px; font-size: 15px; border-width: 2.5px; box-shadow: 0 3px 0 var(--umber); }
.btn.primary { background: var(--clay); color: var(--slip); }
.btn.go { background: var(--leaf); color: var(--slip); }
.btn.soft { background: var(--slip); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--umber-2); }
.btn.ghost:hover:not(:disabled), .btn.ghost:active:not(:disabled) { transform: none; box-shadow: none; text-decoration: underline wavy 2px; text-underline-offset: 5px; }
.btn.huge { width: 100%; padding: 26px 20px; font-size: 34px; font-weight: 900; border-radius: 34px; box-shadow: 0 8px 0 var(--umber); }
.btn.huge .ic { width: 1.1em; height: 1.1em; stroke-width: 3; }
.btn.huge:active:not(:disabled) { transform: translateY(7px); box-shadow: 0 1px 0 var(--umber); }
.btn.go.huge[data-act="startTurn"] { animation: breathe 2.2s ease-in-out infinite; }
.btn.guess { padding: 40px 20px; font-size: 42px; }
.btn.guess.hit { animation: hit .32s var(--out); }
@keyframes breathe { 50% { transform: scale(1.03); } }
@keyframes hit { 0% { transform: translateY(7px) scale(.96); filter: brightness(1.25); } 100% { transform: none; } }

/* ---------- mascota ---------- */
.mascot { width: 120px; flex: none; }
.mascot svg { display: block; width: 100%; overflow: visible; }
.mascot.lg { width: 168px; }
.mascot.md { width: 118px; }
.mascot.sm { width: 54px; }
.m-shadow { fill: rgba(59, 29, 16, .22); transform-origin: 70px 134px; }
/* fes tricotat: negru cald, cu dungi de împletitură și manșeta răsfrântă */
.m-knit { fill: #241914; }
.m-ribs path { stroke: #3a2a22; stroke-width: 2.6; stroke-linecap: round; }
.m-shine { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 6; stroke-linecap: round; }
.m-cuff { fill: #1d1410; stroke: #120c09; stroke-width: 1.5; }
.m-cuff-ribs path { stroke: #352721; stroke-width: 3.2; stroke-linecap: round; }
.m-tag { fill: var(--clay); stroke: #120c09; stroke-width: 1.2; }
.m-sad { stroke: #fff4dc; }
.m-tear { fill: #8fd0ff; opacity: 0; }
.m-cheek { fill: var(--clay); opacity: .5; }
.m-eye { fill: #fff8ec; }
.m-pupil { fill: var(--umber); transition: transform .3s var(--out); }
.m-glint { fill: #fff; }
.m-mouth { fill: none; stroke: #fff4dc; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .15s; }
.m-grin { fill: #fff4dc; }
.m-smile { opacity: 1; }
.m-body { transform-origin: 70px 128px; }
.m-eyes { transform-origin: 70px 55px; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.1); } }
.mascot.idle .m-body { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
.mascot.happy .m-body { animation: jump .8s var(--spring); }
.mascot.happy .m-smile, .mascot.party .m-smile { opacity: 0; }
.mascot.happy .m-grin, .mascot.party .m-grin { opacity: 1; }
.mascot.party .m-body { animation: jump 1s var(--spring) infinite; }
@keyframes jump { 0% { transform: scale(1.12, .86); } 35% { transform: translateY(-16px) scale(.94, 1.08) rotate(-4deg); } 70% { transform: translateY(0) scale(1.06, .94); } 100% { transform: none; } }
.mascot.worried:not(.happy) .m-smile { opacity: 0; }
.mascot.worried:not(.happy) .m-worry { opacity: 1; }
.mascot.worried:not(.happy) .m-body { animation: jitter .25s linear infinite; }
.mascot.worried .m-pupil { transform: translateY(-2px); }
@keyframes jitter { 25% { transform: translateX(-1.5px); } 75% { transform: translateX(1.5px); } }
.mascot.sad .m-smile, .mascot.sad .m-grin, .mascot.sad .m-worry { opacity: 0; }
.mascot.sad .m-sad { opacity: 1; }
.mascot.sad .m-tear { animation: tear 1.2s ease-in .1s; }
.mascot.sad .m-body { animation: droop 1.6s var(--out); }
@keyframes tear { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
@keyframes droop { 0% { transform: scale(1.05, .9); } 30% { transform: translateY(4px) rotate(-6deg) scale(.97, 1.02); } 100% { transform: none; } }
.mascot.spit .m-body { animation: spit .35s var(--spring); }
@keyframes spit { 0% { transform: scale(.9, 1.1); } 100% { transform: none; } }
.mascot.fire { filter: drop-shadow(0 0 10px #ffb347) drop-shadow(0 0 18px #ff6a1f); }
.mascot.fire .m-body { animation: jump .6s var(--spring) infinite; }
.mascot.fire .m-smile { opacity: 0; }
.mascot.fire .m-grin { opacity: 1; }

/* ---------- acasă ---------- */
.home { gap: 18px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.hero-hat { position: relative; padding-top: 30px; isolation: isolate; }
.logo {
  font-size: 72px; font-weight: 900; letter-spacing: -.01em; color: var(--slip);
  -webkit-text-stroke: 7px var(--umber); paint-order: stroke fill; text-shadow: 0 6px 0 var(--umber);
  animation: logoIn .7s var(--spring) .1s both;
}
@keyframes logoIn { from { opacity: 0; transform: scale(.6) rotate(-6deg); } }
.lede { font-size: 18px; font-weight: 700; max-width: 30ch; color: var(--umber-2); }
.slip {
  position: absolute; left: 50%; top: 52px; width: 38px; height: 24px; opacity: 0; z-index: -1;
  background: var(--slip); border: 2.5px solid var(--umber); border-radius: 4px;
  animation: slipUp 3.6s ease-in-out infinite;
}
.slip::after { content: ''; position: absolute; left: 6px; right: 6px; top: 6px; height: 2.5px; border-radius: 2px; background: var(--clay); box-shadow: 0 6px 0 var(--cobalt); }
.s1 { animation-delay: .9s; --dx: 70px; --rot: 200deg; } .s2 { animation-delay: 1.8s; --dx: -40px; --rot: -140deg; } .s3 { animation-delay: 2.7s; --dx: 50px; --rot: 120deg; }
.s0 { --dx: -75px; --rot: -220deg; }
@keyframes slipUp {
  0% { opacity: 0; transform: translate(-50%, 40px) rotate(0); }
  15%, 65% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -80px) rotate(var(--rot)); }
}
.howto { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.howto h2 { text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: var(--line); border-radius: 22px;
  background: var(--slip); box-shadow: 0 4px 0 var(--umber); animation: enter .5s var(--out) both; animation-delay: calc(.35s + var(--i) * .1s);
}
.step > .ic { width: 46px; height: 46px; padding: 9px; border-radius: 50%; color: var(--slip); border: var(--line); flex: none; }
.step.r0 > .ic { background: var(--r0); } .step.r1 > .ic { background: var(--r1); } .step.r2 > .ic { background: var(--r2); }
.step b { font-family: var(--display); font-size: 20px; display: block; }
.step span { color: var(--muted); font-size: 16px; }
.howto .hint { text-align: center; font-weight: 700; }

/* ---------- formulare ---------- */
.field { display: flex; flex-direction: column; gap: 8px; align-self: stretch; text-align: left; }
.field > span, .field > legend { font-family: var(--display); font-weight: 800; font-size: 17px; margin-bottom: 8px; padding: 0; }
input {
  font: inherit; font-size: 20px; font-weight: 700; padding: 15px 18px; border-radius: 18px;
  border: var(--line); background: var(--slip); color: var(--umber); outline: none;
  box-shadow: inset 0 3px 0 rgba(59, 29, 16, .1); transition: box-shadow .2s;
}
input:focus { box-shadow: inset 0 3px 0 rgba(59, 29, 16, .1), 0 0 0 4px rgba(63, 143, 62, .45); }
input::placeholder { color: #b38b5d; }
.teams-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tp {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; cursor: pointer;
  border: var(--line); border-radius: 24px; background: var(--slip); box-shadow: var(--lift);
  font-family: var(--display); font-weight: 800; font-size: 20px; transition: transform .25s var(--spring), background .2s, color .2s;
}
.tp-dot { width: 34px; height: 34px; border-radius: 50%; border: var(--line); }
.tp.a .tp-dot { background: var(--clay); } .tp.b .tp-dot { background: var(--cobalt); }
.tp.sel { transform: translateY(-4px) scale(1.03); color: var(--slip); }
.tp.a.sel { background: var(--clay); } .tp.b.sel { background: var(--cobalt); }
.tp.sel .tp-dot { background: var(--slip); }
.codepill { display: inline-block; background: var(--umber); color: var(--slip); padding: 4px 14px; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 16px; }

/* ---------- scriere bilete ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.brand { font-family: var(--display); font-weight: 900; font-size: 24px; }
.dots { display: flex; gap: 7px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--umber); background: var(--slip); transition: all .3s var(--spring); }
.dots i.on { background: var(--clay); transform: scale(1.3); }
.dots i.done { background: var(--leaf); }
.cat-head { text-align: center; margin: 8px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cat-icon {
  width: 104px; height: 104px; display: grid; place-items: center; border-radius: 50%; position: relative;
  background: var(--slip); border: var(--line); box-shadow: var(--lift); color: var(--clay);
  animation: plateIn .55s var(--spring);
}
.cat-icon::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 3px dotted var(--cobalt); opacity: .6; }
.cat-icon .ic { width: 56px; height: 56px; stroke-width: 2; }
@keyframes plateIn { from { transform: scale(.3) rotate(-90deg); opacity: 0; } }
.cat-head h2 { font-size: 30px; }
.paper-stack { display: flex; flex-direction: column; gap: 14px; }
.word {
  border-radius: 8px 8px 20px 8px; padding: 17px 18px 17px 34px;
  background: radial-gradient(circle, var(--clay) 2px, transparent 2.5px) 14px 50% / 6px 12px repeat-y, var(--slip);
  animation: enter .45s var(--out) both; animation-delay: calc(var(--i) * .07s);
}
.nav { display: grid; grid-template-columns: 1fr 1.7fr; gap: 12px; margin-top: auto; padding-top: 18px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: rgba(233, 169, 58, .96); animation: fadeIn .2s; transition: opacity .35s;
}
.overlay.out { opacity: 0; }
@keyframes fadeIn { from { opacity: 0; } }
.drop { position: relative; width: 200px; height: 260px; display: flex; align-items: flex-end; justify-content: center; }
.drop .slip { top: 0; z-index: 2; animation: fall .6s ease-in both; }
.drop .f0 { animation-delay: .4s; --dx: -60px; } .drop .f1 { animation-delay: .5s; --dx: 50px; } .drop .f2 { animation-delay: .6s; --dx: -20px; }
.drop .f3 { animation-delay: .7s; --dx: 70px; } .drop .f4 { animation-delay: .8s; --dx: -70px; } .drop .f5 { animation-delay: .9s; --dx: 20px; }
@keyframes fall {
  0% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -40px) rotate(120deg); }
  25% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 112px) rotate(0) scale(.7); }
}
/* fesul se întoarce cu gura în sus ca să primească biletele, apoi revine */
.drop .flip { animation: flipHat 1.9s var(--out) both; transform-origin: 50% 50%; }
@keyframes flipHat {
  0% { transform: rotate(0); }
  20%, 62% { transform: rotate(180deg) translateY(-6px); }
  70% { transform: rotate(180deg) translateY(4px) scale(1.06, .94); }
  88% { transform: rotate(372deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- farfurii (panouri) ---------- */
.plate {
  position: relative; background: var(--slip); border: var(--line); border-radius: 28px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 6px 0 var(--umber);
}
.plate::before { content: ''; position: absolute; inset: 7px; border: 3px dotted var(--clay); border-radius: 21px; opacity: .45; pointer-events: none; }
.plate.wide { width: 100%; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.center-row { justify-content: center; }
.qr-plate { flex-direction: row; align-items: center; gap: 16px; }
.qr { background: #fff8e8; padding: 8px; border: var(--line); border-radius: 16px; flex: none; width: 140px; height: 140px; display: grid; place-items: center; }
.qr img, .qr canvas { width: 118px !important; height: 118px !important; }
.url { font-size: 14px; color: var(--clay-d); word-break: break-all; margin-top: 6px; font-weight: 700; }
.seg { display: inline-flex; border: var(--line); border-radius: 999px; overflow: hidden; box-shadow: 0 3px 0 var(--umber); }
.seg button { border: 0; background: var(--slip); padding: 6px 22px; font-family: var(--display); font-weight: 900; font-size: 20px; cursor: pointer; transition: background .2s; }
.seg button + button { border-left: var(--line); }
.seg button.sel { background: var(--umber); color: var(--slip); }
.seg button:disabled { cursor: not-allowed; opacity: .6; }
.okline { display: inline-flex; align-items: center; gap: 8px; color: var(--leaf-d); font-weight: 700; }
.okline .ic { stroke-width: 3; }

.tcols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tcols.stack { grid-template-columns: 1fr; }
.tcol { display: flex; flex-direction: column; gap: 6px; border-radius: 20px; padding: 10px 8px; min-width: 0; text-align: left; border: 2.5px solid var(--umber); }
.tcol.a { background: #f6d2bf; } .tcol.b { background: #cfdaf2; }
.tcol h3 { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 2px; }
.tcol.a h3 { color: var(--clay-d); } .tcol.b h3 { color: var(--cobalt-d); }
.tcol h3 span { font-size: 15px; background: var(--slip); border: 2px solid var(--umber); border-radius: 999px; padding: 0 8px; color: var(--umber); }
.prow {
  display: flex; align-items: center; gap: 6px; background: var(--slip); border: 2px solid var(--umber); border-radius: 999px;
  padding: 3px 6px 3px 3px; min-width: 0; animation: enter .35s var(--out) both; animation-delay: calc(var(--i) * .04s);
}
.prow.off { opacity: .45; }
.pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 15px; }
.tag { display: inline-flex; color: var(--muted); }
.tag .ic { width: 17px; height: 17px; }
.tag.ok { color: var(--leaf); } .tag.ok .ic { stroke-width: 3; }
.tag.phone { color: var(--clay); }
.mini { border: 0; background: none; padding: 4px; margin: -4px 0; cursor: pointer; color: var(--umber-2); border-radius: 50%; display: inline-flex; }
.mini .ic { width: 18px; height: 18px; }
.mini:hover { background: var(--slip-2); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px 5px 5px; border: 2.5px solid var(--umber); border-radius: 999px;
  background: var(--slip); font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 var(--umber); transition: transform .2s var(--spring), background .2s;
}
.pill.sel { background: var(--leaf); color: var(--slip); transform: translateY(-2px); }
.sticky {
  position: sticky; bottom: 0; margin-top: auto; padding: 18px 0 4px; display: flex; flex-direction: column; gap: 10px; text-align: center;
  background: linear-gradient(transparent, var(--glaze) 30%);
}
.sticky .hint { font-weight: 700; color: var(--umber-2); }
.note { display: inline-flex; align-items: center; gap: 8px; background: var(--slip); border: var(--line); box-shadow: 0 4px 0 var(--umber); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.note .ic { color: var(--clay); }
.who { display: inline-block; font-weight: 700; padding: 0 10px; border-radius: 999px; white-space: nowrap; color: var(--slip); border: 2px solid var(--umber); }
.who.a { background: var(--clay); } .who.b { background: var(--cobalt); }

/* ---------- avatare ---------- */
.av {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 2.5px solid var(--umber); color: var(--slip); font-family: var(--display); font-weight: 900; font-size: 19px; line-height: 1;
}
.av.a { background: var(--clay); } .av.b { background: var(--cobalt); }
.av.is-bot { border-style: dashed; }
.av.sm { width: 30px; height: 30px; font-size: 15px; }
.av.xs { width: 26px; height: 26px; font-size: 13px; border-width: 2px; }
.av.xl { width: 96px; height: 96px; font-size: 46px; border-width: 4px; box-shadow: 0 5px 0 var(--umber); animation: plateIn .6s var(--spring); }
.av-bot { position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--slip); border: 2px solid var(--umber); color: var(--umber); display: grid; place-items: center; }
.av-bot .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.av.sm .av-bot, .av.xs .av-bot { width: 15px; height: 15px; right: -5px; bottom: -5px; }
.av.sm .av-bot .ic, .av.xs .av-bot .ic { width: 10px; height: 10px; }

/* ---------- joc ---------- */
.game { align-items: center; text-align: center; gap: 12px; }
.game > .plate, .game > .row, .game > .btn.huge, .game > .board, .game > .rail, .game > .order, .game > .ticket { align-self: stretch; }
.rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rail-step {
  display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 4px; border-radius: 999px;
  border: 2.5px solid rgba(59, 29, 16, .35); color: rgba(59, 29, 16, .55); font-family: var(--display); font-weight: 800; font-size: 14px; white-space: nowrap;
}
.rail-step .ic { width: 18px; height: 18px; }
.rail-step.on { color: var(--slip); border-color: var(--umber); box-shadow: 0 3px 0 var(--umber); animation: plateIn .5s var(--spring); }
.rail-step.r0.on { background: var(--r0); } .rail-step.r1.on { background: var(--r1); } .rail-step.r2.on { background: var(--r2); }

.banner {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px; border-radius: 999px;
  border: var(--line); box-shadow: var(--lift); color: var(--slip); text-align: left;
  animation: swingIn .9s var(--spring) both; transform-origin: top center;
}
.banner > .ic { width: 42px; height: 42px; padding: 7px; border-radius: 50%; background: var(--slip); color: var(--umber); border: 2.5px solid var(--umber); }
.banner small { display: block; font-weight: 700; font-size: 14px; opacity: .9; }
.banner b { font-family: var(--display); font-size: 26px; font-weight: 900; line-height: 1; }
.banner.r0 { background: var(--r0); } .banner.r1 { background: var(--r1); } .banner.r2 { background: var(--r2); }
@keyframes swingIn { 0% { transform: translateY(-40px) rotate(-12deg); opacity: 0; } 60% { transform: rotate(4deg); opacity: 1; } 100% { transform: none; } }

.order { display: flex; align-items: flex-start; justify-content: center; gap: 4px; overflow: hidden; padding: 4px 0; }
.ord { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 50px; flex: none; animation: enter .4s var(--out) both; animation-delay: calc(var(--i) * .06s); }
.ord span { font-size: 12px; font-weight: 700; color: var(--umber-2); max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord .av { width: 34px; height: 34px; font-size: 16px; }
.ord.now .av { width: 46px; height: 46px; font-size: 22px; box-shadow: 0 0 0 4px var(--slip), 0 0 0 6.5px var(--umber); }
.ord.now span { font-family: var(--display); font-weight: 900; color: var(--umber); }
.ord-arrow { align-self: center; margin-top: -14px; width: 8px; height: 8px; border-right: 2.5px solid var(--umber-2); border-top: 2.5px solid var(--umber-2); transform: rotate(45deg); flex: none; opacity: .6; }

.spot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bigname {
  font-family: var(--display); font-weight: 900; font-size: clamp(44px, 14vw, 70px); line-height: 1; word-break: break-word;
  -webkit-text-stroke: 6px var(--umber); paint-order: stroke fill; text-shadow: 0 5px 0 var(--umber);
  animation: logoIn .6s var(--spring) .08s both;
}
.bigname.a { color: #ff8a5c; } .bigname.b { color: #8fb6ff; }
.last { font-weight: 700; color: var(--umber-2); }

.board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; width: 100%; }
.tplate {
  display: flex; flex-direction: column; align-items: center; padding: 8px 10px 10px; border: var(--line); border-radius: 26px;
  color: var(--slip); box-shadow: var(--lift); position: relative;
}
.tplate::before { content: ''; position: absolute; inset: 5px; border: 2.5px dotted rgba(255, 244, 220, .55); border-radius: 20px; pointer-events: none; }
.tplate.a { background: var(--clay); } .tplate.b { background: var(--cobalt); }
.tplate small { font-weight: 700; font-size: 14px; }
.tplate b { font-family: var(--display); font-weight: 900; font-size: 42px; line-height: 1; display: inline-block; }
.tplate.gulp { animation: gulp .4s var(--spring); }
@keyframes gulp { 0% { transform: scale(1.12, .9); } 100% { transform: none; } }
.board-hat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.board-hat span { font-size: 13px; font-weight: 700; color: var(--umber-2); white-space: nowrap; }
.board-hat b { font-family: var(--display); font-weight: 900; font-size: 17px; display: inline-block; }
.pop { animation: popNum .45s var(--spring); }
@keyframes popNum { 0% { transform: scale(1.7); } 100% { transform: none; } }

.run-head { display: flex; align-items: center; gap: 16px; align-self: stretch; justify-content: center; }
.run-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; }
.run-info .who { font-family: var(--display); font-weight: 800; font-size: 20px; padding: 2px 12px; }
.streak { font-weight: 700; color: var(--umber-2); font-size: 15px; }
.streak b { font-family: var(--display); font-weight: 900; font-size: 28px; color: var(--leaf-d); display: inline-block; margin-left: 4px; vertical-align: -3px; }
.timer { position: relative; width: 112px; height: 112px; flex: none; border-radius: 50%; background: var(--slip); border: var(--line); box-shadow: var(--lift); }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 11; }
.timer .track { stroke: var(--slip-2); }
.timer .bar { stroke: var(--leaf); stroke-dasharray: 100; stroke-linecap: round; transition: stroke .3s; }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 42px; }
.timer.low { background: #ffe0cc; }
.timer.low .bar { stroke: var(--clay); }
.timer.low span { color: var(--clay-d); animation: beat .5s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.14); } }

.ticket { width: 100%; height: 236px; perspective: 1100px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.solo .ticket { height: 180px; }
.solo .btn.guess { padding: 26px 20px; font-size: 36px; }
.ticket .inner { position: relative; width: 100%; height: 100%; transition: transform .32s var(--spring); transform-style: preserve-3d; }
.ticket.open .inner { transform: rotateY(180deg); }
.ticket.bot-ticket .inner { transform: none; }
.ticket.swap { animation: swap .42s var(--out); }
@keyframes swap { 0% { transform: translateY(-40px) rotate(-8deg) scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px;
  border: var(--line); border-radius: 14px 14px 34px 14px; box-shadow: 0 7px 0 var(--umber);
}
.face.front { background: var(--clay); color: var(--slip); }
.face.front::before { content: ''; position: absolute; inset: 8px; border: 3px dotted rgba(255, 244, 220, .6); border-radius: 10px 10px 28px 10px; }
.face.front b { font-family: var(--display); font-weight: 900; font-size: 32px; }
.face.front small { font-weight: 700; font-size: 16px; opacity: .9; }
.peek { margin-top: -6px; }
.face.back {
  transform: rotateY(180deg); background: var(--slip);
  background-image: linear-gradient(transparent 0 calc(100% - 22px), var(--slip-2) calc(100% - 22px));
}
.bot-ticket .face.back { transform: none; }
.face.back b { font-family: var(--display); font-weight: 900; font-size: clamp(34px, 10vw, 50px); line-height: 1.05; word-break: break-word; }
.face.back small { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); font-size: 15px; }
.tcat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 8px; border-radius: 999px; background: var(--umber); color: var(--slip); font-weight: 700; font-size: 15px; }
.tcat .ic { width: 18px; height: 18px; }

.row.one { display: grid; grid-template-columns: 1fr; width: 100%; }

/* arbitrul: biletele ghicite în tura asta */
.judge { gap: 8px; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.logrow {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 2.5px solid var(--umber); border-radius: 18px;
  background: #fff; text-align: left;
}
.logrow b { flex: 1; min-width: 0; font-family: var(--display); font-weight: 900; font-size: 22px; line-height: 1.1; word-break: break-word; }
.logrow .tcat { padding: 5px; }
.logrow .btn { flex: none; color: var(--clay-d); }
.logrow.fresh { animation: freshIn .6s var(--spring); background: #e6f4dc; border-color: var(--leaf-d); }
@keyframes freshIn { 0% { transform: translateY(-14px) scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
.log-empty { padding: 14px 6px; color: var(--muted); font-weight: 700; text-align: center; }

/* pauza: perdea peste tot ecranul de joc */
.veil[hidden] { display: none; }
.veil {
  position: fixed; inset: 0; z-index: 52; display: grid; place-items: center; padding: 24px;
  background: rgba(59, 29, 16, .6); animation: fadeIn .2s;
}
.veil-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 22px; width: min(100%, 360px);
  background: var(--slip); border: var(--line); border-radius: 30px; box-shadow: 0 7px 0 var(--umber); text-align: center;
  animation: plateIn .45s var(--spring);
}
.veil-card h2 { font-size: 34px; font-weight: 900; }
.veil-card p { font-weight: 700; color: var(--umber-2); }
.veil-card .btn { align-self: stretch; }

/* numărătoarea 3-2-1 */
#countdown {
  position: fixed; inset: 0; z-index: 55; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(59, 29, 16, .55); pointer-events: none;
}
#countdown.show { display: flex; }
#countdown b {
  font-family: var(--display); font-weight: 900; font-size: 150px; line-height: 1; color: var(--slip);
  -webkit-text-stroke: 10px var(--umber); paint-order: stroke fill; text-shadow: 0 9px 0 var(--umber);
}
#countdown span { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--slip); }
#countdown b.cd { animation: cd .9s var(--out); }
@keyframes cd { 0% { transform: scale(2.2); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 80% { transform: scale(.9); opacity: 1; } 100% { transform: scale(.7); opacity: .2; } }

.flyslip {
  position: fixed; left: 0; top: 0; z-index: 80; width: 44px; height: 28px; pointer-events: none;
  background: var(--slip); border: 2.5px solid var(--umber); border-radius: 4px; box-shadow: 0 3px 0 var(--umber);
}
.flyslip::after { content: ''; position: absolute; left: 7px; right: 7px; top: 7px; height: 3px; border-radius: 2px; box-shadow: 0 7px 0 currentColor; background: currentColor; }
.flyslip.a { color: var(--clay); } .flyslip.b { color: var(--cobalt); }

/* ---------- final ---------- */
.over { gap: 12px; }
.win { font-size: 42px; font-weight: 900; color: var(--slip); -webkit-text-stroke: 6px var(--umber); paint-order: stroke fill; text-shadow: 0 5px 0 var(--umber); animation: logoIn .7s var(--spring) both; }
.win.a { color: #ff8a5c; } .win.b { color: #8fb6ff; }
.final { display: flex; align-items: center; gap: 16px; font-family: var(--display); font-weight: 900; }
.final b { font-size: 70px; line-height: 1; display: inline-block; -webkit-text-stroke: 5px var(--umber); paint-order: stroke fill; }
.final .a { color: var(--clay); } .final .b { color: var(--cobalt); }
.final span { font-size: 22px; color: var(--umber-2); }
.wonlist { display: flex; flex-wrap: wrap; gap: 5px; }
.wonlist span { background: var(--slip); border: 2px solid var(--umber); padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: 14px; animation: enter .35s var(--out) both; animation-delay: calc(.5s + var(--i) * .03s); }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  background: var(--umber); color: var(--slip); padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 70;
  box-shadow: 0 4px 0 var(--clay-d); transition: transform .35s var(--spring), opacity .2s;
  max-width: calc(100% - 32px); text-align: center; opacity: 0; pointer-events: none;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-height: 700px) {
  .ticket { height: 190px; }
  .solo .ticket { height: 150px; }
  .btn.guess { padding: 26px 20px; font-size: 36px; }
  .timer { width: 92px; height: 92px; }
  .timer span { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- buton sunet ---------- */
.sound-btn {
  position: absolute; top: calc(24px + env(safe-area-inset-top)); right: max(12px, calc(50% - 240px + 12px)); z-index: 45;
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--slip); border: 2.5px solid var(--umber); box-shadow: 0 3px 0 var(--umber); color: var(--umber);
}
.sound-btn[aria-pressed="false"] { color: var(--muted); background: var(--slip-2); }
.sound-btn .ic { width: 22px; height: 22px; }
.top { padding-right: 52px; }
.game .rail { margin-right: 52px; }

/* ---------- serii „În formă!” ---------- */
#streak {
  position: fixed; left: 50%; top: 30%; z-index: 57; pointer-events: none; opacity: 0;
  display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%);
}
#streak b {
  font-family: var(--display); font-weight: 900; font-size: 54px; white-space: nowrap; color: #ffd23f;
  -webkit-text-stroke: 8px var(--umber); paint-order: stroke fill; text-shadow: 0 6px 0 var(--umber), 0 0 30px #ff7b1f;
}
#streak span { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--slip); -webkit-text-stroke: 4px var(--umber); paint-order: stroke fill; }
#streak.show { animation: streakIn 1.6s var(--out); }
@keyframes streakIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4) rotate(-10deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); }
  75% { opacity: 1; transform: translate(-50%, -60%) scale(1) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(.9) rotate(-4deg); }
}
.quake { animation: quake .45s linear; }
@keyframes quake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 1px); } }
.flyslip.miss { color: var(--muted); }

/* ---------- final pe etape ---------- */
.stage { opacity: 0; animation: stageIn .55s var(--spring) forwards; animation-delay: var(--d, 0ms); }
@keyframes stageIn { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }
.stage.rise { animation-name: riseIn; animation-duration: .8s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
.wide-stage { align-self: stretch; display: flex; flex-direction: column; gap: 12px; }
.rounds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rrow { display: grid; grid-template-columns: 1fr 72px 72px; align-items: center; gap: 6px; text-align: left; }
.rrow.head span { font-family: var(--display); font-weight: 800; font-size: 18px; }
.rrow.head b { font-size: 13px; text-align: center; }
.rrow.head .a { color: var(--clay-d); } .rrow.head .b { color: var(--cobalt-d); }
.rrow > b { font-family: var(--display); font-weight: 900; font-size: 26px; text-align: center; }
.rrow:not(.head) > b { border-radius: 14px; color: var(--slip); border: 2px solid var(--umber); padding: 1px 0; }
.rrow:not(.head) > b.a { background: var(--clay); } .rrow:not(.head) > b.b { background: var(--cobalt); }
.rname { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rname .ic { width: 26px; height: 26px; padding: 4px; border-radius: 50%; color: var(--slip); border: 2px solid var(--umber); }
.rname.r0 .ic { background: var(--r0); } .rname.r1 .ic { background: var(--r1); } .rname.r2 .ic { background: var(--r2); }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; width: 100%; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pod .pname { font-weight: 700; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .av.lg { width: 60px; height: 60px; font-size: 28px; border-width: 3px; }
.pblock {
  width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px;
  border: var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; color: var(--slip); position: relative;
}
.pblock::before { content: ''; position: absolute; inset: 5px 5px 0; border: 2.5px dotted rgba(255, 244, 220, .5); border-bottom: 0; border-radius: 13px 13px 0 0; }
.pblock.a { background: var(--clay); } .pblock.b { background: var(--cobalt); }
.pblock b { font-family: var(--display); font-weight: 900; font-size: 32px; line-height: 1; }
.pblock small { font-weight: 700; font-size: 13px; }
.p1 .pblock { height: 118px; } .p2 .pblock { height: 88px; } .p3 .pblock { height: 66px; }
.p1 .av { box-shadow: 0 0 0 4px #ffd23f, 0 0 0 6.5px var(--umber); }
.facts { display: flex; flex-direction: column; gap: 10px; align-self: stretch; }
.fact {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: var(--line); border-radius: 22px;
  background: var(--slip); box-shadow: 0 4px 0 var(--umber);
}
.fact > .ic { width: 42px; height: 42px; padding: 8px; border-radius: 50%; background: var(--umber); color: #ffd23f; }
.fact small { display: block; font-weight: 700; color: var(--muted); font-size: 14px; }
.fact b { font-family: var(--display); font-weight: 900; font-size: 22px; display: block; line-height: 1.15; }
.fact span { font-size: 15px; }
.allwords summary { font-family: var(--display); font-weight: 800; font-size: 18px; cursor: pointer; }
.allwords[open] summary { margin-bottom: 6px; }