/* The private riot section: shop, play, live. Uses the tokens from style.css. */
.navlink { font: 600 14px var(--f-display); color: var(--bone); text-decoration: none; padding: 8px 12px; border: 1px solid var(--line); background: var(--plate-2); white-space: nowrap; }
.navlink:hover { border-color: var(--red); color: var(--red); }

.riothead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; justify-content: space-between; }
.riothead h1 { margin: 0; font: 700 clamp(26px, 4vw, 38px)/1.05 var(--f-display); }
.rstatus { margin: 6px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rstatus b { color: var(--bone); text-transform: none; }
.dotc { width: 8px; height: 8px; display: inline-block; background: var(--dim); }
.dotc.on { background: var(--win); }
.rtabs { display: flex; gap: 4px; }
.rtabs a { padding: 9px 16px; border: 1px solid var(--line); background: var(--plate); color: var(--muted); text-decoration: none; font: 600 14px var(--f-display); }
.rtabs a:hover { color: var(--bone); }
.rtabs a[aria-current="true"] { background: var(--red); border-color: var(--red); color: var(--void); }

/* connect */
.connect .steps { margin: 0; padding-left: 22px; display: grid; gap: 18px; max-width: 70ch; }
.connect .steps li::marker { font: 700 15px var(--f-display); color: var(--red); }
.connect .steps b { color: var(--bone); }
.connect .steps li { color: var(--muted); }
.connect .steps li > div, .connect .steps .add { margin-top: 10px; }
.connect code { text-transform: none; color: var(--bone); font-size: 12px; overflow-wrap: anywhere; }
.connect .hint { margin: 20px 0 0; color: var(--dim); font-size: 13px; }
.qrlogin { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.qrbox { width: 220px; aspect-ratio: 1; background: #fff; border-radius: 8px; display: grid; place-items: center; overflow: hidden; }
.qrbox svg { width: 100%; height: 100%; display: block; }
.qrbox .qrph { color: #555; font-size: 13px; }
.qrlogin #qrmsg { margin-top: 14px; }
.altlogin { margin-top: 24px; }
.altlogin summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.altlogin .steps { margin-top: 16px; }
@media (max-width: 600px) { .qrlogin { grid-template-columns: 1fr; } .qrbox { margin: 0 auto; } }

/* wallet */
.wallet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wallet > div { background: var(--plate); border: 1px solid var(--line); padding: 12px 16px; }
.wallet .k { display: block; font-size: 12px; color: var(--muted); }
.wallet b { font: 700 24px var(--f-display); font-variant-numeric: tabular-nums; }

/* skins */
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.skins.small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 14px; }
.skin {
  display: grid; grid-template-rows: 130px auto; position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tier) 18%, var(--plate-2)), var(--plate-2) 70%);
  border: 1px solid var(--line); border-top: 2px solid var(--tier);
}
.skins.small .skin { grid-template-rows: 90px auto; }
.skin-img { display: grid; place-items: center; padding: 14px 18px 0; }
.skin-img img { max-height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); }
.skin-info { padding: 10px 14px 12px; padding-right: 90px; min-width: 0; }
.skin-name { font: 600 15px/1.2 var(--f-display); }
.skin-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.tier-ic { width: 16px; height: 16px; }
.skin-cost { position: absolute; right: 12px; bottom: 12px; text-align: right; display: grid; }
.skin-cost s, .bundle-hero s { color: var(--dim); font-size: 12px; }
.vp { font: 700 16px var(--f-display); font-variant-numeric: tabular-nums; }
.vp::after { content: " vp"; font: 500 11px var(--f-body); color: var(--muted); }
.off { font: 700 12px var(--f-display); color: var(--void); background: var(--red); padding: 1px 5px; }
.hiddenitem { color: var(--dim); }
.night { border-color: #4a2a63; }
.bundle-hero {
  min-height: 180px; display: flex; align-items: flex-end; padding: 18px; margin: -18px -20px 0;
  background-size: cover; background-position: center; position: relative;
}
.bundle-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 5, 5, .92), rgba(5, 5, 5, 0) 70%); }
.bundle-hero > div { position: relative; }
.bundle-hero h2 { margin: 0 0 4px; font: 700 24px var(--f-display); }
.bundle-hero p { margin: 0; color: var(--muted); }

/* play: the lobby */
.lobby { display: grid; gap: 18px; padding: 22px; border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 0%, #1d1416, var(--void) 70%); }
.lobby-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.lobby-modes button { padding: 9px 16px; cursor: pointer; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 600 14px var(--f-display); text-transform: uppercase; letter-spacing: .06em; }
.lobby-modes button:hover:not(:disabled) { color: var(--bone); }
.lobby-modes button[aria-checked="true"] { color: var(--bone); border-bottom-color: var(--red); }
.lobby-modes button:disabled { cursor: not-allowed; opacity: .5; }
.lobby-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.slot { position: relative; aspect-ratio: 268 / 520; background: var(--plate-2) center top / cover no-repeat; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: flex-end; }
.slot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 5, 5, .95) 8%, rgba(5, 5, 5, 0) 55%); }
.slot.me { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 40px var(--red-glow); transform: translateY(-10px); }
.slot.empty { background: transparent; border: 1px dashed var(--line); align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--dim); }
.slot.empty::before { display: none; }
.slot.empty span { font: 300 40px/1 var(--f-display); }
.slot.empty small { font-size: 12px; }
.slot .crown { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; color: #f2c14e; filter: drop-shadow(0 1px 3px #000); }
.slot-info { position: relative; width: 100%; padding: 12px; display: grid; gap: 2px; justify-items: center; text-align: center; }
.slot-info .slot-rank { width: 40px; height: 40px; margin-bottom: 4px; }
.slot-info b { font: 700 15px/1.15 var(--f-display); text-transform: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-info b .dim { font-weight: 500; }
.slot-info i { font-style: normal; font-size: 12px; color: #f2c14e; }
.slot-info small { font-size: 12px; color: var(--muted); }
.lobby-go { display: grid; justify-items: center; gap: 8px; text-align: center; }
.playbtn { min-width: min(340px, 100%); padding: 14px 28px; display: grid; gap: 2px; cursor: pointer; border: 0; background: var(--red); color: var(--void); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.playbtn span { font: 800 26px/1 var(--f-display); text-transform: uppercase; letter-spacing: .12em; }
.playbtn small { font: 600 12px var(--f-display); text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.playbtn:hover:not(:disabled) { filter: brightness(1.1); }
.playbtn:disabled { opacity: .45; cursor: not-allowed; }
.playbtn.searching { background: var(--plate-2); color: var(--bone); outline: 1px solid var(--red); }
.playbtn.searching span { font-size: 15px; letter-spacing: .08em; }
.playbtn.searching b { font: 700 30px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.found { font: 800 24px var(--f-display); text-transform: uppercase; letter-spacing: .1em; color: var(--win); }
.lobby-err { margin: 0; color: var(--loss); font-size: 13px; }
.lobby-err:empty { display: none; }
@media (max-width: 760px) {
  .lobby { padding: 14px; }
  .lobby-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot { aspect-ratio: 268 / 360; }
  .slot.me { grid-column: 1 / -1; order: -1; transform: none; aspect-ratio: 16 / 10; }
  .slot.empty { display: none; }
}

/* agent select */
.aselect { display: grid; gap: 12px; }
.as-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); background: var(--plate) center / cover no-repeat; position: relative; min-height: 120px; }
.as-head::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 5, 5, .94), rgba(5, 5, 5, .45)); }
.as-head > * { position: relative; }
.as-head h2 { margin: 8px 0 2px; font: 700 clamp(24px, 3.5vw, 36px)/1 var(--f-display); }
.as-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.as-timer { text-align: right; display: grid; }
.as-timer b { font: 700 40px/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--bone); }
.as-timer small { color: var(--muted); font-size: 12px; }
.as-main { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; }
.as-team { display: grid; gap: 6px; align-content: start; }
.as-team .empty { padding: 14px; border: 1px dashed var(--line); margin: 0; }
.tm { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--plate); border: 1px solid var(--line); border-left: 3px solid var(--line); }
.tm.selected { border-left-color: var(--muted); }
.tm.locked { border-left-color: var(--win); }
.tm.me { border-color: var(--red); border-left-color: var(--red); }
.tm > img, .tm > .ph { width: 44px; height: 44px; }
.tm b { display: block; font: 600 14px var(--f-display); text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm small { font-size: 12px; color: var(--muted); }
.tm .tm-rank { width: 28px; height: 28px; }
.as-hero { position: relative; min-height: 340px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(160deg, var(--ag1, #2b2226), var(--ag2, #0f0d0e)); display: flex; align-items: flex-end; }
.as-hero .as-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.as-hero .as-portrait { position: absolute; right: 0; bottom: -8%; height: 118%; max-width: 75%; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); }
.as-name { position: relative; padding: 20px; }
.as-name span { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--f-display); text-transform: uppercase; letter-spacing: .08em; color: var(--bone); opacity: .85; }
.as-name span img { width: 18px; height: 18px; }
.as-name h2 { margin: 4px 0 0; font: 800 clamp(36px, 6vw, 68px)/.9 var(--f-display); text-transform: uppercase; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.as-pick { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); background: var(--plate); }
.as-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.as-roles button { padding: 7px 12px; cursor: pointer; background: var(--plate-2); border: 1px solid var(--line); color: var(--muted); font: 600 13px var(--f-display); }
.as-roles button[aria-checked="true"] { color: var(--bone); border-color: var(--red); }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.ag { aspect-ratio: 1; padding: 0; cursor: pointer; background: var(--plate-2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.ag img { width: 100%; height: 100%; display: block; }
.ag:hover:not(:disabled) { border-color: var(--bone); }
.ag.sel { border-color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.ag:disabled { cursor: not-allowed; }
.ag.notowned img { filter: grayscale(1) brightness(.35); }
.ag.taken img { filter: grayscale(1) brightness(.5); }
.ag.taken::after { content: "taken"; position: absolute; inset: auto 0 0; font: 600 10px var(--f-display); color: var(--bone); background: rgba(5, 5, 5, .75); text-align: center; padding: 2px 0; }
.as-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lockbtn { min-width: 220px; height: 52px; cursor: pointer; border: 0; background: var(--red); color: var(--void); font: 800 20px var(--f-display); text-transform: uppercase; letter-spacing: .14em; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.lockbtn:disabled { opacity: .4; cursor: not-allowed; }
.lockbtn.done { background: var(--win); opacity: 1; }
@media (max-width: 760px) {
  .as-main { grid-template-columns: 1fr; }
  .as-hero { min-height: 260px; order: -1; }
  .as-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .lockbtn { width: 100%; }
}

/* live */
.livehead { min-height: 170px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 22px; border: 1px solid var(--line); background-size: cover; background-position: center; position: relative; }
.livehead::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 5, 5, .92), rgba(5, 5, 5, .35)); }
.livehead > div { position: relative; }
.livehead h2 { margin: 10px 0 2px; font: 700 clamp(28px, 4vw, 42px)/1 var(--f-display); }
.livehead p { margin: 0; color: var(--muted); }
.lv-avg { display: flex; gap: 18px; }
.lv-avg > div { display: grid; justify-items: center; gap: 2px; }
.lv-avg img { width: 44px; height: 44px; }
.lv-avg small { font-size: 11px; color: var(--muted); }
.lv-team { margin-top: 12px; }
.team-ally { box-shadow: inset 3px 0 0 var(--win); } .team-enemy { box-shadow: inset 3px 0 0 var(--loss); }
.lv-scroll { overflow-x: auto; }
.lv { width: 100%; border-collapse: collapse; min-width: 640px; }
.lv th { text-align: left; font: 600 11px var(--f-display); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; padding: 0 8px 8px; }
.lv td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.lv tr.me td { background: var(--red-glow); }
.lv-ag { width: 48px; }
.lv-ag img, .lv-ag .ph { width: 40px; height: 40px; display: block; }
.lv-who a { text-decoration: none; color: inherit; }
.lv-who b { font: 600 14px var(--f-display); text-transform: none; }
.lv-who a:hover b { color: var(--red); }
.lv-who small, .lv-rank small, .lv-num small { display: block; font-size: 12px; color: var(--muted); }
.lv-rank, .lv-peak { white-space: nowrap; }
.lv-rank img, .lv-peak img { width: 30px; height: 30px; vertical-align: middle; margin-right: 8px; }
.lv-rank span { display: inline-grid; vertical-align: middle; }
.lv-rank b { font: 600 13px var(--f-display); }
.lv-peak span { font-size: 13px; color: var(--muted); vertical-align: middle; }
.lv-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-note { margin-top: 10px; }
.hint { color: var(--dim); font-size: 13px; }

@media (max-width: 560px) { .wallet { grid-template-columns: 1fr; } .riothead { align-items: stretch; } .rtabs { width: 100%; } .rtabs a { flex: 1; text-align: center; padding-inline: 6px; } }
