/* Creator Ladder — user app. Dark and warm like the homepage. Premium = gold, Ultra Premium = platinum aurora. */
:root {
  --bg: #0F0D0B; --bg-2: #15120F; --card: #1C1814; --card-2: #231E19; --line: rgba(243, 236, 221, .09); --line-2: rgba(243, 236, 221, .16);
  --text: #F3ECDD; --text-2: #B9AF9D; --text-3: #847B6D;
  --coral: #FF5A3C; --gold: #FFC93C; --gold-2: #E8B931; --mint: #3DDC97; --blue: #6EA8FF; --red: #FF6B57;
  --accent: var(--coral); --accent-2: var(--gold); --glow: rgba(255, 90, 60, .18);
  --r: 20px; --r-sm: 12px; --ease: cubic-bezier(.2, .8, .2, 1);
  --f-body: 'Manrope', system-ui, sans-serif; --f-num: 'Bricolage Grotesque', 'Manrope', sans-serif; --f-title: 'Fraunces', Georgia, serif;
  color-scheme: dark;
}
body[data-tier="premium"] { --accent: #E8B931; --accent-2: #FFE7A0; --glow: rgba(232, 185, 49, .22); --card: #1D1913; --card-2: #261F15; }
body[data-tier="ultra"] { --accent: #A88BFF; --accent-2: #F7E7A8; --glow: rgba(150, 110, 255, .25); --bg: #0D0B12; --bg-2: #13101B; --card: #1A1624; --card-2: #221C30; --line: rgba(220, 205, 255, .1); }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 15.5px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none; background: radial-gradient(40% 35% at 85% 0%, var(--glow), transparent 70%), radial-gradient(35% 30% at 0% 100%, rgba(255, 201, 60, .07), transparent 70%); }
body[data-tier="ultra"]::before { background: radial-gradient(40% 40% at 80% 0%, rgba(140, 100, 255, .28), transparent 70%), radial-gradient(35% 35% at 10% 90%, rgba(90, 200, 255, .12), transparent 70%), radial-gradient(30% 30% at 50% 50%, rgba(247, 231, 168, .06), transparent 70%); animation: aurora 18s ease-in-out infinite alternate; }
@keyframes aurora { to { transform: translate3d(-3%, 2%, 0) rotate(4deg) scale(1.05); } }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 15px; height: 15px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); } .small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .6; } }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 300; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { border-color: var(--text-3); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--accent); border-color: transparent; color: #1A1208; }
body[data-tier="ultra"] .btn--primary { background: linear-gradient(120deg, #8D6BFF, #C9B5FF 60%, #F7E7A8); color: #120E1E; }
.btn--primary:hover { box-shadow: 0 10px 30px var(--glow); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--card-2); }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn.is-busy { color: transparent !important; position: relative; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--text) transparent var(--text) transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth__art { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: radial-gradient(70% 60% at 70% 30%, rgba(255, 90, 60, .25), transparent 70%), radial-gradient(60% 50% at 20% 90%, rgba(255, 201, 60, .16), transparent 70%), var(--bg-2); }
.auth__art h2 { font: 400 clamp(36px, 4.4vw, 60px)/1.02 var(--f-title); letter-spacing: -.02em; max-width: 13ch; }
.auth__art h2 em { color: var(--gold); }
.auth__art p { color: var(--text-2); max-width: 42ch; margin-top: 14px; }
.auth__coins { position: absolute; inset: 0; pointer-events: none; }
.auth__coins svg { position: absolute; width: 46px; height: 46px; animation: float 7s ease-in-out infinite; opacity: .9; }
@keyframes float { 50% { transform: translateY(-22px) rotate(14deg); } }
.auth__form { display: grid; place-items: center; padding: 40px 22px; }
.auth__box { width: min(420px, 100%); display: grid; gap: 18px; }
.auth__box h1 { font: 400 34px/1.1 var(--f-title); }
.brand { display: flex; align-items: center; gap: 10px; font: 500 19px var(--f-title); text-decoration: none; }
.brand svg { width: 32px; height: 32px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 13.5px; }
.field small { color: var(--text-3); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input:not([type]), select, textarea { width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.err { color: var(--red); font-weight: 600; font-size: 13.5px; }
.ok-msg { color: var(--mint); font-weight: 600; font-size: 13.5px; }
.switch-link { color: var(--text-2); font-size: 14px; text-align: center; }
.switch-link a { color: var(--accent-2); font-weight: 700; }

/* ---------- Shell ---------- */
.preview-bar { position: sticky; top: 0; z-index: 90; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 14px; background: #FFC93C; color: #1B1A17; font-weight: 700; font-size: 13px; text-align: center; }
.preview-bar button { border: 0; background: #1B1A17; color: #FFC93C; border-radius: 99px; padding: 5px 12px; font-weight: 700; cursor: pointer; }
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.preview-bar + .top { top: 36px; }
.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav a { padding: 8px 14px; border-radius: 99px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.nav a:hover { color: var(--text); background: var(--card-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.wallet-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line-2); font: 700 15px var(--f-num); text-decoration: none; }
.wallet-pill svg { width: 24px; height: 24px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--f-num); color: #1A1208; background: var(--accent); text-decoration: none; }
.view { max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 120px; }
.bottom-nav { display: none; }

/* ---------- Tier badges ---------- */
.tier { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; overflow: hidden; font: 800 11.5px/1.2 var(--f-num); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.tier--premium { color: #2A1E05; background: linear-gradient(135deg, #FBE7A1 0%, #E8B931 45%, #B8860B 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 0 0 1px rgba(255, 201, 60, .5), 0 4px 18px rgba(232, 185, 49, .3); }
.tier--ultra { color: #F7EEFF; background: linear-gradient(120deg, #1B1530 0%, #3B2A6B 35%, #7B5BE0 55%, #2B1F4F 100%); background-size: 220% 100%; box-shadow: 0 0 0 1px rgba(214, 196, 255, .6), 0 0 22px rgba(140, 100, 255, .45); animation: shift 6s ease-in-out infinite; }
.tier--ultra b { color: #F7E7A8; }
.tier::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .7) 48%, transparent 66%); transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes shift { 50% { background-position: 100% 50%; } }

/* ---------- Cards & layout ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
body[data-tier="premium"] .card--hero, body[data-tier="ultra"] .card--hero { border-color: transparent; }
body[data-tier="premium"] .card--hero::before, body[data-tier="ultra"] .card--hero::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, var(--accent-2), transparent 40%, var(--accent)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.pad { padding: 22px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.sec-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.sec-title h2 { font: 400 26px/1.1 var(--f-title); }
.kicker { font: 700 12px var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }

/* Hello / hero */
.hello { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.hello__main { padding: 28px; overflow: hidden; }
.hello__main h1 { font: 400 clamp(30px, 3.6vw, 44px)/1.05 var(--f-title); letter-spacing: -.01em; margin: 10px 0 8px; }
.hello__main h1 em { color: var(--accent-2); }
.balance { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.balance__coin { width: 58px; height: 58px; animation: spinY 5s ease-in-out infinite; }
@keyframes spinY { 0%, 70% { transform: rotateY(0); } 85% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
.balance__value { font: 800 clamp(44px, 6vw, 64px)/1 var(--f-num); letter-spacing: -.03em; }
.balance__label { color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.daily { padding: 24px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.daily__amount { font: 800 38px/1 var(--f-num); color: var(--accent-2); }
.countdown { display: inline-flex; gap: 8px; }
.countdown span { min-width: 58px; padding: 10px 8px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); text-align: center; font: 800 24px/1 var(--f-num); }
.countdown span small { display: block; margin-top: 4px; font: 600 10.5px var(--f-body); color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; }
.chip--ok { color: var(--mint); border-color: rgba(61, 220, 151, .35); background: rgba(61, 220, 151, .08); }
.chip--warn { color: var(--gold); border-color: rgba(255, 201, 60, .35); background: rgba(255, 201, 60, .08); }
.chip--lock { color: var(--text-2); }
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; margin-bottom: 18px; border: 1px solid; }
.banner--warn { background: rgba(255, 201, 60, .08); border-color: rgba(255, 201, 60, .3); }
.banner--frozen { background: rgba(110, 168, 255, .08); border-color: rgba(110, 168, 255, .35); }
.banner b { display: block; margin-bottom: 2px; }

/* Stats strip */
.stat { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.stat__label { color: var(--text-2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat__value { font: 800 28px/1 var(--f-num); }

/* Quests (today's quiz + games) */
.quests { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.quest { position: relative; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; text-decoration: none; overflow: hidden; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.quest:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.quest__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(255, 90, 60, .25), rgba(255, 201, 60, .2)); color: var(--gold); }
.quest--premium .quest__icon { background: linear-gradient(135deg, #2B2140, #4A3580); color: #F7E7A8; box-shadow: 0 0 0 1px rgba(200, 180, 255, .4); }
.quest__icon .ic { width: 22px; height: 22px; }
.quest h3 { font: 700 16px var(--f-body); }
.quest p { color: var(--text-2); font-size: 13px; }
.quest__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quest__reward { font: 800 15px var(--f-num); color: var(--accent-2); }
.quest.is-done { opacity: .78; }
.quest.is-locked { opacity: .55; filter: saturate(.6); cursor: not-allowed; }
.quest.is-locked:hover { transform: none; box-shadow: none; }
.quest.is-done::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, .015) 12px 24px); pointer-events: none; }

/* Course cards */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.ccard { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s; }
.ccard:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.ccard__img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--card-2); }
.ccard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.ccard:hover .ccard__img img { transform: scale(1.06); }
.ccard__img .tier { position: absolute; top: 12px; left: 12px; }
.ccard__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ccard__body h3 { font: 400 21px/1.15 var(--f-title); }
.bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width 1.2s var(--ease); }
.ccard--locked .ccard__img img { filter: grayscale(.8) brightness(.6); }
.lock-tag { position: absolute; inset: auto 12px 12px auto; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); font-size: 12.5px; font-weight: 700; }

/* Course page */
.chero { position: relative; border-radius: 26px; overflow: hidden; min-height: 320px; display: flex; align-items: flex-end; margin-bottom: 22px; }
.chero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.chero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 13, 11, .1), rgba(15, 13, 11, .92) 80%); }
body[data-tier="ultra"] .chero::after { background: linear-gradient(180deg, rgba(13, 11, 18, .15), rgba(13, 11, 18, .94) 80%); }
.chero__in { position: relative; z-index: 1; padding: clamp(20px, 4vw, 40px); width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; }
.chero h1 { font: 400 clamp(32px, 4.4vw, 54px)/1.02 var(--f-title); letter-spacing: -.02em; margin: 10px 0; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent-2) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: rgba(15, 13, 11, .85); }
.ring b { position: relative; font: 800 26px var(--f-num); }
.ring small { position: relative; display: block; font-size: 11px; color: var(--text-2); text-align: center; margin-top: -4px; }
.lessons { display: flex; flex-direction: column; }
.lesson { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s; }
.lesson:last-child { border-bottom: 0; }
.lesson:hover { background: var(--card-2); }
.lesson__n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--f-num); background: var(--bg-2); border: 1px solid var(--line-2); }
.lesson.is-done .lesson__n { background: var(--mint); color: #08130D; border-color: transparent; }
.lesson.is-locked { opacity: .55; cursor: not-allowed; }
.lesson b { display: block; font-weight: 700; }

/* Lesson page */
.reader { max-width: 820px; margin: 0 auto; }
.reader h1 { font: 400 clamp(30px, 4vw, 46px)/1.08 var(--f-title); margin: 10px 0 18px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; margin-bottom: 22px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reader__body { font-size: 17px; line-height: 1.75; color: #E6DECF; white-space: pre-wrap; }

/* Quiz */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.quiz__dots { display: flex; gap: 6px; }
.quiz__dots i { width: 28px; height: 6px; border-radius: 99px; background: var(--line-2); transition: background .3s, width .3s; }
.quiz__dots i.on { background: var(--accent-2); width: 40px; }
.quiz__dots i.ok { background: var(--mint); } .quiz__dots i.no { background: var(--red); }
.qcard { padding: clamp(22px, 4vw, 36px); }
.qcard h2 { font: 400 clamp(24px, 3vw, 32px)/1.2 var(--f-title); margin-bottom: 22px; }
.answers { display: grid; gap: 12px; }
.answer { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-2); text-align: left; cursor: pointer; font-weight: 600; transition: transform .15s var(--ease), border-color .2s, background .2s; }
.answer:hover:not(:disabled) { transform: translateX(4px); border-color: var(--accent); }
.answer b { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); font: 800 13px var(--f-num); }
.answer.is-right { border-color: var(--mint); background: rgba(61, 220, 151, .12); }
.answer.is-right b { background: var(--mint); color: #08130D; }
.answer.is-wrong { border-color: var(--red); background: rgba(255, 107, 87, .12); animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.why { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--card-2); color: var(--text-2); }
.timer { position: relative; width: 54px; height: 54px; }
.timer svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 5; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 16px var(--f-num); }
.combo { font: 800 15px var(--f-num); color: var(--accent-2); }
.result { text-align: center; padding: 40px 24px; }
.result__score { font: 800 clamp(64px, 12vw, 110px)/1 var(--f-num); letter-spacing: -.04em; color: var(--accent-2); }

/* Game host */
.game-host { max-width: 980px; margin: 0 auto; }
.game-frame { position: relative; border-radius: 24px; overflow: hidden; background: var(--card); border: 1px solid var(--line); min-height: 520px; }
.game-hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.game-hud .hud-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); font: 800 14px var(--f-num); }
.game-stage { position: relative; padding: clamp(16px, 3vw, 28px); min-height: 460px; }
.game-intro { text-align: center; padding: 48px 24px; display: grid; gap: 16px; justify-items: center; }
.game-intro .quest__icon { width: 84px; height: 84px; border-radius: 26px; }
.game-intro .quest__icon .ic { width: 40px; height: 40px; }
.game-intro h1 { font: 400 clamp(32px, 5vw, 52px)/1.05 var(--f-title); }

/* Activity */
.feed { display: flex; flex-direction: column; }
.feed__item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.feed__item:last-child { border-bottom: 0; }
.feed__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card-2); color: var(--accent-2); }
.feed__amt { font: 800 15px var(--f-num); }
.pos { color: var(--mint); } .neg { color: var(--red); }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 700; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: up .3s var(--ease); }
.toast--err { background: var(--red); color: #fff; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } }
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.modal__box { width: min(480px, 100%); padding: 26px; border-radius: 24px; background: var(--card); border: 1px solid var(--line-2); animation: up .3s var(--ease); display: grid; gap: 14px; }
.modal__box h2 { font: 400 26px var(--f-title); }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hello, .g-main, .g3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; } .auth__art { display: none; }
  .nav { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 16px; text-decoration: none; color: var(--text-3); font-size: 11.5px; font-weight: 700; }
  .bottom-nav a[aria-current="page"] { color: var(--text); background: var(--card-2); }
  .bottom-nav .ic { width: 21px; height: 21px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .chero__in { grid-template-columns: 1fr; }
  .ring { width: 92px; height: 92px; }
  .wallet-pill span { display: none; }
  .game-frame { min-height: 480px; border-radius: 18px; }
  .lesson { grid-template-columns: 40px minmax(0, 1fr); }
  .lesson > :last-child { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Round A: profile card, bell, notifications, support ---------- */
button.avatar { border: 0; cursor: pointer; padding: 0; overflow: hidden; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); transition: transform .2s var(--ease), box-shadow .2s; }
button.avatar:hover { transform: scale(1.06); }
.avatar img, .pcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--xl { width: 76px; height: 76px; font-size: 28px; flex: none; }
.me-head { justify-content: flex-start; gap: 18px; align-items: center; }
.bell { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: color .2s, transform .2s var(--ease); }
.bell:hover { color: var(--text); transform: rotate(-8deg); }
.bell .ic { width: 20px; height: 20px; }
.badge-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red, #FF6B57); color: #fff; font: 800 11px/18px var(--f-num); text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: dot-pop .5s var(--ease); }
.badge-dot[hidden] { display: none; }
.badge-dot--inline { position: static; display: inline-block; margin-left: 4px; box-shadow: none; }
@keyframes dot-pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.bottom-nav a { position: relative; }
.bottom-nav .badge-dot { top: 2px; right: calc(50% - 20px); }
.modal__box--profile { width: min(380px, 100%); padding: 26px 22px 18px; }
.pcard { display: grid; gap: 10px; text-align: center; justify-items: center; }
.pcard__photo { position: relative; }
.pcard__img { width: 108px; height: 108px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #1A1208; font: 800 40px var(--f-num); box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent-2), 0 18px 40px rgba(0, 0, 0, .45); }
body[data-tier="premium"] .pcard__img { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px #E9C46A, 0 18px 40px rgba(233, 196, 106, .25); }
body[data-tier="ultra"] .pcard__img { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px #C8B4FF, 0 18px 46px rgba(168, 139, 255, .35); }
.pcard__cam { position: absolute; right: -2px; bottom: 2px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); transition: transform .2s var(--ease); }
.pcard__cam:hover { transform: scale(1.1); }
.pcard__cam .ic { width: 18px; height: 18px; }
.pcard h2 { font: 400 26px/1.15 var(--f-title); margin-top: 6px; }
.pcard__mail { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.pcard__stats { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.pcard__stats div { padding: 12px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.pcard__stats span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.pcard__stats b { font: 800 22px var(--f-num); color: var(--accent-2); }
.pcard__links { width: 100%; display: grid; gap: 4px; margin-top: 4px; }
.pcard__links a, .pcard__links button { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 0; background: transparent; color: var(--text); font: 600 15px var(--f-body); text-decoration: none; cursor: pointer; text-align: left; transition: background .2s; }
.pcard__links a:hover, .pcard__links button:hover { background: var(--card-2); }
.notes { overflow: hidden; }
.note-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .2s; }
.note-item:last-child { border-bottom: 0; }
.note-item:hover { background: var(--card-2); }
.note-item.is-new { background: linear-gradient(90deg, rgba(255, 201, 60, .08), transparent 60%); }
.note-item--bad .feed__ic { color: var(--red, #FF6B57); }
.note-item--info .feed__ic { color: #8FB8FF; }
.ticket-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .2s; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--card-2); }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: grid; gap: 12px; max-height: 60vh; overflow-y: auto; }
.msg { max-width: min(560px, 88%); display: grid; gap: 4px; }
.msg--me { justify-self: end; text-align: right; }
.msg__body { padding: 12px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
.msg--me .msg__body { background: rgba(255, 201, 60, .1); border-color: rgba(255, 201, 60, .3); border-bottom-right-radius: 4px; }
.msg--team .msg__body { border-bottom-left-radius: 4px; }
.new-ticket textarea, .thread + form textarea { resize: vertical; }
@media (max-width: 760px) {
  .top .bell { display: none; }
  .bottom-nav a { font-size: 10.5px; padding: 8px 2px; }
  .bottom-nav .ic { width: 20px; height: 20px; }
  .me-head { flex-wrap: wrap; }
  .ticket-row { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; }
  .ticket-row > .chip { grid-column: 2; justify-self: start; }
}

/* ---------- Round B: how to play on the game page ---------- */
.howto-box { margin: 0 clamp(0px, 2vw, 20px) 24px; padding: 18px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 12px; }
.howto-box h2 { font: 400 22px var(--f-title); }
.howto-video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.howto-video iframe, .howto-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hud-pill:empty { display: none; }

/* ---------- Certificates ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cert-card { display: grid; gap: 10px; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-align: left; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.cert-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.4); border-color: var(--line-2); }
.cert-card--lux { border-color: rgba(233,196,106,.45); box-shadow: 0 0 0 1px rgba(233,196,106,.15), 0 14px 40px rgba(233,196,106,.08); }
.cert-card--lux:hover { box-shadow: 0 0 0 1px rgba(233,196,106,.4), 0 18px 50px rgba(233,196,106,.18); }
.cert-card canvas { width: 100%; height: auto; aspect-ratio: 2000 / 1414; border-radius: 10px; display: block; background: #1a1612; }
.cert-card__t b { display: block; font: 700 15px var(--f-body); }
.cert-card__t small { color: var(--text-3); font-size: 12px; }
.modal__box--cert { width: min(980px, 100%); padding: 14px; }
.cert-view canvas { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
/* ---------- Reselling ---------- */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps3 div { padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.steps3 b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #1A1208; font: 800 15px var(--f-num); }
.steps3 span { color: var(--text-2); font-size: 14px; }
@media (max-width: 760px) { .steps3 { grid-template-columns: 1fr; } }

.resell-locked { border-style: dashed; }
.resell-locked--big { text-align: left; }
.resell-lock { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, #3A2E12, #6B5320); color: #F7E7A8; box-shadow: 0 0 0 1px rgba(233,196,106,.4), 0 14px 30px rgba(233,196,106,.15); }
.resell-lock .ic { width: 28px; height: 28px; }
.steps3.is-dim b { background: var(--card-2); color: var(--accent-2); border: 1px solid var(--line-2); }
