/* Dark game-style theme. Own branding: deliberately not a copy of Roblox's design. */
:root {
  --bg: #0f1115;
  --bg-2: #14171d;
  --surface: #1b1f27;
  --surface-2: #232833;
  --surface-3: #2c3240;
  --text: #f2f4f8;
  --muted: #9aa3b5;
  --border: #2d3340;
  --primary: #3b82ff;
  --primary-ink: #ffffff;
  --primary-soft: rgba(59, 130, 255, 0.15);
  --go: #20c96b;
  --go-ink: #04220f;
  --gold: #ffc531;
  --danger: #ff5468;
  --warn-bg: rgba(255, 197, 49, 0.1);
  --warn-border: rgba(255, 197, 49, 0.45);
  --ok-bg: rgba(32, 201, 107, 0.14);
  --ok-ink: #4ee38f;
  --bad-bg: rgba(255, 84, 104, 0.14);
  --bad-ink: #ff8594;
  --wait-bg: rgba(255, 197, 49, 0.14);
  --wait-ink: #ffd666;
  --radius: 12px;
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; height: auto; }
a { color: #6aa2ff; text-underline-offset: 2px; }
a:hover { color: #94bcff; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 900; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0.2em 0 0.35em; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin: 1.8em 0 0.6em; }
h3, .h3 { font-size: 1.1rem; margin: 0 0 0.4em; font-weight: 800; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Announcement + header */
.announce { background: linear-gradient(90deg, var(--primary), #6a5cff); text-align: center; font-weight: 700; font-size: 0.92rem; padding: 8px 16px; }
.announce a { color: #fff; text-decoration: none; }
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(15, 17, 21, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); }
.nav-links .btn { margin-left: 6px; color: var(--primary-ink); }
.nav-links .btn:hover { background: var(--primary); }
.pill { background: var(--surface-2) !important; border: 1px solid var(--border); }
.nav-toggle { display: none; margin-left: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 960px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .nav-links.open { display: flex; }
  .nav-links .btn { margin: 6px 0 0; text-align: center; }
}

/* Buttons: chunky with a bottom edge, game-UI style */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: var(--primary-ink);
  border: 0; border-radius: 10px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  padding: 11px 18px 13px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.1); color: var(--primary-ink); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }
.btn-sm { padding: 6px 12px 8px; font-size: 0.88rem; border-radius: 8px; }
.btn-lg { padding: 15px 26px 17px; font-size: 1.08rem; }
.btn-go { background: var(--go); color: var(--go-ink); }
.btn-go:hover { color: var(--go-ink); }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border), inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.btn-ghost:hover { color: var(--text); background: var(--surface-3); }
.btn-danger { background: var(--danger); color: #fff; }

/* Hero */
.hero { padding: 48px 0 28px; background: radial-gradient(900px 420px at 15% -10%, rgba(59, 130, 255, 0.22), transparent 70%), radial-gradient(700px 380px at 95% 10%, rgba(32, 201, 107, 0.14), transparent 70%); border-bottom: 1px solid var(--border); }
.hero { overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-copy h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-weight: 800; font-size: 0.85rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 4px rgba(32, 201, 107, 0.25); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 0 1.2em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.cta-row.center { justify-content: center; }
.trust { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-weight: 700; font-size: 0.92rem; }

.hero-art { position: relative; display: grid; gap: 14px; justify-items: center; }
.giftcard {
  width: min(100%, 380px); aspect-ratio: 1.6; border-radius: 18px; padding: 20px 22px;
  background: linear-gradient(135deg, #2b3a63 0%, #1f2a48 45%, #133a2a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex; flex-direction: column; justify-content: space-between; transform: rotate(-3deg);
}
.gc-top { display: flex; align-items: center; gap: 8px; font-weight: 900; }
.gc-chip { margin-left: auto; font-size: 0.7rem; letter-spacing: 0.12em; background: var(--gold); color: #3a2900; padding: 3px 8px; border-radius: 6px; }
.gc-title { font-size: 1.3rem; font-weight: 900; }
.gc-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.2rem; letter-spacing: 0.15em; background: rgba(0, 0, 0, 0.35); padding: 8px 12px; border-radius: 8px; text-align: center; color: #cfd8ea; }
.gc-foot { font-size: 0.8rem; color: #b9c6dd; }
.goal-card { width: min(100%, 340px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); display: grid; gap: 6px; transform: rotate(1.5deg); }
.goal-card strong { display: flex; align-items: center; gap: 4px; font-size: 1.15rem; }

.stats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.stats strong { display: block; font-size: 1.7rem; font-weight: 900; }
.stats span { color: var(--muted); font-size: 0.88rem; font-weight: 600; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy h1 { font-size: clamp(2.1rem, 10vw, 3rem); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sections */
.section { padding: 36px 0 52px; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section > .wrap > h2:first-child { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin-top: 0; }
.section-head a { font-weight: 700; text-decoration: none; }
.page-head { padding: 36px 0 8px; background: radial-gradient(700px 260px at 10% -20%, rgba(59, 130, 255, 0.16), transparent 70%); }
.page-head .lead { margin-left: 0; }
.crumbs { font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Grid & cards */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.reward { display: flex; flex-direction: column; gap: 6px; transition: transform 0.15s ease, border-color 0.15s ease; }
.reward:hover { transform: translateY(-3px); border-color: var(--surface-3); }
.reward-art { display: flex; align-items: center; gap: 10px; padding: 14px; margin: -6px -6px 8px; border-radius: 10px; background: linear-gradient(135deg, #2b3a63, #133a2a); font-weight: 900; }
.reward form, .reward > .btn { margin-top: auto; }
.reward .btn { width: 100%; }
.reward-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 1.15rem; }
.robux-value { margin: -4px 0 8px; font-size: 0.85rem; color: var(--muted); }

.coin { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; color: var(--text); white-space: nowrap; }
.payout-note { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.coin img { width: 1em; height: 1.1em; flex-shrink: 0; object-fit: contain; }


.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: s; }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25); font-weight: 900; margin-bottom: 12px; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .steps, .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps, .steps-4 { grid-template-columns: 1fr; } }

/* Game tiles */
.game-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.game-tile { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease; }
.game-tile:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--text); }
.game-tile[hidden] { display: none; }
.game-icon { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px; margin-bottom: 6px; font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, #2b3a63, #3b2a63); color: #dfe6ff; }
.game-name { font-weight: 800; }

/* Quest cards (dashboard tasks) */
.quest-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .quest-grid { grid-template-columns: 1fr; } }
.quest { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; border-width: 2px; transition: border-color 0.15s ease, transform 0.15s ease; }
.quest:hover { border-color: var(--surface-3); transform: translateY(-2px); }
.quest.is-done { opacity: 0.75; }
.quest.is-done:hover { transform: none; }
.quest-head { display: flex; align-items: center; gap: 12px; }
.quest-thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font-size: 2rem; background: linear-gradient(135deg, #2b3a63, #133a2a); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.quest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.quest-title { min-width: 0; flex: 1; }
.quest-title h3 { margin: 2px 0 0; font-size: 1.15rem; line-height: 1.2; }
.quest-chip { display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
.reward-pill { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; align-self: flex-start; background: var(--go); color: var(--go-ink); font-weight: 900; font-size: 1.05rem; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.reward-pill img { width: 1em; height: 1.05em; object-fit: contain; filter: brightness(0) saturate(100%); opacity: 0.85; }
.quest-desc { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.quest-steps { list-style: none; counter-reset: q; margin: 0; padding: 0; display: grid; gap: 6px; }
.quest-steps li { counter-increment: q; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); color: var(--muted); font-size: 0.95rem; }
.quest-steps li::before { content: counter(q); display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; background: var(--surface-3); color: var(--text); font-weight: 900; font-size: 0.85rem; }
.quest-steps li.done { color: var(--ok-ink); text-decoration: line-through; text-decoration-color: rgba(78, 227, 143, 0.5); }
.quest-steps li.done::before { content: "✓"; background: var(--go); color: var(--go-ink); }
.quest-steps li.current { color: var(--text); background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); font-weight: 700; }
.quest-steps li.current::before { background: var(--primary); }
.quest-progress { display: flex; align-items: center; gap: 10px; font-weight: 800; white-space: nowrap; }
.quest-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.quest-actions > .btn, .quest-actions > form { flex: 1; }
.quest-actions form .btn { width: 100%; }
.quest-actions .copy-row { flex: 1; margin: 0; }
.done-badge { display: block; width: 100%; text-align: center; background: var(--ok-bg); color: var(--ok-ink); font-weight: 900; padding: 11px 14px; border-radius: 10px; }

.link-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; margin: 0 0 18px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(59, 130, 255, 0.22), rgba(32, 201, 107, 0.18)); border: 2px solid var(--primary); }
.link-banner strong { font-size: 1.2rem; }
.link-banner p { margin: 4px 0 0; color: var(--muted); }
.linked { margin-top: -6px; }

/* Codes */
.search input { width: 100%; padding: 13px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; margin-bottom: 14px; }
.code-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.code-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.code-card[hidden] { display: none; }
.code-info { min-width: 0; }
.code-info p { margin: 4px 0 2px; font-weight: 600; }
.code { font-size: 1.15rem; font-weight: 900; letter-spacing: 0.04em; background: var(--primary-soft); color: #8fb8ff; padding: 3px 10px; border-radius: 8px; word-break: break-all; }
.code-actions { display: flex; gap: 8px; flex-shrink: 0; }
.is-expired { opacity: 0.55; }
.is-expired .code { text-decoration: line-through; background: var(--surface-2); color: var(--muted); }
.is-pending { border-color: var(--warn-border); }
@media (max-width: 560px) { .code-card { flex-direction: column; align-items: stretch; } .code-actions .btn { flex: 1; } }

.tag { display: inline-block; font-size: 0.78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag-expired { background: var(--bad-bg); color: var(--bad-ink); }
.tag-wait { background: var(--wait-bg); color: var(--wait-ink); }

.empty { border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px; color: var(--muted); text-align: center; }
.callout { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; }
.callout h2 { margin-top: 0; font-size: 1.3rem; }

/* Delivery feed */
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.feed li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.feed time { margin-left: auto; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); font-weight: 900; flex-shrink: 0; }

/* Prose & lists */
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.4em 0; }
.howto li { margin: 0.5em 0; }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 12px 0; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
@media (max-width: 700px) { .table { display: block; overflow-x: auto; } }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--surface-2); font-size: 0.88rem; }
.table tr:last-child td { border-bottom: 0; }
.table tr.overdue td { background: rgba(255, 84, 104, 0.07); }
.pos { color: var(--ok-ink); font-weight: 800; }
.neg { color: var(--bad-ink); font-weight: 800; }

/* Forms */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form.inline { grid-template-columns: 1fr auto; align-items: end; }
.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { resize: vertical; }
.check { display: flex !important; gap: 10px !important; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: 5px; }
.grid-form { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.tiny { width: 90px; padding: 6px 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.auth { max-width: 460px; }
.auth h1 { font-size: 1.8rem; }


.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input { flex: 1; min-width: 0; }

.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0 0; font-weight: 700; }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--bad-bg); color: var(--bad-ink); }
.flash-info { background: var(--primary-soft); color: #8fb8ff; }

.balance { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 18px; }
.balance > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 20px; min-width: 150px; }
.balance .label { display: block; font-size: 0.85rem; color: var(--muted); }
.balance-main { border-color: var(--go) !important; }
.balance strong { display: flex; align-items: center; gap: 6px; font-size: 1.8rem; font-weight: 900; line-height: 1.2; }
.balance strong .coin { gap: 8px; }

.progress { width: 100%; height: 12px; border: 0; border-radius: 999px; background: var(--surface-3); overflow: hidden; appearance: none; }
.progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
.progress::-webkit-progress-value { background: linear-gradient(90deg, var(--primary), var(--go)); border-radius: 999px; }
.progress::-moz-progress-bar { background: linear-gradient(90deg, var(--primary), var(--go)); border-radius: 999px; }

.task-claim { background: var(--primary-soft); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.task-claim p { margin: 0; }
.task-claim.done { background: var(--ok-bg); color: var(--ok-ink); font-weight: 800; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.admin-nav a { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.9rem; }
.settings details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; }
.settings summary { cursor: pointer; }
.seo-page { border: 1px solid var(--border); border-radius: 10px; margin: 12px 0; padding: 10px 14px; display: grid; gap: 8px; }
.seo-page legend { font-weight: 800; padding: 0 6px; }
details > summary { cursor: pointer; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 44px 0 24px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid h2 { font-size: 0.85rem; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.footer-grid nav a { display: block; color: var(--text); text-decoration: none; padding: 3px 0; }
.footer-grid nav a:hover { color: #8fb8ff; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.88rem; }
.disclaimer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: span 2; } }

/* Kid-friendly home dashboard */
.hero-kid { text-align: center; }
.hero-kid .lead { margin-left: auto; margin-right: auto; font-size: 1.2rem; }
.hero-kid h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
.hero-kid .cta-row { justify-content: center; }
.me-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; max-width: 720px; margin: 18px auto; padding: 18px 22px; text-align: left; background: var(--surface); border: 2px solid var(--go); border-radius: var(--radius); }
.me-card > div { display: grid; gap: 6px; flex: 1; min-width: 220px; }
.me-card .label { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.me-card strong { font-size: 2rem; }
.big-steps { list-style: none; padding: 0; margin: 28px auto 0; max-width: 980px; display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.big-steps li { display: grid; gap: 4px; justify-items: center; padding: 18px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: relative; }
.big-steps li b { font-size: 1.1rem; }
.big-steps li span:last-child { color: var(--muted); font-size: 0.92rem; }
.big-emoji { font-size: 2.4rem; line-height: 1.1; }
@media (max-width: 700px) { .big-steps { grid-template-columns: 1fr; } }
.hero-kid .stats { text-align: left; }
.earn-total { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; background: var(--ok-bg); color: var(--ok-ink); padding: 6px 14px; border-radius: 999px; }
.quest-how { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font-size: 1rem; }
.quest-how b { color: var(--ok-ink); }
.quest-how .again { color: var(--wait-ink); font-weight: 800; }
.game-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.game-icon:has(img) { aspect-ratio: 1; background: none; }
.game-earn { font-weight: 800; color: var(--ok-ink); font-size: 0.9rem; }

/* Picture tutorial (linking a Roblox account) */
.tutorial { margin-top: 28px; }
.tut-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.tut-steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; }
.tut-text { display: flex; gap: 14px; align-items: flex-start; }
.tut-text h3 { margin: 2px 0 4px; font-size: 1.2rem; }
.tut-text p { margin: 0; color: var(--muted); }
.tut-num { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--primary); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25); font-size: 1.2rem; font-weight: 900; }
.tut-steps img { width: 100%; height: auto; border-radius: 10px; border: 2px solid var(--border); background: var(--bg); }
.link-card { border: 2px solid var(--primary); }

/* Support */
.help-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 28px 0 0; padding: 18px 22px; border-radius: var(--radius); background: var(--surface); border: 2px dashed var(--surface-3); }
.help-card p { margin: 4px 0 0; color: var(--muted); }
.help-card strong { font-size: 1.15rem; }
.ticket { display: grid; gap: 12px; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ticket-head h3 { margin: 0; }
.chat { display: grid; gap: 8px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; }
.bubble p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .who { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.from-user { justify-self: end; background: var(--primary-soft); border-bottom-right-radius: 4px; }
.from-admin { justify-self: start; background: var(--ok-bg); border-bottom-left-radius: 4px; }
.reply-form { grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 560px) { .reply-form { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

/* Admin panel */
.admin { padding-top: 24px; }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-side { position: sticky; top: 84px; display: grid; gap: 12px; }
.admin-brand { margin: 0; font-weight: 900; color: var(--muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; }
.admin-menu { display: grid; gap: 4px; }
.admin-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.admin-menu a:hover { background: var(--surface-2); }
.admin-menu a[aria-current="page"] { background: var(--primary); }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: 0.75rem; font-weight: 900; padding: 1px 8px; }
.admin-main { min-width: 0; }
.admin-main h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-top: 0; }
.admin-main > .lead { margin-bottom: 18px; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; }
  .admin-menu { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
}
.todo-list { display: grid; gap: 10px; }
.todo { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 2px solid var(--warn-border); border-radius: var(--radius); }
.todo.all-done { border-color: var(--go); }
.todo p { margin: 2px 0 0; }
.todo .btn { margin-left: auto; }
.todo-icon { font-size: 1.8rem; }
.howto-box { padding: 12px 16px; margin: 0 0 16px; border-radius: 10px; background: var(--primary-soft); color: var(--text); }
.hint { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; }
.hint b { color: var(--text); }
.task-form { max-width: 820px; }
.type-picker, .task-details { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0; display: grid; gap: 12px; background: var(--surface); }
.type-picker { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.type-picker legend, .task-details legend { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.1rem; padding: 0 6px; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary); font-size: 0.9rem; }
.type-card { display: flex !important; gap: 12px; align-items: flex-start; padding: 12px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--bg-2); font-weight: 400 !important; }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card:has(input:checked) { border-color: var(--go); background: var(--ok-bg); }
.type-card:has(input:focus-visible) { outline: 3px solid var(--primary); }
.type-card small { display: block; color: var(--muted); margin-top: 2px; }
.type-card.is-fixed { cursor: default; border-color: var(--go); margin-bottom: 4px; }
.type-icon { font-size: 1.8rem; line-height: 1; }
.task-cell { display: flex; align-items: center; gap: 10px; }
.task-cell img, .mini-thumb { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; object-fit: cover; }
.mini-thumb { display: grid; place-items: center; background: var(--surface-3); font-size: 1.2rem; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }
.add-box { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 8px 0 16px; }
.add-box summary { font-weight: 800; cursor: pointer; }
.add-box form { margin-top: 12px; }
.reward-admin { display: grid; gap: 10px; }
.reward-admin p { margin: 0; }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-1 { grid-template-columns: minmax(0, 320px); justify-content: center; }
@media (max-width: 860px) { .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
select, input, textarea { max-width: 100%; min-width: 0; }

/* Tutorial: computer vs phone screenshots */
.device-pc, .device-phone { display: none; }
.device-tabs:not(.show-pc):not(.show-phone) .device-pc { display: block; }
@media (max-width: 760px), (pointer: coarse) {
  .device-tabs:not(.show-pc):not(.show-phone) .device-pc { display: none; }
  .device-tabs:not(.show-pc):not(.show-phone) .device-phone { display: block; }
}
.device-tabs.show-pc .device-pc, .device-tabs.show-phone .device-phone { display: block; }
.device-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.device-switch .btn { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.device-switch .btn[aria-pressed="true"] { background: var(--primary); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25); }
.tut-sub { margin: 0; padding: 0; list-style: none; counter-reset: sub; display: grid; gap: 14px; }
.tut-sub li { counter-increment: sub; display: grid; gap: 8px; }
.tut-sub li p { margin: 0; }
.tut-sub li p::before { content: counter(sub, lower-alpha) ") "; font-weight: 900; color: var(--ok-ink); }
.device-phone img { max-width: 380px; }
.tip { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--wait-bg); }
