:root {
  color-scheme: dark;
  --body: #141618;
  --panel: #1b1e21;
  --entry: #151719;
  --border: #3c3f40;
  --ink: #f5f0e6;
  --soft: #b7b6b0;
  --gold: #e2c395;
  --success: #ade3c8;
  --error: #ffb6a8;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--body);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; margin: 0; background: radial-gradient(ellipse at 90% 0%, #262629 0%, #141618 48%); min-height: 100svh; }
h1, h2, h3, p { margin: 0; }
h1, h2, .brand { font-family: "PT Serif", Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(2.3rem, 4vw, 3.8rem); line-height: 1.1; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.7rem); line-height: 1.15; letter-spacing: -.025em; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
button, input, select, textarea { border-radius: .35rem; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, #detail:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.bar { min-height: 74px; padding: .9rem clamp(1rem, 5vw, 5.3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); background: #16181a; }
.brand, #identity { display: flex; align-items: center; gap: .7rem; }
.brand { font-size: 1.45rem; white-space: nowrap; }
.brand-context, #operator { color: var(--soft); font-family: "Segoe UI", sans-serif; font-size: .875rem; }
.brand-context { padding-left: .9rem; margin-left: .2rem; border-left: 1px solid var(--border); }
#operator { overflow-wrap: anywhere; }
main { margin: 0 auto; max-width: 1620px; padding: 0 clamp(1rem, 5vw, 5.3rem) 4rem; }
.login-shell { min-height: calc(100svh - 140px); display: grid; place-content: center; padding: 2.4rem 0; }
.login-card { width: min(420px, calc(100vw - 2rem)); border: 1px solid var(--border); border-top: 2px solid var(--gold); padding: clamp(1.5rem, 4vw, 2.4rem); border-radius: .45rem; background: var(--panel); box-shadow: 0 1.25rem 5rem #0003; }
.login-card h1 { font-size: clamp(2.1rem, 4vw, 2.55rem); margin: .9rem 0 1.65rem; }
.section-line { display: flex; align-items: center; gap: .9rem; }
.kicker, .amount-label { color: var(--gold); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 650; }
.hairline { display: block; width: 3rem; height: 1px; background: #887456; }
.page-heading { margin: 2.8rem 0 1.7rem; }
.page-heading h1 { margin-top: .5rem; }
form label { display: grid; gap: .48rem; color: #dddcd4; font-size: .91rem; font-weight: 550; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid #525455; background: var(--entry); color: var(--ink); padding: .73rem .83rem; font-weight: 400; font-size: 1rem; }
input::placeholder, textarea::placeholder { color: #a09f99; }
.digits { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
#login, #confirm-form { display: grid; gap: 1.1rem; }
.primary, .secondary, .subtle { border: 1px solid transparent; min-height: 42px; padding: .57rem .93rem; font-weight: 600; line-height: 1.3; font-size: .91rem; }
.primary { color: #27211a; background: var(--gold); }
.secondary { color: var(--ink); background: #3d4141; }
.subtle { color: #e4dfd6; border-color: #505250; background: transparent; }
.primary:hover:enabled { background: #efdab8; }
.secondary:hover:enabled, .subtle:hover:enabled { color: white; background: #383b3a; }
.small { min-height: 36px; font-size: .85rem; }
#sign-in { margin-top: .35rem; }
.workspace-grid { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.7fr); gap: 1.25rem; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: .45rem; }
.directory { overflow: hidden; }
#search { padding: 1.15rem 1.25rem .75rem; }
.search-row { display: flex; gap: .45rem; margin-top: .45rem; }
.search-row input { padding: .6rem .7rem; }
.list-status { min-height: 2rem; padding: 0 1.25rem .65rem; color: var(--soft); font-size: .86rem; }
.players { list-style: none; margin: 0; padding: 0; max-height: 66vh; overflow: auto; }
.player { display: grid; gap: .25rem; width: 100%; padding: .8rem 1.15rem; border: 0; border-top: 1px solid #323536; border-left: 3px solid transparent; border-radius: 0; text-align: left; background: transparent; color: var(--ink); }
.player:hover, .player:focus-visible { background: #282b2c; }
.player[aria-current="true"] { border-left-color: var(--gold); background: #302e2b; }
.player .name { font-weight: 620; font-size: 1.03rem; }
.player .secondary-text { color: var(--soft); font-size: .86rem; }
.player .name, .player .secondary-text { overflow-wrap: anywhere; }
.pager { padding: .8rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-top: 1px solid var(--border); color: var(--soft); font-size: .84rem; }
.detail { padding: clamp(1.15rem, 2.8vw, 2.3rem); }
.empty { min-height: 17rem; display: flex; flex-direction: column; gap: .65rem; align-items: center; justify-content: center; text-align: center; }
.empty img { margin-bottom: .4rem; }
.empty p, .dialog-player { color: var(--soft); line-height: 1.55; }
.player-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.player-heading h2 { margin-top: .3rem; }
.badge { padding: .25rem .65rem; font-size: .82rem; border-radius: 2rem; background: #243b32; color: var(--success); }
.badge.blocked { background: #4a302c; color: var(--error); }
.metadata { display: grid; gap: .4rem; margin: 1rem 0 1.5rem; }
.metadata > div { display: flex; align-items: baseline; gap: .6rem; }
dt { color: var(--soft); font-size: .86rem; min-width: 3.3rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: .87rem; }
.balances { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--border); padding: 1rem 0; }
.balances > div { min-width: 0; display: grid; gap: .3rem; padding: 0 .85rem; border-left: 1px solid var(--border); }
.balances > div:first-child { padding-left: 0; border: 0; }
.amount-label { font-size: .76rem; letter-spacing: .045em; color: var(--soft); }
.balances strong { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 550; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.message { font-size: .92rem; line-height: 1.5; padding: .62rem .75rem; border: 1px solid; border-radius: .3rem; overflow-wrap: anywhere; }
.error { color: var(--error); background: #362825; border-color: #69504b; }
.success { color: var(--success); background: #21322a; border-color: #40594b; }
#global-error, #action-result { margin: .8rem 0; }
.tab-bar { margin-top: 1.8rem; display: flex; gap: 1rem; border-bottom: 1px solid var(--border); }
.tab-bar button { background: none; border: 0; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .6rem 0; color: var(--soft); }
.tab-bar button[aria-pressed=true] { color: var(--gold); border-bottom-color: var(--gold); }
.history { display: grid; }
.history-item { padding: .85rem 0; display: grid; gap: .3rem; border-bottom: 1px solid #353738; }
.history-item:last-child { border-bottom: 0; }
.history-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .35rem .75rem; }
.history-item time { font-size: .82rem; color: var(--soft); }
.history-info, .quiet { color: var(--soft); font-size: .91rem; line-height: 1.5; overflow-wrap: anywhere; }
.quiet { padding-top: 1rem; }
dialog { margin: auto; max-width: min(465px, calc(100vw - 2rem)); width: 100%; max-height: calc(100svh - 2rem); border: 1px solid #68604f; border-radius: .45rem; padding: 1.6rem; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: #07090bd9; }
dialog h2 { font-size: 2rem; }
.dialog-player { font-size: .9rem; overflow-wrap: anywhere; }
fieldset { padding: 0; border: 0; margin: 0; display: grid; gap: 1rem; min-width: 0; }
select { appearance: none; background: var(--entry) url("chevron.svg") right .8rem center / .75rem auto no-repeat; padding-right: 2.1rem; }
textarea { resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: .6rem; }
.checkbox input { accent-color: var(--gold); width: 1rem; height: 1rem; margin: .15rem 0 0; flex-shrink: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .55rem; }
@media (max-width: 775px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .players { max-height: 14rem; }
  .detail { scroll-margin-top: .5rem; }
  .page-heading { margin-top: 1.65rem; }
}
@media (max-width: 520px) {
  .brand-context { display: none; }
  .bar { min-height: 62px; }
  .brand { gap: .35rem; font-size: 1.2rem; }
  .brand img { width: 24px; }
  #identity { justify-content: flex-end; gap: .4rem; }
  #operator { max-width: 8rem; font-size: .8rem; }
  .player-heading { align-items: flex-start; }
  .actions > button { flex-grow: 1; }
  .detail { padding: 1rem; }
  .balances > div { padding-inline: .45rem; }
}
.progress-box{border-block:1px solid #393b38;margin:1rem 0;padding:.7rem 0;color:#cfcec8}.progress-box summary{cursor:pointer;font-weight:600}.progress-box #progress{display:grid;gap:.2rem;padding:.6rem 0}.progress-box p{margin:0}
