:root {
  color-scheme: light;
  --ink: #202b24;
  --muted: #7d877e;
  --green: #315c43;
  --green-dark: #264c36;
  --green-pale: #e8eee7;
  --paper: #f5f4ef;
  --white: #fff;
  --line: #e9eae5;
  --orange: #d78b55;
  font-family: 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell { width: min(1320px, 100%); margin: 0 auto; padding: 0 48px; }

.topbar {
  height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(32, 43, 36, .08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: 'Segoe UI', sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1.4px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px 11px 11px 4px;
  background: var(--green);
  color: white;
  font-size: 23px;
  line-height: 1;
}

.brand-period { color: var(--orange); }
.clock-wrap { display: flex; align-items: center; gap: 13px; }
.clock-label, .eyebrow, .next-label { font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
.clock-label { color: var(--muted); }
.live-clock { min-width: 88px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding: 47px 0 36px;
}

.eyebrow { margin: 0 0 11px; color: var(--green); text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: 'Segoe UI', sans-serif; }
h1 { margin-bottom: 12px; font-size: clamp(36px, 4.5vw, 55px); font-weight: 700; letter-spacing: -2.7px; line-height: 1.08; }
h1 span { color: var(--green); }
.intro-copy { max-width: 430px; margin-bottom: 0; color: #707a71; font-size: 15px; line-height: 1.6; }

.serve-card {
  width: 285px;
  flex: 0 0 285px;
  padding: 17px 19px 15px;
  border: 1px solid #e6e7e0;
  border-radius: 15px;
  background: rgba(255, 255, 255, .67);
}

.serve-card label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.serve-card input {
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid #e4e7df;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}
.field-hint { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }

.workspace { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
.panel { border: 1px solid #e9e9e3; border-radius: 18px; background: var(--white); }
.dishes-panel { padding: 25px 25px 17px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-heading .eyebrow { margin-bottom: 4px; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.65px; }
.count-pill { padding: 6px 10px; border-radius: 20px; background: #f2f3ef; color: #6e786f; font-size: 10px; font-weight: 600; white-space: nowrap; }

.dish-list { display: grid; gap: 12px; margin: 21px 0 16px; }
.dish-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dish-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.dish-symbol { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: #f3f2ec; color: var(--green); font-size: 17px; }
.dish-name { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: #f8f8f5; color: var(--ink); font-size: 14px; font-weight: 700; }
.dish-name:focus, .duration-input:focus, .serve-card input:focus { outline: 2px solid #9eb8a3; outline-offset: 1px; }
.remove-button { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #969d96; font-size: 20px; cursor: pointer; }
.remove-button:hover { background: #f8eeeb; color: #a64f40; }
.duration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.duration-field label { display: block; margin: 0 0 5px 2px; color: #778078; font-size: 10px; font-weight: 600; }
.duration-control { position: relative; }
.duration-input { width: 100%; height: 38px; padding: 0 34px 0 10px; border: 1px solid #e8e9e4; border-radius: 7px; background: #fff; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.duration-unit { position: absolute; top: 50%; right: 9px; color: #929990; font-size: 10px; pointer-events: none; transform: translateY(-50%); }

.add-button {
  display: flex;
  width: 100%;
  min-height: 49px;
  justify-content: center;
  align-items: center;
  gap: 9px;
  border: 1px dashed #cbd3ca;
  border-radius: 10px;
  background: #fbfcfa;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.add-button:hover { background: var(--green-pale); border-color: #9bac9c; }
.add-icon { font-size: 21px; font-weight: 400; }
.panel-footer { display: flex; align-items: center; gap: 7px; margin-top: 17px; color: #7f8980; font-size: 10px; }
.save-dot { width: 7px; height: 7px; border-radius: 50%; background: #72a07a; }

.right-column { display: grid; gap: 17px; }
.next-card { min-height: 163px; padding: 20px 22px 17px; overflow: hidden; border-radius: 17px; background: var(--green); color: white; }
.next-card-top { display: flex; align-items: center; gap: 9px; }
.next-icon { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font-size: 15px; }
.next-label { color: #d6e2d7; }
.next-task { margin: 13px 0 4px; font-family: 'Segoe UI', sans-serif; font-size: 19px; font-weight: 700; letter-spacing: -.45px; }
.countdown-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.countdown { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.next-time { color: #d1dfd3; font-size: 11px; }
.countdown-track { height: 3px; margin-top: 16px; border-radius: 4px; background: rgba(255,255,255,.2); }
.countdown-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #eab787; transition: width .5s ease; }

.schedule-panel { padding: 23px 24px 20px; }
.schedule-heading { align-items: end; margin-bottom: 17px; }
.schedule-date { color: var(--muted); font-size: 10px; white-space: nowrap; }
.schedule-list { position: relative; }
.schedule-event { position: relative; display: grid; grid-template-columns: 66px 17px minmax(0, 1fr); gap: 10px; min-height: 68px; }
.schedule-event:not(:last-child)::after { position: absolute; top: 23px; bottom: -1px; left: 84px; width: 1px; background: #e5e9e4; content: ''; }
.event-time { padding-top: 2px; color: #59645b; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.event-marker { z-index: 1; display: block; width: 9px; height: 9px; margin: 5px 0 0 4px; border: 2px solid var(--green); border-radius: 50%; background: white; }
.schedule-event.is-next .event-marker { box-shadow: 0 0 0 4px #e8eee7; background: var(--green); }
.schedule-event.is-past .event-marker { border-color: #c7d0c7; background: #c7d0c7; }
.event-title { margin: 0 0 4px; font-size: 12px; font-weight: 700; line-height: 1.35; }
.event-detail { margin: 0; color: #879087; font-size: 10px; line-height: 1.4; }
.schedule-event.is-past .event-title { color: #939b93; }
.empty-state { display: grid; min-height: 200px; align-content: center; justify-items: center; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-graphic { display: grid; width: 42px; height: 42px; margin-bottom: 12px; place-items: center; border-radius: 14px; background: var(--green-pale); color: var(--green); font-size: 24px; }
.empty-state p { margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.empty-state > span:last-child { color: var(--muted); font-size: 10px; }
.page-footer { padding: 25px 0 35px; color: #7f8980; font-size: 10px; text-align: center; }
.page-footer span { margin-left: 5px; color: #a3aaa2; }

@media (min-width: 1000px) {
  .dishes-panel { position: sticky; top: 20px; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 24px; }
  .topbar { height: 72px; }
  .intro { align-items: flex-start; flex-direction: column; padding: 35px 0 25px; gap: 22px; }
  .serve-card { width: 100%; flex-basis: auto; }
  .workspace { grid-template-columns: 1fr; }
  .dishes-panel { padding: 21px 18px 16px; }
  .schedule-panel { padding: 21px 18px 17px; }
  .next-card { min-height: 155px; }
  .right-column { grid-row: 2; }
}

@media (max-width: 420px) {
  .app-shell { padding: 0 15px; }
  .clock-label { display: none; }
  h1 { font-size: 39px; }
  .duration-grid { gap: 6px; }
  .duration-field label { font-size: 9px; }
  .duration-input { padding-left: 7px; font-size: 12px; }
  .schedule-event { grid-template-columns: 57px 17px minmax(0, 1fr); gap: 7px; }
  .schedule-event:not(:last-child)::after { left: 71px; }
}

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

/* Comfortable reading and touch targets for kitchen tablets. */
.clock-label, .eyebrow, .next-label { font-size: 12px; }
.live-clock { font-size: 19px; }
.intro-copy { font-size: 17px; }
.serve-card { width: 330px; flex-basis: 330px; }
.serve-card label, .duration-field label { font-size: 14px; }
.serve-card input { min-height: 50px; font-size: 17px; }
.field-hint, .panel-footer, .schedule-date, .count-pill { font-size: 12px; line-height: 1.5; }
.dish-name { min-height: 48px; font-size: 18px; }
.remove-button { width: 48px; height: 48px; flex-basis: 48px; font-size: 26px; color: #657167; }
.duration-input { height: 48px; font-size: 18px; }
.duration-unit { font-size: 12px; color: #667167; }
.add-button { min-height: 56px; font-size: 17px; }
.next-task { font-size: 23px; overflow-wrap: anywhere; }
.countdown { font-size: clamp(36px, 4vw, 54px); font-weight: 750; line-height: 1.15; letter-spacing: -1px; overflow-wrap: anywhere; }
.countdown-row { flex-wrap: wrap; align-items: center; row-gap: 12px; margin-top: 16px; }
.next-card { padding: 24px; }
.next-card.is-overdue { background: #a4471b; }
.next-card.is-overdue .next-label, .next-card.is-overdue .next-time { color: #fff1e5; }
.next-card.is-overdue .countdown-track span { background: #ffdbb5; }
.next-time { font-size: 15px; }
.schedule-event { grid-template-columns: 82px 17px minmax(0, 1fr); min-height: 80px; }
.schedule-event:not(:last-child)::after { left: 100px; }
.event-time { font-size: 15px; }
.event-day { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; }
.event-title { font-size: 16px; overflow-wrap: anywhere; }
.event-detail { font-size: 13px; color: #657167; }
.schedule-note { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: #657167; line-height: 1.6; }
.empty-state p { font-size: 17px; }
.empty-state > span:last-child, .page-footer { font-size: 13px; }
button { touch-action: manipulation; }
.alarm-panel { padding: 16px 18px; }
.alarm-button, .done-button { min-height: 48px; padding: 10px 16px; border: 1px solid var(--green); border-radius: 9px; background: var(--green); color: white; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.alarm-button.secondary { background: var(--green-pale); color: var(--green); border-color: #cbd3ca; }
#alarm-status { margin: 10px 0 4px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.alarm-hint { margin: 0; color: #657167; font-size: 13px; line-height: 1.6; }
.library-panel { margin-bottom: 28px; padding: 24px; background: #f0f3ed; border-color: #dce4d9; }
#library-status { margin: 18px 0 22px; color: var(--green); font-size: 15px; line-height: 1.6; }
.library-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.library-columns > section { min-width: 0; padding: 24px; border: 1px solid #dfe6dc; border-radius: 18px; background: white; box-shadow: 0 4px 16px rgba(32, 43, 36, .035); }
.library-columns h2 { padding-bottom: 14px; border-bottom: 2px solid var(--green-pale); color: var(--green-dark); font-size: 25px; }
.library-help { color: #657167; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.library-form { display: grid; gap: 14px; margin: 22px 0; padding: 20px; border: 1px solid #e3e9df; border-radius: 14px; background: #f6f8f3; }
.library-form label { color: var(--green-dark); font-size: 15px; font-weight: 600; }
.library-panel input { width: 100%; min-width: 0; min-height: 56px; padding: 12px; border: 1px solid #cbd3ca; border-radius: 10px; background: white; color: var(--ink); font-size: 18px; }
.library-panel input:focus { outline: 2px solid #9eb8a3; outline-offset: 2px; }
.library-form .duration-grid { gap: 12px; }
.library-form .duration-grid label { min-width: 0; font-size: 14px; line-height: 1.5; }
.library-form .duration-grid input { margin-top: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.library-form > button { justify-self: stretch; }
.library-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.library-panel .alarm-button { min-height: 56px; min-width: 48px; padding: 13px 14px; border-radius: 11px; font-size: 16px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.library-panel .alarm-button:hover { background: var(--green-dark); }
.library-panel .alarm-button.secondary:hover { background: #dce8d9; }
.library-entry .library-actions > .alarm-button:first-child { grid-column: 1 / -1; }
.library-entry .library-actions > .alarm-button:last-child { color: #79483e; background: white; border-color: #dfd8d3; }
.library-entry .library-actions > .alarm-button:last-child:hover { background: #f8efeb; }
.library-list { display: grid; gap: 20px; margin: 24px 0; }
.library-list > .library-help { margin: 0; padding: 24px 16px; border: 1px dashed #cad7c5; border-radius: 12px; background: #fafbf8; text-align: center; }
.library-entry { padding: 22px; border: 1px solid #dce5d8; border-radius: 16px; background: white; box-shadow: 0 3px 12px rgba(32, 43, 36, .04); }
.library-entry--meals { border-top: 4px solid var(--green); }
.library-entry h3 { margin: 0 0 20px; font-size: 23px; line-height: 1.3; letter-spacing: -.4px; color: var(--green-dark); overflow-wrap: anywhere; }
.library-timings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.library-timings > span { display: grid; gap: 6px; padding: 12px 6px; border-radius: 10px; background: #f0f5ed; text-align: center; }
.timing-label { color: #657167; font-size: 13px; }
.library-timings strong { color: var(--green-dark); font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.library-meal-dishes { display: grid; gap: 12px; margin: 0 0 20px; padding: 16px; border-radius: 12px; background: #f6f8f3; }
.library-meal-dishes > span { display: grid; gap: 5px; overflow-wrap: anywhere; }
.library-meal-dishes strong { color: var(--green-dark); font-size: 16px; }
.library-meal-dishes > span > span { color: #657167; font-size: 13px; line-height: 1.6; }
.load-time { border-left: 4px solid var(--green); }
.load-time .library-help { margin: 0; }
.save-food-button { min-height: 48px; margin-top: 12px; padding: 10px 16px; border: 1px solid #cbd3ca; border-radius: 9px; background: var(--green-pale); color: var(--green); font-size: 15px; font-weight: 700; cursor: pointer; }
@media (max-width: 1000px) {
  .library-columns { grid-template-columns: 1fr; gap: 24px; }
}
@media (min-width: 1001px) and (max-width: 1200px) {
  .library-panel, .library-columns > section { padding: 18px; }
  .library-columns { gap: 18px; }
  .library-form, .library-entry { padding: 16px; }
}
@media (max-width: 420px) {
  .library-panel { padding: 16px 12px; }
  .library-columns > section, .library-entry, .library-form { padding: 14px; }
  .library-form .duration-grid { gap: 8px; }
  .library-actions { grid-template-columns: 1fr; }
  .library-timings strong { font-size: 16px; }
}
.schedule-list { display: grid; gap: 10px; }
.schedule-event { grid-template-columns: 82px 17px minmax(0, 1fr) auto; padding: 16px 12px; gap: 10px; border-radius: 12px; }
.schedule-event:not(:last-child)::after { top: 39px; left: 112px; bottom: -11px; }
.done-button { align-self: center; min-width: 104px; min-height: 56px; padding: 14px 18px; font-size: 18px; border-radius: 12px; }
.done-button:hover:enabled { background: var(--green-dark); }
.done-button:active:enabled { transform: translateY(1px); }
.schedule-event.is-overdue { background: #fff0df; box-shadow: inset 4px 0 #c26226; }
.schedule-event.is-overdue .event-title, .schedule-event.is-overdue .event-time { color: #974314; }
.schedule-event.is-overdue .event-marker { border-color: #bb5b24; background: #f4c59d; }
.schedule-event.is-completed { background: #e8f2e7; box-shadow: inset 4px 0 #57865c; }
.schedule-event.is-completed .event-title, .schedule-event.is-completed .event-time { color: var(--green); }
.schedule-event.is-completed .event-marker { display: grid; place-items: center; width: 20px; height: 20px; margin: 0 0 0 -1px; border: 0; background: var(--green); color: white; font-size: 14px; font-weight: 800; }
.schedule-event.is-completed .event-marker::after { content: '✓'; }
.done-button:disabled { background: #d8e9d5; color: #264c36; border-color: #9eb8a3; cursor: default; opacity: 1; }
@media (min-width: 1001px) and (max-width: 1250px), (max-width: 500px) {
  .schedule-event { grid-template-columns: 70px 12px minmax(0, 1fr); gap: 7px; }
  .schedule-event:not(:last-child)::after { left: 97px; }
  .done-button { grid-column: 3; justify-self: start; margin-bottom: 10px; }
}
button:focus-visible, a:focus-visible { outline: 3px solid #d78b55; outline-offset: 3px; }
input[aria-invalid="true"] { outline: 2px solid #a64f40; }
@media (max-width: 1000px) {
  .app-shell { padding: 0 24px; }
  .workspace { grid-template-columns: 1fr; }
  .intro { align-items: flex-start; }
  .dishes-panel { position: static; }
}
@media (max-width: 760px) {
  .serve-card { width: 100%; flex-basis: auto; }
}
@media (max-width: 420px) {
  .app-shell { padding: 0 12px; }
  .dishes-panel, .schedule-panel { padding-left: 12px; padding-right: 12px; }
  .duration-input { padding-left: 7px; padding-right: 29px; font-size: 17px; }
  .duration-unit { right: 5px; }
  .schedule-event { grid-template-columns: 70px 12px minmax(0, 1fr); gap: 7px; }
  .schedule-event:not(:last-child)::after { left: 97px; }
  .countdown-row { flex-wrap: wrap; }
}

/* The library lives in the modal top layer, outside the planner's layout. */
.brand-group { display: flex; align-items: center; gap: 12px; }
.drawer-icon-button { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; padding: 12px; border: 1px solid #d5dfd1; border-radius: 12px; background: white; color: var(--green); font-size: 32px; line-height: 1; cursor: pointer; }
.drawer-icon-button:hover { background: var(--green-pale); }
.hamburger { display: grid; gap: 5px; width: 24px; }
.hamburger > span { height: 2px; border-radius: 2px; background: currentColor; }
.library-drawer { position: fixed; inset: 0 auto 0 0; width: min(420px, calc(100vw - 24px)); max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0 18px 28px; border: 0; border-right: 1px solid #dce4d9; border-radius: 0 20px 20px 0; color: var(--ink); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; box-shadow: 12px 0 40px rgba(20, 42, 29, .18); }
.library-drawer[open] { animation: drawer-in 450ms ease-in-out both; }
.library-drawer::backdrop { background: rgba(17, 30, 22, .5); animation: backdrop-in 450ms ease-in-out both; }
.library-drawer.is-closing { animation: drawer-out 450ms ease-in-out both; pointer-events: none; }
.library-drawer.is-closing::backdrop { animation: backdrop-out 450ms ease-in-out both; }
.drawer-header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin: 0 -18px; padding: 22px 18px 18px; border-bottom: 1px solid #dce4d9; background: #f0f3ed; }
.drawer-header > div:first-child { flex: 1; min-width: 0; }
.drawer-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex: 0 0 100%; padding: 5px; border: 1px solid #d5dfd1; border-radius: 14px; background: white; }
.drawer-tab { min-height: 56px; padding: 12px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; }
.drawer-tab[aria-selected="true"] { background: var(--green); color: white; }
.drawer-tab[aria-selected="false"]:hover { background: var(--green-pale); }
.library-drawer [role="tabpanel"][hidden] { display: none; }
.library-search { display: grid; gap: 10px; margin: 20px 0; }
.library-search label { color: var(--green-dark); font-size: 15px; font-weight: 600; }
.search-control { display: flex; align-items: center; gap: 8px; }
.search-control input { flex: 1; min-width: 0; }
.search-control input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear { display: grid; place-items: center; flex: 0 0 48px; min-width: 48px; min-height: 48px; padding: 8px; border: 1px solid #cbd3ca; border-radius: 10px; background: var(--green-pale); color: var(--green); font: inherit; font-size: 26px; cursor: pointer; }
.search-clear:hover:enabled { background: #dce8d9; }
.search-clear:disabled { opacity: .45; cursor: default; }
.search-count { color: #657167; font-size: 13px; line-height: 1.5; }
.drawer-header h2 { color: var(--green-dark); font-size: 22px; line-height: 1.25; }
.drawer-header .eyebrow { font-size: 10px; margin-bottom: 8px; }
.library-drawer .library-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.library-drawer .library-columns > section { padding: 16px; }
.library-drawer .library-form, .library-drawer .library-entry { padding: 14px; }
.library-drawer .library-actions { grid-template-columns: 1fr; }
.library-drawer .library-form .duration-grid { gap: 8px; }
.library-drawer .library-form .duration-grid label { font-size: 13px; }
.library-drawer .library-timings strong { font-size: 16px; }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes drawer-out { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 420px) {
  .brand-group { gap: 8px; }
  .topbar .brand { font-size: 22px; gap: 6px; }
  .live-clock { font-size: 16px; }
  .library-drawer { padding-left: 12px; padding-right: 12px; }
  .drawer-header { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .library-drawer[open], .library-drawer::backdrop { animation: none; }
}

@keyframes alarm-pulse {
  0%, 100% { background-color: #b42323; border-color: #b42323; box-shadow: 0 0 0 3px #b4232333; }
  50% { background-color: #761919; border-color: #761919; box-shadow: 0 0 0 6px #b4232355; }
}
button.is-alarming, button.is-alarming:hover:enabled {
  color: white; background: #b42323; border-color: #b42323;
  animation: alarm-pulse 2s ease-in-out infinite;
}
.schedule-event { scroll-margin-block: 24px; }
@media (prefers-reduced-motion: reduce) {
  button.is-alarming { animation: none; outline: 3px solid #b4232355; }
}

.sound-toggle { min-height: 48px; min-width: 108px; touch-action: manipulation; }
.sound-toggle[aria-pressed="false"] { background: var(--green-pale); color: var(--green); }
@media (max-width: 500px) {
  .clock-wrap { gap: 6px; }
  .sound-toggle { padding: 8px 10px; min-width: 100px; font-size: 15px; }
}
