/* "Sticker" theme. One shared component set for every page: add a modifier
   to an existing component before adding a new class for a similar element. */

:root {
  --bg: #fff7ee;
  --dots: #f2dcc6;
  --surface: #ffffff;
  --fill: #fcefe1;
  --border: #f0dac4;
  --shadow: #ead0b6;
  --text: #45312b;
  --muted: #92776c;
  --accent: #e4527a;
  --accent-soft: #ffe2ea;
  --mint: #2a9d90;
  --common: #c08a3e;
  --scarce: #3f9a55;
  --rare: #8a63d2;
  --obsidian: #e0573f;
  --radius: 11px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1613; --dots: #2b211c; --surface: #28201b; --fill: #322822; --border: #45372e; --shadow: #110c0a;
    --text: #f7ece5; --muted: #bba494; --accent: #ff7d9e; --accent-soft: #4a2730; --mint: #5ed3c4;
    --common: #e2bd86; --scarce: #8fd59c; --rare: #bda4f5; --obsidian: #ff9a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1d1613; --dots: #2b211c; --surface: #28201b; --fill: #322822; --border: #45372e; --shadow: #110c0a;
  --text: #f7ece5; --muted: #bba494; --accent: #ff7d9e; --accent-soft: #4a2730; --mint: #5ed3c4;
  --common: #e2bd86; --scarce: #8fd59c; --rare: #bda4f5; --obsidian: #ff9a80;
  color-scheme: dark;
}

/* Base */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg) radial-gradient(var(--dots) 1.2px, transparent 1.6px) 0 0 / 20px 20px; color: var(--text); font: 15px/1.5 var(--font); }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1 { margin: 0 0 6px; font-size: 2rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.2rem; font-weight: 800; }
h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
h3 { margin: 18px 0 8px; font-size: 1rem; font-weight: 800; }
h3:first-child { margin-top: 0; }
p { margin: 0 0 10px; }
img { max-width: 100%; }
code { padding: 0 4px; border-radius: 5px; background: var(--fill); font-size: .82em; overflow-wrap: anywhere; }
pre { width: 100%; max-height: 480px; overflow: auto; padding: 12px; border: 2px solid var(--border); border-radius: 10px; background: var(--fill); color: var(--text); font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
input, select, .button { min-height: 36px; padding: 6px 12px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
/* Safari keeps its native look on these unless appearance is off; the select arrow is drawn here instead. */
input, select, button { -webkit-appearance: none; appearance: none; }
input[type="checkbox"], input[type="radio"] { -webkit-appearance: auto; appearance: auto; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
select { padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 15px top 52%, right 10px top 52%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
input { width: 100%; }
input:focus, select:focus { border-color: var(--accent); outline: none; }
.button { cursor: pointer; font-weight: 700; box-shadow: 0 2px 0 var(--shadow); }
.button:hover { border-color: var(--accent); color: var(--accent); }
.button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* Layout */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 10px max(16px, calc((100vw - 1200px) / 2)); border-bottom: 2px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); }
.brand { color: var(--accent); font-size: 1.15rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--accent); opacity: .8; }
.site-menu { display: contents; }
.menu-toggle { display: none; margin-left: auto; width: 40px; padding: 0; font-size: 1.1rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a { padding: 5px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; text-decoration: none; }
.site-nav a:hover { background: var(--fill); color: var(--text); }
.site-search { flex: 1 1 160px; max-width: 300px; }
.site-tools { display: flex; gap: 8px; margin-left: auto; }
.page { max-width: 1200px; min-height: 60vh; margin: 0 auto; padding: 28px 16px 56px; }
.site-footer { padding: 24px 16px 36px; color: var(--muted); font-size: .8rem; text-align: center; }
.site-footer p { max-width: 760px; margin: 0 auto 6px; }
.site-version a { color: var(--muted); font-weight: 700; text-decoration: none; }
.site-version a:hover { color: var(--accent); }

/* Headings and sections */
.breadcrumbs { margin-bottom: 14px; color: var(--muted); font-size: .85rem; }
.breadcrumbs a + a::before, .breadcrumbs a + span::before { content: "›"; margin: 0 7px; color: var(--muted); }
.section { margin-top: 32px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 12px; }
.section-head > .muted { font-size: .85rem; }
.section-head > .count { padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 800; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 28px; }
.kicker { color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .02em; }

/* Panels */
.panel { padding: 18px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 0 var(--shadow); }
.panel + .panel { margin-top: 12px; }
details.panel > summary { cursor: pointer; font-weight: 800; }
details.panel[open] > summary { margin-bottom: 12px; }
details.panel > summary .muted { font-weight: 400; }
.panel.compact { margin-bottom: 16px; padding: 12px 16px; }
.panel.compact[open] > summary { margin-bottom: 8px; }
.notice { padding: 10px 14px; border: 2px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: .85rem; }

/* Detail page header */
.detail-head { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.detail-head.large { grid-template-columns: 300px 1fr; }
.detail-head.text-only { grid-template-columns: 1fr; }
.detail-head > div > * + * { margin-top: 10px; }
.detail-head > .thumb { border: 2px solid var(--border); box-shadow: 0 4px 0 var(--shadow); }
.detail-head > .thumb.clear { border: 0; box-shadow: none; }
.title-icon { width: 46px; height: 46px; margin-right: 6px; vertical-align: -10px; object-fit: contain; }

/* Cards: grids (size modifiers) and horizontal strips */
.grid { --min: 140px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min), 1fr)); gap: 12px; }
.grid.large { --min: 190px; }
.grid.small { --min: 112px; gap: 10px; }
.grid.tiny { --min: 68px; gap: 6px; }
.grid.links { --min: 220px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.strip > * { flex: 0 0 auto; scroll-snap-align: start; }
.card { --rarity: var(--shadow); position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 0 var(--rarity); text-align: center; text-decoration: none; transition: transform .12s ease, border-color .12s ease; }
.card[data-rarity="common"] { --rarity: var(--common); }
.card[data-rarity="scarce"] { --rarity: var(--scarce); }
.card[data-rarity="rare"] { --rarity: var(--rare); }
.card[data-rarity="obsidian"] { --rarity: var(--obsidian); }
a.card:hover { border-color: var(--rarity); color: inherit; }
.card .thumb { margin-bottom: 4px; }
.card-title { font-size: .88rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.card-meta { color: var(--muted); font-size: .76rem; }
.card-note { margin-top: auto; padding-top: 4px; font-size: .8rem; font-weight: 700; }
.small > .card .card-title { font-size: .8rem; }
.tiny > .card, .strip .card { width: auto; padding: 5px; border-radius: 8px; }
.strip .card { width: 72px; }
.tiny > .card .card-title, .strip .card .card-title { font-size: .64rem; line-height: 1.15; }
.tiny > .card .card-meta, .strip .card .card-meta { display: none; }
.links > .card { flex-flow: row wrap; align-items: baseline; gap: 2px 10px; padding: 12px 14px; text-align: left; }
.links > .card .card-title { font-size: .95rem; }
.amount { position: absolute; top: 4px; right: 4px; z-index: 3; padding: 0 7px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: .72rem; font-weight: 800; }
.step { display: grid; gap: 4px; justify-items: center; }
.step > .strip { overflow: visible; padding: 0; gap: 6px; }
.step > b { padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .78rem; }

/* Thumbnails: frame, art layers and corner badges */
.thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--fill); }
.thumb > img, .thumb > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.thumb > .art { padding: 13%; }
.thumb.clear { background: none; }
.thumb.banner { aspect-ratio: 2 / 1; }
.thumb > .thumb-badge { inset: 5% auto auto; z-index: 2; width: 26%; height: auto; aspect-ratio: 1; }
.thumb > .thumb-badge.left { left: 5%; }
.thumb > .thumb-badge.right { right: 5%; }
.thumb-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 1.4rem; font-weight: 800; }
.zoomable { cursor: zoom-in; }

/* Inline labels, chips and icons */
.rarity { font-weight: 800; }
.rarity[data-rarity="common"] { color: var(--common); }
.rarity[data-rarity="scarce"] { color: var(--scarce); }
.rarity[data-rarity="rare"] { color: var(--rare); }
.rarity[data-rarity="obsidian"] { color: var(--obsidian); }
.tags, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 7px; background: color-mix(in srgb, var(--tag-color, var(--muted)) 20%, var(--surface)); font-size: .78rem; font-weight: 700; }
.tag img { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 12px; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.chip:hover { border-color: color-mix(in srgb, var(--chip-color, var(--accent)) 60%, var(--border)); box-shadow: 0 2px 0 var(--shadow); }
.chip:active { box-shadow: none; }
.chip[aria-pressed="true"] { border-color: var(--chip-color, var(--accent)); background: var(--chip-color, var(--accent)); color: #fff; }
.chip[data-state="no"] { border-style: dashed; color: var(--muted); text-decoration: line-through; }
.chip.icon-only { width: 36px; padding: 0; justify-content: center; }
.chip.sound::before { content: "▶"; font-size: .7em; }
.chip.sound[aria-pressed="true"]::before { content: "■"; }
.chip[aria-disabled="true"] { border-style: dashed; color: var(--muted); cursor: default; }
.chip[aria-disabled="true"]:hover { box-shadow: none; }
.glyph { display: inline-block; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; vertical-align: -4px; }
.room { position: relative; overflow: hidden; margin: 14px 0; border: 2px solid var(--border); border-radius: 14px; background: var(--fill); box-shadow: 0 3px 0 var(--shadow); touch-action: none; }
.room-tools button[aria-pressed="true"] { transform: translate(-50%, -50%) scale(1.15); filter: drop-shadow(0 0 0 var(--accent)) drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.room-panel { position: absolute; right: 10px; bottom: 10px; left: 10px; max-height: 46%; overflow: auto; padding: 10px 12px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 0 var(--shadow); }
.room-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.room-panel-head .button { margin-left: auto; min-height: 30px; padding: 2px 12px; }
.room-panel .card { cursor: pointer; font: inherit; text-align: left; }
.room-panel .card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.room-tools button { position: absolute; padding: 0; border: 0; background: center / contain no-repeat; cursor: pointer; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); transition: transform .1s; }
.room-tools button:active { transform: translate(-50%, -50%) scale(.9); }
.room canvas { display: block; width: 100%; height: min(72vh, 760px); cursor: grab; }
.hint { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 2px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); font: italic 800 .75rem/1 Georgia, serif; cursor: help; vertical-align: 1px; }
.hint:hover, .hint[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.hint-text { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 20; width: max-content; max-width: 260px; padding: 8px 12px; border-radius: 10px; background: var(--text); color: var(--surface); font: 600 .82rem/1.4 var(--font); text-align: left; box-shadow: 0 3px 0 var(--shadow); transform: translateX(-50%); }
.hint:hover .hint-text, .hint[aria-expanded="true"] .hint-text { display: block; }
.icon { width: 20px; height: 20px; vertical-align: -4px; object-fit: contain; }
.swatch { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--border); vertical-align: -2px; }

/* Facts and rows */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 9px 4px; border-bottom: 2px dotted var(--border); }
.rows > li:last-child { border-bottom: 0; }
.rows > li > .thumb { flex: 0 0 46px; width: 46px; }
.rows .grow { flex: 1 1 220px; min-width: 0; }
.flash { animation: flash 1.4s ease-out; border-radius: 10px; }
@keyframes flash { 0%, 35% { background: color-mix(in srgb, var(--accent) 28%, transparent); } 100% { background: transparent; } }

/* Filters and forms */
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; margin-bottom: 14px; }
.field { display: grid; gap: 4px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.field.grow { flex: 1 1 260px; }
.filters { display: grid; gap: 10px; margin-bottom: 16px; }
.filter { display: grid; grid-template-columns: 96px 1fr; align-items: start; gap: 10px; }
.filter-label { padding-top: 6px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.more { display: block; margin: 16px auto 0; }

/* Interactive furniture states viewer */
.stage { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 20px; align-items: start; }
.stage-view { border: 2px solid var(--border); box-shadow: 0 4px 0 var(--shadow); }
.stage .strip { flex-wrap: wrap; }
.pick { width: 72px; padding: 4px; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; }
.pick[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* Calendar */
.calendar { overflow: hidden; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 0 var(--shadow); }
.cal-weekdays, .cal-days, .cal-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays span { padding: 8px 6px; color: var(--muted); font-size: .78rem; font-weight: 800; text-align: center; }
.cal-week { border-top: 2px solid var(--border); }
.cal-days > div { min-height: 28px; padding: 4px 7px; font-size: .8rem; font-weight: 700; }
.cal-days > div + div { border-left: 2px dotted var(--border); }
.cal-days > .outside { background: var(--fill); color: var(--muted); }
.cal-days > .today { color: var(--accent); }
.cal-days > .today::after { content: " today"; font-size: .7rem; }
.cal-bars { gap: 3px 0; padding: 0 3px 8px; }
.cal-bar { overflow: hidden; margin: 0 2px; padding: 1px 9px; border-radius: 4px; background: color-mix(in srgb, var(--group-color) 24%, var(--surface)); box-shadow: inset 3px 0 0 var(--group-color); font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.cal-bar:hover { background: color-mix(in srgb, var(--group-color) 40%, var(--surface)); color: inherit; }
.cal-mail { display: block; font-size: .7rem; }

/* Lightbox */
.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgb(20 14 28 / .82); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; grid-template: 1fr auto / auto 1fr auto; align-items: center; justify-items: center; gap: 12px; padding: 16px; }
.lightbox-stage { grid-column: 2; width: min(78vw, 78dvh, 760px); aspect-ratio: 1; position: relative; border-radius: 22px; background: radial-gradient(circle, rgb(255 255 255 / .16), rgb(255 255 255 / .04)); }
.lightbox-stage > img, .lightbox-stage > canvas { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; }
.lightbox-caption { grid-column: 1 / -1; text-align: center; font-weight: 700; }
.lightbox-caption small { display: block; opacity: .7; font-weight: 400; }
.lightbox button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .14); color: #fff; font-size: 1.5rem; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / .28); }
.lightbox-close { position: fixed; top: 16px; right: 16px; }

/* Raw table viewer */
.table-wrap { overflow: auto; max-height: 70vh; border: 2px solid var(--border); border-radius: 11px; background: var(--surface); }
.data-table { border-collapse: collapse; font-size: .78rem; }
.data-table th, .data-table td { max-width: 280px; padding: 5px 9px; overflow: hidden; border-bottom: 1px solid var(--border); text-align: left; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
.data-table th { position: sticky; top: 0; background: var(--fill); }

/* Version diff: field changes and old/new lines (del.change / ins.change) */
.diff { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 6px 0 0; font-size: .82rem; }
.diff dt { padding-top: 2px; color: var(--muted); font-weight: 700; }
.diff dd { display: grid; gap: 2px; margin: 0; }
.change { display: block; padding: 1px 8px 1px 22px; border-radius: 6px; text-decoration: none; text-indent: -14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.change::before { display: inline-block; width: 14px; text-indent: 0; font-weight: 800; }
del.change { background: color-mix(in srgb, var(--obsidian) 11%, transparent); }
del.change::before { content: "−"; color: var(--obsidian); }
ins.change { background: color-mix(in srgb, var(--mint) 13%, transparent); }
ins.change::before { content: "+"; color: var(--mint); }
.change mark { border-radius: 3px; color: inherit; }
del.change mark { background: color-mix(in srgb, var(--obsidian) 32%, transparent); }
ins.change mark { background: color-mix(in srgb, var(--mint) 38%, transparent); }
.rows .change { margin-top: 4px; }
.table-diff { display: grid; gap: 6px; }
.table-diff .table-wrap { max-height: 50vh; }

/* Motion: everything clickable lifts on hover and presses in on click, like
   the cards. Hover lifts only with a real pointer (a tap leaves :hover stuck
   on touch screens); text fields stay still. */
.card, .button, select, .chip, .pick, .hint, .site-nav a, .cal-bar, .lightbox button {
  transition: transform .12s ease, border-color .12s ease, background-color .15s ease, color .15s ease, box-shadow .12s ease;
}
@media (hover: hover) {
  a.card:hover, button.card:hover, .button:hover:not(:disabled), select:hover, .chip:hover:not([aria-disabled="true"]), .pick:hover,
  .hint:hover, .site-nav a:hover, .cal-bar:hover, .lightbox button:hover { transform: translateY(-2px); }
}
a.card:active, button.card:active, .button:active:not(:disabled), select:active, .chip:active:not([aria-disabled="true"]), .pick:active,
.hint:active, .site-nav a:active, .cal-bar:active, .lightbox button:active { transform: scale(.95); transition-duration: .05s; }

@media (max-width: 640px) {
  .diff { grid-template-columns: 1fr; }
  .diff dt { padding-top: 6px; }
  .room canvas { height: 62vh; }
  .hint-text { position: fixed; top: auto; bottom: 16px; left: 16px; right: 16px; max-width: none; width: auto; transform: none; }
  .page { padding-top: 18px; }
  h1 { font-size: 1.5rem; }
  .menu-toggle { display: inline-block; }
  .site-menu { display: none; flex-basis: 100%; gap: 12px; padding: 6px 0 4px; }
  .site-header.open .site-menu { display: grid; }
  .site-nav { flex-direction: column; }
  .site-nav a { padding: 8px 12px; }
  .site-tools { margin-left: 0; }
  .site-tools select { flex: 1 1 0; min-width: 0; }
  .site-search { max-width: none; }
  .detail-head, .detail-head.large, .stage { grid-template-columns: 1fr; }
  .detail-head > .thumb, .stage-view { max-width: 240px; }
  .grid { --min: 96px; gap: 8px; }
  .grid.large { --min: 140px; }
  .grid.small { --min: 80px; gap: 6px; }
  .grid.tiny { --min: 58px; gap: 5px; }
  .grid.links { --min: 150px; }
  .card { padding: 5px; border-radius: 9px; }
  .card-title { font-size: .74rem; }
  .card-meta { font-size: .66rem; }
  .filter { grid-template-columns: 1fr; gap: 4px; }
  .filter-label { padding: 0; }
  .cal-bar { padding: 0 5px; font-size: .66rem; }
  .cal-days > .today::after { content: ""; }
  .lightbox-stage { width: min(92vw, 70dvh); }
  .lightbox[open] { grid-template: 1fr auto auto / 1fr 1fr; }
  .lightbox-stage { grid-column: 1 / -1; }
  .lightbox-caption { grid-row: 2; }
  .lightbox-prev, .lightbox-next { grid-row: 3; }
  .lightbox-next { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .button, select, .chip, .pick, .hint, .site-nav a, .cal-bar, .lightbox button { transition: none; transform: none !important; } .flash { animation-duration: .01s; } }
