/* Upgrade v23 — unified responsive design system + roulette/profile/dashboard refresh.
   Loaded last so it hardens legacy surfaces without requiring destructive rewrites. */
:root{
  --v23-page:min(1540px,calc(100vw - 48px));
  --v23-gutter:clamp(14px,2.2vw,32px);
  --v23-gap:clamp(10px,1.4vw,18px);
  --v23-radius:clamp(16px,1.6vw,24px);
  --v23-panel:#0d0f14;
  --v23-panel-2:#11141b;
  --v23-line:rgba(255,255,255,.075);
  --v23-muted:#9298a4;
  --v23-orange:#ff661f;
  --v23-orange-2:#ff9a52;
  --v23-green:#62e9a3;
}
html{overflow-x:hidden}
body{overflow-x:hidden}
.public-surface,.control-surface{min-width:0}
.public-surface :where(main,section,article,aside,header,footer,div,form,nav),
.control-surface :where(main,section,article,aside,header,footer,div,form,nav){min-width:0;box-sizing:border-box}
.public-surface img,.public-surface video,.control-surface img,.control-surface video{max-width:100%}
.public-surface :where(.wrap-xl,.wrap,.page-shell){width:var(--v23-page)!important;max-width:1540px!important;margin-left:auto!important;margin-right:auto!important}

/* Typography scales consistently instead of jumping between old layouts. */
.public-surface h1{font-size:clamp(34px,4.9vw,72px);line-height:.98;letter-spacing:-.055em}
.public-surface h2{line-height:1.05;letter-spacing:-.035em}
.public-surface p{overflow-wrap:anywhere}

/* Mobile nav: the page is blurred, the drawer itself remains crisp. */
@media(max-width:820px){
  .public-surface .public-topbar-v4 .topbar-backdrop{
    position:fixed!important;inset:0!important;display:block!important;pointer-events:none!important;
    opacity:0!important;background:rgba(2,3,5,.58)!important;backdrop-filter:blur(12px) saturate(.8)!important;
    -webkit-backdrop-filter:blur(12px) saturate(.8)!important;transition:opacity .22s ease!important;z-index:998!important;
  }
  .public-surface .public-topbar-v4.nav-open .topbar-backdrop{opacity:1!important;pointer-events:auto!important}
  .public-surface .public-topbar-v4 .topbar-nav{
    z-index:1000!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    background:linear-gradient(180deg,#0d0f13 0%,#07080b 100%)!important;
    box-shadow:0 28px 80px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.05)!important;
  }
  body.nav-open,body.mobile-nav-open{overflow:hidden!important;touch-action:none}
}

/* ------------------------------------------------------------------
   Game profile / progression
   ------------------------------------------------------------------ */
.identity-pass-state{display:flex;align-items:center;gap:9px}
.identity-pass-state>strong{display:inline-flex;align-items:center;min-height:30px;padding:0 10px;border:1px solid rgba(255,143,72,.25);border-radius:999px;background:rgba(255,102,31,.08);color:#ffad79;font:800 9px/1 'Unbounded',sans-serif;letter-spacing:.08em}
.profile-level-card{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:22px;margin:14px 0;padding:20px 22px;overflow:hidden;border:1px solid rgba(255,110,39,.2);border-radius:22px;background:radial-gradient(circle at 0 50%,rgba(255,92,24,.16),transparent 32%),linear-gradient(125deg,#12141a,#0a0c10 68%);box-shadow:0 20px 60px rgba(0,0,0,.22)}
.profile-level-card:after{content:"XP";position:absolute;right:18px;bottom:-34px;color:rgba(255,255,255,.025);font:900 112px/1 'Unbounded',sans-serif;pointer-events:none}
.profile-level-orb{width:88px;height:88px;display:grid;place-items:center;align-content:center;border:1px solid rgba(255,138,77,.34);border-radius:28px;background:linear-gradient(145deg,rgba(255,104,31,.22),rgba(255,104,31,.045));box-shadow:inset 0 0 30px rgba(255,100,20,.08),0 12px 28px rgba(0,0,0,.25)}
.profile-level-orb span{color:#ff9c62;font:900 9px/1 'Unbounded';letter-spacing:.14em}.profile-level-orb b{margin-top:7px;color:#fff;font:900 32px/1 'Unbounded'}
.profile-level-copy>small{color:#ff9254;font-size:9px;font-weight:900;letter-spacing:.14em}.profile-level-copy h2{margin:5px 0 7px;font-size:clamp(20px,2vw,29px)}.profile-level-copy p{max-width:720px;margin:0;color:#9ca2ad;font-size:11px;line-height:1.55}
.profile-level-progress{display:flex;align-items:center;gap:12px;margin-top:13px}.profile-level-progress>span{height:7px;flex:1;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.06)}.profile-level-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ff5c1c,#ffad62);box-shadow:0 0 20px rgba(255,103,30,.35)}.profile-level-progress>b{white-space:nowrap;color:#cdd1d8;font-size:9px}
.profile-level-facts{display:grid;grid-template-columns:repeat(3,76px);gap:7px;position:relative;z-index:1}.profile-level-facts span{min-height:68px;padding:10px;display:grid;align-content:center;border:1px solid rgba(255,255,255,.07);border-radius:14px;background:rgba(255,255,255,.025);text-align:center}.profile-level-facts b{font:800 18px/1 'Unbounded'}.profile-level-facts small{margin-top:6px;color:#8d94a0;font-size:8px;text-transform:uppercase}

.profile-level-chip{margin-left:auto;display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border:1px solid rgba(255,119,49,.26);border-radius:999px;background:rgba(255,104,31,.08);color:#ff9b60;font:800 8px/1 'Unbounded';letter-spacing:.08em;white-space:nowrap}
.profile-xp-mini{display:grid;gap:5px;margin:11px 0 3px}.profile-xp-mini>span{height:4px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.055)}.profile-xp-mini i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--card-accent,#ff671f),#ffae66)}.profile-xp-mini small{color:#737a86;font-size:8px}
.public-surface .profiles-lab-v4 .profile-directory-card{display:flex!important;flex-direction:column!important;min-height:430px!important}
.public-surface .profiles-lab-v4 .profile-directory-copy{display:flex!important;flex:1!important;flex-direction:column!important;padding-bottom:14px!important}
.public-surface .profiles-lab-v4 .profile-directory-stats{margin-top:auto!important}
.public-surface .profiles-lab-v4 .profile-directory-actions{margin-top:0!important}
.public-surface .profiles-lab-v4 .profile-directory-title-row{padding-right:0!important}
.public-surface .profiles-lab-v4 .profile-directory-title-row h2{font-size:clamp(19px,1.8vw,27px)!important}
.public-surface .profiles-lab-v4 .profile-role-pill{align-self:flex-start!important}
.public-surface .profiles-grid{align-items:stretch!important}

.public-profile-level{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.65fr) auto;align-items:center;gap:18px;margin:0 24px 24px;padding:18px;border:1px solid rgba(255,109,38,.18);border-radius:18px;background:linear-gradient(115deg,rgba(255,95,24,.085),rgba(255,255,255,.018))}.public-profile-level>div:first-child span{color:#ff9254;font:900 8px 'Unbounded';letter-spacing:.13em}.public-profile-level>div:first-child b{display:block;margin:4px 0;color:#fff;font-size:18px}.public-profile-level>div:first-child small{color:#8f96a1;font-size:9px}.public-profile-level-progress{display:grid;gap:7px}.public-profile-level-progress>span{height:7px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.06)}.public-profile-level-progress i{display:block;height:100%;background:linear-gradient(90deg,#ff5e1d,#ffa65d)}.public-profile-level-progress>b{font-size:9px;color:#a8adb7}.public-profile-level-meta{display:flex;gap:6px}.public-profile-level-meta span{min-width:60px;padding:9px;border-radius:12px;background:rgba(255,255,255,.025);text-align:center}.public-profile-level-meta b{display:block;font:800 14px 'Unbounded'}.public-profile-level-meta small{display:block;margin-top:3px;color:#777e89;font-size:7px;text-transform:uppercase}

/* ------------------------------------------------------------------
   Roulette v23: bank is the hero, track stays contained.
   ------------------------------------------------------------------ */
.public-surface .giveaway-public-grid-v5{grid-template-columns:minmax(0,1fr) minmax(300px,340px)!important;gap:16px!important;align-items:start!important}
.public-surface .giveaway-live-card{overflow:hidden!important}
.giveaway-jackpot-v23{position:relative;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:12px;margin:18px 0;padding:16px;border:1px solid rgba(255,102,31,.25);border-radius:20px;background:radial-gradient(circle at 8% 40%,rgba(255,95,24,.23),transparent 32%),linear-gradient(120deg,#121218,#090b10 70%);box-shadow:0 18px 50px rgba(255,76,12,.07),inset 0 1px 0 rgba(255,255,255,.04)}
.giveaway-jackpot-v23:after{content:"+25";position:absolute;right:36%;bottom:-28px;color:rgba(255,126,57,.035);font:900 112px/1 'Unbounded';pointer-events:none}
.giveaway-jackpot-main{position:relative;z-index:1;display:flex;flex-direction:column;justify-content:center;padding:14px}.giveaway-jackpot-main small{color:#ff9b5f;font-size:9px;font-weight:900;letter-spacing:.16em}.giveaway-jackpot-main>b{margin:7px 0 4px;color:#fff;font:900 clamp(46px,5vw,72px)/.95 'Unbounded';letter-spacing:-.07em;text-shadow:0 0 28px rgba(255,105,31,.15)}.giveaway-jackpot-main>span{color:#a7adb7;font-size:11px}.giveaway-jackpot-main>span i{margin-left:8px;color:#ff8c4a;font-style:normal;font-weight:800}
.giveaway-jackpot-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;z-index:1}.giveaway-jackpot-meta>span{display:flex;flex-direction:column;justify-content:center;min-height:108px;padding:14px;border:1px solid rgba(255,255,255,.07);border-radius:15px;background:rgba(255,255,255,.025)}.giveaway-jackpot-meta small{color:#767d89;font-size:8px;text-transform:uppercase;letter-spacing:.08em}.giveaway-jackpot-meta b{margin-top:7px;color:#fff;font-size:14px}.giveaway-jackpot-meta em{margin-top:5px;color:#7d8490;font-size:8px;font-style:normal}.giveaway-jackpot-meta .is-hot{border-color:rgba(90,234,158,.22);background:rgba(90,234,158,.045)}.giveaway-jackpot-meta .is-hot b{color:#6bedaa;font:900 24px 'Unbounded'}
.public-surface .giveaway-roulette{width:100%!important;max-width:100%!important;overflow:hidden!important;contain:layout paint!important}
.public-surface .giveaway-roulette-track{width:max-content!important;max-width:none!important;will-change:transform}
.public-surface .giveaway-stats-v23{grid-template-columns:repeat(2,minmax(0,1fr))!important}.public-surface .giveaway-stats-v23>div{min-height:88px!important}.public-surface .giveaway-stats-v23>div span{display:block;margin-top:5px;color:#767e8a;font-size:8px}
.giveaway-goal-progress{display:block;height:5px;margin-top:10px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.055)}.giveaway-goal-progress em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ff6120,#ffa15b)}.ticket-trigger-grid>div.done .giveaway-goal-progress em{background:linear-gradient(90deg,#39bf7a,#75f0ad)}
.giveaway-ticket-feed-v23 header>span{background:rgba(255,104,31,.12)!important;color:#ff9859!important;border-color:rgba(255,104,31,.18)!important}.giveaway-ticket-feed-list{display:grid}.giveaway-ticket-feed-list article{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 0;border-top:1px solid rgba(255,255,255,.055)}.giveaway-ticket-feed-list article:first-child{border-top:0}.giveaway-ticket-feed-list i{width:36px;height:36px;overflow:hidden;display:grid;place-items:center;border-radius:11px;background:#151923}.giveaway-ticket-feed-list i img,.giveaway-ticket-feed-list i video{width:100%;height:100%;object-fit:cover}.giveaway-ticket-feed-list b{display:block;font-size:10px}.giveaway-ticket-feed-list small{display:block;margin-top:3px;color:#737b87;font-size:7px}.giveaway-ticket-feed-list strong{color:#ff9557;font:800 10px 'Unbounded'}

/* ------------------------------------------------------------------
   Admin dashboard v23
   ------------------------------------------------------------------ */
.ops-deck-v23{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,.5fr);gap:12px;margin-bottom:12px}.ops-live-v23,.ops-pulse-v23{min-width:0;padding:20px;border:1px solid var(--v23-line);border-radius:22px;background:linear-gradient(145deg,#11141a,#090b0f)}.ops-live-v23{border-color:rgba(255,102,31,.18);background:radial-gradient(circle at 0 50%,rgba(255,95,24,.13),transparent 35%),linear-gradient(145deg,#11141a,#090b0f)}.ops-deck-v23 header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.ops-deck-v23 header small{color:#ff8f50;font-size:8px;font-weight:900;letter-spacing:.13em}.ops-deck-v23 header h2{margin-top:5px;font-size:20px}.ops-deck-v23 header a{color:#ff8e4f;font-size:9px;font-weight:800}.ops-live-bank{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:16px}.ops-live-bank>span,.ops-pulse-v23>div>span{padding:13px;border:1px solid rgba(255,255,255,.06);border-radius:14px;background:rgba(255,255,255,.022)}.ops-live-bank small,.ops-pulse-v23 small{display:block;color:#747b86;font-size:7px;text-transform:uppercase}.ops-live-bank b,.ops-pulse-v23 b{display:block;margin-top:5px;color:#fff;font:800 18px/1.15 'Unbounded'}.ops-live-bank span:first-child b{color:#ff8f50;font-size:27px}.ops-live-bank em{display:block;margin-top:5px;color:#737a85;font-size:7px;font-style:normal}.ops-pulse-v23>div{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:16px}.ops-pulse-v23 b{font-size:22px}
.ops-grid-v23{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}.ops-events-v23{grid-column:1/-1}.ops-list-v23>div:last-child{display:grid}.ops-list-v23>div:last-child>a,.ops-list-v23>div:last-child>div{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-top:1px solid rgba(255,255,255,.055);color:inherit;text-decoration:none}.ops-list-v23>div:last-child>:first-child{border-top:0}.ops-list-v23>div:last-child span{min-width:0}.ops-list-v23>div:last-child b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.ops-list-v23>div:last-child small{display:block;margin-top:4px;color:#747c88;font-size:8px;overflow-wrap:anywhere}.ops-list-v23>div:last-child em{flex:0 0 auto;color:#ff8e4f;font-size:8px;font-style:normal;font-weight:800}

/* ------------------------------------------------------------------
   Generic control/public responsive hardening.
   ------------------------------------------------------------------ */
@media(max-width:1260px){
  .public-surface .giveaway-public-grid-v5{grid-template-columns:minmax(0,1fr)!important}
  .public-surface .giveaway-side-column{position:static!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .ops-deck-v23{grid-template-columns:1fr}.ops-pulse-v23>div{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1000px){
  :root{--v23-page:calc(100vw - 28px)}
  .identity-app-shell{grid-template-columns:1fr!important;width:var(--v23-page)!important}
  .identity-sidebar{position:static!important;width:100%!important}
  .profile-level-card{grid-template-columns:auto minmax(0,1fr)}.profile-level-facts{grid-column:1/-1;grid-template-columns:repeat(3,1fr)}
  .public-profile-level{grid-template-columns:1fr 1fr}.public-profile-level-meta{grid-column:1/-1}
  .ops-live-bank{grid-template-columns:1fr 1fr}.ops-grid-v23{grid-template-columns:1fr}.ops-events-v23{grid-column:auto}
}
@media(max-width:760px){
  :root{--v23-page:calc(100vw - 20px)}
  .public-surface h1{font-size:clamp(31px,11vw,46px)}
  .public-surface .giveaway-page-head{align-items:flex-start!important}
  .public-surface .giveaway-page-head>div:first-child{width:100%}
  .giveaway-jackpot-v23{grid-template-columns:1fr;padding:11px}.giveaway-jackpot-main{padding:11px}.giveaway-jackpot-main>b{font-size:48px}.giveaway-jackpot-meta>span{min-height:88px}.giveaway-jackpot-v23:after{right:-10px}
  .public-surface .giveaway-side-column{grid-template-columns:1fr!important}
  .public-surface .giveaway-stats-v23{grid-template-columns:1fr 1fr!important}
  .profile-level-card{grid-template-columns:68px minmax(0,1fr);gap:13px;padding:15px}.profile-level-orb{width:68px;height:68px;border-radius:20px}.profile-level-orb b{font-size:25px}.profile-level-copy p{font-size:10px}.profile-level-facts{grid-template-columns:repeat(3,1fr)}
  .public-profile-level{grid-template-columns:1fr;margin:0 12px 16px;padding:14px}.public-profile-level-meta{grid-column:auto;display:grid;grid-template-columns:repeat(3,1fr)}
  .public-surface .profiles-grid{grid-template-columns:1fr!important}.public-surface .profiles-lab-v4 .profile-directory-card{min-height:0!important}
  .ops-live-bank{grid-template-columns:1fr 1fr}.ops-pulse-v23>div{grid-template-columns:1fr 1fr}
  .control-content{padding-left:14px!important;padding-right:14px!important}
}
@media(max-width:480px){
  :root{--v23-page:calc(100vw - 16px)}
  .giveaway-jackpot-meta{grid-template-columns:1fr}.giveaway-jackpot-main>b{font-size:42px}
  .public-surface .giveaway-stats-v23{grid-template-columns:1fr!important}
  .profile-level-card{grid-template-columns:1fr;text-align:left}.profile-level-orb{width:64px;height:64px}.profile-level-facts{grid-template-columns:repeat(3,1fr)}
  .profile-level-progress{align-items:flex-start;flex-direction:column}.profile-level-progress>span{width:100%;flex:none}
  .ops-live-bank{grid-template-columns:1fr}.ops-pulse-v23>div{grid-template-columns:1fr 1fr}
  .ops-deck-v23,.ops-grid-v23{gap:9px}.ops-live-v23,.ops-pulse-v23{padding:15px;border-radius:18px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.giveaway-roulette-track{animation:none!important}}
.control-surface .status-pill.channel-telegram{border-color:rgba(62,158,255,.25)!important;background:rgba(62,158,255,.08)!important;color:#8ac4ff!important}.control-surface .status-pill.channel-screen{border-color:rgba(88,225,157,.22)!important;background:rgba(88,225,157,.07)!important;color:#82e5b0!important}
