/* ============================================================================
 * Flappy Victory – aspectul interfeței
 * Ideea vizuală: o pagină de caiet de engleză pe care sunt lipite autocolante
 * (creierul din logo, butoanele, cartonașele). Culorile sunt cele din logo.
 * ========================================================================== */
:root {
  --navy: #19325E;
  --orange: #F0A125;
  --blue: #0D64B4;
  --mist: #B9E2E5;
  --amber: #FFB400;
  --paper: #FBFDFE;
  --cream: #FFF4D6;
  --red: #C8323A;
  --green: #2A8C5B;
  --ink-soft: #40577F;
  --u: 1px;                       /* o unitate de joc în pixeli (setată din cod) */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: "FV Adventor", "Century Gothic", "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none;
  background: var(--paper);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}

.app {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; height: 100vh; height: 100dvh; overflow: hidden;
  font-family: var(--font); color: var(--navy); font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}

.stage { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.fx { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ------------------------------ butoane ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 11px 22px;
  font-weight: 700; font-size: 17px; line-height: 1.15; text-align: center;
  color: var(--navy); background: #fff;
  border: 3px solid var(--navy); border-radius: 999px;
  box-shadow: 0 5px 0 var(--navy);
  cursor: pointer;
  transition: transform .07s ease-out, box-shadow .07s ease-out, background-color .12s;
}
.btn:hover { background: #F2FAFB; }
.btn:active, .btn.is-down { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: 0 5px 0 var(--navy); }
.btn-primary { background: var(--orange); }
.btn-primary:hover { background: #F6AE3D; }
.btn-big { min-height: 56px; padding: 13px 34px; font-size: 20px; }

.icon-btn {
  width: 46px; height: 46px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--navy);
  border: 3px solid var(--navy); border-radius: 50%;
  box-shadow: 0 4px 0 var(--navy);
  cursor: pointer; pointer-events: auto;
  transition: transform .07s ease-out, box-shadow .07s ease-out;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn .ic-off { display: none; }
.icon-btn[aria-pressed="true"] .ic-on { display: none; }
.icon-btn[aria-pressed="true"] .ic-off { display: block; }

.link {
  background: none; border: 0; padding: 6px 2px; margin: 0;
  font-weight: 700; font-size: 15px; color: var(--blue);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ------------------------------ în joc ------------------------------------ */
.hud { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 5; pointer-events: none; }
.hud-top {
  position: absolute; top: calc(var(--safe-t) + 12px); right: calc(var(--safe-r) + 12px);
  display: flex; gap: 10px;
}
/* nivelul curent, în colțul din stânga */
.level-chip {
  position: absolute; top: calc(var(--safe-t) + 14px); left: calc(var(--safe-l) + 12px);
  height: 2.65em; padding: .07em .95em 0; display: flex; align-items: center;
  background: #fff; border: 3px solid var(--navy); border-radius: 999px;
  box-shadow: 0 4px 0 var(--navy);
  font-weight: 700; font-size: clamp(15px, calc(var(--u) * 13), 22px); line-height: 1; white-space: nowrap;
}
.level-chip.is-pop { transform-origin: 0 50%; animation: chip-pop .9s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes chip-pop { 0% { transform: scale(1); background: var(--amber); } 25% { transform: scale(1.16) rotate(-3deg); background: var(--amber); } 75% { background: var(--amber); } 100% { transform: none; background: #fff; } }
/* premiul următor și traducerea stau pe riglă: acolo nu zboară nimic */
.hud-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 108);
  padding: 0 calc(var(--safe-r) + 12px) var(--safe-b) calc(var(--safe-l) + 12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: clamp(13px, calc(var(--u) * 13.5), 18px);
}
.pill {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: .55em;
  min-width: 13em; max-width: min(100%, 30em);
  height: 2.5em; padding: 0 .85em 0 .7em;
  background: #fff; border: 3px solid var(--navy); border-radius: 999px;
  box-shadow: 0 3px 0 rgba(25, 50, 94, .28);
  font-size: 1em; font-weight: 700; line-height: 1;
}
.pill-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--mist); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s ease-out; }
.pill-icon { position: relative; width: 1.4em; height: 1.4em; flex: none; color: var(--navy); }
.pill-text { position: relative; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: .08em; }
.pill-count { position: relative; flex: none; padding-top: .08em; font-variant-numeric: tabular-nums; }
.i-accent { fill: var(--orange); }

.word-toast {
  padding: .3em .85em .22em; border-radius: 999px;
  background: #fff; border: 2px solid var(--navy);
  font-size: 1.1em; line-height: 1.2; white-space: nowrap;
  opacity: 0; transform: translateY(4px) scale(.96);
  transition: opacity .16s, transform .16s;
}
.word-toast.is-on { opacity: 1; transform: none; }
.word-toast b { font-weight: 700; }

.banner {
  position: absolute; left: 50%; top: calc(50% - var(--safe-b) / 2);
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: .1em;
  padding: .55em 1.3em .45em; width: max-content; max-width: calc(100% - 24px);
  background: var(--amber); border: 3px solid var(--navy); border-radius: 18px;
  box-shadow: 0 5px 0 var(--navy);
  text-align: center;
  animation: banner-in .32s cubic-bezier(.2, 1.5, .4, 1) both;
}
.banner.is-out { animation: banner-out .25s ease-in both; }
.banner-label { font-size: 1em; font-weight: 400; line-height: 1.15; }
.banner-title { font-size: 1.3em; line-height: 1.15; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes banner-out { to { opacity: 0; transform: translate(-50%, -30%) scale(.9); } }

.ready {
  position: absolute; left: 0; right: 0; z-index: 4;
  bottom: calc(var(--u) * 108 + 34px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  pointer-events: none;
}
.ready-text {
  padding: 8px 18px 7px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: #fff; border: 3px solid var(--navy); box-shadow: 0 4px 0 rgba(25, 50, 94, .28);
  font-weight: 700; font-size: 17px; text-align: center;
}
.ready-try {
  padding: 6px 15px 5px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: var(--cream); border: 2.5px solid var(--navy);
  font-weight: 700; font-size: 14.5px; text-align: center;
}
.ready-tap { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); border: 3px solid var(--navy); position: relative; }
.ready-tap::after {
  content: ""; position: absolute; top: -3px; right: -3px; bottom: -3px; left: -3px; border-radius: 50%; border: 3px solid var(--navy);
  animation: tap-ring 1.2s ease-out infinite;
}
@keyframes tap-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }

/* ------------------------------ ecrane ------------------------------------ */
.screen {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 14px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 14px) calc(var(--safe-l) + 16px);
}

/* start */
.start { pointer-events: none; }
.start > * { pointer-events: auto; }
.school-logo { width: min(58vw, calc(var(--u) * 230), 320px); height: auto; margin-top: calc(var(--u) * 4); }
.wordmark { margin: calc(var(--u) * 10) 0 0; width: min(74vw, calc(var(--u) * 252)); transform: rotate(-3deg); line-height: 0; }
.wm { display: block; width: 100%; height: auto; overflow: visible; }
.wm-inline { display: none; }
.hero-space { flex: 1 1 auto; align-self: stretch; min-height: calc(var(--u) * 120); pointer-events: none; }
.tagline {
  margin: 0 0 calc(var(--u) * 14); max-width: 31ch;
  padding: 7px 14px 6px; border-radius: 14px;
  background: rgba(251, 253, 254, .9);
  font-size: clamp(14.5px, calc(var(--u) * 14.5), 18px); line-height: 1.4; text-align: center; text-wrap: balance;
}
/* câte încercări pentru premii mai sunt (sau premiul încă nerevendicat) */
.tries {
  margin: calc(var(--u) * -6) 0 calc(var(--u) * 14); max-width: min(100%, 42ch);
  padding: 6px 13px 5px; border-radius: 13px;
  background: var(--cream); border: 2.5px solid var(--navy);
  font-size: clamp(13.5px, calc(var(--u) * 13), 16.5px); line-height: 1.35; font-weight: 700; text-align: center; text-wrap: balance;
}
/* pe ecranele scunde rămâne doar rândul cu încercările, ca butoanele să nu coboare peste riglă */
@media (max-height: 700px) and (orientation: portrait) {
  .start.has-tries .tagline { display: none; }
  .start.has-tries .tries { margin-top: 0; }
}
.actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.actions-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.start .actions { margin-bottom: calc(var(--u) * 108 + 12px); }
.start .btn-big { min-width: 200px; min-height: clamp(56px, calc(var(--u) * 48), 72px); font-size: clamp(20px, calc(var(--u) * 17.5), 27px); }
.start .actions-row .btn { min-height: clamp(48px, calc(var(--u) * 40), 60px); font-size: clamp(17px, calc(var(--u) * 14.5), 22px); }
.start-mute { position: absolute; top: calc(var(--safe-t) + 12px); right: calc(var(--safe-r) + 12px); }

/* sfârșitul rundei */
.over { background: rgba(25, 50, 94, .34); overflow-y: auto; }
/* sub o fereastră deschisă nu rămâne nimic care să distragă */
.app[data-modal] .over-card, .app[data-modal] .start > * { visibility: hidden; }
.card {
  background: #fff; border: 3px solid var(--navy); border-radius: 24px;
  box-shadow: 0 8px 0 rgba(25, 50, 94, .30);
}
.over-card {
  width: min(100%, 400px); margin: auto; padding: 22px 20px 22px; text-align: center;
  animation: card-in .26s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.over-title { margin: 0; font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.over-sub { margin: 4px 0 0; font-size: 16px; color: var(--ink-soft); }
.scores { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.score-box { min-width: 0; padding: 9px 4px 6px; border-radius: 16px; background: #EAF6F8; display: flex; flex-direction: column; align-items: center; }
.score-box:nth-child(2) { background: var(--cream); }
.score-label { font-size: 14px; }
.score-num { font-size: 40px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.words { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.words b { color: var(--navy); font-weight: 700; }
.prize-area { margin: 16px 0 18px; }
.prize-line { margin: 0; font-size: 16px; line-height: 1.45; text-wrap: balance; }
.prize-line strong { font-weight: 700; }
.bar { height: 14px; margin: 12px 6px 0; border-radius: 999px; background: #EAF6F8; border: 2.5px solid var(--navy); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--orange); border-radius: 999px 0 0 999px; }
.banked {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 11px 14px; border-radius: 16px; background: var(--cream); border: 2.5px solid var(--navy);
}
.banked svg { width: 34px; height: 34px; flex: none; }
.banked-label { display: block; font-size: 14px; }
.banked-title { display: block; font-size: 18px; line-height: 1.2; }
.banked-score { display: block; font-size: 14px; color: var(--ink-soft); }
.prize-area .banked + .prize-line { margin-top: 12px; font-size: 15px; }
.one-note { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.tries-note { margin: 10px 0 0; font-size: 14.5px; line-height: 1.4; font-weight: 700; text-wrap: balance; }
.prize-area .prize-line + .banked, .prize-area .prize-line + .tries-note { margin-top: 12px; }
.other-player { display: block; margin: 10px auto 0; font-size: 14px; font-weight: 400; color: var(--ink-soft); }
.other-player.is-armed { color: var(--red); font-weight: 700; }
.sheet .other-player { margin: 2px 0 6px; text-align: left; }

/* cadoul de deschis */
.gift-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gift {
  position: relative; width: 140px; height: 138px; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gift::before {                                  /* umbra de pe „masă” */
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 14px; border-radius: 50%; background: rgba(25, 50, 94, .16);
}
.gift-box {
  position: absolute; left: 17px; right: 17px; bottom: 7px; height: 72px;
  background: var(--orange); border: 3px solid var(--navy); border-radius: 4px 4px 12px 12px;
}
.gift-box::before, .gift-lid::before {
  content: ""; position: absolute; top: -3px; bottom: -3px; left: 50%; width: 24px; margin-left: -12px;
  background: var(--blue); border: 3px solid var(--navy);
}
.gift-lid {
  position: absolute; left: 7px; right: 7px; bottom: 76px; height: 30px;
  background: var(--amber); border: 3px solid var(--navy); border-radius: 9px;
  transform-origin: 50% 100%;
}
.gift-bow, .gift-bow::after {
  position: absolute; width: 34px; height: 24px; border: 3px solid var(--navy); background: var(--blue);
}
.gift-bow { left: 50%; top: -24px; margin-left: -37px; border-radius: 60% 60% 10% 60%; transform: rotate(8deg); }
.gift-bow::after { content: ""; left: 34px; top: -6px; border-radius: 60% 60% 60% 10%; transform: rotate(-16deg); }
.gift-count {
  position: absolute; right: -2px; top: 8px; min-width: 30px; height: 30px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 3px solid var(--navy); border-radius: 999px; font-size: 15px; font-weight: 700;
}
.gift.is-idle { animation: gift-wobble 2.6s ease-in-out infinite; }
.gift.is-hit { animation: gift-hit .32s ease-out; }
.gift.is-open .gift-lid { animation: lid-off .5s cubic-bezier(.2, .9, .3, 1) forwards; }
.gift.is-open .gift-box { animation: box-pop .5s ease-out forwards; }
.gift.is-open .gift-count, .gift.is-open::before { opacity: 0; transition: opacity .2s; }
@keyframes gift-wobble { 0%, 78%, 100% { transform: rotate(0); } 82% { transform: rotate(-5deg); } 88% { transform: rotate(5deg); } 94% { transform: rotate(-3deg); } }
@keyframes gift-hit { 0% { transform: scale(1); } 25% { transform: scale(1.12, .9) rotate(-6deg); } 55% { transform: scale(.94, 1.08) rotate(5deg); } 100% { transform: scale(1); } }
@keyframes lid-off { to { transform: translate(34px, -96px) rotate(38deg); opacity: 0; } }
@keyframes box-pop { 40% { transform: scale(1.1, .92); } 100% { transform: scale(.7); opacity: 0; } }
.gift-hint { margin: 0; font-size: 15px; font-weight: 700; }
.won { animation: won-in .4s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes won-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.won-label { display: block; font-size: 15px; }
.won-title {
  display: inline-block; margin-top: 6px; padding: 10px 18px 8px;
  background: var(--amber); border: 3px solid var(--navy); border-radius: 16px; box-shadow: 0 5px 0 var(--navy);
  font-size: 22px; line-height: 1.15; transform: rotate(-2deg);
}

/* pauză */
.overlay {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(25, 50, 94, .34);
}
.pause-card { padding: 22px 30px 26px; text-align: center; }
.pause-card h2 { margin: 0 0 16px; font-size: 28px; }

/* ------------------------------ ferestre ---------------------------------- */
.modal {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 30;
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(var(--safe-t) + 16px) calc(var(--safe-r) + 14px) calc(var(--safe-b) + 22px) calc(var(--safe-l) + 14px);
  background: rgba(25, 50, 94, .5);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.sheet {
  position: relative; width: min(100%, 440px); margin: auto; padding: 22px 20px 24px;
  -webkit-user-select: text; user-select: text;
  animation: card-in .22s cubic-bezier(.2, 1.3, .4, 1) both;
}
.sheet h2 { margin: 0 44px 8px 0; font-size: 26px; line-height: 1.12; letter-spacing: -.01em; }
.close {
  position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 3px solid var(--navy); border-radius: 50%; cursor: pointer;
}
.close svg { width: 20px; height: 20px; }
.lead { margin: 0 0 14px; font-size: 16px; line-height: 1.45; }
.note { margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.rule { margin: 14px 0 6px; font-size: 15px; line-height: 1.45; font-weight: 700; }
#btn-claim-prizes { width: 100%; margin: 8px 0 6px; }
#prizes-tries { margin-bottom: 0; }
#prizes-tries + .rule { margin-top: 8px; }
.giveup-actions { margin-top: 18px; align-items: stretch; }
.giveup-actions .btn { width: 100%; }
.btn-risk { color: var(--red); }
.demo-note { margin: 10px 0 6px; padding: 9px 12px; border-radius: 12px; background: #FDECEC; font-size: 14px; line-height: 1.4; }

/* scara premiilor */
.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ladder li {
  position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 0 12px;
  padding: 9px 12px 9px 9px; border-radius: 16px; border: 2.5px solid var(--navy); background: #fff;
}
.ladder li.is-reached { background: var(--cream); }
.ladder li.is-claimed { background: #E6F5EC; }
.ladder-score {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 62px; height: 50px; border-radius: 12px; background: var(--navy); color: #fff; line-height: 1;
}
.ladder-score b { font-size: 22px; }
.ladder-score span { font-size: 11.5px; margin-top: 3px; }
.ladder li.is-grand .ladder-score { background: var(--orange); color: var(--navy); }
.ladder-title { font-size: 16.5px; font-weight: 700; line-height: 1.2; }
.ladder-state { display: flex; color: #5B6C8F; }
.ladder-state svg { width: 18px; height: 18px; }
/* sub titlu: „premiul cel mare · o singură dată · atins / revendicat” */
.ladder li.has-sub .ladder-score, .ladder li.has-sub .ladder-state { grid-row: 1 / 3; }
.ladder li.has-sub .ladder-title { align-self: end; }
.ladder-sub { grid-column: 2; grid-row: 2; align-self: start; margin-top: 3px; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: #8A5A00; }
.ladder-sub span { white-space: nowrap; }
.ladder-done { display: inline-flex; align-items: center; gap: 3px; vertical-align: bottom; }
.ladder-done svg { width: 15px; height: 15px; }
.ladder li.is-claimed .ladder-done { color: var(--green); }

/* formular */
.claim-prize {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 12px;
  padding: 11px 14px; border-radius: 16px; background: var(--cream); border: 2.5px solid var(--navy);
}
.claim-prize svg { width: 34px; height: 34px; flex: none; }
.claim-prize strong { display: block; font-size: 18px; line-height: 1.2; }
.claim-prize span { display: block; font-size: 14px; color: var(--ink-soft); }
.field { display: block; margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.field input {
  display: block; width: 100%; margin-top: 5px; padding: 12px 14px 10px;
  font: 400 17px/1.3 var(--font); color: var(--navy);
  background: #fff; border: 3px solid var(--navy); border-radius: 14px;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: #8A99B5; }
.field input:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.field input.is-bad { border-color: var(--red); background: #FFF6F6; }
.err { min-height: 8px; margin: 0 0 8px; font-size: 14px; line-height: 1.35; color: var(--red); font-weight: 700; }
.check { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; margin: 4px 0 0; font-size: 14.5px; line-height: 1.4; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; }
.check .box {
  width: 26px; height: 26px; border: 3px solid var(--navy); border-radius: 8px; background: #fff;
  display: block; margin-top: 1px;
}
.check input:checked + .box {
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.500l4.500 4.500L19 7.500' fill='none' stroke='%2319325E' stroke-width='3.600' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.check input:focus-visible + .box { outline: 3px solid var(--blue); outline-offset: 2px; }
.check + .err { margin-left: 36px; }
#claim-form .link { display: block; margin: 8px 0 4px 34px; }
.form-error { margin: 10px 0 0; padding: 10px 13px; border-radius: 12px; background: #FDECEC; color: #8E1E25; font-size: 14.5px; line-height: 1.4; font-weight: 700; }
#claim-form .btn { width: 100%; margin-top: 16px; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--navy); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* voucher */
.ticket {
  position: relative; display: flex; margin: 4px 0 14px; overflow: hidden;
  border: 3px solid var(--navy); border-radius: 18px; background: #fff;
  box-shadow: 0 6px 0 rgba(25, 50, 94, .25);
}
.ticket-main { flex: 1 1 auto; min-width: 0; padding: 14px 14px 13px; display: flex; flex-direction: column; gap: 3px; }
.ticket-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.ticket-school { font-size: 14px; font-weight: 700; color: var(--blue); }
.ticket-demo { padding: 2px 9px 1px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.3; }
.ticket-prize { font-size: 21px; line-height: 1.15; margin-bottom: 8px; }
.ticket-code-wrap {
  position: relative; height: 62px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); border: 3px solid var(--navy); border-radius: 14px; overflow: hidden;
}
.ticket-code { font-size: 25px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; -webkit-user-select: all; user-select: all; }
.scratch { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .4s; }
.scratch.is-cleared { opacity: 0; pointer-events: none; }
.ticket-meta { font-size: 14px; line-height: 1.35; color: var(--ink-soft); }
.ticket-stub {
  flex: none; width: 62px; display: flex; align-items: center; justify-content: center;
  background: #EAF6F8; border-left: 3px dashed var(--navy);
}
.ticket-stub img { width: 44px; height: auto; }
.voucher-sheet .btn { width: 100%; }
.voucher-after .actions { align-items: stretch; gap: 12px; }

/* regulament */
.prose { font-size: 15px; line-height: 1.5; }
.prose h3 { margin: 16px 0 4px; font-size: 17px; }
.prose p { margin: 0 0 10px; }

.rotate-hint { display: none; }

/* ------------------------------ ecrane late (tabletă culcată, desktop) ----- */
@media (min-aspect-ratio: 1/1) {
  .wm-stacked { display: none; }
  .wm-inline { display: block; }
  .wordmark { width: min(72vw, calc(var(--u) * 470)); transform: rotate(-1.4deg); margin-top: calc(var(--u) * 8); }
  .school-logo { width: min(40vw, calc(var(--u) * 250), 360px); margin-top: 0; }
  .tagline { max-width: 52ch; }
  .start .actions { flex-direction: row; align-items: center; gap: 16px; }
  .start .actions-row { flex-wrap: nowrap; }
}

/* telefon ținut culcat: jocul merge, dar e mic */
@media (orientation: landscape) and (max-height: 440px) and (pointer: coarse) {
  .app[data-mode="title"]:not([data-modal]) .rotate-hint, .app[data-mode="ready"]:not([data-modal]) .rotate-hint {
    display: block; position: absolute; z-index: 12; left: 50%; top: calc(var(--safe-t) + 8px); transform: translateX(-50%);
    margin: 0; padding: 5px 14px 4px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none;
  }
  .wordmark { margin-top: calc(var(--u) * 46); }
  .school-logo { display: none; }
  .tagline { display: none; }
  .start .actions { margin-bottom: calc(var(--u) * 108 + 26px); }
  .btn-big { min-height: 46px; font-size: 17px; padding: 9px 24px; }
  .btn { min-height: 42px; padding: 8px 18px; font-size: 15px; }
  .over-card { padding: 14px 16px; }
  .over-title { font-size: 24px; }
  .scores { margin-top: 8px; }
  .score-num { font-size: 28px; }
  .prize-area { margin: 10px 0 12px; }
  .gift { transform-origin: 50% 100%; height: 100px; zoom: .72; }
}

/* ecrane mari (tabletă, monitor): cartonașele cresc, ca să nu pară pierdute */
@media (min-width: 760px) and (min-height: 960px) {
  .over-card, .sheet, .pause-card { zoom: 1.25; }
}

@media (prefers-reduced-motion: reduce) {
  .gift.is-idle, .ready-tap::after, .level-chip.is-pop { animation: none; }
  .over-card, .sheet, .banner, .won { animation-duration: .01s; }
}
