/* Poker Tourney: admin, director and results screens */
:root {
  --felt: #14563f;
  --felt-deep: #0f3a2c;
  --felt-ink: #0a2a1f;
  --felt-edge: #071f17;
  --felt-hi: #2c6752;
  --felt-mist: #a9c7b8;
  --felt-mist2: #cfe0d6;
  --felt-fog: #8fae9e;
  --felt-pale: #eef4f0;
  --felt-tint2: #dcebe3;
  --felt-rgb: 20, 86, 63;
  --felt-ink-rgb: 10, 42, 31;
  --ink: #16231e;
  --muted: #5b6a63;
  --paper: #e8ece6;
  --card: #ffffff;
  --line: #cdd5ce;
  --line-soft: #e2e7e2;
  --brass: #c9973a;
  --brass-soft: #f4e7cc;
  --red: #b3242f;
  --red-soft: #f8e2e3;
  --focus: #2f7dd1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(var(--felt-ink-rgb), .08), 0 2px 8px rgba(var(--felt-ink-rgb), .05);
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--felt); }
h1, h2, h3 { font-family: var(--cond); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p { margin: 0 0 .9em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; }
.lead { color: var(--muted); max-width: 64ch; }
.empty { color: var(--muted); padding: 1.2rem 0; }
.empty.small { padding: .6rem .2rem; font-size: .92rem; }
.spacer { flex: 1; }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 .5rem; }

/* ---------- nav ---------- */
.topnav { display: flex; align-items: center; gap: 1.5rem; padding: 0 1.5rem; height: 58px; background: var(--felt-deep); color: #f2ece0; position: sticky; top: 0; z-index: 20; }
.topnav a { color: #d8e3dc; text-decoration: none; font-weight: 500; }
.topnav .brand { font-family: var(--cond); font-weight: 700; font-size: 1.35rem; color: #fff; display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.topnav .suit { color: var(--brass); font-size: 1.2em; }
.navlinks { display: flex; gap: 1.1rem; overflow-x: auto; flex: 1; }
.navlinks a { padding: .3rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.navlinks a.on, .navlinks a:hover { color: #fff; border-bottom-color: var(--brass); }
.navlinks a.muted { margin-left: auto; color: #a9bdb2; }

.page { max-width: 1280px; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }

/* ---------- cards, forms ---------- */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.cardhead { display: flex; align-items: center; gap: .8rem; justify-content: space-between; margin-bottom: .6rem; }
.cardhead h2 { margin: 0; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.titlebar h1 { margin: 0; }

input[type=text], input[type=search], input[type=number], input[type=date] {
  font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: .55rem .7rem; width: 100%; min-height: 42px;
}
input:focus { border-color: var(--felt); outline: none; box-shadow: 0 0 0 3px rgba(var(--felt-rgb), .18); }
input.num { text-align: right; font-variant-numeric: tabular-nums; max-width: 140px; }
input.num.small { max-width: 74px; }
input.inline { border-color: transparent; background: transparent; min-height: 36px; padding: .35rem .5rem; }
input.inline:hover { border-color: var(--line); background: #fff; }
input.inline:focus { background: #fff; border-color: var(--felt); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--felt); vertical-align: -3px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem 1.4rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field .lbl { font-weight: 600; font-size: .93rem; }
.field .hint { font-size: .84rem; }
.field input.num { max-width: none; }
.check { display: inline-flex; align-items: center; gap: .45rem; }
.create-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.create-row label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .93rem; }
.create-row .grow { flex: 1; min-width: 220px; }

.btn { font: 600 .98rem/1 var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; padding: 0 1.05rem; border-radius: 8px; border: 1px solid var(--felt); background: #fff; color: var(--felt); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f1f6f3; }
.btn.primary { background: var(--felt); color: #fff; }
.btn.primary:hover { background: var(--felt-deep); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--muted); background: #fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger.ghost { background: #fff; color: var(--red); border-color: #e3b8bb; }
.btn.small { min-height: 34px; padding: 0 .75rem; font-size: .9rem; }
.btn.big { min-height: 48px; font-size: 1.05rem; padding: 0 1.4rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon { font: 600 1rem/1 var(--sans); width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.icon:hover:not(:disabled) { border-color: var(--felt); color: var(--felt); }
.icon:disabled { opacity: .35; cursor: default; }
.icon.del:hover:not(:disabled) { border-color: var(--red); color: var(--red); }

.toolbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .9rem 0; }
.toolbar .search { max-width: 280px; }
.savebar { border-top: 1px solid var(--line); padding-top: 1rem; }

.pill { display: inline-block; font: 600 .78rem/1 var(--sans); padding: .35rem .6rem; border-radius: 999px; background: var(--line-soft); color: var(--muted); }
.pill.running { background: var(--brass-soft); color: #7a5410; }
.pill.finished { background: var(--felt-tint2); color: var(--felt-deep); }

/* ---------- tables ---------- */
.grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.grid th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--muted); padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.grid td { padding: .3rem .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.grid .r { text-align: right; }
.grid td.r input.num { margin-left: auto; display: block; }
.grid tr.hidden-row td, .grid tr.out-row td { color: var(--muted); }
.grid tr.break-row td { background: #f6f1e4; }
.grid td.lvl { font-family: var(--cond); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.grid td.actions { white-space: nowrap; }
.grid td.actions .icon { margin-left: 3px; }
.levels td { padding-top: .2rem; padding-bottom: .2rem; }

/* ---------- tournament list ---------- */
.tlist { display: flex; flex-direction: column; gap: .5rem; }
.trow { display: grid; grid-template-columns: 1fr auto auto; gap: 1.2rem; align-items: center; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .9rem 1.2rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.trow:hover { border-color: var(--felt); }
.trow .tname strong { display: block; font-family: var(--cond); font-size: 1.35rem; font-weight: 600; }
.trow .sub, .trow .tcount { color: var(--muted); font-size: .92rem; }

/* ---------- tournament header ---------- */
.thead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.thead h1 { margin: .15rem 0 .25rem; }
.thead .back { font-size: .92rem; text-decoration: none; }
.thead .meta { color: var(--muted); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.tactions { display: flex; gap: .6rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin: 1.2rem 0 1.5rem; overflow-x: auto; }
.tabs a { padding: .7rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--felt); }
.tabs a:hover { color: var(--ink); }

.split { display: grid; grid-template-columns: minmax(300px, 2fr) 3fr; gap: 1.25rem; align-items: start; }

/* add players */
.pickcard { position: sticky; top: 72px; }
.searchrow { display: flex; gap: .5rem; margin-bottom: .6rem; }
.picklist { display: flex; flex-direction: column; max-height: 56vh; overflow-y: auto; margin: 0 -.4rem; }
.pick { display: flex; align-items: center; gap: .6rem; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: 7px; padding: .5rem .6rem; cursor: pointer; }
.pick:hover, .pick:focus-visible { background: var(--felt-pale); }
.pick .plus { width: 24px; height: 24px; border-radius: 50%; background: var(--felt); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.pick .pname { flex: 1; }
.pick .bonus { font-size: .82rem; color: #7a5410; background: var(--brass-soft); padding: .1rem .45rem; border-radius: 5px; }
.pick.new { color: var(--felt); font-weight: 600; }

/* ---------- seating ---------- */
.seatbar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow); }
.tablecount { display: flex; align-items: center; gap: .55rem; }
.tablecount strong { font-family: var(--cond); font-size: 1.6rem; min-width: 1.4ch; text-align: center; }
.seatbar + .hint { margin: .7rem .2rem 1rem; }
.poolcard { padding-bottom: 1rem; }
.pool { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 46px; padding: .4rem; border: 2px dashed var(--line); border-radius: 8px; }
.pool.over { border-color: var(--felt); background: var(--felt-pale); }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.ttable { background: var(--felt); background-image: radial-gradient(ellipse at 50% 35%, var(--felt-hi) 0%, var(--felt) 55%, var(--felt-deep) 100%); border: 6px solid #3b2a1e; border-radius: 22px; padding: .8rem .8rem 1rem; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow); }
.ttable-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; }
.ttable-head h3 { margin: 0; font-size: 1.4rem; color: #fff; }
.ttable-head .muted { color: var(--felt-mist); flex: 1; }
.ttable-head .btn { background: transparent; color: #e6efe9; border-color: rgba(255,255,255,.3); }
.ttable-head .btn:hover { background: rgba(255,255,255,.1); }
.seats { display: flex; flex-direction: column; gap: 4px; }
.seat { display: flex; align-items: center; gap: .5rem; min-height: 38px; background: rgba(0,0,0,.18); border-radius: 7px; padding: 0 .35rem 0 .2rem; border: 1px solid transparent; }
.seat.over { border-color: var(--brass); background: rgba(201,151,58,.25); }
.seat.target { cursor: pointer; }
.seat.target:hover { border-color: var(--brass); }
.seat .sno { width: 24px; text-align: center; font-family: var(--cond); font-weight: 600; color: #9fbfae; }
.emptyseat { flex: 1; height: 32px; background: none; border: 0; color: var(--brass); font: 600 .9rem var(--sans); text-align: left; cursor: pointer; }
.emptyseat:disabled { cursor: default; }
.pchip { font: 600 .95rem/1.2 var(--sans); background: #f7f3ea; color: var(--ink); border: 1px solid #e0d6c0; border-radius: 6px; padding: .4rem .65rem; cursor: grab; text-align: left; }
.seat .pchip { flex: 1; }
.pchip:hover { border-color: var(--brass); }
.pchip.sel { background: var(--brass); border-color: var(--brass); color: #1d1405; box-shadow: 0 0 0 3px rgba(201,151,58,.35); }
.pchip.locked { background: #fff; }
.pool .pchip { background: #fff; border-color: var(--line); }
.lock { width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: rgba(255,255,255,.35); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lock[aria-pressed=true] { color: var(--brass); }
.lock:hover { background: rgba(255,255,255,.1); color: #fff; }

/* run tab */
.linkrow { display: flex; gap: .5rem; }
.linkrow .linkbox { flex: 1; min-width: 0; }
.linkbox { font-family: ui-monospace, Menlo, Consolas, monospace !important; font-size: .88rem !important; background: #f5f7f4 !important; }
.dircard { display: flex; gap: 1.2rem; align-items: center; }
.dircard > div:first-child { flex: 1; min-width: 0; }
.qr { width: 150px; flex: none; }
.qr svg { width: 100%; height: auto; display: block; }

/* ---------- modal & toast ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(var(--felt-ink-rgb), .6); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 100; }
.modal { background: #fff; color: var(--ink); border-radius: 14px; padding: 1.4rem 1.5rem 1.2rem; width: 100%; max-width: 440px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal h2 { font-size: 1.6rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--felt-ink); color: #fff; padding: .8rem 1.2rem; border-radius: 10px; font-weight: 500; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .25s ease, visibility .25s; z-index: 200; pointer-events: none; visibility: hidden; }
#toast.show { transform: translate(-50%, 0); visibility: visible; }
#toast.error { background: var(--red); }
#toast.has-act { pointer-events: auto; display: flex; align-items: center; gap: 1rem; }
#toast .toast-act { flex: none; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; font: 700 .95rem var(--sans); border-radius: 7px; padding: .35rem .8rem; cursor: pointer; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .pickcard { position: static; }
  .page { padding: 1.2rem 1rem 3rem; }
  .topnav { padding: 0 1rem; gap: 1rem; }
  h1 { font-size: 2rem; }
  .dircard { flex-direction: column; align-items: stretch; }
  .qr { width: 180px; margin: 0 auto; }
  .trow { grid-template-columns: 1fr auto; }
  .trow .tcount { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =========================================================
   Director (phone)
   ========================================================= */
.ptm-director body { background: var(--felt-ink); color: var(--felt-pale); }
.dir { max-width: 640px; margin: 0 auto; padding: 0 0 6rem; min-height: 100vh; }
.dir-top { position: sticky; top: 0; z-index: 10; background: var(--felt-deep); padding: calc(env(safe-area-inset-top) + .6rem) 1rem .7rem; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.dir-top .row1 { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.dir-top .tname { font-family: var(--cond); font-size: 1.25rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-top a { color: var(--felt-mist); font-size: .92rem; text-decoration: none; }
.dir-clock { display: flex; align-items: baseline; gap: .8rem; margin-top: .3rem; }
.dir-clock .time { font-family: var(--cond); font-weight: 700; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.dir-clock .time.warn { color: var(--brass); }
.dir-clock .time.danger { color: #ff6b6b; }
.dir-clock .lv { color: var(--felt-mist2); font-size: .98rem; line-height: 1.3; }
.dir-clock .lv strong { color: #fff; font-family: var(--cond); font-size: 1.15rem; font-weight: 600; }
.dir-ctl { display: flex; gap: .45rem; margin-top: .6rem; }
.dir-ctl button { flex: 1; min-height: 44px; font: 600 .95rem var(--sans); border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; }
.dir-ctl button.go { background: var(--brass); color: #1d1405; border-color: var(--brass); }
.dir-ctl button:active { transform: scale(.98); }
.dir-stats { display: flex; gap: 1rem; padding: .8rem 1rem; color: var(--felt-mist2); font-size: .95rem; }
.dir-stats strong { color: #fff; font-family: var(--cond); font-size: 1.35rem; font-weight: 600; margin-right: .25rem; }
.balance { margin: 0 1rem .8rem; background: var(--brass-soft); color: #4a3308; border-radius: 10px; padding: .75rem .9rem; font-weight: 500; }
.balance strong { display: block; font-family: var(--cond); font-size: 1.15rem; }
.dir-search { padding: 0 1rem .6rem; }
.dir-search input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; min-height: 46px; }
.dir-search input::placeholder { color: var(--felt-fog); }
.dtable { margin: 0 1rem 1rem; }
.dtable h3 { margin: .4rem 0 .45rem; font-size: 1.05rem; color: var(--felt-mist); font-weight: 600; display: flex; justify-content: space-between; }
.dplayer { display: flex; align-items: center; gap: .7rem; background: #fff; color: var(--ink); border-radius: 11px; padding: .45rem .45rem .45rem .8rem; margin-bottom: 6px; min-height: 58px; }
.dplayer .seatno { font-family: var(--cond); color: var(--muted); width: 1.6rem; font-weight: 600; }
.dplayer .nm { flex: 1; font-weight: 600; font-size: 1.08rem; line-height: 1.2; }
.dplayer .nm small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; }
.dplayer .out { min-height: 46px; padding: 0 1rem; border-radius: 9px; border: 0; background: var(--red); color: #fff; font: 700 1rem var(--sans); }
.dplayer .more { min-height: 46px; width: 42px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 1.2rem; }
.dir-section { margin: 1.2rem 1rem; }
.dir-section h2 { color: #fff; font-size: 1.3rem; }
.elist { list-style: none; margin: 0; padding: 0; }
.elist li { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.elist .pl { font-family: var(--cond); font-weight: 600; width: 2.6rem; color: var(--brass); }
.elist .by { color: var(--felt-mist); font-size: .9rem; }
.undo { width: 100%; min-height: 48px; margin-top: .8rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; font: 600 1rem var(--sans); }
.pickt { margin: 1rem; }
.pickt a { display: block; background: #fff; color: var(--ink); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: .6rem; text-decoration: none; }
.pickt a strong { font-family: var(--cond); font-size: 1.4rem; display: block; }
.pickt a span { color: var(--muted); }
.pickt h1 { color: #fff; margin: 1.4rem 0 .8rem; }

.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; color: var(--ink); width: 100%; max-width: 640px; border-radius: 18px 18px 0 0; padding: 1.1rem 1rem 0; max-height: 90vh; display: flex; flex-direction: column; animation: up .2s ease-out; }
.sheet-body { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: .5rem; }
.sheet-foot { padding: .7rem 0 calc(env(safe-area-inset-bottom) + .6rem); border-top: 1px solid var(--line-soft); background: #fff; }
@keyframes up { from { transform: translateY(40px); } }
.sheet h2 { font-size: 1.7rem; margin-bottom: .2rem; }
.sheet .sub { color: var(--muted); margin-bottom: .9rem; }
.kopts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 1rem; }
.kopts button { min-height: 50px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font: 600 1rem var(--sans); color: var(--ink); text-align: left; padding: .3rem .7rem; }
.kopts button small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.kopts button.on { background: var(--felt); color: #fff; border-color: var(--felt); }
.kopts button.on small { color: var(--felt-mist2); }
.kopts .none, .kopts .divider { grid-column: 1 / -1; }
.kopts .divider { color: var(--muted); font-size: .85rem; padding: .4rem 0 0; }
.sheet .confirm { width: 100%; min-height: 56px; border: 0; border-radius: 11px; background: var(--red); color: #fff; font: 700 1.15rem var(--sans); }
.sheet .cancel { width: 100%; min-height: 48px; margin-top: .5rem; border: 0; background: none; color: var(--muted); font: 600 1rem var(--sans); }
.sheet .seatgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin: .4rem 0 1rem; }
.sheet .seatgrid button { min-height: 48px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: 600 .95rem var(--sans); }
.sheet .seatgrid button:disabled { background: var(--line-soft); color: #9aa69f; }
.winner { margin: 1rem; text-align: center; padding: 1.6rem 1rem; background: var(--brass); color: #1d1405; border-radius: 14px; }
.winner h2 { font-size: 2.2rem; margin: .2rem 0; }
.winner a { color: #1d1405; font-weight: 600; }

/* =========================================================
   Results & standings (printable)
   ========================================================= */
.results { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.results header { border-bottom: 3px solid var(--felt); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.results header .league { color: var(--felt); font-weight: 600; }
.results header h1 { font-size: 2.8rem; margin: .1rem 0 .2rem; }
.results .facts { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; color: var(--muted); }
.results .facts strong { color: var(--ink); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 0 0 1.6rem; }
.podium > div { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .9rem 1rem; }
.podium > div:first-child { background: var(--felt); color: #fff; border-color: var(--felt); }
.podium .pl { font-family: var(--cond); font-weight: 600; color: var(--brass); font-size: 1.05rem; }
.podium .nm { font-family: var(--cond); font-weight: 700; font-size: 1.7rem; line-height: 1.1; }
.podium .pts { font-size: .9rem; opacity: .8; }
.results section { margin-bottom: 2rem; }
.results .grid td { padding: .45rem .6rem; }
.results .noprint { margin-bottom: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.results select { font: inherit; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 0 .6rem; background: #fff; }
@media print {
  body { background: #fff; }
  .noprint, #toast { display: none !important; }
  .results { padding: 0; }
  .podium > div:first-child { color: #000; background: #fff; border: 2px solid #000; }
}
@media (max-width: 560px) {
  .podium { grid-template-columns: 1fr; }
  .results header h1 { font-size: 2.2rem; }
}

/* points mode + past results */
.radiogroup { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .7rem; margin-bottom: 1.1rem; }
.radiocard { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 9px; padding: .8rem .9rem; cursor: pointer; background: #fff; }
.radiocard:has(input:checked) { border-color: var(--felt); box-shadow: inset 0 0 0 1px var(--felt); background: var(--felt-pale); }
.radiocard input { margin-top: .2rem; accent-color: var(--felt); width: 18px; height: 18px; flex: none; }
.radiocard strong { display: block; }
.radiocard .hint { display: block; font-size: .88rem; }
textarea.paste { font: inherit; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: .6rem .7rem; resize: vertical; }
textarea.paste:focus { border-color: var(--felt); outline: none; box-shadow: 0 0 0 3px rgba(var(--felt-rgb), .18); }
select.inline { font: inherit; min-height: 36px; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 0 .4rem; max-width: 100%; }
select.inline:hover, select.inline:focus { border-color: var(--line); background: #fff; }
.namecell { display: flex; align-items: center; gap: .5rem; }
.namecell input { flex: 1; }
.newtag { font-size: .78rem; font-weight: 600; color: #7a5410; background: var(--brass-soft); padding: .15rem .45rem; border-radius: 5px; white-space: nowrap; }
.pastgrid input.num::placeholder { color: #8a968f; }
.back { font-size: .92rem; text-decoration: none; display: inline-block; margin-bottom: .3rem; }

/* v0.3: seasons, leagues, finals, import */
select.sel { font: inherit; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 0 .6rem; background: #fff; color: var(--ink); max-width: 100%; }
select.sel:focus { border-color: var(--felt); outline: none; box-shadow: 0 0 0 3px rgba(var(--felt-rgb), .18); }
.field select.sel { width: 100%; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow); }
.stat strong { display: block; font-family: var(--cond); font-size: 1.9rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
.balance.note { margin: 0 0 1rem; }
.balance.note a { color: #4a3308; font-weight: 600; }
.slugcell { display: flex; align-items: center; gap: .2rem; }
.slugcell .muted { font-size: .85rem; white-space: nowrap; }
.ok { color: var(--felt); font-size: .9rem; }
.ok::before { content: "✓ "; font-weight: 700; }
.warn { color: #8a5a00; font-size: .9rem; font-weight: 500; }
.importcard.skipped { opacity: .5; }
.importcard .check h2 { display: inline; }
.weekgrid td { padding-top: .35rem; padding-bottom: .35rem; }
.suslist { margin: .4rem 0 .6rem 1.1rem; padding: 0; }
.activeseason { border-color: var(--brass); }
.card.done { border-left: 5px solid var(--felt); }
.create-row select.sel { min-width: 200px; }

/* v0.4: league switcher */
.topnav .brand { font-size: 1.4rem; }
.clubsel { font: 700 1.3rem/1 var(--cond); color: #fff; background: rgba(255,255,255,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c9973a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: .35rem 2rem .35rem .7rem; appearance: none; cursor: pointer; max-width: 260px; }
.clubsel:hover { background-color: rgba(255,255,255,.14); }
.clubsel option { color: #000; font: 400 1rem var(--sans); }
.clubname { font: 700 1.3rem var(--cond); color: #fff; white-space: nowrap; }
@media (max-width: 860px) { .clubsel { font-size: 1.1rem; max-width: 170px; } }
.card.danger { border-color: #e7c3c6; }

/* ---------- tables-only seating ---------- */
.tcols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.tcol { background: var(--felt); background-image: radial-gradient(ellipse at 50% 30%, var(--felt-hi) 0%, var(--felt) 60%, var(--felt-deep) 100%); border: 6px solid #3b2a1e; border-radius: 22px; padding: .8rem .8rem 1rem; color: #fff; min-height: 220px; display: flex; flex-direction: column; gap: .5rem; transition: box-shadow .12s; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow); }
.tcol.target { cursor: pointer; }
.tcol.target:hover, .tcol.over { box-shadow: 0 0 0 4px var(--brass), var(--shadow); }
.tcol.hot { border-color: #8c3a2a; }
.tcol.cool { border-color: #a07a2c; }
.tcol-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.tcol-head h3 { margin: 0; font-size: 1.45rem; color: #fff; }
.tcount { font-family: var(--cond); font-size: 1.15rem; color: var(--felt-mist2); }
.tcount.full { color: var(--brass); }
.tcol-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tcol-body .pchip { width: 100%; }
.tcol-body .empty { color: var(--felt-mist); padding: .6rem 0; text-align: center; }
.movehere { font: 600 .92rem/1.2 var(--sans); border: 1px dashed var(--brass); background: rgba(201,151,58,.18); color: #fff; border-radius: 7px; padding: .45rem .6rem; cursor: pointer; }
.poolcard .movehere { color: #6b4a0e; background: var(--brass-soft); }
.poolcard.target, .poolcard.over { box-shadow: 0 0 0 3px var(--brass), var(--shadow); cursor: pointer; }
.balance.late { background: var(--felt-tint2); color: var(--felt-ink); }
.lateval { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.lateval input { width: 90px; }
.lateval .muted { font-size: .88rem; }
/* ---------- game formats ---------- */
.flist { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; }
.frow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 1px solid var(--line-soft); border-radius: 9px; padding: .75rem 1rem; flex-wrap: wrap; }
.frow .fname strong { font-family: var(--cond); font-size: 1.25rem; margin-right: .5rem; }
.frow .fname .sub { display: block; color: var(--muted); font-size: .9rem; }

.dir-search { display: flex; gap: .5rem; }
.dir-search input { flex: 1; }
.addp { flex: none; min-height: 46px; padding: 0 .9rem; border-radius: 9px; border: 1px solid var(--brass); background: rgba(201,151,58,.15); color: #f4e7cc; font: 600 .95rem var(--sans); }
.dir .balance.late { background: var(--felt-tint2); color: var(--felt-ink); }
.sheet-search { margin-bottom: .7rem; min-height: 50px; font-size: 1.05rem; }
.kopts button:disabled { opacity: 1; }
.lateval input[type=time] { width: 140px; }

/* ---------- color picker ---------- */
.cpick { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .5rem; }
.swatch { width: 46px; height: 46px; border-radius: 10px; border: 2px solid rgba(0,0,0,.08); cursor: pointer; position: relative; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 600 .7rem/1 var(--sans); }
.swatch[aria-checked=true], .swatch.custom.on { outline: 3px solid var(--brass); outline-offset: 2px; }
.swatch.custom { width: auto; padding: 0 .7rem 0 .4rem; gap: .4rem; background: #fff; color: var(--ink); border-color: var(--line); font-size: .85rem; }
.swatch.custom input { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; min-height: 0; }
.colorfield { margin-top: 1rem; }

.timecell { display: flex; gap: .4rem; align-items: center; }
.timecell select { min-width: 8rem; }
.citag { display: inline-block; margin-left: .45rem; font: 600 .72rem/1 var(--sans); padding: .25rem .45rem; border-radius: 999px; background: var(--felt-tint2); color: var(--felt-ink); vertical-align: 2px; }
.citag.new { background: var(--brass-soft); color: #6b4a0e; }

.pin-input { font: 700 1.8rem/1 var(--cond); letter-spacing: .5em; text-align: center; max-width: 220px; }

.sheet .pinbtn { width: 100%; min-height: 48px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 1rem var(--sans); margin-bottom: .4rem; }
.sheet .confirm.go { background: var(--felt); }
.sheet .pinfield { font: 700 1.8rem/1 var(--cond); letter-spacing: .5em; text-align: center; }
.sheet .chipfield { width: 100%; font: 700 1.8rem/1 var(--cond); text-align: center; margin: .3rem 0 .3rem; }
.sheet .chiplbl { display: block; font-weight: 600; margin-top: .4rem; }
.sheet .kopts button:disabled { opacity: .5; }

.tchips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tchip { min-width: 34px; height: 32px; padding: 0 .5rem; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 .95rem var(--sans); cursor: pointer; }
.tchip:hover { border-color: var(--felt); }
.tchip.on { background: var(--felt); border-color: var(--felt); color: #fff; }
.addtable { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0 0 .7rem; font-weight: 600; font-size: .92rem; }

.sheet .pinbtn.danger { color: var(--red); border-color: #e3b8bb; }

.btn.ghost.danger { color: var(--red); border-color: #e3b8bb; }
.btn.ghost.danger:hover { background: var(--red-soft); }
.linkish { background: none; border: 0; padding: 0 .2rem; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .88rem; }
.linkish:hover { color: var(--red); }
.selbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--brass-soft); border-radius: 10px; padding: .6rem .8rem; margin: .7rem 0 1rem; }
.selbar > span { margin-right: .2rem; }

/* Swap a player */
td.nowrap { white-space: nowrap; }
.swapmodal { max-width: 520px; max-height: 92vh; overflow-y: auto; }
.swapsearch input { width: 100%; }
.swaplist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: .7rem 0; }
.swaphead { grid-column: 1 / -1; font-size: .82rem; font-weight: 600; color: var(--muted); padding-top: .2rem; }
.swapopt { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: .45rem .7rem; min-height: 48px; font: 600 .98rem var(--sans); color: var(--ink); cursor: pointer; }
.swapopt small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.swapopt:hover { border-color: var(--felt); }
.swapopt.on { background: var(--felt); border-color: var(--felt); color: #fff; }
.swapopt.on small { color: var(--felt-mist2); }
.swapopt:disabled { opacity: .5; cursor: default; }
.swapopt.new { grid-column: 1 / -1; }
.swapconfirm p { margin: .4rem 0 .6rem; }
.swapchips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; }
.swapchips > span:first-child { width: 100%; font-weight: 600; font-size: .9rem; }
.swapchips input { width: 9rem; font-size: 1.15rem; }
@media (max-width: 520px) { .swaplist { grid-template-columns: 1fr; } }
h3.subhead { margin: 1.3rem 0 .2rem; font-size: 1.15rem; }
.dir-top .row1 .vibbtn { flex: none; margin-left: auto; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; border-radius: 99px; padding: .25rem .7rem; font: 600 .8rem var(--sans); }
.dir-top .row1 .vibbtn.off { color: var(--felt-mist); background: none; }

/* TV board logo (League setup) */
.logocard { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 860px) { .logocard { grid-template-columns: 1fr; } }
.boardprev { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; color: #f3ecdc; font-family: var(--cond);
  background: radial-gradient(ellipse 75% 65% at 50% 42%, var(--felt-hi) 0%, var(--felt) 40%, var(--felt-deep) 75%, var(--felt-edge) 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); container-type: inline-size; }
.boardprev .bp-wm { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); background: center / contain no-repeat; pointer-events: none; }
.boardprev > div:not(.bp-wm) { position: relative; }
.bp-top { display: flex; justify-content: space-between; padding: 4cqw 4.5cqw 0; font-weight: 600; font-size: 3.6cqw; }
.bp-lvl { color: #d9a845; font-weight: 700; font-size: 5cqw; }
.bp-time { text-align: center; font-weight: 700; font-size: 20cqw; line-height: .9; margin-top: 2cqw; }
.bp-blinds { text-align: center; font-weight: 700; font-size: 7cqw; margin-top: 1.5cqw; }
.bp-foot { position: absolute !important; left: 0; right: 0; bottom: 0; display: flex; gap: 6cqw; padding: 2cqw 4.5cqw; background: rgba(0,0,0,.3); font-size: 3cqw; color: #b9c9bf; }
.logoside .toolbar { margin: 0 0 .6rem; }
.logoctl .field { margin-bottom: .9rem; }
.tintpick { display: flex; flex-wrap: wrap; gap: .4rem; }
.tintopt { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .3rem .7rem .3rem .35rem; font: 600 .88rem var(--sans); color: var(--ink); cursor: pointer; }
.tintopt.on { border-color: var(--felt); box-shadow: 0 0 0 2px rgba(var(--felt-rgb), .25); }
.tintopt .tsw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.tintopt .tsw.own { background: conic-gradient(#c33, #d9a845, #2a8, #36c, #c33); }
.tintopt input[type=color] { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.rangerow { display: flex; align-items: center; gap: .8rem; }
.rangerow input[type=range] { flex: 1; accent-color: var(--felt); }
.rangeval { min-width: 4rem; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.elist li { align-items: center; }
.elist .grow { flex: 1; min-width: 0; }
.elist .backin { flex: none; min-height: 36px; padding: 0 .8rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: var(--felt-mist); font: 600 .88rem var(--sans); }
.dir-section .showall { display: block; margin: .6rem auto 0; color: var(--felt-mist); }
/* Director phone: running clock switch */
.dir-ctl { flex-wrap: wrap; }
.dir-ctl button.autobtn { flex: 1 1 100%; min-height: 40px; display: flex; align-items: center; gap: .6rem; justify-content: flex-start; padding: 0 .8rem; font: 600 .88rem var(--sans); color: var(--felt-mist); background: transparent; border-style: dashed; }
.dir-ctl .autobtn .sw { flex: none; width: 34px; height: 20px; border-radius: 99px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; }
.dir-ctl .autobtn .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .2s; }
.dir-ctl button.autobtn.on { color: #fff; border-style: solid; border-color: rgba(217,168,69,.6); }
.dir-ctl .autobtn.on .sw { background: var(--brass); }
.dir-ctl .autobtn.on .sw::after { left: 17px; }
.pickt .picknote { background: #f4e7cc; color: #5d4300; border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1rem; }
.dir a.gonow { display: block; margin: .8rem 1rem 0; background: var(--brass); color: #1d1405; border-radius: 10px; padding: .8rem 1rem; text-decoration: none; }

/* "Install the app" offer (phones) */
.dir-install:empty, .pub-install:empty { display: none; }
.dir-install { margin: .8rem 1rem 0; }
.pub-install { margin: 0 0 1rem; }
.install { display: flex; align-items: center; gap: .75rem; background: #fff; color: var(--ink); border-radius: 12px; padding: .7rem .7rem .7rem .8rem; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.install-ico { flex: none; width: 42px; height: 42px; border-radius: 10px; background: center / cover no-repeat; }
.install-txt { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.3; color: var(--muted); }
.install-txt strong { display: block; color: var(--ink); font-size: .98rem; }
.install-go { flex: none; min-height: 40px; padding: 0 1rem; border: 0; border-radius: 9px; background: var(--felt); color: #fff; font: 700 .95rem var(--sans); }
.install-x { flex: none; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.pickt p a { display: inline; background: none; padding: 0; margin: 0; }

/* Phones: everything fits the screen width (no sideways scrolling to find buttons) */
.navlinks { min-width: 0; }
@media (max-width: 700px) {
  .titlebar { flex-wrap: wrap; align-items: flex-start; }
  .titlebar h1 { flex: 1 1 auto; min-width: 0; }
  .titlebar .tactions, .titlebar > .btn { flex: 1 1 100%; }
  .tactions { flex-wrap: wrap; }
  .tactions > * { flex: 1 1 auto; }
  .tactions > .btn.primary { order: -1; flex-basis: 100%; }
  .tactions select, .tactions .sel { flex-basis: 100%; max-width: none; }
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card > .grid, .card table.grid { min-width: 100%; }
  .toolbar { flex-wrap: wrap; }
  .page { max-width: 100vw; }
  input, select, textarea { max-width: 100%; }
}
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .entered td.nowrap { white-space: normal; }
  .entered td.nowrap > .btn { display: flex; width: 100%; margin: 0 0 4px; }
  .entered .grid th, .entered .grid td { padding-left: .35rem; padding-right: .35rem; }
}
/* Players tab: starting chips typed straight in */
.chipcell { white-space: nowrap; }
input.num.chipin { width: 7.2rem; max-width: 7.2rem; min-height: 36px; padding: .3rem .5rem; margin-left: auto; display: block; font-variant-numeric: tabular-nums; }
.chipnote { display: block; font-size: .78rem; color: var(--felt); font-weight: 600; margin-top: 2px; }
.chipnote.less { color: var(--red); }
@media (max-width: 700px) { input.num.chipin { width: 5.6rem; max-width: 5.6rem; } }

/* Players tab on a phone: each player is a small card — name, chips and buttons on top, table buttons in a row below */
@media (max-width: 700px) {
  .entered table.grid, .entered table.grid tbody { display: block; width: 100%; }
  .entered table.grid thead { display: none; }
  .entered table.grid tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name chips acts" "tables tables tables"; align-items: center; column-gap: .5rem; row-gap: .45rem; padding: .65rem .2rem; border-bottom: 1px solid var(--line); }
  .entered table.grid td { display: block; border: 0; padding: 0; }
  .entered td.pname { grid-area: name; line-height: 1.25; overflow-wrap: anywhere; }
  .entered td.chipcell { grid-area: chips; }
  .entered table.grid td.actcell { grid-area: acts; display: flex; flex-direction: column; gap: 4px; }
  .entered td.actcell > .btn { width: 100%; justify-content: center; margin: 0; padding-left: .7rem; padding-right: .7rem; }
  .entered table.grid td.tablecell { grid-area: tables; display: flex; align-items: center; gap: .5rem; }
  .entered table.grid td.tablecell:empty { display: none; }
  .entered td.tablecell::before { content: attr(data-label); font-size: .78rem; font-weight: 600; color: var(--muted, #6b7280); text-transform: uppercase; letter-spacing: .04em; }
  .entered td.tablecell:empty::before { content: none; }
  .entered td.tablecell .tchips { display: flex; flex-wrap: wrap; gap: 6px; }
  .entered td.tablecell .tchip { min-width: 40px; height: 38px; }
}

/* Breaking a table: who goes where */
.mp-head { margin-top: .55rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.moveplan { display: grid; gap: .3rem; margin: .3rem 0 .2rem; }
.mp-row { display: flex; gap: .6rem; align-items: baseline; }
.mp-to { flex: 0 0 auto; min-width: 4.6rem; font-family: var(--cond); font-weight: 700; font-size: 1.05rem; }
.mp-names { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.mp-name small { font-weight: 500; opacity: .75; }
.balance .breakbtn { display: block; width: 100%; margin-top: .7rem; min-height: 48px; border: 0; border-radius: 10px; background: var(--felt); color: #fff; font: 700 1.05rem var(--sans); cursor: pointer; }
.balance .breakbtn:disabled { opacity: .6; }
.breaknote > .btn { margin-top: .6rem; }
.sheet .moveplan { margin: .6rem 0 .2rem; font-size: 1.1rem; }
.sheet .mp-row { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.modal-body .moveplan { margin: .2rem 0 .4rem; }
.modal-body .mp-row { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.sheet-foot .confirm.okgo, .sheet .confirm.okgo { background: var(--felt); border-color: var(--felt); color: #fff; }

/* Hosted plans: banner under the menu and the plan card on Settings */
.planbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem max(16px, env(safe-area-inset-left, 0px)); background: var(--brass-soft); color: #4a3308; border-bottom: 1px solid rgba(0,0,0,.08); }
.planbar.bad { background: var(--red-soft); color: #7a1520; }
.planbar > div { flex: 1 1 320px; min-width: 0; }
.planbar strong { font-weight: 700; }
.planstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem 1.2rem; margin: .3rem 0 .6rem; }
.planstats > div { display: grid; gap: 2px; }
.planstats .k { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.planstats strong { font-family: var(--cond); font-size: 1.25rem; }

/* Settings: knockout animations */
.kostatus { background: #f4e7cc; color: #4a3308; border-radius: 10px; padding: .6rem .9rem; margin: 0 0 1rem; display: grid; gap: .3rem; }
.kostatus p { margin: 0; }
.kostatus a { color: inherit; font-weight: 600; }
.korow { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.korow > span { font-weight: 600; }
.korange { flex: 1 1 220px; accent-color: var(--felt); min-height: 32px; }
.kopct { min-width: 3.2em; font: 800 1.4rem/1 var(--cond, "Barlow Condensed", sans-serif); color: var(--felt); text-align: right; }
.kohint { margin: .3rem 0 0; }
.kofinal { margin-top: 1rem; }
.kofinal label { display: flex; align-items: center; gap: .7rem; font-weight: 600; flex-wrap: wrap; }
.koalways { width: 5.5rem; }
.kopreview { display: grid; gap: .6rem; margin-top: 1rem; max-width: 720px; }
.kobox { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0b3326; box-shadow: 0 0 0 6px #050c09; }
.koshape { display: flex; align-items: center; gap: .4rem; }
.koshape > span { font-weight: 600; margin-right: .3rem; }
.kopick { min-height: 36px; padding: 0 1rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: 600 .95rem var(--sans, "Barlow", sans-serif); color: var(--ink, #16231e); cursor: pointer; }
.kopick.on { background: var(--felt); border-color: var(--felt); color: #fff; }
.kobox.phone { aspect-ratio: 9 / 19.5; width: min(100%, 300px); justify-self: center; border-radius: 28px; box-shadow: 0 0 0 8px #050c09, 0 0 0 9px #2a3a33; }
.koctl { display: flex; gap: .5rem; flex-wrap: wrap; }
.koctl input, .koctl select { flex: 1 1 160px; min-width: 0; }
.koctl .btn { flex: 0 0 auto; }
.kohead { margin-top: 1.4rem; align-items: center; gap: .6rem; flex-wrap: wrap; }
.kohead h3 { margin: 0; }
.kocount { color: var(--muted, #5b6a63); font-size: .92rem; margin-right: auto; }
.kolist { display: grid; gap: .9rem; }
.kogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .5rem; }
.kotog { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border: 1px solid var(--line, #d9d1bd); border-radius: 10px; background: #fff; }
.kotog label { display: flex; gap: .6rem; align-items: flex-start; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.kotog label input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--felt); flex: 0 0 auto; }
.kotog label > span { display: grid; gap: .05rem; min-width: 0; }
.kotog .hint { font-size: .85rem; line-height: 1.3; }
.kotog .btn { flex: 0 0 auto; }
.kotog.off { background: transparent; opacity: .6; }
.kotog.off strong { text-decoration: line-through; }
