:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #090b10; color: #f6f2ea; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% -10%, #5b2117 0, transparent 36%), #090b10; }
main { width: min(850px, 100%); margin: auto; padding: 28px 20px 50px; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
h1 { font-size: clamp(25px, 6vw, 38px); margin: 5px 0; }
header p, footer { color: #8d929d; margin: 0; }
.eyebrow { color: #f27b55; text-transform: uppercase; letter-spacing: .15em; font-weight: 800; font-size: 12px; }
.level { width: 82px; height: 82px; border-radius: 50%; display: grid; place-content: center; text-align: center; font-size: 32px; font-weight: 900; background: linear-gradient(145deg, #f0744c, #9d2d22); box-shadow: 0 0 35px #db532c55; }
.level small { font-size: 10px; text-transform: uppercase; }
.rank { margin: -14px 0 22px; color: #ffac77; font-weight: 800; }
.hero, .stats article, .quests article, .purchases, .sessions, .levels article, .error { background: #151820; border: 1px solid #282c35; border-radius: 20px; }
.hero { padding: 22px; margin-bottom: 14px; }
.hero > div:first-child { display: flex; justify-content: space-between; }
.hero strong { font-size: 24px; }
.hero p { font-size: 13px; color: #9ca1ab; margin-bottom: 0; }
.progress { height: 10px; background: #292d35; border-radius: 8px; margin-top: 18px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #e54d2e, #ffb14a); border-radius: 8px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stats article { padding: 19px; }
.stats span, .stats strong { display: block; }
.stats span { color: #9ca1ab; font-size: 13px; }
.stats strong { font-size: 21px; margin-top: 10px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 30px 3px 12px; }
.section-title h2 { margin: 0; font-size: 20px; }
.section-title span { color: #f27b55; }
.season { background: linear-gradient(135deg, #211716, #151820 58%); border: 1px solid #332a29; border-radius: 20px; padding: 20px; }
.season-score { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 5px 15px; margin-bottom: 18px; }
.season-score > span { color: #a9adb6; }
.season-score > strong { color: #ff9b66; font-size: 28px; }
.season-score > small { grid-column: 1 / -1; color: #858b96; }
.rewards { display: grid; gap: 8px; }
.rewards article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-radius: 14px; background: #11141b; border: 1px solid #282c35; opacity: .62; }
.rewards article.unlocked { opacity: 1; border-color: #81513c; }
.rewards article.received { opacity: .8; border-color: #32634a; background: #111c18; }
.rewards article.received b { color: #6fd39b; }
.rewards article strong, .rewards article span { display: block; }
.rewards article span { color: #a0a5ae; font-size: 13px; margin-top: 3px; }
.rewards article b { color: #ff9866; font-size: 12px; white-space: nowrap; }
.reward-note { color: #858b96; font-size: 12px; margin: 15px 0 0; }
.levels { display: grid; gap: 9px; }
.levels article { padding: 14px 17px; display: grid; grid-template-columns: 38px 1fr auto; gap: 13px; align-items: center; opacity: .62; }
.levels article.unlocked { opacity: 1; }
.levels article.current { border-color: #f06b46; background: linear-gradient(100deg, #281a19, #171a22); box-shadow: 0 0 24px #e55d3926; }
.level-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #292d35; color: #ffad78; font-weight: 900; }
.levels article div:nth-child(2) strong, .levels article div:nth-child(2) span { display: block; }
.levels article div:nth-child(2) span { color: #9297a1; font-size: 12px; margin-top: 4px; }
.levels article > b { color: #ff9866; font-size: 12px; text-transform: uppercase; }
.quests { display: grid; gap: 10px; }
.quests article { padding: 17px; }
.quests article div, .purchases article, .sessions article { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.quests article span { color: #ff9a68; font-weight: 800; font-size: 13px; }
.quests progress { width: 100%; height: 6px; margin: 15px 0 5px; accent-color: #e75b39; }
.quests small, .purchases span, .sessions span { color: #9297a1; }
.purchases, .sessions { padding: 4px 17px; }
.purchases article, .sessions article { padding: 15px 0; border-bottom: 1px solid #292d35; }
.purchases article:last-child, .sessions article:last-child { border: 0; }
.purchases strong, .purchases span, .sessions strong, .sessions span { display: block; }
.purchases span, .sessions span { font-size: 12px; margin-top: 4px; }
.purchases b { color: #ffbd73; white-space: nowrap; }
.sessions b { color: #f2f4f8; white-space: nowrap; }
footer { text-align: center; font-size: 12px; margin-top: 28px; }
.loading, .error { text-align: center; margin-top: 25vh; }
.loading span { display: inline-block; width: 34px; height: 34px; border: 3px solid #333; border-top-color: #f06b46; border-radius: 50%; animation: spin 1s linear infinite; }
.error { padding: 30px; }
.error button { background: #e55d39; color: white; border: 0; border-radius: 10px; padding: 12px 18px; }
.guest-login { max-width: 470px; margin: 17vh auto 0; padding: 28px; background: linear-gradient(135deg, #211716, #151820 58%); border: 1px solid #3a2b29; border-radius: 22px; }
.guest-login h1 { margin-bottom: 8px; }
.guest-login > p { color: #9ca1ab; line-height: 1.5; }
.guest-login input { text-align: center; font-size: 25px; letter-spacing: .25em; }
.logout { width: auto; background: transparent; color: #8d929d; padding: 5px 0; font-size: 12px; margin-top: 7px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) { main { padding-top: 20px; } .level { width: 68px; height: 68px; font-size: 28px; } .stats { grid-template-columns: 1fr; } .hero strong { font-size: 20px; } .levels article { grid-template-columns: 34px 1fr; } .levels article > b { grid-column: 2; } }

.admin-shell { width: min(1050px, 100%); }
.admin-login, .budget-card, .admin-panel, .ledger, .phone-access { background: #151820; border: 1px solid #282c35; border-radius: 20px; padding: 20px; }
.admin-login { max-width: 460px; margin: 18vh auto 0; }
.admin-login h1 { margin-top: 0; }
.field { display: grid; gap: 7px; margin: 13px 0; }
.field span { color: #a0a5ae; font-size: 13px; }
input, select, button { width: 100%; border-radius: 11px; border: 1px solid #343945; background: #0e1117; color: #f6f2ea; padding: 12px 13px; font: inherit; }
button { cursor: pointer; border: 0; background: #de5737; font-weight: 800; }
button:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { margin: 12px 0; background: #292f3a; color: #ffab78; }
.login-code { margin: 10px 0 16px; padding: 13px; border: 1px solid #65402f; border-radius: 13px; background: #211715; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.login-code span { color: #a8a0a0; font-size: 12px; }
.login-code strong { color: #ffb07b; font-size: 25px; letter-spacing: .15em; }
.admin-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.budget-head, .budget-numbers, .admin-actions, .ledger article { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.budget-head h2, .admin-panel h2, .ledger h2 { margin: 0; }
.budget-head b.safe { color: #6fd39b; } .budget-head b.warning { color: #ffbd62; } .budget-head b.blocked { color: #ff705c; }
.budget-meter { height: 13px; background: #292d35; border-radius: 9px; overflow: hidden; margin: 18px 0; }
.budget-meter i { display: block; height: 100%; background: linear-gradient(90deg,#e15434,#ffb24d); }
.budget-numbers div { display: grid; gap: 4px; }
.budget-numbers span, .ledger small, .admin-message { color: #9297a1; font-size: 12px; }
.budget-numbers strong { font-size: 22px; }
.reward-admin { display: grid; gap: 8px; margin-top: 15px; }
.reward-admin article { padding: 13px; border: 1px solid #2b3039; border-radius: 13px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.reward-admin span { color: #9ba0aa; font-size: 12px; }
.reward-admin b { color: #ff9b66; }
.ledger { margin-top: 14px; }
.phone-access { margin-top: 14px; }
.phone-access h2 { margin: 0 0 8px; }
.phone-access p, .phone-access span { color: #9297a1; }
.phone-access a { display: block; color: #ffab78; margin-top: 8px; font-weight: 700; }
.qr-wrap { display: flex; align-items: center; gap: 20px; margin-top: 15px; }
.qr-wrap img { width: 190px; height: 190px; padding: 10px; border-radius: 14px; background: white; }
.qr-wrap div { display: grid; gap: 10px; }
.qr-wrap strong { display: block; }
.ledger-list { margin-top: 13px; }
.ledger article { padding: 13px 0; border-bottom: 1px solid #292d35; }
.ledger article:last-child { border: 0; }
.ledger article div { display: grid; gap: 4px; }
.ledger article > b { color: #ffbd73; white-space: nowrap; }
.admin-message { min-height: 18px; margin-top: 10px; }
.admin-message.error-text { color: #ff7967; }
@media (max-width: 760px) { .admin-grid { grid-template-columns: 1fr; } .budget-numbers { align-items: flex-start; } .qr-wrap { align-items: flex-start; flex-direction: column; } }
