/* The game client around matches (like the TFT client): top bar, play /
   collection / profile / ranking, party lobby, friends, match found, loading
   screen and results. Builds on the tokens in style.css. */

.client { overflow-x: hidden; }
.brand { font-family: var(--f-display); font-size: 22px; color: var(--bone); text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.brand em { color: var(--rift); }
.brand.big { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.btn.big { padding: 14px 28px; font-size: 15px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; background: transparent; border: 1px solid var(--line); color: var(--ash); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--bone); border-color: var(--ash); }
.icon-btn.small { width: 26px; height: 26px; margin-left: 8px; vertical-align: middle; }
.icon-btn.small svg { width: 14px; height: 14px; }
.icon-btn:focus-visible, .ctabs button:focus-visible, .me-chip:focus-visible, .mode-card:focus-visible, .tile:focus-visible, .pill:focus-visible, .find-btn:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--moss); color: var(--void); font-family: var(--f-mono); font-size: 10px; font-weight: 600; display: grid; place-items: center; }

/* ---------------------------------------------------------------- boot */
.boot { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 50% 40%, #1d1729, var(--void) 70%); }
.boot-in { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.boot-in p { margin: 0; font-family: var(--f-mono); font-size: 13px; color: var(--ash); }

/* ---------------------------------------------------------------- shell */
.shell { height: 100vh; display: flex; flex-direction: column; background: var(--void); }
.cbar { flex: none; height: 58px; display: flex; align-items: center; gap: 22px; padding: 0 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #17121f, #0f0b17); }
.ctabs { display: flex; gap: 2px; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ctabs button { position: relative; height: 100%; padding: 0 16px; background: none; border: 0; color: var(--ash); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.ctabs button:hover { color: var(--bone); }
.ctabs button[aria-current="page"] { color: var(--bone); }
.ctabs button[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--ember); }
.cbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me-chip { display: flex; align-items: center; gap: 9px; background: none; border: 1px solid transparent; padding: 3px 10px 3px 3px; color: var(--bone); cursor: pointer; text-align: left; }
.me-chip:hover { border-color: var(--line); }
.me-chip img { width: 38px; height: 38px; background: var(--deep); border: 1px solid var(--line); }
.me-chip b { display: block; font-family: var(--f-mono); font-size: 13px; font-weight: 500; }
.me-chip small { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--ash); }
.cbody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 270px; }
.cmain { min-width: 0; overflow-y: auto; padding: 26px 30px 40px; }
.ctab { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.sect-head { display: flex; flex-direction: column; gap: 6px; }
.sect-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.sect-head .lede { max-width: 62ch; }
h2.sub { font-size: 1.5rem; margin-top: 8px; }
h3 { margin: 0; font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }

/* ---------------------------------------------------------------- play: modes */
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mode-card { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; background: var(--abyss); border: 1px solid var(--line); color: var(--bone); cursor: pointer; overflow: hidden; transition: transform .15s, border-color .15s; }
.mode-card:hover { transform: translateY(-3px); border-color: var(--mc, var(--ember)); }
.mode-card canvas { width: 100%; height: 150px; display: block; }
.mode-card .mc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; border-top: 3px solid var(--mc, var(--ember)); }
.mode-card b { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1; }
.mode-card span { color: var(--ash); font-size: .95rem; line-height: 1.4; flex: 1; }
.mode-card small { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mc, var(--ember)); }
.joinform { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; font-family: var(--f-mono); font-size: 12px; color: var(--ash); }
.joinform input { width: 110px; text-transform: uppercase; letter-spacing: .25em; text-align: center; }
.invites { display: flex; flex-direction: column; gap: 8px; }
.invites:empty { display: none; }
.invite { display: flex; align-items: center; gap: 12px; border: 1px solid var(--rift); background: linear-gradient(90deg, rgba(154,134,255,.12), transparent); padding: 10px 12px; font-family: var(--f-mono); font-size: 13px; }
.invite img { width: 36px; height: 36px; }
.invite span { flex: 1; }
.invite b { color: var(--bone); font-weight: 500; }

/* ---------------------------------------------------------------- play: lobby */
.lobby-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.mode-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--abyss); border: 1px solid var(--line); color: var(--ash); padding: 8px 14px; cursor: pointer; }
.pill:hover:not(:disabled) { color: var(--bone); border-color: var(--ash); }
.pill[aria-checked="true"] { color: var(--void); background: var(--mc, var(--ember)); border-color: var(--mc, var(--ember)); font-weight: 600; }
.pill:disabled { cursor: default; }
.pill:disabled:not([aria-checked="true"]) { opacity: .45; }
.party-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--ash); }
.party-code b { color: var(--ember); letter-spacing: .2em; font-size: 15px; }
.mode-desc { margin: -6px 0 0; color: var(--ash); }
.stage-wrap { border: 1px solid var(--line); background: #07060c; }
#stageCv { display: block; width: 100%; height: clamp(250px, 38vh, 380px); }
.lobby-bottom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(250px, .9fr); gap: 14px; align-items: stretch; }
.chat, .loadout-mini, .findbox { border: 1px solid var(--line); background: var(--abyss); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chat-log { list-style: none; margin: 0; padding: 0; height: 132px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-family: var(--f-mono); font-size: 12px; color: var(--bone); }
.chat-log li { line-height: 1.4; overflow-wrap: anywhere; }
.chat-log li b { color: var(--rift); font-weight: 500; }
.chat-log li.me b { color: var(--ember); }
.chat-log li.sys { color: var(--ash); font-style: italic; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; min-width: 0; font-size: 13px; padding: 8px 10px; }
.chat-form.small input { font-size: 12px; padding: 6px 8px; width: 100%; }
#loadoutMini { display: grid; gap: 8px; }
.lo-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--void); border: 1px solid var(--line); padding: 6px; }
.lo-row .sw { width: 44px; height: 44px; display: grid; place-items: center; background: var(--deep); overflow: hidden; }
.lo-row .sw img, .lo-row .sw canvas { width: 44px; height: 44px; display: block; }
.lo-row .sw i { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 12px currentColor; background: currentColor; }
.lo-row span { display: flex; flex-direction: column; min-width: 0; font-family: var(--f-mono); font-size: 10.5px; color: var(--ash); text-transform: uppercase; letter-spacing: .08em; }
.lo-row span b { font-family: var(--f-display); font-size: 1.05rem; color: var(--bone); text-transform: none; letter-spacing: 0; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.findbox { justify-content: flex-end; }
.custom-opts { display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 12px; color: var(--ash); }
.custom-opts label { display: flex; align-items: center; gap: 6px; }
.find-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 72px; border: 1px solid var(--ember); background: linear-gradient(180deg, #ff9d58, #e2702a); color: var(--void); font-family: var(--f-mono); font-weight: 600; font-size: 16px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: filter .15s; }
.find-btn small { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: none; opacity: .8; }
.find-btn:hover:not(:disabled) { filter: brightness(1.08); }
.find-btn:disabled { cursor: not-allowed; background: var(--deep); border-color: var(--line); color: var(--ash); }
.find-btn.queued { background: var(--void); color: var(--ember); animation: queuePulse 2.4s ease-in-out infinite; }
.find-btn.queued:disabled { color: var(--ember); border-color: var(--ember); cursor: default; }
@keyframes queuePulse { 50% { box-shadow: 0 0 0 4px rgba(255, 138, 61, .15), inset 0 0 24px rgba(255, 138, 61, .12); } }

/* ---------------------------------------------------------------- collection */
.col-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.col-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 16px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); cursor: pointer; }
.col-tabs button[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--ember); }
.col-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 18px; align-items: start; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; background: var(--abyss); border: 1px solid var(--line); color: var(--bone); cursor: pointer; text-align: center; font-family: var(--f-mono); font-size: 11px; }
.tile:hover { border-color: var(--ash); }
.tile[aria-pressed="true"] { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember) inset; }
.tile .art { height: 84px; display: grid; place-items: center; background: var(--void); overflow: hidden; }
.tile .art img { width: 72px; height: 72px; }
.tile .art canvas { width: 100%; height: 84px; display: block; }
.tile .art i { width: 34px; height: 34px; border-radius: 50%; background: currentColor; box-shadow: 0 0 22px currentColor, 0 0 6px #fff inset; }
.tile .eq { position: absolute; top: 6px; right: 6px; background: var(--ember); color: var(--void); font-size: 9.5px; font-weight: 600; letter-spacing: .08em; padding: 1px 5px; text-transform: uppercase; }
.col-preview { position: sticky; top: 0; border: 1px solid var(--line); background: var(--abyss); display: flex; flex-direction: column; }
#previewCv { display: block; width: 100%; height: 300px; background: var(--void); }
.pv-text { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.pv-text h2 { font-size: 1.8rem; }
.pv-text p { margin: 0; color: var(--ash); min-height: 3em; }
.pv-text .btn { align-self: flex-start; }

/* ---------------------------------------------------------------- profile */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; border: 1px solid var(--line); background: linear-gradient(120deg, var(--abyss), #1a1426 60%, var(--abyss)); padding: 20px; }
.ph-portrait { width: 112px; height: 112px; padding: 6px; border: 2px solid var(--tc, var(--line)); background: var(--void); box-shadow: 0 0 30px -8px var(--tc, transparent); }
.ph-portrait img { width: 100%; height: 100%; display: block; }
.ph-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.ph-main h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.ph-main .status { font-family: var(--f-mono); font-size: 12px; color: var(--ash); }
.xpbar { height: 6px; background: rgba(255,255,255,.08); max-width: 340px; }
.xpbar i { display: block; height: 100%; background: var(--water); }
.ph-meta { font-family: var(--f-mono); font-size: 12px; color: var(--ash); }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rank-badge { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); background: var(--void); min-width: 230px; }
.rank-badge .gem { width: 42px; height: 42px; transform: rotate(45deg); border: 2px solid var(--tc); background: linear-gradient(135deg, var(--tc), transparent 75%); box-shadow: 0 0 18px -4px var(--tc); flex: none; }
.rank-badge b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.35rem; color: var(--tc); line-height: 1.1; }
.rank-badge small { font-family: var(--f-mono); font-size: 11px; color: var(--ash); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-card { border: 1px solid var(--line); background: var(--abyss); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-family: var(--f-mono); font-size: 11px; color: var(--ash); }
.stat-card h3 { color: var(--bone); }
.stat-card .nums { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 10px; margin-top: 4px; }
.stat-card .nums b { display: block; font-size: 18px; font-weight: 500; color: var(--bone); font-variant-numeric: tabular-nums; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.match { display: grid; grid-template-columns: 64px minmax(150px, .9fr) minmax(0, 2fr) 74px; gap: 14px; align-items: center; border: 1px solid var(--line); border-left: 4px solid var(--pc, var(--line)); background: var(--abyss); padding: 10px 14px; }
.match .place { font-family: var(--f-display); font-size: 2rem; line-height: 1; color: var(--pc, var(--ash)); text-align: center; }
.match .info { display: flex; flex-direction: column; gap: 2px; font-family: var(--f-mono); font-size: 11px; color: var(--ash); }
.match .info b { color: var(--bone); font-weight: 500; font-size: 12.5px; }
.match .comp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.match .units { display: flex; flex-wrap: wrap; gap: 4px; }
.mu { position: relative; width: 40px; height: 40px; background: var(--void); border: 1px solid var(--uc, var(--line)); }
.mu img { width: 100%; height: 100%; display: block; }
.mu .st { position: absolute; top: -7px; left: 0; right: 0; text-align: center; font-size: 9px; line-height: 1; color: #c9d4e0; letter-spacing: -1px; }
.mu .st.s3 { color: #ffd27a; }
.mu .its { position: absolute; bottom: -1px; left: 0; right: 0; display: flex; justify-content: center; }
.mu .its .ico { border: 0; }
.match .tchips { display: flex; flex-wrap: wrap; gap: 4px; }
.tchip { font-family: var(--f-mono); font-size: 10.5px; border: 1px solid currentColor; padding: 0 6px; line-height: 1.6; }
.match .lp { font-family: var(--f-mono); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.match .lp.up { color: var(--moss); } .match .lp.down { color: var(--blood); } .match .lp.none { color: var(--ash); font-size: 11px; }
.empty-box { border: 1px dashed var(--line); padding: 22px; text-align: center; color: var(--ash); font-family: var(--f-mono); font-size: 12px; }

/* ---------------------------------------------------------------- ranking */
.tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.tiers span { font-family: var(--f-mono); font-size: 11px; border: 1px solid currentColor; padding: 3px 9px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.ranking { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: 13px; }
.ranking th { text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--abyss); }
.ranking td { padding: 8px 12px; border-bottom: 1px solid rgba(44,37,64,.6); white-space: nowrap; }
.ranking tr:nth-child(even) td { background: rgba(22,17,31,.5); }
.ranking tr.me td { background: rgba(255,138,61,.08); }
.ranking .who { display: flex; align-items: center; gap: 10px; }
.ranking .who img { width: 30px; height: 30px; background: var(--deep); }
.ranking .who button { background: none; border: 0; padding: 0; color: var(--bone); font: inherit; cursor: pointer; }
.ranking .who button:hover { color: var(--ember); text-decoration: underline; }
.ranking .pos { color: var(--ash); width: 40px; }
.ranking tr:nth-child(-n+3) .pos { color: var(--ember); font-weight: 600; }

/* ---------------------------------------------------------------- social */
.social { border-left: 1px solid var(--line); background: #110d19; display: flex; flex-direction: column; gap: 12px; padding: 16px 14px; overflow-y: auto; min-height: 0; }
.social-head { display: flex; align-items: baseline; justify-content: space-between; }
.social-head h2 { font-size: 1.4rem; }
.social-head span { font-family: var(--f-mono); font-size: 11px; color: var(--moss); }
.add-friend { display: flex; gap: 6px; }
.add-friend input { flex: 1; min-width: 0; font-size: 12px; padding: 7px 9px; }
.req { display: flex; flex-direction: column; gap: 6px; }
.req:empty { display: none; }
.req h3 { margin-bottom: 2px; }
.req-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--rift); padding: 5px 6px; font-family: var(--f-mono); font-size: 12px; }
.req.out .req-row { border-color: var(--line); color: var(--ash); }
.req-row img { width: 30px; height: 30px; }
.req-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-row .acts { display: flex; gap: 4px; }
.mini { font-family: var(--f-mono); font-size: 11px; background: none; border: 1px solid var(--line); color: var(--ash); padding: 3px 7px; cursor: pointer; }
.mini:hover { color: var(--bone); border-color: var(--ash); }
.mini.ok { color: var(--moss); border-color: var(--moss); }
.mini.no { color: var(--blood); border-color: var(--blood); }
.mini.go { color: var(--ember); border-color: var(--ember); }
.friends { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.friend { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; padding: 5px 6px; border: 1px solid transparent; }
.friend:hover, .friend:focus-within { border-color: var(--line); background: var(--abyss); }
.friend .pic { position: relative; width: 34px; height: 34px; }
.friend .pic img { width: 34px; height: 34px; background: var(--deep); display: block; }
.friend .dot { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #110d19; background: var(--sc, #555); }
.friend .who { display: flex; flex-direction: column; min-width: 0; font-family: var(--f-mono); }
.friend .who b { font-size: 12.5px; font-weight: 500; color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend .who small { font-size: 10.5px; color: var(--sc, var(--ash)); }
.friend.offline { opacity: .55; }
.friend .acts { grid-column: 2; display: none; gap: 4px; flex-wrap: wrap; }
.friend:hover .acts, .friend:focus-within .acts { display: flex; }
.empty-social { font-family: var(--f-mono); font-size: 11.5px; color: var(--ash); line-height: 1.6; }

/* ---------------------------------------------------------------- match found */
.overlay.found { z-index: 40; background: rgba(8, 6, 14, .82); }
.found-card { position: relative; width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 34px 26px 28px; border: 1px solid var(--ember); background: radial-gradient(ellipse at 50% 0%, rgba(255,138,61,.16), var(--abyss) 70%); box-shadow: 0 0 60px -10px rgba(255,138,61,.45); animation: foundIn .35s ease-out; }
@keyframes foundIn { from { transform: scale(.9); opacity: 0; } }
.found-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.found-ring circle { fill: none; stroke-width: 6; }
.found-ring .track { stroke: rgba(255,255,255,.08); }
.found-ring .bar { stroke: var(--ember); stroke-dasharray: 339.3; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; }
.found-card h2 { font-size: 2.3rem; }
.found-count { margin: 0; font-family: var(--f-mono); font-size: 13px; color: var(--ash); }
.found-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin-top: 6px; }
.found-actions .btn.primary { width: 100%; }
.found-card.accepted .btn.primary { background: var(--moss); border-color: var(--moss); }

/* ---------------------------------------------------------------- game additions */
.overlay.loading { z-index: 25; background: radial-gradient(ellipse at 50% 30%, #1d1729, rgba(8,6,14,.97) 75%); }
.load-in { width: min(1000px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.load-in h2 { font-size: clamp(2rem, 5vw, 3rem); }
.load-in h2 em { color: var(--rift); }
.load-grid { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.load-card { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--abyss); padding: 12px 8px; font-family: var(--f-mono); font-size: 11px; animation: cardIn .5s ease-out both; }
.load-card:nth-child(2) { animation-delay: .06s; } .load-card:nth-child(3) { animation-delay: .12s; } .load-card:nth-child(4) { animation-delay: .18s; }
.load-card:nth-child(5) { animation-delay: .24s; } .load-card:nth-child(6) { animation-delay: .3s; } .load-card:nth-child(7) { animation-delay: .36s; } .load-card:nth-child(8) { animation-delay: .42s; }
@keyframes cardIn { from { transform: translateY(12px); opacity: 0; } }
.load-card.me { border-color: var(--ember); }
.load-card img { width: 84px; height: 84px; }
.load-card b { font-size: 13px; font-weight: 500; color: var(--bone); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-card .rank { color: var(--ash); }
.load-card .arena { color: var(--ash); opacity: .7; font-size: 10px; }
.load-bar { width: min(420px, 100%); height: 4px; background: rgba(255,255,255,.08); }
.load-bar i { display: block; height: 100%; width: 0; background: var(--rift); transition: width .3s linear; }
.modal.narrow { width: min(460px, 100%); }
.result { display: flex; flex-direction: column; gap: 4px; }
.result-place { margin: 0; font-family: var(--f-display); font-size: 2.6rem; line-height: 1; color: var(--ember); }
.result-line { margin: 0; font-family: var(--f-mono); font-size: 13px; color: var(--bone); }
.result-promo { margin: 4px 0 0; font-family: var(--f-display); font-size: 1.5rem; }
.result-promo.up { animation: promoIn .6s ease-out; }
@keyframes promoIn { from { transform: scale(.8); opacity: 0; } }
.spectate .btn { margin-left: 8px; }
.gchat { max-height: 130px; overflow-y: auto; }
.gchat li { color: var(--bone); overflow-wrap: anywhere; }
.gchat li b { color: var(--rift); font-weight: 500; }
.gchat li.me b { color: var(--ember); }
.detail .chip { color: var(--ash); }

/* ---------------------------------------------------------------- sound popover */
.sound-pop { position: fixed; z-index: 50; top: 64px; right: 16px; width: 230px; border: 1px solid var(--line); background: var(--abyss); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); font-family: var(--f-mono); font-size: 12px; color: var(--bone); }
.sound-pop label { display: flex; flex-direction: column; gap: 4px; }
.sound-pop label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ash); }
.sound-pop input[type="range"] { width: 100%; accent-color: var(--ember); padding: 0; border: 0; background: none; }
.toast.ok { border-color: var(--moss); }
.toast.info { border-color: var(--rift); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .load-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .cbody { grid-template-columns: minmax(0, 1fr); }
  .social { position: fixed; z-index: 35; top: 58px; right: 0; bottom: 0; width: min(300px, 88vw); transform: translateX(100%); transition: transform .2s; box-shadow: -12px 0 30px rgba(0,0,0,.5); }
  .social.open { transform: none; }
  .lobby-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .findbox { grid-column: 1 / -1; }
  .col-body { grid-template-columns: minmax(0, 1fr); }
  .col-preview { position: static; order: -1; }
  .match { grid-template-columns: 54px minmax(0, 1fr) 64px; }
  .match .comp { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 700px) {
  .cbar { gap: 10px; padding: 0 10px; }
  .cbar .brand { display: none; }
  .ctabs button { padding: 0 10px; font-size: 11px; letter-spacing: .08em; }
  .me-chip span { display: none; }
  #logoutBtn { display: none; }
  .cmain { padding: 18px 16px 32px; }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .lobby-bottom { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .load-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-head { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mode-card, .social, .found-card, .load-card, .find-btn.queued { transition: none; animation: none; }
}

/* ---------------------------------------------------------------- profile icons & chibis */
.tile.locked .art img { filter: grayscale(1) brightness(.45); }
.tile.locked { color: var(--ash); }
.tile .lock { position: absolute; left: 6px; right: 6px; bottom: 34px; font-size: 9.5px; line-height: 1.25; color: var(--bone); background: rgba(13, 10, 20, .82); padding: 2px 4px; text-transform: none; letter-spacing: 0; }
.tile .art { position: relative; }
.ph-portrait { position: relative; }
.ph-chibi { position: absolute; right: -18px; bottom: -14px; width: 54px; height: 54px; border: 1px solid var(--line); background: var(--deep); box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.ph-chibi img { width: 100%; height: 100%; display: block; }
img.icon { background: var(--deep); }
