/* Layout: masthead with the 6kamp mark, sticky tab bar, member tiles in a wrapping grid;
   sheets slide up from the bottom on phones and sit centred on wider screens.
   Colours: the accent (--brand and its tints) is set by a beheerder under Beheer > Uiterlijk and applied by js/theme.js;
   the values here are the 6kamp-green defaults. data-header="dark" gives the black 6kamp.nl header,
   data-mode="dark" the dark mode (only when a beheerder lets the app follow the phone's setting). */
:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --line: #dde3e0;
  --fg: #111312;
  --muted: #5b6561;
  --brand: #00c18c;          /* 6kamp groen, uit het logo */
  --brand-fg: #04140e;       /* tekst op groen: zwart leest beter dan wit */
  --brand-ink: #007a58;      /* groen als tekstkleur op een lichte achtergrond */
  --brand-soft: #dcf5ec;
  --mast: #ffffff;
  --mast-fg: #111312;
  --mast-muted: #5b6561;
  --mast-line: #dde3e0;
  --mast-accent: var(--brand-ink);
  --auth-bg: var(--bg);
  --warn: #b8410f;
  --warn-soft: #fdebe2;
  --test: #f4c430;
  --test-fg: #2b2100;
  --font: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-header="dark"] {
  --mast: #000000; --mast-fg: #ffffff; --mast-muted: #9aa5a0; --mast-line: #000000; --mast-accent: var(--brand); --auth-bg: #000000;
}
:root[data-mode="dark"] {
  --bg: #0b0d0c; --surface: #151918; --line: #29302d; --fg: #eef2f0; --muted: #9aa5a0;
  --brand-ink: #33dcaa; --brand-soft: #0e2a21;
  --warn: #ff9a6b; --warn-soft: #3a1d10;
  --mast: #151918; --mast-fg: #eef2f0; --mast-muted: #9aa5a0; --mast-line: #29302d;
  color-scheme: dark;
}
:root[data-mode="dark"][data-header="dark"] { --mast: #000000; --mast-line: #000000; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.45; padding-bottom: env(safe-area-inset-bottom, 0px); }
h1, h2 { font-family: var(--font); text-wrap: balance; margin: 0; }
h2 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
.sub { color: var(--muted); font-size: 0.92rem; }
.small { font-size: 0.85rem; }
.num, table { font-variant-numeric: tabular-nums; }
.error { color: var(--warn); font-weight: 600; min-height: 1.2em; }
.error:empty { display: none; }
.caps { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }

.env-banner { background: repeating-linear-gradient(-45deg, var(--test), var(--test) 14px, #e8b820 14px, #e8b820 28px); color: var(--test-fg); font-weight: 700; text-align: center; padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
/* The banner already clears the phone's status bar, so what follows it does not need to. */
.env-banner:not([hidden]) ~ #appView .masthead { padding-top: 0; }
.env-banner:not([hidden]) ~ .auth { padding-top: 32px; }

/* Masthead + tabs */
.masthead { background: var(--mast); color: var(--mast-fg); padding-top: env(safe-area-inset-top, 0px); }
.masthead + .tabbar { border-top: 0; }
.inner { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.masthead .inner { display: flex; align-items: center; gap: 12px; padding-block: 14px 10px; }
.mark { width: 38px; height: 38px; flex: none; display: block; }
.brand { display: grid; line-height: 1.05; min-width: 0; }
.brand-kicker { color: var(--mast-accent); font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600; }
.brand h1 { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; }
.status { margin-left: auto; color: var(--mast-muted); font-size: 0.82rem; text-align: right; }
.masthead .install-btn { background: transparent; border-color: var(--brand); color: var(--mast-accent); padding: 6px 12px; font-size: 0.85rem; }
.auth .install-btn { background: transparent; border-color: var(--brand); color: var(--mast-accent); }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.tabbar { position: sticky; top: 0; z-index: 5; background: var(--mast); border-bottom: 3px solid var(--brand); box-shadow: 0 1px 0 var(--mast-line); }
.tabbar nav { display: flex; gap: 2px; }
.tabbar button { flex: 1; font: 700 0.8rem var(--font); text-transform: uppercase; letter-spacing: 0.12em; padding: 13px 4px 11px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -3px; background: transparent; color: var(--mast-muted); cursor: pointer; }
.tabbar button:hover { color: var(--mast-fg); }
.tabbar button[aria-selected="true"] { color: var(--mast-accent); border-bottom-color: var(--mast-fg); }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 96px; }

button, input, select, textarea { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input[type="text"], input[type="search"], input[type="password"], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
label { display: grid; gap: 4px; font-size: 0.88rem; color: var(--muted); }
label input, label select { color: var(--fg); font-size: 1rem; }
.btn { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); font-weight: 700; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.big { padding: 13px 16px; font-size: 1rem; }
.btn.small { padding: 6px 10px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Inloggen: in de kleur van de kop, met het volledige logo */
.auth { min-height: 100vh; min-height: 100dvh; background: var(--auth-bg); color: var(--fg); display: grid; place-items: center; align-content: center; gap: 24px; padding: calc(32px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.auth-logo { width: 150px; height: auto; display: block; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--mast-line); border-radius: 14px; padding: 24px; display: grid; gap: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06); }
.auth-card h1 { font-size: 1.35rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }

/* Turven */
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.toolbar input { flex: 1; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.tile.me { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.tile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.tile-who { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; color: var(--fg); text-align: left; cursor: pointer; }
.tile-name { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }
.tile-who:hover .tile-name { text-decoration: underline; }
.you { flex: none; font-size: 0.75rem; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; }
.tile-owed { font-size: 0.88rem; color: var(--muted); white-space: nowrap; }
.tally { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; align-items: center; color: var(--muted); font-size: 0.88rem; }
.tally svg { display: block; }
.stroke { stroke: var(--brand-ink); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.drink { width: 100%; background: var(--brand); color: var(--brand-fg); padding: 15px 8px; border-radius: 10px; border: 0; cursor: pointer; font: 800 1rem var(--font); text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; justify-content: center; gap: 10px; }
.drink:hover { filter: brightness(1.05); }
.drink:active { transform: scale(0.97); }
.drink small { font-weight: 600; letter-spacing: 0.02em; opacity: 0.75; text-transform: none; }
.empty { grid-column: 1 / -1; text-align: center; padding: 32px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.empty strong { display: block; color: var(--fg); font-size: 1.1rem; margin-bottom: 4px; }

/* Overzicht */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.stat .value { font-weight: 900; font-size: 1.6rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tr.inactive td { color: var(--muted); }
td.name { font-weight: 700; white-space: normal; }
td.center { text-align: center; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.pill.open { background: var(--warn-soft); color: var(--warn); }
.pill.paid { background: var(--brand-soft); color: var(--brand-ink); }
.last-paid { font-size: 0.82rem; color: var(--muted); margin-top: -4px; }
.cell-sub { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.private { color: var(--muted); }
.theme-row { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; }
.color-pick input { width: 64px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--fg); }
.switch { display: flex; gap: 12px; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; cursor: pointer; }
.switch strong { color: var(--fg); font-size: 1rem; }
.switch input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.tally-more { font-size: 0.85rem; font-weight: 700; color: var(--brand-ink); }
.tally .earlier { margin-left: auto; color: var(--muted); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Beheer & account */
section { display: grid; gap: 14px; }
section#view-turven, section#view-overzicht { display: block; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.card h2 { text-transform: uppercase; letter-spacing: 0.08em; font-size: 1rem; font-weight: 800; }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.form-row label { flex: 1; min-width: 140px; }
.stack { display: grid; gap: 12px; max-width: 420px; }
.member-list { display: grid; gap: 8px; }
.member-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; padding-bottom: 0; }
.member-row .who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.member-row .who-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.member-row .who input { font-weight: 600; }
.member-row .username { font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.member-row.hidden-member .who input { color: var(--muted); text-decoration: line-through; }
.member-row select { width: auto; }
@media (max-width: 640px) {
  .member-row { grid-template-columns: 1fr; }
  .member-row select { width: 100%; }
}
@media (max-width: 420px) {
  .status { display: none; }
  .masthead .install-btn { margin-left: auto; }
  .tabbar button { letter-spacing: 0.03em; font-size: 0.72rem; padding-inline: 2px; }
}

/* Sheet: on phones a panel that slides up from the bottom, on wider screens a centred dialog.
   The head stays put and only the body scrolls; dvh keeps the panel clear of mobile browser bars. */
body.sheet-open { overflow: hidden; }
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); color: var(--fg); width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px 16px 0 0; border-top: 4px solid var(--brand); box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25); }
.sheet-head { flex: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
.sheet-head > div { min-width: 0; display: grid; gap: 2px; }
.sheet-head h2 { overflow-wrap: anywhere; }
.sheet-head .btn { margin: -6px -8px 0 0; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 12px; align-content: start; padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet-body .stack { max-width: none; }
.sheet-body .stack .btn.primary { width: 100%; padding-block: 13px; }
.backdrop.enter { animation: fade-in 0.15s ease-out; }
.backdrop.enter .sheet { animation: sheet-up 0.2s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(32px); opacity: 0.6; } }
@media (min-width: 640px) {
  .backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 14px; max-height: min(720px, calc(100vh - 48px)); max-height: min(720px, calc(100dvh - 48px)); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35); }
  .sheet-head { padding: 18px 20px 14px; }
  .sheet-body { padding: 16px 20px 20px; }
  @keyframes sheet-up { from { transform: translateY(12px) scale(0.98); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .backdrop.enter, .backdrop.enter .sheet { animation: none; } }
.credentials { background: var(--bg); border-radius: 10px; padding: 12px; display: grid; gap: 4px; font-size: 1rem; }
.credentials code { font-size: 1.1rem; font-weight: 700; user-select: all; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; }
.hist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hist li:first-child { padding-top: 0; }
.hist li:last-child { border-bottom: 0; padding-bottom: 0; }
.hist li > div { min-width: 0; }
.hist .when { color: var(--muted); font-size: 0.85rem; }
.tag { font-weight: 700; }
.tag.drankje { color: var(--fg); }
.tag.betaling { color: var(--brand-ink); }
textarea { min-height: 160px; }

/* Toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: #111312; color: #ffffff; border-left: 4px solid var(--brand); padding: 10px 10px 10px 14px; border-radius: 10px; display: flex; gap: 12px; align-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3); max-width: calc(100% - 32px); }
.toast.big { font-size: 1.3rem; font-weight: 700; padding: 14px 14px 14px 20px; gap: 18px; }
.toast.big button { font-size: 1.05rem; padding: 10px 16px; }
.toast button { background: transparent; border: 1px solid var(--brand); color: var(--brand); border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .drink:active { transform: none; } }

/* Avatars: a round photo, or initials in 6kamp colours */
.avatar { flex: none; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; letter-spacing: 0.02em; overflow: hidden; }
.avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-md { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.05rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; }
.who-cell { display: inline-flex; align-items: center; gap: 8px; }

/* Lists of tablets and invitations, buttons in a row */
.row-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.line-list { display: grid; }
.line-list:empty { display: none; }
.list-title { margin: 4px 0 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.line-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.line-item > div:first-child { min-width: 0; }

/* Account */
.profile { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-photo-buttons { display: flex; gap: 6px; flex-wrap: wrap; }

/* Invitation sheet */
.qr { width: min(260px, 100%); margin: 4px auto; background: #ffffff; border-radius: 10px; padding: 6px; }
.qr svg { display: block; width: 100%; height: auto; }
.invite-link { display: block; background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 0.85rem; word-break: break-all; user-select: all; }
.auth-card a.btn { text-align: center; text-decoration: none; color: var(--fg); }

/* Tablet mode: big touch targets, no amounts */
body.tablet-mode { user-select: none; -webkit-user-select: none; }
.tablet-inner { padding-block: 12px; max-width: 1400px; }
.tablet-meta { margin-left: auto; display: grid; justify-items: end; color: var(--mast-muted); font-size: 0.9rem; }
.tablet-clock { color: var(--mast-fg); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
#tabletView .masthead { border-bottom: 3px solid var(--brand); }
#tabletView .tablet-clock { color: var(--mast-fg); }
#tabletView .brand h1 { font-size: 1.3rem; }
.tablet-body { max-width: 1400px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.tablet-body .toolbar input { font-size: 1.15rem; padding: 14px 16px; }
.tablet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ttile { display: grid; justify-items: center; gap: 8px; padding: 18px 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; touch-action: manipulation; color: var(--fg); font: inherit; }
.ttile .avatar-xl { width: 88px; height: 88px; font-size: 1.8rem; }
.ttile-name { font-weight: 800; font-size: 1.15rem; text-align: center; overflow-wrap: anywhere; line-height: 1.2; }
.ttile-tally { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; min-height: 20px; max-width: 100%; }
.ttile-tally:empty { display: none; }
.ttile-earlier { font-size: 0.82rem; color: var(--muted); }
.tablet-section { grid-column: 1 / -1; margin: 10px 0 0; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.tablet-section:first-child { margin-top: 0; }
.ttile:active { transform: scale(0.97); }
.ttile.flash { animation: tile-flash 0.9s ease-out; }
@keyframes tile-flash { 0% { background: var(--brand); border-color: var(--brand); } 100% { background: var(--surface); } }
.tablet-foot { margin-top: 28px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .ttile.flash { animation: none; } .ttile:active { transform: none; } }

/* Ranking: period switch, podium, awards and the full list */
:root { --gold: #e3b341; --silver: #b4bcc2; --bronze: #c98a55; }
.segmented { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.seg { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 9px 4px; font-weight: 700; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.seg.on { background: var(--brand); color: var(--brand-fg); }
.ranking { display: grid; gap: 14px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; max-width: 520px; width: 100%; margin: 0 auto; }
.podium-spot { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.podium-avatar { position: relative; }
.podium-avatar .avatar { border: 3px solid var(--medal, var(--line)); }
.gold .podium-avatar .avatar { width: 72px; height: 72px; font-size: 1.4rem; }
.medal { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--medal); color: #1b1404; font-weight: 900; font-size: 0.8rem; border: 2px solid var(--surface); }
.gold { --medal: var(--gold); }
.silver { --medal: var(--silver); }
.bronze { --medal: var(--bronze); }
.podium-name { font-weight: 800; overflow-wrap: anywhere; line-height: 1.2; }
.podium-count { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.podium-block { width: 100%; margin-top: 6px; border-radius: 8px 8px 0 0; background: var(--brand-soft); border-top: 4px solid var(--medal); color: var(--fg); font-weight: 900; font-size: 1.4rem; display: grid; place-items: center; }
.gold .podium-block { height: 86px; }
.silver .podium-block { height: 62px; }
.bronze .podium-block { height: 44px; }
.podium-spot.me .podium-name::after { content: ' (jij)'; color: var(--brand-ink); font-weight: 700; }
.podium-title { text-align: center; color: var(--muted); margin-top: -4px; }
.podium-title strong { color: var(--fg); }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.award { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px; min-width: 0; }
.award > div { min-width: 0; }
.award.me { background: var(--brand-soft); }
.award-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; color: var(--brand-ink); }
.award-who { font-weight: 800; font-size: 1.05rem; overflow-wrap: anywhere; }
.ranklist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ranklist li { display: grid; grid-template-columns: 2.2em auto minmax(0, 1fr) minmax(60px, 30%) 2.5em; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.ranklist li:last-child { border-bottom: 0; }
.ranklist li.me { background: var(--brand-soft); }
.rank { color: var(--muted); font-weight: 700; text-align: right; }
.rank-name { font-weight: 700; overflow-wrap: anywhere; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rank-bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.rank-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.rank-count { text-align: right; font-weight: 800; }
@media (max-width: 420px) {
  .ranklist li { grid-template-columns: 2em auto minmax(0, 1fr) 2.2em; }
  .rank-bar { display: none; }
}
