/* ---------- themes: tokens ---------- */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #14171c; --mut: #687080; --line: #e4e7ec; --soft: #f0f2f5;
  --yes: #0b9e6a; --yes-bg: rgba(11,158,106,.10); --no: #d4384e; --no-bg: rgba(212,56,78,.09);
  --acc: #3d5afe; --light: #eedab6; --dark: #b88762; --hl: rgba(255,210,0,.42); --shadow: 0 1px 2px rgba(16,24,40,.06);
}
:root[data-theme="dark"] {
  --bg: #0f1115; --panel: #171a20; --ink: #e9ebef; --mut: #8f97a6; --line: #262b34; --soft: #1e222a;
  --yes: #2fd197; --yes-bg: rgba(47,209,151,.12); --no: #ff6b81; --no-bg: rgba(255,107,129,.11);
  --acc: #7c8cff; --light: #c9b18f; --dark: #8b6a4d; --hl: rgba(255,210,0,.30); --shadow: none;
}
:root[data-theme="midnight"] {
  --bg: #0a1020; --panel: #111a2e; --ink: #e6ecff; --mut: #8b98b8; --line: #1f2a44; --soft: #17223a;
  --yes: #34d3a0; --yes-bg: rgba(52,211,160,.12); --no: #ff7a90; --no-bg: rgba(255,122,144,.11);
  --acc: #6aa8ff; --light: #9fb4d6; --dark: #4f6a96; --hl: rgba(120,200,255,.35); --shadow: none;
}
:root[data-theme="sepia"] {
  --bg: #f3ecdf; --panel: #fbf6ec; --ink: #2e2618; --mut: #7d6f58; --line: #e2d6c0; --soft: #efe5d3;
  --yes: #2f8f5b; --yes-bg: rgba(47,143,91,.11); --no: #b8483c; --no-bg: rgba(184,72,60,.10);
  --acc: #9a5b2e; --light: #f0d9b5; --dark: #b58863; --hl: rgba(205,170,60,.45); --shadow: 0 1px 2px rgba(60,40,10,.07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1115; --panel: #171a20; --ink: #e9ebef; --mut: #8f97a6; --line: #262b34; --soft: #1e222a;
    --yes: #2fd197; --yes-bg: rgba(47,209,151,.12); --no: #ff6b81; --no-bg: rgba(255,107,129,.11);
    --acc: #7c8cff; --light: #c9b18f; --dark: #8b6a4d; --hl: rgba(255,210,0,.30); --shadow: none;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.4 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 12px; }
button:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; }
button.link { border: 0; background: none; padding: 0 0 0 6px; color: var(--acc); font-size: 12px; }
button.primary { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 600; width: 100%; padding: 12px; border-radius: 10px; }
input, select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input { width: 100%; }
small { color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: -.02em; }
.sub { color: var(--mut); font-size: 12px; margin: 0; }
.msg { min-height: 18px; font-size: 13px; margin-top: 8px; }
.msg.err { color: var(--no); } .msg.ok { color: var(--yes); }
.card, section { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -.03em; } .brand span { color: var(--acc); }
.nav { display: flex; gap: 8px; align-items: center; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--mut); font-weight: 500; } .nav a.on { color: var(--ink); background: var(--soft); }
.acct { display: flex; gap: 12px; align-items: center; }
.stat { display: flex; flex-direction: column; align-items: flex-end; } .stat b { font-variant-numeric: tabular-nums; }
#theme { padding: 6px 8px; }

/* ---------- home grid ---------- */
.home { max-width: 1320px; margin: 0 auto; padding: 18px 16px 32px; }
.hhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.gcard:hover { border-color: var(--acc); }
.gtop { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--mut); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--no); box-shadow: 0 0 0 3px var(--no-bg); }
.gp { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; }
.gp .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gp .ck { font: 600 13px ui-monospace, SFMono-Regular, Consolas, monospace; padding: 2px 6px; border-radius: 5px; background: var(--soft); }
.gp .ck.run { background: var(--ink); color: var(--bg); }
.gp .ck.low.run { background: var(--no); color: #fff; }
.gfoot { display: flex; align-items: center; gap: 6px; }
.gfoot .pct { flex: 1; font-size: 12px; color: var(--mut); } .gfoot .pct b { font-size: 16px; color: var(--ink); }
.qb { border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 13px; border: 0; }
.qb.yes { background: var(--yes-bg); color: var(--yes); } .qb.no { background: var(--no-bg); color: var(--no); }
.empty { color: var(--mut); text-align: center; padding: 18px 0; font-size: 13px; }

/* ---------- board ---------- */
.board { background: var(--board-img, none) center / 100% 100% no-repeat, var(--dark); aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border-radius: 6px; overflow: hidden; user-select: none; container-type: inline-size; width: 100%; }
.sq { position: relative; display: flex; align-items: center; justify-content: center; }

.sq.hl::after { content: ''; position: absolute; inset: 0; background: var(--hl); }
.pc { position: relative; z-index: 1; width: 100%; height: 100%; display: block; pointer-events: none; }
.coord { position: absolute; font-size: 2.1cqw; font-weight: 700; opacity: .8; }
.coord.f { right: 3%; bottom: 2%; } .coord.r { left: 3%; top: 2%; }
.coord { color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.9); z-index: 2; }

/* ---------- game page ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 400px); gap: 16px; padding: 14px 16px 32px; max-width: 1240px; margin: 0 auto; align-items: start; }
.banner { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.banner .acts { display: flex; gap: 6px; }
.gamecol { padding: 12px; min-width: 0; }
.player { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px; gap: 8px; }
.player .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttl { color: var(--acc); font-weight: 700; margin-right: 4px; }
.rt { color: var(--mut); font-weight: 400; margin-left: 4px; }
.clock { font: 600 18px/1 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 7px 10px; border-radius: 6px; background: var(--soft); min-width: 78px; text-align: center; }
.clock.run { background: var(--ink); color: var(--bg); }
.clock.low.run { background: var(--no); color: #fff; }
.board-wrap { display: flex; gap: 8px; }
.evalbar { width: 30px; border-radius: 4px; background: #3a3a3a; position: relative; overflow: hidden; flex: none; }
#evalFill { position: absolute; left: 0; right: 0; bottom: 0; background: #f4f4f4; transition: height .4s; }
.gameinfo { color: var(--mut); font-size: 12px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 2px 8px; }
.gameinfo a { color: var(--acc); }
#chart { width: 100%; display: block; }
.side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.side .card { padding: 14px; }
.mhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.q { font-size: 15px; font-weight: 600; }
.fair { text-align: right; } .fair b { font-size: 24px; font-variant-numeric: tabular-nums; display: block; }

/* engine */
.engine { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.erow { display: flex; justify-content: space-between; align-items: center; }
.ebody { font-size: 13px; color: var(--mut); margin-top: 6px; }
.ebody .ev { font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 8px; }
.ebody .pv { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: var(--ink); margin-top: 4px; word-spacing: 2px; }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--acc); }
.switch input:checked + span::before { transform: translateX(16px); }

/* ticket (Kalshi-style) */
.bs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.bs button { border: 0; background: none; padding: 0 0 8px; font-weight: 600; color: var(--mut); border-bottom: 2px solid transparent; border-radius: 0; }
.bs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.outs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.out { display: flex; justify-content: center; align-items: baseline; gap: 6px; padding: 11px 8px; border-radius: 10px; font-weight: 600; border: 1px solid var(--line); background: var(--soft); }
.out b { font-variant-numeric: tabular-nums; }
.out.yes.on { background: var(--yes); border-color: var(--yes); color: #fff; }
.out.no.on { background: var(--no); border-color: var(--no); color: #fff; }
.out.yes:not(.on) { color: var(--yes); } .out.no:not(.on) { color: var(--no); }
.field { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--mut); }
.field > input, .field .step { width: 55%; }
.field input { text-align: right; }
.step { display: flex; } .step input { border-radius: 0; text-align: center; border-left: 0; border-right: 0; }
.step button { padding: 0 11px; border-radius: 8px 0 0 8px; } .step button:last-child { border-radius: 0 8px 8px 0; }
.summary { font-size: 13px; margin: 10px 0; display: grid; gap: 4px; }
.summary div { display: flex; justify-content: space-between; color: var(--mut); } .summary b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* order book (Kalshi-style) */
.obh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.obt { display: flex; background: var(--soft); border-radius: 8px; padding: 2px; }
.obt button { border: 0; background: none; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--mut); border-radius: 6px; }
.obt button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.obcols, .lvl { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; }
.obcols { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); padding: 0 8px 6px; border-bottom: 1px solid var(--line); }
.obcols span:not(:first-child), .lvl span:not(:first-child) { text-align: right; }
.lvl { position: relative; padding: 4px 8px; font-variant-numeric: tabular-nums; cursor: pointer; font-size: 13px; }
.lvl:hover { background: var(--soft); }
.lvl .bar { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 0 3px 3px 0; }
.lvl span { position: relative; z-index: 1; }
.lvl.a .p { color: var(--no); font-weight: 600; } .lvl.a .bar { background: var(--no-bg); }
.lvl.b .p { color: var(--yes); font-weight: 600; } .lvl.b .bar { background: var(--yes-bg); }
.lvl .tag { position: absolute; left: -2px; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; color: #fff; transform: translateX(-100%); }
.lvl.a .tag { background: var(--no); } .lvl.b .tag { background: var(--yes); }
.lvl .mm { font-size: 9px; color: var(--mut); border: 1px solid var(--line); border-radius: 4px; padding: 0 3px; margin-left: 4px; vertical-align: 1px; }
.lvl .me { color: var(--acc); margin-left: 3px; }
.obmid { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); padding: 7px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 2px 0; }
.ob { padding-left: 46px !important; }

/* panes */
.ptabs { display: flex; gap: 4px; margin-bottom: 8px; overflow-x: auto; }
.ptabs button { border: 0; padding: 5px 10px; color: var(--mut); background: transparent; }
.ptabs button.on { color: var(--ink); background: var(--soft); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
td, th { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--line); }
th { font-size: 11px; color: var(--mut); font-weight: 500; }
td:first-child, th:first-child { text-align: left; }
td a { color: var(--acc); }
td .x { padding: 2px 8px; font-size: 12px; }
.pos { color: var(--yes); } .neg { color: var(--no); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 20; font-weight: 500; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); width: min(360px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog form { display: flex; flex-direction: column; gap: 8px; } dialog h3 { margin: 0; }
.arow { display: flex; gap: 6px; } .arow button { flex: 1; }

/* ---------- phone: board on top, order placement below ---------- */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; padding: 10px 16px 28px; gap: 12px; }
  .top { gap: 8px; padding: 8px 16px; flex-wrap: wrap; }
  .nav { order: 3; flex-basis: 100%; }
  .hide-sm { display: none; }
  .gamecol { padding: 10px; }
  #chart { height: 80px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .gcard { padding: 9px; }
  .gfoot { flex-wrap: wrap; } .gfoot .pct { flex-basis: 100%; }
  .qb { flex: 1; }
}
.grid h2.speed { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.grid h2.speed:first-child { margin-top: 0; }

/* board tools */
.btools { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.btools button { padding: 5px 10px; font-size: 13px; }
.evalbar.flip #evalFill { bottom: auto; top: 0; }
/* settings page */
.settings { max-width: 900px; margin: 0 auto; padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.settings .card { padding: 16px; }
.settings h3 { margin: 0 0 12px; font-size: 15px; }
.settings h4 { margin: 4px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); }
.themes { display: flex; gap: 8px; flex-wrap: wrap; }
.themes button.on, .seg2 button.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc); }
.stwrap { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.preview { width: 100%; border-radius: 6px; position: sticky; top: 70px; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-bottom: 12px; }
.pick button { padding: 5px 3px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--mut); border-radius: 8px; overflow: hidden; }
.pick button img { width: 42px; height: 42px; }
.pick button.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc); color: var(--ink); }
.pick .sw { width: 42px; height: 42px; border-radius: 4px; background: center / 100% 100%; display: block; }
.srow { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.srow:first-of-type { border-top: 0; }
.seg2 { display: flex; gap: 6px; }
@media (max-width: 880px) { .stwrap { grid-template-columns: 1fr; } .preview { position: static; max-width: 260px; margin: 0 auto; } }

/* community games, store, keys, docs */
.hhead.comm { margin-top: 30px; }
.connect { padding: 12px; margin-bottom: 14px; }
.crow { display: flex; gap: 8px; } .crow .primary { width: auto; padding: 8px 16px; white-space: nowrap; }
#connRes { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#connRes .found { color: var(--ink); }
.cnote { margin-top: 10px; font-size: 12px; padding: 8px 10px; border-radius: 8px; background: var(--soft); color: var(--mut); }
.buy-coins { background: var(--yes); border-color: var(--yes); color: #fff; font-weight: 700; padding: 6px 12px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pack { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.pack .coins { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pack .bonus { color: var(--yes); font-weight: 700; font-size: 12px; min-height: 16px; }
.pack .primary { margin-top: 6px; }
.keyrow { display: flex; gap: 8px; margin: 10px 0; } .keyrow .primary { width: auto; white-space: nowrap; padding: 8px 14px; }
.newkey { padding: 10px; border-radius: 8px; background: var(--yes-bg); margin: 8px 0; font-size: 13px; }
.newkey code { display: block; word-break: break-all; margin: 6px 0; font-size: 13px; color: var(--ink); }
.docs p { line-height: 1.6; } .docs a { color: var(--acc); }
pre { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
table.ep td { text-align: left; vertical-align: top; } table.ep td:nth-child(1) { color: var(--acc); white-space: nowrap; }
table.ep td:nth-child(2) { white-space: nowrap; } table.ep td:nth-child(3) { color: var(--mut); }
@media (max-width: 880px) { table.ep td:nth-child(2) { white-space: normal; word-break: break-all; } }

/* leaderboard */
.lbtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lbtabs button { font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.lbtabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lbper { display: flex; gap: 4px; flex-wrap: wrap; background: var(--soft); padding: 3px; border-radius: 10px; width: fit-content; }
.lbper button { border: 0; background: none; padding: 5px 12px; font-size: 13px; color: var(--mut); border-radius: 8px; }
.lbper button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
table.lb td, table.lb th { padding: 9px 6px; font-size: 14px; }
table.lb td:first-child { width: 48px; color: var(--mut); font-weight: 600; }
table.lb td:nth-child(2) { text-align: left; font-weight: 600; }
table.lb tr.me td { background: var(--soft); } table.lb tr.me td:nth-child(2)::after { content: ' (you)'; color: var(--acc); font-weight: 500; }
table.lb .medal { font-size: 16px; }
.lbme { margin-top: 10px; font-size: 13px; color: var(--mut); }

.cnote .primary { margin-top: 8px; padding: 8px; font-size: 13px; }
.cnote b { color: var(--ink); }
#spDlg label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink); margin-top: 6px; }

#evalNum { position: absolute; left: 0; right: 0; text-align: center; font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; z-index: 1; padding: 4px 0; }
#evalNum.lo { bottom: 0; } #evalNum.hi { top: 0; }
#evalNum.onw { color: #333; } #evalNum.onb { color: #eee; }
@media (max-width: 880px) { .evalbar { width: 24px; } #evalNum { font-size: 9px; } }

/* board size: never taller than the screen (header + both player bars + tools stay visible), capped on big screens */
.gamecol { --bw: min(100%, 620px, calc(100dvh - 250px)); }
.gamecol > .btools, .gamecol > .player, .gamecol > .board-wrap, .gamecol > .gameinfo, .gamecol > #chart { width: var(--bw); min-width: 260px; max-width: 100%; margin-left: auto; margin-right: auto; }
@media (max-width: 880px) { .gamecol { --bw: min(100%, calc(100dvh - 190px)); } }

/* chat */
.homegrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.lobbychat { position: sticky; top: 70px; }
.chat { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chh { display: flex; justify-content: space-between; align-items: center; }
.chmsgs { height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; padding-right: 4px; }
.lobbychat .chmsgs { height: calc(100dvh - 220px); min-height: 260px; }
.chmsg { line-height: 1.35; word-wrap: break-word; }
.chmsg b { color: var(--acc); font-weight: 600; margin-right: 4px; }
.chmsg .t { color: var(--mut); font-size: 10px; margin-left: 4px; }
.chmsg.mine b { color: var(--yes); }
.chin { display: flex; gap: 6px; } .chin input { flex: 1; padding: 7px 10px; } .chin button { padding: 6px 12px; }
.chnote { font-size: 12px; color: var(--mut); }
@media (max-width: 1100px) { .homegrid { grid-template-columns: 1fr; } .lobbychat { position: static; } .lobbychat .chmsgs { height: 260px; } }

/* home grid: 4 / 3 / 2 columns (12 games fill every row evenly); sized by the space the grid actually has */
.homemain { container-type: inline-size; min-width: 0; }
.homemain .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@container (max-width: 960px) { .homemain .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 640px) { .homemain .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* phone header: one scrollable nav row, compact random button */
.nav { overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
.nav a, .nav button { white-space: nowrap; flex: none; }
#random { padding: 6px 10px; }
@media (max-width: 520px) { .rnd-t { display: none; } .nav { gap: 2px; } .nav a { padding: 6px 8px; } .stat small { display: none; } }
.grid > .empty { grid-column: 1 / -1; }

.in-app .buy-coins { display: none; }

@media (max-width: 400px) { .brand { font-size: 16px; } }

/* order type */
.otype { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.seg2.sm { background: var(--soft); border-radius: 8px; padding: 2px; gap: 0; }
.seg2.sm button { border: 0; background: none; padding: 5px 14px; font-size: 13px; font-weight: 600; color: var(--mut); border-radius: 6px; box-shadow: none; }
.seg2.sm button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); border: 0; }
.po { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 13px; color: var(--ink) !important; cursor: pointer; }
.po input { width: auto; margin: 0; accent-color: var(--acc); }

/* game page: chat left | board | trading on wide screens; chat as an expandable button under the game on small ones */
#game.layout { max-width: 1480px; grid-template-columns: 270px minmax(0, 1.2fr) minmax(330px, 390px);
  grid-template-areas: "banner banner banner" "chat game side"; }
#game .banner { grid-area: banner; } #game .gamecol { grid-area: game; } #game .side { grid-area: side; }
#game .gamechat { grid-area: chat; position: sticky; top: 70px; }
#game .gamechat .chmsgs { height: calc(100dvh - 200px); min-height: 240px; }
.chtoggle { all: unset; display: flex; align-items: center; gap: 8px; cursor: default; }
.chtoggle .chev { display: none; margin-left: auto; color: var(--mut); transition: transform .2s; }
.chbody { display: flex; flex-direction: column; gap: 8px; }
.unread { background: var(--no); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
@media (max-width: 1180px) {
  #game.layout { grid-template-columns: minmax(0, 1.2fr) minmax(320px, 390px);
    grid-template-areas: "banner banner" "game side" "chat side"; }
  #game .gamechat { position: static; align-self: start; }
  .chtoggle { cursor: pointer; width: 100%; } .chtoggle .chev { display: inline; }
  #game .gamechat:not(.open) .chbody { display: none; }
  #game .gamechat.open .chev { transform: rotate(180deg); }
  #game .gamechat .chmsgs { height: 260px; min-height: 0; }
}
@media (max-width: 880px) {
  #game.layout { grid-template-columns: 1fr; grid-template-areas: "banner" "game" "chat" "side"; }
}

.acct .stat + .stat { margin-left: 14px; }

/* footer + legal pages */
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; padding: 18px 16px 28px; font-size: 11px; color: var(--mut); }
.foot a { color: var(--mut); text-decoration: underline; text-underline-offset: 2px; } .foot a:hover { color: var(--ink); }
.legal { max-width: 760px; margin: 0 auto; padding: 22px 16px 48px; line-height: 1.6; }
.legal h1 { font-size: 26px; } .legal h2 { font-size: 16px; margin: 26px 0 6px; }
.legal p, .legal li { font-size: 14px; } .legal ul { padding-left: 20px; } .legal li { margin: 4px 0; }
.legal a { color: var(--acc); }

/* account page + sign out */
.so { padding: 6px 10px; font-size: 13px; color: var(--mut); }
.acchead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.accname { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.accbtns { display: flex; gap: 8px; } .accbtns button { padding: 8px 14px; }
.accstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.accstats div { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.accstats small { display: block; margin-bottom: 2px; } .accstats b { font-size: 18px; font-variant-numeric: tabular-nums; }
#keysCard a { color: var(--acc); }
@media (max-width: 520px) { .so { display: none !important; } }

/* header stats link to positions */
a.stat { color: inherit; text-decoration: none; border-radius: 8px; padding: 2px 6px; margin: -2px -6px; }
a.stat:hover { background: var(--soft); }
.accstats a { color: inherit; text-decoration: none; display: block; } .accstats a:hover div { outline: 1px solid var(--acc); }
#positions .chh h3 { margin: 0 0 8px; } #positions td a { color: var(--acc); }

/* portfolio page (Kalshi-style) */
.pf { gap: 12px; }
.pfhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 6px 2px; }
.pfbig { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pfside { display: flex; gap: 22px; } .pfside div { display: flex; flex-direction: column; } .pfside b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pftabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.pftabs button { border: 0; background: none; border-radius: 0; padding: 8px 0; font-weight: 600; color: var(--mut); border-bottom: 2px solid transparent; }
.pftabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.pftabs span { color: var(--mut); font-weight: 500; margin-left: 2px; }
.pfbody { padding: 4px 14px 10px; overflow-x: auto; }
.pfbody table { min-width: 640px; } .pfbody th { padding-top: 12px; }
.pfbody td a { color: var(--ink); font-weight: 600; } .pfbody td a:hover { color: var(--acc); }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }
.chip.yes { background: var(--yes-bg); color: var(--yes); } .chip.no { background: var(--no-bg); color: var(--no); }
.closebtn { padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pfbody .ret small { display: block; font-size: 11px; text-transform: none; letter-spacing: 0; }

/* daily bonus pop-up */
dialog.daily { text-align: center; width: min(340px, calc(100vw - 32px)); }
dialog.daily form { align-items: stretch; gap: 10px; }
.coinburst { display: flex; justify-content: center; margin-top: 4px; }
.coin { font-size: 56px; line-height: 1; display: inline-block; animation: coinpop .7s ease-out, coinspin 2.4s ease-in-out .7s infinite; }
@keyframes coinpop { 0% { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes coinspin { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }
.dailyamt { font-size: 34px; font-weight: 800; color: var(--yes); letter-spacing: -.02em; }
.dailyamt span { font-size: 16px; font-weight: 600; color: var(--mut); }
dialog.daily h3 { margin: 0; }
@media (prefers-reduced-motion: reduce) { .coin { animation: none; } }

/* notifications bell */
.bellwrap { position: relative; }
.bell { padding: 6px 9px; font-size: 16px; line-height: 1; position: relative; }
.bell .badge { position: absolute; top: -4px; right: -4px; background: var(--no); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.bellpanel { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-height: 70vh; overflow-y: auto; z-index: 30;
  padding: 0; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.bph { padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.note { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13px; line-height: 1.35; }
.note:hover { background: var(--soft); } .note.unread { background: color-mix(in srgb, var(--acc) 9%, transparent); }
.note .ic { width: 24px; height: 24px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.note .ic.win { background: var(--yes-bg); color: var(--yes); } .note .ic.loss { background: var(--no-bg); color: var(--no); }
.note .ic.void, .note .ic.even { background: var(--soft); color: var(--mut); }
.note .t { color: var(--mut); font-size: 11px; margin-top: 2px; }
@media (max-width: 520px) { .bellpanel { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; } }

/* narrow phones: keep the header on one row (compact coins button, shortened username) */
@media (max-width: 520px) {
  .acct { gap: 6px; }
  .buy-coins { font-size: 0; padding: 6px 10px; } .buy-coins::before { content: '+ 🪙'; font-size: 13px; }
  #who { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 8px; }
  .bell { padding: 5px 7px; }
  .brand { font-size: 16px; }
}

/* who each side is betting on */
.out { flex-wrap: wrap; row-gap: 1px; }
.out .who { flex-basis: 100%; font-size: 11px; font-weight: 500; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.qb { display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-width: 0; }
.qb small { font-size: 10px; font-weight: 500; opacity: .8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; color: inherit; }
.gfoot .qb { flex: 1 1 0; max-width: 46%; }
.out .who, .qb small { color: inherit !important; }

/* engine card on its own; fair value + draw rule in the ticket */
.engine.solo { margin-top: 0; padding-top: 0; border-top: 0; }
.cnote:not([hidden]) + .engine.solo { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bs { align-items: flex-end; }
.fairtag { margin-left: auto; padding-bottom: 8px; font-size: 12px; color: var(--mut); }
.fairtag b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 3px; }
.drawnote { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; padding: 7px 10px; border-radius: 8px;
  background: var(--soft); font-size: 12.5px; color: var(--ink); }
.drawnote b { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); font-size: 12px; }

/* finished-game playback */
.gamecol > .replay { width: var(--bw); min-width: 260px; max-width: 100%; margin: 6px auto 0; }
.rpbar { display: flex; align-items: center; gap: 6px; }
.rpbar button { padding: 5px 10px; font-size: 13px; }
.rpbar input[type=range] { flex: 1; accent-color: var(--acc); padding: 0; border: 0; background: none; }
.rpmoves { margin-top: 8px; max-height: 120px; overflow-y: auto; font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
  padding: 6px 8px; background: var(--soft); border-radius: 8px; }
.rpmoves .n { color: var(--mut); margin-right: 3px; }
.rpmoves .mv { cursor: pointer; padding: 1px 4px; border-radius: 4px; margin-right: 2px; }
.rpmoves .mv:hover { background: var(--panel); } .rpmoves .mv.on { background: var(--acc); color: #fff; }

/* follow stars, share, iPhone install hint, trade dots */
.fol { border: 0; background: none; padding: 0 4px; font-size: 15px; color: var(--mut); line-height: 1; }
.fol.on { color: #f5b301; } .fol:hover { color: #f5b301; }
#share { margin-left: auto; }
.ioshint { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 25; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ioshint button { padding: 4px 8px; margin-left: auto; }
.shareic { display: inline-block; transform: rotate(-90deg); }
#folList .frow { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
#folList a { color: var(--acc); }

/* market tabs on a game: Winner / Draw / Over-Under */
.mtabs { display: flex; gap: 4px; background: var(--soft); border-radius: 10px; padding: 3px; }
.mtabs a { flex: 1; text-align: center; padding: 7px 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--mut);
  text-decoration: none; white-space: nowrap; }
.mtabs a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.mtabs a small { display: block; font-weight: 500; font-size: 11px; color: var(--mut); }
.gside { display: flex; gap: 10px; font-size: 11px; color: var(--mut); margin-top: -2px; }
.gside b { color: var(--ink); font-weight: 600; }

/* Titled Tuesday */
.ttbanner { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px;
  text-decoration: none; color: var(--ink); border-color: var(--acc); }
.ttbanner b { font-size: 15px; } .ttbanner .sub { margin-top: 2px; } .ttbanner .go { color: var(--acc); font-weight: 700; white-space: nowrap; }
.ttcol { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ttcol .ttname { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.ttcol .ttq { font-size: 15px; }
.ttcol .accstats { margin-top: 4px; }
.ttcol .ttlinks a { color: var(--acc); margin-right: 12px; }
.ttcol .ttmk { display: flex; gap: 6px; flex-wrap: wrap; }
.ttcol .ttmk a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 13px; }
.ttcol .ttmk a.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
#ttBody td a.pl { color: var(--ink); font-weight: 600; } #ttBody .qb { display: inline-flex; padding: 5px 10px; }

/* White / Black buttons: black-and-white instead of green / red (winner markets and game cards) */
.outs.bw .out { border-width: 2px; transition: box-shadow .15s; }
.outs.bw .out.yes, .outs.bw .out.yes.on, .gfoot .qb.yes { background: #f5f5f2; color: #16181c; border-color: #d9d9d4; }
.outs.bw .out.no, .outs.bw .out.no.on, .gfoot .qb.no { background: #121316; color: #f5f5f2; border-color: #3a3d45; }
.outs.bw .out.on { box-shadow: 0 0 0 3px var(--acc); }
.outs.bw .out:not(.on):hover { box-shadow: 0 0 0 1px var(--acc); }
.outs.bw .out .who { opacity: .75; }
.gfoot .qb.yes, .gfoot .qb.no { border: 1px solid; }
.gfoot .qb.yes { border-color: #d9d9d4; } .gfoot .qb.no { border-color: #3a3d45; }
.gfoot .qb:hover { filter: brightness(.95); }

/* make the chosen side obvious: check badge, thick outline + lift; the other side's text dimmed */
.outs.bw .out { position: relative; }
.outs.bw .out.on { box-shadow: 0 0 0 3px var(--acc), 0 8px 18px rgba(0,0,0,.28); transform: translateY(-2px); }
.outs.bw .out.on::after { content: '✓'; position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--acc); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--panel); }
.outs.bw .out:not(.on) > * { opacity: .45; }
.outs.bw .out:not(.on):hover > * { opacity: .8; }

#place .pbname { display: block; font-size: 12px; font-weight: 500; opacity: .9; margin-top: 2px; color: inherit; text-transform: none; letter-spacing: 0; }
#place { line-height: 1.25; }

/* Titled Tuesday page: table + trading panel on the right */
.ttgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; align-items: start; }
.ttmain { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ttside { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 12px; }
.ttside .side { display: flex; flex-direction: column; gap: 12px; }
.ttpick { padding: 14px; font-size: 14px; } .ttpick .nm { font-size: 18px; font-weight: 800; } .ttpick .sub a { color: var(--acc); }
#ttBody tr.sel td { background: color-mix(in srgb, var(--acc) 12%, transparent); }
@media (max-width: 980px) { .ttgrid { grid-template-columns: 1fr; } .ttside { position: static; } }

/* guest name above the Sign in button */
.whowrap { display: flex; flex-direction: column; align-items: center; gap: 1px; }
#guestName { font-size: 10px; text-transform: none; letter-spacing: 0; color: var(--mut); line-height: 1; }

.claimstart { padding: 7px 12px; animation: claimpulse 1.6s ease-in-out infinite; white-space: nowrap; }
@keyframes claimpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,209,151,.55); } 50% { box-shadow: 0 0 0 7px rgba(47,209,151,0); } }
@media (prefers-reduced-motion: reduce) { .claimstart { animation: none; } }
@media (max-width: 520px) { .claimstart { font-size: 12px; padding: 6px 9px; } }

/* home: lobby chat | games | bet panel */
.home { max-width: 1680px; }
.homegrid { grid-template-columns: 260px minmax(0, 1fr) 360px; }
.homeside { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100dvh - 86px); overflow-y: auto; }
.homeside .side { display: flex; flex-direction: column; gap: 12px; }
.homepick .x { float: right; padding: 2px 8px; }
.gcard.picked { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.gfoot { gap: 8px; }
.gfoot .qb { flex: 1 1 0; max-width: none; padding: 10px 6px; font-size: 16px; font-weight: 700; border-radius: 10px; cursor: pointer; }
.gfoot .qb small { font-size: 11px; }
@media (max-width: 1400px) { .homegrid { grid-template-columns: 220px minmax(0, 1fr) 330px; } }
@media (max-width: 1180px) {
  .homegrid { grid-template-columns: minmax(0, 1fr) 340px; }
  .homegrid > .lobbychat { grid-column: 1 / -1; order: 3; }
}
/* phones / narrow: the bet panel is a sheet that slides up from the bottom */
@media (max-width: 880px) {
  .homegrid { grid-template-columns: 1fr; }
  .homeside { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; max-height: 78dvh; padding: 10px 12px 14px;
    background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0,0,0,.4); border-radius: 16px 16px 0 0;
    transform: translateY(105%); transition: transform .25s ease; }
  .homeside.open { transform: none; }
}

/* card White/Black buttons: full width, normal height and font */
.gfoot .qb { padding: 5px 6px; font-size: 13px; font-weight: 600; border-radius: 8px; line-height: 1.15; }
.gfoot .qb small { font-size: 10px; }

/* people: name menu, profile, messages */
[data-user] { cursor: pointer; } [data-user]:hover { text-decoration: underline; }
.umenu { position: fixed; z-index: 50; padding: 6px; display: flex; flex-direction: column; min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.umenu b { padding: 6px 10px 4px; font-size: 13px; }
.umenu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.umenu button:hover { background: var(--soft); }
.dmbtn { position: relative; padding: 6px 9px; font-size: 16px; line-height: 1; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; }
.dmbtn .badge { position: absolute; top: -4px; right: -4px; background: var(--no); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.profhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.profhead .accname { font-size: 26px; } .profhead .acts { display: flex; gap: 8px; }
.msgs { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; max-width: 1100px; margin: 0 auto; padding: 18px 16px 30px; }
.msglist, .msgthread { padding: 12px; } .msgthread { display: flex; flex-direction: column; gap: 8px; }
.msgthread .chmsgs { height: calc(100dvh - 260px); min-height: 260px; }
.thr { display: block; padding: 9px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.thr:hover, .thr.on { background: var(--soft); } .thr .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr .badge { background: var(--no); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
.dm { max-width: 78%; padding: 7px 10px; border-radius: 12px; background: var(--soft); font-size: 13.5px; align-self: flex-start; }
.dm.mine { align-self: flex-end; background: var(--acc); color: #fff; } .dm .t { display: block; font-size: 10px; opacity: .7; margin-top: 2px; }
#dmThread { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .msgs { grid-template-columns: 1fr; } .msgthread .chmsgs { height: 50dvh; } }

/* speed filter bar */
.speedbar { margin: -4px 0 12px; } .speedbar button span { color: var(--mut); font-weight: 500; margin-left: 3px; }
.badge .v960 { color: var(--acc); }

/* live player search */
.sugwrap { position: relative; flex: 1; min-width: 0; } .sugwrap input { width: 100%; }
.sugs { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; padding: 4px; max-height: 360px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.sug { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.sug:hover, .sug.on { background: var(--soft); }
.sug .tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.sug .tag.here { background: var(--acc); color: #fff; } .sug .tag.live { background: var(--yes-bg); color: var(--yes); } .sug .tag.on { color: var(--mut); }

/* bug / feedback */
.fbbtn { background: none; border: 0; color: var(--mut); font-size: 11px; padding: 2px 4px; cursor: pointer; text-decoration: underline; white-space: nowrap; }
.fbbtn:hover { color: var(--fg); }
#fbDlg textarea { width: 100%; box-sizing: border-box; margin: 10px 0 6px; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--fg); resize: vertical; }
#fbDlg .row { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) { .fbbtn { font-size: 10px; } }
/* followed player boxes */
.chanrow:empty { display: none; }
.chanrow { margin-bottom: 14px; }
.chanbox { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--acc); border-radius: 14px; background: var(--card); }
.chanbox .chh { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.chanbox .chh b { font-size: 15px; } .chanbox .chh .sub { font-size: 11px; }
.chanbox .gcard { border: 0; padding: 0; box-shadow: none; }
.chanbox .wait { padding: 30px 10px; text-align: center; color: var(--mut); font-size: 14px; }
.chanbox .x { padding: 2px 8px; }
.follow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.follow select { padding: 6px 8px; border-radius: 8px; background: var(--soft); color: var(--fg); border: 1px solid var(--line); }
