/* The event website. Same black-and-white language as the wall: hairlines and type,
   black buttons by day and white buttons at night, red only for "today", "now" and delete. */

:root {
  --bg: #ffffff;
  --raised: #ffffff;
  --field: #ffffff;
  --soft: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #a1a1a6;
  --line: #e5e5ea;
  --accent: #ff3b30;
  --focus: #0071e3;
  --btn-bg: #1d1d1f;
  --btn-fg: #ffffff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  --radius: 12px;
  --hour: 52px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --raised: #1c1c1e;
    --field: #1c1c1e;
    --soft: #1c1c1e;
    --ink: #f5f5f7;
    --ink-2: #98989d;
    --ink-3: #636366;
    --line: #2c2c2e;
    --accent: #ff453a;
    --focus: #2997ff;
    --btn-bg: #f5f5f7;
    --btn-fg: #000000;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter Variable", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; } /* a dialog's own starting point, not something to press */

.muted { color: var(--ink-2); }
.icon { flex: none; display: block; }

/* -- buttons and fields ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  font-weight: 500;
  white-space: nowrap;
}

.btn:hover { background: var(--soft); }
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.btn.primary:hover { opacity: 0.88; }
.btn.danger { color: var(--accent); }
.btn.danger-solid { background: var(--accent); color: #fff; border-color: transparent; }
.btn.ghost { border-color: transparent; }
.btn.icon-only { width: 36px; padding: 0; }
.btn.large { height: 44px; padding: 0 20px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: 0.45; cursor: default; }
a.btn { color: inherit; text-decoration: none; }
a.btn.primary { color: var(--btn-fg); }
label.btn { cursor: pointer; }

.field {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
}

textarea.field { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
select.field { padding-right: 32px; }
.field:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }

.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: var(--line); transition: background 0.2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; }

/* -- sign in ---------------------------------------------------------------------- */

.auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card { width: min(380px, 100%); }
.auth-card h1 { margin: 18px 0 6px; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card p { margin: 0 0 24px; color: var(--ink-2); }
.auth-card .field { height: 54px; font-size: 26px; letter-spacing: 0.3em; text-align: center; border-radius: 14px; }
.auth-card .btn { width: 100%; margin-top: 14px; }
.auth-card .error { min-height: 20px; margin-top: 12px; color: var(--accent); font-size: 14px; }
.auth-card label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 14px; }
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-variant-numeric: tabular-nums;
}
.brand-mark .mon { font-size: 9px; font-weight: 700; line-height: 1; color: var(--accent); }
.brand-mark .day { font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }

/* -- layout ----------------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100%;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
  padding: 20px 18px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; }
.brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.brand .brand-mark .day { font-size: 15px; }
.brand .brand-mark .mon { font-size: 7.5px; }

.rail .new-event { height: 40px; width: 100%; }

.mini { user-select: none; }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 600; }
.mini-head .btn { width: 28px; height: 28px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mini-grid .wd { color: var(--ink-3); font-weight: 600; padding: 4px 0; }
.mini-grid button { height: 30px; border: 0; background: none; border-radius: 15px; }
.mini-grid button.other { color: var(--ink-3); }
@media (hover: hover) { .mini-grid button:hover { background: var(--soft); } }
/* Week view's week and Day view's day are filled the same solid color. */
.mini-grid button.in-week { background: var(--ink); color: var(--bg); font-weight: 700; border-radius: 0; box-shadow: -1px 0 0 var(--ink); }
.mini-grid button.in-week.other { color: color-mix(in srgb, var(--bg) 55%, var(--ink)); }
.mini-grid button.in-week.first { border-radius: 15px 0 0 15px; }
.mini-grid button.in-week.last { border-radius: 0 15px 15px 0; }
.mini-grid button.selected { background: var(--ink); color: var(--bg); font-weight: 700; }
.mini-grid button.today { background: var(--accent); color: #fff; font-weight: 700; border-radius: 15px; }
/* Today inside the week band: the red circle sits on the band without gaps around it. */
.mini-grid button.in-week.today { background: radial-gradient(circle, var(--accent) 0 14px, var(--ink) 14.5px); border-radius: 0; }
.mini-grid button.in-week.today.first { border-radius: 15px 0 0 15px; }
.mini-grid button.in-week.today.last { border-radius: 0 15px 15px 0; }
.mini-grid button.in-week.first { box-shadow: none; }

.rail h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rail-people ul, .rail-nav { list-style: none; margin: 0; padding: 0; }
.rail-people li label { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.rail-people li label:hover { background: var(--soft); }
.rail-people input { appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 2px solid var(--c); background: var(--c); display: grid; place-items: center; cursor: pointer; }
.rail-people input:not(:checked) { background: transparent; }
.rail-people input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.rail-people .add-person { color: var(--ink-2); font-size: 14px; padding: 6px 4px; border: 0; background: none; }

.rail-nav { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.rail-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 500; }
.rail-nav a:hover { background: var(--soft); }
.rail-nav a.active { background: var(--soft); font-weight: 600; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 12px;
  flex-wrap: wrap;
}

.topbar h1 { margin: 0 8px 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.nav-buttons { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar .spacer { flex: 1; }

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--soft); }
.segmented button { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-weight: 500; color: var(--ink-2); }
.segmented button.on { background: var(--raised); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

.search { position: relative; width: 220px; }
.search .icon { position: absolute; left: 10px; top: 10px; color: var(--ink-3); }
.search input { padding-left: 34px; height: 38px; }

.quick { padding: 0 24px 14px; }
.quick-box { display: flex; gap: 8px; }
.quick-box input { height: 44px; font-size: 16px; border-radius: 12px; }
.quick-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--soft); font-size: 13.5px; font-weight: 500; }
.chip i { width: 9px; height: 9px; border-radius: 5px; background: var(--c); }

.content { flex: 1; min-height: 0; overflow: auto; padding: 0 24px 24px; }

.tabbar, .fab { display: none; }

/* -- pills (Google Calendar style) ------------------------------------------------ */

.pill {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 11px;
  background: var(--c);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) { .pill { background: color-mix(in srgb, var(--c) 84%, #000); } }
.pill .t { font-weight: 500; opacity: 0.88; flex: none; font-variant-numeric: tabular-nums; }
.pill .name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pill.holiday { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; cursor: default; }
.pill.holiday.birthday { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--c); cursor: pointer; }
.pill.past { opacity: 0.5; }
.pill .badges { display: flex; margin-left: auto; flex: none; }
.badge { display: grid; place-items: center; width: 16px; height: 16px; margin-left: -3px; border-radius: 8px; background: var(--pc); color: #fff; font-size: 9.5px; font-weight: 700; box-shadow: 0 0 0 1.5px var(--c); }

/* -- month view ------------------------------------------------------------------- */

.month { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 560px; }
.month-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 0 8px; }
.month-wd span { padding-left: 10px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(110px, 1fr); border-top: 1px solid var(--line); }
.mday { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 0; overflow: hidden; padding: 6px 6px 8px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer; }
.mday:nth-child(7n + 1) { border-left: 0; }
.month-grid { position: relative; }
.month-grid .mday { z-index: 1; } /* above the photo, which is the grid's last child */
.month-grid.has-photo .mday.other { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.month-grid.has-photo .mday .num { text-shadow: 0 0 6px var(--bg), 0 0 2px var(--bg); }
.month-grid.has-photo .mday.today .num { text-shadow: none; }
.mday > * { flex-shrink: 0; } /* events keep their height; ones that don't fit move into "+N more" */
.mday.other { background: color-mix(in srgb, var(--soft) 60%, transparent); }
.mday.other .num, .mday.past .num { color: var(--ink-3); }
.mday.drop { box-shadow: inset 0 0 0 2px var(--focus); }
.mday .num { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; white-space: nowrap; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mday.today .num { background: var(--accent); color: #fff; }
.mday .more { border: 0; background: none; color: var(--ink-3); font-size: 12.5px; font-weight: 600; text-align: left; padding: 2px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; }
.mday .more:hover { color: var(--ink-2); }
.mday .more:hover { background: var(--soft); }
.pill[draggable="true"] { cursor: grab; }

/* -- week / day view -------------------------------------------------------------- */

.tg { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100%; min-height: 0; }
.tg-head, .tg-allday, .tg-body { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); }
.tg-head, .tg-allday { padding-right: var(--sbw, 0px); }
.tg-head { padding-bottom: 8px; }
.tg-head .d { padding-left: 8px; display: flex; align-items: baseline; gap: 6px; }
.tg-head .d .wd { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tg-head .d .n { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tg-head .d.today .n { color: #fff; background: var(--accent); border-radius: 16px; min-width: 32px; height: 32px; display: inline-grid; place-items: center; font-size: 17px; }
.tg-head .d.today .wd { color: var(--accent); }
.tg-head .d.past .wd, .tg-head .d.past .n { color: var(--ink-3); }
.tg-allday { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 30px; }
.tg-allday .label { font-size: 11px; color: var(--ink-3); text-align: right; padding: 7px 8px 0 0; }
.tg-allday .col { display: flex; flex-direction: column; gap: 2px; padding: 4px 3px; border-left: 1px solid var(--line); min-width: 0; }
.tg-scroll { overflow-y: auto; min-height: 0; position: relative; }
.tg-body { position: relative; height: calc(var(--hour) * 24); }
.tg-hours { position: relative; }
.tg-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)); touch-action: pan-y; }
.tg-col.today { background-color: color-mix(in srgb, var(--accent) 3%, transparent); }
.block { position: absolute; left: 2px; right: 2px; padding: 3px 6px; border-radius: 7px; background: var(--c); color: var(--fg); font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; user-select: none; box-shadow: 0 0 0 1px var(--bg); }
@media (prefers-color-scheme: dark) { .block { background: color-mix(in srgb, var(--c) 84%, #000); } }
.block .bt { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block .bm { opacity: 0.9; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block.past { opacity: 0.55; }
.block.dragging { opacity: 0.85; box-shadow: var(--shadow); z-index: 5; }
.block.ghost { background: color-mix(in srgb, var(--focus) 22%, transparent); color: var(--ink); border: 1.5px dashed var(--focus); }
.block .grip { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.nowbar { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 4; pointer-events: none; }
.nowbar::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }

/* -- list view -------------------------------------------------------------------- */

.agenda-day { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.agenda-day .date { font-variant-numeric: tabular-nums; }
.agenda-day .date b { display: block; font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.agenda-day .date span { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.agenda-day.today .date b, .agenda-day.today .date span { color: var(--accent); }
.agenda-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.aitem { display: grid; grid-template-columns: 112px 4px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; width: 100%; }
.aitem:hover { background: var(--soft); }
.aitem .when { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: 1px; }
.aitem .bar { align-self: stretch; border-radius: 2px; background: var(--c); min-height: 20px; }
.aitem .title { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.aitem .title .icon { color: var(--ink-3); }
.aitem .meta { color: var(--ink-2); font-size: 13.5px; }
.aitem.holiday .bar { background: var(--line); }
.aitem.holiday.birthday .bar { background: var(--c); }
.list-end { padding: 20px 0; text-align: center; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--ink-2); }
.empty-state h2 { margin: 0 0 6px; color: var(--ink); font-size: 20px; }

/* -- dialogs ---------------------------------------------------------------------- */

dialog.sheet {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

dialog.sheet.small { width: min(420px, calc(100vw - 32px)); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.35); }
dialog.sheet[open] { animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.ask { padding: 22px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.ask h2 { margin: 0 0 6px; font-size: 19px; }
.ask p { margin: 0 0 12px; }
.choices { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 4px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.choice:hover { background: var(--soft); }
.choice input { width: 18px; height: 18px; accent-color: var(--btn-bg); margin: 0; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.editor { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.editor-body { overflow-y: auto; padding: 20px 22px 8px; }
.editor-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.editor-foot .spacer { flex: 1; }
.editor .title-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 4px 0 10px; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; border-radius: 0; }
.editor .title-input:focus { outline: none; border-bottom-color: var(--focus); }
.erow { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.erow:last-child { border-bottom: 0; }
.erow > .icon { margin-top: 8px; color: var(--ink-2); }
.erow .stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.erow .line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.erow .line > label, .erow .line > .line-label { width: 52px; color: var(--ink-2); font-size: 14px; }
.erow .line .field[type="date"] { width: 168px; }
.erow .line .field[type="time"] { width: 128px; }
.field.invalid { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.editor .title-input.invalid { border-bottom-color: var(--accent); }
.editor [data-title-error]:not(:empty) { margin-top: 6px; }
.erow .toggle-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.erow .hint { font-size: 13px; color: var(--ink-2); }
.who { display: flex; flex-wrap: wrap; gap: 8px; }
.who button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 17px; background: none; font-weight: 500; }
.who button .dot { width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; background: var(--c); }
.who button[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 14%, transparent); border-color: var(--c); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 15px; border: 0; background: var(--c); display: grid; place-items: center; color: #fff; }
.swatch.auto { background: conic-gradient(from 0deg, #039be5, #0b8043, #f6bf26, #f4511e, #8e24aa, #039be5); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--ink); }
/* In the small People dialog all eleven colors fit on one line. */
.ask .swatches { gap: 6px; }
.ask .swatch { width: 28px; height: 28px; border-radius: 14px; }
.custom-rule { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; background: var(--soft); }
.custom-rule .line .field { width: auto; }
.daypick { display: flex; gap: 6px; }
.daypick button { width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: var(--field); font-weight: 600; font-size: 13px; }
.daypick button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.rule-summary { font-size: 13.5px; color: var(--ink-2); }
.error-line { color: var(--accent); font-size: 14px; min-height: 0; }

/* -- pages ------------------------------------------------------------------------ */

.page { max-width: 760px; }
.page h2 { margin: 28px 0 10px; font-size: 18px; font-weight: 700; }
.page h2:first-child { margin-top: 6px; }
.group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--raised); }
.group > .item { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 10px 16px; border-top: 1px solid var(--line); }
.group > .item:first-child { border-top: 0; }
.group .item .grow { flex: 1; min-width: 0; }
.group .item .grow small { display: block; color: var(--ink-2); font-size: 13px; }
.group .item .field { width: auto; }
.group .item input[type="time"].field { width: 130px; }
.page .note { color: var(--ink-2); font-size: 13.5px; margin: 8px 4px 0; }
/* -- photos (Settings) ------------------------------------------------------------- */

.group > .item.wrap { flex-wrap: wrap; row-gap: 10px; }
.group > .item.wrap .grow { flex: 1 1 220px; } /* on a phone the choices drop below the label */
.btn.disabled { opacity: 0.45; pointer-events: none; }
.photo-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; flex-wrap: wrap; }
.photo-head h3 { margin: 0; font-size: 16px; }
.photo-head .muted { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.photo-head .spacer { flex: 1; }
.photo-head label.btn { cursor: pointer; }
.photo-status { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.photo-status p { margin: 2px 0; }
.photo-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.photo-bulk > span { margin-right: auto; font-variant-numeric: tabular-nums; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; border-radius: 14px; }
.photo-grid.drop { outline: 2px dashed var(--focus); outline-offset: 6px; }
.photo-empty { grid-column: 1 / -1; padding: 28px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--ink-2); text-align: center; }
.photo-empty p { margin: 0 auto; max-width: 46ch; }
.photo-empty b { color: var(--ink); }

/* Tiles are cut to the wall's shape, so each shows about what will be behind the days. */
.ptile { position: relative; aspect-ratio: var(--frame, 1.8257); border-radius: 12px; overflow: hidden; background: var(--soft); }
.ptile-img { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; overflow: hidden; }
/* Placed (in percentages) so the tile shows the photo's crop. */
.ptile-img img { position: absolute; display: block; max-width: none; height: auto; }
.ptile.out img { opacity: 0.4; }
.ptile.on { box-shadow: 0 0 0 3px var(--ink); }
.ptile-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.ptile-mark[aria-pressed="true"], .ptile.on span.ptile-mark { background: var(--focus); border-color: var(--focus); }
.ptile-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

/* The crop editor: the frame is the wall's shape; the photo moves and zooms inside it. */
.cropper {
  position: relative;
  aspect-ratio: var(--frame, 1.8257);
  width: min(100%, calc(52dvh * var(--frame, 1.8257))); /* stays fully on screen on short screens */
  margin: 12px auto 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cropper.moving { cursor: grabbing; }
.cropper img { position: absolute; display: block; max-width: none; height: auto; pointer-events: none; }
/* Faint lines where the wall's days fall: seven across, four down. */
.crop-days {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: calc(100% / 7) 100%, 100% 25%;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}
.cropper.moving .crop-days, .cropper:focus-visible .crop-days { opacity: 0.9; }
.crop-tools { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.crop-tools input[type="range"] { flex: 1; min-width: 0; accent-color: var(--btn-bg); }
.crop-tools [data-crop-reset] { margin-left: 6px; }
.photo-sheet .preview-note { margin: 8px 0 4px; font-size: 13px; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-row > span:first-child { font-weight: 500; }
.sheet-buttons { display: flex; gap: 8px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.person-dot { width: 30px; height: 30px; border-radius: 15px; background: var(--c); display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.add-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bday-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.bday-fields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.bday .muted { margin: 8px 0 0; font-size: 13.5px; }

/* The small sheet for a birthday on the calendar. */
.bday-who { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; font-weight: 600; }
.bday-who small, .bday-star small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.bday-star { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 500; cursor: pointer; }
.bday-note { margin: 10px 0 0; font-size: 13px; }
.add-row .field { flex: 1 1 200px; width: auto; }

.rem-item { display: flex; align-items: center; gap: 14px; }
.rem-check { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--pc, var(--ink-3)); background: none; display: grid; place-items: center; padding: 0; flex: none; color: #fff; }
.rem-check[aria-pressed="true"] { background: var(--pc, var(--ink-3)); }
.rem-item.done .grow > span { color: var(--ink-3); text-decoration: line-through; }
.rem-item .due.overdue { color: var(--accent); }

.help { max-width: 720px; }
.help h2 { margin: 30px 0 8px; font-size: 20px; }
.help h3 { margin: 18px 0 4px; font-size: 16px; }
.help p, .help li { color: var(--ink); line-height: 1.55; }
.help ol, .help ul { padding-left: 22px; }
.help code { background: var(--soft); border-radius: 6px; padding: 1px 6px; font-size: 14px; }
.help .example { display: block; margin: 4px 0; }

/* -- toast ------------------------------------------------------------------------ */

.toast {
  position: fixed;
  inset: auto;
  margin: 0;
  border: 0;
  overflow: visible;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 12px 14px 12px 18px;
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 500;
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.25s;
}

.toast.show { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
.toast.error { background: var(--accent); color: #fff; }
.toast.passive { pointer-events: none; }
.toast-action { border: 0; background: none; color: inherit; font-weight: 700; padding: 6px 8px; border-radius: 8px; text-decoration: underline; text-underline-offset: 3px; }

/* -- phones ----------------------------------------------------------------------- */

/* -- signing in (three boxes) ----------------------------------------------------- */

.auth-card .field { height: 48px; font-size: 17px; letter-spacing: 0; text-align: left; border-radius: 12px; }
.auth-card .field.code { width: 100%; font-size: 19px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.auth-card .field.code::placeholder { letter-spacing: 0; text-transform: none; font-weight: 400; }
.auth-card .hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.auth-card .btn.large { margin-top: 22px; }
.link-button { display: inline-block; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--focus); font-size: 14px; font-weight: 500; }
.auth-card .link-button { width: auto; display: block; }
.auth-card button.link-button[data-back] { display: block; margin: 14px auto 0; }

/* -- account bits, shared ---------------------------------------------------------- */

.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 17px; flex: none;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: 15px; }
.group > .item.link { color: inherit; text-decoration: none; cursor: pointer; width: 100%; border-left: 0; border-right: 0; border-bottom: 0;
  background: none; text-align: left; font: inherit; }
.group > button.item.link:first-child { border-top: 0; }
@media (hover: hover) { .group > .item.link:hover { background: var(--soft); } }
.group > .item.link > .icon:last-child { color: var(--ink-3); flex: none; }
.item-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; color: var(--ink-2); }
.tag { flex: none; padding: 2px 8px; border-radius: 10px; background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.page-actions { display: flex; justify-content: flex-end; margin: 4px 0 12px; }
.page .lead { margin: 4px 0 18px; color: var(--ink-2); max-width: 62ch; }
.page .warning { margin: 12px 4px 0; color: var(--accent); font-size: 14px; }
.page code, .ask code { font-size: 13px; padding: 2px 6px; border-radius: 6px; background: var(--soft); }
.who-line { margin: 0; padding: 8px 20px 0; font-size: 12.5px; color: var(--ink-2); }

.ask .label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 13.5px; }
.ask .field { width: 100%; }
.ask .hint { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); }
.ask .toggle-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 12px 0;
  border-top: 1px solid var(--line); font-weight: 500; cursor: pointer; }
.ask .toggle-line small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.ask .toggle-line + .toggle-line { margin-top: 0; }
.ask .actions .spacer { flex: 1; }
.ask .group { margin-top: 10px; }
.inline-field { display: flex; gap: 8px; }
.inline-field .field { flex: 1; min-width: 0; }
.sheet-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* -- the access code -------------------------------------------------------------- */

.field.code { letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; font-variant-numeric: tabular-nums; width: 160px; }
.code-card { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); text-align: center; }
.code-card p { margin: 0; }
.code-big { margin: 8px 0 10px; font-size: 34px; font-weight: 700; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }
.code-card .btn { margin-top: 12px; }

/* -- admin pages ------------------------------------------------------------------- */

.status-dot { width: 10px; height: 10px; border-radius: 5px; flex: none; background: var(--ink-3); }
.status-dot.good { background: #34c759; }
.status-dot.bad { background: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stats > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); }
.stats b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats span { color: var(--ink-2); font-size: 13px; }
.stats .warn b { color: var(--accent); }
.page .stats-note { margin-top: 6px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.list-head h2 { margin: 0 !important; }
.who-filter { width: auto; height: 32px; }
.log-row .grow b { font-weight: 600; }
.log-kind { width: 8px; height: 8px; border-radius: 4px; background: var(--ink-3); flex: none; align-self: flex-start; margin-top: 7px; }
.log-kind.bad { background: var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); min-width: 0; }
.tile span { color: var(--ink-2); font-size: 13px; }
.tile b { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile small { color: var(--ink-2); font-size: 12.5px; }
.tile.warn b { color: #c27c00; }
.tile.bad b { color: var(--accent); }
.group.details { margin-top: 14px; }
.group.details .item > span { color: var(--ink-2); text-align: right; overflow-wrap: anywhere; }
.group.counts .num { font-variant-numeric: tabular-nums; font-weight: 600; }

.row-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.row-buttons .field { width: auto; }
.shot { display: grid; place-items: center; min-height: 120px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; }
.shot .note { margin: 8px; }
.preview { margin-top: 12px; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.preview iframe { width: 100%; height: 100%; border: 0; display: block; }

.log { border: 1px solid var(--line); border-radius: 14px; background: var(--raised); overflow: hidden; }
.log-line { display: grid; grid-template-columns: 112px 70px minmax(0, 1fr); gap: 10px; padding: 7px 14px; border-top: 1px solid var(--line);
  font: 12.5px/1.45 ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; }
.log-line:first-child { border-top: 0; }
.log-line time, .log-line span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-line p { margin: 0; overflow-wrap: anywhere; }
.log-line.warning p, .log-line.error p { color: var(--accent); }

/* -- meals ------------------------------------------------------------------------- */

.meals-page { max-width: 1100px; }
.meal-grid { display: grid; grid-template-columns: 96px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--raised); }
.meal-head { display: flex; align-items: baseline; gap: 6px; padding: 10px 10px 8px; border-left: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.meal-head b { color: var(--ink); font-size: 17px; }
.meal-head.today span { color: var(--accent); }
.meal-head.today b { color: var(--accent); }
.meal-label { display: flex; align-items: center; padding: 0 12px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.meal-slot { border-left: 1px solid var(--line); border-top: 1px solid var(--line); min-width: 0; }
.meal-cell { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 50px; padding: 6px 8px; border: 0; background: none; text-align: left; font-weight: 500; }
@media (hover: hover) { .meal-cell:hover { background: var(--soft); } }
.meal-text { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.meal-repeat { display: inline-grid; color: var(--ink-3); flex: none; }
.meal-add { color: var(--ink-3); font-weight: 400; font-size: 13px; opacity: 0; }
.meal-cell:hover .meal-add, .meal-cell:focus-visible .meal-add { opacity: 1; }
.meal-list { display: none; }
.meal-day h3 { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 8px; font-size: 16px; }
.meal-day:first-child h3 { margin-top: 4px; }
.meal-day h3 span { color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.meal-item { padding-top: 0 !important; padding-bottom: 0 !important; }
.meal-row-name { width: 82px; flex: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.meal-item .meal-cell { min-height: 48px; padding: 6px 0; }
.meal-item .meal-add { opacity: 1; }
.meal-sheet .toggle-line { margin-top: 14px; }
.ask .note { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .rail { display: none; }
  .topbar { padding: 12px 14px 8px; gap: 8px; }
  .topbar h1 { font-size: 22px; flex: 1; margin: 0; }
  .topbar .spacer { display: none; }
  .topbar .wide-only { display: none; }
  .search { order: 10; width: 100%; }
  .quick { padding: 0 14px 10px; }
  .content { padding: 0 14px 90px; }
  .month-grid { grid-auto-rows: minmax(64px, 1fr); }
  .mday { padding: 3px 2px 4px; gap: 2px; }
  .mday .num { font-size: 12.5px; height: 22px; min-width: 22px; }
  .mday .pill { height: 16px; padding: 0 4px; font-size: 10px; border-radius: 8px; }
  .mday .pill .t, .mday .pill .badges { display: none; }
  .mday .more { font-size: 10.5px; padding: 0 4px; }
  .mday .more .more-word { display: none; }
  .tg-head, .tg-allday, .tg-body { grid-template-columns: 40px repeat(var(--days), minmax(0, 1fr)); }
  .tg-head .d { flex-direction: column; align-items: center; gap: 2px; padding-left: 0; }
  .tg-head .d .wd { font-size: 11px; }
  .tg-head .d .n { font-size: 17px; }
  .tg-head .d.today .n { min-width: 28px; height: 28px; font-size: 15px; }
  .tg-allday .label { font-size: 9.5px; padding-right: 4px; }
  .block { padding: 2px 4px; font-size: 11px; }
  .agenda-day { grid-template-columns: 56px minmax(0, 1fr); gap: 8px; }
  .agenda-day .date b { font-size: 20px; }
  .aitem { grid-template-columns: 76px 4px minmax(0, 1fr); gap: 10px; padding: 8px 4px; }
  .photo-bulk > span { flex: 1 1 100%; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: var(--bg);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a.active { color: var(--ink); }
  .fab {
    display: grid;
    place-items: center;
    position: fixed;
    right: 18px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 28px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }
  /* Sheets rise from the bottom and leave some of the page showing above them. */
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 86dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; }
  dialog.sheet.small { width: 100vw; }
  /* Text boxes stay at 16px: anything smaller makes an iPhone zoom in when you tap them. */
  .field, .search input, .editor .title-input { font-size: 16px; }
  .field { height: 38px; padding: 0 10px; }
  .btn { height: 34px; padding: 0 12px; font-size: 14px; }
  .btn.icon-only { width: 34px; }

  .editor { max-height: 86dvh; font-size: 14px; }
  .editor-body { padding: 14px 16px 4px; }
  .editor .title-input { font-size: 20px; padding: 2px 0 8px; }
  .erow { grid-template-columns: 20px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
  .erow > .icon { width: 18px; height: 18px; margin-top: 9px; }
  .erow .stack { gap: 8px; }
  .erow .line { gap: 6px; }
  .erow .line > label, .erow .line > .line-label { width: 42px; font-size: 13px; }
  .erow .line .field[type="time"] { width: 104px; }
  .erow .line .field[type="date"] { width: 134px; }
  .erow .hint, .rule-summary { font-size: 12.5px; }
  .erow .toggle-line { font-size: 14px; }
  .who { gap: 6px; }
  .who button { height: 30px; padding: 0 10px 0 4px; font-size: 14px; gap: 6px; }
  .who button .dot { width: 22px; height: 22px; }
  .swatches { gap: 6px; }
  .swatch { width: 26px; height: 26px; }
  .switch { width: 42px; height: 26px; }
  .switch span::after { width: 20px; height: 20px; }
  .switch input:checked + span::after { transform: translateX(16px); }
  textarea.field { min-height: 64px; }
  .editor-foot { gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .editor-foot .btn-label { display: none; } /* Delete and Duplicate become icons so Save always fits */
  .editor-foot [data-act="delete"], .editor-foot [data-act="duplicate"] { width: 34px; padding: 0; }

  .ask { max-height: 86dvh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); font-size: 14px; }
  .ask h2 { font-size: 17px; }
  .actions { margin-top: 14px; gap: 8px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

  .auth-card .field { height: 46px; }
  .meal-grid { display: none; }
  .meal-list { display: block; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats b { font-size: 22px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile b { font-size: 18px; }
  .log-line { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .log-line time, .log-line span { display: inline; }
  .field.code { width: 100%; }
  .group > .item.wrap .field.code { flex: 1 1 140px; }
  .group.details .item { flex-wrap: wrap; row-gap: 2px; }
  .group.details .item > span { text-align: left; }
  .who-line { padding: 6px 16px 0; }
  .row-buttons .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open] { animation: none; }
  .toast { transition: none; }
}
