:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #162234;
  --muted: #687383;
  --line: #d8d1c7;
  --navy: #14253b;
  --blue: #627f9a;
  --green: #5d7f64;
  --red: #7c2f2f;
  --gold: #b48445;
  --violet: #675a92;
  --shadow: 0 18px 45px rgba(25, 35, 50, 0.12);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }  /* safety net: nothing ever scrolls sideways */
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(98, 127, 154, 0.13), transparent 34%),
    linear-gradient(210deg, rgba(124, 47, 47, 0.12), transparent 29%),
    var(--bg);
}
button, input, select, textarea { font: inherit; max-width: 100%; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video, iframe { max-width: 100%; display: block; }
/* Long words / URLs / titles wrap instead of overflowing their container. */
h1, h2, h3, p, span, a, li, dd, dt, strong, small, td, th, input, textarea { overflow-wrap: break-word; word-break: break-word; }
/* Flex/grid children are allowed to shrink below their content width. */
.topbar > *, .hero > *, .signal-grid > *, .leaderboard li > *, .game-meta > *, .detail-wrap > * { min-width: 0; }

/* "How it works" steps — 3 columns on desktop, 1 on mobile. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.step-card h3 { margin: 0 0 6px; }
.step-card p { margin: 0; color: var(--muted); }

/* Layout */
.app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px;
  padding: 26px; background: var(--navy); color: #eaf1f8;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 46px; height: 46px; object-fit: contain; display: block;
  background: transparent;
}
.brand strong { display: block; font-size: 16px; }
.brand small { color: #9fb2c6; font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: #c7d4e2; font-size: 14px;
}
.side-nav a:hover, .side-nav a.is-active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-card {
  margin-top: auto; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 18px;
}
.sidebar-card .eyebrow { color: #f0c58a; }
.sidebar-card strong { display: block; font-size: 28px; margin: 6px 0; }
.sidebar-card p { margin: 0; font-size: 13px; color: #b6c4d4; }
.sidebar-card .prize-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sidebar-card .prize-list li { display: flex; justify-content: space-between; font-size: 12.5px; color: #d7e2ee; }
.sidebar-card .prize-list b { color: #f0c58a; }

main { min-width: 0; padding: 22px clamp(18px, 3vw, 40px) 90px; }

/* Topbar */
.topbar { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.mobile-brand { display: none; align-items: center; gap: 8px; font-weight: 700; }
.search {
  flex: 1; display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow);
}
.search input { border: 0; background: transparent; width: 100%; outline: none; }
.top-actions { display: flex; gap: 8px; align-items: center; }

/* Buttons */
.primary-btn, .secondary-btn, .text-btn, .ghost-btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 9px; font-weight: 600;
  font-size: 14px; border: 1px solid transparent; padding: 10px 16px;
  white-space: normal; overflow-wrap: break-word; text-align: center;
}
.primary-btn { background: var(--navy); color: #fff; }
.primary-btn:hover { background: #1d3350; }
.secondary-btn { background: var(--surface); border-color: var(--line); color: var(--ink); }
.secondary-btn:hover { border-color: var(--blue); }
.ghost-btn { background: transparent; color: var(--muted); border-color: transparent; padding: 8px 10px; }
.ghost-btn:hover { color: var(--ink); }
.text-btn { background: none; border: 0; color: var(--blue); padding: 4px 6px; font-weight: 600; }
.primary-btn:disabled, .secondary-btn:disabled { opacity: .5; cursor: not-allowed; }
.danger { color: var(--red); }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; color: var(--red); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.05; margin: 10px 0 12px; }
.hero-lede { color: var(--muted); font-size: 15px; max-width: 52ch; margin: 0 0 18px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-side { display: grid; gap: 12px; align-content: start; }
.prize-banner {
  background: linear-gradient(135deg, #1d3350, #2c4a6b); color: #fff; border-radius: 14px; padding: 20px;
}
.prize-banner .eyebrow { color: #f3c98d; }
.prize-banner .amount { font-size: 40px; font-weight: 800; margin: 6px 0; }
.prize-banner p { margin: 0; color: #c7d6e6; font-size: 13px; }
.prize-banner .prize-rows { margin: 14px 0 0; display: grid; gap: 8px; }
.prize-banner .prize-rows div { display: flex; justify-content: space-between; font-size: 13px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 8px; }
.prize-banner .prize-rows b { color: #f3c98d; }
.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.signal-grid div { background: var(--surface-strong); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.signal-grid strong { display: block; font-size: 22px; }
.signal-grid span { font-size: 12px; color: var(--muted); }

/* Section headings */
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 30px 0 16px; }
.section-heading h2 { margin: 4px 0 0; font-size: 22px; }

/* Leaderboard */
.board { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.board-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.board-tabs button { border: 1px solid var(--line); background: var(--surface-strong); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.board-tabs button.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.leaderboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.leaderboard li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; }
.leaderboard li:hover { background: var(--bg); }
.leaderboard .rank { font-weight: 800; color: var(--gold); font-size: 18px; text-align: center; }
.leaderboard .lb-title { font-weight: 700; }
.leaderboard .lb-sub { font-size: 12px; color: var(--muted); }
.leaderboard .lb-score { font-weight: 800; color: var(--navy); }
.leaderboard .lb-score small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip.is-selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.sort-select { margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 12px; }

/* Game grid */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.game-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.game-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.game-cover { aspect-ratio: 16/10; background: linear-gradient(135deg, #2c4a6b, #675a92); position: relative; overflow: hidden; display: grid; place-items: center; color: rgba(255,255,255,.85); font-weight: 700; text-align: center; padding: 40px 12px 14px; }
/* Image fills the whole cover regardless of the padding that keeps the fallback
   title clear of the badge. color/font-size:0 hides a broken image's alt text. */
.game-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; }
.game-badge { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(20,37,59,.85); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.game-badge.web { background: rgba(93,127,100,.92); }
.game-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-body h3 { margin: 0; font-size: 16px; }
.game-body .tagline { color: var(--muted); font-size: 13px; margin: 0; flex: 1; }
.game-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.stars { color: var(--gold); font-weight: 700; }
.mini-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-tags span { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; font-size: 11px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--line); border-radius: 14px; grid-column: 1 / -1; }

/* Detail page */
.detail-wrap { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 24px; margin-top: 8px; }
.gallery { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.gallery-main { aspect-ratio: 16/9; background: #0d1826; display: grid; place-items: center; }
.gallery-main img, .gallery-main video, .gallery-main iframe { width: 100%; height: 100%; object-fit: contain; border: 0; }
.gallery-main iframe { object-fit: fill; background: #fff; }
.gallery-thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; }
.gallery-thumbs button { border: 2px solid transparent; border-radius: 8px; overflow: hidden; width: 92px; height: 58px; flex: 0 0 auto; background: #0d1826; padding: 0; }
.gallery-thumbs button.is-active { border-color: var(--blue); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-side { display: grid; gap: 16px; align-content: start; }
.detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.detail-card h1 { margin: 4px 0 6px; font-size: 26px; }
.detail-card .tagline { color: var(--muted); margin: 0 0 14px; }
.rating-big { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.rating-big .num { font-size: 34px; font-weight: 800; }
.rating-big .stars { font-size: 20px; }
.detail-actions { display: grid; gap: 8px; }
.detail-actions .primary-btn, .detail-actions .secondary-btn { justify-content: center; }
.scan-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 12px; padding: 8px 10px; border-radius: 8px; }
.scan-clean { background: #eaf1ea; color: var(--green); }
.scan-skipped { background: #f3efe4; color: var(--gold); }
.scan-infected { background: #f6e7e7; color: var(--red); }
.dl { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 12px; }
.meta-dl { margin: 0; }
.meta-dl > div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.meta-dl dt { color: var(--muted); }
.meta-dl dd { margin: 0; font-weight: 600; }
.description { white-space: pre-wrap; line-height: 1.6; color: #2b3948; }

/* In-game high-score board on the detail page */
.score-board { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.score-board li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; }
.score-board li:nth-child(odd) { background: var(--bg); }
.score-board li.me { background: rgba(103, 90, 146, .16); outline: 1px solid var(--violet); }
.score-board .rank { font-weight: 800; color: var(--gold); text-align: center; }
.score-board .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-board b { color: var(--navy); font-weight: 800; }

/* Reviews */
.review-form { display: grid; gap: 10px; }
.star-input { display: flex; gap: 4px; font-size: 26px; color: var(--line); }
.star-input span { cursor: pointer; }
.star-input span.on { color: var(--gold); }
.review-list { display: grid; gap: 12px; margin-top: 8px; }
.review { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-head .who { font-weight: 700; }
.review-head .when { font-size: 12px; color: var(--muted); }
.review p { margin: 0; color: #2b3948; }

/* Forms & modal */
dialog { border: 0; border-radius: 16px; padding: 0; box-shadow: var(--shadow); max-width: 560px; width: calc(100% - 32px); color: var(--ink); }
dialog::backdrop { background: rgba(15,25,40,.55); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 2px 0 0; font-size: 20px; }
.icon-btn { border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; }
form.stack { display: grid; gap: 14px; padding: 22px; }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
label.field input, label.field select, label.field textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--surface); outline: none;
}
label.field input:focus, label.field select:focus, label.field textarea:focus { border-color: var(--blue); }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { flex: 1; padding-right: 42px !important; }
.pw-eye { position: absolute; right: 10px; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--muted); line-height: 0; border-radius: 4px; }
.pw-eye:hover { color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.file-drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.file-drop input { display: block; margin: 8px auto 0; }
.form-error { background: #f6e7e7; color: var(--red); border-radius: 8px; padding: 10px 12px; font-size: 13px; display: none; }
.form-error.show { display: block; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.segmented button { flex: 1; border: 0; background: var(--surface); padding: 10px; font-weight: 600; color: var(--muted); }
.segmented button.on { background: var(--navy); color: #fff; }

/* Toast */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: pop .2s ease; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* Auth chip */
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; font-family: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; padding: 5px 8px; border-radius: 9px; }
.user-chip:hover { background: rgba(120,140,180,.12); }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 700; }
.admin-tag { background: var(--gold); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 5px; text-transform: uppercase; }

/* Admin panel */
.admin-grid { display: grid; gap: 12px; }
.prize-admin-row { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.back-link:hover { color: var(--ink); }
.loading { color: var(--muted); padding: 40px; text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-brand { display: flex; margin-right: auto; }
  .hero { grid-template-columns: 1fr; }
  .detail-wrap { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  /* Header: brand + auth on the top row, lang-slot below, full-width search last.
     Without order:4 on lang-slot here, it sits between the logo and auth buttons
     on narrow viewports (>560px) and the row overflows on iPhone-sized screens. */
  .topbar { flex-wrap: wrap; gap: 10px; }
  .lang-slot { order: 4; }
  .search { order: 5; flex-basis: 100%; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .primary-btn, .secondary-btn, .ghost-btn { padding: 9px 12px; font-size: 13px; }

  .steps { grid-template-columns: 1fr; }
  main { padding: 18px 16px 70px; }
  .hero { padding: 22px; }
  .prize-banner .amount { font-size: 32px; }
}

@media (max-width: 480px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .signal-grid { gap: 8px; }
  .signal-grid strong { font-size: 18px; }
  .hero h1 { font-size: 26px; }
}

/* ===========================================================================
   Language switcher
   =========================================================================== */
.lang-slot { flex: 0 0 auto; }
.lang-select {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23687383' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  border-radius: 999px;
  padding: 8px 28px 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.lang-select:hover { border-color: var(--blue); }

/* ===========================================================================
   Prizes page
   =========================================================================== */
.pz-hero { margin-bottom: 24px; }
.pz-hero h1 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.08; margin: 10px 0 12px; }
.pz-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
.pz-place {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 16px; text-align: center; box-shadow: var(--shadow);
}
.pz-place b { display: block; font-size: 34px; font-weight: 800; line-height: 1; }
.pz-place span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-top: 4px; color: var(--muted); }
.pz-place small { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.pz-place.gold b { color: var(--gold); }
.pz-place.silver b { color: #8a93a5; }
.pz-place.bronze b { color: #a5744a; }
.pz-place.total { background: var(--navy); border-color: var(--navy); }
.pz-place.total b { color: #f3c98d; }
.pz-place.total span, .pz-place.total small { color: #c7d6e6; }
.pz-founder p { margin: 0 0 12px; line-height: 1.65; }
.pz-founder p:last-child { margin-bottom: 0; }
.pz-founder h2 { margin: 4px 0 14px; }
.pz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pz-grid h3 { margin: 0 0 10px; font-size: 17px; }
.pz-grid p { margin: 0 0 10px; color: var(--muted); line-height: 1.6; font-size: 14px; }
.pz-grid p:last-child { margin-bottom: 0; }
.pz-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; display: grid; gap: 8px; }
.pz-history { display: grid; gap: 10px; }
.pz-history-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.pz-cta {
  margin-top: 30px; text-align: center; background: var(--navy); border-radius: 16px;
  padding: 34px 22px; color: #fff;
}
.pz-cta h2 { margin: 0 0 8px; }
.pz-cta p { margin: 0 0 16px; color: #c7d6e6; }

/* Empty/loading rows in the leaderboard must not inherit the 3-column row grid
   (otherwise the message wraps one letter per line inside the 30px rank column). */
.leaderboard li.empty, .leaderboard li.loading { display: block; }
.leaderboard li.empty:hover, .leaderboard li.loading:hover { background: none; }

/* ===========================================================================
   Layout hardening for long translations (de/fr/pt strings run long).
   All CSS-only: keep text inside its card/button, wrap instead of overflow.
   =========================================================================== */

/* Task 2: "Full rules & prize terms →" link in the dark sidebar card.
   Was a .text-btn (white-space:nowrap) and overflowed the card. */
.sidebar-rules-link {
  display: inline-block;
  margin-top: 10px;
  color: #f0c58a;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
}
.sidebar-rules-link:hover { text-decoration: underline; }

/* Label ↔ amount rows: let the label shrink/wrap, keep the amount on one line. */
.sidebar-card .prize-list li,
.prize-banner .prize-rows div,
.pz-history-row { gap: 10px; }
.sidebar-card .prize-list li > span,
.prize-banner .prize-rows div > span,
.pz-history-row > span:first-child { min-width: 0; overflow-wrap: break-word; }
.sidebar-card .prize-list li > b,
.prize-banner .prize-rows div > b,
.pz-history-row > b,
.pz-history-row > span:last-child { flex: 0 0 auto; white-space: nowrap; }

/* Detail-page meta rows (dt ↔ dd) with long German/French terms. */
.meta-dl > div { gap: 12px; }
.meta-dl dt { min-width: 0; overflow-wrap: break-word; }
.meta-dl dd { min-width: 0; text-align: right; overflow-wrap: break-word; }

/* Prize-place cards: big amount + label must not spill on narrow columns. */
.pz-place b, .pz-place span, .pz-place small { overflow-wrap: break-word; }

/* Language switcher can wrap to its own line on tiny screens instead of
   squeezing the auth buttons off the row. */
.lang-slot { max-width: 100%; }

/* Dialog forms: grid items (incl. the native file input and the segmented
   build-type toggle) must be allowed to shrink so long German/French labels
   don't push the form wider than the dialog. */
form.stack { min-width: 0; }
form.stack > * { min-width: 0; }
.segmented button { white-space: normal; overflow-wrap: break-word; min-width: 0; }
.file-drop { overflow: hidden; }
.file-drop > * { min-width: 0; }
.file-drop input { width: 100%; min-width: 0; max-width: 100%; }

/* ===========================================================================
   2026 visual refresh
   Product-led, modular, lightweight: custom icons, sharper cards, calmer depth.
   =========================================================================== */
:root {
  --bg: #f4f7f4;
  --surface: rgba(255, 255, 252, 0.82);
  --surface-strong: #ffffff;
  --ink: #121826;
  --muted: #667382;
  --line: rgba(28, 34, 43, 0.13);
  --navy: #121a18;
  --blue: #3c7d86;
  --green: #4f8a68;
  --red: #843333;
  --gold: #b8894f;
  --violet: #6d607f;
  --shadow: 0 20px 54px rgba(18, 24, 38, 0.10);
  --shadow-soft: 0 10px 28px rgba(18, 24, 38, 0.075);
  --radius: 8px;
}

body {
  background:
    linear-gradient(135deg, rgba(60, 125, 134, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(132, 51, 51, 0.10), transparent 28%),
    repeating-linear-gradient(90deg, rgba(18,24,38,.032) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(18,24,38,.026) 0 1px, transparent 1px 92px),
    var(--bg);
}

.app-shell { grid-template-columns: 288px minmax(0, 1fr); }
main {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 24px clamp(20px, 3.2vw, 48px) 92px;
}

.sidebar {
  padding: 30px 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), transparent 34%),
    #121a18;
  border-right: 1px solid rgba(255,255,255,.10);
}
.brand { gap: 14px; }
.brand-mark { width: 52px; height: 52px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.22)); }
.brand strong { font-size: 17px; letter-spacing: .01em; }
.brand small { color: rgba(229, 239, 232, .68); font-weight: 600; }
.side-nav { gap: 8px; margin-top: 10px; }
.side-nav a {
  min-height: 46px;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(233, 241, 236, .72);
  font-weight: 700;
}
.side-nav a:hover,
.side-nav a.is-active {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.10);
  color: #fff;
}
.sidebar-card {
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.sidebar-card strong { letter-spacing: -.02em; }

.ui-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  vertical-align: -3px;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.ui-icon.gamepad { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M7.5 7h9A5.5 5.5 0 0 1 22 12.5v2.1a3.4 3.4 0 0 1-6.2 1.9l-.9-1.2H9.1l-.9 1.2A3.4 3.4 0 0 1 2 14.6v-2.1A5.5 5.5 0 0 1 7.5 7Zm.2 3.1H6.1v1.4H4.7v1.6h1.4v1.4h1.6v-1.4h1.4v-1.6H7.7v-1.4Zm9 .2a1.1 1.1 0 1 0 0 2.2 1.1 1.1 0 0 0 0-2.2Zm-2.7 2.5a1.1 1.1 0 1 0 0 2.2 1.1 1.1 0 0 0 0-2.2Z'/%3E%3C/svg%3E"); }
.ui-icon.trophy { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M7 3h10v2h3v3a5 5 0 0 1-4.2 4.9A6.1 6.1 0 0 1 13 16.3V19h4v2H7v-2h4v-2.7a6.1 6.1 0 0 1-2.8-3.4A5 5 0 0 1 4 8V5h3V3Zm10 4v3.6A3 3 0 0 0 18 8V7h-1ZM6 7v1a3 3 0 0 0 1 2.6V7H6Z'/%3E%3C/svg%3E"); }
.ui-icon.coin { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 3c5 0 9 1.8 9 4v10c0 2.2-4 4-9 4s-9-1.8-9-4V7c0-2.2 4-4 9-4Zm0 2C7.6 5 5 6.3 5 7s2.6 2 7 2 7-1.3 7-2-2.6-2-7-2Zm7 5.1c-1.6 1-4.1 1.6-7 1.6s-5.4-.6-7-1.6V12c0 .7 2.6 2 7 2s7-1.3 7-2v-1.9Zm0 5c-1.6 1-4.1 1.6-7 1.6s-5.4-.6-7-1.6V17c0 .7 2.6 2 7 2s7-1.3 7-2v-1.9Z'/%3E%3C/svg%3E"); }
.ui-icon.search-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10.5 4a6.5 6.5 0 0 1 5.2 10.4l4 4-1.4 1.4-4-4A6.5 6.5 0 1 1 10.5 4Zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z'/%3E%3C/svg%3E"); }
.ui-icon.upload { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M11 16V7.8l-3.2 3.1-1.4-1.4L12 4l5.6 5.5-1.4 1.4L13 7.8V16h-2Zm-6 3v-5h2v3h10v-3h2v5H5Z'/%3E%3C/svg%3E"); }
.ui-icon.download { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M11 4h2v8.2l3.2-3.1 1.4 1.4L12 16l-5.6-5.5 1.4-1.4 3.2 3.1V4Zm-6 15v-5h2v3h10v-3h2v5H5Z'/%3E%3C/svg%3E"); }
.ui-icon.play { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 5v14l11-7L8 5Z'/%3E%3C/svg%3E"); }
.ui-icon.star { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m12 3 2.6 5.4 5.9.8-4.3 4.2 1 5.9L12 16.5l-5.2 2.8 1-5.9-4.3-4.2 5.9-.8L12 3Z'/%3E%3C/svg%3E"); }
.ui-icon.close { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m6.4 5 12.6 12.6-1.4 1.4L5 6.4 6.4 5Zm11.2 0L19 6.4 6.4 19 5 17.6 17.6 5Z'/%3E%3C/svg%3E"); }
.ui-icon.video { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 6h11a2 2 0 0 1 2 2v1.4L21 7v10l-4-2.4V16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E"); }
.ui-icon.refresh { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.8-4.3L13 11h8V3l-3.3 3.3Z'/%3E%3C/svg%3E"); }
.ui-icon.shield { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 2 20 5v6c0 5-3.3 9.4-8 11-4.7-1.6-8-6-8-11V5l8-3Zm3.6 7.2-4.5 4.5-2-2-1.4 1.4 3.4 3.4L17 10.6l-1.4-1.4Z'/%3E%3C/svg%3E"); }
.ui-icon.alert { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 3 22 20H2L12 3Zm-1 6v5h2V9h-2Zm0 7v2h2v-2h-2Z'/%3E%3C/svg%3E"); }
.ui-icon.status { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 4a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm-1 4v5h2V8h-2Zm0 7v2h2v-2h-2Z'/%3E%3C/svg%3E"); }
.ui-icon.calendar { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M7 2h2v3h6V2h2v3h3v16H4V5h3V2Zm11 8H6v9h12v-9Z'/%3E%3C/svg%3E"); }
.ui-icon.rotate { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M7 7h7a5 5 0 0 1 0 10H8v-2h6a3 3 0 0 0 0-6H7v3L3 8l4-4v3Z'/%3E%3C/svg%3E"); }
.ui-icon.spark { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m12 2 1.8 6.2L20 10l-6.2 1.8L12 18l-1.8-6.2L4 10l6.2-1.8L12 2Zm6 12 .9 3.1L22 18l-3.1.9L18 22l-.9-3.1L14 18l3.1-.9L18 14Z'/%3E%3C/svg%3E"); }

.topbar { gap: 14px; margin-bottom: 34px; }
.search {
  min-height: 52px;
  border-radius: 8px;
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(16px);
  border-color: rgba(18,24,38,.12);
  box-shadow: var(--shadow-soft);
}
.search .ui-icon { color: #526170; }
.search input::placeholder { color: #7b8795; }
.lang-select {
  min-height: 44px;
  border-radius: 8px;
  background-color: rgba(255,255,255,.82);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.text-btn,
.chip,
.sort-select,
.icon-btn {
  border-radius: 8px;
}
.primary-btn,
.secondary-btn {
  min-height: 44px;
  box-shadow: none;
}
.primary-btn {
  background: #121a18;
  color: #fff;
  border-color: #121a18;
}
.primary-btn:hover { background: #24302c; }
.secondary-btn,
.chip,
.sort-select,
.board-tabs button {
  background: rgba(255,255,255,.78);
  border-color: rgba(18,24,38,.14);
}
.secondary-btn:hover,
.chip:hover,
.sort-select:hover {
  border-color: rgba(60,125,134,.48);
}
.text-btn { gap: 7px; color: var(--blue); }

.eyebrow {
  letter-spacing: .14em;
  color: var(--red);
}

.hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .82fr);
  align-items: stretch;
  gap: 26px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 18px 0 18px;
  box-shadow: none;
  margin-bottom: 34px;
}
.hero h1 {
  max-width: 17ch;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: .98;
  letter-spacing: 0;
  margin: 14px 0 18px;
}
.hero-lede {
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.55;
}
.hero-actions { margin-top: 24px; }
.signal-grid {
  max-width: 650px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.signal-grid div,
.board,
.game-card,
.detail-card,
.gallery,
.step-card,
.pz-place {
  border-radius: 8px;
  background: rgba(255,255,252,.78);
  border-color: rgba(18,24,38,.13);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}
.signal-grid div {
  padding: 15px;
  box-shadow: none;
}
.signal-grid strong {
  font-size: 28px;
  letter-spacing: -.03em;
}
.hero-side {
  grid-template-rows: auto;   /* size to content (fixed 190px row was for the removed hero-console) */
}
.hero-console {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(18,24,38,.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18,26,24,.98), rgba(40,60,58,.95)),
    #121a18;
  box-shadow: var(--shadow);
}
.console-top {
  display: flex;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.console-top span {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #f0c58a;
  opacity: .85;
}
.console-top span:nth-child(2) { background: #79b6ac; }
.console-top span:nth-child(3) { background: #b96666; }
.console-stage {
  position: absolute;
  inset: 42px 0 0;
  background:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 56px 56px;
}
.node {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 0 26px rgba(121,182,172,.22);
}
.node-a { left: 17%; top: 18%; background: #843333; }
.node-b { left: 58%; top: 34%; background: #d6a866; }
.node-c { left: 38%; top: 60%; background: #3c7d86; }
.beam {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, #79b6ac, transparent);
}
.beam-a { left: 25%; top: 32%; width: 170px; transform: rotate(19deg); }
.beam-b { left: 45%; top: 72%; width: 140px; transform: rotate(-31deg); }
.avatar-chip,
.score-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.16);
}
.avatar-chip { right: 18px; top: 24px; }
.score-chip { right: 28px; bottom: 18px; color: #f0c58a; font-size: 22px; }
.prize-banner {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(132,51,51,.96), rgba(18,26,24,.98) 58%),
    #121a18;
  box-shadow: var(--shadow-soft);
  padding: 18px;
}
.prize-banner .amount {
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -.04em;
}

.section-heading { margin: 34px 0 16px; }
.section-heading h2 {
  font-size: clamp(23px, 2.5vw, 32px);
  letter-spacing: -.025em;
}
.board { padding: 20px; }
.board-tabs button {
  min-height: 36px;
  padding: 7px 15px;
}
.board-tabs button.is-active,
.chip.is-selected {
  background: #121a18;
  border-color: #121a18;
}
.leaderboard li {
  border: 1px solid transparent;
  border-radius: 8px;
}
.leaderboard li:hover {
  background: rgba(60,125,134,.07);
  border-color: rgba(60,125,134,.20);
}

.filters { gap: 10px; }
.chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sort-select {
  min-height: 44px;
}
.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.game-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(60,125,134,.45);
  box-shadow: 0 22px 54px rgba(18,24,38,.12);
}
.game-cover {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(18,26,24,.95), rgba(60,125,134,.92));
  padding: 34px 14px 14px;
}
.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0,0,0,.18));
  pointer-events: none;
}
.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
  border-radius: 8px;
  background: rgba(18,26,24,.72);
  backdrop-filter: blur(12px);
}
.game-badge.web { background: rgba(60,125,134,.78); }
.game-body { padding: 16px; gap: 10px; }
.game-body h3 {
  font-size: 18px;
  letter-spacing: -.015em;
}
.mini-tags span {
  border-radius: 8px;
  background: rgba(18,24,38,.045);
}
.downloads-meta {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.downloads-meta .ui-icon { width: 15px; height: 15px; }
.empty {
  background: rgba(255,255,252,.62);
  border-radius: 8px;
}

.steps { gap: 18px; }
.step-card {
  position: relative;
  min-height: 152px;
  padding: 20px 20px 20px 68px;
}
.step-icon {
  position: absolute;
  left: 20px;
  top: 22px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #121a18;
}
.step-card h3 { line-height: 1.18; }

.detail-wrap { gap: 26px; }
.gallery-main { background: #0f1514; }
.gallery-thumbs button {
  border-radius: 8px;
}
.thumb-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
}
.thumb-placeholder .ui-icon { width: 24px; height: 24px; }
.detail-card h1 { letter-spacing: -.025em; }
.scan-line {
  border-radius: 8px;
}
.scan-line .ui-icon { width: 16px; height: 16px; }
.review,
.meta-dl > div,
.score-board li {
  border-radius: 8px;
}

.pz-hero {
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid rgba(18,24,38,.13);
  border-radius: 8px;
  background: rgba(255,255,252,.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}
.pz-hero h1 {
  letter-spacing: -.035em;
}
.pz-grid .detail-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.pz-cta {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18,26,24,.98), rgba(60,125,134,.92)),
    #121a18;
}
.pz-cta .primary-btn {
  background: #fff;
  border-color: #fff;
  color: #121a18;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero h1 { max-width: 15ch; }
  .hero-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 900px) {
  /* Collapse the sidebar layout to a single column. Must live here (after the
     later top-level `.app-shell { grid-template-columns: 288px … }` rule),
     otherwise that rule wins and `main` auto-places into the empty 288px
     column — leaving content squeezed left with a blank gap on the right. */
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main {
    width: 100%;
    margin: 0;
    padding: 18px 16px 72px;
  }
  .mobile-brand .brand-mark { width: 40px; height: 40px; }
  .hero h1 { font-size: clamp(36px, 12vw, 58px); }
  .hero-side { grid-template-columns: 1fr; }
  .hero-console { min-height: 220px; }
  .signal-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

@media (max-width: 560px) {
  .topbar { gap: 9px; }
  .lang-slot { order: 4; flex: 0 1 142px; overflow: hidden; }
  .lang-select { width: 142px; min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
  .top-actions { order: 3; }
  .search { order: 5; }
  .hero { padding-top: 6px; }
  .hero h1 {
    max-width: 13ch;
    font-size: clamp(34px, 11vw, 44px);
    margin-bottom: 14px;
  }
  .hero-lede {
    font-size: 14px;
    line-height: 1.48;
  }
  .hero-actions .primary-btn,
  .hero-actions .secondary-btn { width: 100%; justify-content: center; }
  .signal-grid {
    display: none;
  }
  .hero-console {
    display: none;
  }
  .prize-banner {
    padding: 16px;
  }
  .prize-banner .prize-rows {
    display: none;
  }
  .prize-banner .amount {
    font-size: 30px;
  }
  .board-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .board-tabs button {
    flex: 0 0 auto;
  }
  .steps { grid-template-columns: 1fr; }
  .step-card { padding-left: 20px; padding-top: 68px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .pz-grid { grid-template-columns: minmax(0, 1fr); }
  .pz-grid > * { min-width: 0; }
}

/* ===========================================================================
   Countdown timer
   =========================================================================== */
.countdown-section {
  margin: 28px 0;
  background: rgba(255,255,252,.78);
  border: 1px solid rgba(18,24,38,.13);
  border-radius: 8px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}
.countdown-section .eyebrow { display: block; margin-bottom: 6px; }
.countdown-section h2 { margin: 0 0 20px; font-size: clamp(18px, 2.2vw, 26px); letter-spacing: -.025em; }
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.countdown-card {
  border: 1px solid rgba(18,24,38,.13);
  border-radius: 8px;
  padding: 18px 20px;
  background: rgba(18,26,24,.97);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.countdown-card.nearest {
  background: linear-gradient(135deg, rgba(132,51,51,.96), rgba(18,26,24,.98) 60%), #121a18;
  border-color: rgba(184,137,79,.35);
}
.countdown-card .cd-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #f0c58a;
  margin-bottom: 8px;
}
.countdown-card.nearest .cd-label { color: #f3c98d; }
.countdown-card .cd-type {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: rgba(255,255,255,.88);
}
.countdown-digits {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}
.cd-num {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  text-align: center;
}
.cd-sep {
  font-size: 28px;
  font-weight: 800;
  color: rgba(255,255,255,.35);
  line-height: 1;
  margin-bottom: 18px;
  align-self: flex-end;
}
.cd-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.48);
  margin-top: 4px;
}
.countdown-card .cd-deadline {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}
.cd-nearest-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f0c58a;
  color: #121a18;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.countdown-today {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ===========================================================================
   Winners page
   =========================================================================== */
.winners-section { margin-top: 26px; }
.winners-group {
  margin-bottom: 30px;
}
.winners-group h3 {
  margin: 0 0 12px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.winners-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,252,.78);
  border: 1px solid rgba(18,24,38,.13);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.winners-table th {
  background: rgba(18,24,38,.06);
  padding: 11px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(18,24,38,.10);
}
.winners-table td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid rgba(18,24,38,.07);
  vertical-align: middle;
}
.winners-table tr:last-child td { border-bottom: 0; }
.winners-table tr:hover td { background: rgba(60,125,134,.05); }
.winners-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}
.medal-1 { background: rgba(184,137,79,.18); color: var(--gold); }
.medal-2 { background: rgba(138,147,165,.18); color: #8a93a5; }
.medal-3 { background: rgba(165,116,74,.18); color: #a5744a; }
.winners-amount { font-weight: 800; color: var(--gold); }
.winners-placeholder { color: var(--muted); font-size: 13px; text-align: center; padding: 30px; }

/* ===========================================================================
   Contact form section
   =========================================================================== */
.contact-section {
  margin-top: 34px;
}
.contact-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 24px;
  align-items: start;
}
.contact-info { }
.contact-info h2 { margin: 4px 0 12px; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.025em; }
.contact-info p { color: var(--muted); line-height: 1.6; margin: 0 0 16px; font-size: 14.5px; }
.contact-form-card {
  background: rgba(255,255,252,.82);
  border: 1px solid rgba(18,24,38,.13);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 14px;
}
.contact-form-card label.field input,
.contact-form-card label.field textarea {
  background: rgba(255,255,255,.9);
}
.contact-success {
  display: none;
  text-align: center;
  padding: 28px 20px;
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
}
.contact-success .success-icon { font-size: 36px; display: block; margin-bottom: 10px; }
.contact-success.show { display: block; }

@media (max-width: 800px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .countdown-grid { grid-template-columns: 1fr; }
}

/* ===========================================================================
   Help / Support
   =========================================================================== */
.support-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 16px; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(20,37,59,.35);
}
.support-fab:hover { background: #1d3350; }
.support-fab > span[aria-hidden] { font-size: 16px; line-height: 1; }
@media (max-width: 640px) {
  .support-fab { padding: 13px; right: 14px; bottom: 14px; }
  .support-fab .support-label { display: none; }   /* icon-only on phones */
}

.inbox-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; margin-left: 2px;
}
.inbox-badge[hidden] { display: none; }

.fb-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.fb-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.fb-item.done { opacity: .55; }
.fb-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.fb-head a { color: var(--blue); }
.fb-head b { color: var(--ink); }
.fb-date { white-space: nowrap; }
.fb-msg { margin: 0 0 8px; white-space: pre-wrap; line-height: 1.5; color: #2b3948; overflow-wrap: break-word; }
.fb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===========================================================================
   Tips (external links only — platform never holds money)
   =========================================================================== */
.tip-methods { display: grid; gap: 12px; }
.tip-method { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.tip-method-h { font-weight: 700; margin-bottom: 10px; }
.tip-scan { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.tip-qr { width: 180px; height: 180px; image-rendering: pixelated; display: block; margin: 0 auto 10px; background: #fff; border-radius: 8px; padding: 6px; box-sizing: border-box; }
.tip-addr { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tip-addr code { font-size: 12.5px; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; flex: 1 1 60%; min-width: 0; }
.tip-copy { white-space: nowrap; flex: 0 0 auto; }
.tip-warn { margin: 0 0 8px; color: var(--red); font-size: 13px; line-height: 1.45; }
.tip-note { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* ===========================================================================
   Developer profile page (/u/<username>)
   =========================================================================== */
.profile-head h1 { margin: 6px 0 4px; }
.profile-joined { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.profile-bio { line-height: 1.6; margin: 0 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-contact {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface);
  text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.profile-contact:hover { border-color: var(--blue); color: var(--blue); }
.dev-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.dev-link:hover { text-decoration: underline; }

/* ===========================================================================
   Site footer with social links
   =========================================================================== */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 24px 32px; }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer-brand { font-weight: 800; font-size: 14px; color: var(--ink); }
.site-footer-social { display: flex; gap: 6px; flex-wrap: wrap; }
.site-footer-social a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s, background .15s;
}
.site-footer-social a svg { flex-shrink: 0; display: block; }
.site-footer-social a:hover { color: var(--ink); border-color: var(--blue); background: var(--surface-strong); }
.site-footer-copy { font-size: 12px; color: var(--muted); }

/* ===========================================================================
   Founding 50 badge (shown on game cards)
   =========================================================================== */
.founding-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 4px;
  line-height: 1;
}

/* ===========================================================================
   Share kit (shown after successful game upload)
   =========================================================================== */
.share-kit {
  background: var(--surface);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  margin-bottom: 24px;
}
.share-kit h2 { margin: 0 0 18px; font-size: 22px; }
.share-link-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap;
}
.share-url-input {
  flex: 1; min-width: 180px; font-family: monospace; font-size: 13px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink);
}
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  cursor: pointer; border: none; text-decoration: none; transition: opacity .15s;
}
.share-btn:hover { opacity: .85; }
.share-btn-x       { background: #000;    color: #fff; }
.share-btn-reddit  { background: #ff4500; color: #fff; }
.share-btn-discord { background: #5865f2; color: #fff; }
.share-btn-tg      { background: #229ed9; color: #fff; }

/* ===========================================================================
   Payout history table (winners page)
   =========================================================================== */
.payout-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.payout-table th, .payout-table td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.payout-table th {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}
