:root {
  color-scheme: light;
  --ink: #24231f;
  --muted: #79766e;
  --soft: #aaa69b;
  --canvas: #efede6;
  --card: rgba(252, 251, 247, 0.92);
  --line: rgba(43, 41, 35, 0.10);
  --purple: #6e61ff;
  --coral: #ff785a;
  --green: #259b77;
  --yellow: #f4bc52;
  --shadow: 0 18px 60px rgba(52, 47, 37, 0.07), 0 2px 8px rgba(52, 47, 37, 0.03);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: linear-gradient(145deg, #f3f0e9 0%, #ebe9e2 55%, #f3eee5 100%); }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(110, 97, 255, 0.25); outline-offset: 2px; }
.hidden { display: none !important; }

.ambient { position: fixed; border-radius: 999px; filter: blur(4px); opacity: .55; pointer-events: none; }
.ambient-one { width: 340px; height: 340px; top: -170px; right: 14%; background: radial-gradient(circle, rgba(255, 194, 115, .42), transparent 70%); }
.ambient-two { width: 400px; height: 400px; bottom: -220px; left: 22%; background: radial-gradient(circle, rgba(142, 128, 255, .18), transparent 70%); }

.eyebrow, .section-kicker { margin: 0; font-size: 10px; font-weight: 750; letter-spacing: .2em; color: var(--muted); }
.app-shell { display: grid; grid-template-columns: 78px minmax(0, 1fr); min-height: 100vh; }

.rail { position: sticky; top: 0; z-index: 10; height: 100vh; display: flex; flex-direction: column; align-items: center; padding: max(22px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom)); border-right: 1px solid var(--line); background: rgba(243, 240, 233, .72); backdrop-filter: blur(20px); }
.brand { position: relative; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 15px; color: #fff; background: var(--ink); font-weight: 800; font-size: 15px; letter-spacing: -.04em; box-shadow: 0 8px 22px rgba(30, 29, 26, .18); }
.brand-dot { position: absolute; right: 8px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.rail-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 70px; }
.rail-button, .icon-button, .small-icon-button { display: grid; place-items: center; border: 0; cursor: pointer; background: transparent; }
.rail-button { width: 44px; height: 44px; border-radius: 14px; color: #8d897f; transition: .2s ease; }
.rail-button svg, .icon-button svg, .small-icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-button:hover, .rail-button.active { color: var(--ink); background: rgba(255,255,255,.78); box-shadow: 0 6px 20px rgba(50,45,35,.07); transform: translateY(-1px); }
.rail-settings { margin-top: auto; }

.board { position: relative; z-index: 1; width: min(1550px, 100%); margin: 0 auto; padding: 28px 32px 18px; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar h1 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 3vw, 43px); font-weight: 500; letter-spacing: -.045em; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.clock { display: flex; align-items: flex-start; min-width: 118px; font-size: 34px; font-weight: 650; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.clock small { margin: 6px 0 0 5px; font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.icon-button { width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.52); }
.icon-button:hover { background: #fff; }

.weather-hero { position: relative; overflow: hidden; min-height: 124px; display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 20px clamp(22px, 3vw, 42px); border: 1px solid rgba(124, 102, 40, .08); border-radius: 27px; background: linear-gradient(108deg, rgba(255, 237, 189, .92), rgba(255, 218, 176, .82) 46%, rgba(218, 210, 255, .75) 120%); box-shadow: 0 14px 50px rgba(124, 92, 40, .08); }
.weather-hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: 34%; top: -150px; border-radius: 50%; background: rgba(255,255,255,.38); box-shadow: 0 0 50px rgba(255,255,255,.4); }
.weather-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.weather-symbol { width: 69px; height: 69px; display: grid; place-items: center; border-radius: 22px; background: rgba(255,255,255,.48); box-shadow: inset 0 1px rgba(255,255,255,.8); font-size: 38px; }
.weather-location { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: rgba(62, 55, 39, .66); }
.weather-reading { display: flex; align-items: baseline; gap: 12px; }
.weather-reading strong { font-size: 44px; line-height: 1; letter-spacing: -.055em; }
.weather-reading span { font-family: Georgia, serif; font-size: 20px; }
.weather-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(75px, 1fr)); gap: 10px; }
.weather-stats div { min-width: 96px; padding: 12px 15px; border-left: 1px solid rgba(65, 58, 43, .13); }
.weather-stats span { display: block; margin-bottom: 5px; font-size: 8px; font-weight: 750; letter-spacing: .14em; color: rgba(62, 55, 39, .55); }
.weather-stats strong { font-size: 15px; font-weight: 650; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .78fr); gap: 18px; margin-top: 18px; align-items: start; }
.side-column { display: grid; gap: 18px; }
.card { border: 1px solid rgba(41, 38, 31, .08); border-radius: 26px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(15px); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 23px 24px 16px; }
.card-header h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; letter-spacing: -.035em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.sync-note { font-size: 10px; color: var(--muted); }
.small-icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.small-icon-button svg { width: 17px; }
.small-icon-button.is-spinning svg { animation: spin .8s linear infinite; }

.calendar-card { min-height: 515px; overflow: hidden; }
.calendar-grid { min-height: 436px; display: grid; grid-template-columns: repeat(5, minmax(112px, 1fr)); border-top: 1px solid var(--line); overflow-x: auto; }
.day-column { min-width: 112px; padding: 17px 10px 13px; border-right: 1px solid var(--line); }
.day-column:last-child { border-right: 0; }
.day-column.is-today { background: linear-gradient(180deg, rgba(255, 231, 199, .32), transparent 45%); }
.day-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 5px 16px; }
.day-name { font-size: 9px; font-weight: 750; letter-spacing: .16em; color: var(--muted); }
.day-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 650; }
.is-today .day-number { color: #fff; background: var(--ink); }
.day-events { display: flex; flex-direction: column; gap: 8px; }
.event { position: relative; min-height: 68px; padding: 10px 9px 9px 12px; border: 1px solid color-mix(in srgb, var(--event) 28%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--event) 10%, #fff); }
.event::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 0 4px 4px 0; background: var(--event); }
.event-time { display: block; margin-bottom: 5px; font-size: 8px; font-weight: 800; letter-spacing: .09em; color: color-mix(in srgb, var(--event) 80%, #302d27); text-transform: uppercase; }
.event-title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; font-weight: 680; line-height: 1.25; }
.event-location { display: block; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.day-empty { padding: 20px 5px; font-family: Georgia, serif; font-size: 12px; font-style: italic; color: #aaa69c; text-align: center; }

.task-progress { display: grid; place-items: center; min-width: 46px; height: 28px; padding: 0 10px; border-radius: 999px; background: #f0eee7; font-size: 10px; font-weight: 700; color: var(--muted); }
.quick-add { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 4px; margin: 0 20px 10px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 15px; background: #f7f5f0; }
.quick-add:focus-within { border-color: rgba(110,97,255,.38); background: #fff; box-shadow: 0 0 0 3px rgba(110,97,255,.08); }
.quick-add button { width: 31px; height: 31px; border: 0; border-radius: 10px; color: #fff; background: var(--ink); cursor: pointer; font-size: 20px; line-height: 1; }
.quick-add input { min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; }
.quick-add input::placeholder { color: #aaa69c; }
.task-list { max-height: 240px; overflow: auto; padding: 1px 20px 17px; }
.task-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) 27px; align-items: center; gap: 9px; min-height: 43px; border-bottom: 1px solid rgba(43,41,35,.07); }
.task-item:last-child { border-bottom: 0; }
.task-check { width: 18px; height: 18px; display: grid; place-items: center; padding: 0; border: 1.5px solid #bbb6aa; border-radius: 6px; background: transparent; cursor: pointer; }
.task-check svg { width: 12px; fill: none; stroke: white; stroke-width: 2.5; }
.task-item.completed .task-check { border-color: var(--green); background: var(--green); }
.task-title { overflow: hidden; padding: 8px 0; border: 0; background: none; cursor: text; font-size: 12px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.task-item.completed .task-title { color: #aaa69c; text-decoration: line-through; }
.task-delete { width: 27px; height: 27px; border: 0; border-radius: 8px; color: #aaa69c; background: transparent; cursor: pointer; opacity: .2; }
.task-item:hover .task-delete, .task-delete:focus-visible { opacity: 1; }
.task-delete:hover { color: #d55843; background: #fff0ec; }
.task-edit-input { width: 100%; min-width: 0; padding: 6px 7px; border: 1px solid rgba(110,97,255,.3); border-radius: 8px; outline: 0; font-size: 12px; }

.news-card { min-height: 260px; }
.live-pill { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .1em; }
.live-pill i { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(255,120,90,.12); }
.news-list { padding: 0 20px 17px; }
.news-item { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid rgba(43,41,35,.07); color: inherit; text-decoration: none; }
.news-index { padding-top: 1px; font-family: Georgia, serif; font-size: 18px; color: #bbb6aa; }
.news-title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-family: Georgia, serif; font-size: 13px; font-weight: 500; line-height: 1.27; }
.news-meta { display: flex; gap: 6px; margin-top: 5px; font-size: 8px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.news-item:hover .news-title { color: var(--purple); }
.empty-state { padding: 55px 20px; color: var(--muted); font-family: Georgia, serif; font-size: 14px; font-style: italic; text-align: center; }
.empty-state.compact { padding: 25px 10px; }

.board-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px 2px; color: var(--muted); font-size: 9px; letter-spacing: .06em; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(37,155,119,.12); }

.login-view { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(620px, 100%); padding: clamp(34px, 7vw, 70px); border: 1px solid rgba(43,41,35,.08); border-radius: 34px; background: rgba(252,251,247,.88); box-shadow: 0 30px 90px rgba(48,43,34,.11); backdrop-filter: blur(20px); }
.login-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 42px; border-radius: 19px; color: white; background: var(--ink); font-weight: 800; box-shadow: 0 12px 28px rgba(36,35,31,.18); }
.login-card h1 { margin: 9px 0 12px; font-family: Georgia, serif; font-size: clamp(34px, 7vw, 52px); font-weight: 500; letter-spacing: -.05em; }
.login-copy { max-width: 460px; margin: 0 0 36px; color: var(--muted); font-family: Georgia, serif; font-size: 17px; line-height: 1.55; }
.login-form label { display: block; margin-bottom: 8px; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.password-row input { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: #f5f3ed; outline: 0; }
.password-row input:focus { border-color: rgba(110,97,255,.4); background: #fff; }
.primary-button, .secondary-button { border: 0; border-radius: 13px; cursor: pointer; font-size: 12px; font-weight: 700; }
.primary-button { padding: 13px 17px; color: #fff; background: var(--ink); box-shadow: 0 8px 18px rgba(36,35,31,.12); }
.primary-button:hover { background: #3b3933; transform: translateY(-1px); }
.form-error { min-height: 20px; margin: 8px 0 0; color: #d05441; font-size: 11px; }
.login-footnote { margin: 26px 0 0; color: #aaa69c; font-size: 9px; letter-spacing: .08em; }

.settings-dialog { width: min(860px, calc(100vw - 30px)); max-height: min(820px, calc(100vh - 30px)); padding: 0; border: 0; border-radius: 28px; color: var(--ink); background: #f8f6f0; box-shadow: 0 30px 100px rgba(25,24,21,.26); }
.settings-dialog::backdrop { background: rgba(31,29,25,.35); backdrop-filter: blur(8px); }
.dialog-shell { display: flex; flex-direction: column; max-height: min(820px, calc(100vh - 30px)); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 27px 30px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; letter-spacing: -.04em; }
.dialog-close { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; font-family: Arial, sans-serif; font-size: 23px; font-weight: 300; line-height: 1; }
.settings-content { overflow-y: auto; padding: 0 30px; }
.settings-section { display: grid; grid-template-columns: minmax(185px, .58fr) minmax(0, 1.42fr); gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; }
.settings-section-copy { display: flex; gap: 12px; }
.setting-number { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 10px; background: #ece9e1; color: var(--muted); font-size: 9px; font-weight: 750; }
.settings-section h3 { margin: 2px 0 6px; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.settings-section-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-form label, .add-calendar-form label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.settings-form input, .settings-form select, .add-calendar-form input { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: 0; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.settings-form input:focus, .add-calendar-form input:focus { border-color: rgba(110,97,255,.42); box-shadow: 0 0 0 3px rgba(110,97,255,.07); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.form-row-between { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.select-label { display: flex !important; grid-template-columns: auto auto; align-items: center; gap: 7px !important; margin-left: auto; }
.select-label select { padding: 8px; }
.secondary-button { padding: 10px 13px; border: 1px solid var(--line); background: white; }
.text-button { padding: 0; border: 0; color: var(--purple); background: none; cursor: pointer; font-size: 10px; font-weight: 700; }
.calendar-fields { grid-template-columns: .75fr 1.8fr 54px; margin-top: 0; }
.color-field input { height: 37px; padding: 4px; }
.add-calendar-form { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #f1eee7; }
.add-calendar-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.calendar-form-note { margin: 0; color: var(--muted); font-size: 9px; }
.compact-button { padding: 10px 13px; }
.calendar-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.calendar-row:last-child { border-bottom: 0; }
.calendar-swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--calendar); }
.calendar-name { font-size: 11px; font-weight: 650; }
.calendar-provider { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.calendar-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.calendar-remove { border: 0; color: #bc6b5b; background: none; cursor: pointer; font-size: 9px; }
.no-calendars { margin: 0 0 12px; color: var(--muted); font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.setup-help { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.setup-help summary { display: flex; align-items: center; gap: 8px; padding: 11px 13px; cursor: pointer; list-style: none; font-size: 10px; font-weight: 700; }
.setup-help summary::-webkit-details-marker { display: none; }
.setup-help summary span:last-child { margin-left: auto; color: var(--muted); font-size: 8px; }
.setup-help ol, .setup-help p { margin: 0 15px 12px 34px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.setup-help p { margin-left: 14px; }
.apple-mark { color: #111; font-size: 8px; }
.dialog-footer { display: flex; justify-content: space-between; padding: 17px 30px max(17px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.danger-text { color: #b75a49; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); max-width: min(430px, calc(100vw - 30px)); padding: 11px 16px; border-radius: 12px; color: #fff; background: rgba(35,33,29,.94); box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  .board { padding-inline: 22px; }
  .content-grid { grid-template-columns: minmax(0, 1.5fr) minmax(270px, .7fr); }
  .weather-stats div { min-width: 75px; padding-inline: 10px; }
  .calendar-grid { grid-template-columns: repeat(5, minmax(105px, 1fr)); }
}

@media (min-width: 851px) and (max-height: 820px) {
  .board { padding-top: 18px; padding-bottom: 10px; }
  .topbar { min-height: 58px; margin-bottom: 11px; }
  .topbar h1 { font-size: 32px; }
  .weather-hero { min-height: 104px; padding-block: 14px; }
  .weather-symbol { width: 58px; height: 58px; font-size: 32px; }
  .weather-reading strong { font-size: 38px; }
  .content-grid { margin-top: 14px; }
  .calendar-card { min-height: 442px; }
  .calendar-grid { min-height: 365px; }
  .card-header { padding-top: 18px; padding-bottom: 13px; }
  .side-column { gap: 14px; }
  .task-list { max-height: 183px; }
  .news-card { min-height: 226px; }
  .news-item { padding-block: 9px; }
  .board-footer { padding-top: 10px; }
}

@media (max-width: 850px) {
  .app-shell { grid-template-columns: 1fr; }
  .rail { position: fixed; top: auto; bottom: 10px; left: 50%; z-index: 30; width: min(300px, calc(100vw - 30px)); height: 58px; flex-direction: row; justify-content: center; gap: 15px; padding: 7px 10px; border: 1px solid rgba(43,41,35,.1); border-radius: 20px; box-shadow: 0 16px 40px rgba(34,32,28,.18); transform: translateX(-50%); }
  .brand { width: 40px; height: 40px; border-radius: 13px; }
  .rail-nav { flex-direction: row; gap: 5px; margin: 0; }
  .rail-settings { margin: 0; }
  .board { padding: max(20px, env(safe-area-inset-top)) 18px 90px; }
  .content-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; align-items: start; }
  .calendar-grid { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
  .settings-section { grid-template-columns: 1fr; gap: 16px; }
}

/* iPad portrait: turn the compressed five-column calendar into a legible
   card agenda. Today gets the visual lead, followed by two balanced rows. */
@media (min-width: 700px) and (max-width: 850px) {
  .board { padding: max(24px, env(safe-area-inset-top)) 24px 82px; }
  .topbar { min-height: 68px; margin-bottom: 15px; }
  .topbar h1 { font-size: 34px; }
  .clock { font-size: 31px; }

  .weather-hero { min-height: 116px; padding: 18px 24px; }
  .weather-symbol { width: 62px; height: 62px; border-radius: 19px; font-size: 34px; }
  .weather-reading strong { font-size: 40px; }
  .weather-reading span { font-size: 18px; }
  .weather-stats { gap: 4px; }
  .weather-stats div { min-width: 0; padding-inline: 11px; }

  .content-grid { gap: 16px; margin-top: 16px; }
  .calendar-card { min-height: 0; overflow: visible; }
  .calendar-header { padding: 18px 20px 13px; }
  .calendar-grid {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 11px;
    overflow: visible;
    background: rgba(239, 237, 230, .48);
  }
  .day-column {
    min-width: 0;
    min-height: 94px;
    padding: 10px;
    border: 1px solid rgba(43, 41, 35, .08);
    border-radius: 17px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 4px 18px rgba(48, 43, 34, .035);
  }
  .day-column:last-child { border-right: 1px solid rgba(43, 41, 35, .08); }
  .day-column.is-today {
    grid-column: 1 / -1;
    min-height: 104px;
    background: linear-gradient(112deg, rgba(255, 237, 210, .82), rgba(245, 241, 255, .78));
  }
  .day-heading { margin: 0 3px 7px; }
  .day-number { width: 27px; height: 27px; }
  .day-name { font-size: 9px; }
  .day-events { gap: 6px; }
  .is-today .day-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event { min-height: 48px; padding: 7px 9px 7px 12px; }
  .event-time { margin-bottom: 3px; }
  .event-title { font-size: 12.5px; }
  .event-location { margin-top: 4px; }
  .day-empty { padding: 10px 5px 7px; }

  .side-column { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .tasks-card, .news-card { min-height: 282px; }
  .task-list { max-height: 180px; }
  .news-list { padding-bottom: 14px; }
  .news-item { padding-block: 9px; }
  .board-footer { padding-top: 13px; }

  .rail { bottom: max(12px, env(safe-area-inset-bottom)); width: 310px; background: rgba(250, 248, 243, .9); }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; }
  .topbar h1 { font-size: 30px; }
  .clock { min-width: auto; font-size: 25px; }
  .icon-button { width: 38px; height: 38px; }
  .weather-hero { align-items: flex-start; flex-direction: column; }
  .weather-stats { width: 100%; }
  .weather-stats div:first-child { border-left: 0; padding-left: 0; }
  .side-column { grid-template-columns: 1fr; }
  .password-row { grid-template-columns: 1fr; }
  .password-row .primary-button { width: 100%; }
  .settings-content { padding-inline: 20px; }
  .dialog-header, .dialog-footer { padding-inline: 20px; }
  .field-row, .calendar-fields { grid-template-columns: 1fr; }
  .color-field input { width: 60px; }
  .form-row-between, .add-calendar-actions { align-items: stretch; flex-wrap: wrap; }
  .select-label { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
