:root,
html[data-theme="barack"] {
  --primary: #FF8B5E;
  --primary-light: #FFE6DC;
  --bg: #FAFBFC;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #6B7280;
  --border: #E5E7EB;
  --success: #22C55E;
  --error: #EF4444;
  --warning: #F59E0B;
  --accent: #FB923C;
  --glow: 255, 139, 94;
  --brand-from: #FFB08A;
  --brand-to: #FF8B5E;
  --coral: var(--primary);
  --peach: var(--primary-light);
  --paper: var(--surface);
  --shadow: 0 12px 32px rgba(26, 26, 26, 0.08);
  --nav-h: 96px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Poppins", system-ui, sans-serif;
  --script: "Caveat", "Segoe Script", cursive;
  --radius: 24px;
}
html[data-theme="lila"] {
  --primary: #9B7BB8;
  --primary-light: #EDE4F5;
  --accent: #B794D4;
  --glow: 155, 123, 184;
  --brand-from: #C4A8DC;
  --brand-to: #9B7BB8;
}
html[data-theme="kek"] {
  --primary: #5BA4D6;
  --primary-light: #D7ECF8;
  --accent: #7BB8E0;
  --glow: 91, 164, 214;
  --brand-from: #8EC4E6;
  --brand-to: #5BA4D6;
}
html[data-theme="zold"] {
  --primary: #5AA67A;
  --primary-light: #DCEFE4;
  --accent: #7CBC96;
  --glow: 90, 166, 122;
  --brand-from: #8EC9A6;
  --brand-to: #5AA67A;
}
html[data-theme="rozsa"] {
  --primary: #E56B8A;
  --primary-light: #FBE0E8;
  --accent: #F08AA3;
  --glow: 229, 107, 138;
  --brand-from: #F099B0;
  --brand-to: #E56B8A;
}
html[data-theme="homok"] {
  --primary: #C4A574;
  --primary-light: #F3E9D8;
  --accent: #D4B892;
  --glow: 196, 165, 116;
  --brand-from: #DCC4A0;
  --brand-to: #C4A574;
}

/* Dark mode — shared surface tokens */
html[data-mode="dark"] {
  color-scheme: dark;
  --bg: #121418;
  --surface: #1C1F26;
  --ink: #F2F3F5;
  --muted: #9AA3B2;
  --border: #2E3440;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --primary-light: #2A1F1C;
}
html[data-mode="dark"][data-theme="barack"] {
  --primary: #FF9A74;
  --primary-light: #2A1F1C;
  --accent: #FFA882;
  --brand-from: #E08A68;
  --brand-to: #FF9A74;
}
html[data-mode="dark"][data-theme="lila"] {
  --primary: #B794D4;
  --primary-light: #231E28;
  --accent: #C8A8E0;
  --glow: 183, 148, 212;
  --brand-from: #9B7BB8;
  --brand-to: #B794D4;
}
html[data-mode="dark"][data-theme="kek"] {
  --primary: #7BB8E0;
  --primary-light: #1A2228;
  --accent: #96C8E8;
  --glow: 123, 184, 224;
  --brand-from: #5BA4D6;
  --brand-to: #7BB8E0;
}
html[data-mode="dark"][data-theme="zold"] {
  --primary: #7CBC96;
  --primary-light: #1A2420;
  --accent: #96CBAE;
  --glow: 124, 188, 150;
  --brand-from: #5AA67A;
  --brand-to: #7CBC96;
}
html[data-mode="dark"][data-theme="rozsa"] {
  --primary: #F08AA3;
  --primary-light: #281C20;
  --accent: #F4A3B6;
  --glow: 240, 138, 163;
  --brand-from: #E56B8A;
  --brand-to: #F08AA3;
}
html[data-mode="dark"][data-theme="homok"] {
  --primary: #D4B892;
  --primary-light: #26221C;
  --accent: #E0C8A8;
  --glow: 212, 184, 146;
  --brand-from: #C4A574;
  --brand-to: #D4B892;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100lvh;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  background: #e8eef3;
  color: var(--ink);
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

.device {
  min-height: 100vh;
  min-height: 100lvh;
  display: flex;
  justify-content: center;
  background: #eef2f6;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100lvh;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--surface) 240px, var(--bg) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(26, 26, 26, .12);
}
#screen-root {
  min-height: 100%;
}
#nav-root {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
#nav-root .nav {
  pointer-events: auto;
}

.screen {
  min-height: 100vh;
  min-height: 100lvh;
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.swipe-nav-scope { touch-action: pan-y; }

.page-title,
.editorial {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.h2 { font-family: var(--sans); font-size: 20px; font-weight: 600; line-height: 28px; }
.h3 { font-family: var(--sans); font-size: 18px; font-weight: 500; line-height: 26px; }
.body-lg { font-size: 16px; line-height: 24px; }
.caption, .tiny { font-size: 12px; line-height: 16px; color: var(--muted); }

.muted { color: var(--muted); }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.gap16 { gap: 16px; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; object-position: center center;
  background: var(--primary-light);
  box-shadow: 0 0 0 2px #fff;
  content-visibility: auto;
}
.avatar.sm { width: 24px; height: 24px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.avatar.lg { width: 72px; height: 72px; }

.home-top { padding-top: 8px; }
.greet-wrap { flex: 1; min-width: 0; padding-left: 12px; }
.greet {
  font-size: 18px;
  line-height: 26px;
  font-weight: 400;
  color: var(--ink);
}
.greet strong { font-weight: 600; }
.greet-date {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  margin-top: 1px;
}

.bell {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(26,26,26,.06);
  display: grid; place-items: center;
  position: relative;
  color: var(--ink);
}
.bell svg { width: 20px; height: 20px; }
.badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--error); color: #fff;
  font-size: 10px; font-weight: 600; display: grid; place-items: center;
}

.week {
  display: flex;
  gap: 7px;
  margin: 18px -20px 0;
  padding: 4px 20px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-padding-inline: calc(50% - 24px);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
}
.week::-webkit-scrollbar { display: none; }
.week-day {
  flex: 0 0 48px;
  min-height: 60px;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 10px;
  border-radius: 20px;
  color: var(--muted);
  scroll-snap-align: center;
  scroll-snap-stop: normal;
}
.week-day small { font-size: 11px; font-weight: 400; line-height: 16px; }
.week-day b {
  font-size: 16px; font-weight: 600; line-height: 24px;
  color: var(--ink); margin-top: 4px;
}
.week-day.active {
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--primary-light), 0 8px 18px rgba(var(--glow), .16);
  color: var(--primary);
}
.week-day.active b { color: var(--ink); }
.week-day:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, white);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .week { scroll-behavior: auto; }
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin: 24px 0 14px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -0.02em;
}
.add-link {
  font-size: 14px; font-weight: 500; line-height: 20px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  color: var(--ink);
}

.attention-intro {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin: 0 0 14px;
}
.focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}
.focus-remind {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 2px;
  border: 2px solid color-mix(in srgb, var(--primary) 62%, white);
  border-radius: 50%;
  background: white;
  box-shadow: 0 5px 16px rgba(26,26,26,.12);
}
.focus-remind img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.focus-remind-bell {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: var(--primary);
  box-shadow: 0 2px 7px rgba(26,26,26,.18);
}
.focus-remind-bell svg { width: 12px; height: 12px; }
.focus-remind:active { transform: scale(.94); }
.focus-remind:disabled { opacity: .55; }
.focus-remind-message {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--wash);
  color: var(--ink);
  font-size: 13px;
  line-height: 18px;
}
.focus-intro { margin: 4px 0 18px; }
.focus-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 8px 0 10px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--muted) 10%, var(--surface));
}
.focus-filter-btn {
  position: relative;
  min-height: 38px;
  border-radius: 15px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}
.focus-filter-btn.on {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(26,26,26,.08);
}
.focus-filter-btn:active { transform: scale(.98); }
.focus-intro-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
}
.focus-intro-row .focus-intro {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.focus-intro-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.focus-hw-auto {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(26,26,26,.08);
}
.focus-hw-auto.on {
  background: #22C55E;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22C55E 22%, transparent);
}
.focus-hw-auto.off {
  background: #EF4444;
  box-shadow: 0 0 0 3px color-mix(in srgb, #EF4444 18%, transparent);
}
.focus-hw-auto:active { transform: scale(.92); }
.focus-sync-btn {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.focus-sync-btn svg {
  width: 18px;
  height: 18px;
}
.focus-sync-btn.busy svg {
  animation: focus-sync-spin .8s linear infinite;
}
.focus-sync-btn:active { transform: scale(.94); }
.focus-sync-btn:disabled { opacity: .55; }
.focus-sync-msg {
  margin: -4px 0 10px;
  font-size: 12px;
  color: var(--muted);
}
@keyframes focus-sync-spin {
  to { transform: rotate(360deg); }
}
.focus-filter-badge {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--primary);
  vertical-align: 1px;
}
.focus-mail-card {
  margin: 0 0 12px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.focus-mail-card.unread {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
.focus-mail-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
}
.focus-mail-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.focus-mail-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.focus-mail-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}
.focus-mail-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.focus-mail-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}
.focus-mail-from {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.focus-mail-text {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  white-space: normal;
  word-break: break-word;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: color-mix(in srgb, var(--muted) 8%, var(--surface));
  border-radius: 14px;
  padding: 12px 14px;
}
.focus-mail-todos {
  display: grid;
  gap: 8px;
}
.focus-mail-todo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--muted) 8%, var(--surface));
  font-size: 14px;
}
.focus-mail-todo-row .btn.sm {
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: 12px;
}
.focus-hw-legend {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--muted) 8%, var(--surface));
  font-size: 13px;
}
.focus-hw-legend summary {
  cursor: pointer;
  font-weight: 600;
}
.focus-hw-legend ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.focus-hw-day {
  margin: 0 0 16px;
}
.focus-hw-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.focus-hw-day-head h3 {
  margin: 0;
  font-size: 16px;
  font-family: var(--serif);
}
.focus-hw-day-open {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}
.focus-hw-day-open.done { color: var(--muted); }
.focus-hw-items {
  display: grid;
  gap: 8px;
}
.focus-hw-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.focus-hw-item.optional {
  border-style: dashed;
  opacity: .96;
}
.focus-hw-item.done {
  opacity: .62;
}
.focus-hw-check {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border: 0;
  background: transparent;
  padding: 0;
}
.focus-hw-check .box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1.5px solid color-mix(in srgb, var(--primary) 55%, var(--border));
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.focus-hw-check.on .box {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
}
.focus-hw-body { flex: 1; min-width: 0; }
.focus-hw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}
.focus-hw-subject { color: var(--ink); }
.focus-hw-kind.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
}
.focus-hw-kind.tag-required {
  color: #9A3412;
  background: color-mix(in srgb, #FB923C 28%, white);
}
.focus-hw-kind.tag-optional {
  color: #1D4ED8;
  background: color-mix(in srgb, #60A5FA 28%, white);
}
html[data-mode="dark"] .focus-hw-kind.tag-required {
  color: #FFD7A8;
  background: color-mix(in srgb, #FB923C 28%, transparent);
}
html[data-mode="dark"] .focus-hw-kind.tag-optional {
  color: #BFDBFE;
  background: color-mix(in srgb, #60A5FA 28%, transparent);
}
.focus-hw-task {
  font-size: 14px;
  line-height: 1.4;
}
.focus-hw-item.done .focus-hw-task {
  text-decoration: line-through;
}
.focus-hw-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.event-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  height: 210px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  color: #fff;
}
.event-card img.cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.event-card .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,.04) 28%, rgba(26,26,26,.58) 100%);
}
.event-card.pending .cover { filter: saturate(.7) blur(6px); transform: scale(1.06); }
.chip {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(26, 26, 26, .38);
  backdrop-filter: blur(10px);
  color: #fff; border-radius: 999px;
  padding: 3px 10px 3px 3px;
  font-size: 12px; font-weight: 500; line-height: 16px;
}
.chip.static {
  position: static;
  background: var(--ink);
  margin: 4px 0 10px;
}
.more {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(26,26,26,.32); backdrop-filter: blur(10px);
  color: #fff; display: grid; place-items: center;
  font-size: 16px; letter-spacing: 1px; font-weight: 600;
}
.event-card > .event-meta {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
}
.event-card > .event-meta h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.02em;
  text-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.event-time {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px; font-size: 12px; line-height: 16px; font-weight: 400; opacity: .95;
}

.quiet-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 16px 16px 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(26, 26, 26, .05);
  border: 1px solid var(--border);
}
.quiet-card h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
}
.attention-card {
  padding: 0;
  overflow: hidden;
}
.attention-toggle {
  width: 100%;
  min-height: 86px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  border-radius: 20px;
}
.attention-card.has-leading .attention-toggle { min-height: 66px; gap: 8px; }
.attention-card.has-leading .attention-summary {
  flex: 1 1 auto;
  text-align: left;
}
.attention-card.has-leading .attention-chevron { margin-left: auto; }
.attention-event-avatars {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.attention-event-avatars img {
  width: 36px;
  height: 36px;
  border: 2px solid white;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 7px rgba(26,26,26,.12);
}
.attention-event-avatars img + img { margin-left: -11px; }
.attention-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, white);
  outline-offset: -3px;
}
.attention-summary {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.attention-title {
  font-size: 17px;
  line-height: 23px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.attention-card .attention-summary .when {
  margin: 0;
}
.attention-chevron {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--ink);
}
.attention-chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .2s ease;
}
.attention-card.open .attention-chevron::before {
  transform: rotate(225deg) translate(-1px, -1px);
}
.attention-body {
  padding: 2px 16px 16px;
  border-top: 1px solid var(--border);
}
.attention-body[hidden] {
  display: none;
}
.focus-todo-section {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(26,26,26,.05);
}
.focus-todo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.focus-todo-title {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}
.focus-todo-title button { text-align: left; }
.focus-todo-title h3 {
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.focus-todo-avatars {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.focus-todo-avatars img {
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(26,26,26,.12);
}
.focus-todo-avatars img + img { margin-left: -9px; }
.focus-todo-items {
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.standalone-todo-section { position: relative; }
.standalone-todo-section .focus-todo-head {
  margin-bottom: 7px;
  padding-right: 148px;
}
.standalone-todo-section.collapsed .focus-todo-head {
  margin-bottom: 0;
}
.todo-list-label,
.todo-list-title-toggle {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.todo-list-title-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.todo-list-title-toggle h3 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.todo-list-chevron {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 8%, transparent);
  pointer-events: none;
}
.todo-list-chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(225deg) translate(-1px, -1px);
  transition: transform .2s ease;
}
.standalone-todo-section.collapsed .todo-list-chevron::before {
  transform: rotate(45deg) translate(-1px, -1px);
}
.standalone-todo-section .focus-todo-items[hidden] {
  display: none;
}
.todo-box-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}
.standalone-todo-section.collapsed .todo-box-actions {
  top: 50%;
  transform: translateY(-50%);
}
.todo-assignee-filters {
  display: flex;
  align-items: center;
  gap: 6px;
}
.todo-assignee-filter {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2.5px solid white;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(26,26,26,.14);
  opacity: .4;
  filter: grayscale(.3);
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}
.todo-assignee-filter.on {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 60%, white), 0 2px 8px rgba(26,26,26,.14);
}
.todo-assignee-filter img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.todo-assignee-filter:active { transform: scale(.94); }
.todo-list-settings-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2.5px solid white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 12%, var(--surface));
  box-shadow: 0 2px 8px rgba(26,26,26,.14);
  -webkit-tap-highlight-color: transparent;
}
.todo-list-settings-btn svg { width: 18px; height: 18px; }
.todo-list-settings-btn:active { transform: scale(.94); }
.todo-list-settings-sheet .page-title { margin: 0; }
.todo-list-settings-sheet .form-label { margin-top: 8px; }
.todo-list-settings-sheet .btn { margin-top: 12px; }
.todo-list-settings-sheet .btn.delete-link {
  color: var(--error);
  background: color-mix(in srgb, var(--error) 10%, transparent);
}
.todo-list-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 8px;
}
.todo-list-trash-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--error);
  background: color-mix(in srgb, var(--error) 8%, transparent);
}
.todo-list-trash-btn svg { width: 16px; height: 16px; }
.todo-list-trash-btn:disabled { opacity: .45; }
.todo-list-rename-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.todo-list-rename-row .field { margin: 0; }
.todo-list-save-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
}
.todo-list-save-btn svg { width: 20px; height: 20px; }
.todo-list-save-btn:disabled { opacity: .45; }
.todo-list-clear-done {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: color-mix(in srgb, var(--muted) 8%, var(--surface));
  border: 1px solid var(--border);
}
.todo-list-clear-done svg { width: 18px; height: 18px; color: var(--muted); }
.todo-list-clear-done:disabled { opacity: .45; }
.standalone-todo-item + .standalone-todo-item { border-top: 1px solid var(--border); }
.standalone-todo-main {
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
}
.standalone-todo-check {
  width: 28px;
  height: 34px;
  display: grid;
  place-items: center;
}
.standalone-todo-check .box,
.todo-draft-main > .box {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.standalone-todo-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.standalone-todo-copy strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
}
.standalone-todo-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}
.standalone-todo-item.overdue .standalone-todo-copy small { color: var(--error); }
.standalone-todo-item.done .standalone-todo-copy strong {
  color: var(--muted);
  text-decoration: line-through;
}
.standalone-todo-check.done .box {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  font-size: 11px;
}
.todo-expand-list {
  display: block;
  width: 100%;
  margin: 2px 0 0;
  padding: 10px 0 6px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-align: left;
}
.todo-expand-list:active { color: var(--ink); }
.standalone-todo-avatar-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.standalone-todo-avatar-btn.on {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 55%, white);
}
.standalone-todo-avatar-btn.empty {
  border: 1.5px dashed color-mix(in srgb, var(--border) 70%, #9AA0A6);
  background: color-mix(in srgb, var(--muted) 8%, transparent);
}
.standalone-todo-avatar-btn:active { transform: scale(.94); }
.standalone-todo-avatar {
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(26,26,26,.12);
  display: block;
  pointer-events: none;
}
.standalone-todo-add {
  opacity: .58;
}
.standalone-todo-add .standalone-todo-main {
  grid-template-columns: 28px minmax(0, 1fr);
}
.standalone-todo-add .box {
  border-color: color-mix(in srgb, var(--border) 72%, #c8c8c8);
  background: transparent;
}
.standalone-todo-add-input {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  outline: none;
}
.standalone-todo-add-input::placeholder {
  color: var(--muted);
  opacity: .8;
}
.standalone-todo-add:focus-within { opacity: .92; }
.todo-settings-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--primary-light);
}
.todo-settings-btn.on { color: var(--primary); }
.todo-settings-btn svg { width: 18px; height: 18px; }
.focus-todo-settings,
.todo-item-settings {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--primary-light) 58%, white);
}
.focus-todo-settings { margin: 4px 0 10px 36px; }
.focus-todo-settings .btn { margin-top: 2px; }
.todo-assignees {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.todo-assignees button {
  min-height: 38px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-size: 12px;
}
.todo-assignees button.on {
  border-color: var(--primary);
  color: var(--ink);
  background: var(--primary-light);
}
.todo-assignees img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}
.when { color: var(--muted); font-size: 12px; line-height: 16px; margin: 2px 0 12px; }
.check {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
  font-size: 16px;
  line-height: 24px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.check .box {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.check.done { color: var(--muted); }
.check.done .box {
  background: var(--success); border-color: var(--success); color: #fff;
  font-size: 11px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 500; font-size: 14px; line-height: 20px;
}
.btn.block { width: 100%; }
.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--glow), .28);
}
.btn.ghost,
.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border);
}
.btn.soft {
  background: var(--primary-light);
  color: var(--ink);
}
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.choice {
  flex: 1; min-width: 120px;
  border-radius: 16px; padding: 10px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 500; font-size: 14px;
}
.choice.on {
  background: var(--primary-light);
  box-shadow: inset 0 0 0 1.5px var(--primary);
}
.pickup-who .choice { min-height: 58px; }
.pickup-who .avatar.sm {
  width: 42px;
  height: 42px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}
.login-error { color: var(--error); font-size: 13px; margin-top: 10px; min-height: 18px; }
.waiting {
  display: inline-flex; align-items: center; gap: 8px;
  background: #FFF7ED;
  color: #9A6B24;
  border-radius: 999px; padding: 6px 12px;
  font-size: 12px; font-weight: 500; line-height: 16px;
}

.nav {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(390px, calc(100% - 24px));
  height: 70px;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 99px;
  overflow: hidden;
  isolation: isolate;
  background: color-mix(in srgb, #d9d9dc 15%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  box-shadow:
    inset 1.8px 3px 0 -2px rgba(255,255,255,.9),
    inset -2px -2px 0 -2px rgba(255,255,255,.72),
    inset -3px -8px 2px -6px rgba(255,255,255,.55),
    inset 0 -1px 4px rgba(26,26,26,.09),
    inset -1.5px 2.5px 0 -2px rgba(26,26,26,.14),
    0 2px 6px rgba(26,26,26,.08),
    0 14px 34px rgba(26,26,26,.14);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  padding: 8px 10px 10px;
  z-index: 20;
}
.nav::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 7px;
  left: 10px;
  width: calc((100% - 20px) / 5);
  height: 52px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 99px;
  background: color-mix(in srgb, var(--primary) 20%, rgba(255,255,255,.3));
  box-shadow:
    inset 2px 1px 0 -1px rgba(255,255,255,.9),
    inset -1.5px -1px 0 -1px rgba(255,255,255,.7),
    inset -2px -6px 2px -5px rgba(255,255,255,.58),
    inset -1px 2px 3px -1px rgba(26,26,26,.12),
    inset 0 -4px 2px -2px rgba(26,26,26,.08),
    0 4px 9px rgba(26,26,26,.1);
  transform: translateX(calc(var(--nav-to) * 100%));
  transform-origin: center;
}
.nav.nav-moving::before {
  animation: nav-liquid-slide 480ms cubic-bezier(.72, 0, .22, 1);
}
.nav::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1px 14% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
  pointer-events: none;
}
.nav button {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  padding: 4px 2px;
  transition: color 220ms ease;
}
.nav button .nav-lbl {
  font-size: 9px;
  line-height: 12px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav button.active {
  color: var(--ink);
  justify-content: center;
  gap: 0;
}
.nav button.active .nav-lbl {
  display: none;
}
.nav svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  transition: width 220ms ease, height 220ms ease;
}
.nav button.active svg {
  width: 26px;
  height: 26px;
}
@keyframes nav-liquid-slide {
  0% { transform: translateX(calc(var(--nav-from) * 100%)) scaleX(1); }
  55% { transform: translateX(calc(var(--nav-to) * 100%)) scaleX(1.34); }
  100% { transform: translateX(calc(var(--nav-to) * 100%)) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .nav.nav-moving::before { animation: none; }
}

.login {
  position: relative;
  min-height: 100vh;
  min-height: 100lvh;
  padding: calc(28px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  background: #FFF9F5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.login-blobs {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
}
.login-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.login-blobs .b1 {
  width: 220px; height: 220px;
  top: -60px; right: -70px;
  background: radial-gradient(circle, #FFD8C4 0%, rgba(255,216,196,0) 70%);
}
.login-blobs .b2 {
  width: 180px; height: 180px;
  top: 38%; left: -90px;
  background: radial-gradient(circle, #FFE6DC 0%, rgba(255,230,220,0) 72%);
}
.login-blobs .b3 {
  width: 260px; height: 200px;
  bottom: -40px; right: -40px;
  background: radial-gradient(circle, #FFD0B8 0%, rgba(255,208,184,0) 68%);
}
.login-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-icon {
  width: 88px; height: 88px;
  margin: 18px auto 22px;
  border-radius: 28px;
  background: url('/assets/icons/icon-192.png?v=10') center / cover no-repeat;
  box-shadow: 0 18px 36px rgba(255, 139, 94, .28);
}
.login-hi {
  font-family: var(--sans);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #2B3340;
  margin: 0 0 8px;
}
.login-sub {
  color: #8B93A1;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  max-width: 260px;
  margin: 0 auto 28px;
}
.login-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 340px;
}
.login-card {
  background: #fff;
  border-radius: 28px;
  padding: 14px 12px 16px;
  box-shadow: 0 14px 32px rgba(43, 51, 64, .08);
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.login-card:active { transform: scale(.98); }
.login-card-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  background: #F4E4DC;
}
.login-card-photo.csilla { background: linear-gradient(160deg, #F7D7CF, #F2C4B8); }
.login-card-photo.gergo { background: linear-gradient(160deg, #D7E6F4, #C5D8EC); }
.login-card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.login-card b {
  font-size: 17px;
  font-weight: 600;
  color: #2B3340;
}
.login-foot {
  margin-top: auto;
  padding-top: 36px;
  font-family: var(--script);
  font-size: 22px;
  line-height: 1.2;
  color: #A8B0BC;
  font-weight: 500;
}
.login-foot .heart { color: var(--primary); }

.login-pass-top {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.login-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2B3340;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 4px;
}
.login-hero {
  width: min(280px, 78%);
  aspect-ratio: 1;
  border-radius: 36px;
  overflow: hidden;
  margin: 8px auto 22px;
  background: linear-gradient(160deg, #F7D7CF, #F2C4B8);
  box-shadow: 0 22px 48px rgba(255, 139, 94, .22);
}
.login-hero.gergo { background: linear-gradient(160deg, #D7E6F4, #C5D8EC); }
.login-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.login-hi-name { color: var(--primary); }
.login-form {
  width: 100%;
  max-width: 340px;
  margin-top: 8px;
  text-align: left;
}
.pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #F3F4F6;
  border-radius: 18px;
  padding: 0 12px;
  min-height: 56px;
  box-shadow: none;
}
.pass-wrap:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--primary);
  background: #fff;
}
.pass-wrap .field {
  background: transparent;
  box-shadow: none;
  padding: 14px 40px 14px 8px;
  flex: 1;
  text-align: left;
  font-size: 16px;
}
.pass-wrap .field:focus { box-shadow: none; }
.pass-ico {
  width: 22px; height: 22px;
  color: #9CA3AF;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.pass-ico svg { width: 20px; height: 20px; }
.pass-toggle {
  position: absolute;
  right: 10px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  color: #9CA3AF;
}
.login-go {
  margin-top: 16px;
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(var(--glow), .35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-forgot {
  display: block;
  width: 100%;
  margin-top: 16px;
  text-align: center;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}
.login-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 18px;
}
.login-pass .login-foot { align-self: flex-end; padding-right: 4px; }

.form-label {
  font-size: 12px; font-weight: 500; line-height: 16px;
  color: var(--muted); margin: 16px 0 8px;
}
.create-choice-screen .page-title { margin: 28px 0 5px; }
.create-kind-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}
.create-kind-card {
  min-width: 0;
  padding: 14px 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.create-kind-icon {
  display: block;
  width: 100%;
  max-width: 148px;
  aspect-ratio: 1;
  object-fit: contain;
}
.create-kind-card strong {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 26px;
}
.todo-create-screen .page-title { margin: 12px 0 5px; }
.todo-draft-list { display: grid; gap: 10px; }
.todo-draft-item {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}
.todo-draft-main {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 36px auto;
  align-items: center;
  gap: 8px;
}
.todo-item-title {
  min-width: 0;
  padding: 9px 2px;
  color: var(--ink);
  font-size: 15px;
  line-height: 21px;
  outline: none;
}
.todo-remove-btn {
  width: 28px;
  height: 34px;
  color: var(--muted);
  font-size: 23px;
}
.todo-item-settings { margin-top: 10px; }
.todo-add-item { margin-top: 12px; }
.todo-save { margin-top: 22px; }
.field {
  width: 100%; border: 0; background: var(--surface);
  border-radius: 16px; padding: 14px 16px;
  font-size: 16px; line-height: 24px;
  box-shadow: inset 0 0 0 1px var(--border);
  outline: none; color: var(--ink);
}
.field:focus { box-shadow: inset 0 0 0 1.5px var(--primary); }
.field-textarea {
  min-height: 108px;
  resize: vertical;
}
.person {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border-radius: 18px; padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--border);
}
.person b { font-size: 16px; font-weight: 600; line-height: 24px; display: block; }
.person span { color: var(--muted); font-size: 12px; line-height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.participant-picker {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.participant-option {
  flex: 0 0 92px;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 10px 8px;
  border: 2px solid transparent;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  scroll-snap-align: start;
}
.participant-option img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
}
.participant-option span { font-size: 13px; font-weight: 600; }
.participant-option.on {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 22%, transparent);
}
.participant-option:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  font-weight: 500; font-size: 14px;
}
.tag.on { background: var(--primary-light); box-shadow: none; }
.prep-add { display: flex; gap: 8px; }
.prep-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.prep-item-title {
  min-width: 0;
  width: 100%;
  border: 0;
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 21px;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border);
  outline: none;
}
.prep-item-title:focus {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 55%, var(--border));
}
.toggle {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border-radius: 16px; padding: 14px 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 14px;
}
.switch {
  width: 46px; height: 28px; border-radius: 99px; background: var(--border); position: relative;
}
.switch.on { background: var(--primary); }
.switch i {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: left .2s;
}
.switch.on i { left: 21px; }
.recurrence-card {
  width: 100%;
  min-height: 88px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 54px 1fr 20px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  text-align: left;
  box-shadow: 0 5px 16px rgba(26,26,26,.035);
}
.recurrence-card:disabled { opacity: .72; }
.recurrence-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #168447;
  background: color-mix(in srgb, var(--success) 11%, white);
}
.recurrence-icon svg { width: 28px; height: 28px; }
.recurrence-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.recurrence-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}
.recurrence-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recurrence-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid #65708a;
  border-bottom: 2px solid #65708a;
  transform: rotate(-45deg);
  transition: transform .2s ease;
}
.recurrence-card.open .recurrence-chevron {
  transform: rotate(45deg) translate(-2px, -2px);
}
.recurrence-details {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.transport-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.transport-option {
  min-width: 0;
  min-height: 102px;
  padding: 12px 7px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  color: #65708a;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 4px 12px rgba(26,26,26,.035);
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.transport-option:active { transform: scale(.97); }
.transport-option svg { width: 31px; height: 31px; }
.transport-option span {
  font-size: 13px;
  font-weight: 500;
  line-height: 17px;
  text-align: center;
}
.transport-option.on {
  border-color: var(--success);
  color: #168447;
  background: color-mix(in srgb, var(--success) 9%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 28%, transparent);
}
.transport-details {
  margin-top: 14px;
  padding: 13px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary-light) 58%, transparent);
}

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.seg {
  display: flex; background: var(--surface); border-radius: 999px; padding: 4px;
  border: 1px solid var(--border);
}
.seg button { padding: 8px 16px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--primary); color: #fff; }
.calendar-seg button { padding-inline: 11px; }
.week-agenda { margin-top: 18px; }
.year-calendar-screen { scroll-behavior: smooth; }
.year-agenda { margin-top: 18px; }
.year-month {
  margin: 24px 2px 10px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 31px;
  text-transform: capitalize;
}
.year-month:first-child { margin-top: 12px; }
.year-day.is-selected .wd-head h3 { color: var(--primary); }
.year-day-select {
  width: 100%;
  text-align: left;
}
.year-load-sentinel,
.year-loading {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.agenda-controls { display: grid; gap: 12px; margin: 20px 0; }
.agenda-controls .seg { width: fit-content; }
.agenda-week-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
}
.agenda-week-nav button {
  height: 40px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 20px;
}
.agenda-week-nav span { text-align: center; color: var(--muted); font-size: 12px; }
.personal-agenda { margin-top: 8px; }
.agenda-day { margin-bottom: 22px; }
.agenda-day > h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 8px 2px;
  text-transform: capitalize;
}
.personal-agenda { margin-top: 4px; }
.agenda-item {
  width: 100%;
  display: grid;
  grid-template-columns: 52px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 13px 12px 13px 14px;
  margin-bottom: 8px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
}
.agenda-item.is-static { cursor: default; }
.agenda-item.locked { box-shadow: inset 3px 0 0 var(--primary); }
.agenda-item.is-past {
  opacity: 0.42;
  filter: grayscale(0.25);
}
.agenda-item.is-past time { color: var(--muted); }
.agenda-maps-btn {
  width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary-light) 80%, white);
}
.agenda-maps-btn img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}
.agenda-maps-btn:active { transform: scale(0.94); }
.travel-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.travel-sheet-maps {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}
.travel-dest-box {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 12px;
  display: grid;
  gap: 2px;
}
.travel-dest-box b {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.travel-eta-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--primary-light);
  margin-bottom: 14px;
  display: grid;
  gap: 4px;
  justify-items: start;
}
.travel-eta-box .app-loader-orb { margin-bottom: 4px; }
.travel-eta-main {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  color: var(--ink);
}
.travel-eta-err {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.travel-notify-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  margin-top: 4px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .12s ease;
}
.travel-notify-btn .travel-notify-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.travel-notify-btn .travel-notify-ico svg {
  width: 22px;
  height: 22px;
}
.travel-notify-btn.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.travel-notify-btn:active:not(:disabled) { transform: scale(0.98); }
.travel-notify-btn:disabled { opacity: .6; }
.agenda-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
}
.agenda-avatar.placeholder { display: grid; place-items: center; color: var(--primary); }
.agenda-item time { font-weight: 700; color: var(--primary); }
.agenda-item span { min-width: 0; display: grid; gap: 2px; }
.agenda-item b { font-size: 14px; line-height: 20px; }
.agenda-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-item i { font-style: normal; font-size: 24px; color: var(--muted); }

.app-loader {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.app-loader-orb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 28px;
}
.app-loader-orb span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  animation: app-loader-bounce 0.9s ease-in-out infinite;
}
.app-loader-orb span:nth-child(2) { animation-delay: .15s; opacity: .85; }
.app-loader-orb span:nth-child(3) { animation-delay: .3s; opacity: .7; }
@keyframes app-loader-bounce {
  0%, 80%, 100% { transform: translateY(0) scale(0.85); opacity: .45; }
  40% { transform: translateY(-7px) scale(1); opacity: 1; }
}

.boot-splash {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.boot-splash-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.boot-icon {
  margin: 0;
  animation: boot-icon-pulse 1.6s ease-in-out infinite;
}
.boot-orb { height: 22px; }
.boot-splash-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
@keyframes boot-icon-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 36px rgba(255, 139, 94, .28); }
  50% { transform: scale(1.04); box-shadow: 0 22px 42px rgba(255, 139, 94, .38); }
}

body.is-refreshing::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: refresh-bar 0.9s linear infinite;
}
@keyframes refresh-bar {
  0% { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .app-loader-orb span,
  .boot-icon,
  body.is-refreshing::before { animation: none; }
}

.family-hub-screen .page-title { margin-bottom: 0; }
.family-hub-head {
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}
.family-hub-titles { min-width: 0; flex: 1; }
.family-range-seg {
  flex: 0 0 auto;
  margin-top: 4px;
}
.family-range-seg button {
  padding: 7px 12px;
  font-size: 13px;
}
.family-week-nav { margin: 8px 0 12px; }
.family-switcher {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 2px 6px;
  margin: 4px -4px 0;
  -webkit-overflow-scrolling: touch;
}
.family-switch {
  flex: 0 0 auto;
  width: 72px;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 18px;
  color: var(--muted);
}
.family-switch .avatar {
  width: 56px;
  height: 56px;
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow .16s ease, transform .16s ease;
}
.family-switch span {
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.family-switch.on { color: var(--ink); }
.family-switch.on .avatar {
  box-shadow: 0 0 0 2.5px var(--primary);
  transform: scale(1.04);
}
.family-switch.on span { font-weight: 600; }
.family-hub-actions { margin: 10px 0 4px; }
.family-hub-actions .btn { width: 100%; }
.child-week-help { margin: 10px 0 8px; color: var(--muted); }
.wt-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.wt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 320px;
}
.wt-table th,
.wt-table td {
  padding: 8px 4px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.wt-table thead th {
  padding-top: 8px;
  padding-bottom: 6px;
  font-weight: 600;
}
.wt-table tbody tr:last-child th,
.wt-table tbody tr:last-child td { border-bottom: 0; }
.wt-corner { width: 52px; }
.wt-row-label {
  width: 52px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
}
.wt-day-head {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 12px;
}
.wt-day-head.on,
.wt-day-head:active {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.wt-dow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 16px;
}
.wt-dom {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.wt-cell {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 6px 2px 8px;
  border-radius: 14px;
}
.wt-cell time {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 14px;
}
.wt-face {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--border) 55%, var(--surface));
  box-shadow: inset 0 0 0 1.5px var(--border);
  overflow: hidden;
}
.wt-face .avatar {
  width: 40px;
  height: 40px;
  box-shadow: none;
}
.wt-q {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}
.wt-cell.has-person .wt-face {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 55%, transparent);
  background: var(--primary-light);
}
.wt-cell.locked {
  opacity: 0.92;
  cursor: default;
}
.wt-cell.locked .wt-face {
  box-shadow: 0 0 0 2px var(--primary);
}
.wt-cell:not(.locked):active {
  transform: scale(0.96);
}
.pd-cell { cursor: default; }
.pd-faces.multi {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 40px;
  padding: 0 2px;
  border-radius: 999px;
  gap: 0;
}
.pd-faces.multi .avatar {
  width: 28px;
  height: 28px;
  margin-left: -8px;
  box-shadow: 0 0 0 2px var(--surface);
}
.pd-faces.multi .avatar:first-child { margin-left: 0; }
.pd-more {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.week-transport-locked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}
.week-transport-locked small {
  color: var(--muted);
  font-weight: 500;
}
.week-lock-note {
  margin: 6px 0 0;
  color: var(--muted);
}
.transport-day-sheet .transport-edit-who { margin-bottom: 2px; }
.week-event-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.week-event-line {
  display: grid;
  grid-template-columns: 52px 1fr 16px;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.week-event-line time {
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
}
.week-event-line span { min-width: 0; display: grid; gap: 2px; }
.week-event-line b { font-size: 14px; line-height: 18px; }
.week-event-line small { color: var(--muted); font-size: 12px; }
.week-event-line i { font-style: normal; color: var(--muted); font-size: 20px; }
.week-event-line.locked small { color: var(--ink); font-weight: 500; }

.week-block { margin-bottom: 18px; }
.week-block.is-today .wd-head h3 { color: var(--primary); }
.wd-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px; padding: 0 2px;
}
.wd-head h3 {
  font-family: var(--serif);
  font-size: 20px; font-weight: 600; line-height: 28px;
}
.wd-head span { font-size: 14px; color: var(--muted); font-weight: 500; }
.week-empty { font-size: 13px; color: var(--muted); padding: 4px 2px 8px; }
.week-ev {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: var(--surface);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.week-ev-cover {
  width: 56px; height: 56px; border-radius: 12px;
  object-fit: cover; flex: 0 0 auto;
}
.week-ev-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.week-ev-body b {
  font-size: 15px; font-weight: 600; line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.week-ev-body span { font-size: 12px; line-height: 16px; color: var(--muted); }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px 4px; margin-top: 18px;
}
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 6px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 500; font-size: 14px; color: var(--ink);
  position: relative;
}
.cal-cell.out { color: #D1D5DB; }
.cal-cell.sel { background: var(--primary); color: #fff; }
.cal-cell .dots { display: flex; gap: 3px; position: absolute; bottom: 6px; }
.cal-cell .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.cal-cell.sel .dots i { background: #fff; }

.sheet {
  position: fixed; inset: 0; background: rgba(26,26,26,.28);
  z-index: 30; display: flex; align-items: flex-end; justify-content: center;
}
.sheet-card {
  width: min(430px, 100%);
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  padding: 18px 20px calc(28px + env(safe-area-inset-bottom));
  max-height: 86dvh; overflow: auto;
}
.todo-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(26,26,26,.28);
}
.todo-settings-overlay .sheet-card {
  width: min(430px, 100%);
}
.todo-settings-item-name {
  margin: -4px 0 12px;
  font-size: 14px;
  line-height: 20px;
}
.focus-todo-settings-sheet .page-title {
  font-size: 22px;
  line-height: 28px;
  margin: 4px 0 8px;
}
.focus-todo-settings-sheet .form-label { margin-top: 10px; }
.focus-todo-settings-sheet .btn { margin-top: 12px; }
.handle { width: 42px; height: 5px; border-radius: 99px; background: var(--border); margin: 0 auto 14px; }

.notif { padding: 14px 0; border-bottom: 1px solid var(--border); }
.notif b { display: block; font-size: 14px; font-weight: 600; line-height: 20px; }
.notif p { color: var(--muted); font-size: 12px; line-height: 16px; margin-top: 3px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }

.ai-bubble {
  max-width: 86%; padding: 12px 14px; border-radius: 16px; margin-bottom: 10px;
  font-size: 14px; line-height: 20px;
}
.ai-bubble > span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-bubble.bot { background: var(--surface); border: 1px solid var(--border); border-top-left-radius: 6px; }
.ai-bubble.me { background: var(--primary-light); margin-left: auto; border-top-right-radius: 6px; }
.alfred-screen {
  padding-bottom: calc(var(--nav-h) + 116px + env(safe-area-inset-bottom));
}
.ai-log { margin-top: 18px; }
.ai-event-link {
  display: flex;
  width: fit-content;
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.alfred-composer {
  position: fixed;
  z-index: 21;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(406px, calc(100% - 24px));
  padding: 10px;
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 30px rgba(26, 26, 26, .13);
  backdrop-filter: blur(18px) saturate(1.4);
}
.alfred-compose-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
}
.alfred-compose-row .field {
  min-width: 0;
  min-height: 48px;
  max-height: 140px;
  padding: 11px 13px;
  resize: none;
  line-height: 20px;
}
.alfred-send { min-height: 44px; padding: 10px 13px; }
.alfred-send:disabled { opacity: .5; cursor: default; }
.alfred-send:focus-visible,
.ai-event-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 48%, transparent);
  outline-offset: 2px;
}

.event-detail-screen {
  padding: 0 0 calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--primary-light), #fff 52%, var(--bg));
}
.detail-hero {
  height: clamp(285px, 43dvh, 390px);
  overflow: hidden;
  position: relative;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.back {
  position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  display: grid; place-items: center;
  box-shadow: 0 5px 18px rgba(26,26,26,.12);
}
.cover-picker-trigger {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  right: 18px;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  color: rgba(255,255,255,.58);
  background: rgba(26,26,26,.16);
  box-shadow: 0 4px 14px rgba(26,26,26,.06);
  backdrop-filter: blur(8px);
}
.cover-picker-trigger svg { width: 22px; height: 22px; }
.cover-picker-trigger:focus-visible,
.cover-option:focus-visible,
.cover-picker-cancel:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}
.event-detail-panel {
  position: relative;
  z-index: 1;
  margin-top: -32px;
  padding: 24px 20px 30px;
  min-height: 55dvh;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.98), #fffcf9 72%, var(--bg));
  box-shadow: 0 -12px 34px rgba(26,26,26,.08);
}
.event-detail-panel.has-participants { padding-top: 50px; }
.event-participant-avatars {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}
.event-participant-avatars img {
  width: 76px;
  height: 76px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  box-shadow: 0 7px 20px rgba(26,26,26,.2);
}
.event-participant-avatars img + img { margin-left: -22px; }
.event-participant-avatars img:nth-child(1) { z-index: 5; }
.event-participant-avatars img:nth-child(2) { z-index: 4; }
.event-participant-avatars img:nth-child(3) { z-index: 3; }
.event-participant-avatars img:nth-child(4) { z-index: 2; }
.event-detail-panel > .page-title {
  font-size: 31px;
  line-height: 38px;
  margin-bottom: 5px;
}
.event-detail-panel > .event-meta {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
  margin-top: 3px;
}
.event-meta-icon {
  width: 18px;
  color: var(--primary);
  font-size: 17px;
  text-align: center;
}
.event-recurrence {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--ink);
  font-size: 11px;
  line-height: 16px;
}
.event-detail-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(229,231,235,.85);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 26px rgba(26,26,26,.055);
}
.event-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 11px;
}
.event-card-head h3 {
  font-size: 17px;
  line-height: 23px;
  font-weight: 600;
}
.event-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
.event-detail-card .when { margin-left: 49px; }
.event-detail-card .choice-row { margin-top: 12px; }
.note-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #444;
  font-size: 14px;
  line-height: 22px;
}
.event-actions { margin-top: 22px; }
.event-actions .btn + .btn { margin-top: 10px; }
.btn.danger {
  background: var(--error);
  color: #fff;
}
.btn.danger-soft {
  background: #FEE2E2;
  color: #B91C1C;
}
.btn.delete-link {
  color: var(--error);
  min-height: 42px;
}
.btn:disabled { opacity: .58; cursor: default; }
.delete-sheet-card .page-title {
  font-size: 23px;
  line-height: 30px;
  margin-bottom: 5px;
}
.delete-sheet-card .muted { margin-bottom: 16px; }
.delete-sheet-card .btn + .btn { margin-top: 10px; }

.cover-picker-overlay { z-index: 40; }
.cover-picker-sheet {
  width: min(560px, 100%);
  max-height: min(88dvh, 760px);
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.cover-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cover-picker-head h2 {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 31px;
}
.cover-picker-cancel { min-height: 44px; padding: 9px 11px; }
.cover-ai-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 8px;
}
.cover-ai-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
}
.cover-ai-generate svg { width: 20px; height: 20px; }
.cover-prompt-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding-inline: 11px;
}
.cover-prompt-toggle svg { width: 17px; height: 17px; }
.cover-prompt-panel {
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}
.cover-prompt-panel label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
}
.cover-prompt-panel textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  line-height: 20px;
}
.cover-prompt-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 2px 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}
.cover-ai-help {
  margin: 0 4px 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  text-align: center;
}
.cover-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cover-option {
  min-width: 0;
  padding: 5px;
  border: 2px solid transparent;
  border-radius: 17px;
  background: rgba(255,255,255,.72);
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.cover-option:active { transform: scale(.98); }
.cover-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.cover-option:disabled { opacity: .72; }
.cover-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--surface);
}
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(26,26,26,.22);
  font-size: 14px;
  font-weight: 700;
}
.cover-saving {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(26,26,26,.48);
  font-size: 12px;
  font-weight: 600;
}
.cover-option-label {
  display: block;
  min-height: 40px;
  padding: 8px 5px 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-overflow: ellipsis;
}
.cover-picker-status {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.cover-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: cover-spin .75s linear infinite;
}
.cover-spinner.light {
  width: 18px;
  height: 18px;
  border-color: rgba(255,255,255,.38);
  border-top-color: white;
}
.cover-picker-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #B91C1C;
  background: #FEE2E2;
  font-size: 13px;
}
@keyframes cover-spin { to { transform: rotate(360deg); } }

@media (max-width: 360px) {
  .event-detail-panel { padding-left: 15px; padding-right: 15px; }
  .event-detail-card { padding: 14px; }
  .event-detail-panel > .page-title { font-size: 28px; line-height: 34px; }
  .cover-picker-grid { gap: 8px; }
}

.empty { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 14px; }
.home-empty-state {
  text-align: center;
  padding: 4px 0 26px;
}
.home-empty-media {
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #f5eee8;
}
.home-empty-media img,
.home-empty-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
.home-empty-media [hidden] { display: none; }
.home-empty-state h3 {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 34px;
  font-weight: 600;
  color: var(--ink);
}
.home-empty-state p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}
.shimmer {
  background: linear-gradient(90deg, var(--primary-light), #fff, var(--primary-light));
  background-size: 200% 100%;
  animation: sh 1.4s infinite linear;
  border-radius: 20px;
}
@keyframes sh { to { background-position: -200% 0; } }

.status-ok { color: var(--success); font-weight: 600; font-size: 14px; }
.status-pending { color: var(--warning); }

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
  /* A fekvő nézetet a .landscape-mode JS UI kezeli. */
}

body.landscape-mode {
  background: var(--bg);
  overflow: hidden;
}
body.landscape-mode .device {
  display: block;
  min-height: 100dvh;
  background: var(--bg);
}
body.landscape-mode .app {
  max-width: none;
  width: 100%;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  box-shadow: none;
  background: var(--bg);
}

.landscape-shell {
  display: grid;
  grid-template-columns: minmax(220px, 36vw) minmax(0, 1fr);
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}
.landscape-cal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 12px max(12px, env(safe-area-inset-left));
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow: auto;
}
.landscape-cal-nav {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 6px;
}
.landscape-cal-nav h2 {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  text-transform: capitalize;
}
.landscape-cal-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 10%, var(--surface));
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}
.landscape-cal-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.landscape-cal-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ls-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: 12px;
  transition: background .2s ease, box-shadow .2s ease;
}
.ls-week.is-focus-week {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 45%, transparent);
}
.ls-day {
  aspect-ratio: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
}
.ls-day.out { visibility: hidden; pointer-events: none; }
.ls-day.has-events::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}
.ls-day.is-today {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  font-weight: 700;
}
.ls-day:active { background: color-mix(in srgb, var(--primary) 28%, transparent); }
.landscape-loading {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.landscape-agenda {
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px max(16px, env(safe-area-inset-right)) 20px 16px;
}
.ls-day-block {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.ls-day-block:last-child { border-bottom: 0; }
.ls-day-head h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  text-transform: capitalize;
}
.ls-day-block.is-today .ls-day-head h3 { color: var(--primary); }
.ls-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 4px 2px;
}
.ls-ev {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  pointer-events: none;
  user-select: none;
}
.ls-ev-cover {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
}
.ls-ev-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ls-ev-body b {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}
.ls-ev-body span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}
.status-overdue { color: var(--error); }

.hidden { display: none !important; }
.install-hint {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  width: min(390px, calc(100% - 28px));
  background: rgba(26,26,26,.9); color: #fff;
  border-radius: 16px; padding: 12px 14px; font-size: 12px; z-index: 25;
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
}
.push-card {
  background: #fff;
  border-radius: 20px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  margin: 14px 0 4px;
}
.push-card h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  margin-bottom: 6px;
}
.push-card p { color: var(--muted); font-size: 13px; line-height: 20px; }
.push-card ol {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
}
.push-card li { margin: 4px 0; }
.push-card .push-err { color: var(--error); margin-top: 8px; font-size: 12px; }
.push-card .btn { margin-top: 12px; }
.push-ok { color: var(--success); font-weight: 600; font-size: 13px; }

.theme-block { margin-top: 28px; text-align: left; }
.theme-block .tiny { margin-bottom: 10px; }
.theme-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.theme-dot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px 8px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.theme-dot::before {
  content: '';
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 6px 12px rgba(0,0,0,.12);
}
.theme-dot span { font-size: 11px; font-weight: 500; color: var(--muted); line-height: 14px; }
.theme-dot.on {
  box-shadow: inset 0 0 0 1.5px var(--primary);
  background: var(--primary-light);
}
.theme-dot.on span { color: var(--ink); font-weight: 600; }

.mode-block { margin-top: 22px; }
.mode-seg {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 16px;
}
.mode-seg button {
  padding: 10px 8px;
  font-size: 13px;
  text-align: center;
}

.family-edit-screen .place-kind-seg {
  margin: 0 0 12px;
  width: 100%;
}
.family-edit-screen .place-kind-seg button {
  flex: 1;
  padding: 9px 8px;
  font-size: 13px;
}
.family-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.family-row {
  display: grid;
  grid-template-columns: 72px 1fr 12px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  box-shadow: var(--shadow);
}
.family-row .avatar.lg {
  width: 64px;
  height: 64px;
}
.family-row-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.family-row-copy b {
  font-size: 17px;
  font-weight: 600;
  line-height: 23px;
  color: var(--ink);
}
.family-row-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}
.family-row-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.family-row-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
}
.family-avatar-block {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  margin: 18px 0 4px;
}
.family-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--surface), 0 10px 24px rgba(26,26,26,.12);
}
.family-msg {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}
.family-msg.ok { color: var(--success); }
.family-msg.err { color: var(--error); }
.family-edit-screen #family-save { margin-top: 22px; }

/* ——— Dark mode surface overrides ——— */
html[data-mode="dark"] body { background: #0d0f12; }
html[data-mode="dark"] .device { background: #0d0f12; }
html[data-mode="dark"] .app {
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
html[data-mode="dark"] .avatar {
  box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}
html[data-mode="dark"] .avatar.sm {
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.18);
}
html[data-mode="dark"] .bell {
  background: rgba(28, 31, 38, .82);
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
}
html[data-mode="dark"] .week-day.active {
  background: var(--surface);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--primary) 45%, transparent), 0 8px 18px rgba(0,0,0,.35);
}
html[data-mode="dark"] .focus-remind {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  box-shadow: 0 5px 16px rgba(0,0,0,.35);
}
html[data-mode="dark"] .todo-assignees button {
  background: var(--surface);
}
html[data-mode="dark"] .cover-option {
  background: rgba(28, 31, 38, .72);
}
html[data-mode="dark"] .waiting {
  background: color-mix(in srgb, var(--warning) 18%, var(--surface));
  color: #F6C97A;
}
html[data-mode="dark"] .nav {
  border-color: rgba(255,255,255,.08);
  background: color-mix(in srgb, #1c1f26 72%, transparent);
  box-shadow:
    inset 1px 2px 0 -1px rgba(255,255,255,.08),
    inset -1px -2px 0 -1px rgba(0,0,0,.35),
    0 2px 6px rgba(0,0,0,.28),
    0 14px 34px rgba(0,0,0,.4);
}
html[data-mode="dark"] .login {
  background: #14161b;
}
html[data-mode="dark"] .login-blobs .b1 {
  background: radial-gradient(circle, rgba(255,139,94,.22) 0%, transparent 70%);
}
html[data-mode="dark"] .login-blobs .b2 {
  background: radial-gradient(circle, rgba(255,139,94,.14) 0%, transparent 72%);
}
html[data-mode="dark"] .login-blobs .b3 {
  background: radial-gradient(circle, rgba(255,139,94,.18) 0%, transparent 68%);
}
html[data-mode="dark"] .login-hi,
html[data-mode="dark"] .login-card b,
html[data-mode="dark"] .login-back {
  color: var(--ink);
}
html[data-mode="dark"] .login-sub,
html[data-mode="dark"] .login-foot {
  color: var(--muted);
}
html[data-mode="dark"] .login-card,
html[data-mode="dark"] .login-form,
html[data-mode="dark"] .pass-wrap {
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(0,0,0,.35);
}
html[data-mode="dark"] .login-card-photo {
  background: #2A2422;
}
html[data-mode="dark"] .pass-hint,
html[data-mode="dark"] .pass-meta {
  color: var(--muted);
}
html[data-mode="dark"] .alfred-composer {
  border-color: rgba(46, 52, 64, .95);
  background: rgba(28, 31, 38, .94);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
html[data-mode="dark"] .event-detail-screen {
  background: linear-gradient(180deg, var(--primary-light), var(--bg) 48%, var(--bg));
}
html[data-mode="dark"] .event-detail-panel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff), var(--surface) 55%, var(--bg));
  box-shadow: 0 -12px 34px rgba(0,0,0,.45);
  color: var(--ink);
}
html[data-mode="dark"] .event-detail-panel > .page-title {
  color: var(--ink);
}
html[data-mode="dark"] .event-detail-card {
  border-color: rgba(46, 52, 64, .95);
  background: color-mix(in srgb, var(--surface) 88%, #000);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
html[data-mode="dark"] .event-card-icon {
  background: color-mix(in srgb, var(--primary) 22%, var(--surface));
  color: var(--primary);
}
html[data-mode="dark"] .event-recurrence {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  color: var(--ink);
}
html[data-mode="dark"] .back {
  background: rgba(28, 31, 38, .88);
  color: var(--ink);
  box-shadow: 0 5px 18px rgba(0,0,0,.4);
}
html[data-mode="dark"] .back svg {
  stroke: currentColor;
  fill: none;
}
html[data-mode="dark"] .event-participant-avatars img {
  border-color: var(--surface);
  box-shadow: 0 7px 20px rgba(0,0,0,.45);
}
html[data-mode="dark"] .cover-picker-trigger {
  color: rgba(255,255,255,.78);
  background: rgba(0,0,0,.42);
  border-color: rgba(255,255,255,.2);
}
html[data-mode="dark"] .event-detail-card .check {
  color: var(--ink);
}
html[data-mode="dark"] .event-detail-card .choice {
  background: color-mix(in srgb, var(--surface) 80%, #000);
  color: var(--ink);
}
html[data-mode="dark"] .event-detail-card .choice.on {
  background: color-mix(in srgb, var(--primary) 22%, var(--surface));
}
html[data-mode="dark"] .home-empty-media {
  background: #1a1614;
}
html[data-mode="dark"] .cal-cell.out { color: #4B5563; }
html[data-mode="dark"] .btn.danger-soft,
html[data-mode="dark"] .cover-picker-error {
  background: color-mix(in srgb, var(--error) 18%, var(--surface));
  color: #F87171;
}
html[data-mode="dark"] .note-card p {
  color: #C8CDD5;
}
html[data-mode="dark"] .recurrence-icon {
  color: #4ADE80;
  background: color-mix(in srgb, var(--success) 18%, var(--surface));
}
html[data-mode="dark"] .transport-option {
  color: #A8B0BC;
}
html[data-mode="dark"] .recurrence-chevron {
  border-right-color: #A8B0BC;
  border-bottom-color: #A8B0BC;
}
html[data-mode="dark"] .sheet-card {
  background: var(--surface);
}
html[data-mode="dark"] .push-card {
  background: var(--surface);
}
html[data-mode="dark"] .fab,
html[data-mode="dark"] .nav-center {
  border-color: rgba(255,255,255,.12);
}
html[data-mode="dark"] .theme-dot.on {
  background: color-mix(in srgb, var(--primary) 22%, var(--surface));
}
html[data-mode="dark"] .pickup-who .avatar.sm {
  box-shadow: 0 0 0 2px rgba(255,255,255,.14);
}
html[data-mode="dark"] .family-row {
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
html[data-mode="dark"] .family-avatar-preview {
  box-shadow: 0 0 0 3px var(--surface), 0 10px 24px rgba(0,0,0,.35);
}
html[data-mode="dark"] .wt-table-wrap,
html[data-mode="dark"] .week-day-card {
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
html[data-mode="dark"] .wt-face {
  background: color-mix(in srgb, var(--border) 40%, var(--surface));
}

