/* Tokens measured from Business Tour screenshots (ref/). */
:root {
  --sky-1: #8dbde6; --sky-2: #dcebf0;
  --ink: #3b3a40; --ink-2: #6b6a72;
  --cream: #f3ece0; --cream-2: #e6dccb; --line: #cfc4b0;
  --yellow: #f0b400; --yellow-d: #d18f00;
  --blue: #1e8fdc; --blue-d: #1670b8; --blue-l: #8aabcf;
  --green: #86a61c; --green-d: #6c8713;
  --pink: #e8185f; --pink-d: #b9104a;
  --seat-0: #86a61c; --seat-1: #e8185f; --seat-2: #e3b01c; --seat-3: #1e8fdc;
  --r: 10px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Russo One', 'Arial Black', sans-serif;
  --body: Verdana, 'DejaVu Sans', Geneva, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font: 14px/1.45 var(--body); color: var(--ink);
  background: linear-gradient(var(--sky-1), var(--sky-2)) fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { /* the faint tumbling squares behind every screen */
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .32; background-size: 780px 630px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='420' fill='none' stroke='%23fff' stroke-width='2' stroke-opacity='.55'%3E%3Crect x='40' y='300' width='62' height='62' rx='10' transform='rotate(-14 71 331)'/%3E%3Crect x='330' y='60' width='48' height='48' rx='8' transform='rotate(22 354 84)'/%3E%3Crect x='430' y='250' width='74' height='74' rx='12' transform='rotate(-28 467 287)'/%3E%3Crect x='190' y='170' width='40' height='40' rx='7' transform='rotate(35 210 190)'/%3E%3C/svg%3E");
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.ava { overflow: hidden; position: relative; }
.ava .face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.ava:has(.face) { box-shadow: none; }

/* ---------- shared pieces ---------- */
.ribbon {
  position: relative; display: inline-block; padding: 14px 72px 16px;
  font: 400 34px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; color: #fff;
  background: var(--yellow); text-shadow: 0 2px 0 rgba(0, 0, 0, .12); white-space: nowrap;
}
.ribbon::before, .ribbon::after {
  content: ''; position: absolute; top: 9px; bottom: -9px; width: 34px; background: var(--yellow-d); z-index: -1;
}
.ribbon::before { left: -18px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 50%); }
.ribbon::after { right: -18px; clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s6); border-radius: 12px;
  font: 400 20px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: #fff;
  background: var(--blue); box-shadow: 0 5px 0 var(--blue-d), 0 0 0 3px #fff;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), filter 120ms var(--ease);
}
.btn:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 6px 0 var(--blue-d), 0 0 0 3px #fff; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--blue-d), 0 0 0 3px #fff; }
.btn:disabled { background: #a3a3ad; box-shadow: 0 5px 0 #84848e, 0 0 0 3px #fff; color: rgba(255, 255, 255, .8); }
.btn.green { background: var(--green); box-shadow: 0 5px 0 var(--green-d), 0 0 0 3px #fff; }
.btn.green:hover:not(:disabled) { box-shadow: 0 6px 0 var(--green-d), 0 0 0 3px #fff; }
.btn.green:active:not(:disabled) { box-shadow: 0 1px 0 var(--green-d), 0 0 0 3px #fff; }
.btn.ghost { background: var(--cream); color: var(--ink); box-shadow: 0 5px 0 var(--line), 0 0 0 3px #fff; }
.btn.ghost:hover:not(:disabled) { box-shadow: 0 6px 0 var(--line), 0 0 0 3px #fff; }
.btn.ghost:active:not(:disabled) { box-shadow: 0 1px 0 var(--line), 0 0 0 3px #fff; }
.btn.sm { min-height: 38px; padding: 0 var(--s4); font-size: 15px; border-radius: 10px; }

.round {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); box-shadow: inset 0 -4px 0 var(--blue-d), 0 0 0 4px #fff, 0 4px 8px rgba(40, 60, 90, .25);
  transition: transform 120ms var(--ease), filter 120ms var(--ease);
}
.round:hover { filter: brightness(1.08); transform: translateY(-1px); }
.round:active { transform: translateY(2px); }
.round.on { background: var(--yellow); box-shadow: inset 0 -4px 0 var(--yellow-d), 0 0 0 4px #fff, 0 4px 8px rgba(40, 60, 90, .25); }
.round svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- menu / rules shell ---------- */
.screen { position: relative; max-width: 1180px; margin: 0 auto; padding: var(--s5) var(--s5) var(--s7); min-height: 100%; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: var(--s4); margin-bottom: var(--s7); }
.top .tools { display: flex; gap: var(--s4); justify-content: flex-end; padding-top: 6px; }
.top .mid { display: grid; justify-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 400 26px/1 var(--display); letter-spacing: .06em; transition: transform 140ms var(--ease); }
.brand svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(60, 70, 90, .2)); }
.brand:hover { transform: translateY(-1px); }
.brand:active { transform: translateY(1px); }

.profile { display: inline-grid; grid-template-columns: 76px auto; filter: drop-shadow(0 3px 0 rgba(60, 70, 90, .18)); }
.profile .ava { grid-row: span 2; z-index: 1; }
.profile .tag { background: var(--green); color: #fff; font: 400 17px/1 var(--display); text-transform: uppercase; padding: 9px 28px 9px 14px; margin-left: -8px; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.profile label { background: var(--cream); padding: 8px 14px; margin-left: -8px; border-radius: 0 0 var(--r) 0; display: block; }
.profile input { font: 15px var(--body); color: var(--ink); background: none; border: 0; border-bottom: 2px dashed var(--line); width: 150px; padding: 2px 0; }
.profile input:hover { border-color: var(--ink-2); }
.profile input:focus { outline: 0; border-bottom: 2px solid var(--blue); }
.ava {
  width: 76px; height: 76px; border-radius: var(--r); border: 4px solid #fff; display: grid; place-items: center;
  font: 400 34px/1 var(--display); color: #fff; background: var(--c, var(--green)); text-transform: uppercase;
  box-shadow: inset 0 -22px 0 rgba(0, 0, 0, .14);
}

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; gap: var(--s7); }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 348px)); gap: var(--s6); }
.tile .band.pink { background: var(--pink); font-size: 21px; padding: 18px 0 19px; }
.tile .band.pink::before, .tile .band.pink::after { background: var(--pink-d); }
.tile .tabs a { text-decoration: none; }
.tile .tabs a:hover { background: #fff; }
.tile { transition: transform 200ms var(--ease); }
.tile:hover { transform: translateY(-3px); }
.tile:hover .art svg { transform: translateY(-4px) scale(1.03); }
.tile .art svg { transition: transform 260ms var(--ease); }
.tile { display: flex; flex-direction: column; align-items: center; }
.tile .art { height: 190px; display: grid; place-items: end center; }
.tile .art svg { height: 180px; overflow: visible; }
.tile .band {
  width: 100%; text-align: center; padding: 15px 0 16px; color: #fff; position: relative;
  font: 400 26px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}
.tile .band.blue { background: var(--blue); } .tile .band.green { background: var(--green); }
.tile .band::before, .tile .band::after { content: ''; position: absolute; top: 8px; bottom: -8px; width: 22px; z-index: -1; }
.tile .band.blue::before, .tile .band.blue::after { background: var(--blue-d); }
.tile .band.green::before, .tile .band.green::after { background: var(--green-d); }
.tile .band::before { left: -12px; } .tile .band::after { right: -12px; }
.tile .art { position: relative; width: 100%; }
.tile .sub { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--blue-l); color: #fff; font-size: 13px; padding: 5px 18px; }
.tile .tabs { display: flex; width: 84%; filter: drop-shadow(0 3px 0 var(--line)); }
.tile .tabs > * { flex: 1; min-height: 52px; background: var(--cream); font: 17px var(--body); color: var(--ink); text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 150ms var(--ease); }
.tile .tabs > :first-child { border-radius: 0 0 0 14px; } .tile .tabs > :last-child { border-radius: 0 0 14px 0; background: var(--cream-2); }
.tile .tabs button:hover:not(:disabled) { background: #fff; }
.tile .tabs button:disabled { color: #a9a294; }
.tile .tabs.tiers { width: 100%; }
.tile .tabs.tiers > * { flex-direction: column; gap: 1px; min-height: 60px; background: var(--cream); border-radius: 0; border-left: 2px solid var(--cream-2); }
.tile .tabs.tiers > :first-child { border-left: 0; border-radius: 0 0 0 14px; }
.tile .tabs.tiers > :last-child { border-radius: 0 0 14px 0; }
.tile .tabs.tiers b { font: 400 20px/1 var(--display); }
.tile .tabs.tiers small { font-size: 10px; text-transform: none; color: var(--ink-2); }
.tile .tabs.tiers button:disabled small { visibility: hidden; }
.tile .tabs label button { flex: none; background: none; font: inherit; text-transform: uppercase; padding: 0 4px; min-height: 0; }
.tile .tabs label button:hover { color: var(--blue-d); background: none; }
.tile .tabs input { width: 76px; text-align: center; font: 17px var(--body); border: 0; border-bottom: 2px dashed var(--line); background: none; color: var(--ink); }
.tile .tabs input:focus { outline: 0; border-bottom: 2px solid var(--blue); }
.tile .note { margin-top: var(--s3); font-size: 12px; color: #4c6480; text-align: center; max-width: 320px; }

.open { max-width: 888px; margin: var(--s7) auto 0; }
.head { background: var(--blue-l); color: var(--ink); font: 400 20px/1 var(--display); text-transform: uppercase; padding: 12px 18px; display: flex; justify-content: space-between; align-items: baseline; }
.head small { font: 13px var(--body); text-transform: none; color: #3d5673; }
.row { display: grid; grid-template-columns: 90px 110px 1fr auto; gap: var(--s4); align-items: center; background: var(--cream); border-bottom: 3px solid #a9cbe6; border-radius: var(--r); padding: 10px 14px 10px 18px; margin-top: var(--s2); }
.row b { font: 400 18px var(--display); }
.pips { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.pips i { width: 14px; height: 14px; border-radius: 4px; background: var(--cream-2); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.pips i.on { background: var(--c); box-shadow: none; }
.empty { background: rgba(243, 236, 224, .6); border-radius: var(--r); padding: var(--s5); text-align: center; color: var(--ink-2); margin-top: var(--s2); }

/* ---------- table room (before the match) ---------- */
.room { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 480px); gap: var(--s7); justify-content: center; align-items: start; }
.settings dl { background: rgba(243, 236, 224, .55); padding: 6px 18px; }
.settings dl div { display: flex; justify-content: space-between; gap: var(--s4); padding: 10px 0; border-bottom: 1px solid rgba(60, 80, 110, .14); font-size: 15px; }
.settings dl div:last-child { border: 0; }
.settings dd { font-weight: bold; text-align: right; }
.settings .head + dl { margin-bottom: var(--s3); }
.seat { display: grid; grid-template-columns: 76px 1fr auto; gap: var(--s4); align-items: center; background: var(--cream); border-radius: var(--r); border-bottom: 3px solid #a9cbe6; padding: 12px 14px; margin-bottom: var(--s3); min-height: 104px; }
.seat h3 { font: 400 24px/1.1 var(--display); text-transform: uppercase; }
.seat p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.seat .x { width: 76px; height: 76px; border-radius: var(--r); border: 4px solid #fff; background: var(--cream-2); display: grid; place-items: center; color: #d3c8b4; font: 400 34px var(--display); }
.seat.free { color: #b1a892; }
.room-foot { display: flex; justify-content: space-between; align-items: center; max-width: 1048px; margin: var(--s6) auto 0; gap: var(--s4); }
.room-foot .acts { display: flex; gap: var(--s4); flex-wrap: wrap; justify-content: flex-end; }

/* ---------- rules ---------- */
.doc { max-width: 888px; margin: 0 auto; display: grid; gap: var(--s5); }
.doc section { background: var(--cream); border-radius: var(--r); border-bottom: 3px solid #a9cbe6; overflow: hidden; }
.doc h2 { background: var(--blue-l); font: 400 20px/1 var(--display); text-transform: uppercase; padding: 12px 18px; }
.doc .in { padding: var(--s4) 18px var(--s5); display: grid; gap: var(--s3); font-size: 15px; }
.doc dt { font-weight: bold; } .doc dd { color: #55545c; margin: 2px 0 10px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc th { text-align: right; font-weight: normal; color: var(--ink-2); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.doc td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--cream-2); font-variant-numeric: tabular-nums; }
.doc th:first-child, .doc td:first-child { text-align: left; }
.doc td:first-child { font-weight: bold; }
.doc td i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.scroll { overflow-x: auto; }

/* ---------- tournament + journal ---------- */
.doc.wide { max-width: 1048px; }
.card { background: var(--cream); border-radius: var(--r); border-bottom: 3px solid #a9cbe6; overflow: hidden; }
.card .in { padding: var(--s4) 18px var(--s5); font-size: 15px; }
.card .empty { background: none; margin: 0; }
.tgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s5); align-items: start; }
.pot { display: flex; align-items: baseline; gap: 12px; padding: 22px 18px 4px; }
.pot b { font: 400 72px/1 var(--display); letter-spacing: -.01em; color: var(--ink); }
.pot span { font: 400 24px/1 var(--display); color: var(--ink-2); }
.note2 { padding: 4px 18px 12px; font-size: 12px; color: var(--ink-2); }
.count { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; margin: 14px 18px; padding: 12px 14px; background: #fff; border-radius: var(--r); }
.count[hidden] { display: none; }
.count span { font-size: 13px; color: var(--ink-2); }
.count b { font: 400 26px/1 var(--display); grid-row: span 2; }
.count .btn { grid-row: span 2; }
.count small { font-size: 12px; color: var(--ink-2); }
.split, .tbl { width: 100%; border-collapse: collapse; }
.split td { padding: 9px 18px; border-top: 1px solid var(--cream-2); font-size: 15px; text-align: right; }
.split td:first-child { text-align: left; font: 400 15px var(--display); }
.rank { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--cream-2); }
.rank:first-of-type { border-top: 0; }
.rank > b { font: 400 18px var(--display); color: var(--ink-2); }
.rank span { font: 400 17px/1.15 var(--display); text-transform: uppercase; }
.rank span small { display: block; font: 12px var(--body); text-transform: none; color: var(--ink-2); margin-top: 2px; }
.rank i { font: normal 400 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--green); padding: 4px 8px; border-radius: 5px; }
.rank em { font: normal 400 22px var(--display); min-width: 40px; text-align: right; }
.rank.in > b { color: var(--ink); }
.stack { margin: 0; padding-left: 26px; display: grid; gap: 10px; color: #55545c; }
.stack li::marker { font: 400 15px var(--display); color: var(--ink); }
.stack b { color: var(--ink); }
.tbl { font-size: 13px; }
.doc .tbl th, .doc .tbl td { text-align: left; }
.doc .tbl td:first-child { font-weight: normal; white-space: nowrap; }
.doc .split td:first-child { font-weight: normal; }
.tbl th { text-align: left; font-weight: normal; color: var(--ink-2); padding: 9px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--cream-2); vertical-align: top; }
.tbl td small { display: block; color: var(--ink-2); font-size: 11px; margin-top: 2px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 18px; }
.totals { display: flex; flex-wrap: wrap; gap: 0; }
.totals div { flex: 1 1 150px; padding: 14px 18px; border-right: 1px solid var(--cream-2); }
.totals dt { font-size: 12px; color: var(--ink-2); } .totals dd { font: 400 22px/1.2 var(--display); margin-top: 2px; }
.doc a, .card a { color: var(--blue-d); text-underline-offset: 2px; } .doc a:hover, .card a:hover { color: var(--pink-d); }
.dim { color: var(--ink-2); }
.places { list-style: none; padding: 0; margin: var(--s2) 0 0; display: grid; gap: 6px; min-width: 300px; text-align: left; }
.places li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 8px; padding: 8px 12px; }
.places b { font: 400 16px var(--display); } .places em { font-style: normal; font-weight: bold; }
a.btn { text-decoration: none; }

/* podium + journal icons */
.podium .stand { padding: 18px 18px 0; display: grid; place-items: center; } .podium .stand svg { width: min(100%, 460px); overflow: visible; }
.podium .names { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 372px; margin: 0 auto; padding: 8px 0 18px; text-align: center; }
.podium .names b { display: block; font: 400 15px var(--display); text-transform: uppercase; } .podium .names span { font-size: 12px; color: var(--ink-2); }
.totals.icons div { padding-left: 62px; background: no-repeat 18px 50% / 32px; }
.totals.icons div:nth-child(1) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23e8185f'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='9.5' cy='9.5' r='3'/%3E%3Ccircle cx='22.5' cy='9.5' r='3'/%3E%3Ccircle cx='16' cy='16' r='3'/%3E%3Ccircle cx='9.5' cy='22.5' r='3'/%3E%3Ccircle cx='22.5' cy='22.5' r='3'/%3E%3C/g%3E%3C/svg%3E"); }
.totals.icons div:nth-child(2) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2c2 6 9 9 9 17a9 9 0 0 1-18 0c0-4 2-6 4-8 0 3 1 4 2 4 1-4 1-9 3-13z' fill='%23f5912c'/%3E%3Cpath d='M16 14c1 3 5 5 5 9a5 5 0 0 1-10 0c0-2 1-3 2-4 1 2 2 0 3-5z' fill='%23ffd76a'/%3E%3C/svg%3E"); }
.totals.icons div:nth-child(3) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M9 4h14v9a7 7 0 0 1-14 0zM13 21h6v5h-6zM9 26h14v3H9z' fill='%23f4c020' stroke='%23b98a00' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M9 6H4a5 5 0 0 0 5 7M23 6h5a5 5 0 0 1-5 7' fill='none' stroke='%23b98a00' stroke-width='2'/%3E%3C/svg%3E"); }

/* ---------- match ---------- */
.match { position: fixed; inset: 0; overflow: hidden; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; left: -260px; width: 240px; opacity: .75; animation: drift linear infinite; }
.cloud.c1 { top: 9%; animation-duration: 150s; animation-delay: -20s; }
.cloud.c2 { top: 26%; width: 150px; opacity: .55; animation-duration: 210s; animation-delay: -120s; }
.cloud.c3 { top: 70%; width: 190px; opacity: .6; animation-duration: 180s; animation-delay: -70s; }
.cloud.c4 { top: 84%; width: 130px; opacity: .5; animation-duration: 240s; animation-delay: -200s; }
@keyframes drift { to { transform: translateX(calc(100vw + 520px)); } }
.board .wheel { transform-box: fill-box; transform-origin: center; animation: idle-spin 36s linear infinite; }
@keyframes idle-spin { to { transform: rotate(360deg); } }
.board .fest polygon { transform-box: fill-box; transform-origin: 0 50%; animation: wave 1500ms ease-in-out infinite alternate; }
@keyframes wave { from { transform: skewY(-3deg); } to { transform: skewY(4deg); } }
.board .pawn .body { animation: breathe 2200ms ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.02, 1.035); } }
.board .waves path { animation: lap 2600ms ease-in-out infinite alternate; }
.board .waves path:nth-child(2) { animation-delay: -900ms; } .board .waves path:nth-child(3) { animation-delay: -1700ms; }
@keyframes lap { from { opacity: .25; transform: translateX(-3px); } to { opacity: .9; transform: translateX(4px); } }
.log { position: fixed; left: 14px; top: 134px; width: 232px; margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; z-index: 2; pointer-events: none; }
.log li { font-size: 12px; line-height: 1.3; padding: 6px 10px; border-radius: 8px; background: rgba(243, 236, 224, .62); color: #4c4b53; }
.log li:nth-last-child(n+5) { opacity: .55; } .log li:nth-last-child(n+7) { opacity: .3; }
.log li.new { background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(60, 70, 90, .14); animation: logn 260ms var(--ease); }
@keyframes logn { from { transform: translateX(-14px); opacity: 0; } }
.emotes { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; z-index: 4; }
.emotes[hidden], .watching[hidden] { display: none; }
.emotes button { font: 400 13px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; background: #fff; color: var(--ink); padding: 9px 13px; border-radius: 999px; box-shadow: 0 3px 0 rgba(60, 70, 90, .18); transition: transform 120ms var(--ease), background 120ms var(--ease); }
.emotes button:hover { transform: translateY(-2px); background: var(--cream); } .emotes button:active { transform: translateY(2px); }
.bubble { position: fixed; z-index: 7; transform: translate(-50%, -100%); margin-top: -12px; background: #fff; color: var(--ink); font: 400 15px/1 var(--display); text-transform: uppercase; padding: 9px 13px; border-radius: 12px; box-shadow: 0 0 0 3px var(--c), 0 6px 0 rgba(60, 70, 90, .16); white-space: nowrap; pointer-events: none; animation: bubble 2200ms var(--ease) both; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); box-shadow: 3px 3px 0 var(--c); }
@keyframes bubble { 0% { transform: translate(-50%, -70%) scale(.4); opacity: 0; } 10%, 84% { transform: translate(-50%, -100%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -130%) scale(.9); opacity: 0; } }
.watching { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 4; font: 400 13px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 8px 14px; border-radius: 999px; }
.stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(100vw, calc(100vh * 1.5)); aspect-ratio: 1080 / 720; }
.stage svg.board { width: 100%; height: 100%; display: block; overflow: visible; }
.board text { font-family: var(--display); pointer-events: none; }
.board .nm { font-size: 9.5px; fill: #47454d; letter-spacing: .02em; text-anchor: middle; }
.board .rent { font: bold 15px var(--body); fill: #4a4a52; text-anchor: middle; letter-spacing: -.02em; }
.board .corner { font-size: 12px; fill: #fff; stroke: #3b3a40; stroke-width: 3.5px; paint-order: stroke; stroke-linejoin: round; text-anchor: middle; letter-spacing: .04em; }
.board .hit { fill: transparent; cursor: pointer; }
.board .hit:hover { fill: rgba(255, 255, 255, .16); }
.board .hit.pick { fill: rgba(255, 255, 255, .34); stroke: #fff; stroke-width: 3; stroke-linejoin: round; animation: pick 900ms var(--ease) infinite alternate; }
.board .hit.pick:hover { fill: rgba(255, 255, 255, .6); }
@keyframes pick { to { fill: rgba(255, 255, 255, .12); } }
.board #marks .land { fill: rgba(226, 34, 48, .18); stroke: #e2222f; stroke-width: 5.5; stroke-linejoin: round; animation: landpulse 650ms ease-in-out infinite alternate; }
.board #marks .step { fill: rgba(226, 34, 48, .3); stroke: #e2222f; stroke-width: 2.5; stroke-linejoin: round; }
@keyframes landpulse { to { stroke-opacity: .75; fill-opacity: .5; } }
.board .clock { font-size: 25px; fill: #fff; text-anchor: middle; letter-spacing: .06em; }
.board .marker { animation: bob 700ms ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-6px); } }

.center { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: var(--s4); width: min(94vw, 620px); pointer-events: none; }
.center > * { pointer-events: auto; }
.dice { --d: 58px; display: flex; gap: 34px; height: calc(var(--d) + 14px); align-items: flex-start; position: relative; }
.dwrap { position: relative; width: var(--d); height: var(--d); perspective: 620px; }
.dwrap .shadow { position: absolute; left: -12%; right: -12%; bottom: -16%; height: 26%; border-radius: 50%; background: rgba(50, 70, 20, .32); }
.die { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-26deg) rotateY(-30deg); }
.cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.cube .f { position: absolute; inset: 0; border-radius: 18%; background: #dc2230; box-shadow: inset 0 0 0 2px #b3151f, inset 0 0 14px rgba(120, 0, 10, .35); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 15%; backface-visibility: hidden; }
.cube .f i { width: 68%; aspect-ratio: 1; border-radius: 50%; background: #fff; place-self: center; visibility: hidden; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.cube .f i.on { visibility: visible; }
.cube .f1 { transform: translateZ(calc(var(--d) / 2 - 1px)); }
.cube .f6 { transform: rotateY(180deg) translateZ(calc(var(--d) / 2 - 1px)); }
.cube .f2 { transform: rotateY(90deg) translateZ(calc(var(--d) / 2 - 1px)); }
.cube .f5 { transform: rotateY(-90deg) translateZ(calc(var(--d) / 2 - 1px)); }
.cube .f3 { transform: rotateX(90deg) translateZ(calc(var(--d) / 2 - 1px)); }
.cube .f4 { transform: rotateX(-90deg) translateZ(calc(var(--d) / 2 - 1px)); }
.sum { position: absolute; left: 50%; top: -58px; min-width: 46px; height: 46px; padding: 0 10px; margin-left: -23px; border-radius: 23px; background: #fff; box-shadow: 0 0 0 3px var(--ink), 0 4px 0 rgba(50, 70, 20, .25); font: 400 24px/46px var(--display); text-align: center; animation: sum 320ms cubic-bezier(.2, 1.5, .4, 1) both; }
.sum small { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); font: 400 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--pink); padding: 5px 10px; border-radius: 6px; white-space: nowrap; }
@keyframes sum { from { transform: scale(.2); opacity: 0; } }
.say { background: #fff; border-radius: 999px; padding: 10px 22px; font-size: 14px; box-shadow: 0 3px 0 rgba(60, 80, 30, .18); max-width: 100%; text-align: center; }
.acts { display: flex; gap: var(--s4); flex-wrap: wrap; justify-content: center; }
.btn.roll { min-width: 212px; min-height: 54px; font-size: 22px; animation: nudge 900ms ease-in-out infinite alternate; }
.btn.roll:hover, .btn.roll:active { animation: none; }
@keyframes nudge { to { transform: scale(1.045); } }

.sheet { background: var(--cream); border-radius: 14px; box-shadow: 0 0 0 3px #fff, 0 8px 0 rgba(60, 80, 30, .2); width: 100%; overflow: hidden; animation: pop 200ms var(--ease); }
@keyframes pop { from { transform: translateY(10px) scale(.97); opacity: 0; } }
.sheet h4 { background: var(--blue-l); font: 400 18px/1 var(--display); text-transform: uppercase; padding: 11px 16px; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.sheet h4 small { font: 12px var(--body); text-transform: none; color: #3d5673; }
.sheet .body { padding: var(--s3); display: grid; gap: var(--s3); }
.opts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s2); }
.opt { background: #fff; border-radius: var(--r); border: 2px solid var(--cream-2); padding: 8px 4px 0; display: grid; justify-items: center; gap: 2px; overflow: hidden; transition: transform 140ms var(--ease), border-color 140ms var(--ease); }
.opt svg { height: 74px; overflow: visible; }
.opt b { font: 400 12px var(--display); text-transform: uppercase; white-space: nowrap; }
.opt span { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.opt em { font: normal 400 14px var(--display); color: #fff; background: var(--blue); width: calc(100% + 8px); padding: 6px 0; margin-top: 4px; }
.opt:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--blue); }
.opt:active:not(:disabled) { transform: none; }
.opt:disabled { opacity: .55; } .opt:disabled em { background: #a3a3ad; }
.sheet .foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: 13px; color: var(--ink-2); }

.cardfx { position: absolute; left: 50%; top: 47%; width: 236px; height: 276px; margin: -138px 0 0 -118px; perspective: 900px; pointer-events: none; z-index: 5; animation: cardin 2700ms var(--ease) both; }
.cardfx > div { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--yellow), 0 18px 30px rgba(40, 50, 20, .38); animation: flip 2700ms var(--ease) both; overflow: hidden; }
.cardfx .front { background: var(--cream); display: grid; grid-template-rows: auto auto auto 1fr; text-align: center; }
.cardfx .front i { font: normal 400 13px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: #fff; background: var(--pink); padding: 9px 0 8px; }
.cardfx .art { height: 132px; border-bottom: 4px solid #fff; }
.cardfx .art svg, .evfx .art svg { width: 100%; height: 100%; display: block; }
.cardfx .front b { font: 400 21px/1.1 var(--display); text-transform: uppercase; padding: 16px 14px 6px; color: var(--ink); }
.cardfx .front p { font-size: 14px; line-height: 1.4; color: #55545c; padding: 0 18px 16px; }
.cardfx .back { background: repeating-conic-gradient(from 22.5deg, #e8185f 0 45deg, #f4c020 0 90deg, #1e8fdc 0 135deg, #86a61c 0 180deg); display: grid; place-items: center; animation-name: flipback; }
.cardfx .back span { width: 132px; height: 132px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 400 19px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--pink); box-shadow: 0 0 0 6px rgba(255, 255, 255, .45); }
@keyframes cardin { 0% { transform: translateY(70px) scale(.3); opacity: 0; } 11% { transform: none; opacity: 1; } 90% { transform: none; opacity: 1; } 100% { transform: translateY(-40px) scale(.85); opacity: 0; } }
@keyframes flip { 0%, 13% { transform: rotateY(180deg); } 30%, 100% { transform: rotateY(0); } }
@keyframes flipback { 0%, 13% { transform: rotateY(0); } 30%, 100% { transform: rotateY(-180deg); } }
.evfx { position: absolute; left: 50%; top: 40%; width: min(86vw, 400px); display: grid; grid-template-columns: 132px 1fr; align-items: center; background: var(--cream); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 4px #fff, 0 12px 22px rgba(40, 50, 20, .32); pointer-events: none; z-index: 5; animation: evfx 1900ms var(--ease) both; }
.evfx .art { height: 96px; border-right: 4px solid #fff; }
.evfx > div:last-child { padding: 12px 16px; }
.evfx b { display: block; font: 400 18px/1.1 var(--display); text-transform: uppercase; margin-bottom: 4px; }
.evfx p { font-size: 13px; line-height: 1.35; color: #55545c; }
@keyframes evfx { 0% { transform: translate(-50%, 24px) scale(.8); opacity: 0; } 12%, 84% { transform: translate(-50%, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -18px) scale(.97); opacity: 0; } }

.board #objs g.rise { animation: rise 560ms cubic-bezier(.2, 1.3, .4, 1) both; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes rise { 0% { transform: translateY(-54px) scale(.3); opacity: 0; } 55% { transform: translateY(0) scale(1.14, .86); opacity: 1; } 78% { transform: scale(.96, 1.05); } 100% { transform: none; } }
.board .pawn .body { transform-box: fill-box; transform-origin: 50% 100%; }
.board #fx * { transform-box: fill-box; transform-origin: center; }
.coin { position: fixed; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: #f8c823; box-shadow: inset 0 0 0 3px #e09a00, inset 0 -3px 0 3px rgba(0, 0, 0, .08), 0 2px 0 rgba(0, 0, 0, .2); z-index: 8; pointer-events: none; }
.confetti { position: fixed; left: 0; top: 0; width: 10px; height: 16px; border-radius: 2px; z-index: 11; pointer-events: none; }
.turnfx { position: absolute; left: 50%; top: 30%; z-index: 6; pointer-events: none; white-space: nowrap; animation: turnfx 1300ms var(--ease) both; }
@keyframes turnfx { 0% { transform: translate(-50%, 30px) scale(.6); opacity: 0; } 16%, 78% { transform: translate(-50%, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -24px) scale(.96); opacity: 0; } }
.delta { position: absolute; right: 14px; top: 6px; font: bold 15px var(--body); padding: 3px 8px; border-radius: 6px; background: #fff; box-shadow: 0 2px 0 rgba(60, 70, 90, .2); animation: delta 1700ms var(--ease) both; pointer-events: none; z-index: 2; white-space: nowrap; }
.delta.up { color: #2f8a1e; } .delta.down { color: #d3222f; }
.pl.tl .delta, .pl.tr .delta { top: auto; bottom: 4px; animation-name: deltadown; }
@keyframes delta { 0% { transform: translateY(8px) scale(.7); opacity: 0; } 14%, 76% { transform: translateY(-30px) scale(1); opacity: 1; } 100% { transform: translateY(-52px); opacity: 0; } }
@keyframes deltadown { 0% { transform: translateY(-8px) scale(.7); opacity: 0; } 14%, 76% { transform: translateY(30px) scale(1); opacity: 1; } 100% { transform: translateY(52px); opacity: 0; } }
.pl .cash { position: relative; }
.pl.turn .ava { box-shadow: 0 0 0 4px #f08a1c; }
.pl.turn.new { animation: turnin 420ms cubic-bezier(.2, 1.4, .4, 1); }
@keyframes turnin { 0% { transform: scale(1); } 45% { transform: scale(1.09); } 100% { transform: scale(1); } }

.pl { position: fixed; display: grid; grid-template-columns: auto auto; filter: drop-shadow(0 3px 0 rgba(60, 70, 90, .18)); z-index: 3; transition: opacity 200ms var(--ease); }
.pl.tl { left: 12px; top: 12px; } .pl.tr { right: 12px; top: 12px; } .pl.bl { left: 12px; bottom: 12px; } .pl.br { right: 12px; bottom: 12px; }
.pl .ava { width: 96px; height: 96px; font-size: 42px; grid-row: span 2; z-index: 1; position: relative; overflow: visible; }
.pl .ava .face { border-radius: 6px; }
.pl.tl .ava, .pl.bl .ava { grid-column: 1; grid-row: 1 / span 2; }
.pl.tr .ava, .pl.br .ava { grid-column: 2; grid-row: 1 / span 2; }
.pl.tl .nm, .pl.bl .nm, .pl.tl .cash, .pl.bl .cash { grid-column: 2; }
.pl .nm { background: var(--c); color: #fff; font: 400 18px/1 var(--display); text-transform: uppercase; padding: 10px 22px; min-width: 200px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pl .cash { background: var(--cream); padding: 9px 18px 7px; font-size: 21px; letter-spacing: .01em; min-width: 200px; }
.pl.tl .nm, .pl.bl .nm, .pl.tl .cash, .pl.bl .cash { margin-left: -8px; padding-left: 26px; }
.pl.tr .nm, .pl.br .nm, .pl.tr .cash, .pl.br .cash { margin-right: -8px; padding-right: 26px; text-align: right; justify-content: flex-end; grid-column: 1; }
.pl.bl .nm, .pl.br .nm { grid-row: 2; } .pl.bl .cash, .pl.br .cash { grid-row: 1; }
.pl.tl .cash, .pl.tr .cash { border-radius: 0 0 var(--r) var(--r); } .pl.bl .cash, .pl.br .cash { border-radius: var(--r) var(--r) 0 0; }
.pl .cash small { display: block; font-size: 11px; color: var(--ink-2); letter-spacing: 0; height: 15px; }
.pl .bar { height: 4px; border-radius: 2px; background: var(--cream-2); margin-top: 3px; overflow: hidden; }
.pl .bar i { display: block; height: 100%; width: 0; background: #f08a1c; border-radius: 2px; }
.pl.out { opacity: .5; } .pl.out .cash { text-decoration: line-through; }
.pl .stamp { position: absolute; inset: auto -8px -7px auto; padding: 2px 7px; text-align: center; font: 400 11px var(--display); color: var(--pink); background: rgba(255, 255, 255, .85); border: 2px solid var(--pink); border-radius: 6px; transform: rotate(-10deg); letter-spacing: .08em; background: #fff; }
.pl .you { font: 10px var(--body); background: rgba(255, 255, 255, .3); padding: 2px 6px; border-radius: 4px; letter-spacing: .04em; }

.side { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); display: grid; gap: var(--s4); z-index: 3; }
.feed { display: none; position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 12px; color: #3d5673; text-align: center; max-width: 44vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; }

.info { position: fixed; z-index: 6; width: 250px; background: var(--cream); border-radius: 12px; box-shadow: 0 0 0 3px #fff, 0 10px 20px rgba(40, 60, 90, .3); overflow: hidden; animation: pop 160ms var(--ease); }
.info h5 { font: 400 16px/1 var(--display); text-transform: uppercase; padding: 10px 14px; background: var(--blue-l); display: flex; justify-content: space-between; gap: 8px; }
.info table { width: 100%; border-collapse: collapse; font-size: 12px; }
.info td { padding: 5px 14px; border-bottom: 1px solid var(--cream-2); text-align: right; font-variant-numeric: tabular-nums; }
.info td:first-child { text-align: left; } .info tr.at td { background: #fff; font-weight: bold; }
.info p { padding: 8px 14px 10px; font-size: 12px; color: var(--ink-2); }

.over { position: fixed; inset: 0; background: rgba(60, 80, 110, .45); display: grid; place-items: center; z-index: 10; animation: fade 250ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.over .box { text-align: center; display: grid; gap: var(--s5); justify-items: center; animation: pop 300ms var(--ease); padding: var(--s4); }
.over .who { background: var(--cream); border-radius: 14px; box-shadow: 0 0 0 3px #fff; padding: var(--s5) var(--s7); display: grid; gap: var(--s2); justify-items: center; min-width: 320px; }
.over .who h3 { font: 400 30px/1.1 var(--display); text-transform: uppercase; }
.over .who .pot { font-size: 22px; margin-top: var(--s2); }
.over a { color: var(--blue-d); }

#toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -80px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 20; transition: transform 220ms var(--ease); pointer-events: none; }
#toast.on { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .ribbon { font-size: 22px; padding: 11px 34px 12px; }
  .top { grid-template-columns: 1fr auto; } .top .mid { grid-column: 1 / -1; grid-row: 2; text-align: center; }
  .tiles, .room { grid-template-columns: minmax(0, 420px); gap: var(--s6); }
  .tgrid { grid-template-columns: minmax(0, 1fr); } .pot b { font-size: 54px; } .top .tools { gap: var(--s2); }
  .row { grid-template-columns: 64px 1fr auto; } .row .mode { display: none; }
  .pl .ava { width: 54px; height: 54px; font-size: 24px; border-width: 3px; }
  .pl .nm { min-width: 0; font-size: 12px; padding: 6px 12px; } .pl .cash { min-width: 0; font-size: 13px; padding: 5px 12px 4px; }
  .pl.tl .nm, .pl.bl .nm, .pl.tl .cash, .pl.bl .cash { padding-left: 16px; } .pl.tr .nm, .pl.br .nm, .pl.tr .cash, .pl.br .cash { padding-right: 16px; }
  .pl .cash small, .pl .you { display: none; } .pl .stamp { font-size: 9px; }
  .stage { width: min(118vw, calc(100vh * 1.5)); }
  .dice { --d: 40px; gap: 26px; } .sum { top: -50px; min-width: 38px; height: 38px; margin-left: -19px; font-size: 19px; line-height: 38px; }
  .side { top: auto; bottom: 84px; right: 10px; transform: none; } .round { width: 44px; height: 44px; } .round svg { width: 22px; height: 22px; }
  .opt b { font-size: 10px; } .opt span { font-size: 9px; } .opt svg { height: 50px; }
  .log, .emotes { display: none; } .feed { display: block; }
  .tiles.three { grid-template-columns: minmax(0, 420px); }
}

/* ---------- Phantom ---------- */
.wallet {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 0 0; min-height: 36px; padding: 0 14px 0 10px; border: 0; border-radius: 10px; cursor: pointer;
  font: 400 15px/1 var(--display); letter-spacing: .02em; color: #fff; background: #ab9ff2; box-shadow: 0 4px 0 #8c7fdc, 0 0 0 3px #fff;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), filter 120ms var(--ease);
}
.wallet svg { width: 20px; height: 20px; flex: none; }
.wallet:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.wallet:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #8c7fdc, 0 0 0 3px #fff; }
.wallet:disabled { opacity: .7; cursor: progress; }
.wallet:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wallet.on { background: var(--cream); color: var(--ink); box-shadow: 0 4px 0 var(--line), 0 0 0 3px #fff; }
.wallet.on svg { color: #ab9ff2; }
.wallet b { font-weight: 400; color: var(--pink); }
