:root {
  color-scheme: light;
  --ink: #2e3a4b;
  --muted: #455468;
  --line: #e6e1d8;
  --paper: #f6f4ef;
  --card: #fffefb;
  --accent: #28536b;
  --accent-soft: #e3eef5;
  --green: #1f7049;
  --green-bg: #e3f5ea;
  --yellow: #8a5c00;
  --yellow-bg: #fff3d2;
  --red: #a3283a;
  --red-bg: #fde6ea;
  --blue: #2c5a82;
  --blue-bg: #e4eefb;
  --purple: #5f4b8b;
  --purple-bg: #efe9fb;
  --peach: #93522c;
  --peach-bg: #fdeee2;
  --teal: #1d6b6b;
  --teal-bg: #e0f3f1;
  --danger: #a3283a;
  --field: #fff;
  --subtle: #f3f0ea;
  --soft: #faf8f4;
  --chip: #f0ece4;
  --dash: #d7d0c3;
  --faint: #7d776c;
  --brand-ink: #15213b;
  --nav-bg: #1f3d4e;
  --accent-line: #9ebfd3;
  --blue-line: #c4d7ef;
  --red-line: #f1b8c1;
  --late: #b45309;
  --pink: #a3285e;
  --pink-bg: #fde6ef;
  --orange: #b24a2c;
  --orange-bg: #fde8e1;
  --indigo: #4146a0;
  --indigo-bg: #e7e8fb;
  --brown: #7a5a2e;
  --brown-bg: #f3ebdf;
  --sky: #1f6f96;
  --sky-bg: #e0f1fa;
  --area: var(--accent);
  --area-bg: var(--accent-soft);
  /* The desk's frame: the menu fades from turquoise to --nav-bg, the top bar carries on from the turquoise, and the page opens on a wash of it. */
  --chrome-top: #2a8088;
  --chrome-mid: #246272;
  --chrome-bar: linear-gradient(100deg, #2a8088 0%, #2d8f93 55%, #33999a 100%);
  --wash: #d6efec;
}
/* Dark theme: public/theme.js sets data-theme from the saved choice or the device setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e3e7ee;
  --muted: #9aa4b2;
  --line: #2e3744;
  --paper: #12171e;
  --card: #1a212b;
  --accent: #4a88ad;
  --accent-soft: #1d3444;
  --green: #6fcf97;
  --green-bg: #16332a;
  --yellow: #f0c566;
  --yellow-bg: #362c12;
  --red: #f28b9b;
  --red-bg: #3d1c24;
  --blue: #8fbbea;
  --blue-bg: #1a2a3e;
  --purple: #bca9ec;
  --purple-bg: #2a2342;
  --peach: #f0a878;
  --peach-bg: #3a2519;
  --teal: #6fd0c6;
  --teal-bg: #133230;
  --danger: #c2344a;
  --field: #151b23;
  --subtle: #232b36;
  --soft: #1e2530;
  --chip: #2a323d;
  --dash: #3a4452;
  --faint: #5c6675;
  --brand-ink: #f1f5f9;
  --nav-bg: #0f1a22;
  --accent-line: #36617a;
  --blue-line: #36506e;
  --red-line: #6e2a36;
  --late: #f4a35c;
  --pink: #f29cc4;
  --pink-bg: #3b1d2c;
  --orange: #f4a184;
  --orange-bg: #3a2119;
  --indigo: #a9adf2;
  --indigo-bg: #23254a;
  --brown: #d9b98a;
  --brown-bg: #33291c;
  --sky: #86c8ea;
  --sky-bg: #15303f;
  --chrome-top: #1d5057;
  --chrome-mid: #173a44;
  --chrome-bar: linear-gradient(100deg, #1d5057 0%, #1f5b60 55%, #226266 100%);
  --wash: #132a2d;
}
/* Each screen's colour (SCREEN_TONES in core/look.js): app.js sets data-area, and page headers, tabs and empty lists follow it. */
:root[data-area="blue"] { --area: var(--blue); --area-bg: var(--blue-bg); }
:root[data-area="green"] { --area: var(--green); --area-bg: var(--green-bg); }
:root[data-area="peach"] { --area: var(--peach); --area-bg: var(--peach-bg); }
:root[data-area="purple"] { --area: var(--purple); --area-bg: var(--purple-bg); }
:root[data-area="yellow"] { --area: var(--yellow); --area-bg: var(--yellow-bg); }
:root[data-area="pink"] { --area: var(--pink); --area-bg: var(--pink-bg); }
:root[data-area="teal"] { --area: var(--teal); --area-bg: var(--teal-bg); }
:root[data-area="gray"] { --area: var(--muted); --area-bg: var(--chip); }
:root[data-area="orange"] { --area: var(--orange); --area-bg: var(--orange-bg); }
:root[data-area="indigo"] { --area: var(--indigo); --area-bg: var(--indigo-bg); }
:root[data-area="brown"] { --area: var(--brown); --area-bg: var(--brown-bg); }
:root[data-area="sky"] { --area: var(--sky); --area-bg: var(--sky-bg); }
:root[data-theme="dark"] :is(.login-brand img, .brand-mark) { background: #fff; border-radius: 50%; padding: 2px; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9); }
:root[data-theme="dark"] .leaflet-container { background: #1b222b; }
:root[data-theme="dark"] .leaflet-bar a, :root[data-theme="dark"] .leaflet-control-attribution { background: var(--card); color: var(--muted); border-color: var(--line); }
:root[data-theme="dark"] .leaflet-control-attribution a { color: var(--blue); }
:root[data-theme="dark"] :is(.leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-tooltip) { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .leaflet-tooltip::before { border-top-color: var(--card); }
* { box-sizing: border-box; }
/* Each typed value picks its own direction, so Arabic and Urdu read right to left inside left-to-right screens. */
:where(input, textarea) { unicode-bidi: plaintext; }
/* Type comes from the Mantine theme (ui/theme.js), so plain pages and Mantine screens share one scale. */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--mantine-font-family, "Avenir Next", "Segoe UI", system-ui, sans-serif); font-size: var(--mantine-font-size-sm, 13px); line-height: var(--mantine-line-height-sm, 1.45); }
h1 { margin: 0; font-size: var(--mantine-h1-font-size, 20px); font-weight: 600; }
h2 { margin: 0 0 4px; font-size: var(--mantine-font-size-md, 14px); font-weight: 600; }
h3, strong, b { font-weight: 600; }
code { background: var(--purple-bg); color: var(--purple); border-radius: 4px; padding: 0 4px; }
/* Bare element rules skip Mantine screens (.gms-ui) and stay at zero specificity so class rules still win. */
:where(button:not(.gms-ui *)) { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 8px; padding: 6px 10px; background: var(--accent); color: white; cursor: pointer; font-weight: 600; white-space: nowrap; }
:where(button:not(.gms-ui *)):hover { filter: brightness(1.05); }
button.soft { background: var(--accent-soft); color: var(--accent); }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { color: var(--red); }
button.icon-only { padding: 5px; }
:where(button:not(.gms-ui *)):disabled { opacity: 0.45; cursor: not-allowed; }
.icon { width: 15px; height: 15px; flex: none; }
:where(:is(input, select, textarea):not(.gms-ui *)) { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--field); color: var(--ink); }
:where(:is(input, select, textarea):not(.gms-ui *)):focus { outline: 2px solid var(--blue-bg); border-color: var(--blue); }
:where(textarea:not(.gms-ui *)) { min-height: 64px; resize: vertical; }
:where(label:not(.gms-ui *)) { display: grid; gap: 3px; font-weight: 500; margin-top: 8px; }
:where(fieldset:not(.gms-ui *)) { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 0; padding: 6px 8px; min-width: 0; }
:where(legend:not(.gms-ui *)) { font-weight: 500; padding: 0 4px; }
.hidden { display: none !important; }
.error { color: var(--red); min-height: 1em; margin: 6px 0 0; }
.late-banner { background: var(--danger, #a3283a); color: #fff; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.error:empty { display: none; }
.eyebrow { margin: 0; letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; font-weight: 600; color: var(--accent); }
.muted { color: var(--muted); margin: 3px 0 0; font-weight: 500; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; background: var(--chip); color: var(--muted); }
.badge .icon { width: 12px; height: 12px; }
.badge.big { font-size: 12px; padding: 4px 12px; }
.badge.GREEN { background: var(--green-bg); color: var(--green); }
.badge.YELLOW, .badge.soft-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge.RED { background: var(--red-bg); color: var(--red); }
.badge.OPEN, .badge.IN_PROGRESS, .badge.soft-blue, .badge.notification { background: var(--blue-bg); color: var(--blue); }
.badge.soft-purple, .badge.milestone { background: var(--purple-bg); color: var(--purple); }
.badge.wait { background: var(--green-bg); color: var(--green); }
.badge.escalation { background: var(--peach-bg); color: var(--peach); }

.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(150deg, var(--chrome-top) 0%, var(--chrome-mid) 45%, var(--nav-bg) 100%); }
.login form { width: min(340px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 4px; box-shadow: 0 12px 40px rgb(40 83 107 / 0.12); }
.login h1 { font-size: 24px; margin-bottom: 4px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.login-brand div { display: grid; line-height: 1.2; }
.login-brand strong { font-size: 20px; color: var(--brand-ink); }
.login-brand span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.login button { justify-content: center; margin-top: 12px; padding: 8px; }
.login form.apply { width: min(440px, 92vw); }
.login .check-row { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; }
.login .check-row input { width: auto; margin-top: 2px; }
.login a { color: var(--accent); }
.apply-done { width: min(440px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.apply-trap { position: absolute; left: -10000px; height: 0; overflow: hidden; }

#app { display: grid; grid-template-columns: 188px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns 0.15s; }
#app.collapsed { grid-template-columns: 54px minmax(0, 1fr); }
#nav { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--chrome-top) 0%, var(--chrome-mid) 42%, var(--nav-bg) 100%); color: white; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; }
#nav .brand { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 10px; min-height: 28px; }
#nav .brand button { background: transparent; color: white; }
#nav .brand-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* The logo's black G needs a light backing on the dark panel. */
#nav .brand-logo { flex: none; background: white; border-radius: 50%; padding: 2px; }
#app.collapsed #nav .brand-name { display: none; }
#nav .nav { justify-content: flex-start; background: transparent; color: #dce7ee; padding: 8px 10px; }
#nav a.nav { display: flex; align-items: center; gap: 6px; width: 100%; text-decoration: none; box-sizing: border-box; }
#nav a.nav .icon { width: 17px; height: 17px; color: #dce7ee; }
#nav .nav:hover { background: rgb(255 255 255 / 0.08); }
#nav .nav.active { background: var(--t-bg, #e4eefb); color: var(--t-fg, #1f3d4e); }
/* Screen buttons carry their screen's tone class; the menu is dark in both themes, so icons are lifted to a light shade of it. */
#nav .nav[data-view] .icon { width: 17px; height: 17px; color: color-mix(in srgb, var(--t-fg, #dce7ee) 45%, white); color: oklch(from var(--t-fg, #dce7ee) 0.82 calc(c * 1.15) h); }
#nav .nav.active .icon { color: inherit; }
#nav .nav-end { margin-top: auto; }
#nav .nav-demo:not(.hidden) + .nav-end { margin-top: 0; }
#nav .nav-demo { color: #ffc27a; }
#app.collapsed .label { display: none; }
#app.collapsed #nav .nav { justify-content: center; padding: 8px 0; }
#app.collapsed #nav .brand { justify-content: center; }
#main { padding: 14px 18px 32px; min-width: 0; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.toolbar.page-band { padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--area-bg) 55%, var(--card)); border: 1px solid color-mix(in srgb, var(--area) 14%, var(--line)); }
.page-band .eyebrow { color: var(--area); }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.card { display: grid; gap: 8px; align-content: start; }
.card-head { display: flex; align-items: center; gap: 6px; }
.card-head h2 { margin: 0; flex: 1; }
.card-head .icon { color: var(--accent); width: 17px; height: 17px; }
.title-input { font-size: 16px; font-weight: 600; border-color: transparent; background: transparent; width: 280px; }
.title-input:hover { border-color: var(--line); }
:where(table:not(.gms-ui *)) { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
:where(th:not(.gms-ui *)) { background: var(--subtle); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
:where(:is(th, td):not(.gms-ui *)) { text-align: left; border-bottom: 1px solid var(--line); padding: 7px 10px; vertical-align: middle; }
:where(tbody tr:not(.gms-ui *)):hover { background: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.item-groups-note { margin: 8px 0 4px; font-size: 12px; }
.only-if { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }

.std { display: grid; gap: 12px; }
.std-intro h2 { margin: 2px 0 6px; }
.std-subtypes { display: grid; gap: 10px; }
.std-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.std-order { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft, #eef2f7); font-weight: 700; font-size: 13px; }
.std-name { font-weight: 600; font-size: 15px; max-width: 280px; }
.std-up .icon { transform: rotate(180deg); }
.std-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
.std-grid fieldset { margin: 0; min-width: 0; }
.std-rule, .std-mode-note { font-size: 12px; margin: 6px 0 0; }
.std-flow { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 6px; margin-bottom: 6px; }
.std-modes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.std-modes label { display: inline-flex; align-items: center; gap: 4px; }
.std-test { display: grid; gap: 4px; font-size: 13px; }
.std-test[hidden], .std .only-if [hidden] { display: none; }
.std-save { margin-top: 10px; }
.std-day { display: flex; align-items: center; gap: 6px; }
.std-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.log-table td small { display: block; color: var(--muted, #6b7280); font-size: 12px; }
@media (max-width: 1000px) { .std-grid { grid-template-columns: 1fr; } }
.tl-steps { display: flex; gap: 3px; margin-top: 4px; }
.tl-steps i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.tl-steps i.tone-green { background: var(--green); }
.tl-steps i.tone-yellow { background: var(--yellow); }
.tl-steps i.tone-red { background: var(--red); }
.tl-steps i.tone-blue { background: var(--blue); }

.builder { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(240px, 290px); gap: 10px; align-items: start; }
.builder > .panel { min-width: 0; }
.builder > .panel:last-child { position: sticky; top: 68px; max-height: calc(100vh - 80px); overflow: auto; }
:is(.palette-card, .box).notification { --t-bg: var(--blue-bg); --t-fg: var(--blue); }
:is(.palette-card, .box).wait { --t-bg: var(--green-bg); --t-fg: var(--green); }
:is(.palette-card, .box).decision { --t-bg: var(--teal-bg); --t-fg: var(--teal); }
:is(.palette-card, .box).milestone { --t-bg: var(--purple-bg); --t-fg: var(--purple); }
:is(.palette-card, .box).escalation { --t-bg: var(--peach-bg); --t-fg: var(--peach); }
.palette-card { display: flex; gap: 9px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--t-fg, var(--line)) 20%, var(--line)); border-radius: 12px; background: var(--field); padding: 8px; margin-top: 6px; cursor: grab; }
.palette-card:hover { background: color-mix(in srgb, var(--t-bg, var(--soft)) 45%, var(--field)); box-shadow: 0 2px 10px rgb(0 0 0 / 0.06); }
.palette-card > .icon { flex: none; width: 17px; height: 17px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--t-bg); color: var(--t-fg); }
.canvas { list-style: none; margin: 0; padding: 6px; min-height: 260px; border: 1px dashed var(--dash); border-radius: 10px; background: var(--soft); }
.canvas.over { background: var(--blue-bg); border-color: var(--blue); }
.canvas .empty { color: var(--muted); text-align: center; padding: 60px 0; }
.box { display: grid; grid-template-columns: 20px 32px 1fr auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--field); padding: 8px; margin-bottom: 6px; cursor: pointer; }
.box:hover { border-color: var(--dash); }
.box.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.box strong { margin-right: 6px; }
.step-no { color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.box-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--t-bg, var(--chip)); color: var(--t-fg, var(--muted)); }
.box-icon .icon { width: 17px; height: 17px; }
.preview { margin-top: 10px; padding: 8px; border-radius: 8px; background: var(--blue-bg); }
.preview strong { display: block; }
.preview strong[hidden] { display: none; }
.preview p { margin: 2px 0 0; }

.player-top { margin-bottom: 10px; display: grid; gap: 6px; }
.drill-banner { margin-bottom: 10px; border-left: 4px solid var(--peach, #e8a87c); }
.drill-banner .eyebrow { margin-bottom: 4px; }
.clock-wrap { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.clock-wrap .icon { width: 26px; height: 26px; }
.clock { font-size: 36px; font-weight: 600; margin: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.sequence { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.delivery-log { margin-top: 14px; display: grid; gap: 8px; }
.log-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.log-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 16px; }
.log-head h2 .icon { width: 18px; height: 18px; color: var(--accent); }
.log-head p { margin: 2px 0 0; max-width: 62ch; }
.log-head input[type="search"] { min-width: 200px; }
.log-summary { margin: 0; font-weight: 600; }
.log-scroll { overflow-x: auto; }
.log-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.log-table th { text-align: left; font-weight: 600; color: var(--muted); background: var(--subtle); padding: 6px 10px; white-space: nowrap; }
.log-table td { padding: 6px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.log-table td small { display: block; color: var(--muted); margin-top: 2px; }
.log-table .log-message { max-width: 42ch; white-space: normal; color: var(--ink); opacity: .8; }
.log-table time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-trail summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.step { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--dash); border-radius: 10px; padding: 9px 12px; }
.step.GREEN { border-left-color: #7cc9a0; }
.step.YELLOW { border-left-color: #f1c35a; }
.step.RED { border-left-color: #ec8a99; background: color-mix(in srgb, var(--red-bg) 35%, var(--card)); }
.step.OPEN { border-left-color: #8fb4df; background: color-mix(in srgb, var(--blue-bg) 25%, var(--card)); }
.when { display: grid; gap: 4px; justify-items: start; font-variant-numeric: tabular-nums; }
.step h2 { margin: 0; }
.step-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.line { margin: 4px 0 0; padding: 4px 8px; border-radius: 6px; background: var(--subtle); color: var(--muted); }
.line.RED { background: var(--red-bg); color: var(--red); }

.act-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(135deg, var(--blue-bg), var(--purple-bg) 55%, var(--peach-bg)); font-size: 15px; }
.act-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 8px; box-shadow: 0 12px 40px rgb(40 83 107 / 0.12); }
.act-card h1 { font-size: 22px; }
.act-card .big { justify-content: center; padding: 14px; font-size: 17px; border-radius: 12px; margin-top: 8px; }

.badge.decision { background: var(--teal-bg); color: var(--teal); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.choices button { justify-content: center; }
button.alt { background: var(--peach-bg); color: var(--peach); }
.step-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.responders { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.responders .badge { font-weight: 600; }
.responder-count { font-size: 11px; color: var(--muted); margin-right: 2px; }
.choice-made { font-weight: 600; color: var(--teal); }
.option-list { display: grid; gap: 4px; }
.option-row { display: flex; gap: 4px; }

.member-page { background: linear-gradient(160deg, var(--blue-bg), var(--purple-bg) 55%, var(--peach-bg)); min-height: 100vh; font-size: 15px; touch-action: pan-x pan-y; overscroll-behavior: none; }
.member-login { display: grid; place-items: center; padding: 6vh 0 16px; }
.member-card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 8px; box-shadow: 0 12px 40px rgb(40 83 107 / 0.14); }
.member-card h1 { margin: 6px 0 0; font-size: 24px; }
.brand-mark { display: block; flex: none; object-fit: contain; }
.app-brand { display: flex; align-items: center; gap: 10px; }
.app-brand strong { font-size: 18px; color: var(--brand-ink); }
.member-card .big, .action-card .big { justify-content: center; padding: 13px; font-size: 16px; border-radius: 12px; }
.member-top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); overflow: hidden; }
.member-top.typed { background: linear-gradient(115deg, var(--band) 0%, var(--band) 42%, var(--band-deep) 100%); color: #2e3a4b; border-bottom-color: color-mix(in srgb, var(--band-mark) 28%, transparent); }
.member-top.typed .muted { color: #455468; }
.member-top.typed .bell { background: color-mix(in srgb, var(--band-mark) 14%, #fff); color: var(--band-mark); }
.member-top.typed .bell-count { border-color: var(--band); }
.member-mark { position: absolute; z-index: 0; right: 22%; top: -22px; color: var(--band-mark, transparent); opacity: 0.16; transform: rotate(-12deg); pointer-events: none; }
.member-mark .icon { width: 92px; height: 92px; }
.member-top > :not(.member-mark) { position: relative; z-index: 1; }
.member-top strong { font-size: 17px; }
.bell { position: relative; background: var(--accent-soft); color: var(--accent); border-radius: 50%; width: 44px; height: 44px; justify-content: center; padding: 0; }
.bell .icon { width: 22px; height: 22px; }
.bell.ringing .icon { animation: ring 1.6s ease-in-out infinite; transform-origin: 50% 10%; }
.bell-count { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--danger); color: white; font-size: 11px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--card); }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
.member-main { width: min(560px, 100%); min-width: 0; margin: 0 auto; padding: 12px 14px 40px; display: grid; gap: 14px; }
.member-main h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 6px 2px 8px; }
.member-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: 0 10px 30px rgb(40 83 107 / 0.12); }
.member-panel-head { display: flex; justify-content: space-between; align-items: center; }
.member-panel-head h2 { margin: 0; }
.note-item { display: flex; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); }
.note-item p { margin: 3px 0; }
.note-item.unread { background: var(--blue-bg); border-radius: 10px; padding: 10px 8px; }
.note-item.escalation .note-icon { color: var(--peach); }
.note-item.request .note-icon { color: var(--teal); }
.note-item.linked, .note-item.needs-decision { cursor: pointer; }
.note-item.needs-decision { background: color-mix(in srgb, var(--peach) 18%, var(--card)); border: 1px solid var(--peach); border-radius: 10px; margin: 6px 0; }
.note-item.needs-decision .note-icon { color: var(--peach); }
.note-cta { display: inline-block; margin-top: 4px; color: var(--peach); font-size: 12px; font-weight: 700; }
#needs-answer.needs-attention { margin: 0 0 18px; padding: 12px 12px 4px; border-radius: 18px; background: color-mix(in srgb, var(--peach) 14%, var(--card)); border: 2px solid var(--peach); box-shadow: 0 0 0 4px color-mix(in srgb, var(--peach) 22%, transparent); }
#needs-answer.needs-attention h2 { color: var(--peach); }
.action-card.attention { outline: 3px solid var(--peach); outline-offset: 2px; }
.emulator-expired { margin: 40px 20px; color: var(--muted); text-align: center; }
.note-icon { color: var(--blue); padding-top: 2px; }
.note-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.action-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px; display: grid; gap: 8px; box-shadow: 0 6px 20px rgb(40 83 107 / 0.08); }
.action-card p { margin: 0; }
.action-message:empty { display: none; }
.empty { padding: 10px 2px; }
.small { font-size: 11px; }
#nav .nav-scroll { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
#nav .nav-group { display: flex; flex-direction: column; gap: 2px; }
#nav .nav-head { justify-content: flex-start; width: 100%; margin: 8px 0 0; padding: 8px 10px; background: transparent; color: #9fb6c4; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
#nav .nav-head:hover { background: rgb(255 255 255 / 0.08); }
#nav .nav-head .icon { width: 17px; height: 17px; color: #9fb6c4; }
#nav .nav-chevron { margin-left: auto; display: inline-flex; }
#nav .nav-chevron .icon { width: 14px; height: 14px; }
#nav .nav-group.open .nav-chevron { transform: rotate(180deg); }
#nav .nav-group:not(.open) .nav-items { display: none; }
#nav .nav-items { display: flex; flex-direction: column; gap: 2px; }
#nav .nav-items .nav { padding-left: 28px; }
#app.collapsed #nav .nav-head { justify-content: center; padding: 8px 0; }
#app.collapsed #nav .nav-chevron { display: none; }
#app.collapsed #nav .nav-items .nav { padding-left: 0; }

.tabs { display: grid; gap: 10px; min-width: 0; max-width: 100%; }
.tab-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-width: 0; max-width: 100%; }
.tab-panel { min-width: 0; max-width: 100%; }
.tab { flex: none; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 9px; }
.tab:hover { background: var(--subtle); filter: none; }
.tab[aria-selected="true"] { background: var(--area-bg); color: var(--area); }
.tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.placeholder { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 48px 16px; background: var(--card); border: 1px dashed var(--dash); border-radius: 12px; color: var(--area); }
.placeholder .icon { width: 40px; height: 40px; padding: 14px; box-sizing: content-box; border-radius: 50%; background: var(--area-bg); }
.placeholder h2 { margin: 4px 0 0; font-size: 16px; color: var(--ink); }
.placeholder p { max-width: 420px; }

.member-tools { display: flex; gap: 8px; align-items: center; min-width: 44px; justify-content: flex-end; }
.member-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-back { position: fixed; inset: 0; z-index: 20; background: rgb(31 39 51 / 0.35); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.drawer { position: fixed; z-index: 21; inset: 0 auto 0 0; width: min(300px, 84vw); display: flex; flex-direction: column; gap: 2px; padding: 14px; padding-top: max(14px, env(safe-area-inset-top)); overflow-y: auto; background: var(--card); box-shadow: 8px 0 30px rgb(31 39 51 / 0.18); transform: translateX(-100%); visibility: hidden; transition: transform 0.22s ease, visibility 0s 0.22s; }
.menu-open { overflow: hidden; }
.menu-open .drawer { transform: none; visibility: visible; transition: transform 0.22s ease; }
.menu-open #drawer-back { opacity: 1; pointer-events: auto; }
.bell-drawer {
  position: fixed; z-index: 21; inset: 0 0 0 auto; width: min(360px, 88vw);
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px; padding-top: max(14px, env(safe-area-inset-top));
  overflow-y: auto; background: var(--card);
  box-shadow: -8px 0 30px rgb(31 39 51 / 0.18);
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.28s ease, visibility 0s 0.28s;
}
.bell-drawer-list { display: grid; gap: 2px; padding: 8px 2px 24px; }
.bell-open { overflow: hidden; }
.bell-open .bell-drawer { transform: none; visibility: visible; transition: transform 0.28s ease; }
.bell-open #bell-back { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.drawer-head strong { flex: 1; font-size: 16px; }
.drawer-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--accent-soft); }
.drawer-user .muted { margin: 0; }
.drawer-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 600; text-transform: uppercase; }
.drawer-label { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.drawer-links { display: grid; gap: 2px; }
.drawer-link { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; padding: 11px 10px; border-radius: 10px; background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.drawer-link:hover { background: var(--subtle); filter: none; }
.drawer-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.drawer-link .icon { width: 20px; height: 20px; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 4px; padding: 4px; border-radius: 12px; background: var(--subtle); }
.theme-pick button { justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.theme-pick button[aria-checked="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgb(0 0 0 / 0.12); }
.theme-pick .icon { width: 16px; height: 16px; }
.info-page { display: grid; gap: 14px; }
.info-page > h1, .greeting h1 { font-size: 22px; margin: 8px 2px 0; }
.info-page > h1.page-title { display: flex; align-items: center; gap: 12px; }
.page-title .widget-icon { width: 40px; height: 40px; border-radius: 12px; }
.page-title .widget-icon .icon { width: 21px; height: 21px; }
.greeting p { margin: 2px 2px 0; }
.hero { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 32px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgb(40 83 107 / 0.12); }
.hero h1 { margin: 6px 0 0; font-size: 26px; }
.hero p { margin: 0; max-width: 380px; }
.cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 20px; border-radius: 12px; background: var(--accent); color: white; font-size: 16px; font-weight: 600; text-decoration: none; }
.cta .icon { width: 18px; height: 18px; }
.widgets { display: grid; gap: 10px; }
.widget { display: flex; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgb(40 83 107 / 0.08); }
.widget > div { flex: 1; min-width: 0; }
.widget p { margin: 3px 0 0; }
.widget-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--t-bg, var(--accent-soft)); color: var(--t-fg, var(--accent)); }
.widget-icon .icon { width: 23px; height: 23px; }
/* Home-screen cards carry a tone class (ICON_TONES in member.js): the icon tile and a hint of the border take its colour. */
.widget[class*="tone-"] { border-color: color-mix(in srgb, var(--t-fg) 16%, var(--line)); }
.drawer-link[class*="tone-"] .icon { color: var(--t-fg); }
.weather-card > div { display: grid; gap: 10px; }
.weather-now { display: flex; align-items: center; gap: 12px; }
.weather-big { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--t-bg, var(--accent-soft)); color: var(--t-fg, var(--accent)); }
.weather-big .icon { width: 30px; height: 30px; }
.weather-temp { font-size: 38px; font-weight: 700; line-height: 1; }
.weather-what { display: grid; gap: 1px; min-width: 0; }
.weather-what .icon { width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; }
.weather-hours { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0; padding: 8px 0 0; list-style: none; border-top: 1px solid var(--line); }
.weather-hours li { display: grid; justify-items: center; gap: 3px; }
.weather-hours .icon { width: 20px; height: 20px; color: var(--accent); }
.weather-rain { font-size: 10px; color: var(--blue); }
.weather-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; color: var(--muted); }
.weather-facts > span { display: inline-flex; align-items: center; gap: 4px; }
.weather-facts .icon { width: 14px; height: 14px; }
.widget .weather-advice { display: flex; gap: 6px; align-items: flex-start; margin: 0; padding: 7px 9px; border-radius: 10px; background: var(--yellow-bg); color: var(--yellow); }
.weather-advice .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.push-banner { width: min(560px, calc(100% - 28px)); margin: 12px auto 0; background: var(--yellow-bg); color: var(--yellow); border-radius: 14px; padding: 12px 14px; }
.push-banner p { margin: 4px 0 0; font-size: 13px; }
.push-banner button { margin-top: 8px; }
.geo-banner { background: var(--accent-soft); color: var(--accent); }
.geo-line { display: flex; align-items: center; gap: 5px; margin: 4px 2px 0; color: var(--muted); }
.geo-line.on { color: var(--green); }
.geo-line svg { width: 14px; height: 14px; flex: none; }
.drawer-user .geo-line { margin: 2px 0 0; }
.member-names { font-size: 12px; color: var(--muted); margin: 6px 0 10px; line-height: 1.4; }
.mode-pick { margin: 0; min-width: 180px; }
.stop-chip { margin: 0; font-size: 12px; white-space: nowrap; align-items: center; }
.step.SKIPPED { opacity: 0.55; }
.step.WAITING { opacity: 0.8; }
.badge.SKIPPED, .badge.WAITING { background: var(--chip); color: var(--muted); }

/* Pastel tones. Any element with a tone class gets --t-bg and --t-fg. */
.tone-blue { --t-bg: var(--blue-bg); --t-fg: var(--blue); }
.tone-green { --t-bg: var(--green-bg); --t-fg: var(--green); }
.tone-peach { --t-bg: var(--peach-bg); --t-fg: var(--peach); }
.tone-purple { --t-bg: var(--purple-bg); --t-fg: var(--purple); }
.tone-yellow { --t-bg: var(--yellow-bg); --t-fg: var(--yellow); }
.tone-pink { --t-bg: var(--pink-bg); --t-fg: var(--pink); }
.tone-teal { --t-bg: var(--teal-bg); --t-fg: var(--teal); }
.tone-gray { --t-bg: var(--chip); --t-fg: var(--muted); }
/* Extra tones for person types and screen colours (see core/person-types.js, core/look.js); not offered in colour pickers. */
.tone-orange { --t-bg: var(--orange-bg); --t-fg: var(--orange); }
.tone-indigo { --t-bg: var(--indigo-bg); --t-fg: var(--indigo); }
.tone-red { --t-bg: var(--red-bg); --t-fg: var(--red); }
.tone-brown { --t-bg: var(--brown-bg); --t-fg: var(--brown); }
.tone-sky { --t-bg: var(--sky-bg); --t-fg: var(--sky); }
.tone-harbor { --t-bg: var(--accent-soft); --t-fg: var(--accent); }
.pb.type-badge { white-space: nowrap; }
.gms-tone-icon { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--t-bg); color: var(--t-fg); }

/* Pastel badges. Shapes: pill (status), square (type), circle (icon), tag (sport), hex (stage). */
.pb { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 11px; font-weight: 600; line-height: 1.5; background: var(--t-bg, var(--chip)); color: var(--t-fg, var(--muted)); white-space: nowrap; vertical-align: middle; }
.pb .icon, .card-head .pb .icon { width: 12px; height: 12px; color: inherit; }
.pb.pill { border-radius: 999px; }
.pb.square { border-radius: 5px; }
.pb.circle { border-radius: 999px; padding: 2px 9px 2px 2px; }
.pb.circle .icon { box-sizing: content-box; width: 11px; height: 11px; padding: 3px; border-radius: 50%; background: color-mix(in srgb, var(--card) 75%, transparent); }
.pb.circle:not(:has(span)) { padding: 2px; }
.pb.tag { border-radius: 0 5px 5px 0; padding-left: 12px; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); }
.pb.hex { padding: 2px 12px; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); }
.pb.square:not(:has(span)), .pb.hex:not(:has(span)) { padding: 5px; }
.pb.hex:not(:has(span)) { padding: 5px 9px; }
.pb + .pb { margin-left: 3px; }
.card-head .pb.circle:not(:has(span)) { flex: none; width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 12px; }
.card-head .pb.circle:not(:has(span)) .icon { width: 18px; height: 18px; padding: 0; background: none; }

.avatar { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--t-bg, var(--chip)); color: var(--t-fg, var(--muted)); font-size: 10px; font-weight: 700; object-fit: cover; border: 1px solid rgb(0 0 0 / 0.05); }
.avatar.small { width: 22px; height: 22px; font-size: 9px; }
.avatar.big { width: 42px; height: 42px; font-size: 13px; }
.avatar.flag { background: var(--subtle); font-size: 16px; }
.avatar.flag.small { font-size: 13px; }
.avatar.big.flag { font-size: 24px; }
.avatar .icon { width: 18px; height: 18px; }

.page-head { margin-bottom: 12px; }
.intro { margin: -4px 0 10px; max-width: 780px; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.stack, .when-cell { display: grid; gap: 1px; min-width: 0; }
.stack .muted, .when-cell .muted { margin: 0; font-size: 11px; }
.stack .row { gap: 4px; }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.volunteer-who { display: grid; gap: 2px; min-width: 0; }
.person-contact { overflow-wrap: anywhere; }
.volunteer-status, .volunteer-duty { max-width: 240px; }
.team-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.team-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* Click-through: anything with data-open opens the side panel (core/explore.js). */
a.open-link { color: inherit; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; cursor: pointer; }
a.open-link:hover { color: var(--accent); text-decoration-style: solid; text-decoration-color: currentColor; }
a.open-wrap, a.open-chip { color: inherit; text-decoration: none; cursor: pointer; border-radius: 999px; }
a.open-wrap:hover .pb, a.open-chip:hover span { filter: brightness(0.96); text-decoration: underline; text-underline-offset: 3px; }
a.open-link:focus-visible, a.open-wrap:focus-visible, a.open-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cal-lane-head[data-open] { cursor: pointer; }
.cal-lane-head[data-open]:hover span:not(.cal-lane-count) { text-decoration: underline; text-underline-offset: 3px; }

.gms-trail { font-size: 12px; }
.gms-trail a, .gms-trail span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-body { display: grid; gap: 18px; }
.detail-facts { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.detail-section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.detail-count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; text-align: center; letter-spacing: 0; }
.detail-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.detail-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; }
.detail-list li + li { border-top: 1px solid var(--line); }
.detail-main { display: block; min-width: 0; }
.detail-main > .muted.small { display: block; margin-top: 2px; }
.detail-main .avatar { vertical-align: middle; }
.detail-side { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: none; max-width: 45%; }
.detail-when { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.detail-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; }
.detail-tags:empty { display: none; }
.detail-group { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; }
.detail-group:first-child { margin-top: 0; }
.detail-person { display: flex; align-items: center; gap: 8px; }
.detail-warn { margin: 0; padding: 10px 12px 10px 28px; border-radius: 10px; background: var(--red-bg); color: var(--red); }
.detail-icon.pb.circle { width: 44px; height: 44px; }
.detail-icon.pb.circle .icon { width: 22px; height: 22px; }
.person-map { position: relative; height: 168px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #e7eef2; }
.person-map-tiles { position: absolute; width: 768px; height: 768px; }
.person-map-tiles img { position: absolute; width: 256px; height: 256px; }
.person-map-pin { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -16px 0 0 -8px; border-radius: 50% 50% 50% 0; background: #d9480f; transform: rotate(-45deg); box-shadow: 0 1px 3px rgb(31 39 51 / 0.35); }
.person-map-pin::after { content: ""; position: absolute; left: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: white; }
.person-map-note { margin: 6px 0 0; }
.person-map-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 0; }
.person-map-links a { font-size: 13px; font-weight: 600; }

/* Product tour (core/tour.js): the spot's huge shadow dims everything around the lit-up element. */
.tour-layer { position: fixed; inset: 0; z-index: 1000; animation: tour-in 0.18s ease-out; }
.tour-layer.leaving { opacity: 0; transition: opacity 0.18s; }
.tour-block { position: absolute; inset: 0; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(22, 30, 44, 0.58), 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 24px 6px rgba(255, 255, 255, 0.35); pointer-events: none; transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease; }
.tour-card { position: fixed; top: 0; left: 0; width: min(340px, calc(100vw - 24px)); padding: 14px 16px 12px; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28); opacity: 0; transition: opacity 0.2s, transform 0.3s ease; }
.tour-card.shown { opacity: 1; }
.tour-card [hidden] { display: none; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-count { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
button.tour-skip { padding: 2px 4px; background: none; color: var(--muted); font-weight: 500; }
button.tour-skip:hover { color: var(--ink); text-decoration: underline; }
.tour-title { margin: 6px 0 4px; font-size: 15px; }
.tour-text p { margin: 0 0 6px; color: var(--ink); line-height: 1.5; }
.tour-text ul { margin: 0 0 6px; padding-left: 18px; }
.tour-text p.tour-types { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 4px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.tour-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { width: 16px; border-radius: 3px; background: var(--accent); }
.tour-buttons { display: flex; gap: 6px; }
@keyframes tour-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } .tour-layer { animation: none; } }
.route { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.route .arrow { color: var(--muted); font-weight: 600; }
.flight-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.flight-status .muted.small { flex-basis: 100%; }
.flight-late { color: var(--late); font-size: 12px; font-weight: 600; }
.flight-time { display: inline-grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px; }
.flight-time > .muted:last-child { grid-column: 1 / -1; }
.flight-time s { text-decoration-thickness: 1px; }
.flight-next { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.flight-next > .stack:last-child { flex-basis: 100%; }
.message-body { margin: 0; white-space: pre-wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
td .member-names { margin: 0; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 32px 16px; text-align: center; color: var(--muted); }
.empty-state .icon { width: 28px; height: 28px; color: var(--accent); }

.swatch { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--t-bg); border: 1px solid var(--t-fg); cursor: pointer; }
.swatch.on { outline: 2px solid var(--t-fg); outline-offset: 2px; }

.sub-tabs > .tab-bar { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; gap: 2px; }
.sub-tabs > .tab-bar .tab { border-radius: 0; padding: 7px 12px; }
.sub-tabs > .tab-bar .tab:hover { background: transparent; color: var(--ink); }
.sub-tabs > .tab-bar .tab[aria-selected="true"] { background: transparent; color: var(--accent); box-shadow: inset 0 -2px var(--accent); }

.team-summary { display: grid; gap: 6px; margin: 10px 0 12px; }
.attention-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; }
.attention-item:hover { background: var(--soft); }
.attention-item > .gms-icon:last-child { opacity: 0.45; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.info-card { display: grid; align-content: start; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.info-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.info-head h3 { flex: 1; margin: 0; font-size: 15px; }
.info-head button { padding: 4px 8px; font-size: 12px; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.info-row > span:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.summary-strip:empty { display: none; }
.summary-card { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.summary-card .muted { margin: 0; }
.meter { height: 6px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--purple); }
.summary-card .meter.over span { background: var(--red); }
.lodging-h { font-size: 16px; margin: 14px 0 8px; }
.lodging-num { font-size: 22px; }

.gms-kpi { width: 100%; text-align: left; transition: border-color 0.15s, transform 0.15s; background: color-mix(in srgb, var(--t-bg, var(--card)) 45%, var(--card)); border-color: color-mix(in srgb, var(--t-fg, var(--line)) 12%, var(--line)); }
.gms-kpi:hover { border-color: color-mix(in srgb, var(--t-fg, var(--blue)) 40%, var(--line)); transform: translateY(-2px); }
.gms-kpi .pb.circle { padding: 3px; border-radius: 14px; }
.gms-kpi .pb.circle .icon { width: 22px; height: 22px; padding: 8px; }

/* The calendar grid is drawn as HTML inside a Mantine panel, where the plain-page button rule does not reach. */
:where(.gms-ui) :where(.cal-event, .cal-col-head, .cal-date, .cal-more, .cal-block) { display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.cal-event { width: 100%; min-width: 0; justify-content: flex-start; gap: 4px; padding: 3px 6px; font-size: 11px; font-weight: 600; text-align: left; background: var(--t-bg); color: var(--t-fg); border-left: 3px solid var(--t-fg); border-radius: 6px; }
.cal-event .icon { width: 12px; height: 12px; }
.cal-event .cal-time { font-weight: 700; }
.cal-event .cal-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-event.off { opacity: 0.55; }
.cal-event.off .cal-title { text-decoration: line-through; }
.cal-venue { display: flex; align-items: center; gap: 3px; flex-basis: 100%; font-weight: 500; opacity: 0.85; }
.cal-legend { display: flex; gap: 14px; margin-left: auto; font-size: 11px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item::before { content: ""; width: 14px; height: 12px; border-radius: 3px; background: var(--blue-bg); border-left: 3px solid var(--blue); }
.legend-item.individual::before { border-left-style: dashed; background: repeating-linear-gradient(135deg, var(--blue-bg) 0 4px, var(--card) 4px 8px); }
.cal-event.individual, .cal-block.individual { border-left-style: dashed; background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--card) 45%, transparent) 6px 12px); }
.legend-plain { display: inline-flex; align-items: center; gap: 5px; }
.cal-gender { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; margin-right: 2px; border: 1px solid var(--t-fg); border-radius: 50%; background: var(--t-bg); color: var(--t-fg); font-size: 9px; font-weight: 800; line-height: 1; vertical-align: 1px; }
.cal-block strong .cal-gender { margin-right: 4px; }
.cal-clash { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; margin-right: 2px; border-radius: 50%; background: #d64545; color: #fff; font-size: 10px; font-weight: 800; line-height: 1; vertical-align: 1px; cursor: help; }
.cal-block strong .cal-clash { margin-right: 4px; }
.cal-stage { padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, var(--card) 70%, transparent); font-size: 10px; font-weight: 600; }
.cal-flags { display: inline-flex; gap: 2px; }
.cal-flags .avatar.small { width: 18px; height: 18px; font-size: 11px; }
.cal-col .cal-flags { flex-basis: 100%; }
.cal-more { align-self: flex-start; background: transparent; color: var(--accent); font-size: 11px; padding: 0 4px; }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-weekday { padding: 6px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--subtle); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell { display: flex; flex-direction: column; gap: 3px; min-height: 104px; min-width: 0; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell.outside { background: var(--soft); }
.cal-cell.outside .cal-date { color: var(--faint); }
.cal-date { align-self: flex-start; background: transparent; color: var(--ink); padding: 2px 7px; border-radius: 999px; font-weight: 600; }
.cal-date:hover { background: var(--subtle); filter: none; }
.cal-cell.today .cal-date { background: var(--accent); color: white; }
.cal-cell .cal-event { flex-wrap: wrap; row-gap: 0; white-space: normal; }
.cal-cell .cal-title { flex-basis: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; }

.cal-week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 6px; overflow-x: auto; }
.cal-col { display: flex; flex-direction: column; gap: 4px; min-height: 240px; padding: 6px; border-radius: 10px; background: var(--soft); }
.cal-col.today { background: var(--accent-soft); }
.cal-col .cal-event { flex-wrap: wrap; white-space: normal; }
.cal-col-head { justify-content: space-between; width: 100%; background: transparent; color: var(--muted); padding: 2px 4px 6px; }
.cal-col-head strong { color: var(--ink); font-size: 15px; }
.cal-col .muted { padding: 0 4px; }

.cal-day { position: relative; display: grid; grid-template-columns: 64px repeat(var(--venues), minmax(170px, 1fr)); box-sizing: content-box; padding-top: 30px; overflow-x: auto; background: linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 30px / 100% 56px repeat-y; }
.cal-hours { position: relative; }
.cal-hour { position: absolute; left: 0; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.cal-hour span { background: var(--card); padding-right: 6px; }
.cal-lane { position: relative; border-left: 1px solid var(--line); }
.cal-lane-head { position: absolute; top: -28px; left: 0; right: 0; display: flex; align-items: center; gap: 4px; padding: 0 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-lane-head .icon { color: var(--accent); flex: none; }
.cal-lane-head > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-lane-count { flex: none; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; text-align: center; }
.cal-now { position: absolute; left: 64px; right: 0; z-index: 2; height: 0; border-top: 2px solid var(--red); pointer-events: none; }
.cal-now span { position: absolute; left: -62px; top: -9px; padding: 1px 5px; border-radius: 6px; background: var(--danger); color: white; font-size: 10px; font-weight: 600; }
.cal-day-note { margin: 0 0 6px; }
.cal-spread { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.cal-block { position: absolute; left: 4px; width: calc(100% - 8px); display: grid; align-content: start; gap: 1px; padding: 4px 7px; overflow: hidden; text-align: left; white-space: normal; font-size: 11px; font-weight: 500; background: var(--t-bg); color: var(--t-fg); border-left: 3px solid var(--t-fg); border-radius: 8px; }
.cal-block strong { font-size: 12px; }
.legend-item.practice::before { background: var(--green-bg); border-left: 3px dotted var(--green); }
.cal-event.practice, .cal-block.practice { border-left-style: dotted; }

/* Practice slots: the desk board (Modules, Practice) and the player app's booking screen. */
.practice-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.practice-nav input[type="date"] { width: auto; }
.practice-legend { display: flex; gap: 6px; margin-left: auto; }
.practice-board { display: grid; gap: 10px; }
.practice-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.practice-slot, .practice-key { display: grid; gap: 1px; justify-items: start; padding: 6px 8px; border-radius: 8px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.practice-key { display: inline-block; padding: 1px 8px; font-size: 11px; cursor: default; }
.practice-slot .practice-time { font-weight: 700; }
.practice-slot .practice-who { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
:is(.practice-slot, .practice-key).free { border: 1px dashed var(--green); background: var(--green-bg); }
:is(.practice-slot, .practice-key).free .practice-who { color: var(--green); font-weight: 600; }
.practice-slot.booked { background: var(--t-bg); border-color: transparent; border-left: 3px solid var(--t-fg); }
.practice-slot.booked .practice-who { color: var(--t-fg); font-weight: 600; }
.practice-key.booked { background: var(--blue-bg); border-left: 3px solid var(--blue); }
:is(.practice-slot, .practice-key).blocked { background: repeating-linear-gradient(135deg, var(--chip) 0 6px, var(--card) 6px 12px); }
:is(.practice-slot, .practice-key).past { opacity: 0.5; }
.practice-slot.mine { background: var(--accent-soft); border: 1px solid var(--accent); }
.practice-slot.mine .practice-who { color: var(--accent); font-weight: 700; }
.practice-slot:disabled { cursor: default; }
.practice-slot:not(:disabled):hover { filter: brightness(0.97); box-shadow: 0 0 0 2px var(--accent-soft); }
.practice-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.practice-days button { flex: none; display: grid; justify-items: center; min-width: 54px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 12px; }
.practice-days button strong { font-size: 16px; }
.practice-days button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.practice-days button:disabled { opacity: 0.4; }
.practice-app, .practice-app > section { min-width: 0; }
.practice-app .practice-ground { margin-bottom: 10px; }
.practice-app .practice-slots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.practice-app .practice-slot { font-size: 13px; padding: 8px; }

.emu-intro { max-width: 880px; margin: 8px 0 16px; line-height: 1.5; }
.emu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.emu-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 48px 16px; border: 1px dashed var(--dash); border-radius: 14px; color: var(--muted); text-align: center; }
.emu-empty svg { width: 28px; height: 28px; }
.emu-card { display: flex; flex-direction: column; min-width: 0; height: 640px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.emu-head { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 6px; padding: 12px 12px 0; background: linear-gradient(115deg, var(--band, #eeeae4) 0%, var(--band, #eeeae4) 42%, var(--band-deep, #e0dbd3) 100%); color: #2e3a4b; }
.emu-mark { position: absolute; z-index: 0; right: 18%; top: -28px; color: var(--band-mark, #4a5568); opacity: 0.16; transform: rotate(-12deg); pointer-events: none; }
.emu-mark .icon { width: 108px; height: 108px; }
.emu-head > :not(.emu-mark) { position: relative; z-index: 1; }
.emu-who { display: grid; min-width: 0; }
.emu-who strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emu-who span { font-size: 12px; color: #455468; }
.emu-head .emu-icon { padding: 6px; border: 0; background: color-mix(in srgb, var(--band-mark, #4a5568) 14%, #fff); color: var(--band-mark, #4a5568); }
.emu-head .emu-icon:hover { background: color-mix(in srgb, var(--band-mark, #4a5568) 24%, #fff); }
.emu-tabs { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 8px; }
.emu-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px 8px 0 0; background: transparent; color: #455468; font: inherit; font-size: 13px; }
.emu-tabs button svg { width: 15px; height: 15px; }
.emu-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 600; }
.emu-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: grid; align-content: start; gap: 8px; }
.emu-body.app { display: flex; padding: 0; overflow: hidden; }
.emu-app { flex: 1; width: 100%; border: 0; }
.emu-note { padding: 24px 8px; text-align: center; }
.emu-note-bar { display: flex; justify-content: flex-end; }
.emu-note-bar button { display: inline-flex; padding: 6px; border: 0; border-radius: 8px; background: var(--subtle); color: var(--muted); }
.emu-note-bar button:hover { color: var(--danger); background: var(--subtle); }
.emu-note-bar svg { width: 16px; height: 16px; }
.emu-note-card { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.emu-note-card.unread { background: var(--blue-bg); border-color: var(--blue-line); }
.emu-note-card p { margin: 4px 0 8px; font-size: 13px; line-height: 1.45; }
.emu-note-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.emu-note-head .muted { flex: none; font-size: 12px; }
.emu-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.emu-actions button { padding: 6px 14px; font-size: 13px; }
.emu-error { margin: 6px 0 0; color: var(--danger); font-size: 12px; }
.emu-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; }
.type-swatches { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; }
.type-swatch { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--swatch), var(--swatch-deep)); box-shadow: inset 0 0 0 1px rgb(46 58 75 / 0.16); }

.next-list { display: grid; gap: 6px; }
.next-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; text-align: left; white-space: normal; font-weight: 400; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
.next-item:hover { background: var(--soft); filter: none; }
.next-row { display: contents; }
.next-date { display: grid; }
.next-date .muted { margin: 0; }

.duty { display: grid; gap: 10px; }
.duty-head { display: flex; gap: 12px; align-items: center; }
.duty-head p { margin: 2px 0 0; }
.duty-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--yellow-bg); color: var(--yellow); }
.certificate-card { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-align: center; }
.certificate-card p { margin: 8px 0 0; }
.certificate-frame { width: min(720px, 100%); height: min(78vh, 900px); min-height: 520px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.certificate-page { min-width: 0; max-width: 100%; }
.certificate-page .certificate-frame { display: block; width: 100%; max-width: calc(100vw - 28px); height: min(70vh, 720px); min-height: 0; }
.duty .big { justify-content: center; padding: 13px; font-size: 16px; border-radius: 12px; }
.duty-shift { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.duty-shift.now { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 40%, var(--card)); }
.duty-shift h3 { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 15px; }
.duty-now { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: white; font-size: 11px; }
.duty-zone { display: grid; gap: 4px; }
.duty-zone-name { display: flex; align-items: center; gap: 5px; margin: 0; font-weight: 600; color: var(--accent); }
.duty-zone ul, .duty-scans { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.duty-person, .duty-scans li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--soft); }
.duty-person.me { background: var(--accent-soft); }
.duty-person .grow, .duty-scans .grow { display: grid; flex: 1; min-width: 0; }
.duty-avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; object-fit: cover; background: var(--blue-bg); color: var(--blue); font-size: 12px; font-weight: 600; }
.duty-avatar.big { width: 64px; height: 64px; font-size: 20px; }
.duty-call { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.duty-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--blue); }
.duty-scans .tone-ok .duty-dot { background: var(--green); }
.duty-scans .tone-stop .duty-dot { background: var(--danger); }
.duty-scans .tone-none .duty-dot { background: var(--muted); }

.matches section { display: grid; gap: 6px; }
.matches-label { margin: 4px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.match-next { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--accent-line); border-radius: 12px; background: color-mix(in srgb, var(--accent-soft) 40%, var(--card)); }
.match-next.live { border-color: #e8a07a; background: color-mix(in srgb, var(--peach-bg) 45%, var(--card)); }
.match-next p { margin: 0; }
.match-when { font-size: 13px; font-weight: 600; color: var(--accent); }
.match-live { padding: 1px 8px; border-radius: 999px; background: var(--danger); color: white; font-size: 11px; }
.match-title { font-size: 17px; }
.match-vs { font-weight: 600; }
.match-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.match-chip { padding: 1px 8px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); font-size: 11px; font-weight: 600; white-space: nowrap; }
.match-venue { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.match-note { color: var(--yellow); }
.match-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.match-list li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; background: var(--soft); }
.match-list .grow { display: grid; flex: 1; min-width: 0; }
.match-date { display: grid; min-width: 58px; }
.match-outcome { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--line); color: var(--muted); font-size: 12px; font-weight: 800; }
.match-outcome.won { background: var(--green-bg); color: var(--green); }
.match-outcome.lost { background: var(--red-bg); color: var(--red); }
.match-outcome.draw { background: var(--yellow-bg); color: var(--yellow); }
.match-medal { justify-self: start; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: var(--yellow-bg); color: var(--yellow); font-size: 12px; font-weight: 600; }

.pin-notice { display: grid; gap: 6px; text-align: center; }
.pin-notice p { margin: 0; }
.pin-notice-digits { font-family: ui-monospace, Menlo, monospace; font-size: 38px; font-weight: 700; letter-spacing: 0.25em; color: var(--accent); padding: 8px 0; background: var(--accent-soft); border-radius: 12px; }
.pin-input { font-size: 22px; letter-spacing: 0.4em; text-align: center; padding: 10px 8px; }
button.link-button { justify-self: center; background: none; color: var(--accent); padding: 4px 8px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.forgot-done { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 6px 0; }
.forgot-done p { margin: 0; }
.success { color: var(--green); font-weight: 600; margin: 6px 0 0; }
button.small-button { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.pin-list li { align-items: center; }
.pin-photo { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.pin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.pin-given { background: var(--green-bg) !important; }
.pin-digits { font-family: ui-monospace, Menlo, monospace; font-size: 30px; letter-spacing: 0.25em; color: var(--green); margin: 2px 0; }

.scanner-open { overflow: hidden; }
.scanner { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 24px; padding-top: max(12px, env(safe-area-inset-top)); overflow-y: auto; background: var(--paper); }
.scanner > * { width: min(520px, 100%); margin: 0 auto; }
.scanner-top { display: flex; justify-content: space-between; align-items: center; }
.scanner-top strong { font-size: 18px; }
.scanner-zone { margin: 0; }
.scanner-direction { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scanner-direction > span { font-weight: 600; }
.scanner-toggle { display: flex; gap: 6px; }
.scanner-toggle button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); font-weight: 600; }
.scanner-toggle button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scanner-view { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: #1f2733; }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; inset: 18%; border: 3px solid rgb(255 255 255 / 0.9); border-radius: 18px; box-shadow: 0 0 0 999px rgb(31 39 51 / 0.35); }
.scanner-status { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; text-align: center; color: white; font-weight: 500; text-shadow: 0 1px 3px rgb(0 0 0 / 0.6); }
.scanner-manual { display: flex; gap: 8px; }
.scanner-manual input { flex: 1; font-size: 16px; padding: 10px 12px; }
.scanner-result:empty { display: none; }
.scan-card { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); }
.scan-card p { margin: 0; }
.scan-card .big { justify-content: center; padding: 13px; font-size: 16px; border-radius: 12px; }
.scan-verdict { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; }
.scan-verdict .icon { width: 24px; height: 24px; }
.scan-card.tone-ok { border-color: #1f8a4c; background: #e5f6ec; }
.scan-card.tone-ok .scan-verdict, .scan-card.tone-ok .scan-stamp { color: #146c3a; }
.scan-card.tone-stop { border-color: #c4364a; background: #fde8eb; }
.scan-card.tone-stop .scan-verdict, .scan-card.tone-stop .scan-stamp { color: #9d2436; }
.scan-card.tone-info .scan-verdict { color: var(--blue); }
.scan-stamp { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.scan-person { display: flex; gap: 12px; align-items: center; }
.scan-person .duty-avatar.big { width: 84px; height: 104px; border-radius: 12px; font-size: 22px; }
.scan-card.tone-warn { border-color: #e8b86a; background: var(--yellow-bg); }
.scan-card.tone-warn .scan-verdict { color: var(--yellow); }
.scan-needs { display: flex; flex-wrap: wrap; gap: 6px; }
.scan-needs span { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--chip); }
.scan-needs .allergy { background: var(--red-bg); color: var(--red); }
.scan-allow { display: grid; gap: 8px; }
.scan-allow input { font-size: 16px; padding: 10px 12px; }
.scan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.roster-chip { padding: 4px 6px; border-radius: var(--mantine-radius-md); background: var(--soft); }

.workspace { min-width: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--wash) 0, color-mix(in srgb, var(--wash) 45%, var(--paper)) 240px, var(--paper) 600px) fixed var(--paper); }
#topbar { position: sticky; top: 0; z-index: 10; padding: 8px 18px; background: var(--chrome-bar); color: #fff; box-shadow: 0 2px 12px rgb(20 70 80 / 0.18); }
.gms-user { padding: 3px 8px 3px 3px; border-radius: 999px; }
.gms-user:hover { background: rgb(255 255 255 / 0.14); }
#topbar .gms-top-btn { --button-color: #fff; --button-hover: rgb(255 255 255 / 0.14); --button-hover-color: #fff; }
#topbar .gms-top-btn[aria-expanded="true"] { --button-bg: rgb(255 255 255 / 0.2); }
#topbar .gms-top-search { --input-bg: rgb(255 255 255 / 0.16); --input-bd: rgb(255 255 255 / 0.28); --input-bd-focus: rgb(255 255 255 / 0.7); --input-color: #fff; --input-placeholder-color: rgb(255 255 255 / 0.72); --input-section-color: rgb(255 255 255 / 0.85); }
#topbar .gms-top-search input { color: #fff; }
#topbar .gms-top-search input:focus { background: rgb(255 255 255 / 0.24); }
#topbar .gms-top-search kbd { background: rgb(255 255 255 / 0.18); border-color: rgb(255 255 255 / 0.3); color: #fff; }
#topbar :is(.gms-top-date, .gms-top-name) { color: #fff; }
#topbar :is(.gms-top-role, .gms-weather-label) { color: rgb(255 255 255 / 0.75); }
#topbar .gms-top-bell { --ai-bg: rgb(255 255 255 / 0.16); --ai-hover: rgb(255 255 255 / 0.26); --ai-color: #fff; }
#topbar .gms-weather { color: #fff; border-color: rgb(255 255 255 / 0.3); background: rgb(255 255 255 / 0.1); }
#topbar .gms-weather:hover { background: rgb(255 255 255 / 0.2); }
#topbar .gms-weather .gms-icon { color: #ffe08a; }
#topbar .gms-user .mantine-Avatar-root { box-shadow: 0 0 0 2px rgb(255 255 255 / 0.7); }
.griev-row { display: block; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-align: left; }
.griev-row:hover { background: var(--soft); }
.griev-row.unseen { border-color: var(--red-line); background: color-mix(in srgb, var(--red-bg) 30%, var(--card)); }
.mantine-Popover-dropdown .griev-row { border-color: transparent; }
.griev-row.flash { animation: griev-flash 1.2s ease-in-out 4; }
@keyframes griev-flash { 50% { background: var(--red-bg); border-color: var(--red); } }
.griev-note { background: var(--blue-bg); border-color: transparent; }
.griev-new { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: white; font-size: 10px; vertical-align: 1px; }

.member-page :is(input, textarea, select) { font: inherit; font-size: 16px; padding: 10px 12px; }
.menu-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); border: 2px solid var(--card); }
.drawer-count { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--danger); color: white; font-size: 11px; font-weight: 600; }
.widget-link { color: var(--ink); text-decoration: none; }
.widget-link:hover { border-color: color-mix(in srgb, var(--t-fg, var(--blue)) 45%, var(--line)); }
.back-link { justify-self: start; }
.info-page > .big { justify-content: center; padding: 13px; font-size: 16px; border-radius: 12px; }
.member-main .placeholder h2 { margin: 4px 0 0; font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.placeholder .big { justify-content: center; margin-top: 8px; padding: 13px 18px; font-size: 16px; border-radius: 12px; }
.griev-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.griev-area { display: grid; justify-items: start; align-content: start; gap: 4px; padding: 14px; text-align: left; white-space: normal; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgb(40 83 107 / 0.08); }
.griev-area.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.griev-area strong { font-size: 15px; }
.griev-area .muted { font-weight: 400; }
.griev-area .widget-icon { margin-bottom: 4px; }
.griev-form { display: grid; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.griev-form .big { justify-content: center; margin-top: 10px; padding: 13px; font-size: 16px; border-radius: 12px; }
.griev-form > .ghost { justify-content: center; }
.athlete-register .theme-pick { margin: 0 0 12px; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.athlete-register .theme-pick button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgb(0 0 0 / 0.12); }
.athlete-sports { margin: 8px 0 0; padding: 0; border: 0; }
.athlete-sports legend { font-weight: 600; padding: 0; }
.athlete-sport-list { display: grid; gap: 6px; margin-top: 8px; }
.athlete-sport { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-weight: 500; }
.athlete-sport input { width: auto; }
.athlete-selfie { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border-radius: 14px; background: var(--soft); }
.athlete-selfie-actions .big { position: relative; overflow: hidden; }
.athlete-selfie-preview img { display: block; border-radius: 12px; object-fit: cover; background: var(--card); }
.griev-picked { display: flex; gap: 12px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.griev-picked .grow { display: grid; }
.griev-list { display: grid; gap: 10px; }
.griev-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.griev-item.unread { border-color: var(--red-line); box-shadow: 0 0 0 2px var(--red-bg); }
.griev-item summary { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.griev-item summary::-webkit-details-marker { display: none; }
.griev-item summary .grow { display: grid; }
.griev-body { display: grid; gap: 8px; padding: 0 14px 14px; }
.griev-text { margin: 0; white-space: pre-wrap; }
.griev-reply { padding: 10px 12px; border-radius: 12px; background: var(--blue-bg); }
.griev-reply p { margin: 0; }
.griev-event { display: flex; align-items: center; gap: 6px; margin: 0; }
.griev-status { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.griev-status.open { background: var(--peach-bg); color: var(--peach); }
.griev-status.progress { background: var(--blue-bg); color: var(--blue); }
.griev-status.done { background: var(--green-bg); color: var(--green); }
.griev-status.closed { background: var(--chip); color: var(--muted); }

/* Medical */
.med-banner { position: sticky; top: 55px; z-index: 9; display: flex; align-items: center; gap: 12px; margin: 10px 18px 0; padding: 10px 14px; border-radius: 12px; background: var(--danger); color: #fff; box-shadow: 0 8px 24px rgb(163 40 58 / 0.25); }
.med-banner > .icon { width: 22px; height: 22px; }
.med-banner strong { font-size: 14px; }
.med-banner-item { display: inline-block; margin-right: 14px; opacity: 0.95; }
.med-banner button { background: #fff; color: var(--danger); }
.med-banner.flash { animation: med-flash 1s ease-in-out 3; }
@keyframes med-flash { 50% { background: #d6334a; box-shadow: 0 0 0 6px rgb(214 51 74 / 0.25); } }
.med-notice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--yellow-bg); color: var(--yellow); }
.med-notice .icon { width: 18px; height: 18px; margin-top: 2px; }
.med-notice p { margin: 2px 0 0; }
.med-map { margin-bottom: 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.med-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.med-days { display: flex; align-items: center; gap: 8px; margin: 0; }
.med-days select { width: auto; }
.med-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.med-tile { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.med-tile .pb.circle { width: 36px; height: 36px; }
.med-tile div { display: grid; line-height: 1.2; }
.med-tile b { font-size: 22px; }
.med-tile span { color: var(--muted); }
.med-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.med-bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 32px; align-items: center; gap: 10px; margin-top: 8px; }
.med-bar b { text-align: right; }
.med-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.med-records h2 { display: flex; align-items: center; gap: 6px; }
.med-records button { margin-top: 12px; }
.med-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }

/* Catering */
.cat-daybar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-daybar select { width: auto; min-width: 180px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cat-tile { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.cat-tile .pb.circle { width: 38px; height: 38px; flex: none; }
.cat-tile div { display: grid; line-height: 1.25; }
.cat-tile b { font-size: 24px; }
.cat-tile span, .cat-tile small { color: var(--muted); }
.cat-alerts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.cat-alert, .cat-note { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--yellow-bg); color: var(--yellow); }
.cat-alert.red { background: var(--red-bg); color: var(--red); }
.cat-alert.ok { background: var(--green-bg); color: var(--green); margin-bottom: 14px; }
.cat-note { background: var(--chip); color: var(--muted); margin-bottom: 12px; }
.cat-alert .icon, .cat-note .icon { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.cat-h { display: flex; align-items: center; gap: 6px; font-size: 16px; margin: 4px 0 10px; }
.cat-sittings { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cat-sitting { display: grid; gap: 6px; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px; }
.cat-sitting:hover { border-color: var(--t-fg, var(--line)); }
.cat-sitting-head { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.cat-sitting-head .grow { white-space: nowrap; font-size: 13px; color: var(--muted); }
.cat-sitting-nums { display: flex; gap: 14px; flex-wrap: wrap; }
.cat-sitting-nums b { font-size: 20px; margin-right: 3px; }
.cat-sitting .meter span { background: var(--green); }
.cat-sitting .meter.over span { background: var(--red); }
.cat-warn { color: var(--peach); }
.cat-foot { margin-top: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.cat-grid h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.cat-grid h3, .cat-sum-grid h3 { font-size: 13px; margin: 10px 0 0; color: var(--muted); }
.cat-bar { display: grid; grid-template-columns: minmax(100px, 40%) 1fr 32px; align-items: center; gap: 10px; margin-top: 7px; }
.cat-bar b { text-align: right; }
.cat-sum { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.cat-sum td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cat-sum td:last-child { text-align: right; }
.cat-sum tr.total td { font-weight: 700; }
.cat-sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 16px; }
.cat-alert > span { flex: 1; }
.cat-alert > button { flex: none; padding: 2px 10px; margin: -2px 0; color: inherit; }
div.cat-sitting { cursor: default; }
.cat-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cat-actions button { padding: 4px 10px; font-size: 13px; }
.cat-actions .icon { width: 14px; height: 14px; }
.cat-conflicts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cat-conflict { display: flex; align-items: center; gap: 12px; padding: 12px; flex-wrap: wrap; }
.cat-conflict .grow { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.cat-conflict p { margin: 0; }
.cat-conflict .pb.circle { width: 36px; height: 36px; flex: none; }
.cat-sum th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; }
.cat-impact { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.cat-impact span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--chip); }
.cat-impact b { font-size: 18px; }
.cat-impact .icon, .cat-report-head .icon { width: 15px; height: 15px; }
.cat-list { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.tone-text-red { color: var(--red); }
.cat-report-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 12px; }
.cat-report-bar label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.cat-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-bottom: 16px; }
.cat-report { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; text-align: left; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.cat-report span:last-child { display: grid; gap: 2px; }
.cat-report small { color: var(--muted); line-height: 1.3; }
.cat-report .pb.circle { width: 32px; height: 32px; flex: none; }
.cat-report.on { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }
.cat-report-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cat-report-head h3 { margin: 0; }
.cat-report-head a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px; background: var(--accent, var(--yellow)); color: #fff; text-decoration: none; font-weight: 600; }
.cat-report-table { overflow-x: auto; }
.cat-report-table .cat-sum td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* Medical help in the player app */
.sos-fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 6px; padding: 12px 16px; border: 0; border-radius: 999px; background: var(--danger); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 8px 22px rgb(163 40 58 / 0.35); }
.sos-fab .icon { width: 20px; height: 20px; }
.help-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgb(20 16 14 / 0.45); }
.help-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; margin-bottom: calc(12px + env(safe-area-inset-bottom)); padding: 16px; border-radius: 18px; background: var(--card); box-shadow: 0 16px 40px rgb(20 16 14 / 0.25); }
.help-card h2 { margin: 0; }
.help-choice { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft, var(--card)); color: inherit; text-decoration: none; }
.help-choice strong { font-size: 16px; }
.step.awaiting { border-color: var(--peach); box-shadow: 0 0 0 3px color-mix(in srgb, var(--peach) 28%, transparent); }
.line.drill-hint { color: var(--peach-deep, #9a3412); font-weight: 600; }
.map-link { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0; font-weight: 700; text-decoration: none; }
.map-link .icon { width: 16px; height: 16px; }
.drawer-link.drawer-medical { color: var(--red); font-weight: 600; }
/* Player app: My card, My profile, My meals. */
.acr-card { display: grid; gap: 12px; padding: 16px; background: #fff; color: #1f2733; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgb(40 83 107 / 0.14); overflow: hidden; }
.acr-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.acr-main { display: flex; gap: 14px; align-items: flex-start; }
.acr-photo { width: 92px; height: 112px; flex: none; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: #eef1f4; color: #98a2b3; font-size: 30px; font-weight: 700; }
.acr-who { display: grid; gap: 4px; min-width: 0; }
.acr-name { font-size: 18px; text-transform: uppercase; line-height: 1.2; overflow-wrap: anywhere; }
.acr-no { display: flex; align-items: center; gap: 5px; font-weight: 700; }
.acr-no .icon { width: 15px; height: 15px; color: #667085; }
.acr-code { justify-self: start; margin-top: 4px; padding: 4px 14px; border-radius: 6px; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: 0.04em; }
.acr-zones { display: flex; flex-wrap: wrap; gap: 6px; }
.acr-zone { display: grid; justify-items: center; gap: 2px; min-width: 52px; padding: 5px 6px; border: 1.5px solid #1f2733; border-radius: 4px; font-weight: 800; font-size: 13px; }
.acr-zone.fill { background: #0f6b66; border-color: #0f6b66; color: #fff; }
.acr-zone .icon { width: 16px; height: 16px; }
.acr-zone small { font-size: 9px; font-weight: 600; }
.acr-qr { justify-self: center; width: min(260px, 100%); background: #fff; }
.acr-qr svg { display: block; width: 100%; height: auto; }
.acr-band { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 -16px -16px; padding: 12px 16px; background: #0f6b66; color: #fff; font-weight: 700; text-transform: uppercase; }
.acr-band strong { font-size: 22px; }
.profile-head { align-items: center; }
.profile-head .acr-photo { width: 64px; height: 64px; border-radius: 50%; font-size: 24px; }
.profile-facts { display: grid; gap: 6px; margin: 4px 0 0; }
.profile-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 5px 0; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; font-weight: 600; text-align: right; }
.member-main .griev-form h2 { margin: 0 0 4px; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.profile-link { justify-content: center; margin-top: 8px; text-decoration: none; }
.cta.alt { background: var(--accent-soft); color: var(--accent); }
.meal-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.widget-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0; }
.widget-links a { font-weight: 600; }
.section-title { margin: 18px 0 8px; font-size: 1rem; }
.meal-day { flex: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.meal-day.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.diet-card { align-items: center; }
.diet-allergies { display: flex; flex-wrap: wrap; gap: 4px 16px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; margin: 0; }
.meal-card .badge { margin-top: 6px; }
.meal-note { display: flex; gap: 6px; align-items: flex-start; padding: 7px 9px; border-radius: 10px; background: var(--yellow-bg); color: var(--yellow); }
.meal-note .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.meal-menu { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.meal-menu li { display: flex; gap: 8px; align-items: flex-start; }
.meal-menu p { margin: 2px 0 0; }
.meal-mark { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.meal-mark .icon { width: 13px; height: 13px; }
.meal-menu .unfit .meal-mark { background: var(--red-bg); color: var(--red); }
.meal-menu .unfit > div > strong { color: var(--muted); }
.meal-unfit { color: var(--red); font-weight: 600; }
.meal-move { margin-top: 10px; }
.meal-options { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.meal-option { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.meal-option p { margin: 2px 0 0; }

.widget-medical .widget-icon, .med-camp-head .widget-icon { background: var(--red-bg); color: var(--red); }
.med-page h2 { display: flex; align-items: center; gap: 6px; margin: 6px 2px 0; }
.med-call { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--danger); color: #fff; text-decoration: none; box-shadow: 0 8px 22px rgb(163 40 58 / 0.25); }
.med-call .icon { width: 26px; height: 26px; }
.med-call span { display: grid; }
.med-call strong { font-size: 18px; }
.med-call small { opacity: 0.9; }
.med-card { display: grid; gap: 8px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.med-card p { margin: 0; }
.med-card .cta { justify-self: start; margin-top: 4px; }
.med-card button { justify-content: center; }
button.med-sos { justify-content: center; padding: 16px; border-radius: 14px; font-size: 18px; background: var(--danger); color: #fff; }
button.med-sos .icon { width: 22px; height: 22px; }
.med-alert-card { border: 2px solid var(--red); background: var(--red-bg); }
.med-alert-card.coming { border-color: var(--green); background: var(--green-bg); }
.med-alert-title { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.med-alert-title .icon { width: 22px; height: 22px; }
.med-camps { display: grid; gap: 10px; }
.med-camp { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.med-camp p { margin: 0; }
.med-camp.nearest { border: 2px solid var(--red); }
.med-camp.closed { opacity: 0.6; }
.med-camp-head { display: flex; align-items: center; gap: 12px; }
.med-camp-head .grow { display: grid; }
.med-away { display: grid; text-align: right; line-height: 1.2; }
.med-away small { color: var(--muted); }
.med-camp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.med-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.med-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.med-btn .icon { width: 17px; height: 17px; }
.med-staff { display: grid; gap: 10px; padding-top: 4px; }
.med-staff h3 { margin: 6px 2px 0; font-size: 15px; }
.med-staff > .big { justify-content: center; padding: 13px; font-size: 16px; border-radius: 12px; }
.med-staff-alert { border: 2px solid var(--red); }
.med-staff-alert.coming { border-color: var(--yellow); }
.med-mine { display: grid; gap: 6px; }
.med-mine-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.med-mine-row .grow { display: grid; }
.med-record { display: grid; gap: 6px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.med-record .big { justify-content: center; padding: 13px; font-size: 16px; border-radius: 12px; margin-top: 6px; }
.med-row { display: flex; gap: 8px; }
.med-row button { flex: none; }
.med-severity { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.med-severity label, .med-check { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.med-severity input, .med-check input { width: auto; }

@media (max-width: 1000px) {
  .builder { grid-template-columns: 1fr; }
  .builder > .panel:last-child { position: static; max-height: none; }
  .step { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  #main { padding: 10px; }
  #topbar { padding: 6px 10px; }
  .toolbar { flex-wrap: wrap; }
  .cal-cell { min-height: 64px; }
  .cal-cell .cal-event .cal-title, .cal-cell .cal-event .cal-time { display: none; }
  .next-item { grid-template-columns: 1fr; }
}

/* Event overview (public/core/reports.js). Prints as the organising committee's one-page briefing. */
.ov-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; }
.ov-bar label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.ov-bar a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.ov-bar .icon, .ov-section h2 .icon, .ov-card h3 .icon { width: 15px; height: 15px; }
.ov-section { margin-bottom: 18px; }
.ov-section > h2 { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.ov-print-head { display: none; }
.ov-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ov-tile { position: relative; overflow: hidden; isolation: isolate; display: grid; align-content: start; gap: 4px; min-height: 96px; padding: 13px 14px 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--t-fg, var(--muted)) 16%, var(--line)); background: linear-gradient(120deg, var(--card) 0%, var(--card) 35%, color-mix(in srgb, var(--t-bg, var(--chip)) 85%, var(--card)) 100%); }
.ov-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--t-fg, var(--muted)), color-mix(in srgb, var(--t-fg, var(--muted)) 25%, transparent)); }
.ov-tile-mark { position: absolute; z-index: -1; right: -12px; bottom: -18px; color: var(--t-fg, var(--muted)); opacity: 0.13; transform: rotate(-12deg); pointer-events: none; }
.ov-tile-mark .icon { width: 88px; height: 88px; stroke-width: 1.4; }
.ov-tile-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--t-fg, var(--muted)); }
.ov-tile-label i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--t-bg, var(--chip)); }
.ov-tile-label .icon { width: 13px; height: 13px; }
.ov-tile b { font-size: 28px; font-weight: 800; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ov-tile small { color: var(--muted); font-size: 11px; }
.ov-tile-bar { display: block; height: 6px; margin-top: 4px; max-width: 75%; border-radius: 99px; background: linear-gradient(90deg, var(--t-fg) var(--pct), var(--t-bg) var(--pct)); }
.ov-count { grid-column: span 2; }
.ov-count b { font-size: 36px; color: var(--t-fg); }
.ov-glance-more { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 10px; }
.ov-types { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 240px; }
.ov-types .chip { padding: 3px 9px; border-radius: 999px; background: var(--chip); font-size: 12px; }
.ov-medals { border-collapse: collapse; font-size: 12px; min-width: 260px; }
.ov-medals th, .ov-medals td { padding: 3px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.ov-medals th:first-child, .ov-medals td:first-child { text-align: left; }
.ov-tally { margin-left: 2px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--yellow-bg); color: var(--yellow); }
.ov-tally.red { background: var(--red-bg); color: var(--red); }
.ov-attn { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.ov-attn li { position: relative; padding: 6px 22px 6px 10px; border-radius: 8px; border: 1px solid var(--line); border-left: 3px solid #e0a100; background: var(--card); font-size: 12.5px; line-height: 1.35; }
.ov-attn li.red { border-left-color: #d0364c; }
.ov-attn li[data-link]::after { content: "›"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; }
.ov-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; background: var(--faint); }
.ov-dot.green { background: #2f9e62; }
.ov-dot.amber { background: #e0a100; }
.ov-dot.red { background: #d0364c; }
.ov-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ov-card { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ov-card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; }
.ov-card dl { margin: 0; display: grid; gap: 2px; }
.ov-card dl div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.ov-card dt { color: var(--muted); }
.ov-card dd { margin: 0; font-weight: 600; }
.ov-card .green dd { color: var(--green); }
.ov-card .amber dd { color: var(--yellow); }
.ov-card .red dd { color: var(--red); }
.ov-score { margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--green-bg); color: var(--green); }
.ov-score.amber { background: var(--yellow-bg); color: var(--yellow); }
.ov-score.red { background: var(--red-bg); color: var(--red); }
.ov-ready { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ov-ready td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ov-ready td:first-child { width: 14px; }
.ov-ready-label small { display: block; color: var(--muted); font-size: 11px; }
.ov-ready-bar { width: 30%; }
.ov-ready-bar span { display: block; height: 7px; border-radius: 4px; background: linear-gradient(90deg, var(--bar) var(--pct), var(--subtle) var(--pct)); --bar: #2f9e62; }
.ov-ready-bar span.amber { --bar: #e0a100; }
.ov-ready-bar span.red { --bar: #d0364c; }
.ov-ready-num { white-space: nowrap; text-align: right; color: var(--muted); }
[data-link], [data-team] { cursor: pointer; }
.ov-card[data-link]:hover, .ov-ready tr[data-link]:hover, .ov-attn li[data-link]:hover, .ov-team[data-team]:hover, .ov-split > [data-link]:hover { outline: 2px solid color-mix(in srgb, var(--area) 35%, transparent); outline-offset: -2px; }
.ov-section > h2[data-link]:hover { color: var(--area); }
.ov-period { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.ov-period .icon { width: 14px; height: 14px; }
.ov-tile.green b { color: var(--green); }
.ov-tile.amber b { color: var(--yellow); }
.ov-tile.red b { color: var(--red); }
.ov-amber { color: var(--yellow); }
.ov-sub { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ov-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ov-split.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ov-split > [data-link] { border-radius: 10px; }
.ov-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 8px; }
.ov-table th { text-align: left; font-weight: 600; color: var(--muted); background: var(--subtle); padding: 6px 10px; }
.ov-table td { padding: 6px 10px; border-top: 1px solid var(--line); }
.ov-table td small { margin-left: 6px; color: var(--muted); }
.ov-mini { display: inline-block; vertical-align: middle; width: 90px; height: 7px; border-radius: 4px; background: var(--subtle); overflow: hidden; }
.ov-mini > span { display: block; height: 100%; width: var(--pct); background: #2f9e62; }
.ov-mini > span.amber { background: #e0a100; }
.ov-mini > span.red { background: #d0364c; }
.ov-daybars { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; padding: 4px 2px 2px; }
.ov-daybars > div { display: grid; justify-items: center; gap: 2px; min-width: 44px; font-size: 11px; }
.ov-daybars small { color: var(--muted); white-space: nowrap; }
.ov-daybar { display: flex; align-items: flex-end; width: 22px; height: 70px; border-radius: 5px; background: var(--subtle); overflow: hidden; }
.ov-daybar i { display: flex; align-items: flex-end; width: 100%; height: var(--h); background: color-mix(in srgb, var(--area) 30%, var(--subtle)); }
.ov-daybar i span { display: block; width: 100%; height: var(--pct); background: var(--area); }
.ov-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ov-team { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ov-team.empty { opacity: 0.65; }
.ov-team h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: 14px; }
.ov-team > p { margin: 2px 0 8px; }
.ov-medal-row { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ov-team dl { margin: 0; display: grid; gap: 2px; }
.ov-team dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.ov-team dt { color: var(--muted); flex: none; }
.ov-team dd { margin: 0; font-weight: 600; text-align: right; }
.ov-team .amber dd { color: var(--yellow); }
.ov-tally.green { background: var(--green-bg); color: var(--green); }
.ov-targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; }
.ov-target { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--faint); --tone: var(--muted); }
.ov-target.green { border-top-color: #2f9e62; --tone: var(--green); }
.ov-target.amber { border-top-color: #e0a100; --tone: var(--yellow); }
.ov-target.red { border-top-color: #d0364c; --tone: var(--red); }
.ov-target[data-link]:hover { outline: 2px solid color-mix(in srgb, var(--area) 35%, transparent); outline-offset: -2px; }
.ov-target h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; }
.ov-target h3 > span:first-of-type { flex: 1; }
.ov-verdict { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--chip); color: var(--muted); }
.ov-verdict.green { background: var(--green-bg); color: var(--green); }
.ov-verdict.amber { background: var(--yellow-bg); color: var(--yellow); }
.ov-verdict.red { background: var(--red-bg); color: var(--red); }
.ov-target-goal { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.ov-target-now { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ov-target-now b { font-size: 26px; line-height: 1.1; color: var(--tone); font-variant-numeric: tabular-nums; }
.ov-target-now small { color: var(--muted); font-size: 11.5px; }
.ov-trend { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 54px; padding: 2px; border-radius: 6px; background: var(--subtle); }
.ov-trend i { flex: 1; min-width: 4px; max-width: 26px; height: var(--h); border-radius: 3px 3px 0 0; background: var(--faint); transition: --h 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ov-trend i.green { background: #2f9e62; }
.ov-trend i.amber { background: #e0a100; }
.ov-trend i.red { background: #d0364c; }
.ov-trend-goal { position: absolute; left: 0; right: 0; bottom: var(--goal); border-top: 1.5px dashed color-mix(in srgb, var(--ink) 45%, transparent); pointer-events: none; }
.ov-target-foot { margin: 0; color: var(--muted); font-size: 11.5px; }

/* Live boards (public/core/live.js, LiveBadge in ui/bits.jsx): registered so bars slide when their length changes. */
@property --pct { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --h { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.ov-ready-bar span, .ov-mini > span, .ov-daybar i, .ov-daybar i span { transition: --pct 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), --h 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), width 0.9s, height 0.9s; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; white-space: nowrap; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #2f9e62; box-shadow: 0 0 0 0 rgba(47, 158, 98, 0.6); animation: live-pulse 1.8s infinite; }
.live-badge b { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #2f9e62; }
.live-badge small { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.live-next { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.live-next > span { display: block; height: 100%; width: 0; background: color-mix(in srgb, #2f9e62 55%, transparent); }
.live-flash { animation: live-flash 1.6s ease-out; border-radius: 4px; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 158, 98, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(47, 158, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 98, 0); } }
@keyframes live-fill { from { width: 0; } to { width: 100%; } }
@keyframes live-flash { 0% { background: color-mix(in srgb, var(--area) 28%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .live-badge i, .live-flash { animation: none; } }

/* Split-flap figures (public/core/flap.js): a number is a row of flipping cells only while it changes. */
.flap-row { display: inline-flex; gap: 0.06em; perspective: 300px; vertical-align: baseline; }
.flap-cell { position: relative; display: inline-block; min-width: 0.64em; padding: 0 0.04em; text-align: center; font-variant-numeric: tabular-nums;
  border-radius: 0.12em; background: color-mix(in srgb, currentColor 9%, transparent); transform-origin: 50% 50%; backface-visibility: hidden; }
.flap-cell::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: color-mix(in srgb, currentColor 22%, transparent); }
.screen-mode .flap-cell { background: color-mix(in srgb, var(--nav-bg) 88%, transparent); color: #fff; box-shadow: inset 0 -0.08em 0 rgba(0, 0, 0, 0.35); }
.screen-mode .flap-cell::after { background: rgba(0, 0, 0, 0.55); }

/* Rotating panels (public/core/board.js): panels stack in their slot; hidden ones keep their size for maps. */
[data-slot] { min-width: 0; }
[data-slot-tabs] { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
[data-slot-tabs][hidden] { display: none; }
.board-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; overflow: hidden; font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.board-tab .icon { width: 14px; height: 14px; }
.board-tab.on { color: var(--ink); border-color: color-mix(in srgb, var(--area) 45%, var(--line)); background: color-mix(in srgb, var(--area) 10%, var(--card)); }
.board-tab i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--area); }
@keyframes board-turn { from { width: 0; } to { width: 100%; } }
[data-slot-stage] { position: relative; perspective: 1400px; }
[data-slot-stage] > [data-panel] { position: absolute; inset: 0; overflow: auto; visibility: hidden; scrollbar-width: thin; }
[data-slot-stage] > [data-panel][data-state="on"], [data-slot-stage] > [data-panel][data-state="in"], [data-slot-stage] > [data-panel][data-state="out"] { visibility: visible; }
[data-slot-stage] > [data-panel][data-state="out"] { animation: board-out 0.35s ease-in forwards; transform-origin: 50% 0; z-index: 1; }
[data-slot-stage] > [data-panel][data-state="in"] { animation: board-in 0.35s ease-out 0.35s both; transform-origin: 50% 100%; z-index: 2; }
@keyframes board-out { from { transform: none; opacity: 1; } to { transform: rotateX(80deg); opacity: 0; } }
@keyframes board-in { from { transform: rotateX(-80deg); opacity: 0; } to { transform: none; opacity: 1; } }
.screen-mode .board-tab { font-size: 14px; padding: 6px 14px; }
.ov-board { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ov-board { grid-template-columns: minmax(0, 1fr); } }
.ov-slot [data-panel] > .ov-section { margin-bottom: 0; }

/* The live feed (public/core/feed.js): cards flash in one at a time and a ticker crawls along the bottom. */
#main:has(> .feed-host) { flex: 1; display: flex; flex-direction: column; }
.feed-host { margin-top: auto; position: sticky; bottom: 0; z-index: 15; padding-top: 12px; }
.feed-ticker { display: flex; align-items: stretch; overflow: hidden; border-radius: 10px; background: var(--nav-bg); color: #fff; box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12); }
.feed-ticker[hidden] { display: none; }
.feed-label { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  background: color-mix(in srgb, var(--area) 70%, #c92a2a); }
.feed-label .icon { width: 14px; height: 14px; }
.feed-window { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.feed-track { display: flex; width: max-content; }
.feed-track:hover { animation-play-state: paused !important; }
.feed-run { display: flex; align-items: center; white-space: nowrap; }
@keyframes feed-crawl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.feed-tick { display: inline-flex; align-items: center; gap: 7px; padding: 8px 4px; font-size: 13.5px; }
.feed-tick[data-link] { cursor: pointer; }
.feed-tick b { font-variant-numeric: tabular-nums; opacity: 0.7; font-weight: 600; }
.feed-tick .icon { width: 15px; height: 15px; color: color-mix(in srgb, var(--t-fg) 45%, #fff); }
.feed-tick small { opacity: 0.75; font-size: 12.5px; }
.feed-dot { display: inline-block; width: 5px; height: 5px; margin: 0 16px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }
.feed-cards { position: fixed; right: 20px; bottom: 70px; z-index: 30; width: min(400px, calc(100vw - 40px)); display: grid; gap: 10px; pointer-events: none; }
.feed-card { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 16px; overflow: visible; pointer-events: auto; color: var(--ink);
  background: var(--card); border: 1px solid color-mix(in srgb, var(--t-fg) 30%, var(--line)); border-left: 6px solid var(--t-fg); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(20, 24, 36, 0.22); animation: feed-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25); }
.feed-card.leaving { animation: feed-out 0.45s ease-in forwards; }
.feed-card.big { background: color-mix(in srgb, var(--t-bg) 55%, var(--card)); }
.feed-card-icon { flex: none; }
.feed-card-text { display: grid; gap: 2px; min-width: 0; }
.feed-card-text[data-link] { cursor: pointer; }
.feed-card-kind { display: flex; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-fg); }
.feed-card-kind b { color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.feed-card strong { font-size: 16px; line-height: 1.3; }
.feed-card-text > span:last-child:not(.feed-card-kind) { color: var(--muted); font-size: 13px; }
.feed-card-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0 0 10px 10px; background: var(--t-fg); opacity: 0.5; transform-origin: left; animation: feed-bar linear forwards; }
@keyframes feed-in { from { opacity: 0; transform: translateY(24px) rotateX(-35deg) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes feed-out { to { opacity: 0; transform: translateX(40px) scale(0.97); } }
@keyframes feed-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.screen-mode .feed-cards { left: 50%; right: auto; bottom: 76px; width: min(1100px, 86vw); transform: translateX(-50%); }
.screen-mode .feed-card { padding: 22px 28px 24px; gap: 20px; border-left-width: 10px; border-radius: 18px; }
.screen-mode .feed-card-icon { transform: scale(1.6); margin: 10px 14px 0 8px; }
.screen-mode .feed-card-kind { font-size: 15px; }
.screen-mode .feed-card strong { font-size: 30px; }
.screen-mode .feed-card-text > span:last-child:not(.feed-card-kind) { font-size: 19px; }
.screen-mode .feed-card.big strong { font-size: 40px; }
.screen-mode .feed-tick { font-size: 17px; padding: 10px 4px; }
.screen-mode .feed-label { font-size: 14px; padding: 10px 18px; }
.feed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feed-list li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.feed-list li[data-link] { cursor: pointer; }
.feed-list li[data-link]:hover { background: color-mix(in srgb, var(--t-bg) 60%, transparent); }
.feed-list li > b { min-width: 42px; padding-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.feed-list li strong { display: block; font-size: 13.5px; line-height: 1.35; }
.feed-list li small { display: block; color: var(--muted); font-size: 12px; }
.feed-latest .ov-section { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .feed-card, .feed-card.leaving { animation: none; } }
@media print { .feed-host { display: none !important; } }
@media print {
  [data-slot-tabs] { display: none !important; }
  [data-slot-stage] { height: auto !important; perspective: none; }
  [data-slot-stage] > [data-panel] { position: static; visibility: visible !important; overflow: visible; animation: none !important; margin-bottom: 10px; }
}

/* Full screen for projecting (public/core/screen.js). The medical banner names people, so it stays off a shared screen. */
.screen-mode #app, .screen-mode #app.collapsed { grid-template-columns: minmax(0, 1fr); }
.screen-mode #nav, .screen-mode #topbar, .screen-mode #medical-banner, .screen-mode .gms-page-head, .screen-mode .no-screen, .screen-mode .ov-bar { display: none !important; }
.screen-mode #main { padding: 14px 28px 24px; }
.screen-mode.screen-still, .screen-mode.screen-still * { cursor: none !important; }
@media (min-width: 1600px) { .screen-mode #main { zoom: 1.2; } }
@media (min-width: 2400px) { .screen-mode #main { zoom: 1.6; } }
/* App emulator in full screen: three phones across, each as tall as the space under the projector bar, with no page scroll on a 1920×1080 screen. */
html.screen-mode:has(.emu-grid),
html.screen-mode:has(.emu-grid) body { height: 100%; overflow: hidden; }
html.screen-mode:has(.emu-grid) #app { height: 100vh; max-height: 100vh; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
html.screen-mode:has(.emu-grid) .workspace { height: 100%; min-height: 0; overflow: hidden; }
html.screen-mode:has(.emu-grid) #main { zoom: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 40px 16px 12px; }
html.screen-mode:has(.emu-grid) .page-head,
html.screen-mode:has(.emu-grid) .emu-intro { display: none !important; }
html.screen-mode:has(.emu-grid) .emu-grid { flex: 1; min-height: 0; margin: 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px; overflow: auto; }
html.screen-mode:has(.emu-grid) .emu-card { flex: 0 0 calc((100% - 24px) / 3); width: calc((100% - 24px) / 3); height: 100%; max-height: 100%; min-height: 0; }
html.screen-mode:has(.emu-grid) .emu-empty { flex: 1 0 100%; height: auto; }
#screen-bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 12px 28px; color: #fff;
  background: linear-gradient(100deg, var(--nav-bg), color-mix(in srgb, var(--nav-bg) 70%, var(--area))); }
.screen-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.screen-brand img { flex: none; border-radius: 12px; background: #fff; padding: 4px; }
.screen-brand div, .screen-when, .screen-weather div { display: grid; line-height: 1.2; }
.screen-brand strong { font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen-brand span, .screen-when span, .screen-weather span { font-size: 14px; opacity: 0.8; }
.screen-when { text-align: center; justify-items: center; }
.screen-live { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; opacity: 1 !important; }
.screen-live[hidden] { display: none; }
.screen-live i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: live-pulse 1.8s infinite; }
.screen-live small { font-weight: 500; letter-spacing: 0; opacity: 0.8; font-variant-numeric: tabular-nums; }
.screen-next { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgba(255, 255, 255, 0.55); }
.screen-when strong { font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.screen-weather { justify-self: end; display: flex; align-items: center; gap: 12px; }
.screen-weather-icon .icon { width: 44px; height: 44px; }
.screen-weather strong { font-size: 28px; }
.screen-weather strong small { margin-left: 8px; font-size: 16px; font-weight: 500; opacity: 0.9; }
.screen-aqi { padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.18); }
.screen-aqi.yellow { background: #e0a100; color: #1d1d1d; }
.screen-aqi.peach, .screen-aqi.pink { background: #e8590c; }
.screen-aqi.purple { background: #7b2cbf; }
.screen-exit { position: absolute; top: calc(100% + 8px); right: 16px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; font-size: 13px; color: #fff;
  background: rgba(20, 24, 36, 0.8); border: 0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); transition: opacity 0.3s; }
.screen-exit .icon { width: 13px; height: 13px; }
.screen-still .screen-exit { opacity: 0; pointer-events: none; }
.screen-note { position: absolute; top: calc(100% + 8px); left: 28px; max-width: min(620px, 60vw); display: flex; gap: 8px; margin: 0; padding: 8px 12px; font-size: 13px; line-height: 1.4;
  color: var(--yellow); background: var(--yellow-bg); border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.screen-note .icon { flex: none; width: 15px; height: 15px; margin-top: 2px; }

@page { size: A4; margin: 12mm; }
@media print {
  body { background: #fff; }
  #nav, #topbar, #medical-banner, .no-print, .gms-page-head { display: none !important; }
  #app, .workspace, #main { display: block; margin: 0; padding: 0; overflow: visible; height: auto; }
  .ov-print-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; margin-bottom: 10px; border-bottom: 2px solid var(--ink); font-size: 12px; }
  .ov-print-head strong { font-size: 16px; }
  .ov-section { margin-bottom: 10px; break-inside: avoid; }
  .ov-card, .ov-tile, .ov-ready tr, .ov-target { break-inside: avoid; }
  .ov-trend, .ov-trend i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .ov-days { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .ov-attn { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .ov-attn li { padding: 3px 8px; font-size: 11px; }
  .ov-attn li::after { display: none; }
  .ov-card, .ov-tile { padding: 6px 8px; }
  .ov-tile b { font-size: 16px; }
  .ov-count b { font-size: 20px; }
  .ov-ready td { padding: 4px 8px; }
  .tab-bar { display: none !important; }
  .ov-part { break-before: page; }
  .ov-part .ov-section { break-inside: auto; }
  .ov-teams { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .ov-team { padding: 6px 8px; break-inside: avoid; }
  .ov-team dl div { font-size: 10px; }
  .ov-split { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ov-split.three { grid-template-columns: repeat(3, 1fr); }
  .ov-table { font-size: 10.5px; }
  .ov-table td, .ov-table th { padding: 3px 6px; }
  .ov-table tr { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Day timeline (public/modules/timeline/index.js). */
.tl-intro { margin: -4px 0 12px; }
.tl-bar { position: sticky; top: 0; z-index: 5; display: grid; gap: 10px; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(6px); }
.tl-bar .cat-note { margin: 0; }
.tl-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tl-day { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tl-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--chip); }
.tl-seg button { background: none; border: 0; color: var(--muted); box-shadow: none; }
.tl-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
.tl-scenario { font-size: 13px; color: var(--muted); }
.tl-clock { display: flex; align-items: baseline; gap: 8px; min-width: 190px; color: var(--area); }
.tl-clock .icon { width: 24px; height: 24px; align-self: center; }
.tl-clock b { font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.tl-clock small { color: var(--muted); font-size: 12px; }
.tl-clock.playing b { color: var(--area); }
.tl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-ruler { margin-bottom: 12px; }
.tl-track { position: relative; height: 46px; border-radius: 10px; background: var(--subtle); cursor: pointer; overflow: hidden; }
.tl-past { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--area) 10%, transparent); pointer-events: none; }
.tl-mark { position: absolute; width: 8px; height: 8px; padding: 0; margin-left: -4px; border: 0; border-radius: 50%; background: var(--t-fg); box-shadow: 0 0 0 2px var(--card); cursor: pointer; }
.tl-mark:hover { transform: scale(1.5); }
.tl-needle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; transition: left 0.25s linear; }
.tl-needle span { position: absolute; bottom: 2px; left: 4px; font-size: 10px; font-weight: 700; color: var(--ink); background: var(--card); padding: 0 3px; border-radius: 4px; }
.tl-hours { position: relative; height: 16px; font-size: 10px; color: var(--muted); }
.tl-hours span { position: absolute; transform: translateX(-50%); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tl-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--t-fg); }
.tl-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tl-kind { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 12px; font-weight: 600; box-shadow: none; }
.tl-kind .icon { width: 14px; height: 14px; }
.tl-kind b { font-weight: 700; color: var(--muted); }
.tl-kind[aria-pressed="false"] { opacity: 0.45; text-decoration: line-through; }
.tl-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
/* Each column in its own colour: coming up blue, under way green, late red. */
.tl-column { --col: var(--muted); --col-bg: var(--subtle); display: grid; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--col) 22%, var(--line)); border-top: 4px solid var(--col); background: linear-gradient(180deg, color-mix(in srgb, var(--col-bg) 90%, var(--card)) 0, color-mix(in srgb, var(--col-bg) 45%, var(--paper)) 260px); }
.tl-column h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 14px; color: var(--col); }
.tl-column h2 .icon { width: 16px; height: 16px; }
.tl-column h2 b { margin-left: auto; min-width: 24px; padding: 1px 8px; border-radius: 999px; text-align: center; font-size: 12px; background: var(--col); color: var(--card); }
.tl-coming { --col: var(--blue); --col-bg: var(--blue-bg); }
.tl-on { --col: var(--green); --col-bg: var(--green-bg); }
.tl-late { --col: var(--red); --col-bg: var(--red-bg); }
.tl-empty { margin: 4px 2px; font-size: 13px; }
.tl-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--t-fg); }
.tl-item.tl-flash { animation: tl-flash 1.2s ease-out; }
@keyframes tl-flash { from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--t-fg) 45%, transparent); } to { box-shadow: none; } }
.tl-time b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.tl-time small { font-size: 11px; color: var(--muted); }
.tl-main { display: grid; gap: 5px; min-width: 0; }
.tl-title { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; }
.tl-title strong[data-link] { cursor: pointer; }
.tl-title strong[data-link]:hover { text-decoration: underline; }
.tl-kind-icon { flex: none; color: var(--t-fg); }
.tl-kind-icon .icon { width: 15px; height: 15px; margin-top: 2px; }
.tl-detail { margin: 0; font-size: 12px; color: var(--muted); }
.tl-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-state small { font-size: 11px; color: var(--muted); }
.tl-progress { height: 5px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.tl-progress span { display: block; height: 100%; background: var(--t-fg); transition: width 0.25s; }
.tl-flow { display: flex; align-items: flex-start; gap: 4px; padding: 6px 8px; border-radius: 8px; background: var(--teal-bg); color: var(--teal); font-size: 12px; }
.tl-flow .icon { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.tl-flow small { margin-left: 6px; opacity: 0.8; }
.tl-flow p { margin: 2px 0 0; color: var(--ink); }
.tl-icon-btn { padding: 2px 5px; min-height: 0; color: inherit; }
.tl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-actions button { padding: 3px 8px; font-size: 12px; }
.tl-actions select { font-size: 12px; padding: 3px 6px; }
@media (max-width: 1100px) { .tl-board { grid-template-columns: 1fr; } }

/* ——— Player Games info (venues, disciplines, schedule, live, medals, athletes) ——— */
.games-lead { margin: -4px 2px 0; }
.games-hero {
  position: relative; overflow: hidden; display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 36px 20px 28px; border-radius: 22px; color: #f7f1e6;
  background:
    radial-gradient(120% 80% at 10% 0%, rgb(201 162 39 / 0.35), transparent 55%),
    radial-gradient(90% 70% at 100% 20%, rgb(31 111 150 / 0.45), transparent 50%),
    linear-gradient(155deg, #16384a 0%, #1f5c4a 48%, #2a3d2e 100%);
  box-shadow: 0 18px 48px rgb(22 56 74 / 0.35);
  animation: games-rise 0.55s ease-out both;
}
.games-hero-glow {
  position: absolute; inset: auto -20% -40% -20%; height: 70%; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgb(255 220 140 / 0.22), transparent 60%);
}
.games-hero .hero-logo { position: relative; filter: drop-shadow(0 6px 16px rgb(0 0 0 / 0.25)); }
.games-hero h1 { position: relative; margin: 0; font-size: 34px; letter-spacing: 0.02em; color: #fff; }
.games-hero .muted { position: relative; color: rgb(247 241 230 / 0.82); max-width: 340px; }
.games-kicker {
  position: relative; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #e4c56a;
}
.games-hero-stats {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 4px;
  font-size: 13px; color: rgb(247 241 230 / 0.9);
}
.games-hero-stats b { color: #fff; font-size: 18px; margin-right: 4px; }
.games-hero-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.games-hero .cta { background: #e4c56a; color: #1a2a22; }
.games-hero .cta.alt { background: rgb(255 255 255 / 0.12); color: #fff; border: 1px solid rgb(255 255 255 / 0.28); }
.games-tiles { display: grid; gap: 10px; }
.games-tile {
  display: flex; gap: 14px; padding: 16px; border-radius: 18px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--t-fg) 18%, var(--line));
  box-shadow: 0 8px 24px rgb(40 83 107 / 0.08);
  animation: games-rise 0.5s ease-out both; animation-delay: var(--delay, 0ms);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.games-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgb(40 83 107 / 0.14); }
.games-tile-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--t-fg); }
.games-tile-cta .icon { width: 14px; height: 14px; }
@keyframes games-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.games-map {
  height: 240px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background: var(--subtle); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4);
}
.games-map .leaflet-container { width: 100%; height: 100%; font: inherit; touch-action: pan-x pan-y pinch-zoom; }
.games-chips, .games-days, .games-venue-inline { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.games-chip, .games-day {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600;
}
.games-chip .icon { width: 14px; height: 14px; color: var(--t-fg, var(--accent)); }
.games-chip.on, .games-day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.games-chip.on .icon { color: #fff; }
.games-chip.tone-green.on, .games-chip.tone-blue.on, .games-chip.tone-peach.on, .games-chip.tone-teal.on,
.games-chip.tone-yellow.on, .games-chip.tone-pink.on, .games-chip.tone-purple.on, .games-chip.tone-orange.on {
  background: var(--t-fg); border-color: var(--t-fg);
}
.games-day { flex-direction: column; gap: 2px; min-width: 52px; padding: 10px 12px; border-radius: 16px; }
.games-day span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.games-day.on span { color: rgb(255 255 255 / 0.8); }
.games-day b { font-size: 18px; line-height: 1; }
.games-day.today:not(.on) { border-color: #c9a227; box-shadow: inset 0 0 0 1px #c9a227; }
.games-venue-cards, .games-sport-grid, .games-athlete-grid, .games-event-list { display: grid; gap: 12px; }
.games-venue-card {
  overflow: hidden; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgb(40 83 107 / 0.08); transition: border-color 0.15s ease, transform 0.15s ease;
}
.games-venue-card.selected, .games-venue-card:focus-within { border-color: var(--t-fg); transform: translateY(-1px); }
.games-venue-art {
  position: relative; min-height: 110px; padding: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--t-fg) 75%, #123) 0%, color-mix(in srgb, var(--t-bg) 40%, #0d2a22) 100%);
  color: #fff;
}
.games-venue-mark { position: absolute; right: 12px; bottom: 8px; opacity: 0.25; }
.games-venue-mark .icon { width: 72px; height: 72px; }
.games-venue-sports, .games-venue-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.games-venue-body { display: grid; gap: 6px; padding: 14px; }
.games-venue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.games-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--t-bg) 80%, #fff); color: var(--t-fg); font-size: 12px; font-weight: 600;
  text-decoration: none;
}
.games-venue-art .games-pill { background: rgb(255 255 255 / 0.18); color: #fff; }
.games-pill .icon { width: 13px; height: 13px; }

.games-sport-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.games-sport-card {
  display: grid; gap: 6px; padding: 16px 14px; border-radius: 18px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--t-fg) 20%, var(--line));
  box-shadow: 0 8px 20px rgb(40 83 107 / 0.07);
}
.games-sport-icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px;
  background: var(--t-bg); color: var(--t-fg);
}
.games-sport-icon .icon { width: 22px; height: 22px; }

.games-event {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px 14px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--t-fg);
}
.games-event.is-live {
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
  background: linear-gradient(90deg, color-mix(in srgb, var(--red-bg) 70%, var(--card)), var(--card) 55%);
}
.games-event-time { display: grid; gap: 6px; align-content: start; }
.games-event-time strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.games-event-main { display: grid; gap: 4px; min-width: 0; }
.games-status {
  display: inline-flex; width: fit-content; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.games-status.live { background: var(--red); color: #fff; animation: games-pulse 1.4s ease-in-out infinite; }
.games-status.soon { background: var(--blue-bg); color: var(--blue); }
.games-status.done { background: var(--chip); color: var(--muted); }
.games-status.stop { background: var(--pink-bg); color: var(--pink); }
@keyframes games-pulse { 50% { box-shadow: 0 0 0 4px rgb(163 40 58 / 0.2); } }
.games-live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgb(163 40 58 / 0.5); animation: games-pulse 1.4s ease-in-out infinite;
}
.games-section-title { display: flex; align-items: center; gap: 8px; margin: 8px 2px 0; font-size: 15px; }
.games-result { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.games-medals { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; font-size: 13px; }
.games-filter-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 2px; font-size: 13px; }
.games-filter-note .icon { width: 14px; height: 14px; }

.games-medal-table { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px; }
.games-medal-head, .games-medal-row {
  display: grid; grid-template-columns: 36px minmax(0, 1.6fr) 36px 36px 36px 44px; gap: 6px; align-items: center;
  padding: 10px 8px; text-decoration: none; color: inherit; font-size: 14px;
}
.games-medal-head { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.games-medal-row { border-radius: 12px; }
.games-medal-row:nth-child(2) { background: linear-gradient(90deg, #f7e7a8, transparent 70%); }
.games-medal-row:nth-child(3) { background: linear-gradient(90deg, #e6e6e6, transparent 70%); }
.games-medal-row:nth-child(4) { background: linear-gradient(90deg, #f0d0b0, transparent 70%); }
.games-medal-row:hover { background: var(--subtle); }
.games-rank { font-weight: 700; color: var(--muted); }
.games-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.games-athlete-grid { grid-template-columns: 1fr; }
.games-athlete-card {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 18px rgb(40 83 107 / 0.07);
}
.games-face {
  width: 64px; height: 64px; flex: none; border-radius: 18px; object-fit: cover;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 22px;
}
.games-face.lg { width: 96px; height: 96px; border-radius: 24px; font-size: 34px; }
.games-athlete-hero {
  display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgb(40 83 107 / 0.1);
}
.games-athlete-hero h1 { margin: 4px 0; font-size: 26px; }
.games-about {
  display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
}
.games-about .games-hero-actions { justify-content: flex-start; }
.games-login-block {
  display: grid; gap: 8px; margin-top: 8px; padding: 20px 4px 4px;
  border-top: 1px solid var(--line);
  animation: games-rise 0.55s ease-out both; animation-delay: 200ms;
}
.games-login-block h2 { margin: 0; font-size: 20px; }
.games-home > .games-section-title { margin-top: 10px; }
.games-kicker.ink { color: var(--accent); letter-spacing: 0.12em; }
.games-hero-actions.start { justify-content: flex-start; }
@media (min-width: 720px) {
  .games-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games-sport-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .games-athlete-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games-map { height: 320px; }
}
