/* =====================================================================
   TEN GEAR OFFICE — card game between friends
   Look: the whole app is a green card table. Panels are ivory card stock,
   highlights are casino gold, losses are card red.
   Change the colors in :root to re-theme everything.
   ===================================================================== */
:root {
  /* the table */
  --felt-deep: #072b20;
  --felt: #0b3d2e;
  --felt-mid: #11573f;
  --felt-light: #1b7a57;
  --on-felt: #fdf8ea;
  --on-felt-2: rgba(253, 248, 234, .72);
  --on-felt-line: rgba(253, 248, 234, .16);

  /* the cards */
  --paper: #fffcf4;
  --paper-2: #f6efdd;
  --paper-3: #efe5cc;
  --edge: #e6dabd;
  --ink: #13261e;
  --ink-2: #3e5248;
  --muted: #6f7f77;

  /* accents */
  --gold: #e8b84a;
  --gold-2: #f7d77e;
  --gold-deep: #a97b17;
  --win: #128a52;  --win-bg: #dcf3e6;  --win-2: #19b06b;
  --loss: #d0283f; --loss-bg: #fde3e6; --loss-2: #ef4b61;
  --even: #6b7a73; --even-bg: #ece8dc;
  --warn: #8a5b00; --warn-bg: #fff1cc;

  --r-xl: 22px; --r-lg: 16px; --r-md: 12px; --r-sm: 8px;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 0 rgba(0,0,0,.08), 0 18px 40px -22px rgba(0,0,0,.65);
  --shadow-lift: 0 22px 44px -18px rgba(0,0,0,.7);
  --font-display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --nav-h: 66px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--felt-deep); }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 400 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"),
    radial-gradient(1200px 700px at 50% -10%, var(--felt-light) 0%, var(--felt-mid) 35%, var(--felt) 65%, var(--felt-deep) 100%) fixed;
  background-color: var(--felt);
}
h1, h2, h3 { margin: 0; line-height: 1.1; }
h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.2rem, 6vw, 3.2rem); letter-spacing: .01em; }
h2 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.005em; }
h3 { font-size: 1.1rem; font-weight: 800; }
p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
b, strong { font-weight: 800; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--gold-2); color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pos { color: var(--win); } .neg { color: var(--loss); } .zero { color: var(--even); }
.num, .sb-pts, .sb-money, .value-amt, .balance-check b, .gc-date b, .progress-top b { font-variant-numeric: tabular-nums; }

.container { max-width: 1180px; margin: 0 auto; padding: 22px 16px 36px; outline: none; }
.view { display: grid; gap: 20px; }
.view.enter { animation: deal .38s cubic-bezier(.2,.8,.2,1); }
@keyframes deal { from { opacity: 0; transform: translateY(14px); } }
.stack { display: grid; gap: 20px; align-content: start; }
.row-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* things that sit straight on the table use light text */
.page-head, .game-hero > div:first-child, .empty, .list-summary, .report-foot, .setup-hero { color: var(--on-felt); }
.page-head .muted, .game-hero .muted, .empty .muted, .list-summary, .report-foot { color: var(--on-felt-2); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(7,43,32,.96), rgba(7,43,32,.86));
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--on-felt-line);
  box-shadow: 0 10px 30px -20px rgba(0,0,0,.9);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-2) 50%, var(--gold) 80%, transparent); opacity: .7; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-felt); min-width: 0; }
.brand-mark { position: relative; width: 42px; height: 46px; flex: none; }
.brand-mark span { position: absolute; width: 28px; height: 38px; border-radius: 6px; display: grid; place-items: center; font-size: 17px; background: var(--paper); box-shadow: 0 4px 10px -4px rgba(0,0,0,.7); }
.brand-mark span:first-child { left: 0; top: 6px; transform: rotate(-12deg); color: var(--ink); }
.brand-mark span:last-child { right: 0; top: 2px; transform: rotate(10deg); color: var(--loss); border: 1.5px solid var(--gold); }
.brand-text { display: grid; line-height: 1; min-width: 0; }
.brand-text strong {
  font-family: var(--font-display); font-weight: 900; font-size: 1.55rem; letter-spacing: .04em; white-space: nowrap;
  background: linear-gradient(180deg, #fff6d8 0%, var(--gold-2) 45%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text small { color: var(--on-felt-2); font-size: .82rem; font-style: italic; margin-top: 3px; white-space: nowrap; }

.nav { display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid var(--on-felt-line); }
.nav a { position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; text-decoration: none; color: var(--on-felt-2); font-weight: 700; font-size: .93rem; transition: background .2s, color .2s; }
.nav a:hover { color: var(--on-felt); background: rgba(255,255,255,.06); }
.nav a.active { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a1d00; box-shadow: 0 6px 16px -8px rgba(232,184,74,.9); }
.nav a.has-dot::after { content: ''; position: absolute; top: 5px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--loss-2); box-shadow: 0 0 0 2px var(--felt-deep); }
.nav-ico { font-size: .9rem; }
.db-status { font-size: .76rem; font-weight: 800; padding: 5px 11px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.db-status.ok { background: rgba(25,176,107,.16); color: #8ff0bd; border-color: rgba(25,176,107,.35); }
.db-status.warn { background: rgba(232,184,74,.16); color: var(--gold-2); border-color: rgba(232,184,74,.4); }
.db-status.local { background: rgba(255,255,255,.08); color: var(--on-felt-2); border-color: var(--on-felt-line); }

@media (max-width: 820px) {
  .brand-text strong { font-size: 1.3rem; }
  .nav { position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); margin: 0; z-index: 30; height: var(--nav-h);
         background: rgba(7,43,32,.94); backdrop-filter: blur(12px); border-radius: 22px; padding: 6px; justify-content: space-around; box-shadow: 0 14px 30px -10px rgba(0,0,0,.8); }
  .nav a { flex-direction: column; justify-content: center; gap: 2px; padding: 4px 6px; font-size: .72rem; border-radius: 16px; flex: 1; }
  .nav-ico { font-size: 1.15rem; }
  .db-status { margin-left: auto; }
}
@media (max-width: 420px) {
  .brand-mark { display: none; }
  .db-status { font-size: .7rem; padding: 4px 8px; }
}
@media (min-width: 821px) { body { padding-bottom: 28px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent; border-radius: 999px; padding: 10px 20px; font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .12s, filter .15s, background .15s, box-shadow .15s; min-height: 44px; letter-spacing: .01em; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.btn-primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a1d00; box-shadow: 0 2px 0 var(--gold-deep), 0 12px 24px -12px rgba(169,123,23,.9); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-ghost { background: var(--paper); border-color: var(--edge); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.page-head .btn-ghost, .banner .btn-ghost { background: rgba(255,255,255,.08); color: var(--on-felt); border-color: var(--on-felt-line); }
.page-head .btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-danger { background: linear-gradient(180deg, var(--loss-2), var(--loss)); color: #fff; box-shadow: 0 2px 0 #9b1528; }
.btn-danger-ghost { background: rgba(208,40,63,.14); color: #ffb3bd; border-color: rgba(239,75,97,.45); }
.btn-sm { padding: 6px 15px; min-height: 36px; font-size: .88rem; }
.btn-lg { padding: 14px 26px; font-size: 1.08rem; min-height: 56px; }
.btn-block { width: 100%; }

/* ---------- ivory cards ---------- */
.card { position: relative; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card-head { margin-bottom: 16px; display: grid; gap: 4px; }
.card-head.row-between { display: flex; }
.card-head h2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); transform: rotate(45deg) translateY(-2px); margin-right: 10px; }
.narrow { max-width: 440px; margin: 24px auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head p.muted { margin-top: 6px; max-width: 60ch; }
.eyebrow { font-size: .88rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.page-head .eyebrow, .game-hero .eyebrow { color: var(--gold-2); }
.eyebrow a { text-decoration: none; color: var(--gold-2); }
.eyebrow a:hover { text-decoration: underline; }
.label { font-weight: 800; margin: 8px 0 12px; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta span { background: var(--paper-2); border: 1px solid var(--edge); padding: 4px 12px; border-radius: 999px; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.game-hero .meta span { background: rgba(255,255,255,.08); border-color: var(--on-felt-line); color: var(--on-felt); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r-lg); }
.banner-info { background: linear-gradient(90deg, rgba(232,184,74,.22), rgba(232,184,74,.08)); border: 1px solid rgba(232,184,74,.45); color: var(--on-felt); }
.banner-info .muted { color: var(--on-felt-2); }
.banner-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f1d58a; }
.banner-warn .btn-ghost { background: #fff; color: var(--warn); border-color: #f1d58a; }
.banner-actions { display: flex; gap: 8px; }

.field { display: grid; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.field input, .name-field input {
  width: 100%; border: 1.5px solid var(--edge); background: #fff; border-radius: var(--r-md); padding: 12px 14px; font-size: 1rem; font-weight: 600; color: var(--ink); min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .name-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232,184,74,.28); }
.form-error { background: var(--loss-bg); color: var(--loss); padding: 11px 14px; border-radius: var(--r-md); font-weight: 700; margin: 12px 0; border: 1px solid #f6b9c1; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* player colors (seat 1–5) */
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; color: #fff; font-family: var(--font-display); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 0 0 2px #fff, 0 3px 8px -3px rgba(0,0,0,.5); }
.av0 { background: linear-gradient(160deg, #4a8fe7, #1f5fb8); }
.av1 { background: linear-gradient(160deg, #f0566b, #c01f37); }
.av2 { background: linear-gradient(160deg, #f2c14e, #c7901b); }
.av3 { background: linear-gradient(160deg, #a774e8, #6c3db8); }
.av4 { background: linear-gradient(160deg, #2fc4a8, #138873); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .88rem; font-weight: 700; }
.pill.pos { background: var(--win-bg); color: var(--win); }
.pill.neg { background: var(--loss-bg); color: var(--loss); }
.pill.zero { background: var(--even-bg); color: var(--even); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.tag.pos { background: var(--win-bg); color: var(--win); }
.tag.neg { background: var(--loss-bg); color: var(--loss); }
.tag.zero { background: var(--even-bg); color: var(--even); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- setup: welcome banner ---------- */
.setup-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center;
  padding: 30px 26px; border-radius: 28px;
  background:
    radial-gradient(500px 220px at 15% 0%, rgba(247,215,126,.22), transparent 70%),
    linear-gradient(135deg, rgba(0,0,0,.28), rgba(0,0,0,.08));
  border: 1px solid rgba(232,184,74,.35);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.12), 0 30px 60px -36px rgba(0,0,0,.9);
}
.setup-hero::before { content: ''; position: absolute; inset: 10px; border-radius: 20px; border: 1px dashed rgba(232,184,74,.35); pointer-events: none; }
.sh-text { position: relative; z-index: 1; }
.sh-title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(2.8rem, 9vw, 5.4rem); line-height: .92; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff8e0 0%, var(--gold-2) 50%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.35));
}
.sh-tag { font-size: clamp(1.1rem, 2.6vw, 1.45rem); font-weight: 600; font-style: italic; color: var(--on-felt); margin-top: 8px; }
.sh-sub { color: var(--on-felt-2); margin-top: 14px; max-width: 46ch; }
.fan { position: relative; height: 170px; width: 260px; justify-self: center; }
.pc {
  position: absolute; bottom: 0; left: 50%; width: 92px; height: 130px; margin-left: -46px; border-radius: 10px;
  background: linear-gradient(160deg, #fff, var(--paper-2)); border: 1px solid var(--edge); color: var(--ink);
  box-shadow: 0 16px 28px -14px rgba(0,0,0,.85); transform-origin: 50% 120%;
  display: grid; place-items: center; animation: fan-in .7s cubic-bezier(.2,.9,.25,1.2) both;
}
.pc i { position: absolute; top: 6px; left: 8px; font-style: normal; font-weight: 900; font-size: .9rem; line-height: 1; text-align: center; font-family: var(--font-display); }
.pc b { font-size: 2.6rem; }
.pc.red { color: var(--loss); }
.pc0 { --r: -24deg; } .pc1 { --r: -8deg; animation-delay: .06s; } .pc2 { --r: 8deg; animation-delay: .12s; } .pc3 { --r: 24deg; animation-delay: .18s; }
.pc { transform: rotate(var(--r)); }
.pc3 { box-shadow: 0 0 0 2px var(--gold), 0 16px 28px -14px rgba(0,0,0,.85); }
@keyframes fan-in { from { transform: rotate(0deg) translateY(30px); opacity: 0; } }
@media (min-width: 760px) {
  .setup-hero { grid-template-columns: 1fr 300px; padding: 38px 40px; }
  .fan { height: 190px; width: 300px; }
  .pc { width: 104px; height: 146px; margin-left: -52px; }
}

.setup-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .setup-grid { grid-template-columns: 1.1fr 1fr; } }
.segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--paper-2); padding: 6px; border-radius: var(--r-lg); margin-bottom: 18px; border: 1px solid var(--edge); }
.seg { border: 0; background: transparent; border-radius: var(--r-md); padding: 10px 6px; font-family: var(--font-display); font-weight: 900; font-size: 2rem; cursor: pointer; display: grid; line-height: 1; transition: background .2s, color .2s, box-shadow .2s; color: var(--ink-2); }
.seg small { font-family: var(--font-body); font-size: .75rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.seg.on { background: linear-gradient(160deg, var(--felt-light), var(--felt)); color: var(--gold-2); box-shadow: 0 10px 20px -12px rgba(11,61,46,.9); }
.seg.on small { color: var(--on-felt-2); }
.names { display: grid; gap: 10px; }
.name-field { display: flex; align-items: center; gap: 12px; }
.chips, .quick { display: flex; flex-wrap: wrap; gap: 8px; }
/* round chips look like casino chips */
.chip { position: relative; border: 2px dashed var(--edge); background: #fff; border-radius: 999px; min-width: 52px; min-height: 52px; padding: 6px 14px; font-weight: 900; font-family: var(--font-display); font-size: 1.25rem; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; color: var(--ink-2); }
.chip:hover { transform: translateY(-2px); border-color: var(--gold); }
.chip.on { background: radial-gradient(circle, var(--loss-2) 0 52%, var(--loss) 53%); border: 3px dashed #fff; color: #fff; box-shadow: 0 0 0 2px var(--loss), 0 10px 18px -8px rgba(208,40,63,.8); }
.quick .chip { font-family: var(--font-body); font-size: .9rem; font-weight: 800; min-height: 40px; border-style: solid; border-width: 1.5px; }
.quick .chip.on { background: var(--felt); border: 1.5px solid var(--felt); color: var(--gold-2); box-shadow: none; }
.value-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.value-card { position: relative; text-align: left; border: 1.5px solid var(--edge); background: #fff; border-radius: var(--r-lg); padding: 16px; cursor: pointer; display: grid; gap: 2px; transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden; }
.value-card:hover { transform: translateY(-2px); }
.value-card.on { border-color: var(--gold); background: linear-gradient(160deg, #fff9e6, #fdeec4); box-shadow: 0 0 0 2px var(--gold), 0 14px 26px -16px rgba(169,123,23,.9); }
.value-card.on::after { content: '\2713'; position: absolute; top: 10px; right: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-deep); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 900; }
.value-amt { font-family: var(--font-display); font-size: 2.6rem; font-weight: 900; line-height: 1; color: var(--felt); }
.value-lbl { font-weight: 800; color: var(--ink-2); }
.value-eg { font-size: .82rem; color: var(--muted); }
.card-accent { background: linear-gradient(170deg, var(--paper), var(--paper-2)); }
.rule-box { display: grid; gap: 6px; margin-bottom: 16px; color: var(--ink-2); padding: 14px 16px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--edge); }

/* ---------- active game ---------- */
.game-hero { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .game-hero { grid-template-columns: 1fr 440px; } }
.game-hero h1 { display: flex; align-items: center; gap: 12px; }
.live-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--loss-2); box-shadow: 0 0 0 0 rgba(239,75,97,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(239,75,97,0); } 100% { box-shadow: 0 0 0 0 rgba(239,75,97,0); } }
.progress-wrap { background: rgba(0,0,0,.25); border: 1px solid var(--on-felt-line); border-radius: var(--r-lg); padding: 14px 18px; color: var(--on-felt); }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; color: var(--on-felt-2); margin-bottom: 10px; font-weight: 700; }
.progress-top b { font-family: var(--font-display); font-size: 1.8rem; color: var(--gold-2); font-weight: 900; }
.progress { height: 10px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 999px; transition: width .5s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px rgba(247,215,126,.6); }
.dots { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px dashed rgba(255,255,255,.22); }
.dot.won { background: var(--win-2); border: 2px dashed rgba(255,255,255,.75); }
.dot.lost { background: var(--loss-2); border: 2px dashed rgba(255,255,255,.75); }
.dot.next { border: 2px solid var(--gold-2); box-shadow: 0 0 10px rgba(247,215,126,.7); }

.game-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 980px) {
  .game-grid { grid-template-columns: minmax(0, 1.35fr) minmax(330px, 1fr); }
  .sticky-col { position: sticky; top: 92px; }
}

/* round entry: an ivory card with a gold top edge */
.entry { border-top: 0; padding-top: 26px; overflow: hidden; }
.entry::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2), var(--gold-deep)); }
.entry .eyebrow { color: var(--gold-deep); }
.caller-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin-bottom: 10px; }
.caller-chip {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 8px; padding: 18px 8px; cursor: pointer;
  background: linear-gradient(165deg, #fff, var(--paper-2)); color: var(--ink); border: 1.5px solid var(--edge); border-radius: 12px; min-height: 124px;
  box-shadow: 0 2px 0 var(--paper-3), 0 10px 18px -12px rgba(0,0,0,.45);
  transition: transform .22s cubic-bezier(.3,1.6,.6,1), box-shadow .2s, border-color .2s;
}
.caller-chip:hover { transform: translateY(-3px); }
.caller-chip.on { transform: translateY(-8px) rotate(-2.5deg); border-color: var(--gold); background: linear-gradient(165deg, #fffbea, #fbe7b0); box-shadow: 0 0 0 3px var(--gold), 0 20px 28px -14px rgba(169,123,23,.9); }
.caller-chip.on::after { content: 'CALLER'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, var(--loss-2), var(--loss)); color: #fff; font-size: .68rem; font-weight: 900; letter-spacing: .08em; padding: 3px 10px; border-radius: 999px; box-shadow: 0 4px 10px -4px rgba(208,40,63,.9); }
.pc-corner { position: absolute; font-style: normal; font-family: var(--font-display); font-weight: 900; font-size: .9rem; line-height: .95; text-align: center; color: var(--ink); }
.pc-corner.red { color: var(--loss); }
.pc-corner.tl { top: 7px; left: 8px; }
.pc-corner.br { bottom: 7px; right: 8px; transform: rotate(180deg); }
.caller-chip .avatar { width: 44px; height: 44px; font-size: 1.3rem; }
.caller-name { font-weight: 800; font-size: .98rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 10px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-btn {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--r-lg); cursor: pointer;
  background: #fff; color: var(--ink); border: 2px solid var(--edge); min-height: 78px; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, color .2s;
}
.result-btn:hover { transform: translateY(-2px); }
.result-btn b { display: block; font-size: 1.08rem; }
.result-btn small { color: var(--muted); font-size: .8rem; font-weight: 600; }
.rb-ico { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; }
.result-btn.won .rb-ico { background: var(--win-bg); color: var(--win); }
.result-btn.lost .rb-ico { background: var(--loss-bg); color: var(--loss); }
.result-btn.won.on { background: linear-gradient(160deg, var(--win-2), var(--win)); border-color: var(--win); color: #fff; box-shadow: 0 16px 26px -14px rgba(18,138,82,.95); }
.result-btn.lost.on { background: linear-gradient(160deg, var(--loss-2), var(--loss)); border-color: var(--loss); color: #fff; box-shadow: 0 16px 26px -14px rgba(208,40,63,.95); }
.result-btn.on small { color: rgba(255,255,255,.85); }
.result-btn.on .rb-ico { background: rgba(255,255,255,.22); color: #fff; }
.preview { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; min-height: 32px; align-items: center; }
.entry .btn-primary:disabled { background: var(--paper-3); color: var(--muted); box-shadow: none; opacity: 1; filter: none; }
@media (max-width: 440px) {
  .result-grid { grid-template-columns: 1fr; }
  .caller-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
  .caller-chip { min-height: 112px; }
  .card { padding: 18px; }
}

.card-done { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 32px 22px; background: linear-gradient(170deg, #fffbea, #fbeec7); border: 2px solid var(--gold); }
.done-ico { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(160deg, var(--gold-2), var(--gold-deep)); color: #fff; display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; box-shadow: 0 10px 20px -8px rgba(169,123,23,.9); }

/* scoreboard */
.scoreboard { background: linear-gradient(175deg, #fff, var(--paper)); }
.legend { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: 700; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 4px; }
.lg.pos { background: var(--win); } .lg.neg { background: var(--loss); } .lg.zero { background: var(--even); }
.sb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sb-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--edge); overflow: hidden; }
.sb-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--even); }
.sb-row.pos::before { background: linear-gradient(180deg, var(--win-2), var(--win)); }
.sb-row.neg::before { background: linear-gradient(180deg, var(--loss-2), var(--loss)); }
.sb-row.pos { background: linear-gradient(90deg, rgba(25,176,107,.09), #fff 60%); }
.sb-row.neg { background: linear-gradient(90deg, rgba(239,75,97,.08), #fff 60%); }
.sb-row:first-child.pos { background: linear-gradient(100deg, #fff4cf, #fffaf0 70%); border-color: var(--gold); box-shadow: 0 10px 22px -16px rgba(169,123,23,.95); }
.sb-row.flash { animation: flash 1s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--gold-2); } 100% { box-shadow: 0 0 0 0 transparent; } }
.pos-badge { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; color: var(--muted); background: var(--paper-2); }
.pos-badge.p1 { background: linear-gradient(160deg, var(--gold-2), var(--gold-deep)); color: #fff; }
.pos-badge.p2 { background: linear-gradient(160deg, #e3e7ea, #9aa3a9); color: #fff; }
.pos-badge.p3 { background: linear-gradient(160deg, #e9b384, #a8653a); color: #fff; }
.sb-name { flex: 1; min-width: 0; display: grid; font-weight: 800; overflow: hidden; }
.sb-name small { font-weight: 600; color: var(--muted); font-size: .78rem; }
.crown { color: var(--gold-deep); margin-left: 6px; }
.crown.big { margin: 0 6px 0 0; color: var(--gold-2); }
.sb-nums { display: grid; text-align: right; line-height: 1.05; }
.sb-pts { font-family: var(--font-display); font-size: 1.9rem; font-weight: 900; }
.sb-pts small { font-family: var(--font-body); font-size: .7rem; font-weight: 700; color: var(--muted); }
.sb-row.pos .sb-pts, .sb-row.pos .sb-money { color: var(--win); }
.sb-row.neg .sb-pts, .sb-row.neg .sb-money { color: var(--loss); }
.sb-row.zero .sb-pts, .sb-row.zero .sb-money { color: var(--even); }
.sb-money { font-weight: 800; font-size: .95rem; }
.sum-check { margin-top: 14px; font-size: .8rem; color: var(--muted); text-align: right; font-weight: 600; }
.empty-mini { padding: 8px 0; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .93rem; }
.table th { text-align: left; font-size: .78rem; color: var(--muted); font-weight: 800; padding: 9px 10px; border-bottom: 2px solid var(--edge); white-space: nowrap; background: var(--paper); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--paper-3); vertical-align: middle; white-space: nowrap; }
.table tbody tr:hover td { background: #fff; }
.table tfoot td { font-weight: 900; border-bottom: 0; border-top: 2px solid var(--edge); }
.table .num { text-align: right; }
.table .rn { color: var(--muted); font-weight: 800; width: 1%; }
.history-table td.num b { display: block; font-size: 1.02rem; }
.history-table td.num small { color: var(--muted); font-size: .74rem; font-weight: 600; }
.history-table td.is-caller { background: linear-gradient(180deg, transparent 0, rgba(232,184,74,.16) 100%); box-shadow: inset 0 -3px 0 var(--gold); }
.history-table tr.latest td { animation: row-in .8s ease-out; }
@keyframes row-in { from { background: rgba(247,215,126,.55); } }
.caller-cell { font-weight: 800; }

/* ---------- dialog & toasts ---------- */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 22, 16, .7); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal-card { position: relative; width: min(450px, 100%); background: var(--paper); border-radius: var(--r-xl); padding: 24px; border: 1px solid var(--edge); box-shadow: 0 40px 80px -24px rgba(0,0,0,.8); transform: translateY(16px) scale(.97); opacity: 0; transition: transform .2s cubic-bezier(.2,.9,.3,1.2), opacity .18s; }
.modal-card::before { content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2), var(--gold-deep)); }
.modal-card h3 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 900; }
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-body { margin: 12px 0 20px; display: grid; gap: 8px; color: var(--ink-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mini-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #fff; border: 1px solid var(--edge); border-radius: 10px; font-weight: 700; }

.toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
@media (min-width: 821px) { .toasts { bottom: 24px; } }
.toast { background: rgba(7,43,32,.97); color: var(--on-felt); padding: 13px 16px 13px 44px; border-radius: 14px; font-weight: 700; box-shadow: 0 16px 34px -12px rgba(0,0,0,.8); border: 1px solid var(--on-felt-line); animation: toast-in .25s cubic-bezier(.2,.9,.3,1.2); transition: opacity .4s, transform .4s; position: relative; }
.toast::before { content: '\2660'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--even); color: #fff; }
.toast-ok::before { content: '\2713'; background: var(--win-2); }
.toast-warn::before { content: '!'; background: var(--gold); color: #2a1d00; }
.toast-error::before { content: '\00D7'; background: var(--loss-2); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---------- final report ---------- */
.report-hero {
  position: relative; overflow: hidden; display: grid; gap: 18px; align-items: center; grid-template-columns: 1fr;
  padding: 28px; border-radius: 28px; color: var(--on-felt);
  background: radial-gradient(600px 260px at 10% 0%, rgba(247,215,126,.28), transparent 70%), linear-gradient(135deg, rgba(0,0,0,.32), rgba(0,0,0,.12));
  border: 1px solid rgba(232,184,74,.45); box-shadow: 0 30px 60px -36px rgba(0,0,0,.95);
}
.report-hero::before { content: ''; position: absolute; inset: 10px; border-radius: 20px; border: 1px dashed rgba(232,184,74,.35); pointer-events: none; }
@media (min-width: 860px) { .report-hero { grid-template-columns: 1fr auto; padding: 32px 36px; } }
.report-hero .eyebrow { color: var(--gold-2); }
.report-hero h2 { font-family: var(--font-display); font-size: clamp(2.2rem, 5.4vw, 3.4rem); font-weight: 900; line-height: 1; letter-spacing: .01em; }
.report-hero .meta span { background: rgba(255,255,255,.08); border-color: var(--on-felt-line); color: var(--on-felt); }
.rh-main, .balance-check { position: relative; z-index: 1; }
.balance-check { display: grid; grid-template-columns: auto auto auto; column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px 20px; border-radius: var(--r-lg); background: var(--paper); color: var(--win); border: 2px solid var(--win-2); }
.balance-check span { font-size: .8rem; font-weight: 800; grid-row: 1; color: var(--ink-2); }
.balance-check span.eq { grid-row: 1 / 3; grid-column: 2; font-size: 2rem; font-weight: 900; color: var(--win); }
.balance-check b { grid-row: 2; font-family: var(--font-display); font-size: 2rem; font-weight: 900; line-height: 1; }
.balance-check b:last-of-type { grid-column: 3; }
.balance-check small { grid-column: 1 / -1; font-weight: 900; margin-top: 6px; }
.balance-check.bad { border-color: var(--loss); color: var(--loss); }

.wl-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .wl-grid { grid-template-columns: repeat(3, 1fr); } }
.wl { overflow: hidden; padding-top: 26px; }
.wl::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--even); }
.wl.win::before { background: linear-gradient(90deg, var(--win), var(--win-2)); }
.wl.loss::before { background: linear-gradient(90deg, var(--loss), var(--loss-2)); }
.wl.win .card-head h2::before { background: var(--win-2); }
.wl.loss .card-head h2::before { background: var(--loss-2); }
.wl.even .card-head h2::before { background: var(--even); }
.group-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.group-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--paper-3); }
.g-name { flex: 1; display: grid; font-weight: 800; }
.g-name small { font-weight: 600; color: var(--muted); font-size: .8rem; }
.group-list b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; }

.settle-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .settle-grid { grid-template-columns: 1.4fr 1fr; } }
/* settlement looks like a torn-off receipt */
.settlement { background: #fff; border: 0; border-radius: 6px; box-shadow: 0 24px 40px -24px rgba(0,0,0,.8); }
.settlement::before, .settlement::after { content: ''; position: absolute; left: 0; right: 0; height: 10px;
  background: radial-gradient(circle at 6px -2px, transparent 6px, #fff 6.5px) 0 0 / 12px 10px repeat-x; }
.settlement::before { top: -9px; transform: rotate(180deg); }
.settlement::after { bottom: -9px; }
.settlement .card-head h2::before { background: var(--loss); }
.settlement .table th { background: #fff; }
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pay-list li { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--edge); border-radius: var(--r-md); }
.pay-from { color: var(--loss); font-weight: 800; } .pay-to { color: var(--win); font-weight: 800; }
.pay-arrow { font-size: .75rem; color: var(--muted); font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); }
.pay-list b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: var(--ink); }
.report-foot { padding-top: 4px; }

/* ---------- history ---------- */
.filters { display: grid; gap: 16px; }
.filter-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.filter-row .grow { grid-column: 1 / -1; }
@media (min-width: 760px) { .filter-row { grid-template-columns: 190px 190px 1fr; } .filter-row .grow { grid-column: auto; } }
.list-summary { margin-bottom: 12px; font-weight: 700; }
.game-list { display: grid; gap: 12px; }
.game-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--r-xl); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.gc-date { flex: none; width: 64px; text-align: center; display: grid; line-height: 1; padding: 10px 0; border-radius: 12px; background: linear-gradient(165deg, var(--felt-light), var(--felt)); color: var(--on-felt); box-shadow: inset 0 0 0 2px rgba(232,184,74,.5); }
.gc-date b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 900; color: var(--gold-2); }
.gc-date span { font-size: .8rem; font-weight: 800; margin-top: 2px; }
.gc-date small { font-size: .68rem; opacity: .75; margin-top: 2px; }
.gc-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.gc-title { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.gc-meta { font-size: .85rem; color: var(--muted); font-weight: 600; }
.gc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gc-pills .pill { font-size: .8rem; padding: 3px 9px; }
.gc-go { font-size: 1.8rem; color: var(--gold-deep); font-weight: 300; }

/* ---------- empty & loading ---------- */
.empty { text-align: center; padding: 52px 16px; display: grid; gap: 12px; justify-items: center; }
.empty h2 { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; }
.empty-cards { display: flex; margin-bottom: 10px; }
.empty-cards span { width: 54px; height: 74px; border-radius: 8px; background: linear-gradient(160deg, #fff, var(--paper-2)); border: 1px solid var(--edge); display: grid; place-items: center; font-size: 1.7rem; margin: 0 -8px; box-shadow: 0 14px 22px -12px rgba(0,0,0,.8); color: var(--ink); }
.empty-cards span:nth-child(1) { transform: rotate(-14deg) translateY(6px); }
.empty-cards span:nth-child(2) { transform: rotate(-5deg); color: var(--loss); }
.empty-cards span:nth-child(3) { transform: rotate(5deg); color: var(--loss); }
.empty-cards span:nth-child(4) { transform: rotate(14deg) translateY(6px); }
.empty .muted { max-width: 42ch; }
.skeleton-list { display: grid; gap: 12px; }
.skeleton-list div { height: 88px; border-radius: var(--r-xl); background: linear-gradient(90deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.06) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border: 1px solid var(--on-felt-line); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- accessibility & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  html, body { background: #fff !important; }
  body { padding: 0; color: #000; }
  .topbar, .no-print, .toasts, .modal, .banner { display: none !important; }
  .container { padding: 0; max-width: none; }
  .report-hero, .page-head, .report-foot { color: #000; background: #fff !important; border: 2px solid #000; }
  .report-hero h2, .report-hero .eyebrow { color: #000; }
  .card, .report-hero, .settlement { break-inside: avoid; box-shadow: none !important; }
  .table-wrap { overflow: visible; }
}
@media (max-width: 440px) { .pc-corner.br { display: none; } }
/* On phones the header must not create a containing box, or the bottom tab bar gets stuck under it */
@media (max-width: 820px) { .topbar { backdrop-filter: none; background: rgba(7,43,32,.98); } }
@media (max-width: 759px) {
  .setup-hero { padding: 26px 22px 18px; }
  .fan { height: 118px; width: 230px; margin-top: 4px; }
  .pc { width: 72px; height: 100px; margin-left: -36px; }
  .pc b { font-size: 2rem; }
}

/* ---------- Double / Re-Double ---------- */
.gold { color: var(--gold-deep); }
.label-note { font-weight: 600; font-size: .8rem; color: var(--muted); margin-left: 6px; }
.dbl-list { display: grid; gap: 8px; margin-bottom: 10px; }
.dbl-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: var(--r-md); background: #fff; border: 1.5px solid var(--edge); transition: border-color .2s, background .2s; }
.dbl-row.lv1 { border-color: #f0b4a0; background: linear-gradient(90deg, #fff1ea, #fff 70%); }
.dbl-row.lv2 { border-color: var(--gold); background: linear-gradient(90deg, #fff3cf, #fff 70%); }
.dbl-name { flex: 1; min-width: 0; display: grid; font-weight: 800; line-height: 1.2; }
.dbl-name small { font-weight: 600; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbl-row.lv1 .dbl-name small { color: #b3461f; }
.dbl-row.lv2 .dbl-name small { color: var(--gold-deep); }
.dbl-seg { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--edge); flex: none; }
.dbl-btn { border: 0; background: transparent; border-radius: 9px; padding: 5px 9px; cursor: pointer; display: grid; line-height: 1.1; min-width: 54px; min-height: 40px; text-align: center; color: var(--ink-2); transition: background .15s, color .15s, box-shadow .15s; }
.dbl-btn b { font-size: .78rem; font-weight: 800; }
.dbl-btn small { font-family: var(--font-display); font-weight: 900; font-size: .95rem; }
.dbl-btn:hover { background: #fff; }
.dbl-btn.b0.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px -2px rgba(0,0,0,.3); }
.dbl-btn.b1.on { background: linear-gradient(160deg, #f47c55, #d4512a); color: #fff; box-shadow: 0 6px 12px -6px rgba(212,81,42,.9); }
.dbl-btn.b2.on { background: linear-gradient(160deg, var(--gold-2), var(--gold-deep)); color: #2a1d00; box-shadow: 0 6px 12px -6px rgba(169,123,23,.9); }
@media (max-width: 480px) {
  .dbl-row { gap: 8px; padding: 6px 6px 6px 8px; }
  .dbl-row .avatar { width: 30px; height: 30px; font-size: .9rem; }
  .dbl-btn { min-width: 0; padding: 4px 6px; }
  .dbl-btn b { font-size: .7rem; }
  .dbl-name small { display: none; }
}
@media (max-width: 359px) {
  .dbl-row { flex-wrap: wrap; }
  .dbl-name { flex: 1 1 calc(100% - 50px); }
  .dbl-seg { flex: 1 1 100%; }
  .dbl-btn { flex: 1; }
}
.xb { display: block; font-style: normal; font-size: .64rem; font-weight: 900; letter-spacing: .02em; padding: 1px 6px; border-radius: 999px; margin: 0 0 2px auto; width: max-content; }
.xb.x2 { background: #ffe3d8; color: #b3461f; }
.xb.x4 { background: #fff0c2; color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold); }
.dbl-note { display: block; font-size: .72rem; font-weight: 700; color: #b3461f; }

/* ---------- admin ---------- */
.admin-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.admin-card .card-head h2::before { background: var(--loss); }
.page-head .btn-ghost.admin-on { background: rgba(25,176,107,.18); border-color: rgba(25,176,107,.5); color: #8ff0bd; }
.row-gap.left { justify-content: flex-start; }
