:root {
  --ink: #302831;
  --muted: #756b72;
  --paper: #f4efe7;
  --paper-deep: #e9e1d5;
  --surface: rgba(255, 252, 247, 0.92);
  --plum: #512c45;
  --plum-deep: #3b2034;
  --coral: #e98263;
  --coral-soft: #f7d7c9;
  --sage: #809d8a;
  --sage-soft: #dbe7dc;
  --gold: #d6a34a;
  --gold-soft: #f5e6bf;
  --line: rgba(70, 53, 64, 0.14);
  --shadow: 0 22px 60px rgba(70, 45, 56, 0.11);
  --radius-lg: 28px;
  --radius-md: 19px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 2%, rgba(233, 130, 99, .16), transparent 26rem),
    radial-gradient(circle at 15% 85%, rgba(128, 157, 138, .12), transparent 30rem),
    var(--paper);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(233, 130, 99, .6);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  color: white;
  background: var(--plum);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image:
    repeating-linear-gradient(90deg, rgba(61, 43, 53, .018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.25) 0 1px, transparent 1px 5px);
}

.eyebrow, .kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.kicker { letter-spacing: .11em; }
.kicker.coral { color: #b44e32; }
.kicker.sage { color: #51715d; }
.kicker.gold { color: #936814; }
.eyebrow.light { color: rgba(255,255,255,.68); }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.15fr);
  place-items: center;
  gap: clamp(40px, 8vw, 130px);
  padding: clamp(24px, 7vw, 100px);
  overflow: hidden;
}
.login-mark {
  position: relative;
  width: min(38vw, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 42% 58% 62% 38% / 42% 38% 62% 58%;
  color: #fffaf2;
  background: var(--plum);
  box-shadow: 28px 34px 0 var(--coral-soft);
  animation: settle .7s var(--ease) both;
}
.login-mark span { font-family: Georgia, serif; font-size: clamp(9rem, 22vw, 18rem); line-height: 1; }
.login-mark i {
  position: absolute;
  top: 8%;
  right: 4%;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
  border: 10px solid var(--paper);
}
.login-card { width: min(100%, 470px); animation: lift-in .65s .1s var(--ease) both; }
.login-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 6vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .95;
}
.login-copy { max-width: 37ch; margin: 23px 0 32px; color: var(--muted); font-size: 1.05rem; }
.login-form label, .field > span { display: block; margin-bottom: 7px; font-size: .78rem; font-weight: 800; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.password-row input, .field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.7);
  box-shadow: inset 0 1px 1px rgba(55,35,47,.03);
}
.password-row input:focus, .field input:focus { border-color: var(--coral); background: white; }
.icon-button, .quiet-button, .text-button, .small-add, .dialog-close, .danger-button {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  background: transparent;
}
.icon-button { padding: 0 16px; border: 1px solid var(--line); background: rgba(255,255,255,.5); font-weight: 700; }
.primary-button {
  min-height: 46px;
  padding: 0 19px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--plum);
  box-shadow: 0 8px 20px rgba(81,44,69,.18);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.primary-button:hover { transform: translateY(-2px); background: var(--plum-deep); box-shadow: 0 12px 26px rgba(81,44,69,.24); }
.primary-button.wide { width: 100%; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; padding-inline: 20px; }
.reset-link { width: 100%; min-height: 44px; margin-top: 8px; border: 0; color: var(--plum); background: transparent; font-size: .78rem; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(81,44,69,.25); text-underline-offset: 4px; cursor: pointer; }
.reset-link:hover { color: var(--coral); text-decoration-color: currentColor; }
.primary-button:disabled { opacity: .6; cursor: wait; transform: none; }
.form-error { min-height: 24px; margin: 7px 0; color: #a83e32; font-size: .85rem; font-weight: 650; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: .78rem; }
.privacy-note span { color: var(--sage); font-size: .55rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 31px 22px 24px;
  color: rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 25% 18%, rgba(233,130,99,.18), transparent 12rem),
    var(--plum-deep);
}
.brand-lockup { display: flex; align-items: center; gap: 12px; margin: 0 8px 47px; }
.brand-monogram { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px 15px 15px 5px; color: var(--plum); background: #fff8ef; font-family: Georgia, serif; font-size: 1.75rem; }
.brand-lockup div { display: grid; }
.brand-lockup strong { color: white; font-family: Georgia, serif; font-size: 1.34rem; letter-spacing: -.02em; }
.brand-lockup div span { color: rgba(255,255,255,.5); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; }
.side-nav { display: grid; gap: 7px; }
.nav-button {
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 15px;
  border: 0;
  border-radius: 14px;
  color: inherit;
  background: transparent;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color .2s, background .2s, transform .2s;
}
.nav-button:hover { color: white; transform: translateX(2px); }
.nav-button.active { color: white; background: rgba(255,255,255,.115); }
.nav-glyph { width: 22px; color: var(--coral); font-size: 1.25rem; text-align: center; }
.sidebar-footer { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin-top: auto; padding: 16px 9px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer div { display: grid; }
.sidebar-footer strong { color: white; font-size: .72rem; }
.sidebar-footer span:not(.sync-dot) { color: rgba(255,255,255,.45); font-size: .64rem; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 5px rgba(128,157,138,.14); }
.sync-dot.busy { background: var(--gold); animation: pulse 1s infinite; }
.sync-dot.error { background: var(--coral); }

.main-content { min-width: 0; padding: 32px clamp(24px, 4vw, 66px) 70px; }
.topbar { min-height: 74px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.7rem, 3vw, 2.45rem); font-weight: 500; letter-spacing: -.035em; }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 9px; }
.quiet-button { padding: 0 14px; border: 1px solid var(--line); background: rgba(255,255,255,.55); font-weight: 750; }
.quiet-button:hover { background: white; }
.avatar-button { width: 46px; height: 46px; border: 0; border-radius: 50%; color: white; background: var(--coral); font-size: .78rem; font-weight: 900; cursor: pointer; }
.account-menu { position: absolute; z-index: 20; top: 55px; right: 0; width: 230px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: #fffdfa; box-shadow: var(--shadow); }
.account-menu strong, .account-menu span { display: block; }
.account-menu span { margin: 2px 0 13px; color: var(--muted); font-size: .75rem; }
.account-menu button { width: 100%; min-height: 40px; border: 0; border-radius: 11px; font-weight: 800; cursor: pointer; }
.account-menu .account-reset-button { margin-bottom: 7px; color: var(--plum); background: var(--paper-deep); }
.account-menu .account-signout-button { color: #993f35; background: var(--coral-soft); }

.view { max-width: 1440px; margin: 0 auto; }
.welcome-panel {
  position: relative;
  min-height: 218px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 49px);
  border-radius: var(--radius-lg);
  color: white;
  background:
    linear-gradient(120deg, rgba(255,255,255,.05), transparent 45%),
    var(--plum);
  box-shadow: var(--shadow);
}
.welcome-panel h2 { max-width: 700px; margin: 2px 0 8px; font-family: Georgia, serif; font-size: clamp(2.1rem, 4.5vw, 4.25rem); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.welcome-panel p:last-child { margin: 0; color: rgba(255,255,255,.68); }
.round-add { position: relative; z-index: 2; flex: 0 0 auto; width: 59px; height: 59px; border: 2px solid rgba(255,255,255,.52); border-radius: 50%; color: white; background: rgba(255,255,255,.08); font-size: 2rem; cursor: pointer; transition: transform .25s var(--ease), background .25s; }
.round-add:hover { transform: rotate(90deg) scale(1.06); background: var(--coral); border-color: var(--coral); }
.welcome-orbit { position: absolute; right: -60px; top: -85px; width: 350px; height: 350px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.welcome-orbit::after { content: ""; position: absolute; inset: 64px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.welcome-orbit span { position: absolute; border-radius: 50%; background: var(--coral); }
.welcome-orbit span:nth-child(1) { width: 45px; height: 45px; left: 15px; top: 170px; }
.welcome-orbit span:nth-child(2) { width: 20px; height: 20px; right: 77px; bottom: 22px; background: var(--gold); }
.welcome-orbit span:nth-child(3) { width: 12px; height: 12px; left: 120px; bottom: 48px; background: var(--sage); }

.overview-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 21px; margin-top: 21px; }
.board-card, .agenda-panel, .list-board, .grocery-board {
  border: 1px solid rgba(75,53,66,.09);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 12px 38px rgba(70,45,56,.06);
  backdrop-filter: blur(12px);
}
.board-card { padding: clamp(22px, 3vw, 31px); }
.schedule-card { grid-row: span 2; }
.card-heading, .section-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-heading { margin-bottom: 20px; }
.card-heading h2, .section-toolbar h2, .agenda-panel h2 { margin: 0; font-family: Georgia, serif; font-size: 1.6rem; font-weight: 500; letter-spacing: -.035em; }
.text-button { color: var(--plum); font-size: .78rem; font-weight: 850; }
.text-button:hover { color: var(--coral); }
.small-add { width: 41px; flex: 0 0 41px; border: 1px solid var(--line); background: white; font-size: 1.25rem; }
.small-add:hover { color: white; background: var(--plum); }

.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 70px 13px 1fr; gap: 11px; min-height: 84px; cursor: pointer; }
.timeline-time { padding-top: 2px; font-size: .76rem; font-weight: 800; }
.timeline-axis { position: relative; }
.timeline-axis::after { content: ""; position: absolute; top: 17px; bottom: -7px; left: 6px; width: 1px; background: var(--line); }
.timeline-item:last-child .timeline-axis::after { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 5px; border: 3px solid white; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.timeline-item:nth-child(3n+2) .timeline-dot { background: var(--sage); box-shadow: 0 0 0 1px var(--sage); }
.timeline-item:nth-child(3n) .timeline-dot { background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.timeline-content strong, .agenda-content strong { display: block; margin-bottom: 3px; }
.timeline-content span, .agenda-content span { color: var(--muted); font-size: .74rem; }

.check-list { display: grid; gap: 6px; }
.check-row, .large-list-item, .grocery-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  transition: background .2s;
}
.check-row { grid-template-columns: auto 1fr; min-height: 42px; padding: 5px 7px; }
.check-row:hover, .large-list-item:hover, .grocery-row:hover { background: rgba(81,44,69,.045); }
.item-check { width: 22px; height: 22px; margin: 0; accent-color: var(--plum); cursor: pointer; }
.item-check:disabled { cursor: not-allowed; }
.check-row label { font-size: .88rem; cursor: pointer; }
.completed { color: var(--muted); text-decoration: line-through; }
.card-footer-link { width: 100%; min-height: 47px; display: flex; align-items: end; justify-content: space-between; margin-top: 14px; padding: 12px 6px 0; border: 0; border-top: 1px solid var(--line); color: var(--muted); background: transparent; font-size: .76rem; font-weight: 750; cursor: pointer; }
.grocery-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.grocery-pill { padding: 7px 11px; border-radius: 999px; background: var(--gold-soft); font-size: .75rem; font-weight: 750; }
.grocery-pill:nth-child(3n+2) { background: var(--sage-soft); }
.grocery-pill:nth-child(3n) { background: var(--coral-soft); }

.section-toolbar { align-items: end; margin: 10px 0 24px; }
.section-toolbar h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.toolbar-cluster { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; }
.week-board { min-height: 390px; display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,252,247,.7); box-shadow: 0 12px 38px rgba(70,45,56,.05); }
.calendar-day { min-width: 105px; padding: 17px 10px; border-right: 1px solid var(--line); }
.calendar-day:last-child { border-right: 0; }
.calendar-day.today { background: rgba(233,130,99,.055); }
.day-head { display: grid; place-items: center; gap: 4px; min-height: 57px; margin-bottom: 12px; }
.day-head span { color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.day-head strong { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-family: Georgia, serif; font-size: 1.1rem; }
.calendar-day.today .day-head strong { color: white; background: var(--coral); }
.day-events { display: grid; gap: 7px; }
.calendar-event { width: 100%; min-height: 54px; padding: 8px; border: 0; border-left: 3px solid var(--coral); border-radius: 9px; color: var(--ink); background: var(--coral-soft); text-align: left; cursor: pointer; }
.calendar-event:nth-child(3n+2) { border-color: var(--sage); background: var(--sage-soft); }
.calendar-event:nth-child(3n) { border-color: var(--gold); background: var(--gold-soft); }
.calendar-event strong { display: block; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event span { display: block; margin-top: 2px; color: var(--muted); font-size: .61rem; }
.agenda-panel { margin-top: 21px; padding: 28px; }
.agenda-list { display: grid; }
.agenda-item { display: grid; grid-template-columns: 65px 1fr auto; gap: 15px; align-items: center; min-height: 70px; border-top: 1px solid var(--line); }
.agenda-date { display: grid; color: var(--coral); font-size: .7rem; font-weight: 900; text-transform: uppercase; }
.agenda-date strong { color: var(--ink); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.source-tag { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--paper-deep); font-size: .62rem; font-weight: 750; text-transform: capitalize; }

.list-board, .grocery-board { padding: clamp(20px, 3vw, 33px); }
.filter-row { display: flex; gap: 8px; margin-bottom: 22px; }
.filter-chip { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: .75rem; font-weight: 800; cursor: pointer; }
.filter-chip.active { color: white; background: var(--plum); border-color: var(--plum); }
.filter-chip span { display: inline-grid; min-width: 21px; height: 21px; place-items: center; margin-left: 4px; border-radius: 50%; color: var(--plum); background: white; }
.large-list { display: grid; }
.large-list-item { grid-template-columns: auto 1fr auto; min-height: 66px; padding: 8px 10px; border-top: 1px solid var(--line); }
.large-list-item:first-child { border-top: 0; }
.list-item-copy { min-width: 0; display: grid; }
.list-item-copy strong { overflow: hidden; text-overflow: ellipsis; }
.list-item-copy span { color: var(--muted); font-size: .72rem; }
.edit-button { min-width: 44px; min-height: 40px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; cursor: pointer; }
.edit-button:hover { color: var(--plum); background: var(--paper-deep); }
.readonly-note { color: var(--muted); font-size: .67rem; }

.grocery-progress { display: grid; grid-template-columns: minmax(180px, auto) 1fr; gap: 24px; align-items: center; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.grocery-progress div:first-child { display: grid; }
.grocery-progress span { color: var(--muted); font-size: .75rem; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: var(--paper-deep); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sage), var(--coral)); transition: width .5s var(--ease); }
.grocery-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 25px 45px; margin-top: 28px; }
.grocery-group h3 { margin: 0 0 8px; color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.grocery-row { grid-template-columns: auto 1fr auto; min-height: 53px; padding: 5px 7px; border-top: 1px solid var(--line); }
.grocery-copy { display: grid; }
.grocery-copy span { color: var(--muted); font-size: .69rem; }

.empty-state { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 25px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-family: Georgia, serif; font-size: 1.22rem; font-weight: 500; }
.empty-state.compact { min-height: 90px; padding: 12px; }

.mobile-nav { display: none; }
.editor-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(800px, calc(100vh - 28px));
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 25px;
  color: var(--ink);
  background: #fffaf4;
  box-shadow: 0 30px 90px rgba(38,22,32,.35);
}
.editor-dialog::backdrop { background: rgba(39,26,34,.58); backdrop-filter: blur(4px); }
.editor-dialog form { padding: clamp(22px, 5vw, 37px); }
.recovery-content { padding: clamp(22px, 5vw, 37px); }
.recovery-intro { margin: -5px 0 22px; color: var(--muted); }
.recovery-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.recovery-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 13px; align-items: start; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.46); }
.recovery-steps li > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--plum); font-family: Georgia, serif; }
.recovery-steps strong { display: block; margin-bottom: 2px; }
.recovery-steps p { margin: 0; color: var(--muted); font-size: .8rem; }
.recovery-steps code { padding: 2px 5px; border-radius: 5px; color: var(--plum); background: var(--paper-deep); font-size: .73rem; }
.recovery-note { display: flex; gap: 8px; align-items: flex-start; margin: 20px 2px 0; color: var(--muted); font-size: .75rem; }
.recovery-note > span { margin-top: 4px; color: var(--sage); font-size: .55rem; }
.recovery-actions { grid-template-columns: 1fr auto; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }
.dialog-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.dialog-close { width: 44px; font-size: 1.75rem; }
.dialog-close:hover { background: var(--paper-deep); }
.editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.field.full, .toggle-field.full { grid-column: 1 / -1; }
.field small { color: var(--muted); font-weight: 500; }
.toggle-field { min-height: 46px; display: flex; align-items: center; gap: 10px; }
.toggle-field input { width: 22px; height: 22px; accent-color: var(--plum); }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 9px; align-items: center; margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-button { padding: 0 13px; color: #993f35; background: var(--coral-soft); font-weight: 800; }
.toast { position: fixed; z-index: 100; right: 25px; bottom: 25px; max-width: min(360px, calc(100vw - 36px)); padding: 14px 18px; border-radius: 14px; color: white; background: var(--plum-deep); box-shadow: var(--shadow); font-weight: 700; animation: toast-in .3s var(--ease) both; }
.noscript { margin: 20px; padding: 18px; border-radius: 14px; color: white; background: #963f35; }

.reveal { animation: lift-in .55s var(--ease) both; }
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }
@keyframes lift-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: scale(.92) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .45; } }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 86px minmax(0,1fr); }
  .sidebar { padding-inline: 14px; }
  .brand-lockup { justify-content: center; margin-inline: 0; }
  .brand-lockup div, .nav-button:not(.active)::after, .nav-button { font-size: 0; }
  .nav-button { justify-content: center; padding: 0; }
  .nav-glyph { font-size: 1.3rem; }
  .sidebar-footer div { display: none; }
  .sidebar-footer { display: flex; justify-content: center; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .schedule-card { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .login-shell { grid-template-columns: 1fr; align-content: center; padding: 30px 22px; }
  .login-mark { width: 118px; margin-bottom: 16px; box-shadow: 10px 12px 0 var(--coral-soft); }
  .login-mark span { font-size: 5rem; }
  .login-mark i { border-width: 4px; }
  .login-card h1 { font-size: 3.4rem; }
  .sidebar { display: none; }
  .app-shell { display: block; }
  .main-content { padding: 21px 17px 35px; }
  .topbar { min-height: 62px; margin-bottom: 15px; }
  .topbar .quiet-button span { display: none; }
  .welcome-panel { min-height: 205px; padding: 27px 23px; }
  .welcome-panel h2 { font-size: 2.45rem; }
  .welcome-orbit { opacity: .65; }
  .round-add { align-self: end; width: 51px; height: 51px; }
  .overview-grid { grid-template-columns: 1fr; }
  .schedule-card { grid-column: auto; }
  .board-card { border-radius: 22px; }
  .mobile-nav { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,252,247,.94); backdrop-filter: blur(18px); }
  .mobile-nav-button { min-height: 54px; display: grid; place-items: center; align-content: center; gap: 1px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: .61rem; font-weight: 800; }
  .mobile-nav-button span { font-size: 1.2rem; line-height: 1; }
  .mobile-nav-button.active { color: var(--plum); background: rgba(81,44,69,.07); }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-cluster { justify-content: flex-start; }
  .week-board { scroll-snap-type: x mandatory; grid-template-columns: repeat(7, minmax(145px, 65vw)); }
  .calendar-day { scroll-snap-align: start; }
  .agenda-item { grid-template-columns: 50px 1fr; }
  .source-tag { display: none; }
  .grocery-groups { grid-template-columns: 1fr; gap: 22px; }
  .grocery-progress { grid-template-columns: 1fr; gap: 13px; }
  .editor-fields { grid-template-columns: 1fr; }
  .field.full, .toggle-field.full { grid-column: auto; }
  .dialog-actions { grid-template-columns: auto 1fr auto; }
  .dialog-actions .primary-button { grid-column: 1 / -1; grid-row: 2; }
  .toast { right: 18px; bottom: calc(83px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
