/* Visual layer of the Arena. Layout, permissions and game rules remain shared. */
.arena-app {
  color-scheme: dark;
  --ink: #e8f2fa;
  --muted: #a3b5c8;
  --teal: #75ddf1;
  --line: #2a3b51;
  --gold: #edc77f;
  --surface: #111f30;
  background: radial-gradient(ellipse at 85% 0, #24325555, transparent 42%), #0b1422;
  color: var(--ink);
}
.arena-app h1, .arena-app h2, .arena-app h3, .goal-value {
  font-family: Bahnschrift, "Segoe UI", Arial, sans-serif;
}
.arena-app :is(button,a,input,select,summary):focus-visible { outline-color: #f4ce84; }
.arena-app :is(.goal-value,.xp-heading,.rank-value,.mission-stat,.coach-number) { font-variant-numeric: tabular-nums; }
.arena-sidebar {
  background: radial-gradient(ellipse at 0 0, #17435988, transparent 55%), #0b1624;
  border-right-color: #29394e;
}
.arena-sidebar .arena-brand { width:100%; }
.arena-sidebar .arena-logo { width:128px;max-width:100%; }
.arena-sidebar .nav-caption { margin-top:30px; }
.nav-caption { color: #8ca8c0; }
.arena-nav a { color: #b0c3d6; border-radius: 12px; transition: background .18s, color .18s; }
.arena-nav a:hover { background: #192b40; }
.arena-nav a[aria-current=page] {
  color: #b4f1ff; background: linear-gradient(100deg, #194256, #132b40);
  border-color: #36667a; box-shadow: inset 3px 0 #80e0f3, 0 8px 22px #0002;
}
.arena-nav a[aria-current=page] svg { filter: drop-shadow(0 0 5px #70d9ff55); }
.sidebar-footer { color: #a0bad0; }
.sidebar-glyph { color: var(--gold); }
.sidebar-footer a, .sidebar-footer p { color: #a9c1d4; }
.workspace-header { background: #0d1929d9; border-color: #26364c; min-height: 76px; padding:12px 32px; }
.season-control label, .header-player small { color: #9eb4c9; }
.season-control input, .season-control button, .quiet-button {
  background: #142337; border-color: #32465e; color: #d9e9f5;
}
.season-control button:hover, .quiet-button:hover { background: #20364d; }
.header-player .avatar { background: #233a51; color: #9ee8fa; border: 1px solid #355a70; }
.screen-heading h1 { font-size: 35px; letter-spacing: -.8px; color: #f1f7ff; }
.eyebrow { color: #9fc4d9; letter-spacing: 1.8px; }
.screen-heading .eyebrow { color: #78d5ec; }
.screen-description, .statusline { color: #9eb2c9; }
.days-left { background: #142337; border-color: #31475c; color: #c0d2e1; }
.days-left::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #85d8ed; margin-right: 8px; box-shadow: 0 0 9px #85d8ed55; }
.coverage-info summary { color: #efc47f; }
.coverage-info p { background: #30271b; border-color: #887044; color: #f6dbab; box-shadow: 0 12px 30px #0006; }
.notice { background: #30271b; border-color: #887044; color: #f6dbab; }
.error { background: #361f29; border-color: #a06371; color: #ffd0d6; }
.loading { background: #132236; border-color: #3e536c; }
.profile { background: #132135; border-color: #2a3d55; padding: 11px 13px; }
.profile:hover { background: #1b3047; }
.profile small { color: #a8bace; }
.profile[aria-pressed=true] { background: linear-gradient(120deg,#17374a,#182a42); border-color: #5da8bf; box-shadow: inset 0 0 0 1px #5da8bf33; }
.avatar { background: #21384d; color: #b5e9f7; }
.game-hero {
  grid-template-columns: 180px minmax(0,1fr) minmax(235px,.9fr);
  min-height: 280px; padding: 24px; gap: 24px; border-radius: 24px; border-color: #39536d;
  background: radial-gradient(ellipse at 12% 70%,#1f627a99,transparent 47%),
    radial-gradient(ellipse at 70% 0,#63589c55,transparent 65%), linear-gradient(115deg,#142a40,#172239 70%,#1a2940);
  box-shadow: 0 22px 45px #030a152e, inset 0 1px #a0d8ff14;
}
.game-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background: repeating-linear-gradient(120deg, transparent 0 77px, #a4dbff26 78px, transparent 79px 155px);
  mask-image: linear-gradient(to right,#000,transparent 65%);
}
.game-hero::after { content: ""; position: absolute; width: 320px; height: 320px; border: 1px solid #83c7e320; border-radius: 50%; left: -64px; top: -135px; pointer-events: none; }
.game-hero > * { position: relative; z-index: 1; }
.character { padding: 14px 3px 0; }
.character-orbit { border: 1px solid #7bc9ea66; background: radial-gradient(circle,#50b7d538,transparent 67%); border-radius: 28% 28% 38% 38%; box-shadow: inset 0 0 45px #63c8e710, 0 0 35px #76dfff10; }
.character-orbit::before { content: ""; position: absolute; inset: 12px -11px -5px; border: 1px solid #77c5e12e; border-radius: 28% 28% 38% 38%; transform: rotate(-7deg); }
.character-orbit::after { inset: auto 12% -7px; height: 13px; border: 0; background: #66dded; opacity: .4; filter: blur(12px); }
.character-orbit .avatar { width: 119%; height: 119%; transform: translateY(-7px); }
.character-orbit img { filter: drop-shadow(0 15px 13px #020e2566); }
.character-level { position: absolute; right: -4px; bottom: 4px; z-index: 2; display: grid; place-items: center; width: 42px; height: 45px; color: #302315; background: linear-gradient(135deg,#ffde9e,#d8a958); clip-path: polygon(50% 0,95% 20%,95% 72%,50% 100%,5% 72%,5% 20%); font-size: 18px; font-weight: 800; }
.character-class { color: #badbe9; letter-spacing: 1.8px; margin-top: 20px; font-size: 9px; }
.character-info h2 { font-size: 40px; letter-spacing: -1px; margin: 8px 0 10px; }
.character-info .eyebrow { color: #9ce4f7; font-size: 10px; letter-spacing: 1.5px; }
.level-title { color: #cfdaef; font-size: 14px; }
.level-title > span { color: #f1d59b; background: #f3c97a12; border-color: #c1a56866; }
.xp-heading { margin-top: 16px; }
.xp-heading strong { color: #f4d99c; font-size: 23px; }
.xp-heading > span { color: #bfd0e6; }
.game-note { color: #b4c8db; }
.progress-track { height: 9px; background: #07122166; border: 1px solid #b8e0ff12; }
.progress-fill { background: linear-gradient(90deg,#329bbb,#8bebf0); box-shadow: 0 0 12px #72e5f855; }
.next-objective { border-color: #a4bdd22b; border-radius: 17px; padding: 19px; background: linear-gradient(140deg,#ffffff09,#0b182a55); box-shadow: inset 0 1px #ffffff08; }
.next-objective .eyebrow { color: #bbcee2; font-size: 9px; }
.next-objective h3 { font-size: 24px; margin: 12px 0; }
.next-objective p { color: #bdcde0; font-size: 13px; }
.xp-reward { color: #f4d292; font-size: 12px; margin-top: 7px; }
.arena-app .game-button { background: linear-gradient(110deg,#a7eaf4,#71cee6); color: #112b3e; border: 1px solid #b0f1fa; box-shadow: 0 5px 18px #69cde51a; border-radius: 10px; }
.arena-app .game-button:hover { background: #c3f5fc; box-shadow: 0 5px 22px #69cde535; }
.panel, .goal-card, .management-group { background: linear-gradient(145deg,#152438,#111e30); border-color: #2b3d54; border-radius: 19px; box-shadow: 0 10px 25px #040b171c, inset 0 1px #ffffff04; }
.section-heading h2, .goal-card h2 { color: #eaf4ff; }
.pill { background: #24354a; border-color: #3b5068; color: #c5d7e7; border-radius: 7px; }
.pill.gold { background: #322d27; border-color: #7c6949; color: #f1d59b; }
.pill.won { background: #153c38; border-color: #3d8174; color: #a9efcf; }
.mission { border-top: 1px solid #4d8196; position: relative; overflow: hidden; }
.mission::before { content: ""; height: 3px; width: 85px; position: absolute; top: 0; left: 25px; background: linear-gradient(90deg,#85e2f3,#688dce); border-radius: 0 0 5px 5px; }
.mission h2 { font-size: 26px; }
.mission-stat strong, .coach-number { color: #86dcef; }
.mission .progress-track, .goal-card .progress-track { background: #091523; }
.mission .progress-fill, .goal-card .progress-fill { background: linear-gradient(90deg,#368eae,#7edce9); }
.action-tip { background: #0c1b2c; border: 1px solid #2b475e; border-left: 3px solid #71cbdf; color: #bad2e5; border-radius: 9px; }
.action-tip b { color: #8cdeef; }
.primary { background: #21465c; border-color: #50829c; color: #dcf7ff; border-radius: 9px; }
.primary:hover { background: #2b5b73; }
.secondary-link { color: #8fd6ea; }
.goal-value { color: #f1f7ff; font-size: 37px; }
.goal-card .eyebrow { color: #adc1de; }
.goal-foot { border-color: #2c4159; }
.super-target { background: linear-gradient(100deg,#372e23,#292a2a); border-color: #74613d; color: #f0d29a; border-radius: 8px; padding: 8px 11px; }
.campaign-map { background: radial-gradient(ellipse at 50% 20%,#273b5e88,transparent 75%),#111f31; overflow: hidden; }
.campaign-map .section-heading { padding-bottom: 4px; }
.stage-map { gap: 12px; margin: 30px 0; }
.stage { padding: 22px 10px 18px; gap: 8px; color: #afc2d8; border-color: #2a3e58; background: #101e30; border-radius: 15px; }
.stage:hover { background: #1c3048; border-color: #567a96; }
.stage[aria-pressed=true] { background: linear-gradient(155deg,#204157,#1b2d47); border-color: #82c6db; box-shadow: 0 0 0 1px #82c6db22, 0 8px 28px #0003; }
.stage-node { width: 60px; height: 64px; background: linear-gradient(135deg,#354860,#17263b); border: 0; color: #9aadc6; border-radius: 0; clip-path: polygon(50% 0,94% 22%,94% 75%,50% 100%,6% 75%,6% 22%); margin-bottom: 8px; }
.stage-node svg { width: 29px; height: 29px; }
.stage::before { top: 54px; background: #4f718b; left: -14px; right: calc(100% - 1px); }
.stage.won .stage-node { background: linear-gradient(135deg,#f8dfa6,#c69b51); color: #49331b; }
.stage.current .stage-node { background: linear-gradient(135deg,#a4f1fa,#4c9fc3); color: #123b53; box-shadow: none; }
.stage b { color: #efd29b; background: #d6b9760e; border: 1px solid #b2976740; border-radius: 6px; padding: 3px 8px; }
.stage small { color: #b4c5da; font-size: 9px; }
.stage.won small { color: #f3d49b; }
.stage.current small { color: #a0ebf7; }
.stage-detail { background: #172c42; border-color: #365571; color: #d0e3f3; border-radius: 12px; padding: 19px; }
.stage-detail > span { color: #edce90; }
.xp-history summary { color: #bed6e8; }
.xp-history li b { color: #f2d399; }
.badge { background: linear-gradient(130deg,#3a3026,#242a34); border-color: #7e6844; color: #f1d9a9; padding: 18px 22px; }
.badge i { width: 42px; height: 44px; display: grid; place-items: center; border: 1px solid #c5a26877; border-radius: 12px; color: #ffe0a4; background: #e2b75f12; }
.badge.locked { background: #16273a; border-color: #354a63; color: #b4c6dc; }
.badge.locked i { color: #abc2db; border-color: #50647e; background: #263c53; }
.history span { background: #14263b; color: #bacde1; }
.collective { background: radial-gradient(ellipse at 0 50%,#41637366,transparent 75%),linear-gradient(120deg,#172d40,#232b43); border-color: #4d667d; border-radius: 19px; }
.collective-icon { color: #f0d29a; background: #c9ac6d12; border-color: #a48d6066; }
.collective p { color: #b5c9dc; }
.switch { background: #0b1829; border-color: #31475e; }
.switch button { color: #b8cce0; }
.switch button[aria-pressed=true] { background: #254b62; color: #dff8ff; box-shadow: inset 0 1px #b6eeff22; }
.ranking li { padding: 20px 15px; border-color: #293e56; border-radius: 10px; }
.ranking li:first-child:not(.rank-empty) { background: linear-gradient(100deg,#c3a36916,#c3a36904); border: 1px solid #98804f55; margin-bottom: 7px; }
.rank-number { color: #aac0d5; }
.ranking li:first-child .rank-number { color: #edcf93; }
.rank-value { color: #94dff1; }
.rank-empty { background: #0d1b2c; }
.coach-card { background: #102034; border-color: #304660; }
.management-group > summary::marker { color: #83d9ed; }
.management label { color: #bfd1e2; }
.management input, .management select { background: #0a192b; border-color: #49627d; color: #e5f1fb; }
.management input:focus, .management select:focus { border-color: #8ddbeb; }
.arena-footer { color: #92a8bf; }
/* Layout audit: prioritize the weekly action and keep small screens usable. */
html { scroll-padding-block:20px 110px; }
.arena-app main { padding:22px 32px 18px; }
.screen-heading h1 { margin-bottom:5px; }
.screen-heading .eyebrow { margin-bottom:5px; font-size:11px; }
.statusline { margin:10px 0 16px; font-size:11px; }
.days-left, .goal-foot span, .profile small, .header-player small { font-size:11px; }
.roster-heading { margin-bottom:8px; }
.profile { padding:8px 10px; }
.roster { margin-bottom:16px; }
.mobile-arena-brand, .journey-picker { display:none; }
.ranking-method summary { display:flex; align-items:center; min-height:44px; font-size:12px; color:#bad4e8; cursor:pointer; }
.ranking-method summary::before { content:'+'; margin-right:9px; font-size:18px; }
.ranking-method[open] summary::before { content:'−'; }
.ranking-method summary::-webkit-details-marker { display:none; }
.ranking-method p { margin:0 0 12px; }
.ranking { margin-top:8px; }
.stage strong, .rank-name { font-size:13px; }
.stage>span:not(.stage-node), .rank-name small, .mission-stat small { font-size:12px; }
.stage small, .stage b, .mission-top .eyebrow, .action-tip b { font-size:11px; }
.mission-top { flex-wrap:wrap; }
.mission-stat { flex-wrap:wrap; gap:16px 22px; }
.mission-stat>div { min-width:0; }
.goal-foot strong, .mission-stat strong, .rank-value { overflow-wrap:anywhere; }
.stage-detail, .coach-card, .ranking li { min-width:0; }
.stage-detail>div, .rank-player, .rank-name { min-width:0; }
.rank-name { overflow-wrap:anywhere; }
.arena-app :is(input,select,summary,button) { scroll-margin-block:20px 110px; }
#weeklyMission { scroll-margin-top:20px; }
@media(min-width:901px) {
  .arena-sidebar { overflow-y:auto; }
  .arena-nav, .sidebar-footer, .arena-sidebar>.arena-brand { flex-shrink:0; }
}
@media(min-width:1600px) { .game-hero { grid-template-columns:200px minmax(0,1fr) minmax(260px,.9fr); } }
@media(max-width:1150px) {
  .arena-app main { padding:22px 24px 18px; }
  .game-hero { grid-template-columns:140px minmax(0,1fr) 220px; padding:22px; gap:20px; }
  .next-objective { grid-column:auto; display:flex; padding:17px; }
  .next-objective .game-button { margin-top:12px; }
  .next-objective h3 { font-size:21px; margin:7px 0; }
  .character-info h2 { font-size:34px; }
  .xp-heading { display:block; }
  .xp-heading>span { display:block; margin-top:3px; }
  .game-note { font-size:11px; }
  .stage { padding: 18px 5px; }
  .stage-node { width: 49px; height: 54px; }
}
@media(max-width:900px) {
  .arena-sidebar { padding:0; border:0; }
  .arena-sidebar>.arena-brand { display:none; }
  .mobile-arena-brand { display:flex; align-items:center; gap:7px; min-height:44px; text-decoration:none; flex:none; }
  .mobile-arena-brand .arena-logo { width:78px;height:auto; }
  .arena-nav { background: #0c1b2df5; border-color: #38536b; box-shadow: 0 -5px 25px #02081266; backdrop-filter: blur(14px); }
  .arena-nav a { font-size:10px; }
  .arena-workspace { padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
  .arena-nav a[aria-current=page] { box-shadow: inset 0 -2px #81dbee; }
  .workspace-header { min-height:68px; padding:10px 24px; gap:14px; }
  .game-hero { grid-template-columns:130px minmax(0,1fr) 220px; }
  .journey-picker { display:flex; gap:14px; align-items:center; font-size:12px; color:#bcd1e3; }
  .journey-picker select { min-height:44px; flex:1; min-width:0; background:#142a40; border:1px solid #52738f; color:#e9f5ff; padding:9px 12px; border-radius:9px; font:inherit; }
  #rosterHeading, #profiles { display:none; }
}
@media(max-width:760px) {
  .screen-heading h1 { font-size:30px; }
  .game-hero { grid-template-columns:110px minmax(0,1fr); min-height:0; padding:20px; gap:16px 22px; }
  .character-info h2 { font-size:32px; margin:6px 0; }
  .character { padding-top:6px; }
  .character-class { display:none; }
  .character-level { width:32px; height:36px; font-size:15px; }
  .game-hero[data-confirmed=true] .game-note { display:none; }
  .xp-heading { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; margin-top:12px; }
  .xp-heading strong { font-size:21px; }
  .xp-heading>span { font-size:11px; margin:0; }
  .next-objective { grid-column:1/-1; display:grid; grid-template-columns:1fr auto; gap:4px 18px; padding:16px; }
  .next-objective .game-button { margin:0; }
  .next-objective h3 { font-size:21px; }
  .next-objective .eyebrow { font-size:10px; }
  .next-objective p { font-size:12px; margin:0; }
  .next-objective .xp-reward { margin-top:4px; }
  .journey-grid { grid-template-columns:1fr; }
}
@media(max-width:700px) {
  .stage-map { gap:12px; }
  .stage { padding:16px; grid-template-columns:52px minmax(0,1fr) auto; gap:5px 12px; }
  .stage-node { width:46px; height:50px; margin:0; }
  .stage-node svg { width:24px; height:24px; }
  .stage::before { left:39px; top:-14px; height:13px; width:1px; right:auto; }
  .stage b { padding:4px 7px; }
}
@media(max-width:600px) {
  .workspace-header { flex-wrap:wrap; padding:10px 18px; gap:10px 12px; }
  .mobile-arena-brand { order:0; }
  .arena-account { order:1; margin-left:auto; }
  .season-control { order:2; flex-basis:100%; gap:12px; }
  .season-control label { display:block; font-size:10px; }
  .season-control>div { flex:1; min-width:0; }
  .season-control input { flex:1; min-width:0; width:0; font-size:16px; }
  .season-control button { width:44px; flex:none; }
  .header-player strong { font-size:12px; }
  .header-player small { font-size:11px; max-width:none; }
  .quiet-button { font-size:12px; }
  .arena-app main { padding:16px 18px 12px; }
  .screen-heading h1 { font-size:28px; }
  .screen-heading { display:block; }
  .screen-heading .eyebrow { display:none; }
  .screen-description { font-size:13px; }
  .days-left { margin-top:9px; }
  .statusline { font-size:11px; margin:8px 0 14px; align-items:center; }
  .journey-picker { gap:10px; }
  .journey-picker>span { max-width:90px; line-height:1.4; }
  .game-hero { grid-template-columns:90px minmax(0,1fr); gap:16px; padding:18px; border-radius:18px; margin-bottom:16px; }
  .character-info h2 { font-size:30px; }
  .character-info .eyebrow { font-size:10px; letter-spacing:.8px; }
  .level-title { font-size:12px; }
  .next-objective { display:flex; gap:0; }
  .next-objective .game-button { margin-top:12px; }
  .next-objective h3 { margin:6px 0; }
  .mission h2 { font-size:23px; }
  .goal-value { font-size:32px; }
  .goal-foot { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mission-top .eyebrow, .mission-stat small, .goal-foot span, .progress-labels { font-size:11px; }
  .ranking li { padding:18px 9px; }
  .rank-value { font-size:15px; }
  .rank-player { gap:7px; }
  .rank-player .avatar { width:32px; height:32px; flex-basis:32px; }
  .stage { padding:13px 10px; grid-template-columns:40px minmax(0,1fr) auto; gap:4px 8px; }
  .stage-node { width:38px; height:42px; }
  .stage::before { left:29px; }
  .stage b { font-size:11px; padding:3px 5px; }
  .stage small { font-size:10px; }
  .management label { font-size:13px; }
  .management input, .management select, .journey-picker select { font-size:16px; }
}
@media(max-width:380px) {
  .season-control label { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
}
@media(max-width:900px) and (max-height:500px) {
  .arena-nav a { flex-direction:row; justify-content:center; min-height:44px; gap:6px; padding:6px; }
  .arena-nav { padding-top:5px; padding-bottom:max(5px,env(safe-area-inset-bottom)); }
  .arena-workspace { padding-bottom:calc(74px + env(safe-area-inset-bottom)); }
  .workspace-header { padding-top:8px; padding-bottom:8px; }
}
@media(prefers-reduced-motion:reduce) { .arena-nav a { transition:none; } }
