/* Self-hosted fonts (SIL Open Font License 1.1, see fonts/OFL-*.txt). No requests to third parties. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/fraunces-latin-full-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("fonts/fraunces-latin-full-italic.woff2") format("woff2"); }

:root {
  --bg: #f7f5f5;
  --surface: #ffffff;
  --surface-2: #f0ecec;
  --ink: #1d1517;
  --ink-2: #544a4d;
  --ink-3: #736a6d;
  --line: #e7e1e2;
  --line-2: #d5cdcf;
  /* Kronacher Wappenrot */
  --accent: #b5123f;
  --accent-ink: #fff;
  --accent-soft: #fbe4ea;
  --warn: #8f5a00;
  --warn-soft: #fbf0d9;
  --bad: #a1261b;
  --bad-soft: #fbe3e1;
  --hero-a: #2a1318;
  --hero-b: #5c0f24;
  --shadow: 0 1px 2px rgb(40 10 20 / 6%), 0 4px 16px rgb(40 10 20 / 6%);
  --shadow-lg: 0 12px 48px rgb(30 5 12 / 22%);
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --toolbar-h: 0px;

  --c-nachtleben: #7d2fd0;
  --c-feste: #d9651a;
  --c-musik: #d23c2c;
  --c-kultur: #c0367a;
  --c-ausflug: #3f8a3a;
  --c-politik: #5b6b80;
  --c-gesundheit: #0f9690;
  --c-sport: #1f8fd0;
  --c-familie: #c99100;
  --c-kirche: #7b5a45;
  --c-bildung: #3b5bdb;
  --c-treff: #9a7a2c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131012;
    --surface: #1c181a;
    --surface-2: #262023;
    --ink: #f4eef0;
    --ink-2: #c4babd;
    --ink-3: #968b8f;
    --line: #2f282b;
    --line-2: #3f363a;
    --accent: #f2627e;
    --accent-ink: #1c0a0f;
    --accent-soft: #3f1822;
    --warn: #f0b95a;
    --warn-soft: #3a2c12;
    --bad: #ff8a80;
    --bad-soft: #3e1b18;
    --hero-a: #1a1113;
    --hero-b: #3d0f1c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
    --c-nachtleben: #b07cf0;
    --c-feste: #f08a45;
    --c-musik: #f16a5a;
    --c-kultur: #e0679f;
    --c-ausflug: #6cbd5f;
    --c-politik: #93a3b8;
    --c-gesundheit: #3cc4bd;
    --c-sport: #62b8ee;
    --c-familie: #e8b93a;
    --c-kirche: #c09a82;
    --c-bildung: #8fa2f5;
    --c-treff: #cda85a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131012;
  --surface: #1c181a;
  --surface-2: #262023;
  --ink: #f4eef0;
  --ink-2: #c4babd;
  --ink-3: #968b8f;
  --line: #2f282b;
  --line-2: #3f363a;
  --accent: #f2627e;
  --accent-ink: #1c0a0f;
  --accent-soft: #3f1822;
  --warn: #f0b95a;
  --warn-soft: #3a2c12;
  --bad: #ff8a80;
  --bad-soft: #3e1b18;
  --hero-a: #1a1113;
  --hero-b: #3d0f1c;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
  --c-nachtleben: #b07cf0;
  --c-feste: #f08a45;
  --c-musik: #f16a5a;
  --c-kultur: #e0679f;
  --c-ausflug: #6cbd5f;
  --c-politik: #93a3b8;
  --c-gesundheit: #3cc4bd;
  --c-sport: #62b8ee;
  --c-familie: #e8b93a;
  --c-kirche: #c09a82;
  --c-bildung: #8fa2f5;
  --c-treff: #cda85a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--toolbar-h) + 12px); -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, label, summary, select { touch-action: manipulation; }
a { color: inherit; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
kbd { font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3); }

/* ---------- Top bar ---------- */
.bar { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.brand { font: 650 17px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; margin-right: 6px; border: 0; background: none; padding: 0; color: inherit; text-align: left; }
.brand span { color: var(--accent); }
.search {
  flex: 1; min-width: 0; max-width: 340px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
}
.search .i { color: var(--ink-3); width: 17px; height: 17px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.filter-toggle { height: 38px; padding: 0 12px; }
.filter-toggle[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.view-seg { flex: none; }
.view-seg button { padding: 6px 9px; }
.bar .icon-btn { width: 38px; height: 38px; flex: none; }

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.toolbar-inner { position: relative; max-width: 960px; margin: 0 auto; padding: 10px 16px 8px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 8px; margin: 0 -16px; scroll-padding-inline: 20px;
  mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  --c: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  flex: none;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip .i { width: 16px; height: 16px; color: var(--c); }
.chip small { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--c); }
.chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chip[aria-pressed="true"] .i, .chip[aria-pressed="true"] small { color: rgb(255 255 255 / 85%); }
/* Dark text on the light dark-mode category colours; visibility chips (.vis) keep --ink on a tinted surface */
:root[data-theme="dark"] .chip:not(.vis)[aria-pressed="true"], :root[data-theme="dark"] .chip:not(.vis)[aria-pressed="true"] .i, :root[data-theme="dark"] .chip:not(.vis)[aria-pressed="true"] small { color: #140c0f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip:not(.vis)[aria-pressed="true"],
  :root:not([data-theme="light"]) .chip:not(.vis)[aria-pressed="true"] .i,
  :root:not([data-theme="light"]) .chip:not(.vis)[aria-pressed="true"] small { color: #140c0f; }
}
.chip.is-empty { opacity: .45; }
/* Category bar: "Alle" or a focus on single categories; hidden or empty categories stay reachable but muted */
.chip.all { --c: var(--ink); font-weight: 600; padding: 5px 13px; }
.chip.all[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.is-muted { border-style: dashed; color: var(--ink-3); }
.chip.is-muted .i { opacity: .6; }
.chip.sub[aria-pressed="true"] { background: var(--c); border-color: var(--c); }
.hidden-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 6px; font-size: 12.5px; color: var(--ink-3); }
.hidden-note .i { width: 15px; height: 15px; }
.subchips { padding-top: 0; }
.chip.sub { font-size: 12.5px; padding: 4px 10px; background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-color: color-mix(in srgb, var(--c) 35%, var(--line-2)); }

.daystrip-wrap { display: flex; gap: 8px; align-items: stretch; }
.month-btn {
  flex: none;
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 10px; padding: 0 10px;
  font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--ink-2);
}
.month-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.daystrip { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; flex: 1; scroll-behavior: smooth; }
.daystrip::-webkit-scrollbar { display: none; }
.day-btn {
  flex: 1 0 34px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1px solid transparent; background: none;
  border-radius: 10px;
  padding: 4px 0 5px;
  min-width: 34px;
}
.day-btn .wd { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.day-btn .dn { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.day-btn .bar { width: 18px; height: 3px; border-radius: 3px; background: var(--line-2); position: relative; overflow: hidden; }
.day-btn .bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--f, 0)); border-radius: 3px; }
.day-btn.we .wd, .day-btn.we .dn { color: var(--accent); }
.day-btn:hover { background: var(--surface-2); }
.day-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.day-btn[aria-pressed="true"] .wd, .day-btn[aria-pressed="true"] .dn { color: var(--bg); }
.day-btn[aria-pressed="true"] .bar { background: rgb(128 128 128 / 40%); }
.day-btn.zero { opacity: .35; }

/* ---------- Layout ---------- */
.filters {
  display: none;
  position: absolute; left: 16px; right: 16px; top: calc(100% + 6px); z-index: 30;
  max-height: calc(100vh - var(--toolbar-h) - 24px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 16px 20px;
}
.filters.open { display: block; animation: fade .15s; }
.sheet-grab { display: none; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 24px; }
.filters-grid fieldset { border-top: 0; align-content: start; align-items: start; }
.filters-grid .toggles { align-items: flex-start; }
.filters-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.filters-head h2 { font: 650 20px/1.2 var(--display); margin: 0; }
.filters-head .link-btn { margin-left: auto; }
.filters .filters-close { margin-left: 8px; }
.filters-grid .wide { grid-column: 1 / -1; }
.filters .chips { flex-wrap: wrap; overflow: visible; mask-image: none; margin: 0; padding: 0 0 8px; }
.filters-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 8px; }
.toolbar .active { padding-bottom: 8px; }
.minical { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mc-wd { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding-bottom: 2px; }
.minical .day-btn { min-width: 0; padding: 4px 0 5px; }
.day-btn.past { opacity: .3; }
.results.has-more #ongoing, .results.has-more #undated { display: none !important; }
.more { height: 1px; }
.results.has-more .more { height: 80px; }
fieldset { border: 0; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
fieldset:first-of-type { border-top: 0; }
legend { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.count .link-btn { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.count .link-btn .i { width: 15px; height: 15px; }

.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; border-radius: 8px; padding: 6px 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.seg .i { width: 16px; height: 16px; }
.filters .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filters .seg button { white-space: normal; line-height: 1.2; padding: 6px 4px; font-size: 12.5px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggles button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 500; }
.toggles button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
select { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { flex: none; width: 34px; height: 20px; border-radius: 20px; background: var(--line-2); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch b { color: var(--ink-3); font-weight: 500; }
.hint { margin: -4px 0 0 44px; font-size: 12px; color: var(--ink-3); line-height: 1.4; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn b { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; padding: 1px 6px; }
.btn b:empty { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.icon-btn:hover { border-color: var(--ink-3); }

/* ---------- Results ---------- */
.results { max-width: 960px; margin: 0 auto; padding: 12px 16px 40px; outline: none; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; min-height: 28px; }
.count { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-3); }
.active { display: flex; flex-wrap: wrap; gap: 6px; }
.active:empty { display: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--ink); border: 0; border-radius: 99px; padding: 3px 6px 3px 10px; font-size: 12.5px; font-weight: 500; }
.pill .i { width: 14px; height: 14px; opacity: .6; }
.pill:hover .i { opacity: 1; }

.section-title { font: 650 22px/1.2 var(--display); margin: 0 0 12px; letter-spacing: -.01em; }
.section-title span { font: 500 14px var(--font); color: var(--ink-3); margin-left: 4px; }
.section-sub { margin: -6px 0 14px; color: var(--ink-3); font-size: 13.5px; }

.catlabel { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c); }
.catlabel .i { width: 14px; height: 14px; }

/* Ongoing */
.ongoing { margin-top: 36px; padding-top: 24px; border-top: 2px solid var(--ink); }
.og-track { grid-auto-columns: minmax(230px, 280px); }
.og-card { --c: var(--accent); scroll-snap-align: start; text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); border-radius: 12px; padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.og-card:hover { border-color: var(--c); }
.og-img { width: calc(100% + 28px); margin: -12px -14px 6px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px 8px 0 0; display: block; }
.og-card strong { font-size: 14.5px; line-height: 1.3; }
.og-card .when { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.og-card .where { font-size: 12.5px; color: var(--ink-3); }

/* Agenda */
.day { margin-bottom: 26px; content-visibility: auto; contain-intrinsic-size: auto 600px; }
.day-head {
  /* Tucked 1px under the sticky top bar, with a strip of page colour above it, so no events show between the two */
  position: sticky; top: calc(var(--toolbar-h) - 1px); z-index: 5;
  box-shadow: 0 -4px 0 var(--bg);
  display: flex; align-items: center; gap: 12px;
  background: var(--bg);
  padding: 10px 0 8px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 4px;
}
.day-num { font: 650 34px/1 var(--display); min-width: 44px; font-variant-numeric: tabular-nums; }
.day-head.we .day-num { color: var(--accent); }
.day-name { font-weight: 700; font-size: 15px; }
.day-sub { font-size: 12.5px; color: var(--ink-3); }
.day-sub em { font-style: normal; color: var(--accent); font-weight: 600; }
.day-count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { position: relative; border-bottom: 1px solid var(--line); }
.row {
  --c: var(--accent);
  display: grid; grid-template-columns: 62px 4px minmax(0, 1fr) auto; gap: 0 14px; align-items: start;
  width: 100%; text-align: left; border: 0; background: none; padding: 12px 44px 12px 6px; border-radius: 10px;
}
.row:hover { background: var(--surface); }
.row.has-img { grid-template-columns: 62px 4px 56px minmax(0, 1fr) auto; }
.thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row .time { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; padding-top: 1px; line-height: 1.25; }
.row .time small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-3); }
.row .time.open { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.row .stripe { align-self: stretch; border-radius: 4px; background: var(--c); opacity: .9; }
.row .title { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
mark { background: color-mix(in srgb, var(--accent) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.row .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.row .meta .where { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.row .meta .where .i { width: 14px; height: 14px; color: var(--ink-3); }
.row .times { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.row.cancelled .title { text-decoration: line-through; color: var(--ink-3); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 200px; padding-top: 1px; }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.acc { background: var(--accent-soft); color: var(--accent); }
.badge .i { width: 12px; height: 12px; }
.star { position: absolute; right: 6px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; color: var(--ink-3); opacity: .55; }
.star:hover { opacity: 1; background: var(--surface-2); }
.star .i { width: 18px; height: 18px; }
.star[aria-pressed="true"] { opacity: 1; color: #e0a100; }
.star[aria-pressed="true"] .i { fill: currentColor; }
.hide-btn { position: absolute; right: 6px; top: 40px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; color: var(--ink-3); opacity: .45; }
.hide-btn .i { width: 17px; height: 17px; }
.hide-btn:hover, .hide-btn:focus-visible { opacity: 1; background: var(--surface-2); color: var(--ink); }
@media (hover: hover) {
  .rows > li .hide-btn { opacity: 0; }
  .rows > li:hover .hide-btn, .rows > li:focus-within .hide-btn { opacity: .6; }
  .rows > li .hide-btn:hover { opacity: 1; }
}
.catlabel.hideable { cursor: pointer; border-radius: 4px; }
/* Phones and touch: the label in the list is plain text; hiding lives in the opened event only */
@media (hover: none), (max-width: 640px) {
  .catlabel.hideable { pointer-events: none; cursor: inherit; }
  .catlabel.hideable .eye { display: none; }
}
.catlabel.hideable .eye { width: 13px; height: 13px; opacity: 0; transition: opacity .12s; }
@media (hover: hover) {
  .catlabel.hideable:hover { text-decoration: underline; text-underline-offset: 3px; }
  .catlabel.hideable:hover .eye { opacity: .8; }
}

.toast button { border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; padding: 0; white-space: nowrap; }

/* Hide menu */
.hide-menu { position: fixed; z-index: 70; min-width: 250px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; animation: fade .12s; }
.hm-h { margin: 4px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.hide-menu button { --c: var(--ink-2); display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font-size: 14px; font-weight: 500; }
.hide-menu button .i { color: var(--c); }
.hide-menu button:hover, .hide-menu button:focus-visible { background: var(--surface-2); }

/* Visibility chips: on = normal, off = greyed, struck through, eye-off */
.chip.vis .eye { display: none; width: 15px; height: 15px; color: var(--ink-3); }
.chip.vis[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 10%, var(--surface)); border-color: color-mix(in srgb, var(--c) 45%, var(--line-2)); color: var(--ink); }
.chip.vis[aria-pressed="true"] .i:not(.eye) { color: var(--c); }
.chip.vis[aria-pressed="true"] small { color: var(--ink-3); }
.chip.vis.is-hidden { background: var(--surface-2); border-color: var(--line); border-style: dashed; color: var(--ink-3); }
.chip.vis.is-hidden span, .chip.vis.is-hidden:not(:has(span)) { text-decoration: line-through; }
.chip.vis.is-hidden .i:not(.eye) { color: var(--ink-3); opacity: .6; }
.chip.vis.is-hidden .eye { display: inline; }
.chip.vis:disabled { opacity: .5; cursor: not-allowed; }
.hint-line { margin: -4px 0 2px; font-size: 12.5px; color: var(--ink-3); }
.subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 20px; padding: 6px 0 4px; }
.subgroup { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; }
.subgroup-h { width: 100%; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--c); }
.subgroup-h .i { width: 14px; height: 14px; }
.chip.sub.vis.is-hidden { text-decoration: line-through; }

/* Hidden-category pills: grey + eye-off, distinct from filter pills */
.pill.hid { background: var(--surface-2); color: var(--ink-2); border: 1px dashed var(--line-2); }
.pill.hid .i:first-child { width: 14px; height: 14px; opacity: .7; }
#hiddenList { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* First-visit tip */
.tip { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; color: var(--ink); }
.tip > .i { color: var(--accent); flex: none; }
.tip span { flex: 1; }
.tip .icon-btn { width: 30px; height: 30px; background: none; border: 0; }
.more-row { padding: 10px 6px; }

/* Month grid */
.month { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.month .wd { background: var(--surface-2); padding: 8px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cell { background: var(--surface); min-height: 128px; padding: 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell.blank { background: var(--surface-2); opacity: .5; }
.cell-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; border: 0; background: none; padding: 0 0 2px; text-align: left; width: 100%; }
.cell-head b { font: 650 18px/1 var(--display); }
.cell.we .cell-head b { color: var(--accent); }
.cell-head small { font-size: 11px; color: var(--ink-3); }
.cell-head:hover b { text-decoration: underline; }
.cell-ev { --c: var(--accent); display: block; width: 100%; text-align: left; border: 0; background: color-mix(in srgb, var(--c) 12%, transparent); border-left: 3px solid var(--c); border-radius: 4px; padding: 2px 5px; font-size: 11.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cell-ev:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }
.cell-ev b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cell-more { border: 0; background: none; padding: 1px 2px; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--accent); }
.cell-dots { display: none; flex-wrap: wrap; gap: 3px; }
.cell-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cell.sel { box-shadow: inset 0 0 0 2px var(--ink); }

.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); }
.empty strong { display: block; font: 650 22px var(--display); color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.undated { margin-top: 36px; padding-top: 24px; border-top: 2px solid var(--ink); }

.foot { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }
.foot strong { color: var(--ink-2); }
.foot-sub { margin-top: 6px; }

/* ---------- Drawer ---------- */
.backdrop { position: fixed; inset: 0; background: rgb(18 8 12 / 45%); z-index: 40; animation: fade .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(520px, 100%);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slide .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
.drawer-bar { position: absolute; top: 12px; right: 12px; z-index: 2; }
.drawer-bar .icon-btn { background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(8px); }
.drawer-body { overflow-y: auto; flex: 1; overscroll-behavior: contain; display: flex; flex-direction: column; }
.drawer-body > * { flex-shrink: 0; }
.d-media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #000), color-mix(in srgb, var(--c) 55%, #fff)); position: relative; overflow: hidden; }
.d-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-media.noimg { aspect-ratio: auto; height: 72px; }
.d-media .i { position: absolute; right: 18px; bottom: -22px; width: 120px; height: 120px; color: rgb(255 255 255 / 22%); stroke-width: 1.2; }
.d-content { padding: 20px 24px 28px; display: grid; gap: 22px; }
.d-head { display: grid; gap: 8px; }
.d-title { font: 650 26px/1.18 var(--display); margin: 0; letter-spacing: -.01em; }
.d-sub { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.45; }
.d-cat { display: inline-flex; align-items: center; gap: 5px; color: var(--c); font-weight: 600; }
.d-cat .i { width: 15px; height: 15px; }
/* Quick actions: one calm row of icon buttons instead of a grid of bordered buttons */
.d-quick { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.qa { display: grid; justify-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--ink-2); font-size: 12px; font-weight: 500; line-height: 1.2; text-align: center; border-radius: 12px; }
.qa .i { box-sizing: content-box; width: 20px; height: 20px; padding: 11px; border-radius: 50%; background: var(--surface-2); color: var(--ink); }
.qa[aria-pressed="true"] .i { color: #e0a100; fill: currentColor; }
@media (hover: hover) { .qa:hover .i { background: color-mix(in srgb, var(--ink) 10%, var(--surface-2)); } }
.alert { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: var(--warn-soft); color: var(--ink); }
.alert .i { color: var(--warn); margin-top: 1px; }
.alert.bad { background: var(--bad-soft); }
.alert.bad .i { color: var(--bad); }
.facts { display: grid; margin: 0; border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 20px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fact > .i { color: var(--ink-3); margin-top: 1px; width: 19px; height: 19px; }
.fact b { display: block; font-weight: 600; line-height: 1.35; }
.fact span { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13.5px; line-height: 1.4; }
.fact-link { display: inline-block; margin-top: 4px; color: var(--accent); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.fact-link:hover { text-decoration: underline; }
.d-summary { font-size: 15px; line-height: 1.6; margin: 0; white-space: pre-line; color: var(--ink-2); }
/* Dates grouped per day */
.d-dates { display: grid; }
.d-dates .d-h span { margin-left: 4px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.dday { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.dday.extra { display: none; }
.d-dates.all .dday.extra { display: grid; }
.dday-d { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dday-t { display: flex; flex-wrap: wrap; gap: 6px; }
.dt { min-height: 34px; padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-size: 13px; font-variant-numeric: tabular-nums; }
.dt[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.d-dates > .link-btn { justify-self: start; margin-top: 10px; }
/* Background details at the end of the event */
.d-more { font-size: 13px; color: var(--ink-3); }
.d-more .d-h { margin: 0; }
.d-more p:not(.d-h), .d-more ul { margin: 8px 0 0; line-height: 1.5; }
.d-more ul { padding-left: 18px; }
.d-more b { color: var(--ink-2); }
/* Main action pinned to the bottom of the sheet */
.d-cta { margin-top: auto; position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.d-cta .btn { min-height: 46px; }
.d-cta .btn.primary { flex: 1; font-size: 15px; }
.d-h { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }

/* ---------- Merkliste & Einstellungen ---------- */
.mine-open { position: relative; }
.mine-open b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.mine-open b:empty { display: none; }
.mine { z-index: 48; } /* event details (z 50) open on top of it */
.mine-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.mine-head h2 { font: 650 24px/1.2 var(--display); margin: 0; letter-spacing: -.01em; }
.mine-content { padding: 8px 20px 32px; display: grid; gap: 20px; }
.mine-content > #mineList { display: grid; gap: 12px; justify-items: start; }
.mine-content .rows { width: 100%; }
.mine-empty { width: 100%; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 16px; margin-top: 12px; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.mine-empty .i { width: 26px; height: 26px; color: var(--accent); }
.mine-empty p { margin: 0; font-size: 14px; }
.mine-past { width: 100%; }
.mine-past summary { cursor: pointer; padding: 10px 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mine-settings { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.mine-settings .d-h { margin: 0; }
.setting { display: grid; gap: 8px; }
.setting-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.setting-label .link-btn { margin-left: auto; }
.mine-note { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.mine-hidden { display: flex; flex-wrap: wrap; gap: 6px; }
.mine .seg button { padding: 8px 6px; }
.mine .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.btn[data-fav][aria-pressed="true"] .i { color: #e0a100; fill: currentColor; }
.mine-privacy { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.mine-privacy .i { width: 16px; height: 16px; flex: none; margin-top: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .theme-anim, .theme-anim * { transition: background-color .25s, color .25s, border-color .25s !important; }
}

.toast { display: flex; align-items: center; gap: 14px; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; z-index: 60; box-shadow: var(--shadow-lg); animation: fade .2s; }

/* ---------- Calendar chooser ---------- */
.cal-menu { position: fixed; z-index: 70; width: 320px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px; display: grid; gap: 4px; animation: fade .12s; }
.cal-h { margin: 2px 6px 0; font-weight: 700; font-size: 15px; }
.cal-what { margin: 0 6px 6px; font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.cal-options { display: grid; gap: 2px; }
.cal-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 10px; background: none; color: inherit; text-decoration: none; font-size: 14px; }
.cal-opt .i { color: var(--accent); }
.cal-opt b { display: block; font-weight: 600; }
.cal-opt small { display: block; font-size: 12px; color: var(--ink-3); }
.cal-opt:hover, .cal-opt:focus-visible { background: var(--surface-2); }
.cal-cancel { display: none; }

/* ---------- Install as app ---------- */
.install-card { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: sheet-up .3s cubic-bezier(.2, .8, .2, 1); }
.install-card img { border-radius: 10px; flex: none; }
.install-title { margin: 0; font-weight: 700; font-size: 15px; }
.install-text { margin: 2px 0 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.install-text .i, #installText .i { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent); }
.install-actions { display: flex; gap: 8px; }
.install-actions .btn { min-height: 40px; }
.install-btn { justify-self: start; }

/* ---------- Legal (Impressum, Datenschutz) ---------- */
/* Deliberately quiet: small links at the end of the settings and the footer, plain text pages. */
.legal-links { margin: 0; font-size: 12px; color: var(--ink-3); }
.legal-links a { color: inherit; text-underline-offset: 2px; }
.mine .legal-links { text-align: center; }
.legal { max-width: 720px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-left)) 64px; font-size: 15px; line-height: 1.6; }
.legal h1 { font: 650 30px/1.2 var(--display); margin: 18px 0 6px; letter-spacing: -.01em; }
.legal h2 { font-size: 16px; margin: 26px 0 6px; }
.legal p, .legal ul { margin: 0 0 10px; color: var(--ink-2); }
.legal strong { color: var(--ink); }
.legal a { color: var(--accent); }
.legal code { font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.legal-back { display: inline-block; font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 0; }
.legal-date { font-size: 13px; }
.legal-foot { margin-top: 32px !important; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }

/* ---------- Touch ---------- */
@media (hover: none) {
  /* No sticky hover highlights after a tap; give pressed feedback instead */
  .row:hover, .day-btn:hover { background: none; }
  .og-card:hover { border-color: var(--line); }
  .cell-ev:hover { background: color-mix(in srgb, var(--c) 12%, transparent); }
  .chip:hover { border-color: var(--line-2); }
  .btn:hover, .icon-btn:hover { border-color: var(--line-2); }
  .link-btn:hover { text-decoration: none; }
  .row:active, .day-btn:active { background: var(--surface-2); }
  .chip:active, .btn:active, .icon-btn:active, .seg button:active, .toggles button:active, .dt:active, .qa:active, .og-card:active { transform: scale(.96); }
  .chip, .btn, .icon-btn, .seg button, .toggles button, .dt, .qa, .og-card { transition: transform .08s, background .15s, border-color .15s, color .15s; }
}

/* ---------- Responsive ---------- */
/* Mouse users get the whole category bar at once instead of a sideways scroller */
@media (min-width: 901px) {
  .toolbar .chips { flex-wrap: wrap; overflow: visible; mask-image: none; }
}
@media (max-width: 900px) {
  /* backdrop-filter would make the toolbar the containing block of the fixed sheet */
  .toolbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  /* the sheet lives inside the sticky toolbar's stacking context: lift it above the backdrop */
  .toolbar:has(.filters.open) { z-index: 45; }
  .filters {
    display: block;
    position: fixed; inset: auto 0 0 0; top: auto; z-index: 55;
    max-height: 86vh; max-height: 88dvh; border-radius: 20px 20px 0 0; border: 0;
    overscroll-behavior: contain;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    visibility: hidden;
  }
  .filters.open { transform: none; visibility: visible; animation: none; }
  .filters-foot { position: sticky; bottom: 0; background: var(--surface); padding-top: 8px; }
  .filters-foot .filters-apply { flex: 1; min-height: 46px; font-size: 15px; }
  .filters .sheet-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 10px; }
  .filters-head { position: sticky; top: -8px; z-index: 2; background: var(--surface); margin: 0 -16px 6px; padding: 4px 16px 8px; }
  /* Comfortable touch targets */
  .toggles button, .seg button { min-height: 40px; }
  .filters .chip { min-height: 36px; }
  select { min-height: 44px; font-size: 16px; }
  .switch { min-height: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  /* 16px stops iOS from zooming into the field on focus */
  .search input { font-size: 16px; }
  .toolbar-inner, .results, .foot { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .toolbar .chip { min-height: 34px; }
  .star { width: 40px; height: 40px; right: 0; top: 4px; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }

  /* Details and Merkliste become bottom sheets: swipe down or use back to close */
  .drawer {
    top: auto; left: 0; right: 0; width: 100%;
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px - env(safe-area-inset-top));
    border-radius: 18px 18px 0 0; overflow: hidden;
    animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1);
  }
  .drawer .sheet-grab { display: block; position: absolute; z-index: 3; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 30%, transparent); }
  .drawer-bar { top: 14px; right: 12px; }
  .drawer-body:not(:has(.d-cta)) { padding-bottom: env(safe-area-inset-bottom); }
  .d-media.noimg { height: 56px; }
  .d-cta { padding-left: 16px; padding-right: 16px; }
  .mine { height: auto; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px - env(safe-area-inset-top)); }
  .mine .sheet-grab { position: static; margin: 8px auto 0; }
  .mine-head { padding-top: 8px; }
  .mine-content { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .mine .seg button { min-height: 42px; }
  /* Calendar chooser as an action sheet over the details */
  .cal-menu {
    left: 0; right: 0; bottom: 0; width: 100%; max-width: none;
    border-radius: 18px 18px 0 0; border: 0; padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 0 0 100vmax rgb(10 5 8 / 45%);
    animation: sheet-up .24s cubic-bezier(.2, .8, .2, 1);
  }
  .cal-menu .sheet-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 8px; }
  .cal-opt { min-height: 54px; }
  .cal-cancel { display: flex; margin-top: 6px; min-height: 46px; }
  .brand { font-size: 15px; margin-right: 0; }
  .brand span { display: block; margin-top: 2px; }
  .bar { gap: 6px; }
  .filter-toggle { padding: 0 10px; }
  .view-seg button { padding: 6px 7px; }
  .search kbd { display: none; }
  .toolbar-inner { padding: 8px 16px 6px; }
  .chip { padding: 5px 10px 5px 8px; font-size: 13px; }
  .month-btn { font-size: 10.5px; padding: 0 7px; }
  .day-btn { flex-basis: 36px; }
  .row { grid-template-columns: 50px 3px minmax(0, 1fr); gap: 0 10px; padding: 11px 40px 11px 2px; }
  .row .time { font-size: 13.5px; }
  .row.has-img { grid-template-columns: 50px 3px 44px minmax(0, 1fr); }
  .row.has-img .badges { grid-column: 4; }
  .thumb { width: 44px; height: 44px; }
  .row .badges { grid-column: 3; justify-content: flex-start; max-width: none; margin-top: 6px; }
  .day-num { font-size: 28px; min-width: 36px; }
  .cell { min-height: 64px; padding: 5px; }
  .cell-ev, .cell-more { display: none; }
  .cell-dots { display: flex; }
  .cell-head b { font-size: 15px; }
  .cell-head small { display: none; }
  .month .wd { padding: 6px 4px; text-align: center; font-size: 10px; }
  .drawer { width: 100%; }
  .d-content { padding: 18px 16px 28px; }
  .d-title { font-size: 23px; }
  .mine-head { padding: 14px 16px 10px; }
  .mine-content { padding: 6px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .toolbar, .filters, .star, .ongoing { display: none !important; }
  .day-head { position: static; }
}
