:root {
  color-scheme: light;
  --topbar-height: 70px;
  --ink: #281c19;
  --muted: #776965;
  --paper: #f6f1e8;
  --surface: #fffcf6;
  --border: #e8ddd1;
  --red: #a92d29;
  --red-dark: #811e1b;
  --gold: #d9a65b;
  --green: #326448;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-padding-top: calc(var(--topbar-height) + env(safe-area-inset-top));
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #c47b36; outline-offset: 3px; }
button:disabled { opacity: .56; cursor: wait; }
h1, h2, h3, p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, monospace; }
.shell { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.topbar { position: sticky; top: 0; z-index: 7; padding-top: env(safe-area-inset-top); color: #f9eee3; background: #281916; }
.top-inner { min-height: var(--topbar-height); display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; white-space: nowrap; }
.brand svg { width: 35px; height: 35px; color: #b93129; }
.top-divider { width: 1px; height: 20px; background: #5b4540; }
.environment, .eyebrow { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; white-space: nowrap; }
.environment { color: #e3b87c; }
.environment i, .eyebrow i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.top-spacer { flex: 1; }
.account { color: #eadcd0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.top-link { background: transparent; color: #f3e5d7; border: 1px solid #69504a; border-radius: 8px; padding: 7px 12px; white-space: nowrap; }
.menu-toggle, .mobile-menu, .player-nav { display: none; }
#app { flex: 1; padding-block: 34px 48px; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 20px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.muted { color: var(--muted); line-height: 1.55; }
.kicker { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; }
.primary { color: #fff8ee; background: var(--red); }
.primary:hover { background: var(--red-dark); }
.secondary { color: var(--ink); background: var(--surface); border-color: var(--border); }
.secondary:hover { background: #f5eadd; }
.auth-layout { min-height: 520px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.auth-cover { grid-area: 1 / 1; overflow: hidden; position: relative; isolation: isolate; padding: clamp(30px, 5vw, 68px); border-radius: var(--radius); color: #fff0d9; background: radial-gradient(ellipse at 85% 80%, #9d2c24, #6b211f 62%, #4f1e1c); }
.auth-cover .eyebrow { color: #f0bf80; }
.auth-cover .cover-title { max-width: none; margin-block: 26px 16px; color: inherit; font-size: clamp(42px, 6vw, 78px); line-height: 1.13; font-weight: 700; letter-spacing: -.05em; font-family: "Songti SC", "Noto Serif CJK SC", serif; }
.auth-cover p { position: relative; max-width: 340px; color: #f5d9bf; line-height: 1.75; }
.cover-rings { position: absolute; z-index: -2; width: 360px; aspect-ratio: 1; right: -85px; bottom: -90px; border: 1px solid #ffcd8d3d; border-radius: 50%; box-shadow: 0 0 0 25px #ffcd8d18, 0 0 0 49px #ffcd8d15, 0 0 0 75px #ffcd8d10; }
.cover-packet { position: absolute; z-index: -1; width: 122px; height: 155px; right: 40px; bottom: 26px; border: 2px solid #df9e55; border-radius: 13px; transform: rotate(16deg); background: linear-gradient(155deg, #de6452, #8b221f 75%); box-shadow: 0 16px 24px #35100e65; }
.cover-packet::before { content: ""; position: absolute; width: 100%; height: 45%; border-bottom: 1px solid #f4c78a; border-radius: 0 0 48% 48%; }
.cover-packet span { position: absolute; left: 50%; top: 43%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #f4c77f; color: #8d2920; font: 700 24px "Songti SC", serif; }
.auth-card { grid-area: 1 / 2; align-content: center; padding: clamp(22px, 4.5vw, 58px); }
.auth-card h1 { font-size: 32px; margin-block: 9px; }
.auth-card form { margin-block: 24px 15px; display: grid; gap: 16px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
input, select { min-height: 44px; width: 100%; padding: 9px 12px; background: #fffdfa; border: 1px solid #d9cabd; border-radius: 8px; color: var(--ink); }
.payment-quotes { width: 100%; min-height: 180px; padding: 10px 12px; background: #fffdfa; border: 1px solid #d9cabd; border-radius: 8px; color: var(--ink); font: inherit; resize: vertical; }
.announcement-form { max-width: 640px; }
.announcement-form textarea { display: block; width: 100%; padding: 9px 12px; background: #fffdfa; border: 1px solid #d9cabd; border-radius: 8px; color: var(--ink); font: inherit; resize: vertical; }
.auth-switch { color: var(--muted); font-size: 14px; }
.auth-switch a { font-weight: 700; color: var(--red); }
.auth-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
.message-card { max-width: 660px; margin-inline: auto; padding: 32px; display: grid; justify-items: start; gap: 14px; }
.message-card code { max-width: 100%; overflow-wrap: anywhere; background: #f4ebe0; padding: 12px; border-radius: 8px; }
.message-card .stack { width: 100%; }
.notices { position: fixed; bottom: 22px; right: 22px; max-width: min(390px, calc(100% - 44px)); padding: 13px 18px; z-index: 10; border-radius: 10px; color: #fffaf4; background: #356447; box-shadow: 0 5px 25px #1b14152a; }
.notices.error { background: #862320; }
.notices:empty { display: none; }
.network-loading {
  position: fixed;
  inset: calc(env(safe-area-inset-top) + 12px) auto auto 50%;
  z-index: 12;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 9px 14px;
  align-items: center;
  gap: 9px;
  border: 1px solid #75524a;
  border-radius: 999px;
  color: #fff5e8;
  background: #35221e;
  box-shadow: 0 5px 20px #24171640;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}
.network-loading:not([hidden]) { display: flex; }
.network-spinner { flex: none; width: 17px; height: 17px; border: 2px solid #a78570; border-top-color: #ffdb9d; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .network-spinner { animation: network-spin .75s linear infinite; }
  @keyframes network-spin { to { transform: rotate(360deg); } }
}
.loading { padding: 24px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; }
}
.top-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; color: #e5d3c7; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: #ffd698; }
.page-head { margin-block: 4px 24px; display: grid; gap: 7px; }
.page-head h1 { font-size: clamp(29px, 4vw, 44px); letter-spacing: -.035em; }
.rules-page { max-width: 1000px; margin-inline: auto; }
.rules-link { display: inline-flex; align-items: center; min-height: 44px; }
.rules-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.rules-steps ol { margin: 0; padding-inline-start: 25px; }
.rules-steps li { padding-block: 12px; padding-inline-start: 5px; }
.rules-steps li + li { border-top: 1px solid var(--border); }
.rules-steps li::marker { color: var(--red-dark); font-weight: 750; }
.rules-steps h3 { margin-bottom: 4px; font-size: 17px; }
.rules-steps p, .rules-example p { font-size: 15px; line-height: 1.65; }
.rules-steps p { color: var(--muted); }
.rules-example { border-top: 3px solid var(--red); }
.rules-rate { margin-top: 13px; }
.rules-payout { margin-block: 6px 13px; }
.rules-payout div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding-block: 9px; border-bottom: 1px solid var(--border); }
.rules-payout dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.rules-payout div:last-child { color: var(--red-dark); font-weight: 750; }
.rules-note { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { padding: 20px; display: grid; gap: 6px; align-content: start; }
.stat span, .stat small { color: var(--muted); font-size: 13px; }
.stat strong { font-size: clamp(21px, 3vw, 33px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: minmax(245px, .85fr) minmax(0, 1.15fr); gap: 16px; margin-bottom: 16px; }
.block { padding: clamp(16px, 3vw, 26px); min-width: 0; }
.block h2 { font-size: 19px; margin-bottom: 10px; }
.stack { display: grid; justify-items: start; gap: 14px; margin-top: 16px; }
.stack label { width: 100%; }
.record-list { margin: 0; padding: 0; list-style: none; }
.record-list li { padding: 11px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.record-list li:last-child { border-bottom: 0; }
.record-list strong, .record-list small, .record-list code { display: block; }
.record-list small, .record-list code { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; padding: 5px 9px; background: #f5e6d4; color: #6f4117; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag.success { background: #e6efe6; color: var(--green); }
.empty { padding: 22px 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; background: #f9f2e9; }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.page-actions:not(:empty) { margin-top: 14px; }
.table-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.table-choice { min-width: 0; display: grid; gap: 9px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.table-choice-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.table-choice p { margin: 0; }
.table-choice .button { width: 100%; align-self: end; }
.recharge-panel { margin-block: 14px; }
.wallet-orders { margin-block: 14px; }
.wallet-orders :is(th, td) { padding: 7px 9px; }
.wallet-orders td:first-child { white-space: normal; overflow-wrap: anywhere; }
.wallet-orders td > small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.wallet-orders tr[data-recharge-order] { scroll-margin-top: 76px; }
.wallet-order-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.wallet-order-actions .button { min-height: 36px; padding: 4px 8px; font-size: 12px; white-space: nowrap; }
.wallet-orders th:last-child { text-align: right; }
.wallet-orders tr[data-order-details] > td { padding: 10px 12px; background: #faf4eb; }
.wallet-orders tr[data-order-details] :is(code, p) { overflow-wrap: anywhere; }
.wallet-orders tr[data-order-details] form { margin-top: 10px; }
.wallet-orders tr[data-order-details] details { margin-top: 10px; }
@media (max-width: 480px) {
  .wallet-orders { padding-inline: 12px; }
  .wallet-orders :is(th, td) { padding-inline: 4px; font-size: 12px; }
  .wallet-orders .tag { padding: 3px 5px; font-size: 11px; }
  .wallet-order-actions { flex-direction: column; align-items: flex-end; }
}
.recharge-panel h2 { margin-bottom: 14px; }
.recharge-form { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(230px, 1fr); align-items: start; gap: 20px; }
.recharge-methods { min-width: 0; margin: 0; padding: 0; border: 0; }
.recharge-methods legend, .recharge-summary h3 { font-size: 15px; font-weight: 750; }
.recharge-methods legend { margin-bottom: 9px; padding: 0; }
.recharge-provider + .recharge-provider { margin-top: 14px; }
.recharge-provider h3 { margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.recharge-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); gap: 8px; }
.recharge-card { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fffdfa; cursor: pointer; }
.recharge-card:has(input:checked) { border-color: var(--red); background: #fcf0e8; }
.recharge-card input { flex: none; width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--red); }
.recharge-card span { display: grid; min-width: 0; gap: 3px; }
.recharge-card small { color: var(--muted); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.recharge-summary { display: grid; gap: 11px; min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #faf4eb; }
.recharge-total { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
.recharge-total span { color: var(--muted); font-size: 13px; }
.recharge-total strong { font-size: clamp(20px, 3vw, 28px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.recharge-summary .form-feedback:empty { display: none; }
@media (max-width: 760px) {
  .table-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .table-choice { padding: 10px; }
  .recharge-form { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
.lobby-hero { min-height: 266px; overflow: hidden; display: flex; align-items: center; border-radius: 18px; color: #fff5e6; background: #66231f url("/assets/hero.6f610017dbb149d8.svg") center right / auto 100% no-repeat; }
.hero-copy { padding: clamp(23px, 3vw, 34px) clamp(24px, 4vw, 48px); position: relative; }
.hero-copy .eyebrow { color: #f0c381; letter-spacing: .12em; }
.hero-copy h1 { margin: 9px 0 9px; font-family: "Songti SC", "Noto Serif CJK SC", serif; font-size: clamp(43px, 6.5vw, 73px); line-height: 1.1; letter-spacing: -.055em; }
.hero-copy p { max-width: 415px; color: #f4dbc7; font-size: 15px; line-height: 1.65; }
.hero-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 14px; font-weight: 700; color: #ffd5a0; }
.hero-link:hover { text-decoration: underline; }
.lobby-strip { margin-block: 14px 29px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 20px; padding: 17px 22px; }
.lobby-strip > div { display: grid; gap: 4px; padding-right: 12px; border-right: 1px solid var(--border); }
.lobby-strip span { color: var(--muted); font-size: 12px; }
.lobby-strip strong { font-size: 21px; overflow-wrap: anywhere; }
.lobby-strip strong small { font-size: 15px; color: var(--muted); }
.picker-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.picker-head h2 { font-size: clamp(24px, 3vw, 34px); margin-top: 4px; }
.picker-head p { font-size: 14px; margin-top: 5px; }
.picker-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.picker-controls .button { font-size: 13px; min-height: 41px; }
.payout-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.payout-options button { display: grid; gap: 2px; text-align: left; padding: 10px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.payout-options button[aria-pressed="true"] { border-color: var(--red-dark); background: var(--red-dark); color: #fff8ee; }
.payout-options small { font-size: 12px; }
.tier-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
[data-bank-field][hidden] { display: none; }
.tier-card { --tier: #9c573a; --tint: #f3e4d8; padding: 18px; border-top: 3px solid var(--tier); }
.tier-card.rising { --tier: #a57030; --tint: #f5e7cf; }
.tier-card.expert { --tier: #a9362d; --tint: #f6dfd8; }
.tier-card.master { --tier: #6c474f; --tint: #eee1e5; }
.tier-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; border: 1px solid var(--tier); color: var(--tier); background: var(--tint); font-size: 21px; box-shadow: inset 0 0 0 3px var(--surface); }
.tier-card h3 { margin-block: 11px 6px; font-size: 16px; }
.tier-score { display: flex; align-items: baseline; gap: 5px; margin-bottom: 11px; }
.tier-score strong { font-size: clamp(24px, 4vw, 38px); font-weight: 800; line-height: 1.1; letter-spacing: -.06em; }
.tier-score span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tier-details { display: flex; justify-content: space-between; gap: 5px; padding-top: 8px; font-size: 13px; color: var(--muted); }
.tier-details b { color: var(--ink); white-space: nowrap; }
.tier-card .button { width: 100%; margin-top: 15px; justify-content: space-between; }
.tier-card .button + .button { margin-top: 8px; justify-content: center; }
.invite-share { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px 16px; margin-bottom: 16px; }
.invite-share label { flex: 1 1 230px; min-width: 0; }
.history-block { margin-top: 20px; }
.result-link { color: var(--red-dark); font-size: 14px; font-weight: 700; }
.result-link:hover { text-decoration: underline; }
.confirm-dialog { padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; max-width: min(450px, calc(100% - 32px)); box-shadow: 0 16px 60px #2b160e38; }
.confirm-dialog::backdrop { background: #1d1413a1; }
.dialog-body { padding: 26px; display: grid; gap: 12px; }
.dialog-body .page-actions { justify-content: end; }
.daily-announcement { width: 450px; }
.daily-announcement :is(h2, p) { overflow-wrap: anywhere; }
.daily-announcement p { white-space: pre-wrap; }
.daily-announcement .page-actions { display: flex; }
.atp-qr-dialog { width: min(390px, calc(100% - 32px)); }
.atp-qr-image { display: block; width: min(240px, 100%); height: auto; aspect-ratio: 1; object-fit: contain; margin-inline: auto; background: white; }
.atp-qr-status:empty { display: none; }
.form-feedback { margin-top: 10px; color: var(--red-dark); font-size: 13px; }
.form-feedback:empty { display: none; }
.profile-card { max-width: 550px; }
.practice-card { margin-bottom: 24px; }
.practice-card .button { margin-top: 12px; }
.result-heading { display: flex; justify-content: space-between; align-items: start; gap: 9px; }
.result-heading h2 { margin-top: 4px; }
.round-result { align-self: start; }
@media (max-width: 930px) {
  .lobby-hero { background-position: center right -125px; }
  .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.admin-fee { margin-bottom: 16px; }
.admin-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.admin-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 650; }
.admin-links a[aria-current="page"] { background: var(--red-dark); border-color: var(--red-dark); color: #fff8ee; }
.admin-filters { margin: 12px 0 0; }
.site-workspace { display: contents; }
.admin-layout {
  display: grid;
  flex: 1;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  width: min(1360px, calc(100% - 64px));
  margin-inline: auto;
}
.admin-layout #app { width: 100%; min-width: 0; margin: 0; }
#admin-sidebar:not([hidden]) {
  position: sticky;
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 20px);
  align-self: start;
  max-height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top) - 40px);
  margin-top: 34px;
  padding: 4px 12px 12px 0;
  overflow: auto;
  scrollbar-width: thin;
  border-right: 1px solid var(--border);
}
.admin-nav-group { display: grid; gap: 2px; }
.admin-nav-group + .admin-nav-group { margin-top: 14px; }
.admin-nav-group p { padding: 4px 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
#admin-sidebar .admin-nav-group a { display: flex; align-items: center; min-height: 38px; padding: 6px 10px; border-radius: 7px; font-size: 14px; }
#admin-sidebar .admin-nav-group a:hover { background: #f1e7db; }
#admin-sidebar .admin-nav-group a[aria-current="page"] { background: #eed9cf; color: var(--red-dark); font-weight: 750; }
#admin-sidebar .admin-nav-group a:focus-visible { outline-offset: -3px; }
.admin-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-workspace {
  --admin-gap: 14px;
  --admin-inset: clamp(12px, 2vw, 18px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--admin-gap);
}
.admin-workspace > :is(.page-head, .admin-links, .admin-overview, .panel, .split, .page-actions),
.admin-workspace .panel.block > :is(h2, .stack, .page-actions, .admin-links, .account-meta, .quote-amounts, .payment-card) { margin: 0; }
.admin-workspace :is(.split, .admin-overview) { gap: var(--admin-gap); }
.admin-workspace .split { align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-workspace .panel { padding: var(--admin-inset); }
.admin-workspace .panel.block { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; }
.admin-workspace .result-heading h2 { margin: 0; align-self: center; }
.admin-workspace .page-head { gap: 4px; }
.admin-workspace .page-head h1 { font-size: clamp(25px, 3vw, 34px); }
.admin-release summary { cursor: pointer; }
.admin-preferences > summary { cursor: pointer; font-weight: 750; }
.admin-preferences > div { display: grid; gap: 10px; margin-top: 12px; }
.admin-preferences > div > .admin-fee { margin: 0; }
.admin-preferences .muted { font-size: 14px; }
.admin-release summary .muted { margin-inline-start: 12px; font-size: 13px; }
.admin-release-list { display: grid; gap: 12px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); list-style: none; }
.admin-release-list time { margin-inline-start: 8px; color: var(--muted); font-size: 13px; }
.admin-release-list ul { margin-top: 5px; padding-inline-start: 20px; font-size: 14px; }
.admin-workspace .admin-links a { min-height: 36px; padding-block: 5px; }
.admin-workspace .stack { gap: 10px; }
.admin-workspace .empty { padding: 6px 0; }
.admin-workspace .page-actions:empty, .admin-workspace [data-payment-evidence]:empty { display: none; }
.admin-table { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; }
.admin-table table { border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.38; }
.admin-table :is(th, td) { padding: 6px 8px; vertical-align: middle; }
.admin-table th, .admin-table .record-money { white-space: nowrap; }
.admin-table td { max-width: 28ch; white-space: normal; overflow-wrap: anywhere; }
.admin-table td code { font-size: 12px; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table :is(.record-note, .tag) { font-size: 11px; line-height: 1.38; }
.admin-table .tag { padding: 3px 6px; }
.admin-table.has-row-actions :is(th, td):last-child {
  position: sticky;
  right: 0;
  background: var(--surface);
  box-shadow: -1px 0 var(--border);
  text-align: right;
  width: 1%;
  max-width: none;
}
.admin-table.has-row-actions th:last-child { background: #f9f2e9; }
.admin-row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.admin-row-button { min-height: 30px; padding: 3px 8px; font-size: 12px; white-space: nowrap; }
.admin-identity small { display: block; margin-top: 2px; color: var(--muted); }
.admin-detail-dialog { width: min(560px, calc(100% - 32px)); max-width: none; }
.admin-detail-dialog .dialog-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.admin-detail-dialog .dialog-body > :is(.stack, .withdraw-card) { margin: 0; }
.admin-player-activity:not([hidden]) { display: grid; gap: 8px; }
#withdrawal-player-activity:not([hidden]) { margin-top: 10px; }
.admin-player-activity h3 { font-size: 15px; }
.admin-original-message { margin: 0; padding: 8px 10px; border-left: 3px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-text-preview { display: -webkit-box; width: min(22ch, 140px); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.control-switch, .stack .control-switch {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  cursor: pointer;
}
.control-switch-control { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.control-switch-control input {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  width: 42px;
  height: 24px;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.control-switch-track { width: 42px; height: 24px; padding: 3px; border-radius: 99px; background: #82766d; }
.control-switch-track::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.control-switch-status { color: var(--muted); font-size: 12px; }
.control-switch input:checked + .control-switch-track { background: var(--green); }
.control-switch input:checked + .control-switch-track::after { transform: translateX(18px); }
.control-switch input:focus-visible + .control-switch-track { outline: 3px solid #c47b36; outline-offset: 3px; }
.control-switch .switch-on, .control-switch input:checked ~ .control-switch-status .switch-off { display: none; }
.control-switch input:checked ~ .control-switch-status .switch-on { display: inline; color: var(--green); }
.control-switch:has(input:disabled) { cursor: default; }
.control-switch input:disabled ~ span { opacity: .62; }
@media (prefers-reduced-motion: no-preference) {
  .control-switch-track { transition: background-color .18s ease; }
  .control-switch-track::after { transition: transform .18s ease; }
}
@media (max-width: 1050px) {
  .admin-workspace .admin-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-table table:has(th:nth-child(6)) { min-width: 640px; }
}
@media (max-width: 760px) {
  .admin-workspace { --admin-gap: 10px; }
  .admin-workspace .split { grid-template-columns: minmax(0, 1fr); }
  .admin-row-actions { flex-wrap: wrap; width: max-content; max-width: 145px; margin-left: auto; }
  .admin-row-button { min-height: 40px; }
}
.account-batch-names { display: block; max-width: 32rem; white-space: normal; overflow-wrap: anywhere; }
.admin-reason { display: block; width: 180px; white-space: normal; overflow-wrap: anywhere; }
.admin-round-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.admin-round-meta dt { color: var(--muted); font-size: 13px; }
.admin-round-meta dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.fee-form { display: flex; align-items: end; flex-wrap: wrap; }
.fee-form label { width: min(100%, 245px); }
.withdraw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 13px; }
.withdraw-card, .quote-box { padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: #fffbf5; }
.withdraw-card .result-heading { align-items: center; margin-bottom: 11px; }
.withdraw-card .result-heading > div { min-width: 0; overflow-wrap: anywhere; }
.withdraw-card .result-heading code { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.quote-box { margin-top: 15px; }
.quote-box h3 { font-size: 16px; }
.quote-box .button { margin-top: 10px; }
.quote-amounts { display: grid; gap: 0; padding: 0; margin: 9px 0; }
.quote-amounts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.quote-amounts dt { color: var(--muted); font-size: 13px; }
.quote-amounts dd { margin: 0; font-weight: 750; font-size: 14px; }
.quote-amounts dd small { color: var(--muted); font-weight: 600; }
.record-note { color: var(--muted); line-height: 1.65; font-size: 13px; overflow-wrap: anywhere; }
.rejected { background: #f2e0da; color: #8a2a25; }
.review-actions details { flex: 1; min-width: 100px; }
.review-actions summary { cursor: pointer; }

@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  :root { --topbar-height: 56px; }
  body {
    --gutter-left: max(14px, env(safe-area-inset-left));
    --gutter-right: max(14px, env(safe-area-inset-right));
    --dock-space: 0px;
  }
  .shell { width: calc(100% - var(--gutter-left) - var(--gutter-right)); margin-left: var(--gutter-left); margin-right: var(--gutter-right); }
  .admin-layout { display: contents; }
  #admin-sidebar:not([hidden]) { display: none; }
  .admin-layout #app { width: auto; margin-inline: var(--gutter-left) var(--gutter-right); }
  #app { padding-block: 16px 24px; }
  .top-inner { gap: 7px; }
  .top-divider, .account { display: none; }
  .brand { gap: 5px; font-size: 19px; }
  .brand svg { width: 29px; height: 29px; }
  .environment { gap: 4px; font-size: 11px; }
  .top-link { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 6px 8px; font-size: 13px; }
  .top-inner > .top-link, .top-nav { display: none; }
  .menu-button { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; }
  .menu-button:active { background: #ffffff12; }
  .menu-icon { position: relative; width: 21px; height: 2px; border-radius: 2px; background: currentColor; }
  .menu-toggle .menu-icon { box-shadow: 0 -6px currentColor, 0 6px currentColor; }
  .menu-close .menu-icon { transform: rotate(45deg); }
  .menu-close .menu-icon::after { position: absolute; inset: 0; transform: rotate(90deg); border-radius: inherit; background: currentColor; content: ""; }
  .mobile-menu[open] {
    --dialog-offset: translateX(100%);
    --dialog-hidden-opacity: 1;
    display: block;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, calc(100% - 32px));
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-left: 1px solid #69504a;
    background: #281916;
    color: #f9eee3;
  }
  html:has(.mobile-menu[open], .confirm-dialog[open]) { overflow: hidden; }
  .mobile-menu::backdrop { background: #1d1413a1; }
  .mobile-menu-body { padding: calc(12px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) 14px; }
  .mobile-menu-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .mobile-menu-head h2 { font-size: 21px; }
  .mobile-menu-account { margin-block: 4px 14px; color: #eadcd0; font-size: 14px; overflow-wrap: anywhere; }
  .mobile-menu-nav, .mobile-menu-actions { display: grid; gap: 4px; }
  .mobile-menu-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid #69504a; }
  .mobile-menu-nav a, .mobile-menu-actions .top-link { display: flex; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
  .mobile-menu-nav a[aria-current="page"] { background: #543229; color: #ffdfad; }
  .mobile-menu-nav .admin-nav-group p { color: #e3b87c; }
  .mobile-menu-nav .admin-nav-group + .admin-nav-group { margin-top: 8px; }
  .player-page { --dock-space: 56px; padding-bottom: calc(var(--dock-space) + env(safe-area-inset-bottom)); }
  .player-nav:not([hidden]) {
    position: fixed;
    z-index: 8;
    inset: auto 0 0;
    display: block;
    padding: 6px var(--gutter-right) calc(6px + env(safe-area-inset-bottom)) var(--gutter-left);
    border-top: 1px solid #685046;
    background: #281916;
  }
  .player-nav-track { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .player-nav-track::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: calc((100% - 12px) / 4);
    border-radius: 8px;
    background: #543229;
    opacity: 0;
    transform: translateX(calc(var(--tab-index, 0) * (100% + 4px)));
    content: "";
    pointer-events: none;
  }
  .player-nav[data-active="1"] { --tab-index: 1; }
  .player-nav[data-active="2"] { --tab-index: 2; }
  .player-nav[data-active="3"] { --tab-index: 3; }
  .player-nav.has-selection .player-nav-track::before { opacity: 1; }
  .player-nav a { position: relative; display: grid; place-items: center; min-height: 44px; border-radius: 8px; color: #e5d3c7; font-size: 14px; font-weight: 650; }
  .player-nav a[aria-current="page"] { color: #ffdfad; }
  .keyboard-open { --dock-space: 0px; }
  .keyboard-open .player-nav { display: none; }
  .notices { left: var(--gutter-left); right: var(--gutter-right); bottom: calc(8px + var(--dock-space) + env(safe-area-inset-bottom)); max-width: none; }
  .footer { flex-wrap: wrap; gap: 6px 12px; }
  input, select { min-width: 0; min-height: 48px; font-size: 16px; font-weight: 500; }
  button, a, summary { touch-action: manipulation; }
  .button { min-height: 48px; }
  .page-head { margin-block: 1px 16px; }
  .page-head h1 { font-size: 30px; }
  .split, .auth-layout, .withdraw-grid, .rules-layout { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { gap: 7px; }
  .stat { padding: 12px 9px; }
  .stat strong { font-size: clamp(17px, 4.5vw, 24px); }
  .admin-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-links a { padding-inline: 9px; }
  .auth-layout { min-height: 0; gap: 12px; }
  .auth-card { grid-area: 1 / 1; padding: 21px; }
  .auth-card form { margin-top: 18px; gap: 12px; }
  .auth-card .button, .stack > .button, .quote-box .button { width: 100%; }
  .auth-switch a { display: inline-flex; align-items: center; min-height: 44px; }
  .auth-cover { grid-area: 2 / 1; min-height: 0; padding: 18px; }
  .auth-cover .cover-title { margin-block: 7px; font-size: 26px; }
  .cover-title br { display: none; }
  .auth-cover p { max-width: min(100%, 280px); font-size: 13px; }
  .cover-packet { right: 14px; bottom: 15px; scale: .43; transform-origin: bottom right; }
  .message-card { padding: 20px; }
  .lobby-hero { min-height: 0; background-position: right center; background-size: auto 118%; background-image: linear-gradient(90deg, #66231f 14%, #66231fbb 64%, transparent), url("/assets/hero.6f610017dbb149d8.svg"); }
  .hero-copy { padding: 16px; }
  .hero-copy h1 { margin: 4px 0 5px; font-size: clamp(29px, 7.8vw, 41px); }
  .hero-copy p { max-width: 300px; font-size: 13px; }
  .hero-link { display: none; }
  .lobby-strip { margin-block: 10px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 6px 9px; padding: 10px; }
  .lobby-strip > div { padding: 0; border: 0; }
  .lobby-strip strong { font-size: 17px; }
  .lobby-strip .lobby-rate { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; }
  .lobby-strip .lobby-rate strong, .lobby-rate strong small { font-size: 12px; }
  .lobby-strip .button { grid-column: 3; grid-row: 1; padding-inline: 9px; font-size: 13px; }
  .lobby-strip .button span { display: none; }
  .picker-head { align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
  .picker-head h2 { margin: 0; }
  .picker-head p { font-size: 13px; }
  .picker-head .kicker { display: none; }
  .picker-controls .button { min-height: 44px; padding-inline: 10px; }
  .tier-grid { gap: 8px; }
  .tier-card { min-width: 0; padding: 11px; }
  .tier-icon { width: 28px; height: 28px; font-size: 16px; }
  .tier-card h3 { margin-block: 7px 4px; }
  .tier-score { flex-wrap: wrap; gap: 3px 5px; margin: 0; }
  .tier-score strong { font-size: 28px; }
  .tier-size, .tier-arrow { display: none; }
  .tier-card .button { justify-content: center; margin-top: 9px; padding-inline: 5px; font-size: 14px; }
  .tier-card .button + .button { margin-top: 5px; }
  .tier-details { font-size: 12px; }
  .practice-card .fee-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .practice-card .button, .practice-card .form-feedback { grid-column: 1 / -1; margin-top: 2px; }
  .result-heading { align-items: center; }
  .result-heading .result-link, .record-list .result-link { display: inline-flex; align-items: center; min-height: 44px; }
  .record-list li { flex-wrap: wrap; gap: 4px 12px; }
  .record-list li > div { min-width: 0; }
  .round-result .record-list li > span:first-child { overflow-wrap: anywhere; }
  .history-block { margin-top: 14px; }
  .confirm-dialog { --dialog-offset: translateY(100%); --dialog-hidden-opacity: 1; inset: auto 0 0; width: min(520px, 100%); max-width: none; max-height: calc(100% - env(safe-area-inset-top) - 8px); margin: 0 auto; border-radius: 16px 16px 0 0; }
  .dialog-body { padding: 20px var(--gutter-right) calc(14px + env(safe-area-inset-bottom)) var(--gutter-left); }
  .dialog-body .page-actions { display: grid; grid-template-columns: 1fr 2fr; }
  .wallet-ledger table, .wallet-ledger tbody { display: block; }
  .wallet-ledger thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .wallet-ledger tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .wallet-ledger tr:last-child { border-bottom: 0; }
  .wallet-ledger td { min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .wallet-ledger td:first-child { font-weight: 750; }
  .wallet-ledger td:last-child { grid-column: 2; grid-row: 1; text-align: right; color: var(--muted); font-size: 12px; }
  .wallet-ledger td[data-label] { display: grid; gap: 3px; font-variant-numeric: tabular-nums; }
  .wallet-ledger td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .wallet-ledger td:nth-child(4) { grid-column: 1 / -1; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; font-size: 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.mobile-menu, .confirm-dialog)[open] {
    opacity: var(--dialog-hidden-opacity, 0);
    transform: var(--dialog-offset, translateY(14px) scale(.98));
    transition: transform 220ms cubic-bezier(.4, 0, 1, 1), opacity 180ms ease;
  }
  :is(.mobile-menu, .confirm-dialog)[open].is-visible {
    opacity: 1;
    transform: none;
    transition: transform 300ms cubic-bezier(.22, .8, .25, 1), opacity 220ms ease;
  }
  :is(.mobile-menu, .confirm-dialog)[open]::backdrop { opacity: 0; transition: opacity 180ms ease; }
  :is(.mobile-menu, .confirm-dialog)[open].is-visible::backdrop { opacity: 1; }
  .player-nav-track::before { transition: transform 280ms cubic-bezier(.25, .75, .25, 1), opacity 160ms ease; }
  .player-nav a, .result-link, .stage-link { transition: color 160ms ease; }
  .button, .menu-button { transition: background-color 160ms ease, border-color 160ms ease, transform 150ms ease; }
  .button:not(:disabled):active, .menu-button:active { transform: scale(.98); }
  .player-nav a:active { transform: translateY(1px); }
  input, select { transition: border-color 160ms ease; }
  :is(.auth-card, .lobby-hero, .tier-grid, .page-head, .rules-layout, .result-replay) { animation: ui-appear 220ms ease-out; }
  .notices:not(:empty) { animation: ui-appear 180ms ease-out; }
  @keyframes ui-appear {
    from { opacity: .65; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 370px) {
  .tier-icon { display: none; }
  .picker-head { align-items: start; }
}

@media (max-width: 280px) { .top-inner > .environment { display: none; } }

@media (min-width: 640px) and (max-width: 960px) and (max-height: 500px) {
  .auth-layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .auth-cover { grid-area: 1 / 1; align-content: center; }
  .auth-card { grid-area: 1 / 2; padding: 14px 16px; }
  .auth-card h1 { font-size: 28px; margin-block: 4px; }
  .auth-card form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 12px 3px; }
  .auth-card form .button { grid-column: 1 / -1; }
  .lobby-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 2fr) auto; }
  .lobby-strip .lobby-rate { grid-column: 3; grid-row: 1; }
  .lobby-strip .button { grid-column: 4; }
  .tier-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.draw-proof { margin-block: 16px; }
.draw-proof pre { max-height: 20rem; overflow: auto; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.proof-result:empty { display: none; }

.payment-card { margin-block: 12px; }
.payment-card :is(code, dd, small) { overflow-wrap: anywhere; }
.payment-card details { margin-top: 12px; }
.payment-card details form { margin-top: 10px; }
.payment-card .payment-checkbox { display: flex; align-items: center; gap: 8px; }
.payment-card .payment-checkbox input { width: 18px; height: 18px; min-height: 0; }
.gateway-log { padding: 8px 0; border-bottom: 1px solid var(--border); }
.gateway-log summary { cursor: pointer; }
.gateway-log summary small { color: var(--muted); }
.gateway-log pre { max-height: 20rem; overflow: auto; padding: 10px; margin: 6px 0 0; background: #faf4eb;
  border: 1px solid var(--border); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }

.staff-mfa-dialog .block { margin: 0; }
.staff-otp { position: relative; display: block; width: min(100%, 296px); margin-top: 7px; }
.staff-otp-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(5px, 1.7vw, 9px); }
.staff-otp-boxes > span { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 8px;
  background: #fffdfa; font-size: 23px; font-weight: 750; font-variant-numeric: tabular-nums; }
.staff-otp:focus-within .is-current { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.staff-otp input { position: absolute; inset: 0; height: 100%; min-height: 0; opacity: 0; font-size: 16px; }
.staff-setup-key, .account-meta dd { overflow-wrap: anywhere; }
.account-meta { display: grid; gap: 12px; margin: 16px 0; }
.account-meta dt { color: var(--muted); font-size: 13px; }
.account-meta dd { margin: 4px 0 0; }
