/* Davincho identity: TechnoGames' dark, compact language (Rajdhani headings + Inter body) in its
   own colour: navy surfaces and electric blue for actions and small accents (TechnoGames = graphite
   + yellow). To re-colour the whole app change the --accent* and surface variables below. Overrides the shared tokens;
   tokens.css / layout.css stay identical to the other apps. No inline styles (CSP). */
@font-face { font-family: "Rajdhani"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/rajdhani-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/rajdhani-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); }

:root {
  /* Davincho brand kit (option #2): navy surfaces, electric blue and cyan */
  --accent: #087cff;          /* fills (buttons, markers); dark text on it passes AA */
  --accent-hover: #0a6be0;
  --accent-text: #17d9ff;     /* cyan: links, icons and highlights on the dark surfaces */
  --accent-rgb: 8 124 255;
  --on-accent: #061124;
  --dv-background: #050b19;
  --dv-surface: #07152b;
  --dv-surface-raised: #0b2853;
  --dv-text: #f4f8ff;
  --dv-text-muted: #afbed7;
  --dv-border: #1c5387;
  --dv-track: #1a3a66;
  --dv-footer: #030710;
  --bg-rgb: 5 11 25;
  --dv-font-display: "Rajdhani", "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --color-primary: var(--accent);
  --color-primary-hover: var(--accent-hover);
  --color-primary-soft: rgb(var(--accent-rgb) / 16%);
  --color-accent: var(--accent);
  --color-bg: var(--dv-background);
  --color-surface: var(--dv-surface);
  --color-text: var(--dv-text);
  --color-text-muted: var(--dv-text-muted);
  --color-border: var(--dv-border);
  --color-border-strong: #2b6aa8;
  --color-danger: #ff8787;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 12px 32px rgb(0 0 0 / 28%);
  --header-h: 4rem;
  color-scheme: dark;
}

body.site { background: radial-gradient(52rem 22rem at 100% -8rem, rgb(var(--accent-rgb) / 9%), transparent 70%), var(--dv-background); }
h1, h2, h3 { font-family: var(--dv-font-display); font-weight: 700; letter-spacing: 0.015em; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }

/* --- Prototype strip ---------------------------------------------------------------------- */

/* --- Brand --------------------------------------------------------------------------------- */
.site-header { position: static; }  /* the big logo scrolls away instead of eating the screen */
.site-header__logo { display: block; width: auto; height: 5rem; }
@media (min-width: 48rem) { .site-header__logo { height: 7rem; } }
.site-footer__logo { display: block; width: auto; height: 3.7rem; }
.stage__logo { display: block; width: auto; height: 5.5rem; }

/* --- Header -------------------------------------------------------------------------------- */
.site-header { background: rgb(var(--bg-rgb) / 88%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--dv-border); }
.site-header__inner { padding-block: 0.2rem; row-gap: 0.1rem; }
.site-header__brand { text-decoration: none; }
.site-header__tag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.6rem 0.1rem 0.45rem; font-size: var(--text-xs); font-weight: 700; color: var(--on-accent); background: var(--accent); border-radius: 999px; }
.site-header__tag .icon { width: 0.95rem; height: 0.95rem; }
.site-header__nav { overflow: visible; flex-wrap: wrap; margin-inline: 0; padding-inline: 0; gap: 0; }
.site-header__nav a { padding: 0.4rem 0.45rem; font-size: var(--text-sm); font-weight: 500; color: var(--dv-text-muted); }
.site-header__nav a:hover { color: #fff; }
.site-header__nav a[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent-text); }
.site-header__user { gap: var(--space-3); }
.site-header__user a { color: #fff; }
.site-header__user a:hover { color: var(--accent-text); }
.site-header__login { font-weight: 600; }
.site-header__user .button:not(.button--ghost) { color: var(--on-accent); }
.site-header__me { display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; }
.site-header__me .icon { width: 1.1rem; height: 1.1rem; }
.site-header__me-name { display: none; }
.balance { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.55rem; text-decoration: none; background: var(--dv-surface-raised); border: 1px solid var(--dv-border); border-radius: 999px; }
.balance .icon { width: 1.1rem; height: 1.1rem; color: var(--accent-text); }
@media (min-width: 48rem) {
  .site-header__nav a { padding: 0 0.8rem; font-size: var(--text-base); }
  .site-header__me-name { display: inline; }
}

/* --- Buttons ------------------------------------------------------------------------------- */
.button { color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-text)); border-color: transparent; border-radius: var(--radius-md); font-weight: 800; }
.button:hover { background: linear-gradient(135deg, var(--accent-hover), #4fe3ff); }
.button--ghost { color: var(--dv-text); background: transparent; border-color: var(--color-border-strong); }
.button--ghost:hover { background: var(--dv-surface-raised); }
.button--ghost-dark { color: #fff; background: transparent; border-color: var(--color-border-strong); }
.button--ghost-dark:hover { background: rgb(255 255 255 / 8%); }
.button[aria-disabled="true"] { cursor: default; opacity: 0.6; }

/* --- Blocks and grids ---------------------------------------------------------------------- */
.block { margin-top: var(--space-6); }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.block__title { margin: 0; font-size: var(--text-xl); }
.block__link { font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.grid { display: grid; gap: var(--space-3); }
.grid--cards, .grid--plans { grid-template-columns: 1fr; }
@media (min-width: 40rem) { .grid--cards { grid-template-columns: repeat(2, 1fr); } .grid--plans { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .grid--cards { grid-template-columns: repeat(3, 1fr); } }

/* --- Prize art: tinted tile standing in for the real photo -------------------------------- */
.prize-art { display: grid; place-items: center; width: 100%; aspect-ratio: 1; color: #fff; border-radius: 0.7rem; background: linear-gradient(135deg, var(--dv-surface-raised), var(--dv-surface)); border: 1px solid var(--dv-border); }
.prize-art .icon { width: 52%; height: auto; max-height: 70%; aspect-ratio: 1; stroke-width: 1.3; color: var(--accent-text); }
.prize-art--phone { background: linear-gradient(135deg, #14343a, var(--dv-surface)); }
.prize-art--headset { background: linear-gradient(135deg, #3d2327, var(--dv-surface)); }
.prize-art--gift { background: linear-gradient(135deg, #3d3414, var(--dv-surface)); }
.prize-art--chair { background: linear-gradient(135deg, #1d2a45, var(--dv-surface)); }
.prize-art--big { aspect-ratio: 4 / 3; max-height: 16rem; }

/* --- Quota bar ----------------------------------------------------------------------------- */
progress.quota { display: block; width: 100%; height: 0.45rem; margin: 0.35rem 0; appearance: none; border: 0; border-radius: 999px; background: var(--dv-track); overflow: hidden; }
progress.quota::-webkit-progress-bar { background: var(--dv-track); }
progress.quota::-webkit-progress-value { background: var(--accent-text); border-radius: 999px; }
progress.quota::-moz-progress-bar { background: var(--accent-text); border-radius: 999px; }
progress.quota--inline { width: 6rem; flex: none; }

/* --- Chips --------------------------------------------------------------------------------- */
.chip { display: inline-block; padding: 0.1rem 0.55rem; font-size: var(--text-xs); font-weight: 700; border-radius: 999px; background: var(--color-primary-soft); color: var(--accent-text); }
.chip--accent { color: var(--on-accent); background: var(--accent); }
.chip--ok { color: #7ee2a0; background: rgb(46 160 90 / 18%); }
.chip--info { color: #8cc8ff; background: rgb(60 140 230 / 18%); }
.chip--warn { color: #ffd37a; background: rgb(255 180 40 / 16%); }
.chip--muted { color: var(--dv-text-muted); background: var(--dv-surface-raised); }

/* --- Cards base ---------------------------------------------------------------------------- */
.card { background: var(--dv-surface); border-color: var(--dv-border); }

/* --- Hero: the featured activity ----------------------------------------------------------- */
.hero { display: grid; gap: var(--space-4); padding: var(--space-4); background: radial-gradient(circle at 90% 0%, rgb(var(--accent-rgb) / 14%) 0, transparent 55%), var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-lg); }
.hero .prize-art { max-width: 14rem; margin-inline: auto; aspect-ratio: 1; }
.hero__title { margin: var(--space-2) 0 var(--space-1); font-size: 2.1rem; line-height: 1; text-transform: uppercase; }
.hero__summary { margin: 0 0 var(--space-3); color: var(--dv-text-muted); }
.hero__stats { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-2); font-size: var(--text-sm); }
.hero__stat { display: inline-flex; align-items: center; gap: 0.35rem; }
.hero__stat .icon { width: 1.1rem; height: 1.1rem; color: var(--accent-text); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
@media (min-width: 48rem) {
  .hero { grid-template-columns: 15rem 1fr; align-items: center; padding: var(--space-6); }
  .hero .prize-art { max-width: none; }
  .hero__title { font-size: 2.8rem; }
}
@media (max-width: 47.99rem) { .hero .prize-art { max-width: 7rem; margin-inline: 0; } }

/* --- Activity card: compact, thumbnail left on phones ------------------------------------- */
.activity-card { display: grid; grid-template-columns: 4.5rem 1fr; gap: var(--space-3); padding: var(--space-3); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.activity-card:hover { border-color: #5a5e68; }
.activity-card__title { margin: 0; font-size: var(--text-lg); }
.activity-card__title a { color: inherit; text-decoration: none; }
.activity-card__title a:hover { color: var(--accent-text); }
.activity-card__meta { margin: 0.1rem 0 0.2rem; font-size: var(--text-sm); }
.activity-card__time, .activity-card__winner { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; margin: 0.15rem 0 0; font-size: var(--text-sm); }
.activity-card__time .icon, .activity-card__winner .icon { width: 1rem; height: 1rem; color: var(--accent-text); flex: none; }
.activity-card--done .prize-art { filter: grayscale(0.7); }
@media (min-width: 40rem) {
  .activity-card { grid-template-columns: 1fr; }
  .activity-card .prize-art { aspect-ratio: 21 / 9; }
}

/* --- Plan card ----------------------------------------------------------------------------- */
.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-lg); }
.plan-card--featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.plan-card .chip { align-self: flex-start; }
.plan-card__name { margin: 0; font-size: var(--text-xl); text-transform: uppercase; }
.plan-card__price { margin: 0; }
.plan-card__price strong { font-family: var(--dv-font-display); font-size: 1.9rem; }
.plan-card__entries { display: flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--accent-text); }
.plan-card__entries .icon { width: 1.2rem; height: 1.2rem; }
.plan-card__perks { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.plan-card__perks li { display: flex; align-items: flex-start; gap: 0.4rem; }
.plan-card__perks .icon { width: 1rem; height: 1rem; margin-top: 0.1rem; color: var(--accent-text); flex: none; }
.plan-card form { margin-top: auto; }
.plan-card__cta { width: 100%; margin-top: auto; }
@media (max-width: 39.99rem) { .plan-card { padding: var(--space-3); } .plan-card__perks { font-size: var(--text-xs); } }

/* --- Tabs / filters ------------------------------------------------------------------------ */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-4); border-bottom: 1px solid var(--dv-border); }
.tabs a { padding: 0.45rem 0.8rem; color: var(--dv-text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: #fff; }
.tabs a[aria-current="page"] { color: var(--accent-text); font-weight: 600; border-bottom-color: var(--accent-text); }

/* --- Detail page --------------------------------------------------------------------------- */
.detail { display: grid; gap: var(--space-4); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin: var(--space-3) 0; }
.facts dt { font-size: var(--text-xs); color: var(--dv-text-muted); }
.facts dd { margin: 0; font-weight: 700; }
.join { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-3); }
.join__button { min-height: 2.75rem; }
.notice { display: flex; gap: var(--space-3); align-items: flex-start; margin-top: var(--space-3); padding: var(--space-3); background: var(--dv-surface-raised); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.notice .icon { width: 1.3rem; height: 1.3rem; flex: none; color: var(--accent-text); }
.notice--ok { border-color: #2f7a4b; }
.notice--ok .icon { color: #7ee2a0; }
.notice--win { border-color: #8a7220; }
.notice--warn { margin-top: 0; border-color: #8a7220; }
.rules { display: grid; gap: var(--space-2); margin: 0; padding-left: 1.1rem; }
@media (min-width: 48rem) { .detail { grid-template-columns: 18rem 1fr; } .facts { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 47.99rem) { .detail .prize-art--big { aspect-ratio: 16 / 7; } }

/* --- Winners, results, steps, faq ---------------------------------------------------------- */
.winners, .results { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
@media (min-width: 40rem) { .winners { grid-template-columns: repeat(3, 1fr); } }
.winners__item, .results__item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.winners__item .prize-art, .results__item .prize-art { width: 2.75rem; flex: none; }
.results__main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; font-size: var(--text-sm); }
.results__winner { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--accent-text); font-weight: 600; }
.results__winner .icon { width: 1rem; height: 1rem; }
.steps { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps__item { display: flex; gap: var(--space-3); align-items: flex-start; }
.steps__n { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; font-family: var(--dv-font-display); font-size: 1.1rem; font-weight: 700; color: var(--on-accent); background: var(--accent); border-radius: 50%; }
.faq { display: grid; gap: var(--space-2); }
.faq__item { padding: var(--space-2) var(--space-3); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.faq__item summary { cursor: pointer; font-weight: 600; }
.faq__item p { margin: var(--space-2) 0 0; color: var(--dv-text-muted); }

/* --- Account ------------------------------------------------------------------------------- */
.balance-card { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-lg); }
.balance-card .icon { width: 2rem; height: 2rem; color: var(--accent-text); }
.balance-card__n { font-family: var(--dv-font-display); font-size: var(--text-2xl); color: var(--accent-text); }
.balance-card .button--ghost { margin-left: auto; }

/* --- Forms --------------------------------------------------------------------------------- */
.form { display: grid; gap: var(--space-3); }
.form__field { display: grid; gap: 0.25rem; font-weight: 600; font-size: var(--text-sm); }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="tel"], .form input[type="datetime-local"], .form textarea { min-height: var(--control-h); padding: 0 var(--space-3); font: inherit; font-weight: 400; color: var(--dv-text); background: var(--dv-background); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); }
.form textarea { padding-block: var(--space-2); }
.form__check { display: flex; gap: var(--space-2); align-items: flex-start; font-size: var(--text-sm); }
.form__row { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.card--narrow { max-width: 26rem; }
.card--form { max-width: 34rem; }
.prose h2 { font-size: var(--text-lg); }

/* --- Admin --------------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 48rem) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: grid; padding: var(--space-3); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.stat__n { font-family: var(--dv-font-display); font-size: 2rem; color: var(--accent-text); }
.table-wrap { background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: var(--space-2) var(--space-3); font-size: var(--text-xs); color: var(--dv-text-muted); background: var(--dv-surface-raised); border-bottom: 1px solid var(--dv-border); }
.table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--dv-border); }
.table tr:last-child td { border-bottom: 0; }
.table__edit { white-space: nowrap; text-align: right; }
@media (max-width: 47.99rem) {
  .table thead { display: none; }
  .table tr, .table td { display: block; }
  .table tr { padding: var(--space-2) 0; border-bottom: 1px solid var(--dv-border); }
  .table tr:last-child { border-bottom: 0; }
  .table td { padding: 0.1rem var(--space-3); border: 0; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--dv-text-muted); font-size: var(--text-xs); }
  .table td:first-child { font-weight: 700; }
  .table td:first-child::before { content: ""; }
  .table__edit { text-align: left; white-space: normal; }
}

/* --- Footer: corporate, like TechnoGames --------------------------------------------------- */
.site-footer { margin-top: var(--space-8); padding-block: var(--space-6) var(--space-4); color: var(--dv-text-muted); background: var(--dv-footer); border-top: 1px solid var(--dv-border); font-size: var(--text-sm); }
.site-footer__grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr 1fr; }
.site-footer__brand { grid-column: 1 / -1; }
.site-footer__brand p { margin: var(--space-2) 0 0; max-width: 28rem; }
.site-footer__by { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); font-size: var(--text-xs); }
.site-footer__by img { display: block; width: auto; height: 2.75rem; }
.site-footer__title { margin: 0 0 var(--space-2); font-size: var(--text-md); text-transform: uppercase; color: #fff; }
.site-footer__links { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--dv-text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent-text); }
.site-footer__link { display: inline-flex; align-items: center; gap: 0.45rem; }
.site-footer__link .icon { width: 1.1rem; height: 1.1rem; flex: none; }
.site-footer__link--wa .icon { color: #25d366; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-4); margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--dv-border); font-size: var(--text-xs); }
@media (min-width: 48rem) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .site-footer__brand { grid-column: auto; } }

input[type="checkbox"] { accent-color: var(--accent); }

/* --- Delivery proof photo ------------------------------------------------------------------ */
.delivery { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
@media (min-width: 48rem) { .delivery { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; } }
.delivery .card { display: grid; gap: var(--space-3); }
.facts--stack { grid-template-columns: 1fr; margin: 0; }
.proof { display: block; width: 100%; max-height: 22rem; object-fit: contain; background: var(--dv-background); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.form input[type="file"] { width: 100%; max-width: 100%; padding: var(--space-2); font: inherit; font-weight: 400; color: var(--dv-text-muted); background: var(--dv-background); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); }
.form input[type="file"]::file-selector-button { margin-right: var(--space-3); padding: 0.3rem var(--space-3); font: inherit; font-weight: 700; color: var(--on-accent); background: var(--accent); border: 0; border-radius: var(--radius-md); cursor: pointer; }
.form__hint { margin: 0; font-size: var(--text-xs); }

/* --- Content editor ------------------------------------------------------------------------ */
.card--wide { max-width: 46rem; }
.rowset { display: grid; gap: var(--space-2); margin: 0; padding: var(--space-3); border: 1px solid var(--dv-border); border-radius: var(--radius-md); min-width: 0; }
.rowset legend { padding-inline: var(--space-2); font-size: var(--text-xs); font-weight: 700; color: var(--accent-text); }
.rowset--spare { border-style: dashed; }
.reset { margin-top: var(--space-3); }
.form input[type="text"], .form textarea { width: 100%; max-width: 100%; }
code { padding: 0.05rem 0.3rem; background: var(--dv-surface-raised); border-radius: 0.3rem; }

/* --- Home sections admin + free sections --------------------------------------------------- */
.sections { display: grid; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.sections__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.sections__item--off { opacity: 0.6; }
.sections__main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); min-width: 0; }
.sections__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.sections__actions form { margin: 0; }
.sections__actions button:disabled { opacity: 0.35; cursor: default; }
.form select { min-height: var(--control-h); padding: 0 var(--space-3); font: inherit; color: var(--dv-text); background: var(--dv-background); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); max-width: 100%; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); background: linear-gradient(135deg, rgb(var(--accent-rgb) / 22%), var(--dv-surface)); border: 1px solid var(--dv-border); border-radius: var(--radius-lg); }
.cta p { margin: var(--space-1) 0 0; }
.form__field { min-width: 0; }
.form select { width: 100%; }
.card--form { min-width: 0; }

/* --- Carousel ------------------------------------------------------------------------------ */
.carousel { position: relative; }
.carousel__track { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius-lg); border: 1px solid var(--dv-border); background: var(--dv-surface); }
.carousel__track::-webkit-scrollbar { display: none; }
.slide { position: relative; display: flex; align-items: flex-end; flex: 0 0 100%; min-height: 15rem; overflow: hidden; scroll-snap-align: start; background: radial-gradient(circle at 85% 10%, rgb(var(--accent-rgb) / 30%), transparent 60%), linear-gradient(135deg, var(--dv-surface-raised), var(--dv-surface)); }
.slide--phone { background: radial-gradient(circle at 85% 10%, rgb(14 165 164 / 28%), transparent 60%), linear-gradient(135deg, var(--dv-surface-raised), var(--dv-surface)); }
.slide--headset { background: radial-gradient(circle at 85% 10%, rgb(229 72 77 / 28%), transparent 60%), linear-gradient(135deg, var(--dv-surface-raised), var(--dv-surface)); }
.slide--gift { background: radial-gradient(circle at 85% 10%, rgb(245 160 0 / 26%), transparent 60%), linear-gradient(135deg, var(--dv-surface-raised), var(--dv-surface)); }
.slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide:has(.slide__img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(var(--bg-rgb) / 92%) 0%, rgb(var(--bg-rgb) / 40%) 55%, transparent 100%); }
.slide__icon { position: absolute; right: var(--space-4); top: 50%; width: 6rem; height: 6rem; transform: translateY(-50%); color: var(--accent-text); opacity: 0.85; }
.slide__icon .icon { width: 100%; height: 100%; stroke-width: 1.1; }
.slide__body { position: relative; z-index: 1; display: grid; justify-items: start; gap: var(--space-2); max-width: 36rem; padding: var(--space-4) var(--space-4) 2.6rem; }
.slide__title { margin: 0; font-size: 1.7rem; line-height: 1.05; text-transform: uppercase; }
.slide__text { margin: 0; color: var(--dv-text-muted); }
.slide__meta { display: flex; align-items: center; gap: 0.35rem; margin: 0; font-size: var(--text-sm); }
.slide__meta .icon { width: 1.1rem; height: 1.1rem; color: var(--accent-text); }
.carousel__dots { position: absolute; left: 0; right: 0; bottom: 0.7rem; z-index: 2; display: flex; justify-content: center; gap: 0.45rem; }
.carousel__dot { width: 0.6rem; height: 0.6rem; padding: 0; background: rgb(255 255 255 / 35%); border: 0; border-radius: 999px; cursor: pointer; }
.carousel__dot[aria-current="true"] { width: 1.5rem; background: var(--accent-text); }
.carousel__nav { position: absolute; top: 50%; z-index: 2; display: none; place-items: center; width: 2.4rem; height: 2.4rem; transform: translateY(-50%); color: #fff; font-size: 1.3rem; line-height: 1; background: rgb(var(--bg-rgb) / 70%); border: 1px solid var(--dv-border); border-radius: 50%; cursor: pointer; }
.carousel__nav--prev { left: var(--space-2); }
.carousel__nav--next { right: var(--space-2); }
@media (min-width: 48rem) {
  .slide { min-height: 19rem; }
  .slide__title { font-size: 2.4rem; }
  .slide__body { padding: var(--space-6) var(--space-6) 3rem; }
  .slide__icon { width: 11rem; height: 11rem; right: 6rem; }
  .carousel__nav { display: grid; }
}
@media (hover: none) { .carousel__nav { display: none; } }
.block + .hero, .hero + .hero { margin-top: var(--space-6); }
@media (max-width: 47.99rem) { .slide__icon { display: none; } }
@media (min-width: 48rem) { .slide__body { padding-inline: 4rem; } }

/* --- Winner evidence ----------------------------------------------------------------------- */
.evidence { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.evidence__sub { margin: var(--space-2) 0 0; font-size: var(--text-md); }
.hash { display: block; font-size: var(--text-xs); word-break: break-all; }
.checks { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.checks__item { display: flex; align-items: flex-start; gap: var(--space-2); }
.checks__item .icon { width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; color: #7ee2a0; flex: none; }
.checks__item--bad .icon { color: var(--color-danger); }
.code { margin: 0; padding: var(--space-3); font-size: var(--text-xs); white-space: pre-wrap; word-break: break-word; background: var(--dv-background); border: 1px solid var(--dv-border); border-radius: var(--radius-md); }
.entries { margin-top: var(--space-2); }
@media (min-width: 64rem) { .entries { max-height: 20rem; overflow-y: auto; } }
.record-page .card + .card { margin-top: var(--space-3); }

/* --- Live stage (shared on screen the day the winner is chosen) ---------------------------- */
.live-pill { display: inline-flex; align-items: center; gap: 0.4rem; margin-left: auto; padding: 0.15rem 0.7rem; font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: #e11d48; border-radius: 999px; }
.live-pill__dot { width: 0.55rem; height: 0.55rem; background: #fff; border-radius: 50%; animation: live-blink 1.2s ease-in-out infinite; }
@keyframes live-blink { 50% { opacity: 0.25; } }
.site--live { background: radial-gradient(60rem 30rem at 50% -10rem, rgb(var(--accent-rgb) / 28%), transparent 70%), var(--dv-background); }
.site--live .page-header { justify-content: center; text-align: center; margin-bottom: var(--space-3); }
.site--live .page-header__title { font-size: clamp(1.8rem, 6vw, 3.4rem); line-height: 1; text-transform: uppercase; }
.site--live .page-header__subtitle { color: var(--accent-text); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.stage { display: grid; gap: var(--space-4); justify-items: center; max-width: 56rem; margin-inline: auto; text-align: center; }
.stage__art { width: min(100%, 15rem); }
.stage__art .prize-art { max-height: none; aspect-ratio: 1; }
.stage__main { display: grid; gap: var(--space-3); justify-items: center; width: 100%; }
.stage__prize { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin: 0; font-size: var(--text-lg); }
.stage__prize .icon { width: 1.5rem; height: 1.5rem; color: var(--accent-text); }
.stage__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin: 0; }
.stage__stats .chip { padding: 0.25rem 0.9rem; font-size: var(--text-md); }
.stage__panel { display: grid; gap: var(--space-3); justify-items: center; width: 100%; padding: var(--space-5) var(--space-4); background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-lg); }
.stage__panel[hidden] { display: none; }
.stage__wait { margin: 0; font-size: var(--text-lg); }
.stage__dots { display: flex; gap: 0.5rem; margin: 0; }
.stage__dots span { width: 0.8rem; height: 0.8rem; background: var(--accent-text); border-radius: 50%; animation: stage-bounce 1.2s ease-in-out infinite; }
.stage__dots span:nth-child(2) { animation-delay: 0.2s; }
.stage__dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes stage-bounce { 0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
.stage__spin { display: grid; gap: var(--space-1); margin: 0; }
.stage__spin-number { font-family: var(--dv-font-display); font-size: clamp(3rem, 14vw, 6rem); line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.stage__spin-name { font-size: var(--text-lg); color: var(--dv-text-muted); min-height: 1.5rem; }
.stage__panel--winner { border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-text), 0 0 3rem rgb(var(--accent-rgb) / 45%); animation: stage-pop 0.6s ease-out; }
@keyframes stage-pop { from { transform: scale(0.92); opacity: 0; } }
.stage__label { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-md); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }
.stage__label .icon { width: 1.6rem; height: 1.6rem; }
.stage__winner { margin: 0; font-family: var(--dv-font-display); font-size: clamp(2.4rem, 10vw, 5rem); line-height: 1; text-transform: uppercase; }
.stage__entry { margin: 0; font-size: var(--text-xl); }
.stage__proof { margin: 0; }
.stage__brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--dv-border); width: 100%; }
.stage__brand img { display: block; width: auto; height: 3.25rem; }
.stage__by { font-size: var(--text-sm); color: var(--dv-text-muted); }
@media (min-width: 64rem) {
  .stage { grid-template-columns: 17rem 1fr; text-align: left; justify-items: stretch; max-width: 72rem; }
  .stage__main { justify-items: start; }
  .stage__prize, .stage__stats { justify-content: flex-start; }
  .stage__brand { grid-column: 1 / -1; }
}
.confetti { position: fixed; top: -1rem; left: var(--x); z-index: 50; width: 0.6rem; height: 1rem; background: var(--color); pointer-events: none; animation: confetti-fall var(--dur) var(--delay) ease-in forwards; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(var(--spin)); opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .live-pill__dot, .stage__dots span, .stage__panel--winner { animation: none; } }
.site--live .site-main { display: flex; align-items: center; }
@media (min-width: 64rem) {
  .stage { grid-template-columns: 22rem 1fr; gap: var(--space-6); max-width: 82rem; }
  .stage__art { width: 100%; }
  .stage__prize { font-size: 1.5rem; }
  .stage__stats .chip { font-size: var(--text-lg); }
  .stage__panel { padding: var(--space-8) var(--space-6); }
  .stage__wait { font-size: 1.5rem; }
  .stage__winner { font-size: clamp(3rem, 7vw, 6.5rem); }
  .stage__entry { font-size: 1.75rem; }
  .stage__brand img { height: 4rem; }
  .stage__logo { height: 7rem; }
}

/* --- Live stage countdown ------------------------------------------------------------------ */
.stage__timer { display: grid; gap: 0.2rem; justify-items: center; }
.stage__timer[hidden] { display: none; }
.stage__timer-label { font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); min-height: 1.1rem; }
.stage__timer-value { font-family: var(--dv-font-display); font-size: clamp(2.6rem, 13vw, 6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stage__timer-at { font-size: var(--text-sm); color: var(--dv-text-muted); }
.stage.is-final .stage__timer-value { color: #ff7a94; animation: stage-beat 1s ease-in-out infinite; }
.stage.is-time .stage__timer-value { color: var(--accent-text); animation: stage-beat 1.4s ease-in-out infinite; }
@keyframes stage-beat { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .stage.is-final .stage__timer-value, .stage.is-time .stage__timer-value { animation: none; } }
.form__field--end { align-self: end; }
@media (min-width: 64rem) { .stage__timer-value { font-size: 7rem; } }
.delivery__col { display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.site--live .site-header__logo { height: 4.5rem; }  /* keep the whole stage inside a 720p shared screen */
.site-header__user { margin-left: auto; }  /* Ingresar / Suscribirme sit at the right edge */
@media (min-width: 48rem) { .site-header__user { order: 1; } }  /* after the menu, which grows to fill the row */

/* --- Floating WhatsApp button (swap static/img/whatsapp-button.png to change the icon) ------- */
.wa-float { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 15; display: grid; place-items: center; width: 4.25rem; height: 4.25rem; filter: drop-shadow(0 7px 16px rgb(0 0 0 / 55%)); }
.wa-float__link { display: block; width: 100%; height: 100%; transition: transform 0.15s ease; }
.wa-float__link:hover { transform: scale(1.08); }
.wa-float img { display: block; width: 100%; height: 100%; object-fit: contain; }
html.wa-closed .wa-float { display: none; }
.wa-float__close { position: absolute; top: -0.2rem; right: -0.2rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: 0; font-size: 1.1rem; line-height: 1; color: #fff; background: rgb(var(--bg-rgb) / 92%); border: 1px solid var(--dv-border); border-radius: 50%; cursor: pointer; }
.wa-float__close::after { content: ""; position: absolute; inset: -0.5rem; }  /* bigger touch target */
.wa-float__close:hover { background: var(--accent); color: var(--on-accent); }
@media (min-width: 48rem) { .wa-float { width: 5rem; height: 5rem; } }
@media (prefers-reduced-motion: reduce) { .wa-float__link { transition: none; } }

/* --- Section illustrations next to the page title ------------------------------------------ */
.page-header { flex-wrap: nowrap; }
.page-header__titles { flex: 1 1 auto; min-width: 0; }
.page-header__art { order: 2; display: block; width: auto; height: 5.5rem; margin-left: auto; flex: none; }
.page-header__actions { order: 3; }
@media (min-width: 48rem) { .page-header__art { height: 9.5rem; } }
@media (max-width: 47.99rem) { .page-header__actions { flex: 0 0 100%; order: 4; } .page-header { flex-wrap: wrap; } }

/* --- Footer on phones: tidy blocks, links that wrap as whole items, room for the WhatsApp bubble --- */
body:has(.wa-float) .site-footer { padding-bottom: 6.5rem; }  /* the bubble never covers the last line */
html.wa-closed body:has(.wa-float) .site-footer { padding-bottom: var(--space-4); }
@media (min-width: 48rem) {
  /* desktop: bubble sits in the corner, so keep the text clear of it instead of adding empty space below */
  body:has(.wa-float) .site-footer { padding-bottom: var(--space-4); }
  body:has(.wa-float) .site-footer__bottom { padding-right: 6rem; }
  html.wa-closed body:has(.wa-float) .site-footer__bottom { padding-right: 0; }
}
@media (max-width: 47.99rem) {
  .site-footer { margin-top: var(--space-6); padding-top: var(--space-5); }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* brand: logo on the left, tagline and "Una iniciativa de" on the right */
  .site-footer__brand { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-3); row-gap: var(--space-1); align-items: center; padding-bottom: var(--space-4); }
  .site-footer__brand .site-footer__logo { grid-row: 1 / span 2; height: 4.25rem; }
  .site-footer__brand p { margin: 0; font-size: var(--text-sm); max-width: none; }
  .site-footer__by { flex-wrap: wrap; margin: 0; }
  .site-footer__by img { height: 2.25rem; }
  /* link groups: title, then links that wrap as complete items (no mid-label line breaks) */
  .site-footer__grid > section:not(.site-footer__brand) { padding-block: var(--space-3); border-top: 1px solid var(--dv-border); }
  .site-footer__title { margin-bottom: var(--space-2); font-size: var(--text-sm); letter-spacing: 0.06em; }
  .site-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
  .site-footer__links li { white-space: nowrap; }
  .site-footer__bottom { flex-direction: column; gap: var(--space-1); margin-top: var(--space-3); padding-top: var(--space-3); }
}

/* --- Form errors, inline admin forms ------------------------------------------------------- */
.form__error { display: block; margin: 0; font-size: var(--text-sm); font-weight: 600; color: #ff8d9d; }
.inline-form { display: inline; margin: 0; }
.table__edit { text-align: right; white-space: nowrap; }
.table__edit > * { margin-left: var(--space-3); }
.table__edit > :first-child { margin-left: 0; }

/* --- Wide admin tables stack up to tablet width; two-column form rows stack on phones ----------- */
@media (max-width: 63.99rem) {
  .table--wide thead { display: none; }
  .table--wide tr, .table--wide td { display: block; }
  .table--wide tr { padding: var(--space-2) 0; border-bottom: 1px solid var(--dv-border); }
  .table--wide tr:last-child { border-bottom: 0; }
  .table--wide td { padding: 0.1rem var(--space-3); border: 0; }
  .table--wide td[data-label]::before { content: attr(data-label) ": "; color: var(--dv-text-muted); font-size: var(--text-xs); }
  .table--wide td:first-child { font-weight: 700; }
  .table--wide td:first-child::before { content: ""; }
  .table--wide .table__edit { text-align: left; white-space: normal; }
}
@media (max-width: 47.99rem) { .form__row { grid-template-columns: minmax(0, 1fr); } }
.form__row > * { min-width: 0; }
.form input[type="datetime-local"] { width: 100%; max-width: 100%; min-width: 0; }

/* --- Buying entries on their own ----------------------------------------------------------- */
.buy { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.buy .join { margin-top: 0; }
.buy__qty { display: grid; gap: 0.2rem; font-size: var(--text-sm); font-weight: 600; }
.buy__qty input { width: 5rem; min-height: var(--control-h); padding: 0 var(--space-3); font: inherit; color: var(--dv-text); background: var(--dv-background); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); }

/* --- Delivered prizes gallery and sharing -------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery__item { overflow: hidden; background: var(--dv-surface); border: 1px solid var(--dv-border); border-radius: var(--radius-lg); }
.gallery__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__caption { margin: 0; padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.share { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.share .icon { width: 1rem; height: 1rem; margin-right: 0.35rem; color: #25d366; }
.proof-card { margin-bottom: var(--space-3); }
