/* Online screens (web/js/ui/online.js): Ranks, invite, queue, match, result. Design-system tokens only;
   the components themselves live in ds.css. Round 3 consensus items 4 (ranks) and 8 (tier bar) are here. */

/* ---------- shared ---------- */
.ol-bot{display:inline-flex;align-items:center;min-height:20px;padding:0 6px;margin-left:6px;border-radius:var(--r-pill);background:var(--s3);box-shadow:inset 0 0 0 1px var(--line-strong);font:700 var(--f12)/1 var(--ui);letter-spacing:.04em;color:var(--text-2);vertical-align:middle;flex:none}
.ol-pips{display:flex;gap:6px;margin-top:8px}
.ol-pips i{flex:1;height:8px;border-radius:var(--r-pill);background:var(--s3);box-shadow:inset 0 0 0 1px var(--line-strong)}
.ol-pips i.on{background:var(--you);box-shadow:none}
.ol-unlock{display:flex;flex-direction:column;gap:2px}
.ol-unlock .row{gap:12px}
.ol-err .btn{flex:none}
.ol-page input[type="text"],.ol-page input:not([type]),.sheet input:not([type]){min-height:48px;min-width:0;padding:0 14px;border-radius:var(--r-m);background:var(--s2);border:1.5px solid var(--line-strong);color:var(--text);font:600 var(--f16)/1 var(--ui)}
.ol-page input:focus-visible,.sheet input:focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}

/* ---------- Ranks ---------- */
.ol-ranks .rankhero .ol-rp{white-space:nowrap}
.ol-ranks .rankhero .rank.big{margin-top:2px}
.lb .li .grow{display:flex;align-items:center;gap:6px;min-width:0}
.lb .li .grow b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb .pos{text-align:right;flex:none;font-weight:700;color:var(--text-2)}
.lb .delta .ic{display:inline-block}
/* Your row: tinted, labelled, and pinned above the tab bar while the list runs on past it (consensus 4). */
.lb .li.me{position:sticky;bottom:calc(var(--tab-h) + var(--safe-b) + 30px);z-index:3;border-radius:var(--r-m);border-top-color:transparent;background:var(--s2);box-shadow:inset 0 0 0 1.5px var(--you),0 -6px 14px -6px var(--bg)}
.lb .li.me .pos{color:var(--text)}
.you-lab{flex:none;font:800 var(--f12)/1 var(--ui);letter-spacing:.08em;color:var(--you)}
[data-theme="light"] .you-lab{color:var(--you)}
.lb .more{margin:0}
.ol-lbnote{margin-top:8px}
.ol-skel{display:flex;flex-direction:column;gap:14px;padding:16px 4px}.ol-skel .skel:nth-child(2){width:80%}.ol-skel .skel:nth-child(3){width:60%}
.ol-placing{margin-top:8px}
.ol-order{margin-top:8px;font-size:var(--f14)}
.ol-order summary{min-height:44px;display:flex;align-items:center;font-weight:700;cursor:pointer}
.ol-order ol{margin:0 0 6px;padding-left:22px;display:flex;flex-direction:column;gap:4px}
.lb>.btn{margin-top:10px}
@media (min-width:1024px){
  .lb .li.me{bottom:8px}
  .ol-board{max-width:860px}
}
.ol-sheet-body{display:flex;flex-direction:column;gap:8px;max-height:min(62vh,560px);overflow:auto}
.ol-rules .li{min-height:44px;font-size:var(--f14)}

/* ---------- Play modes ---------- */
.ol-rk-ic .badge.sm{width:24px;height:27px}

/* ---------- Invite ---------- */
.ol-invite{max-width:560px}
.ol-invite .card{display:flex;flex-direction:column;gap:12px}
.ol-codebig{font:800 2.75rem/1 var(--ui);letter-spacing:.18em;text-align:center;padding:10px 0;color:var(--text)}
.ol-waiting{gap:10px;justify-content:center}.ol-waiting .spin{width:22px;height:22px;border-width:3px}
.ol-join{gap:10px}.ol-join input{flex:1;text-transform:uppercase;letter-spacing:.12em}

/* ---------- Queue ---------- */
.queue .ol-qhead{display:flex;flex-direction:column;gap:4px;align-items:center}
.queue .ol-qhead .h1{text-wrap:balance}
.queue .q-center .ol-err{width:100%;text-align:left}
.queue .vs .pc-ic.s56{width:56px;height:56px}

/* ---------- Match ---------- */
.ol-match .mtop .ol-chatbtn{position:relative}
.ol-match .mtop .iconbtn:first-child+.ttl{margin-right:0}
.ol-match .strip .name .ol-bot{margin-left:0}
.ol-match .boardwrap{position:relative}
.ol-skip{flex:none;margin:8px 12px 0;padding:6px 12px;min-height:0}
.ol-skip .grow{font-size:var(--f13)}
.ol-skip-more{display:none}
.ol-boardwait{display:grid;place-items:center;aspect-ratio:1;width:var(--board);max-width:100%;margin:0 auto}
.ol-match .abar .btn.lg{flex:1}
.ol-match .mchat .chip .ic{width:16px;height:16px}
.ol-lastmsg{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
@media (max-height:779px){.ol-skip{margin:6px 8px 0;padding:4px 10px}}
@media (max-height:600px){.ol-skip .grow{font-size:var(--f13)}}
/* Chat sheet */
.ol-msgs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:min(26vh,220px);overflow:auto}
.ol-msg{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:var(--r-m);background:var(--s2);font-size:var(--f14)}
.ol-msg.me{background:var(--s3)}
.ol-msg.sys{background:transparent;color:var(--text-2);justify-content:center;text-align:center}
.ol-msg .from{font-weight:800;flex:none}
.ol-msg .txt{flex:1;min-width:0;overflow-wrap:anywhere}
.ol-flag{display:grid;place-items:center;width:44px;height:44px;margin:-6px -6px -6px 0;border-radius:50%;color:var(--text-2);flex:none}
.ol-flag .ic{width:18px;height:18px}
.ol-quick{gap:8px}.ol-quick .chip{min-height:44px}
.ol-chatform{gap:10px}.ol-chatform input{flex:1}
.ol-chat-foot{gap:10px}
.ol-chat-clock{display:flex;align-items:center;gap:6px}.ol-chat-clock .ic{width:16px;height:16px}
.ol-howto{padding:4px 4px 10px 44px;color:var(--text-2);line-height:1.45}
.sheet .list>.li{min-height:56px}

/* ---------- Result ---------- */
.bar>i.loss{background:var(--danger)}
.gainlab.lost{color:var(--danger)}
.ol-tiercap{margin-top:10px}
.ol-why{margin-top:8px;text-align:center;text-wrap:balance}
.rkcard .chip{margin-right:6px}
.ol-demote{display:grid;place-items:center;height:110px}
.ol-result .dock .ol-rematch-note{margin:0 0 2px}
@media (max-width:1023px){
  .flow.ol-result{--dock:150px}
  .ol-result .hero-blk{flex:none;padding-top:8px}
  .ol-result .stage{gap:12px}
  .ol-result .lossboard{--board:min(200px,52vw)}
}
@media (max-height:700px) and (max-width:1023px){
  .ol-result .lossboard{--board:150px}
}

/* ---------- Round 2 review fixes (reports/port/p2/consensus.md) ---------- */
/* Lists clear the tab bar (the bar already draws its own fade above itself). */
.ol-page .content{padding-bottom:calc(var(--tab-h) + var(--safe-b) + 36px)}
@media (min-width:1024px){.ol-page .content{padding-bottom:40px}}
/* The hub's short leaderboard preview shows your row in place; only the full board pins it, on an opaque shelf. */
.lb:not(.lbfull) .li.me{position:static;box-shadow:inset 0 0 0 1.5px var(--you)}
.lb.lbfull .li.me{background:var(--s2);box-shadow:inset 0 0 0 1.5px var(--you),0 10px 0 6px var(--s1),0 -6px 14px -6px var(--bg)}
.lb .li.me .grow{gap:4px}
.lb .lbhead,.lb .more,.ol-lbnote,.lb .lbhead span{color:var(--text)}
.lb .lbhead{opacity:.8}
[data-theme="light"] .lb .lbhead{opacity:1;color:var(--text)}
.ol-page input::placeholder,.sheet input::placeholder{color:var(--text-2);opacity:1}
.ol-plc{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.ol-unlock{margin-bottom:6px}
.ol-signprompt{margin-bottom:10px}
/* Invite: copy and share sit right under the code */
.ol-codeact{gap:10px}.ol-codeact .btn{flex:1;min-height:48px}.ol-codeact .btn .ic{width:20px;height:20px}
/* Match strip: the opponent's name and short tier always fit */
.ol-match .strip .name{gap:6px}
.ol-match .strip .name>span:first-child{flex:0 1 auto;min-width:0}
.ol-match .strip .name .badge,.ol-match .strip .name .rank{flex:none}
.ol-match .strip .name .rank{font-size:var(--f13)}
/* Reconnecting: one line in the flow above the opponent's strip, never on the board */
.ol-conn{position:static;display:flex;align-items:center;gap:8px;flex:none;margin:0 12px 4px;padding:6px 10px;border-radius:var(--r-m);background:var(--s2);box-shadow:inset 3px 0 0 var(--danger);font:600 var(--f14)/1.25 var(--ui)}
.ol-conn .ic{width:18px;height:18px;color:var(--danger);flex:none}
.ol-block-btn .ic,.ol-chat-foot .btn .ic{width:18px;height:18px}
.ol-chat-foot .btn{gap:6px}
/* Short phones: less board so the unit row and the skip note both clear End turn */
@media (max-height:600px){
  .ol-match{--chrome:316px}
  .ol-skip-more{display:none}
}
.ol-result{position:relative}
.ol-result>.iconbtn{position:absolute;top:calc(var(--safe-t) + 4px);left:8px;z-index:5}
@media (min-width:1024px){.ol-result>.iconbtn{top:12px;left:12px}}

/* Round 5: loss/win result fits 390x844 without scrolling (stats above the dock) */
@media (max-width:1023px){
  .ol-result .lossboard{--board:168px}
  .ol-result .hero-blk{gap:3px;padding-top:2px}
  .ol-result .hero-blk .t36{font-size:var(--f28)}
  .ol-result .stage{padding-top:0;gap:8px}
  .ol-result .rkcard{padding:12px 16px}
  .ol-result .rkcard .rp-big{font-size:2.25rem;margin-top:2px}
  .ol-result .tiles3 .tile{padding:8px}
  .ol-result .tiles3 .tile b{font-size:var(--f16)}
  .ol-result .tiles3 .tile span{font-size:var(--f12)}
  .flow.ol-result{--dock:142px}
  .ol-result .dock .btn.outline{min-height:44px}
  .ol-result .ol-why{display:none}
}
