:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #edf2ec;
  background: #101512;
  font-synthesis: none;
  --bg: #101512;
  --sidebar: #141a16;
  --surface: #191f1b;
  --field: #121814;
  --stroke: #303b33;
  --muted: #a5b1a7;
  --dim: #89988c;
  --accent: #c2f28e;
  --accent-ink: #192817;
  --soft: #293a26;
  --red: #f5a59f;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; font-size: 1rem; }
h1, h2, h3, p, dl, dd, ul, fieldset { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
input, button, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { flex: none; width: 19px; height: 19px; vertical-align: middle; }
.loading { padding: 2rem; color: var(--muted); }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.muted { color: var(--muted); line-height: 1.5; }

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; gap: 2.55rem; min-width: 0;
  position: sticky; top: 0; height: 100dvh; padding: 1.75rem 1.1rem 1.15rem;
  border-right: 1px solid var(--stroke); background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: .75rem; padding-inline: .4rem; white-space: nowrap; }
.brand-mark { display: block; flex: none; }
.brand strong { display: block; font-size: 1.13rem; letter-spacing: -.025em; line-height: 1.25; }
.brand span { display: block; margin-top: .16rem; font-size: .78rem; color: var(--muted); }
.sidebar nav { display: grid; gap: .38rem; }
.nav-item {
  display: flex; align-items: center; gap: .72rem; min-height: 44px; padding: .63rem .78rem;
  border: 1px solid transparent; border-radius: 9px; color: var(--muted); font-size: .92rem; font-weight: 600;
}
.nav-item:hover { color: #edf2ec; background: #222b24; }
.nav-item.selected { background: #243222; border-color: #374c31; color: var(--accent); }
.sidebar-bottom { display: flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: .95rem; border-top: 1px solid var(--stroke); }
.account-button { min-width: 0; flex: 1; display: flex; align-items: center; gap: .63rem; padding: .35rem; color: inherit; text-align: left; background: transparent; border: 0; border-radius: 8px; }
.account-button:hover { background: #242d25; }
.account-text { min-width: 0; }
.account-text strong, .account-text span { display: block; overflow: hidden; text-overflow: ellipsis; }
.account-text strong { font-size: .86rem; }
.account-text span { font-size: .75rem; color: var(--muted); }
.avatar { display: inline-grid; justify-content: center; align-content: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: #2b392d; color: #cde2ca; }
.avatar .icon { width: 16px; height: 16px; }
.topbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding-inline: clamp(1.55rem, 3.3vw, 3.75rem); border-bottom: 1px solid var(--stroke); }
.crumb { display: flex; gap: .7rem; align-items: center; font-size: .88rem; font-weight: 600; }
.crumb span { color: var(--dim); font-weight: 500; }
.top-mobile-actions { display: none; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.switch-area, .auth-link { color: var(--accent); font-size: .88rem; font-weight: 600; }
.switch-area:hover, .auth-link:hover { text-decoration: underline; }
.auth-link { display: inline-block; margin-top: 1rem; }
.content { max-width: 1320px; margin-inline: auto; padding: 2.15rem clamp(1.55rem, 3.3vw, 3.75rem) 3.5rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.65rem; }
h1 { font-size: clamp(2.35rem, 3.5vw, 3.1rem); font-weight: 680; line-height: 1.06; letter-spacing: -.055em; overflow-wrap: anywhere; }
.page-head p { margin-top: .63rem; color: var(--muted); font-size: 1rem; line-height: 1.45; }

.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(264px, 318px); gap: 1rem; align-items: start; }
.setup-aside { display: grid; gap: 1rem; min-width: 0; }
.panel { min-width: 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); }
.panel-heading { display: flex; align-items: center; gap: .72rem; margin-bottom: 1.03rem; }
.panel-heading h2, .empty-state h2, .dialog-heading h2 { font-size: 1.14rem; line-height: 1.25; font-weight: 670; letter-spacing: -.018em; }
.panel-heading p { color: var(--muted); margin-top: .25rem; font-size: .88rem; line-height: 1.4; }
.section-icon { display: inline-grid; place-items: center; width: 37px; height: 37px; flex: none; border-radius: 8px; color: var(--accent); background: #2a3928; }
.section-icon .icon { width: 18px; height: 18px; }
.field-row { display: grid; gap: .75rem; }
.setup-identity { grid-template-columns: minmax(140px, .8fr) minmax(0, 1.2fr); }
.game-prices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.role-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(110px, 1fr); gap: .85rem; }
label, legend { display: block; color: #d2dbd1; font-size: .875rem; font-weight: 550; line-height: 1.3; min-width: 0; }
.optional { color: var(--dim); font-weight: 400; }
input:not([type="radio"]):not([type="checkbox"]), select {
  width: 100%; min-width: 0; height: 43px; padding: .55rem .69rem; color: #edf2ec;
  border: 1px solid #3c483e; border-radius: 8px; background: var(--field); font-size: 1rem; font-weight: 500;
}
input::placeholder { color: #89978b; opacity: 1; }
input:hover, select:hover { border-color: #667a65; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }
select { margin-top: .41rem; appearance: none; padding-right: 1.8rem;
  background-image: linear-gradient(45deg, transparent 49%, #a5b1a7 51%), linear-gradient(135deg, #a5b1a7 49%, transparent 51%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.field-input, .password-input { position: relative; margin-top: .41rem; }
.has-unit input, .password-input input { padding-right: 2.15rem; }
.has-unit span { position: absolute; top: 50%; right: .74rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.password-input .icon-button { position: absolute; right: 3px; top: 3px; min-height: 37px; }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .75rem; margin: .94rem 0 .7rem; }
.preset-row > span { font-size: .86rem; color: var(--muted); }
.preset-row > div, .filters { display: flex; flex-wrap: wrap; gap: .38rem; }
.preset { min-height: 32px; padding: .3rem .65rem; color: var(--muted); background: transparent; border: 1px solid #3b493d; border-radius: 7px; font-size: .815rem; font-weight: 600; white-space: nowrap; }
.preset:hover { border-color: #85997f; color: #edf2ec; }
.preset[aria-pressed="true"] { border-color: #5b784d; background: #283825; color: var(--accent); }

.player-rows { display: grid; gap: .5rem; }
.player-input { display: flex; align-items: center; gap: .55rem; }
.player-number { display: grid; place-items: center; flex: 0 0 32px; height: 32px; background: #222c24; color: var(--muted); border-radius: 7px; font-size: .84rem; font-weight: 600; }
.player-input input { flex: 1; }
.add-player { margin-top: .78rem; }
.signup-option { display: flex; align-items: flex-start; gap: .6rem; margin-top: 1rem; }
.signup-option input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; margin: 0; }
.signup-option small { display: block; color: var(--muted); margin-top: .25rem; }
#reload-setup { margin-top: .65rem; }
.icon-button { flex: none; display: inline-grid; place-items: center; min-width: 37px; min-height: 40px; padding: .4rem; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted); }
.icon-button:hover { color: #edf2ec; border-color: var(--stroke); background: #242e26; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 43px; padding: .6rem .86rem; border: 1px solid transparent; border-radius: 8px; font-size: .91rem; line-height: 1.2; font-weight: 680; text-align: center; white-space: nowrap; }
.button .icon { width: 17px; height: 17px; }
.button.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: #d3ffab; border-color: #d3ffab; }
.button.secondary { background: transparent; border-color: #3e4b40; color: #dce7db; }
.button.secondary:hover:not(:disabled) { background: #273127; border-color: #657b60; }
.button.danger { color: #2f1514; background: var(--red); }
.button.danger:hover { background: #ffbbb6; }

.summary-panel { border-color: #40503f; background: linear-gradient(158deg, #263326, #1a231c 60%); }
.big-number { font-size: clamp(2.2rem, 3.1vw, 2.85rem); line-height: 1.06; margin: .04rem 0 .94rem; color: var(--accent); font-weight: 680; letter-spacing: -.06em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bank-amounts { display: grid; grid-template-columns: 1.15fr 1.15fr 1fr; gap: .5rem; container-type: inline-size; margin: .05rem 0 1rem; }
.bank-amounts > div { min-width: 0; }
.bank-amounts dt { color: var(--muted); font-size: .82rem; }
.bank-amounts dd { font-size: clamp(1.05rem, 7.2cqi, 1.6rem); letter-spacing: -.05em; font-weight: 680; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-top: .15rem; }
.bank-amounts > div:first-child dd { color: var(--accent); font-size: clamp(1.23rem, 8.55cqi, 1.9rem); }
.details { display: grid; font-size: .87rem; }
.details > div { display: flex; justify-content: space-between; gap: .65rem; align-items: baseline; padding-top: .56rem; padding-bottom: .56rem; border-top: 1px solid var(--stroke); }
.details > div:last-child { padding-bottom: 0; }
.details dt { color: var(--muted); }
.details dd { font-weight: 630; text-align: right; font-variant-numeric: tabular-nums; }
.summary-actions { display: grid; gap: .55rem; margin-top: 1.08rem; }
.summary-panel .error { margin-top: .8rem; }
.rate-panel .panel-heading { margin-bottom: .74rem; }
.error { color: var(--red); background: #33231f; border: 1px solid #6f433d; border-radius: 8px; padding: .69rem .78rem; font-size: .9rem; line-height: 1.36; }
.badge { padding: .35rem .67rem; display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 640; white-space: nowrap; border: 1px solid var(--stroke); border-radius: 100px; color: var(--muted); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.status-active { color: var(--accent); background: #263622; border-color: #465d3e; }
.status-finished { color: #bdcec2; background: #26322b; border-color: #46584d; }
.status-draft { color: #ded2b0; background: #302b20; border-color: #5a4d35; }

.live-players { display: grid; gap: .55rem; }
.live-player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .65rem; padding: .64rem; width: 100%; min-height: 63px; background: var(--field); border: 1px solid #3a483c; border-radius: 9px; text-align: left; color: inherit; }
.player-avatar { background: #2e3d2c; color: var(--accent); font-weight: 650; }
.live-name strong, .live-name > span:not(.role-tag) { display: block; overflow-wrap: anywhere; }
.live-name > span:not(.role-tag) { color: var(--muted); font-size: .82rem; margin-top: .16rem; }
.live-paid { white-space: nowrap; font-size: .92rem; font-variant-numeric: tabular-nums; }
.rebuy-actions { display: flex; align-items: center; gap: .35rem; }
.button.quick-rebuy { min-height: 42px; padding-inline: .55rem; color: var(--accent); background: #293a26; border-color: #425b3b; }
.button.quick-rebuy:hover:not(:disabled) { background: #364e2f; border-color: #769465; }
.rebuy-more { min-width: 42px; height: 42px; padding: 0; border-color: #3a483c; font-size: 1.35rem; line-height: 1; }
.role-tag { width: max-content; display: inline-block; margin: .3rem .32rem 0 0; padding: .16rem .38rem; border-radius: 4px; background: #2a382a; color: #c2d9bd; font-size: .73rem; font-weight: 550; }
.finish-panel .button { width: 100%; margin-top: .95rem; }
.finish-panel .muted { font-size: .92rem; }
.empty-inline { color: var(--muted); padding-bottom: .2rem; font-size: .92rem; }
.rebuy-log li { display: grid; grid-template-columns: minmax(42px, auto) minmax(0, 1fr) auto auto; gap: .68rem; align-items: center; padding: .56rem 0; border-top: 1px solid var(--stroke); }
.log-time, .log-name span, .log-amount span { font-size: .81rem; color: var(--muted); }
.log-name { min-width: 0; overflow-wrap: anywhere; }
.log-name strong, .log-amount strong { display: block; font-size: .92rem; }
.log-amount { text-align: right; white-space: nowrap; }
.log-panel .icon-button { min-height: 35px; }

.filters { margin-bottom: 1rem; }
.filters .preset { padding: .42rem .78rem; min-height: 37px; font-size: .88rem; }
.history-list { gap: .65rem; }
.history-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(92px, auto); align-items: center; gap: .75rem; }
.history-item:hover { border-color: #708a69; background: #212b22; }
.history-details { min-width: 0; overflow-wrap: anywhere; }
.history-details strong, .history-details span, .history-details small { display: block; }
.history-details span, .history-details small { color: var(--muted); font-size: .85rem; margin-top: .16rem; }
.history-bank { text-align: right; white-space: nowrap; }
.empty-state { display: grid; gap: .56rem; justify-items: center; text-align: center; padding-block: 3rem; color: var(--muted); }
.empty-state h2 { color: #edf2ec; }
.empty-state .section-icon { margin-bottom: .4rem; }
.users-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.account-list li { display: flex; align-items: center; gap: .7rem; padding: .65rem 0; border-top: 1px solid var(--stroke); overflow-wrap: anywhere; }
.account-list li div > span { display: block; margin-top: .1rem; color: var(--muted); font-size: .86rem; }
.account-actions, .profile-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.profile-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-panel { max-width: 600px; }
.signup-game { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .75rem; }
.signup-details h3 { margin-bottom: .3rem; overflow-wrap: anywhere; }
.signup-details p, .current-game > span, .player-game-log summary > div > span { color: var(--muted); font-size: .88rem; margin-top: .18rem; }
.signup-actions { display: grid; gap: .45rem; justify-items: end; }
.current-game { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: .4rem; padding: .45rem 0; }
.list-title { font-size: 1.15rem; }
.player-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.player-game-log summary { display: flex; justify-content: space-between; align-items: center; gap: .6rem; cursor: pointer; list-style: none; }
.player-game-log summary > div > strong, .player-game-log summary > div > span { display: block; }
.player-game-log summary::after { content: '+'; font-size: 1.3rem; color: var(--accent); }
.player-game-log[open] summary::after { content: '−'; }
.player-game-log summary > div:first-child { flex: 1; }
.player-game-log .details, .player-game-log .empty-inline, .player-game-log h3 { margin-top: .75rem; }
.player-game-log .rebuy-log { margin-top: .35rem; }

.result-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.metric > span { display: block; color: var(--muted); font-size: .9rem; }
.metric > strong { display: block; font-size: clamp(1.55rem, 2.4vw, 2.25rem); letter-spacing: -.05em; margin-top: .3rem; overflow-wrap: anywhere; }
.metric:first-child > strong { color: var(--accent); }
.metric .details { margin-top: .65rem; }
.table-wrap { overflow-x: auto; }
.result-table { border-collapse: collapse; width: 100%; font-size: .89rem; }
.result-table td, .result-table th { text-align: right; padding: .73rem .55rem; border-bottom: 1px solid var(--stroke); }
.result-table td { white-space: nowrap; }
.result-table thead th { color: var(--muted); font-weight: 550; }
.result-table th:first-child { text-align: left; min-width: 115px; max-width: 210px; overflow-wrap: anywhere; }
.result-table tbody th { font-weight: 620; }
.result-table th .role-tag { display: block; }
.result-table td small { display: block; color: var(--muted); }
.result-table td small:empty { display: none; }
.result-fees div + div { margin-top: .35rem; }
.result-table .stack-input { min-width: 85px; max-width: 128px; text-align: right; font-variant-numeric: tabular-nums; }
.result-table .stack-input.blank-stack { border-color: #786341; background: #28251b; }
.result-table .stack-input[aria-invalid="true"] { border-color: var(--red); }
.settlement-editor .table-wrap { margin-top: .65rem; }
.table-wrap + .quote { margin-top: .7rem; }
.settlement-actions { display: flex; gap: .55rem; justify-content: flex-end; }
section > .settlement-actions { margin-top: .7rem; }
.result-table tr:last-child td, .result-table tr:last-child th[scope="row"] { border-bottom: 0; }
.net { font-size: 1rem; font-weight: 720; }
.positive { color: var(--accent); }
.negative { color: var(--red); }
.neutral { color: var(--muted); }

dialog { width: min(calc(100% - 1.6rem), 480px); max-height: calc(100dvh - 2rem); padding: 1.25rem; color: #edf2ec; background: #1c251e; border: 1px solid #465747; border-radius: var(--radius); box-shadow: 0 14px 65px #0009; }
dialog::backdrop { background: #080d0ace; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin: -.12rem -.15rem .7rem 0; }
.dialog-heading h2 { font-size: 1.32rem; overflow-wrap: anywhere; }
.dialog-actions { display: flex; gap: .55rem; justify-content: flex-end; }
fieldset { border: 0; padding: 0; min-width: 0; }
.rebuy-options { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .55rem; }
.rebuy-option { display: grid; grid-template-columns: auto 1fr; gap: .22rem .45rem; padding: .65rem; border: 1px solid #445345; border-radius: 8px; cursor: pointer; background: var(--field); }
.rebuy-option input { appearance: auto; accent-color: var(--accent); margin: 0; }
.rebuy-option strong { grid-column: 2; font-size: .88rem; }
.rebuy-option:has(input:checked) { color: var(--accent); border-color: #7f9e68; background: #293925; }
.quote { padding: .7rem; font-size: .91rem; border: 1px solid var(--stroke); border-radius: 8px; background: #141b16; color: var(--muted); }
.quote.matched { color: var(--accent); border-color: #4a6642; }
.quote.mismatched { color: #efcc94; border-color: #685539; }
#toast:not(:empty) { position: fixed; z-index: 2; right: 1.2rem; bottom: 1.2rem; max-width: calc(100% - 2.4rem); padding: .7rem 1rem; color: var(--accent); background: #233221; border: 1px solid #55724a; border-radius: 10px; box-shadow: 0 8px 30px #0007; font-size: .94rem; }

.login-layout { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { position: relative; min-width: 0; display: grid; align-content: center; justify-items: center; overflow: hidden; border-right: 1px solid #3b4a3c; background: radial-gradient(ellipse at 47% 58%, #293d2c 0, #1c2b20 43%, #151f18 78%); }
.login-art > .brand { position: absolute; top: clamp(1.5rem, 5vw, 4rem); left: clamp(1.5rem, 5vw, 4rem); }
.felt { position: relative; width: min(50vw, 560px); aspect-ratio: 1; display: grid; place-items: center; }
.felt-ring { position: absolute; inset: 5%; border: 1px solid #3a543b; border-radius: 50%; box-shadow: 0 0 0 35px #86ad7309, 0 0 0 70px #86ad7307; }
.felt-chip { position: relative; display: grid; place-items: center; width: 42%; aspect-ratio: 1; background: repeating-conic-gradient(from 12deg, #a2cf75 0 12deg, #4b693e 12deg 48deg); border: 4px solid #7a9c63; border-radius: 50%; box-shadow: 0 10px 0 #2c422b, 0 19px 35px #071109b0; }
.felt-chip::before { content: ""; position: absolute; inset: 11%; border: 2px dashed #627d51; border-radius: 50%; background: #243725; }
.felt-chip span { position: relative; color: var(--accent); font-family: Georgia, serif; font-size: clamp(3.6rem, 8vw, 7rem); line-height: 1; }
.login-side { display: grid; place-items: center; padding: 2rem; }
.login-box { width: min(100%, 375px); }
.mobile-brand { display: none; }
.login-icon { margin-bottom: 1.15rem; }
.login-box h1 { font-size: clamp(1.85rem, 3.25vw, 2.45rem); }
.login-box p.muted { margin-top: .55rem; }
.login-box form { margin-top: 1.5rem; }
.login-box form > label > input { margin-top: .41rem; }
.login-box .button { margin-top: .2rem; }

@media (max-width: 1180px) {
  .shell { grid-template-columns: 205px minmax(0, 1fr); }
  .setup-grid { grid-template-columns: minmax(0, 1fr) minmax(230px, 275px); }
  .users-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .shell { display: block; }
  .sidebar { position: sticky; z-index: 1; height: auto; padding: .58rem 1rem; flex-direction: row; align-items: center; justify-content: space-between; gap: .5rem; border-right: 0; border-bottom: 1px solid var(--stroke); }
  .sidebar nav { display: flex; gap: .26rem; }
  .nav-item { min-height: 40px; padding: .4rem .55rem; }
  .sidebar-bottom { display: none; }
  .top-mobile-actions { display: flex; gap: .15rem; }
  .topbar { min-height: 46px; }
  .content { padding-top: 1.55rem; }
}
@media (max-width: 665px) {
  .sidebar { flex-wrap: wrap; }
  .sidebar nav { flex: 1; min-width: 0; }
  .brand { padding-inline: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .sidebar .brand { display: none; }
  .nav-item { flex: 1; justify-content: center; gap: .27rem; padding-inline: .27rem; font-size: .82rem; white-space: nowrap; }
  .nav-item .icon { width: 16px; height: 16px; }
  .content, .topbar { padding-inline: .95rem; }
  .page-head { align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.1rem; }
  .page-head p { font-size: .94rem; }
  .setup-grid { grid-template-columns: minmax(0, 1fr); }
  .setup-grid, .setup-aside, .stack { gap: .8rem; }
  .setup-aside > .rate-panel { grid-row: 1; }
  .live-grid > .live-main, .live-grid > .setup-aside { display: contents; }
  .live-grid > .live-main > .log-panel { order: 1; }
  .quick-rebuy span { display: none; }
  .button.quick-rebuy { min-width: 42px; }
  .live-player { grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .65rem; }
  .live-player > .player-avatar { grid-column: 1; grid-row: 1 / 3; }
  .live-name { grid-column: 2; grid-row: 1; }
  .live-paid { grid-column: 2; grid-row: 2; }
  .rebuy-actions { grid-column: 3; grid-row: 1 / 3; }
  .panel { padding: 1rem; }
  .result-overview { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .player-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .signup-game { grid-template-columns: auto minmax(0, 1fr); }
  .signup-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; }
  .result-overview .metric:nth-child(3) { grid-column: 1 / -1; }
  .result-table, .result-table tbody { display: block; }
  .result-table thead { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; }
  .result-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem .5rem; padding-block: .7rem; border-top: 1px solid var(--stroke); }
  .result-table th:first-child { grid-column: 1 / -1; max-width: none; }
  .result-table td, .result-table th { padding: .25rem 0; border: 0; text-align: left; }
  .result-table td[data-label]::before, .result-fees small { color: var(--muted); display: block; font-size: .78rem; font-weight: 500; }
  .result-table td[data-label]::before { content: attr(data-label); }
  .result-fees:empty { display: none; }
  .result-table th .role-tag { display: inline-block; margin-left: .35rem; }
  .result-table .stack-input { margin-top: .25rem; text-align: left; }
  .editable-results tr th { order: -2; }
  .editable-results td[data-label="Фишек на руках"], .editable-results td[data-value="payout"] { order: -1; }
  .history-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem; }
  .history-bank { grid-column: 3; }
  .login-layout { display: block; }
  .login-art { display: none; }
  .login-side { min-height: 100dvh; }
  .mobile-brand { display: block; margin-bottom: 2rem; }
  .login-icon { display: none; }
}
@media (max-width: 370px) {
  .content, .topbar { padding-inline: .68rem; }
  .nav-item .icon { display: none; }
  .panel, dialog { padding: .8rem; }
  .setup-identity { grid-template-columns: minmax(112px, .8fr) minmax(0, 1.2fr); }
  .live-player { gap: .4rem; }
  .history-item > .section-icon { display: none; }
  .history-item { grid-template-columns: minmax(0, 1fr) auto; }
  .history-bank { grid-column: 2; }
  .dialog-actions { flex-wrap: wrap; }
}
