/* Slovra V6 Part 3.4 — solo spacing + Live Lesson/Race + Profile Center */
:root{
  --p34-rail:1120px;
  --p34-bg:#111214;
  --p34-card:#1b1d23;
  --p34-card2:#20232b;
  --p34-line:rgba(255,255,255,.10);
  --p34-text:#f7f8fb;
  --p34-muted:#a9b0bd;
}
body.light-mode,body.light{
  --p34-bg:#f4f5f8;
  --p34-card:#ffffff;
  --p34-card2:#f8f9fc;
  --p34-line:rgba(22,30,42,.10);
  --p34-text:#161a22;
  --p34-muted:#687181;
}

/* 1) SOLO GAMES — title card must breathe above setup/play on desktop. */
.solo-game-screen .solo-game-page>.mini-game-title-card{
  margin:0 0 26px!important;
}
.solo-game-screen .solo-game-page>.mini-game-title-card + .setup-card,
.solo-game-screen .solo-game-page>.mini-game-title-card + [id$="-play"],
.solo-game-screen .solo-game-page>.mini-game-title-card + .solo-result{
  margin-top:0!important;
}
.solo-game-screen .solo-game-page>.solo-game-hero{
  margin-bottom:24px!important;
}
.solo-game-screen .solo-game-page>.solo-game-hero + .setup-card,
.solo-game-screen .solo-game-page>.solo-game-hero + [id$="-play"],
.solo-game-screen .solo-game-page>.solo-game-hero + .solo-result{
  margin-top:0!important;
}

/* 2) LIVE LESSON / RACE — one coherent modern Slovra surface. */
#screen-live{
  --live-accent:#7d4dff;
  --live-cyan:#21c7df;
  --live-green:#4bd58b;
  box-sizing:border-box!important;
  padding-left:0!important;
  padding-right:0!important;
  background:
    radial-gradient(760px 460px at 8% 4%,rgba(124,77,255,.15),transparent 68%),
    radial-gradient(720px 420px at 96% 8%,rgba(33,199,223,.12),transparent 70%),
    transparent!important;
}
#screen-live>.game-header{
  width:min(calc(100% - 40px),var(--p34-rail))!important;
  max-width:var(--p34-rail)!important;
  min-height:62px!important;
  margin:12px auto 18px!important;
  padding:8px 12px!important;
  border:1px solid var(--p34-line)!important;
  border-radius:22px!important;
  background:color-mix(in srgb,var(--p34-card) 92%,transparent)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.12)!important;
  backdrop-filter:blur(18px)!important;
}
#screen-live>.game-header>div:first-child{
  width:44px!important;height:44px!important;display:grid!important;place-items:center!important;
  border:1px solid var(--p34-line)!important;border-radius:14px!important;background:var(--p34-card2)!important;
  font-size:0!important;
}
#screen-live>.game-header>div:first-child::before{content:"←";font:700 23px/1 Nunito,sans-serif;color:var(--p34-text)}
#screen-live .p34-live-header-title{display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;color:var(--p34-text)!important;font:900 17px/1 Nunito,sans-serif!important}
#screen-live .p34-live-header-title .slovra-icon{width:22px;height:22px;--icon-main:#7f65ff;--icon-accent:#24c8df;--icon-soft:rgba(127,101,255,.15)}

#screen-live #live-lobby-ui,
#screen-live #live-waiting-ui,
#screen-live #live-game-ui,
#screen-live #live-leaderboard-ui,
#screen-live #live-finished-ui{
  width:min(calc(100% - 40px),var(--p34-rail))!important;
  max-width:var(--p34-rail)!important;
  margin-left:auto!important;margin-right:auto!important;
}
#screen-live #live-lobby-ui{
  display:grid!important;grid-template-columns:1.05fr .95fr!important;gap:18px!important;
  padding:0 0 42px!important;text-align:left!important;align-items:stretch!important;
}
#screen-live .p34-live-hero{
  grid-column:1/-1!important;min-height:190px!important;padding:28px 30px!important;border-radius:30px!important;
  position:relative!important;overflow:hidden!important;
  background:
    radial-gradient(320px 210px at 89% 12%,rgba(255,255,255,.18),transparent 70%),
    linear-gradient(112deg,#7645ff 0%,#bb45d7 48%,#22b9d9 100%)!important;
  color:#fff!important;box-shadow:0 20px 48px rgba(94,66,220,.22)!important;
}
#screen-live .p34-live-hero::after{content:"";position:absolute;width:240px;height:240px;right:-40px;bottom:-125px;border-radius:50%;border:1px solid rgba(255,255,255,.18);box-shadow:0 0 0 30px rgba(255,255,255,.055),0 0 0 62px rgba(255,255,255,.035);pointer-events:none}
#screen-live .p34-live-kicker{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.20);font:900 10px/1 Nunito,sans-serif;letter-spacing:.11em}
#screen-live .p34-live-kicker .slovra-icon{width:16px;height:16px;--icon-main:#fff;--icon-accent:#fff;--icon-soft:rgba(255,255,255,.15)}
#screen-live .p34-live-hero h1{margin:16px 0 8px!important;max-width:650px;font:900 clamp(30px,4.2vw,54px)/.98 Nunito,sans-serif!important;letter-spacing:-1.4px!important}
#screen-live .p34-live-hero p{margin:0!important;max-width:720px;color:rgba(255,255,255,.90)!important;font:700 14px/1.45 Nunito,sans-serif!important}
#screen-live .p34-live-pills{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}
#screen-live .p34-live-pills span{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 11px;border-radius:999px;background:rgba(20,22,35,.20);border:1px solid rgba(255,255,255,.16);font:800 11px/1 Nunito,sans-serif}

#screen-live #teacher-controls,
#screen-live .live-join-box,
#screen-live .live-info-box,
#screen-live #live-waiting-ui,
#screen-live #live-leaderboard-ui,
#screen-live #live-finished-ui{
  border:1px solid var(--p34-line)!important;background:linear-gradient(180deg,var(--p34-card2),var(--p34-card))!important;color:var(--p34-text)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.10)!important;border-radius:26px!important;
}
#screen-live #teacher-controls{grid-column:1/-1!important;padding:24px 26px!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:14px 18px!important}
#screen-live #teacher-controls .teacher-header{grid-column:1/-1!important;text-align:left!important;margin:0 0 2px!important;display:flex!important;align-items:end!important;gap:12px!important}
#screen-live #teacher-controls .teacher-title{margin:0!important;color:var(--p34-text)!important;font:900 22px/1 Nunito,sans-serif!important;letter-spacing:-.3px!important}
#screen-live #teacher-controls .teacher-subtitle{margin:0 0 1px!important;color:var(--p34-muted)!important;font:700 11px/1.3 Nunito,sans-serif!important}
#screen-live #teacher-controls .teacher-separator{display:none!important}
#screen-live #teacher-controls>.input-field{margin:0!important;min-height:50px!important;border-radius:15px!important;background:var(--p34-card)!important;color:var(--p34-text)!important;border:1px solid var(--p34-line)!important;font:800 12px/1 Nunito,sans-serif!important}
#screen-live .live-room-settings{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:2px 0!important}
#screen-live .live-room-settings label{min-width:0!important;padding:12px!important;border-radius:17px!important;background:color-mix(in srgb,var(--p34-card2) 88%,#7d4dff 12%)!important;border:1px solid var(--p34-line)!important}
#screen-live .live-room-settings label>span{display:block!important;margin-bottom:7px!important;color:var(--p34-muted)!important;font:800 10px/1.25 Nunito,sans-serif!important}
#screen-live .live-room-settings .input-field{min-height:42px!important;border-radius:12px!important;background:var(--p34-card)!important;color:var(--p34-text)!important;border:1px solid var(--p34-line)!important}
#screen-live #live-create-room-btn{grid-column:1/-1!important;justify-self:end!important;width:min(100%,280px)!important;min-height:50px!important;margin:2px 0 0!important;border-radius:15px!important;box-shadow:none!important;background:linear-gradient(90deg,#7d4dff,#a846e7)!important}

#screen-live .live-join-box,#screen-live .live-info-box{min-height:300px!important;margin:0!important;padding:25px!important}
#screen-live .live-join-box{display:flex!important;flex-direction:column!important;justify-content:center!important;text-align:center!important;background:radial-gradient(240px 180px at 50% 0%,rgba(33,199,223,.12),transparent 72%),linear-gradient(180deg,var(--p34-card2),var(--p34-card))!important}
#screen-live .live-join-box h1{margin:0 0 10px!important;color:var(--p34-text)!important;font:900 26px/1 Nunito,sans-serif!important;letter-spacing:.02em!important}
#screen-live #live-pin-input{width:min(100%,390px)!important;min-height:70px!important;margin:6px auto 12px!important;border-radius:20px!important;background:var(--p34-bg)!important;color:var(--p34-text)!important;border:1px solid color-mix(in srgb,#21c7df 45%,var(--p34-line))!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)!important;font:900 30px/1 Nunito,sans-serif!important;letter-spacing:8px!important}
#screen-live #live-join-btn{width:min(100%,390px)!important;min-height:50px!important;margin:0 auto!important;border-radius:15px!important;background:linear-gradient(90deg,#19bed8,#5a8cff)!important;box-shadow:none!important}
#screen-live .live-info-box{display:flex!important;flex-direction:column!important;justify-content:center!important}
#screen-live .live-info-box h3{margin:0 0 15px!important;color:var(--p34-text)!important;font:900 20px/1 Nunito,sans-serif!important}
#screen-live .live-info-box .info-item{margin:0 0 9px!important;padding:11px 12px!important;border:1px solid var(--p34-line)!important;border-radius:16px!important;background:var(--p34-card2)!important;box-shadow:none!important}
#screen-live .live-info-box .info-icon{width:38px!important;height:38px!important;border-radius:12px!important;background:linear-gradient(135deg,rgba(125,77,255,.20),rgba(33,199,223,.18))!important;font-size:18px!important}
#screen-live .live-info-box .info-text strong{color:var(--p34-text)!important;font:900 12px/1.1 Nunito,sans-serif!important}
#screen-live .live-info-box .info-text span{color:var(--p34-muted)!important;font:700 10px/1.35 Nunito,sans-serif!important}

#screen-live #live-waiting-ui{padding:28px!important;text-align:center!important}
#screen-live #waiting-pin-display{margin:12px 0!important;color:#7f65ff!important;font:900 clamp(38px,6vw,64px)/1 Nunito,sans-serif!important;letter-spacing:.08em!important}
#screen-live #live-player-list,#screen-live #live-game-player-list{gap:9px!important}
#screen-live #live-player-list>div,#screen-live #live-game-player-list>div{border:1px solid var(--p34-line)!important;border-radius:14px!important;background:var(--p34-card2)!important;color:var(--p34-text)!important;box-shadow:none!important}
#screen-live #teacher-start-btn:not(.hidden){display:flex!important;justify-content:center!important;gap:10px!important;flex-wrap:wrap!important;margin:22px auto 8px!important}
#screen-live #teacher-start-btn button{min-height:48px!important;border-radius:14px!important;box-shadow:none!important}

#screen-live #live-game-ui{padding:0 0 44px!important;gap:14px!important}
#screen-live #live-timer-wrapper{position:relative!important;top:auto!important;margin:0!important;height:11px!important;border-radius:999px!important;overflow:visible!important;background:var(--p34-card2)!important;border:1px solid var(--p34-line)!important}
#screen-live #live-timer-bar{border-radius:999px!important;background:linear-gradient(90deg,#7d4dff,#21c7df,#4bd58b)!important}
#screen-live #live-timer-seconds{top:18px!important;right:0!important;color:var(--p34-muted)!important;background:var(--p34-card)!important;border:1px solid var(--p34-line)!important;border-radius:999px!important;padding:4px 7px!important}
#screen-live .live-header-bar{margin:18px 0 0!important;padding:13px 15px!important;border-radius:18px!important;background:var(--p34-card)!important;border:1px solid var(--p34-line)!important;color:var(--p34-text)!important;box-shadow:none!important}
#screen-live .live-self-stat,#screen-live .live-ans-badge{border:1px solid var(--p34-line)!important;border-radius:999px!important;background:var(--p34-card2)!important;color:var(--p34-text)!important}
#screen-live #live-q-text-container{min-height:190px!important;margin:0!important;padding:28px!important;border-radius:26px!important;background:radial-gradient(320px 180px at 50% -20%,rgba(125,77,255,.14),transparent 75%),var(--p34-card)!important;border:1px solid var(--p34-line)!important;box-shadow:none!important}
#screen-live #live-q-text{margin:0!important;color:var(--p34-text)!important;font:900 clamp(25px,3.4vw,40px)/1.15 Nunito,sans-serif!important;letter-spacing:-.5px!important}
#screen-live #live-text-input-area{max-width:760px!important;padding:0!important}
#screen-live #live-options-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:0!important}
#screen-live .live-opt-card{min-height:92px!important;border-radius:20px!important;border:1px solid var(--p34-line)!important;box-shadow:none!important;font-family:Nunito,sans-serif!important}
#screen-live #live-player-status-area{margin:0!important;padding:14px!important;border-radius:18px!important;background:var(--p34-card)!important;border:1px solid var(--p34-line)!important;box-shadow:none!important}
#screen-live .live-answer-feedback{border-radius:16px!important;font-family:Nunito,sans-serif!important}
#screen-live #live-leaderboard-ui,#screen-live #live-finished-ui{padding:30px!important}
#screen-live .podium-container{max-width:780px!important;margin-left:auto!important;margin-right:auto!important}

/* 3) PROFILE CENTER — modern wide dashboard, not a narrow legacy mobile stack. */
#screen-profile-v28.v28-screen{
  box-sizing:border-box!important;padding:0 0 110px!important;overflow-x:hidden!important;
  background:
    radial-gradient(700px 420px at 7% 2%,rgba(124,77,255,.11),transparent 70%),
    radial-gradient(700px 420px at 94% 8%,rgba(33,199,223,.10),transparent 70%),
    transparent!important;
}
#screen-profile-v28 .v28-topbar{
  width:min(calc(100% - 40px),var(--p34-rail))!important;max-width:var(--p34-rail)!important;
  min-height:62px!important;margin:12px auto 18px!important;padding:8px 10px!important;box-sizing:border-box!important;
  grid-template-columns:44px minmax(0,1fr) 44px!important;gap:10px!important;
  border:1px solid var(--p34-line)!important;border-radius:22px!important;background:color-mix(in srgb,var(--p34-card) 92%,transparent)!important;box-shadow:0 14px 38px rgba(0,0,0,.11)!important;backdrop-filter:blur(18px)!important;
}
#screen-profile-v28 .v28-topbar>button{width:44px!important;height:44px!important;border:1px solid var(--p34-line)!important;border-radius:14px!important;background:var(--p34-card2)!important;color:var(--p34-text)!important;box-shadow:none!important;display:grid!important;place-items:center!important}
#screen-profile-v28 .v28-topbar>button .slovra-icon{width:20px;height:20px;--icon-main:var(--p34-text);--icon-accent:#7d65ff;--icon-soft:rgba(125,101,255,.10)}
#screen-profile-v28 .v28-topbar>div{text-align:center!important}
#screen-profile-v28 .v28-topbar span{color:#7f65ff!important;font:900 8px/1 Nunito,sans-serif!important;letter-spacing:.16em!important}
#screen-profile-v28 .v28-topbar strong{margin-top:4px!important;color:var(--p34-text)!important;font:900 16px/1 Nunito,sans-serif!important}

#screen-profile-v28 .v28-shell{
  width:min(calc(100% - 40px),var(--p34-rail))!important;max-width:var(--p34-rail)!important;margin:0 auto!important;
  display:grid!important;grid-template-columns:1.08fr .92fr!important;gap:16px!important;
}
#screen-profile-v28 .v28-profile-hero,
#screen-profile-v28 .v28-section{border:1px solid var(--p34-line)!important;background:linear-gradient(180deg,var(--p34-card2),var(--p34-card))!important;color:var(--p34-text)!important;box-shadow:0 14px 36px rgba(0,0,0,.09)!important}
#screen-profile-v28 .v28-profile-hero{
  grid-column:1/-1!important;min-height:230px!important;padding:26px 28px!important;border:0!important;border-radius:30px!important;
  display:grid!important;grid-template-columns:auto minmax(0,1fr) minmax(260px,.72fr)!important;gap:22px!important;align-items:center!important;
  background:
    radial-gradient(300px 200px at 90% 0%,rgba(255,255,255,.20),transparent 72%),
    linear-gradient(112deg,#6f43ff 0%,#c245d0 48%,#22b8d4 100%)!important;color:#fff!important;box-shadow:0 20px 48px rgba(91,67,220,.22)!important;
}
#screen-profile-v28 .v28-profile-hero::before{width:260px!important;height:260px!important;right:-80px!important;top:-120px!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.12)!important}
#screen-profile-v28 .v28-avatar{width:92px!important;height:92px!important;padding:4px!important;border-radius:30px!important;background:rgba(255,255,255,.22)!important;border:1px solid rgba(255,255,255,.28)!important;box-shadow:0 14px 30px rgba(0,0,0,.18)!important}
#screen-profile-v28 .v28-avatar span,#screen-profile-v28 .v28-avatar img{width:100%!important;height:100%!important;border-radius:26px!important;object-fit:cover!important;background:rgba(20,22,35,.28)!important;color:#fff!important;display:grid!important;place-items:center!important;font:900 34px/1 Nunito,sans-serif!important}
#screen-profile-v28 .v28-name-row h1{color:#fff!important;font:900 clamp(26px,3.4vw,42px)/1 Nunito,sans-serif!important;letter-spacing:-.8px!important}
#screen-profile-v28 .v28-role-chip{padding:6px 9px!important;background:rgba(255,255,255,.17)!important;border:1px solid rgba(255,255,255,.20)!important;color:#fff!important;font-size:9px!important}
#screen-profile-v28 .v28-hero-main p{max-width:520px!important;margin:9px 0 12px!important;color:rgba(255,255,255,.88)!important;font:700 12px/1.45 Nunito,sans-serif!important}
#screen-profile-v28 .v28-meta-row{gap:7px!important}
#screen-profile-v28 .v28-meta-row span{padding:6px 9px!important;background:rgba(17,18,25,.18)!important;border:1px solid rgba(255,255,255,.16)!important;color:#fff!important;font-size:9px!important}
#screen-profile-v28 .v28-rank-card{grid-column:auto!important;padding:16px!important;border-radius:20px!important;background:rgba(17,18,27,.20)!important;border:1px solid rgba(255,255,255,.18)!important;color:#fff!important;backdrop-filter:blur(9px)!important}
#screen-profile-v28 .v28-rank-top small,#screen-profile-v28 .v28-rank-foot span{color:rgba(255,255,255,.70)!important}
#screen-profile-v28 .v28-rank-track{height:9px!important;background:rgba(255,255,255,.18)!important}
#screen-profile-v28 .v28-rank-track i{background:linear-gradient(90deg,#ffe666,#77f0d2)!important}

#screen-profile-v28 .v28-section{padding:22px!important;border-radius:24px!important;min-width:0!important}
#screen-profile-v28 .v28-summary-section{grid-column:1/2!important}
#screen-profile-v28 .v28-rhythm-section{grid-column:2/3!important}
#screen-profile-v28 .v28-achievement-section,#screen-profile-v28 .v28-profile-actions,#screen-profile-v28 .v28-note{grid-column:1/-1!important}
#screen-profile-v28 .v28-section-head{margin-bottom:15px!important;align-items:center!important}
#screen-profile-v28 .v28-section-head span{color:#8f79ff!important;font:900 8px/1 Nunito,sans-serif!important;letter-spacing:.15em!important}
#screen-profile-v28 .v28-section-head h2{margin-top:4px!important;color:var(--p34-text)!important;font:900 19px/1.1 Nunito,sans-serif!important}
#screen-profile-v28 .v28-section-head>strong,#screen-profile-v28 .v28-section-head button{padding:8px 10px!important;border-radius:12px!important;background:var(--p34-card2)!important;border:1px solid var(--p34-line)!important;color:var(--p34-text)!important;font:800 9px/1 Nunito,sans-serif!important}
#screen-profile-v28 .v28-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
#screen-profile-v28 .v28-stat-card{min-height:74px!important;padding:12px!important;border-radius:17px!important;background:var(--p34-card2)!important;border:1px solid var(--p34-line)!important;grid-template-columns:40px 1fr!important;gap:10px!important}
#screen-profile-v28 .v28-stat-card>span{width:40px!important;height:40px!important;border-radius:13px!important;background:linear-gradient(135deg,rgba(125,77,255,.15),rgba(33,199,223,.12))!important;font-size:19px!important}
#screen-profile-v28 .v28-stat-card small,#screen-profile-v28 .v28-stat-card em{color:var(--p34-muted)!important;font-size:8px!important}
#screen-profile-v28 .v28-stat-card strong{color:var(--p34-text)!important;font-size:15px!important}
#screen-profile-v28 .v28-heatmap{gap:7px!important}
#screen-profile-v28 .v28-day{border-radius:7px!important;border-color:var(--p34-line)!important;min-height:22px!important}
#screen-profile-v28 .v28-achievement-tabs{gap:7px!important;padding-bottom:12px!important}
#screen-profile-v28 .v28-achievement-tabs button{padding:8px 11px!important;background:var(--p34-card2)!important;border-color:var(--p34-line)!important;color:var(--p34-muted)!important;font:800 9px/1 Nunito,sans-serif!important}
#screen-profile-v28 .v28-achievement-tabs button.is-active{background:linear-gradient(90deg,#7d4dff,#a846e7)!important;border-color:transparent!important;color:#fff!important}
#screen-profile-v28 .v28-achievement-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
#screen-profile-v28 .v28-achievement{min-height:98px!important;padding:12px!important;border-radius:17px!important;background:var(--p34-card2)!important;border-color:var(--p34-line)!important;grid-template-columns:42px minmax(0,1fr) auto!important}
#screen-profile-v28 .v28-ach-icon{width:42px!important;height:42px!important;border-radius:13px!important;background:linear-gradient(135deg,rgba(125,77,255,.15),rgba(33,199,223,.12))!important}
#screen-profile-v28 .v28-ach-copy strong{color:var(--p34-text)!important;font-size:10px!important}
#screen-profile-v28 .v28-ach-copy small,#screen-profile-v28 .v28-ach-copy em{color:var(--p34-muted)!important}
#screen-profile-v28 .v28-profile-actions{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
#screen-profile-v28 .v28-profile-actions button,#screen-profile-v28 .v28-profile-actions button:last-child{grid-column:auto!important;min-height:54px!important;border-radius:17px!important;border:1px solid var(--p34-line)!important;background:var(--p34-card)!important;color:var(--p34-text)!important;font:900 10px/1 Nunito,sans-serif!important;box-shadow:0 10px 26px rgba(0,0,0,.07)!important}
#screen-profile-v28 .v28-note{padding:6px 10px!important;color:var(--p34-muted)!important;font-size:9px!important}

/* Keep colored hero in light mode instead of flattening it to white. */
body.light-mode #screen-profile-v28 .v28-profile-hero,body.light #screen-profile-v28 .v28-profile-hero{background:radial-gradient(300px 200px at 90% 0%,rgba(255,255,255,.25),transparent 72%),linear-gradient(112deg,#7650ff 0%,#cf56ca 48%,#2bbbd4 100%)!important;color:#fff!important;border:0!important}
body.light-mode #screen-profile-v28 .v28-name-row h1,body.light #screen-profile-v28 .v28-name-row h1,
body.light-mode #screen-profile-v28 .v28-role-chip,body.light #screen-profile-v28 .v28-role-chip,
body.light-mode #screen-profile-v28 .v28-meta-row span,body.light #screen-profile-v28 .v28-meta-row span,
body.light-mode #screen-profile-v28 .v28-rank-card,body.light #screen-profile-v28 .v28-rank-card{color:#fff!important}

@media(max-width:959px){
  .solo-game-screen .solo-game-page>.mini-game-title-card{margin-bottom:18px!important}
  .solo-game-screen .solo-game-page>.solo-game-hero{margin-bottom:18px!important}
  #screen-live>.game-header,#screen-profile-v28 .v28-topbar{width:calc(100% - 24px)!important;margin-top:8px!important;margin-bottom:12px!important}
  #screen-live #live-lobby-ui,#screen-live #live-waiting-ui,#screen-live #live-game-ui,#screen-live #live-leaderboard-ui,#screen-live #live-finished-ui,#screen-profile-v28 .v28-shell{width:calc(100% - 24px)!important;max-width:none!important}
  #screen-live #live-lobby-ui{display:block!important}
  #screen-live .p34-live-hero{min-height:0!important;padding:22px 20px!important;margin-bottom:12px!important;border-radius:24px!important}
  #screen-live .p34-live-hero h1{font-size:34px!important}
  #screen-live #teacher-controls{display:block!important;padding:19px!important;margin-bottom:12px!important}
  #screen-live #teacher-controls>.input-field{margin-bottom:10px!important;width:100%!important}
  #screen-live .live-room-settings{grid-template-columns:1fr 1fr!important;margin:5px 0 11px!important}
  #screen-live #live-create-room-btn{width:100%!important;justify-self:stretch!important}
  #screen-live .live-join-box,#screen-live .live-info-box{min-height:0!important;margin-bottom:12px!important;padding:20px!important}
  #screen-live #live-options-grid{grid-template-columns:1fr!important}
  #screen-profile-v28 .v28-shell{grid-template-columns:1fr!important;gap:12px!important}
  #screen-profile-v28 .v28-profile-hero{grid-template-columns:auto minmax(0,1fr)!important;min-height:0!important;padding:20px!important;border-radius:24px!important}
  #screen-profile-v28 .v28-rank-card{grid-column:1/-1!important}
  #screen-profile-v28 .v28-summary-section,#screen-profile-v28 .v28-rhythm-section,#screen-profile-v28 .v28-achievement-section,#screen-profile-v28 .v28-profile-actions,#screen-profile-v28 .v28-note{grid-column:1!important}
  #screen-profile-v28 .v28-achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:560px){
  .solo-game-screen .solo-game-page>.mini-game-title-card{margin-bottom:14px!important}
  .solo-game-screen .solo-game-page>.solo-game-hero{margin-bottom:14px!important}
  #screen-live>.game-header,#screen-profile-v28 .v28-topbar{width:calc(100% - 20px)!important}
  #screen-live #live-lobby-ui,#screen-live #live-waiting-ui,#screen-live #live-game-ui,#screen-live #live-leaderboard-ui,#screen-live #live-finished-ui,#screen-profile-v28 .v28-shell{width:calc(100% - 20px)!important}
  #screen-live .p34-live-hero{padding:19px 17px!important;border-radius:22px!important}
  #screen-live .p34-live-hero h1{font-size:29px!important;letter-spacing:-.8px!important}
  #screen-live .p34-live-hero p{font-size:12px!important}
  #screen-live .p34-live-pills{gap:6px;margin-top:14px!important}
  #screen-live .p34-live-pills span{min-height:30px;padding:0 8px;font-size:9px}
  #screen-live .live-room-settings{grid-template-columns:1fr!important}
  #screen-live #live-q-text-container{min-height:135px!important;padding:20px!important}
  #screen-live #live-q-text{font-size:26px!important}
  #screen-profile-v28 .v28-profile-hero{grid-template-columns:1fr!important;text-align:left!important;padding:18px!important}
  #screen-profile-v28 .v28-avatar{width:74px!important;height:74px!important;border-radius:24px!important}
  #screen-profile-v28 .v28-avatar span,#screen-profile-v28 .v28-avatar img{border-radius:21px!important;font-size:28px!important}
  #screen-profile-v28 .v28-rank-card{grid-column:1!important}
  #screen-profile-v28 .v28-section{padding:16px!important;border-radius:20px!important}
  #screen-profile-v28 .v28-stat-grid{grid-template-columns:1fr 1fr!important;gap:7px!important}
  #screen-profile-v28 .v28-stat-card{min-height:68px!important;padding:9px!important;grid-template-columns:34px 1fr!important}
  #screen-profile-v28 .v28-stat-card>span{width:34px!important;height:34px!important}
  #screen-profile-v28 .v28-achievement-grid{grid-template-columns:1fr!important}
  #screen-profile-v28 .v28-profile-actions{grid-template-columns:1fr!important}
}
/* Hidden state must win over high-specificity layout rules. */
#screen-live #live-lobby-ui.hidden,
#screen-live #live-waiting-ui.hidden,
#screen-live #live-game-ui.hidden,
#screen-live #live-leaderboard-ui.hidden,
#screen-live #live-finished-ui.hidden,
#screen-live #teacher-controls.hidden,
#screen-live #teacher-start-btn.hidden,
#screen-live #teacher-next-q-btn.hidden,
#screen-live #student-wait-msg.hidden{display:none!important}
