/* TTRPG – tabletop theme. Colours come from the theme on <body data-theme="…">. */
:root, [data-theme="walnut"] {
  --table: #4A2D17; --plank1: #9C6638; --plank2: #7A4A26; --frame1: #8E5A31; --frame2: #6E411F;
  --ink: #2B1A0E; --edge: #3A2210; --card: #FBF4E4; --field: #FFFDF6; --muted: #5E4A38; --line: #D8C7A4;
  --accent: #E2A83B; --accent-hi: #F5CF80; --on-accent: #2B1A0E; --accent2: #2F6B4F; --on-accent2: #FFF3DD;
  --head: #FFF3DD; --head-muted: #E9D3AE; --shelf-back: #24140A; --danger: #7A3010; --ok-bg: #D4E6D9; --ok: #1E4A33;
  --warn-bg: #F3E3B5; --warn: #634404;
}
[data-theme="oak"] {
  --table: #C9A479; --plank1: #D9B07A; --plank2: #B88A55; --frame1: #C79A62; --frame2: #A97C49;
  --ink: #2E2216; --edge: #3B2A18; --card: #FFFBF1; --field: #FFFFFF; --muted: #5C4B38; --line: #E2D3B6;
  --accent: #2E7D7A; --accent-hi: #7FC1BE; --on-accent: #FFFFFF; --accent2: #C0573A; --on-accent2: #FFFFFF;
  --head: #2E2216; --head-muted: #4A3A28; --shelf-back: #6E5236; --danger: #9A3A20; --ok-bg: #D6ECEA; --ok: #1F5654;
  --warn-bg: #F7E8C4; --warn: #6A4A08;
}
[data-theme="dungeon"] {
  --table: #22201F; --plank1: #3B3330; --plank2: #2A2422; --frame1: #3A322E; --frame2: #26201E;
  --ink: #1B1715; --edge: #0E0C0B; --card: #EDE6D8; --field: #F8F4EC; --muted: #4F4740; --line: #CFC3AE;
  --accent: #C9A24A; --accent-hi: #E8CF8A; --on-accent: #1B1715; --accent2: #9E2F2F; --on-accent2: #FFF3E8;
  --head: #F3E9D2; --head-muted: #CDBF9F; --shelf-back: #121010; --danger: #9E2F2F; --ok-bg: #DCE6D4; --ok: #2E4A26;
  --warn-bg: #EFE0B8; --warn: #5E4508;
}
[data-theme="ranger"] {
  --table: #2E3A2C; --plank1: #5A4A33; --plank2: #45382A; --frame1: #5A4A33; --frame2: #3E3226;
  --ink: #1E241C; --edge: #151A13; --card: #F4F1E4; --field: #FFFEF8; --muted: #4A5244; --line: #D4D0B8;
  --accent: #C2733B; --accent-hi: #E8AE80; --on-accent: #1E241C; --accent2: #5E7F3A; --on-accent2: #FFFEF8;
  --head: #F4F1E4; --head-muted: #D2D8C4; --shelf-back: #161C15; --danger: #8E3B22; --ok-bg: #DDE8CF; --ok: #32491D;
  --warn-bg: #F1E2C2; --warn: #5F4410;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.45 "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: var(--table);
  background-image: repeating-linear-gradient(179deg, rgba(0,0,0,.14) 0 2px, transparent 2px 11px),
                    repeating-linear-gradient(181deg, rgba(255,220,170,.05) 0 1px, transparent 1px 7px);
}
a { color: inherit; }
h1, h2, h3, .display { font-family: "Bree Serif", Georgia, serif; font-weight: 400; margin: 0; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Wood */
.plank {
  background-color: var(--plank2);
  background-image: repeating-linear-gradient(179.3deg, rgba(0,0,0,.2) 0 1px, transparent 1px 6px),
                    repeating-linear-gradient(180.6deg, rgba(255,230,190,.10) 0 2px, transparent 2px 13px),
                    linear-gradient(180deg, var(--plank1), var(--plank2));
}
.frame {
  background-color: var(--frame2);
  background-image: repeating-linear-gradient(90.5deg, rgba(0,0,0,.22) 0 1px, transparent 1px 7px),
                    linear-gradient(90deg, var(--frame1), var(--frame2));
  padding: 10px; border-radius: 18px; border: 2px solid var(--edge);
  box-shadow: 0 8px 0 var(--edge), 0 14px 24px rgba(0,0,0,.35);
}
.card {
  background: var(--card); border: 2px solid var(--edge); border-radius: 10px; padding: 22px;
  background-image: radial-gradient(rgba(120,90,50,.06) 1px, transparent 1px); background-size: 5px 5px;
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Header */
.topbar { border-bottom: 6px solid var(--edge); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.35); }
.topbar-inner { max-width: 1360px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--head); text-decoration: none; }
.brand span { font-family: "Bree Serif", Georgia, serif; font-size: 28px; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { padding: 9px 13px; border-radius: 10px; color: var(--head); font-weight: 700; text-decoration: none; }
.nav a:hover { background: rgba(255,246,230,.14); }
.nav a.active { background: var(--card); color: var(--ink); font-weight: 800; border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); }
.nav .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 900; text-align: center; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--head); font-weight: 800; }
.who form { margin: 0; }
.who button { background: none; border: 0; color: var(--head-muted); font: inherit; font-weight: 700; cursor: pointer; padding: 9px 8px; border-radius: 10px; }
.who button:hover { background: rgba(255,246,230,.14); }
.role { padding: 3px 8px; border-radius: 6px; border: 2px solid var(--edge); font-size: 11px; letter-spacing: 1px; font-weight: 900; color: var(--ink); background: var(--ok-bg); }
.role.admin { background: var(--accent); color: var(--on-accent); }

/* Page */
.page { max-width: 1360px; margin: 0 auto; padding: 28px 24px 56px; display: flex; flex-direction: column; gap: 24px; }
.page-title h1 { font-size: 40px; line-height: 1.1; color: var(--head); text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.page-title p { margin: 6px 0 0; color: var(--head-muted); font-weight: 700; }
.with-side { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.with-side > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.with-side > .side { flex: 1 1 300px; max-width: 400px; display: flex; flex-direction: column; gap: 26px; }

/* Messages */
.messages { display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 12px 16px; border-radius: 12px; border: 2px solid var(--edge); background: var(--card); font-weight: 700; box-shadow: 0 3px 0 var(--edge); }
.msg.success { background: var(--ok-bg); }
.msg.error { background: #F4D7C2; color: #5A1E06; }
.msg.warning { background: var(--warn-bg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 2px solid var(--edge); background: var(--field); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer;
  text-decoration: none; box-shadow: 0 3px 0 var(--edge); white-space: nowrap; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.btn.gold { background: var(--accent); color: var(--on-accent); font-weight: 900; box-shadow: inset 0 2px 0 var(--accent-hi), 0 4px 0 var(--edge); }
.btn.green { background: var(--accent2); color: var(--on-accent2); }
.btn.danger { color: var(--danger); border-color: var(--danger); box-shadow: 0 3px 0 var(--danger); }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn.wide { width: 100%; min-height: 52px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 800; font-size: 13px; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.field .help { font-size: 13px; color: var(--muted); }
.field .err, .errorlist { color: #8A2A0A; font-weight: 700; font-size: 13px; margin: 0; padding: 0; list-style: none; }
input[type=text], input[type=search], input[type=password], input[type=tel], input[type=email], input[type=number],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--edge); background: var(--field);
  color: var(--ink); font: inherit; font-weight: 600; box-shadow: inset 0 2px 0 rgba(0,0,0,.08);
}
textarea { min-height: 96px; resize: vertical; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent2); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid2 .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

/* Filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.token { width: 50px; height: 50px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--edge);
  background: var(--field); color: var(--ink); font-weight: 900; font-size: 14px; text-decoration: none;
  box-shadow: inset 0 0 0 4px var(--field), inset 0 0 0 6px var(--line), 0 4px 0 var(--edge); }
.token.on { background: var(--accent2); color: var(--on-accent2); box-shadow: inset 0 0 0 4px var(--accent2), inset 0 0 0 6px var(--accent-hi), 0 2px 0 var(--edge); transform: translateY(2px); }
.chip { padding: 7px 12px; border-radius: 8px; border: 2px solid var(--edge); background: var(--field); font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 2px 0 var(--edge); }
.chip.on { background: var(--accent); color: var(--on-accent); }
.tag { display: inline-block; padding: 4px 9px; border-radius: 6px; border: 2px solid var(--edge); background: var(--warn-bg); color: var(--warn); font-weight: 800; font-size: 12px; text-decoration: none; }
.tag.on { background: var(--accent2); color: var(--on-accent2); }
.filter-group { display: flex; flex-direction: column; gap: 10px; border-top: 2px dashed var(--line); padding-top: 16px; }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group h3 { font-family: inherit; font-weight: 900; font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }
.shelf-link { display: flex; justify-content: space-between; text-decoration: none; padding: 2px 0; }
.shelf-link.on { font-weight: 900; color: var(--accent2); }

/* Bookshelf */
.bookcase { padding: 14px; }
.bookcase-inner { background: var(--shelf-back); border-radius: 6px; padding: 24px 24px 4px; box-shadow: inset 0 8px 18px rgba(0,0,0,.6); }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: 262px; column-gap: 26px; row-gap: 44px;
  margin: 0 -24px; padding: 0 24px;
  background-image: repeating-linear-gradient(180deg, transparent 0 264px, var(--accent-hi) 264px 266px, var(--plank1) 266px 279px, var(--plank2) 279px 284px, rgba(0,0,0,.45) 284px 292px, transparent 292px 306px); }
.box { display: flex; flex-direction: column; border: 2px solid #1A0E06; border-radius: 6px; overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: 7px 0 0 -1px rgba(0,0,0,.35), 0 3px 0 #1A0E06; transition: transform .15s; background: var(--card); }
.box:hover { transform: translateY(-6px) rotate(-1deg); }
.box-art { position: relative; height: 172px; flex: none; overflow: hidden; display: flex; align-items: flex-end; padding: 16px;
  background: hsl(var(--hue, 30) 45% 38%); }
.box-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.box-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20,10,4,.75)); }
.box-art .title { position: relative; z-index: 1; font-family: "Bree Serif", Georgia, serif; font-size: 21px; line-height: 1.1; color: #FFF3DD; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.ribbon { position: absolute; z-index: 2; top: 14px; right: -32px; transform: rotate(35deg); background: var(--accent); color: var(--on-accent);
  border-block: 2px solid #1A0E06; padding: 3px 36px; font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.box-meta { flex: 1; padding: 9px 12px; display: flex; flex-direction: column; justify-content: center; gap: 6px; border-top: 2px solid #1A0E06; }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 13px; }
.meta-row .bits { display: flex; gap: 10px; }
.meta-row .bits span { display: inline-flex; align-items: center; gap: 4px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid var(--ink); }
.dots i.on { background: var(--ink); }
.empty { padding: 28px; text-align: center; color: var(--head-muted); font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th { text-align: left; padding: 10px 12px; font-size: 12px; letter-spacing: 1px; color: var(--muted); font-weight: 900; border-bottom: 2px solid var(--edge); text-transform: uppercase; }
table.data td { padding: 11px 12px; border-bottom: 2px dashed var(--line); vertical-align: middle; }
table.data td.actions { text-align: right; white-space: nowrap; }
.thumb { width: 44px; height: 44px; flex: none; border-radius: 4px; border: 2px solid #1A0E06; object-fit: cover; box-shadow: 3px 3px 0 -1px #1A0E06;
  background: hsl(var(--hue, 30) 45% 38%); display: inline-block; }
.game-cell { display: flex; align-items: center; gap: 12px; font-weight: 900; text-decoration: none; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #FFF;
  font-weight: 900; border: 2px solid var(--edge); background: hsl(var(--hue, 30) 40% 38%); }
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; border: 2px solid var(--edge); font-weight: 900; font-size: 12px; background: var(--ok-bg); }
.badge.warn { background: var(--warn-bg); }
.badge.bad { background: #F4D7C2; color: #5A1E06; }
.badge.gold { background: var(--accent); color: var(--on-accent); }
.request { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px; border: 2px solid var(--edge); border-radius: 12px; background: var(--field); }
.request .who-col { flex: 1 1 200px; display: flex; flex-direction: column; }

/* Toggle */
.switch { position: relative; width: 56px; height: 32px; border-radius: 999px; border: 2px solid var(--edge); background: var(--line); cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--field); border: 2px solid var(--edge); box-sizing: border-box; transition: left .15s; }
.switch.on { background: var(--accent2); }
.switch.on::after { left: 26px; }
input.switch-input { appearance: none; -webkit-appearance: none; margin: 0; }
input.switch-input:checked { background: var(--accent2); }
input.switch-input:checked::after { left: 26px; }

/* Game detail */
.detail { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start; }
.detail .cover-col { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.detail .info-col { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.cover { position: relative; aspect-ratio: 1 / 1; border: 3px solid #1A0E06; border-radius: 8px; overflow: hidden; background: hsl(var(--hue, 30) 45% 38%);
  box-shadow: 12px 12px 0 -2px rgba(0,0,0,.35), 12px 12px 0 1px #1A0E06; display: flex; align-items: flex-end; padding: 24px; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .title { position: relative; font-family: "Bree Serif", Georgia, serif; font-size: 36px; color: #FFF3DD; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.fact { background: var(--field); border: 2px solid var(--edge); border-radius: 12px; padding: 12px 14px; box-shadow: 0 4px 0 var(--edge); }
.fact b { display: block; font-family: "Bree Serif", Georgia, serif; font-weight: 400; font-size: 26px; }
.fact span { font-size: 12px; letter-spacing: 1px; font-weight: 900; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 800; text-align: right; }
.pad { border: 2px solid var(--edge); border-radius: 12px; overflow: hidden; }
.pad-head { background: var(--accent2); color: var(--on-accent2); padding: 12px 18px; border-bottom: 2px solid var(--edge); }
.pad-body { background: var(--field); background-image: repeating-linear-gradient(180deg, transparent 0 45px, #C9DCE8 45px 47px); padding: 0 18px; }
.pad-row { display: flex; flex-wrap: wrap; gap: 12px; min-height: 47px; align-items: center; }
.pad-row .r { margin-left: auto; font-weight: 800; color: var(--ok); }
.description { white-space: pre-line; color: var(--muted); max-width: 70ch; }
.description.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* Login */
.login-wrap { min-height: calc(100vh - 24px); display: flex; align-items: center; justify-content: center; padding: 40px 18px; }
.login-wrap .frame { width: 100%; max-width: 440px; }

/* Theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.theme-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--edge); background: var(--field); cursor: pointer; font-weight: 800; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:checked) { box-shadow: 0 0 0 3px var(--accent); }
.theme-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatches { display: inline-flex; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #1A0E06; margin-left: -6px; }
.swatches i:first-child { margin-left: 0; }

/* BGG */
.result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; border: 2px solid var(--edge); background: var(--field); text-decoration: none; }
.result.on { background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--accent2); }
.bgg-badge { padding: 3px 8px; border-radius: 6px; background: #FF5100; color: #FFF; font-weight: 900; font-size: 12px; border: 2px solid var(--edge); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--card); border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--edge); font-weight: 700; }
.footer { text-align: center; color: var(--head-muted); font-size: 13px; padding: 0 24px 24px; }
.footer a { color: var(--head); }

@media (max-width: 700px) {
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .brand span { font-size: 24px; }
  .who { margin-left: 0; width: 100%; justify-content: space-between; }
  .page { padding: 20px 14px 40px; }
  .page-title h1 { font-size: 32px; }
  .shelf-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); column-gap: 18px; }
  .box-art .title { font-size: 18px; }
}

/* Score pad, play form, leaderboard */
.pad-players { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pad-players .winner { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; color: var(--ok); }
.linkish { background: none; border: 0; padding: 4px 6px; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.seat { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px; border: 2px solid var(--edge); border-radius: 12px; background: var(--field); }
.seat select { flex: 1 1 220px; width: auto; }
.seat .guest-name { flex: 1 1 160px; width: auto; }
.seat-n { width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent2); color: var(--on-accent2); border: 2px solid var(--edge); font-weight: 900; }
.won { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 44px; border: 2px solid var(--edge); border-radius: 10px; font-weight: 900; cursor: pointer; background: var(--card); }
.won:has(input:checked) { background: var(--accent); color: var(--on-accent); }
.medal { width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 14px;
  border: 2px solid #2B1A0E; background: var(--field); color: #2B1A0E; }
.medal-1 { background: #E2B13C; box-shadow: inset 0 0 0 3px #F6D98A; }
.medal-2 { background: #C9CED6; box-shadow: inset 0 0 0 3px #EEF1F4; }
.medal-3 { background: #C98A4B; box-shadow: inset 0 0 0 3px #E8B88A; }
.champ-row { display: flex; align-items: center; gap: 10px; }
.champ-row .muted { margin-left: auto; font-weight: 800; }
table.data tr.me td { background: rgba(226,168,59,.12); }
.bar { display: inline-block; vertical-align: middle; width: 80px; height: 10px; border-radius: 999px; border: 2px solid var(--edge); background: var(--field); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--accent2); }
.game-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.game-board { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 2px solid var(--edge); border-radius: 12px; background: var(--field); }
.hall-row { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 2px dashed var(--line); }
.hall-row:first-of-type { border-top: 0; padding-top: 0; }

/* Monthly champions ribbon */
.ribbon-banner { display: flex; flex-direction: column; gap: 10px; }
.ribbon-cloth { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 18px 56px; color: #FFF3DD;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.12)), var(--accent2);
  border-top: 3px solid #E2B13C; border-bottom: 3px solid #E2B13C; box-shadow: 0 8px 18px rgba(0,0,0,.35);
  clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 50%, 100% 100%, 0 100%, 28px 50%); }
.ribbon-title { display: flex; align-items: center; gap: 12px; }
.ribbon-title b { display: block; font-family: "Bree Serif", Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.1; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.ribbon-kicker { font-size: 12px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; opacity: .9; }
.podium { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.podium li { display: flex; align-items: center; gap: 10px; }
.podium li span b { display: block; font-size: 17px; }
.podium small { opacity: .9; font-weight: 700; }
.podium .medal { width: 40px; height: 40px; font-size: 16px; }
.ribbon-note { margin-left: auto; font-weight: 700; opacity: .95; }
.ribbon-race { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 16px; border-radius: 12px;
  background: var(--card); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); }
@media (max-width: 700px) {
  .ribbon-cloth { padding: 16px 34px; clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 50%, 100% 100%, 0 100%, 16px 50%); }
  .ribbon-note { margin-left: 0; }
}
