/* Aurora · a quiet personal album. All existing modules inherit this palette. */
:root, :root[data-theme="paper"] {
  color-scheme: light;
  --bg:#f3f4ef; --bg-2:#eef0e8; --panel:#fcfcf8; --panel-2:#f9faf5;
  --text:#2c3e32; --muted:#677567; --faint:#6c796c; --accent:#345842;
  --green:#4d6f46; --info:#507588; --danger:#a44539; --purple:#7c6485;
  --line:#dce1d6; --line-strong:#c1cbb9; --track:#e1e7da;
  --glow-1:transparent; --glow-2:transparent; --radius:8px;
  --accent-glow:transparent; --shadow:0 10px 35px rgb(38 56 35 / 7%);
}
:root[data-theme="dusk"] {
  color-scheme: dark;
  --bg:#202720; --bg-2:#262e25; --panel:#293229; --panel-2:#303a2e;
  --text:#e5eadd; --muted:#b7c1af; --faint:#abb9a3; --accent:#b9cfa9;
  --green:#aec79c; --info:#9abfc9; --danger:#efab9e; --purple:#c5aed0;
  --line:#3c4a38; --line-strong:#617257; --track:#3a4735;
  --shadow:0 10px 35px rgb(0 0 0 / 14%);
}
body { background:var(--bg); font-size:14px; line-height:1.75; }
body, input, select, textarea { font-family:var(--sans); }
button { font-weight:500; border-radius:6px; }
input, select, textarea { min-width:0; border-radius:6px; }
input[type="file"] { padding:8px; height:auto; }
input[type="file"]::file-selector-button { border:0; border-radius:4px; padding:6px 10px; margin-right:10px; background:var(--bg-2); color:var(--text); font:inherit; cursor:pointer; }
input::placeholder, textarea::placeholder { color:var(--faint); opacity:1; }
input[type="checkbox"] { accent-color:var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
button:hover:not(:disabled) { transform:none; }
.display, h2 { font-style:normal; font-weight:400; }
.display { line-height:1.3; }
.eyebrow { font-family:var(--sans); font-size:11px; letter-spacing:.18em; color:var(--muted); }
.app { display:block; min-height:100vh; }
.site-header, .content { width:calc(100% - 80px); max-width:1160px; margin:0 auto; }
.site-header { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:26px; min-height:100px; padding:22px 0; }
.site-wordmark, .login-wordmark { font-family:Georgia,serif; font-style:italic; letter-spacing:-1.8px; font-size:38px; font-weight:400; }
.site-wordmark { justify-self:start; padding:0; background:none; border:0; min-height:44px; color:var(--text); }
.nav { flex-direction:row; align-items:center; gap:24px; flex:none; }
.nav-item { display:block; min-height:44px; padding:8px 0; border:0; border-radius:0; color:var(--muted); white-space:nowrap; font-size:13px; background:none; }
.nav-item.active, .nav-item:hover { border:0; background:none; color:var(--text); box-shadow:inset 0 -1px var(--accent); }
.site-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:16px; }
.primary-button { background:var(--accent); border:1px solid var(--accent); color:var(--bg); padding:9px 17px; min-height:40px; }
.text-link { border:0; border-radius:0; padding:6px 0; background:none; min-height:34px; color:var(--accent); font-size:13px; font-weight:400; }
.text-link:hover:not(:disabled) { background:none; color:var(--text); text-decoration:underline; text-underline-offset:5px; }
.content { padding:0 0 20px; }
.album-hero { min-height:360px; display:flex; flex-direction:column; justify-content:flex-end; padding:38px 40px; border-radius:8px; position:relative; overflow:hidden; background-color:#40594f; background-image:linear-gradient(0deg,rgba(13,31,24,.77),rgba(13,31,24,.03) 95%),url("/images/aurora-life-cover.jpg"); background-size:100% 100%,200% 200%; background-position:center,right bottom; color:#fffaf0; }
.album-hero h1 { font:400 clamp(32px,4vw,50px)/1.4 var(--serif); letter-spacing:.01em; margin:10px 0 12px; }
.album-hero .eyebrow { color:#f0f0e4; margin:0 0 4px; }
.album-hero-bottom { display:flex; align-items:end; justify-content:space-between; gap:22px; }
.album-hero-bottom p { margin:0; color:#f0f0e4; }
.hero-link { color:#fffaf0; border:1px solid rgba(255,250,240,.7); background:transparent; border-radius:4px; padding:7px 16px; flex-shrink:0; }
.hero-link:hover:not(:disabled) { border-color:#fffaf0; color:#fffaf0; background:rgba(255,255,255,.08); }
.album-layout { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(240px,1fr); gap:48px; }
.editorial-heading { display:flex; justify-content:space-between; align-items:baseline; gap:18px; padding:34px 0 22px; }
.editorial-heading h2 { font-size:25px; margin:0; line-height:1.5; }
.editorial-heading h2 span { display:block; font:10px/1.7 var(--sans); letter-spacing:.1em; margin-top:4px; color:var(--muted); }
.home-stories { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 22px; }
.home-story { min-width:0; }
.home-story:nth-child(2) { margin-top:32px; }
.home-story-cover { display:grid; place-items:center; width:100%; height:245px; border:0; border-radius:5px; padding:0; overflow:hidden; background:var(--bg-2); color:var(--muted); font-size:12px; }
.home-story-cover img { width:100%; height:100%; object-fit:cover; transition:transform .45s ease; }
.home-story-cover:hover img { transform:scale(1.025); }
.home-story-text { padding:28px; text-align:left; background:var(--panel); }
.home-story-text span { font:400 21px/1.85 var(--serif); color:var(--text); overflow:hidden; display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow-wrap:anywhere; }
.home-story-meta { font-size:11px; color:var(--muted); margin:13px 0 8px; }
.home-story h3 { margin:0; }
.home-story-title { padding:0; border:0; background:none; min-height:0; text-align:left; font:400 20px/1.7 var(--serif); color:var(--text); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.editorial-empty { grid-column:1/-1; min-height:240px; padding:30px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); align-content:center; }
.editorial-empty h3 { font:400 24px/1.6 var(--serif); margin:0 0 14px; }
.editorial-empty p { color:var(--muted); max-width:32em; margin:0 0 16px; }
.home-task { display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); min-height:50px; }
.home-task input { width:16px; height:16px; min-height:0; margin:0; flex-shrink:0; }
.home-task span { overflow-wrap:anywhere; }
.home-task:has(input:checked) span { text-decoration:line-through; color:var(--muted); }
.home-task-empty { color:var(--muted); padding:8px 0 12px; }
.home-today > .text-link { margin-top:10px; }
.home-routines { padding:18px 0 3px; margin:24px 0 0; border-top:1px solid var(--line); font-size:13px; }
.home-routines > div { display:flex; justify-content:space-between; gap:12px; padding:10px 0; }
.home-routines dt { color:var(--muted); }
.home-routines dd { margin:0; text-align:right; }
.home-record-bar { border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin:38px 0 12px; padding:24px 0; display:flex; justify-content:space-between; align-items:center; gap:24px; }
.home-record-bar h2 { font-size:22px; margin:0; }
.home-record-bar p { color:var(--muted); font-size:12px; margin:6px 0 0; }
.home-record-actions { display:flex; align-items:center; gap:25px; flex-wrap:wrap; }
.home-data-error { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; color:var(--danger); border-bottom:1px solid var(--line); padding:14px 0; }
.home-freshness, #home-stories-note { color:var(--muted); font-size:12px; }
.site-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; border-top:1px solid var(--line); margin-top:44px; padding:20px 0; color:var(--muted); font-size:12px; }
.site-footer .text-link { font-size:12px; }
.view-head { padding:32px 0 26px; margin-bottom:28px; border-bottom:1px solid var(--line); }
.view-head .display { font-size:clamp(34px,4.8vw,55px); font-weight:400; }
.view-sub { margin-top:10px; font-size:14px; }
.section-nav { display:flex; gap:26px; flex-wrap:wrap; margin:-12px 0 28px; border-bottom:1px solid var(--line); }
.section-nav button { min-height:44px; padding:7px 0; border:0; border-radius:0; background:none; color:var(--muted); font-weight:400; }
.section-nav button.active { color:var(--text); box-shadow:inset 0 -1px var(--accent); }
.panel { padding:22px 0 28px; background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:0; box-shadow:none; margin-bottom:20px; }
.panel h2 { font-size:23px; }
.composer { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:20px 24px; margin-bottom:28px; }
.composer summary { cursor:pointer; font:400 20px/1.7 var(--serif); list-style:none; display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:8px 20px; }
.composer summary::-webkit-details-marker { display:none; }
.composer summary span { font:12px/1.7 var(--sans); color:var(--muted); }
.composer[open] > summary { padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.composer h2 { display:none; }
.composer form > button, .composer .actions > button:first-child { background:var(--accent); color:var(--bg); border-color:var(--accent); }
.moment-toolbar { margin:30px 0 16px; }
.moment-form textarea { background:var(--bg); }
.moment-timeline, .meal-records { max-width:850px; }
.moment-card, .meal-record { padding:26px 0 32px; }
.moment-card .moment-text { font:400 19px/1.95 var(--serif); }
.moment-gallery { gap:18px; }
.moment-gallery img, .moment-gallery video { border-radius:5px; }
.moment-gallery img { max-height:640px; }
.moment-month { margin:38px 0 8px; font-family:var(--serif); color:var(--text); }
.moment-empty { min-height:170px; align-content:center; }
.record-highlight { animation:record-highlight 2.4s ease; }
@keyframes record-highlight { 0%,35% { background:var(--bg-2); } 100% { background:transparent; } }
.bento { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 40px; }
.bento .card { padding:22px 0 26px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; box-shadow:none; }
.bento .card:hover { box-shadow:none; transform:none; }
.water-card, .study-card { grid-row:auto; }
.spending-card, .sleep-card, .activity-card, .workout-card, .meals-card { grid-column:auto; }
.card-label span { font:400 24px/1.6 var(--serif); }
.card-label em { font-size:11px; letter-spacing:.08em; }
.stat-value { font-style:normal; font-size:31px; }
.ring { width:128px; height:128px; }
.ring-track, .ring-fill { stroke-width:4px; }
.ring-center strong { font-style:normal; font-size:25px; }
.ring-wrap { padding:2px; }
.bento .sleep-form, .bento .spending-form, .bento .workout-form, .bento .meals-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.bento .meals-form .meal-photo-field { grid-column:1/-1; }
.bento .meals-card #view-meals { align-self:start; padding-left:0; background:none; border:0; }
.theme-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:700px; }
.theme-swatch { border-radius:7px; background:var(--panel); }
.theme-name em { font-size:11px; }
.service-settings .actions { display:flex; flex-wrap:wrap; gap:12px; }
.service-settings .status { display:inline-block; background:none; border:0; padding:0; font-family:var(--sans); }
.activity-row { padding-top:19px; padding-bottom:19px; }
.activity-label { font-family:var(--serif); font-weight:400; font-size:18px; }
.history-pagination, .search-pagination { padding-top:25px; }
.trend-card, .workout-kpi, .workout-plan-card, .workout-pr-card { background:var(--panel); border-color:var(--line); border-radius:7px; box-shadow:none; }
.login { background-color:var(--bg); background-image:linear-gradient(90deg,var(--bg) 0%,var(--bg) 48%,transparent 75%),linear-gradient(0deg,rgba(20,40,25,.10),rgba(20,40,25,.10)),url("/images/aurora-life-cover.jpg"); background-position:center,center,right bottom; background-size:100% 100%,100% 100%,200% 200%; }
.task-row { display:block; padding:18px 0; border-bottom:1px solid var(--line); }
.task-reading-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:14px; }
.task-readable-title { font:400 19px/1.65 var(--serif); overflow-wrap:anywhere; }
.task-row.done .task-readable-title { color:var(--muted); text-decoration:line-through; }
.task-reading-row .task-edit { border:0; background:none; padding:0 5px; color:var(--muted); }
.task-edit-fields { display:grid; grid-template-columns:minmax(160px,1fr) 100px 100px 145px auto auto; gap:8px; margin:16px 0 5px 30px; }
.task-edit-fields[hidden] { display:none; }
.login-box { width:min(460px,100%); background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:38px; box-shadow:var(--shadow); }
.login-wordmark { margin:0 0 12px; color:var(--accent); }
.login-box .display { font-size:42px; }
.login-sub { font-size:14px; }
.login-box input { min-height:44px; }
@media (max-width:1000px) {
  .task-edit-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .site-header { grid-template-columns:auto 1fr; gap:14px 24px; }
  .site-header .nav { order:3; grid-column:1/-1; justify-content:center; }
  .site-header-actions { justify-self:end; }
  .album-layout { grid-template-columns:minmax(0,1.7fr) minmax(220px,1fr); gap:30px; }
  .home-story-cover { height:215px; }
  .home-record-actions { gap:18px; }
}
@media (max-width:760px) {
  .site-header, .content { width:calc(100% - 40px); }
  .site-header { padding:16px 0 20px; }
  .site-header .nav { justify-content:space-between; flex-basis:auto; }
  .site-wordmark { font-size:34px; }
  .album-hero { min-height:320px; padding:28px; }
  .album-hero h1 { font-size:38px; }
  .album-layout { grid-template-columns:1fr; gap:10px; }
  .home-story-cover { height:260px; }
  .home-today { display:grid; grid-template-columns:1fr 1fr; gap:0 28px; align-items:start; }
  .home-today .editorial-heading { grid-column:1; }
  #home-tasks { grid-column:1; grid-row:2; }
  .home-today > .text-link { grid-column:1; justify-self:start; }
  .home-routines { grid-column:2; grid-row:1 / span 3; margin:34px 0 0; padding:0; border:0; }
  .home-today > .text-link:last-child { grid-column:2; grid-row:4; }
  .home-record-bar { align-items:start; }
  .home-record-actions { flex-direction:column; align-items:start; gap:4px; }
  .bento { grid-template-columns:1fr; }
  .theme-grid { grid-template-columns:1fr 1fr; }
  .view-head { padding-top:24px; }
  .head-tools { justify-content:flex-start; }
}
@media (max-width:500px) {
  .task-edit-fields { grid-template-columns:1fr; margin-left:0; }
  .task-reading-row { gap:10px; grid-template-columns:auto minmax(0,1fr) auto; }
  .task-reading-row .task-badge { display:none; }
  .site-header, .content { width:calc(100% - 32px); }
  .site-header { gap:9px; }
  .site-header-actions { gap:12px; }
  .site-search { display:none; }
  .site-header .primary-button { padding:8px 11px; font-size:12px; }
  .site-wordmark { font-size:31px; }
  .nav { gap:12px; }
  .nav-item { font-size:13px; }
  .album-hero { min-height:340px; padding:24px 22px; background-size:100% 100%,260% 200%; }
  .album-hero h1 { font-size:32px; max-width:9em; margin-bottom:14px; }
  .album-hero .eyebrow { font-size:10px; letter-spacing:.1em; }
  .album-hero-bottom { flex-direction:column; align-items:start; gap:22px; }
  .album-hero-bottom p { font-size:12px; max-width:19em; }
  .hero-link { min-height:40px; }
  .editorial-heading { gap:12px; }
  .editorial-heading h2 { font-size:23px; }
  .editorial-heading h2 span { font-size:9px; letter-spacing:.04em; }
  .home-stories { gap:22px 15px; }
  .home-story-cover { height:190px; }
  .home-story-text { padding:18px; }
  .home-story-text span { font-size:16px; -webkit-line-clamp:5; }
  .home-story-title { font-size:17px; }
  .home-today { display:block; }
  .home-routines { margin-top:25px; padding-top:16px; border-top:1px solid var(--line); }
  .home-record-bar { flex-direction:column; gap:16px; }
  .home-record-actions { flex-direction:row; flex-wrap:wrap; gap:12px 20px; }
  .home-record-bar h2 { font-size:21px; }
  .composer { padding:18px; }
  .composer summary { font-size:18px; }
  .composer summary span { font-size:11px; }
  .section-nav { gap:18px; }
  .section-nav button { font-size:13px; }
  .theme-grid { grid-template-columns:1fr; }
  .bento .sleep-form, .bento .study-form, .bento .spending-form, .bento .workout-form, .bento .meals-form { grid-template-columns:1fr; }
  .login-box { padding:28px; }
}
@media (prefers-reduced-motion:reduce) { .home-story-cover img { transition:none; } }
