@font-face { font-family: 'Darker Grotesque'; font-weight: 500 900; font-display: swap; src: url(/fonts/darker.woff2) format('woff2'); }
@font-face { font-family: 'Pathway Extreme'; font-weight: 400 800; font-stretch: 75% 100%; font-display: swap; src: url(/fonts/pathway.woff2) format('woff2'); }
@font-face { font-family: 'Handjet'; font-weight: 300 800; font-display: swap; src: url(/fonts/handjet.woff2) format('woff2'); }

:root {
  --wall: #e3e7d9; --wall-2: #d7dccb; --wall-3: #c9cfbb;
  --ink: #1c1d19; --muted: #5d6457; --line: #b9c0ad;
  --cab: #29473a; --cab-2: #1d3329; --cab-3: #3d604d; --chrome: #cfd3cc;
  --manila: #f3e6c4; --manila-2: #e8d5a6; --rule: #e49a83; --violet: #4d3f93;
  --up: #1b7a43; --down: #c4302b; --red: #d23a2e; --steel: #8e9792; --steel-2: #6c756f;
  --display: 'Darker Grotesque', 'Arial Narrow', sans-serif;
  --text: 'Pathway Extreme', system-ui, sans-serif;
  --digits: 'Handjet', ui-monospace, monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.5 var(--text); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #edf0e5 0, var(--wall) 420px, var(--wall) 100%);
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
a { color: var(--cab); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 850; line-height: .95; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(44px, 7vw, 88px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 26px; }
h4 { font-size: 21px; }
p { margin: 0 0 .8em; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .86em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink); }
.ico { width: 1em; height: 1em; vertical-align: -.12em; margin-left: .25em; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.app { flex: 1; padding-bottom: 64px; }
.loading { padding: 80px 0; }

/* ---------- header: a cabinet-green band with a chrome edge ---------- */
.top { background: linear-gradient(180deg, var(--cab-3), var(--cab) 60%, var(--cab-2)); border-bottom: 3px solid var(--chrome); box-shadow: 0 2px 0 #9aa198; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: #f6eed6; text-decoration: none; font: 900 38px/1 var(--display); letter-spacing: -.02em; }
.brand:hover { color: #fff; }
.brand-mark { width: 40px; height: 40px; }
.brand-mark.sm { width: 24px; height: 24px; vertical-align: -6px; margin-right: 6px; }
.nav { display: flex; gap: 22px; flex: 1; }
.nav a { color: #d8e2d8; text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a.on { color: #fff; border-bottom-color: var(--red); }
.top-r { display: flex; align-items: center; gap: 14px; }
.xlink { color: #d8e2d8; font-size: 20px; display: inline-flex; }
.xlink .ico { margin: 0; }
.top .btn-main { background: #f3e6c4; color: var(--cab-2); box-shadow: 0 3px 0 #b9a571; }
.top .btn-main:hover { background: #fff3d6; }
.testbar { margin: 0; background: var(--manila); color: #5b4a22; text-align: center; font-size: 13px; padding: 5px 16px; border-bottom: 1px solid var(--manila-2); }
.ca-strip { background: var(--ink); color: #f3e6c4; font-size: 13px; padding: 6px 16px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ca-strip span { overflow-wrap: anywhere; }
.ca-strip a, .ca-strip .linkish { color: #f3e6c4; }

/* ---------- buttons: they press in ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 700 16px/1 var(--text); border: 0; border-radius: 8px; padding: 14px 22px; cursor: pointer; text-decoration: none; transition: transform .06s, box-shadow .06s, background .15s; }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-main { background: var(--cab); color: #f6eed6; box-shadow: 0 4px 0 var(--cab-2), 0 6px 14px rgba(29, 51, 41, .25); }
.btn-main:hover { background: var(--cab-3); color: #fff; }
.btn-main:active { box-shadow: 0 2px 0 var(--cab-2); }
.btn-quiet { background: #f6f7f1; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), 0 3px 0 var(--wall-3); }
.btn-quiet:hover { background: #fff; }
.btn-long { background: var(--up); color: #fff; box-shadow: 0 4px 0 #0f5129; flex: 1; }
.btn-short { background: var(--down); color: #fff; box-shadow: 0 4px 0 #8a1d19; flex: 1; }
.btn-small { padding: 10px 16px; font-size: 14px; }
.wide { width: 100%; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--cab); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; padding: 56px 0 40px; }
.hero h1 { max-width: 12ch; }
.lede { font-size: 19px; max-width: 54ch; color: #34382f; }
.hero-next { margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--line); }
.hero-next p { font-size: 18px; }
.hero-next .mono { font-size: 15px; background: var(--manila); padding: 2px 6px; border-radius: 3px; color: var(--violet); }

/* ---------- the time recorder ---------- */
.recorder { width: 100%; max-width: 230px; margin: 0 auto; text-align: center; filter: drop-shadow(0 18px 18px rgba(29, 51, 41, .22)) drop-shadow(0 3px 2px rgba(0, 0, 0, .18)); }
.recorder-big { max-width: 330px; }
.r-svg { width: 100%; height: auto; display: block; overflow: visible; }
.r-wedge { fill: var(--red); opacity: .78; transition: d .3s; }
.recorder-stopped .r-wedge { display: none; }
.r-hand { stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.tk { stroke: #3b3a33; stroke-width: 1; }
.tk-l { stroke-width: 2.4; }
.r-nums text { font: 700 13px var(--text); fill: #2b2a25; }
.r-count { font: 600 25px var(--digits); fill: #ffb547; letter-spacing: .04em; }
.r-stamp { font: 600 12px var(--digits); fill: var(--violet); letter-spacing: .06em; }
.r-cap { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* ---------- racks of tournaments ---------- */
.block { padding: 28px 0 8px; }
.block h2 { margin-bottom: 16px; }
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding: 18px; background: linear-gradient(180deg, #a3aca6, var(--steel)); border-radius: var(--r); box-shadow: inset 0 2px 0 #c4cbc6, inset 0 -3px 0 var(--steel-2), 0 6px 14px rgba(0, 0, 0, .12); }
.slot { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 16px 16px 22px; background: linear-gradient(180deg, var(--manila), var(--manila-2)); border-radius: 4px; color: var(--ink); text-decoration: none; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); background-image: linear-gradient(180deg, transparent 0 52px, rgba(228, 154, 131, .55) 52px 53px, transparent 53px), linear-gradient(180deg, var(--manila), var(--manila-2)); transition: transform .15s; }
.slot::after { content: ''; position: absolute; left: -6px; right: -6px; bottom: -8px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, #c3c9c4, #7c857f); box-shadow: 0 2px 3px rgba(0, 0, 0, .25); }
.slot:hover { transform: translateY(-4px); color: var(--ink); }
.slot-name { grid-column: 1 / -1; font: 850 28px/1 var(--display); }
.slot-when { grid-column: 1 / -1; font: 600 17px var(--digits); color: var(--violet); letter-spacing: .04em; margin-top: 4px; }
.slot-state { grid-column: 1 / -1; font-size: 15px; }
.slot-state b, .thead-state b { font: 700 19px var(--digits); letter-spacing: .03em; }
.slot-kv { display: flex; flex-direction: column; }
.slot-kv i { font-style: normal; font-size: 12px; color: var(--muted); }
.slot-kv b { font-size: 16px; }
.slot-live { background-image: linear-gradient(180deg, transparent 0 52px, rgba(228, 154, 131, .55) 52px 53px, transparent 53px), linear-gradient(180deg, #fff3d0, #efd99f); }
.slot-live .slot-state { color: var(--up); font-weight: 600; }
.next-line { margin-top: 18px; }

.how-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.how-item { border-top: 3px solid var(--cab); padding-top: 12px; }
.how-item h3 { font-size: 24px; }
.how-item p { font-size: 15px; color: #3a3e35; }

.results { display: flex; flex-direction: column; gap: 2px; }
.result { display: grid; grid-template-columns: 60px 150px 170px 1fr; gap: 12px; align-items: baseline; padding: 10px 12px; background: #eef1e6; color: var(--ink); text-decoration: none; border-radius: 4px; }
.result:hover { background: #f8f9f3; color: var(--ink); }
.result-win { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.fine { font-size: 13px; color: var(--muted); max-width: 90ch; margin-top: 40px; }

/* ---------- a tournament ---------- */
.thead { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: start; padding: 36px 0 24px; }
.crumb { font-size: 14px; color: var(--muted); }
.thead-state { font-size: 18px; }
.facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 16px; margin: 18px 0 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.tbody { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.board-head h2 { margin: 0; }
.board-head .muted { font-size: 14px; }
.board { list-style: none; margin: 0; padding: 16px 16px 6px; background: linear-gradient(180deg, #a3aca6, var(--steel)); border-radius: var(--r); box-shadow: inset 0 2px 0 #c4cbc6, inset 0 -3px 0 var(--steel-2); }
.board .empty { padding: 26px; text-align: center; background: rgba(255, 255, 255, .35); border-radius: 4px; margin-bottom: 10px; color: #2e332c; }
.tcard {
  position: relative; display: grid; grid-template-columns: 54px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 4px 14px; align-items: center;
  padding: 12px 16px 16px; margin-bottom: 16px; border-radius: 3px; color: var(--ink);
  background: linear-gradient(90deg, transparent 0 62px, rgba(228, 154, 131, .7) 62px 63px, transparent 63px), linear-gradient(180deg, var(--manila), var(--manila-2));
  box-shadow: 0 2px 0 rgba(0, 0, 0, .14);
}
.tcard::after { content: ''; position: absolute; left: -8px; right: -8px; bottom: -9px; height: 13px; border-radius: 3px; background: linear-gradient(180deg, #c3c9c4, #7c857f); box-shadow: 0 2px 3px rgba(0, 0, 0, .22); pointer-events: none; }
.tc-rank { font: 700 34px/1 var(--digits); color: var(--violet); text-align: center; }
.tc-id { display: flex; flex-direction: column; min-width: 0; }
.tc-no { font: 600 18px var(--digits); letter-spacing: .05em; color: var(--violet); }
.tc-id a { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-pnl b { font: 700 32px/1 var(--digits); letter-spacing: .02em; }
.tc-pnl small { font-size: 13px; color: var(--muted); }
.tc-pnl.up b { color: var(--up); }
.tc-pnl.down b { color: var(--down); }
.tc-pos { font-size: 13px; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.tc-pos .pos em { font-style: normal; }
.tc-prize { font: 700 22px var(--digits); color: var(--cab); background: rgba(255, 255, 255, .55); padding: 2px 8px; border-radius: 3px; }
.tc-note { grid-column: 2 / -1; font-size: 13px; color: var(--down); }
.tcard-refused, .tcard-paid { opacity: .78; }
.tcard-disqualified .tc-pnl b { text-decoration: line-through; }
.tcard-top .tc-rank { color: var(--red); }
.tcard-p1 { background: linear-gradient(90deg, transparent 0 62px, rgba(210, 58, 46, .7) 62px 64px, transparent 64px), linear-gradient(180deg, #fff2cd, #f0d696); }
.tcard-me { outline: 2.5px solid var(--cab); outline-offset: 2px; }
.stamped .tc-pnl b { animation: stamp .55s ease-out; }
@keyframes stamp { 0% { transform: scale(1.18); opacity: .4; filter: blur(.6px); } 45% { transform: scale(.97); opacity: 1; } 100% { transform: scale(1); } }

.tside { display: flex; flex-direction: column; gap: 18px; }
.panel { background: #f4f6ee; border-radius: var(--r); padding: 18px 20px; box-shadow: inset 0 0 0 1.5px var(--line); }
.panel h3 { font-size: 26px; }
.panel .addr { font-size: 13px; overflow-wrap: anywhere; }
.join { background: linear-gradient(180deg, var(--manila), var(--manila-2)); box-shadow: 0 3px 0 #c9b57f; }
.mine { box-shadow: inset 0 0 0 2.5px var(--cab); }
.warnline { background: #fff2cd; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.ready { font-weight: 700; }
.orders { margin-top: 14px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.order-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.order-row .inp { flex: 1; min-width: 0; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; font: 600 15px var(--digits); letter-spacing: .04em; padding: 6px 0; border: 0; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.seg button:hover { background: var(--manila); }
.inp { font: inherit; font-size: 15px; padding: 11px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); width: 100%; }
.inp:focus { outline: 2px solid var(--cab); outline-offset: 1px; }
select.inp { width: auto; flex: 0 0 110px; }
.feed-list, .pay-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.feed-list li { display: grid; grid-template-columns: 64px 64px 1fr auto; gap: 8px; padding: 5px 0; border-bottom: 1px solid #dfe3d4; }
.feed-t { color: var(--violet); }
.pay-list li { display: grid; grid-template-columns: 54px 1fr auto auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid #dfe3d4; align-items: baseline; }

/* ---------- dialog ---------- */
.dlg { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: #f6f7f1; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.dlg::backdrop { background: rgba(20, 30, 25, .55); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.dlg-head h2 { margin: 0; font-size: 34px; }
.dlg-x { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--ink); padding: 6px; }
.dlg-x .ico { margin: 0; }
.dlg-body { padding: 8px 20px 22px; }
.dlg-body .btn { margin-top: 10px; }
.wallets { display: flex; flex-direction: column; gap: 8px; }
.wallet-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: 600 16px var(--text); cursor: pointer; }
.wallet-pick:hover { box-shadow: inset 0 0 0 2px var(--cab); }
.choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.choice { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 10px; border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; cursor: pointer; color: var(--ink); }
.choice span { font-size: 14px; color: var(--muted); }
.choice.on { box-shadow: inset 0 0 0 2.5px var(--cab); background: #fbfcf7; }
.inp-wrap { margin-top: 8px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; margin: 0 0 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- documents ---------- */
.doc { max-width: 820px; padding-top: 40px; }
.doc.wide { max-width: 1100px; }
.doc h2 { margin-top: 1.2em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .5em; overflow-wrap: anywhere; }
.doc p { overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; margin: 10px 0 20px; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px 10px; white-space: nowrap; }
.tbl td { border-bottom: 1px solid #d6dbcb; padding: 8px 10px; white-space: nowrap; }
.verify-out { margin: 20px 0; }

.foot { background: var(--cab-2); color: #c9d4ca; padding: 22px 0; font-size: 14px; }
.foot-in { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.foot a { color: #c9d4ca; }
.foot-brand { font: 900 24px var(--display); color: #f3e6c4; margin-right: auto; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #f6eed6; padding: 12px 18px; border-radius: 10px; font-size: 15px; z-index: 50; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }

@media (max-width: 1020px) {
  .tbody { grid-template-columns: minmax(0, 1fr); }
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .top-in { flex-wrap: wrap; gap: 8px 16px; padding: 8px 16px; }
  .brand { font-size: 32px; }
  .brand-mark { width: 34px; height: 34px; }
  .nav { order: 3; flex-basis: 100%; gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .nav a { font-size: 14px; white-space: nowrap; }
  .top-r { margin-left: auto; }
  .wrap { padding: 0 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 30px 0 16px; }
  .hero .recorder { max-width: 230px; }
  .thead { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .thead .recorder { max-width: 170px; margin: 0; }
  .facts { grid-template-columns: 100px minmax(0, 1fr); font-size: 14px; }
  .tcard { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 10px 12px 15px; background: linear-gradient(90deg, transparent 0 46px, rgba(228, 154, 131, .7) 46px 47px, transparent 47px), linear-gradient(180deg, var(--manila), var(--manila-2)); }
  .tcard-p1 { background: linear-gradient(90deg, transparent 0 46px, rgba(210, 58, 46, .7) 46px 48px, transparent 48px), linear-gradient(180deg, #fff2cd, #f0d696); }
  .tc-rank { font-size: 28px; grid-row: span 2; }
  .tc-pnl { grid-column: 3; grid-row: 1; text-align: right; }
  .tc-pnl b { font-size: 26px; }
  .tc-pnl small { display: block; }
  .tc-pos { grid-column: 2 / -1; }
  .tc-prize { grid-column: 2 / -1; justify-self: start; }
  .result { grid-template-columns: 44px minmax(0, 1fr); }
  .result > :nth-child(3), .result > :nth-child(4) { grid-column: 2; }
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .board { padding: 12px 12px 4px; }
  .rack { padding: 12px; grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .stamped .tc-pnl b { animation: none; } .slot { transition: none; } }
