/* Tournament page, on top of arena.css (Japandi). */
.hint.pad { margin: 0; padding: 14px 24px 0; }
.lane .sw.num { display: grid; place-items: center; font: 500 12px var(--mono); color: var(--text-2); background: var(--surface-2); width: 20px; height: 20px; min-height: 0; border-radius: 6px; align-self: start; font-style: normal; box-shadow: none; }
.lane { grid-template-columns: 20px 1fr 1fr auto; }
.seed-preview { margin: 10px 0 0; padding: 0 0 0 24px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.seed-preview li span { color: var(--ink); margin-right: 8px; font-weight: 500; }

/* banner */
.t-banner { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.t-banner.finished { background: linear-gradient(100deg, rgba(203,168,114,.12), var(--surface) 55%); border-color: rgba(203,168,114,.35); }
.t-banner div { display: flex; flex-direction: column; line-height: 1.25; }
.t-banner small { font-size: 12.5px; }
.t-banner b { font: 600 24px var(--sans); letter-spacing: -.02em; }
.t-banner span:not(.trophy):not(.pulse) { color: var(--muted); font-size: 13px; }
.trophy { font-size: 28px; }
.trophy.dim { opacity: .55; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--indigo); animation: pulse 1.6s ease-in-out infinite; margin: 0 6px; }

/* bracket */
.t-section { margin-top: 32px; }
.t-section > h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font: 600 16px var(--sans); letter-spacing: -.01em; color: var(--ink); text-transform: none; }
.t-section > h3 small { font-size: 13px; }
.bracket { display: flex; gap: 28px; overflow-x: auto; padding: 2px 4px 10px 2px; align-items: stretch; }
.round { display: flex; flex-direction: column; min-width: 250px; flex: none; }
.round h4 { margin: 0 0 10px; font: 500 12.5px var(--sans); color: var(--muted); }
.round .col { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; flex: 1; }
.match { display: block; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 11px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
a.match:hover { color: var(--ink); border-color: #4e4b46; box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.07); }
.match.st-running { border-color: rgba(142,163,196,.5); box-shadow: 0 0 0 3px rgba(142,163,196,.08); }
.match.st-ready { border-style: dashed; box-shadow: none; }
.match.st-waiting, .match.st-bye, .match.st-skipped { opacity: .55; box-shadow: none; background: transparent; }
.m-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.m-head b { font: 500 12px var(--mono); color: var(--muted); }
.m-st { font-size: 12px; color: var(--muted); }
.st-running .m-st { color: var(--indigo); }
.st-running .m-st::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--indigo); margin-right: 6px; animation: pulse 1.6s ease-in-out infinite; }
.st-done .m-st { color: var(--sage); }
.side { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.side .seed { font: 12px var(--mono); color: var(--muted); min-width: 14px; text-align: right; }
.side .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .nm.tbd { color: var(--muted); }
.side .res { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.side.won .nm { font-weight: 600; }
.side.won .res { color: var(--ink); }
.side.lost { color: var(--muted); }
.m-why { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }

/* tables */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 13.5px; box-shadow: var(--shadow); }
.tbl th { text-align: left; font: 500 12px var(--sans); color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:nth-child(n+2) { font-variant-numeric: tabular-nums; }
.tbl tr.gold td { font-weight: 600; background: rgba(203,168,114,.07); }
#b-table .tbl { box-shadow: none; }
@media (max-width: 900px) { .tabs { order: 2; } }

/* ---------- betting ---------- */
button.wallet { color: #d9b985; border-color: rgba(203,168,114,.45); background: rgba(203,168,114,.08); }
button.wallet:hover:not(:disabled) { background: rgba(203,168,114,.15); border-color: var(--oak); }
button.wallet b { font-family: var(--mono); font-weight: 500; }
button.odds { padding: 2px 8px; font: 500 12px var(--mono); border-radius: 6px; margin-left: 6px; color: #d9b985; border-color: rgba(203,168,114,.45); background: rgba(203,168,114,.08); }
button.odds:hover:not(:disabled) { background: rgba(203,168,114,.16); border-color: var(--oak); }
.link-btn { padding: 0; background: none; border: 0; color: var(--indigo); font-size: 12px; }
.link-btn:hover:not(:disabled) { background: none; color: var(--indigo-2); }
.m-open { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; font-size: 12px; color: #d9b985; }
.m-bets { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.m-bets .mine { color: var(--ink); font-weight: 500; }
.m-bets .won { color: var(--sage); }
.m-bets .lost { text-decoration: line-through; opacity: .7; }
.up { color: var(--sage); } .down { color: var(--clay); }

.outright { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px 12px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.o-row { display: grid; grid-template-columns: 22px minmax(120px, 260px) 1fr 54px auto; align-items: center; gap: 12px; padding: 5px 0; font-size: 13.5px; }
.o-row .seed { font: 12px var(--mono); color: var(--muted); text-align: right; }
.o-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-row .bar { height: 5px; }
.o-row .bar i { display: block; height: 100%; background: var(--oak); border-radius: 99px; }
.o-row .pct { font: 12px var(--mono); color: var(--text-2); text-align: right; }

.slip { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(400px, calc(100vw - 32px)); background: var(--surface); border-radius: 16px; padding: 22px 24px 20px; box-shadow: 0 0 0 1px var(--line), 0 24px 64px rgba(0,0,0,.2); }
.slip h3 { margin: 0; font: 600 19px var(--sans); letter-spacing: -.015em; }
.slip .hint { margin: 4px 0 0; }
.slip input { font-family: var(--mono); }
.chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chips button { padding: 5px 11px; font-size: 12.5px; border-radius: 99px; }
.slip-pay { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; align-items: baseline; }
.slip-pay b { color: var(--ink); font: 500 22px var(--mono); }
.slip-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

#w-body h4 { margin: 14px 0 2px; font: 600 13px var(--sans); color: var(--ink); }
.w-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); }
.w-card div { display: flex; flex-direction: column; padding: 12px 14px; border-left: 1px solid var(--line-2); }
.w-card div:first-child { border-left: 0; }
.w-card small { font-size: 12px; }
.w-card b { font: 500 20px var(--mono); }
.bet { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.bet.won { border-color: rgba(150,174,139,.45); }
.bet.lost, .bet.void { opacity: .6; }
.bet-r { text-align: right; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
#wallet .drawer-search input { min-width: 0; }

/* data-feature / data-mode parts this server does not have (js/live.js) */
[hidden] { display: none !important; }
