/* ===== 庆祝今天 · ui3 =====
   今天：取色沉浸海报（插画满版，向下溶进取自插画的颜色）＋ 图内日期、悬浮毛玻璃导航
   详情 / 日历：白盒画廊（白底、装裱插画、展签）
   骨架 M1–M4：日历工具、周 / 议程、我的日程与日记、我的；示意功能统一用虚线和「示意」标记 */
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/InstrumentSerif-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("assets/fonts/BricolageGrotesque-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("assets/fonts/Baloo2-Variable.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }

:root {
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --label: "Inter", var(--sans);
  --display: "Bricolage Grotesque", "Inter", var(--sans);
  --round: "Baloo 2", var(--sans);
  font-family: var(--sans);
  font-synthesis: none;
  --ink: #111214;
  --muted: #65676d;
  --line: #e8e8ea;
  --tile: #f5f5f6;
  --page: #ffffff;
  /* 浅色 / 深色共用的表面变量（深色值在 rex.css 的 html.theme-dark 里） */
  --surface: #ffffff;
  --mat: #ffffff;
  --sel: #111214;
  --on-sel: #ffffff;
  --pill: #111214;
  --on-pill: #ffffff;
  --ink-2: #3d3f45;
  --due-bg: #fff6df;
  --line-2: #cfd0d4;
  --glass-strong: #fffffff2;
  /* 下面这些由 app.js 按当天插画的颜色写入 */
  --accent: #3a3f48;
  --accent-ink: #3a3f48;
  --accent-on: #fff;
  --soft: #ebecee;
  --wash: #f0f1f2;
  --deep: #2b2f36;
  --block-bg: #3a3f48;
  --block-on: #fff;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: var(--page); }
h1, h2, h3, h4, p, figure { margin: 0; }
button, input, textarea { font: inherit; }
button { border: 0; background: none; color: inherit; cursor: pointer; min-height: 44px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .4; }
button, a, summary, input, textarea { outline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
a { color: var(--accent-ink); }
button svg { pointer-events: none; }
svg { width: 22px; height: 22px; flex: none; display: block; }
img { display: block; max-width: 100%; object-fit: contain; }
::selection { color: var(--ink); background: var(--soft); }
.app-shell { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px calc(108px + env(safe-area-inset-bottom)); }
main#app, .view { min-width: 0; }
.view { padding-top: calc(14px + env(safe-area-inset-top)); }

/* ---------- 共用：页头、标签 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; margin-bottom: 10px; }
.date-heading { min-width: 0; }
.date-heading h1 { font-family: var(--serif); font-size: 1.875rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.date-heading h1 span { font-family: var(--sans); font-size: .875rem; color: var(--muted); font-weight: 450; margin-left: 10px; letter-spacing: 0; }
.date-heading h1 em { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; font-size: 1.25rem; color: var(--muted); margin-left: 10px; }
.eyebrow, .section-kicker, .step-label, .wall-kicker { font-family: var(--label); font-size: .75rem; line-height: 1.6; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.icon-button { width: 44px; min-width: 44px; min-height: 44px; padding: 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.theme-button { color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.on-glass { color: #fff; background: #ffffff2b; border: 1px solid #ffffff42; backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: 4px; padding: 11px 16px; font-size: 1rem; line-height: 1.5; font-weight: 650; letter-spacing: .02em; background: var(--pill); color: var(--on-pill); }
.secondary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 18px; border-radius: 4px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 1rem; line-height: 1.5; }
.secondary-button svg { width: 18px; height: 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 22px 0 8px; }
.section-heading h2, .section-heading h3 { font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; font-weight: 600; }
.section-heading h2 em { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; color: var(--muted); margin-left: 8px; }
.section-heading span, .section-heading p { font-family: var(--label); font-size: .8125rem; line-height: 1.6; color: var(--muted); letter-spacing: .04em; }
.missing-art { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; width: 100%; height: 100%; min-height: 0; padding: 18px; color: var(--muted); background: var(--tile); font-size: .8125rem; line-height: 1.6; text-align: center; }
.missing-art svg { width: 34px; height: 34px; opacity: .55; }
.empty-state, .missing-content { border: 1px dashed var(--line-2); border-radius: 6px; padding: 23px 19px; margin: 14px 0; color: var(--muted); background: var(--surface); font-size: 1rem; line-height: 1.8; }
.empty-state h2, .missing-content h2 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.5; }
.empty-state .primary-button, .missing-content .primary-button { margin-top: 16px; }

/* ---------- 悬浮毛玻璃导航（借鉴 Cuto） ---------- */
.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 32px), 400px); display: flex; gap: 4px; padding: 6px; border-radius: 32px; background: #ffffffc9; border: 1px solid #0000000f; box-shadow: 0 10px 30px #1a1d2b26; backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); }
.nav-button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; font-size: .75rem; line-height: 1.4; font-weight: 600; color: var(--muted); border-radius: 26px; padding: 4px 10px; }
.nav-button svg { width: 21px; height: 21px; }
.nav-button[aria-current="page"] { color: #fff; background: var(--ink); }

/* ---------- 今天：取色沉浸海报（借鉴 Rex） ---------- */
html.is-poster, html.is-poster body { background: var(--deep); color: #fff; }
.is-poster :focus-visible { outline-color: #fff; }
.is-poster .home-view { padding-top: 0; }
.today-hero { --drag: 0px; position: relative; margin: 0 -20px; color: #fff; background: var(--deep); touch-action: pan-y; user-select: none; -webkit-user-select: none; isolation: isolate; transition: background-color .5s ease; }
.hero-stage { position: relative; aspect-ratio: 1; max-height: 74svh; width: 100%; overflow: hidden; background: var(--deep); }
.today-hero.no-art .hero-stage { aspect-ratio: 5 / 4; }
.hero-media { position: absolute; inset: 0; transform: translateX(var(--drag)); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.today-hero.is-dragging .hero-media { transition: none; }
.hero-frame { position: absolute; inset: 0; }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; animation: hero-drift 24s ease-in-out infinite alternate; transform-origin: 50% 40%; pointer-events: none; }
.hero-frame .missing-art { background: radial-gradient(circle at 50% 46%, #ffffff26 0, #ffffff00 58%), var(--deep); color: #ffffffd9; padding-top: 80px; font-size: .875rem; }
.hero-frame .missing-art svg { width: 44px; height: 44px; opacity: .75; }
.hero-fade { position: absolute; inset: -1px 0; pointer-events: none; z-index: 1; background: linear-gradient(180deg, #00000070 0%, #00000000 26%), linear-gradient(180deg, transparent 46%, var(--deep) 99%); transition: background .5s ease; }
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.05); } }
.slide-next .hero-media { animation: slide-in-next .36s cubic-bezier(.2, .8, .2, 1); }
.slide-prev .hero-media { animation: slide-in-prev .36s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide-in-next { from { transform: translateX(24%); opacity: .15; } to { transform: none; opacity: 1; } }
@keyframes slide-in-prev { from { transform: translateX(-24%); opacity: .15; } to { transform: none; opacity: 1; } }
.slide-next .hero-caption, .slide-prev .hero-caption { animation: caption-in .4s ease-out; }
@keyframes caption-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero-top { position: absolute; z-index: 3; left: 20px; right: 20px; top: 0; padding-top: calc(16px + env(safe-area-inset-top)); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-top .date-heading h1, .is-poster .topbar h1 { font-family: var(--sans); font-size: 1.75rem; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; color: #fff; text-shadow: 0 1px 14px #0000004d; }
.hero-top .date-heading h1 span, .is-poster .topbar h1 span { color: #ffffffe0; font-weight: 500; }
.hero-top .eyebrow, .is-poster .eyebrow { color: #ffffffd9; text-shadow: 0 1px 8px #00000040; }
.hero-step { position: absolute; z-index: 3; top: calc(50% - 22px); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #ffffff2b; border: 1px solid #ffffff38; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-step.prev { left: 12px; } .hero-step.next { right: 12px; }
.hero-step:disabled { opacity: .25; }
.hero-caption { position: relative; z-index: 2; margin-top: -92px; padding: 0 20px 20px; }
.hero-latin { font-family: "Inter", var(--sans); font-weight: 300; font-size: .8125rem; line-height: 1.6; letter-spacing: .42em; text-transform: uppercase; color: #fffffff2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.hero-caption h2 { margin: 6px 0 10px; font-size: clamp(2.125rem, 10.5vw, 2.875rem); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-meta span { font-size: .8125rem; line-height: 1.5; padding: 3px 10px; border-radius: 99px; background: #ffffff26; overflow-wrap: anywhere; }
.hero-meta span:first-child { background: #fff; color: var(--deep); font-weight: 650; }
.hero-line { font-size: 1rem; line-height: 1.65; color: #fffffff0; margin: 12px 0 16px; overflow-wrap: anywhere; }
.hero-actions { display: flex; gap: 10px; align-items: stretch; }
.hero-cta { flex: 1; justify-content: space-between; min-height: 52px; padding: 0 20px 0 24px; border-radius: 999px; background: #fff; color: #111214; font-weight: 700; }
.hero-steps { margin-top: 12px; font-size: .8125rem; line-height: 1.6; color: #ffffffcc; }
.hero-swatches { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-family: var(--label); font-size: .75rem; line-height: 1.5; font-weight: 600; letter-spacing: .08em; color: #ffffffd9; }
.hero-swatches i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #ffffff66; display: block; }
.hero-swatches span { margin-left: 4px; }
.swipe-hint { margin: 6px 0 4px; text-align: center; font-size: .8125rem; line-height: 1.6; color: var(--muted); }
.is-poster .swipe-hint { color: #ffffffb8; }
.week-strip { display: flex; gap: 4px; padding: 8px 0 14px; overflow-x: auto; scrollbar-width: none; }
.day-button { flex: 1 0 44px; min-width: 44px; padding: 6px 3px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: var(--display); font-size: 1rem; line-height: 1.4; font-weight: 700; }
.day-button small { font-family: var(--sans); font-size: .75rem; color: var(--muted); font-weight: 450; }
.day-button[aria-current="date"] { background: var(--sel); color: var(--on-sel); }
.day-button[aria-current="date"] small { color: inherit; }
.is-poster .day-button small { color: #ffffffb8; }
.is-poster .day-button[aria-current="date"] { background: #fff; color: var(--deep); }
.is-poster .day-button[aria-current="date"] small { color: var(--deep); }
.is-poster .section-heading h2 { font-family: var(--sans); font-weight: 750; color: #fff; }
.is-poster .section-heading span { color: #ffffffb8; }
.next-blocks { display: grid; gap: 10px; }
.next-block { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 78px; padding: 10px 16px 10px 10px; border-radius: 20px; text-align: left; color: #fff; background: #ffffff1a; border: 1px solid #ffffff26; }
.next-block.is-colour { background: var(--block); color: var(--block-on); border-color: transparent; }
.next-art { width: 58px; height: 58px; flex: none; border-radius: 14px; overflow: hidden; display: block; }
.next-art img { width: 100%; height: 100%; object-fit: cover; }
.next-art .missing-art { padding: 0; background: #ffffff12; border: 1px dashed #ffffff5c; border-radius: 14px; color: inherit; }
.next-art .missing-art span { display: none; }
.next-art .missing-art svg { width: 22px; height: 22px; }
.next-copy { flex: 1; min-width: 0; display: block; }
.next-copy strong { display: block; font-size: 1rem; line-height: 1.45; font-weight: 700; overflow-wrap: anywhere; }
.next-copy small { display: block; margin-top: 2px; font-size: .8125rem; line-height: 1.55; opacity: .86; overflow-wrap: anywhere; }
.next-block > svg { width: 18px; height: 18px; opacity: .7; }
.day-navigation { display: flex; gap: 6px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 12px; }
.day-navigation button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; padding: 8px 6px; font-size: .875rem; color: var(--ink); }
.day-navigation svg { width: 17px; height: 17px; }
.is-poster .day-navigation { border-top-color: #ffffff2e; }
.is-poster .day-navigation button { color: #fff; }
.is-poster .empty-state { background: #ffffff14; border-color: #ffffff3d; color: #ffffffe0; }
.is-poster .empty-state h2 { color: #fff; }
.is-poster .empty-state .primary-button { background: #fff; color: #111214; border-radius: 999px; }
.is-poster .bottom-nav { background: #0d0e1159; border-color: #ffffff26; box-shadow: 0 10px 30px #00000040; }
.is-poster .nav-button { color: #ffffffd1; }
.is-poster .nav-button[aria-current="page"] { background: #fff; color: var(--deep); }

/* ---------- 详情：白盒画廊 ---------- */
.detail-topbar { display: flex; align-items: center; gap: 10px; padding: 0 0 8px; min-height: 56px; flex-wrap: wrap; }
.back-button { min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0; font-size: .875rem; color: var(--muted); flex: none; }
.detail-title { font-family: var(--serif); font-size: 1.375rem; line-height: 1.4; font-weight: 600; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.detail-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; font-size: .8125rem; line-height: 1.7; color: var(--muted); }
.detail-meta > span:last-child { white-space: nowrap; }
.scope-tag { font-size: .8125rem; line-height: 1.5; padding: 2px 8px; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); letter-spacing: .04em; }
.step-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 2px; padding: 4px 0 0; margin: 0 -20px 6px; padding-inline: 14px; background: var(--glass-strong); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.step-nav button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 6px 4px; color: var(--muted); font-size: .9375rem; line-height: 1.4; border-radius: 0; }
.step-nav button i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font-style: normal; font-family: var(--label); font-size: .6875rem; }
.step-nav button[aria-current="step"] { color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--ink); }
.step-nav button[aria-current="step"] i { background: var(--sel); border-color: var(--sel); color: var(--on-sel); }
.step-note { flex: 3; font-size: .8125rem; line-height: 1.6; color: var(--muted); text-align: right; }
.detail-section { scroll-margin-top: 72px; padding: 20px 0 8px; }
.detail-section + .detail-section { border-top: 1px solid var(--ink); margin-top: 18px; }
.detail-section > h2 { font-family: var(--serif); font-size: 1.625rem; line-height: 1.4; font-weight: 600; margin-bottom: 6px; overflow-wrap: anywhere; }
.step-label { color: var(--accent-ink); margin-bottom: 4px; }
.section-kicker { margin-bottom: 6px; }
.hero-art { margin: 16px -20px 18px; padding: 28px 34px 18px; background: var(--wash); transition: background-color .5s ease; }
.art-mat { display: block; background: var(--mat); padding: 14px; border: 1px solid var(--line); box-shadow: 0 1px 2px #0000000d, 0 14px 34px #1a1d2b1c; }
.art-mat img, .art-mat .missing-art { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; }
.wall-label { display: grid; gap: 4px; margin: 16px 0 0; padding-left: 12px; border-left: 1px solid var(--ink); font-family: var(--label); font-size: .75rem; line-height: 1.6; letter-spacing: .08em; color: var(--ink-2); }
.wall-swatch { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.wall-swatch i { width: 12px; height: 12px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px #0000001a; }
.wall-swatch span { margin-left: 3px; }
.body-copy { font-size: 1rem; line-height: 1.9; color: var(--ink-2); }
.body-copy p + p { margin-top: 13px; }
.origin-note, .soft-note { display: flex; gap: 7px; align-items: flex-start; margin-top: 14px; font-size: .8125rem; line-height: 1.8; color: var(--muted); }
.origin-note { padding-top: 13px; border-top: 1px solid var(--line); }
.origin-note svg, .soft-note svg { width: 16px; height: 16px; margin-top: 3px; }
.fact-notes { margin: 18px 0 0; padding: 10px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); display: grid; gap: 6px; font-size: .8125rem; line-height: 1.7; color: var(--ink-2); }
.fact-notes div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 10px; }
.fact-notes dt { color: var(--muted); letter-spacing: .08em; }
.fact-notes dd { margin: 0; overflow-wrap: anywhere; }
.idea-list { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: idea; }
.idea-card { position: relative; counter-increment: idea; padding: 14px 0 14px 40px; border-bottom: 1px solid var(--line); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.idea-card::before { content: counter(idea, lower-roman) "."; position: absolute; left: 2px; top: 12px; font-family: "Instrument Serif", serif; font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--muted); }
.idea-card h3 { display: flex; align-items: flex-start; gap: 8px; font-size: 1.0625rem; line-height: 1.55; margin-bottom: 3px; }
.idea-card h3 svg { width: 18px; height: 18px; margin-top: 4px; color: var(--accent-ink); }
.idea-card > p:last-child { color: var(--ink); }
.idea-card h3 + p { color: var(--muted); font-size: .9375rem; }
.idea-card.is-note { margin-top: 10px; padding: 13px 14px 13px 40px; border: 1px dashed var(--line-2); border-radius: 4px; background: var(--tile); }
.idea-card.is-note h3 { color: var(--muted); font-weight: 600; }
.idea-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; font-size: .8125rem; line-height: 1.6; color: var(--muted); letter-spacing: .04em; }
.idea-type { padding: 0 7px; border-radius: 2px; background: var(--tile); }
.idea-type.is-custom { background: var(--soft); color: var(--accent-ink); }
.segmented { display: flex; gap: 0; margin: 14px 0 0; border-bottom: 1px solid var(--line); }
.segmented button { flex: 1; min-width: 0; min-height: 46px; padding: 9px 6px; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.segmented button[aria-selected="true"] { color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--ink); }
.wish-card { padding: 20px 2px 18px; margin: 0 0 14px; color: var(--ink); }
.wish-mark { display: block; height: 30px; margin-bottom: 4px; font-family: "Instrument Serif", Georgia, serif; font-size: 3.5rem; line-height: 1; color: var(--accent-ink); opacity: .55; }
.wish-style { display: inline-block; margin-bottom: 6px; font-family: var(--label); font-size: .75rem; line-height: 1.6; letter-spacing: .12em; color: var(--muted); }
.wish-text { font-family: var(--serif); font-size: 1.375rem; line-height: 1.7; font-weight: 600; overflow-wrap: anywhere; }
.wish-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.copy-button { flex: 1 1 8rem; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 13px; border-radius: 4px; font-size: 1rem; line-height: 1.5; letter-spacing: .06em; background: var(--sel); color: var(--on-sel); }
.copy-button svg { width: 18px; height: 18px; }
.detail-end { padding: 10px 0 8px; }
/* 庄重日：中性、克制 */
.is-solemn .hero-art { background: #f3f3f4; }
.is-solemn .step-label, .is-solemn .wish-mark { color: var(--muted); }
.is-solemn .idea-type.is-custom { background: var(--tile); color: var(--ink); }

/* ---------- 日历：白盒画廊 ---------- */
.calendar-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 56px; margin-bottom: 12px; }
.view-switch { display: flex; border: 1px solid var(--ink); border-radius: 4px; overflow: hidden; }
.view-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; font-size: .9375rem; color: var(--ink); border-radius: 0; }
.view-switch button + button { border-left: 1px solid var(--ink); }
.view-switch button svg { width: 18px; height: 18px; }
.view-switch button[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); font-weight: 650; }
.month-nav { display: flex; gap: 8px; align-items: center; }
.month-nav button { min-width: 44px; min-height: 44px; padding: 10px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.date-jump { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; color: var(--muted); font-size: .8125rem; line-height: 1.7; letter-spacing: .04em; }
.date-jump input { flex: 1 1 12rem; min-width: 0; max-width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; font-size: .9375rem; color: var(--ink); background: var(--surface); accent-color: var(--ink); }
.calendar-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calendar-weekdays { margin-bottom: 6px; font-family: var(--label); font-size: .75rem; color: var(--muted); line-height: 1.6; text-align: center; letter-spacing: .1em; }
.calendar-weekdays > * { padding: 6px 0; }
.calendar-view .month-grid, .calendar-view .calendar-weekdays { margin-inline: -10px; }
.calendar-day { min-width: 0; min-height: 96px; padding: 4px 3px 6px; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 3px; border-radius: 2px; background: var(--tile); border-top: 3px solid var(--day, transparent); overflow-wrap: anywhere; font-size: 1rem; line-height: 1.5; }
.day-number { display: block; padding-left: 2px; text-align: left; font-family: "Instrument Serif", var(--serif); font-size: 1.125rem; font-weight: 400; line-height: 1.2; }
.cell-event { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding-left: 4px; border-left: 2px solid var(--bar); font-size: .625rem; line-height: 1.3; text-align: left; color: var(--ink-2); overflow-wrap: anywhere; }
.calendar-day[aria-current="date"] { background: var(--sel); color: var(--on-sel); }
.calendar-day[aria-current="date"] .cell-event { color: var(--on-sel); }
.out-month { background: transparent; color: var(--muted); opacity: .5; }
.grid-note { margin: 10px 0 4px; font-size: .8125rem; line-height: 1.6; color: var(--muted); }
.event-list { margin-top: 2px; }
.event-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; width: 100%; border-bottom: 1px solid var(--line); text-align: left; }
.event-row:last-child { border-bottom: 0; }
.row-mat { width: 62px; height: 62px; padding: 4px; flex: none; background: var(--mat); box-shadow: 0 1px 6px #1a1d2b24; display: block; }
.row-mat img, .row-mat .missing-art { width: 100%; height: 100%; object-fit: cover; }
.row-mat .missing-art { padding: 6px; }
.row-mat .missing-art svg { width: 22px; height: 22px; }
.row-mat .missing-art span { display: none; }
.event-row-copy { flex: 1; min-width: 0; }
.event-row-copy h3 { font-size: 1rem; line-height: 1.5; margin-bottom: 2px; overflow-wrap: anywhere; }
.event-row-copy p { font-size: .8125rem; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.event-meta { display: block; font-size: .8125rem; line-height: 1.7; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.event-arrow { color: var(--muted); width: 18px; height: 18px; flex: none; }
.month-review-note { margin: 4px 0 22px; font-size: .875rem; line-height: 1.8; color: var(--muted); }
.month-review-note p:first-child { color: var(--ink); font-weight: 650; margin-bottom: 4px; }
.month-board { display: grid; gap: 34px; }
.day-preview { min-width: 0; display: flex; flex-direction: column; }
.day-preview-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px 10px; border-bottom: 1px solid var(--ink); margin-bottom: 14px; }
.day-preview-heading h2 { font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; font-weight: 600; }
.day-preview-heading span, .day-preview-caption { color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.feature-card { display: flex; flex-direction: column; flex: 1; }
.feature-art { background: var(--wash); padding: 22px 26px; }
.feature-art .art-mat { padding: 10px; }
.feature-copy { display: flex; flex-direction: column; flex: 1; margin: 14px 0 0 2px; padding-left: 12px; border-left: 1px solid var(--ink); }
.feature-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0 4px; }
.feature-heading h2 { font-family: var(--serif); font-size: 1.375rem; line-height: 1.4; font-weight: 600; }
.feature-heading span { font-size: .8125rem; color: var(--muted); line-height: 1.6; }
.feature-copy > p:not(.wall-kicker) { font-size: .9375rem; line-height: 1.7; color: var(--ink-2); margin-bottom: 12px; }
.feature-copy .primary-button { margin-top: auto; justify-content: space-between; }
.day-preview-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px 0; }
.day-preview-caption > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.day-preview-caption i { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px #0000001a; }

/* ---------- 弹窗与提示 ---------- */
dialog { width: calc(100% - 32px); max-width: 440px; max-height: calc(100dvh - 32px); padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); overflow: auto; box-shadow: 0 18px 70px #00000026; }
dialog::backdrop { background: #17212d66; backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.dialog-header h2 { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; line-height: 1.5; }
.dialog-close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; padding: 0; border-radius: 50%; color: var(--muted); }
dialog p { font-size: .875rem; line-height: 1.75; color: var(--muted); }
.theme-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 19px; padding: 0; border: 0; min-width: 0; }
.theme-modes legend { padding: 0 0 10px; color: var(--muted); font-size: .8125rem; line-height: 1.7; }
.theme-modes label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; flex: 1 1 8rem; font-size: .9375rem; line-height: 1.5; }
.theme-modes label:has(input:checked) { border-color: var(--ink); }
.theme-modes label span { min-width: 0; }
.theme-modes label small { display: block; margin-top: 4px; color: var(--muted); font-size: .8125rem; line-height: 1.7; }
.theme-modes input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--ink); }
.theme-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin: 15px 0 20px; }
.theme-swatch { min-width: 44px; min-height: 74px; padding: 8px 4px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; border-radius: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); position: relative; }
.theme-swatch > span { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--swatch, var(--accent)); }
.theme-swatch small { display: block; width: 100%; font-size: .8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.theme-swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.theme-swatch:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.color-field { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .9375rem; line-height: 1.7; margin: 14px 0; }
.color-field input[type="color"] { width: 66px; min-height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.theme-note { font-size: .8125rem; line-height: 1.8; color: var(--muted); }
.dialog-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dialog-actions button { flex: 1 1 8rem; }
dialog textarea { width: 100%; min-height: 120px; resize: vertical; margin: 18px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font-size: 1rem; line-height: 1.8; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); max-width: min(calc(100% - 32px), 420px); width: max-content; padding: 12px 18px; border-radius: 999px; background: #111214; color: #fff; font-size: .875rem; line-height: 1.6; text-align: center; opacity: 0; visibility: hidden; pointer-events: none; box-shadow: 0 8px 24px #0000002e; transition: opacity .18s, transform .18s, visibility .18s; }
.toast.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ===== 骨架 M1–M4：日历工具、周 / 议程、我的日程、表单、我的、示意 ===== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
select { font: inherit; }
.stub-badge { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 0 6px; border-radius: 3px; border: 1px dashed currentColor; font-family: var(--label); font-size: .6875rem; line-height: 1.55; font-weight: 600; letter-spacing: .08em; color: #8a5a00; background: var(--due-bg); }
.text-button { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 2px; font-size: .875rem; line-height: 1.5; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.text-button svg { width: 17px; height: 17px; }
.quiet-note { font-size: .875rem; line-height: 1.7; color: var(--muted); }
.notice { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0; padding: 10px 12px; border-radius: 6px; background: var(--tile); font-size: .8125rem; line-height: 1.7; color: var(--ink-2); }
.notice svg { width: 16px; height: 16px; }
.notice .text-button { min-height: 32px; padding: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row > * { flex: 1 1 10rem; margin-top: 0; }
.danger { color: #b3261e !important; border-color: #b3261e !important; }
.primary-button.danger { background: #b3261e; color: #fff !important; }

/* 关注按钮 */
.follow-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .875rem; font-weight: 600; }
.follow-button svg { width: 18px; height: 18px; }
.follow-button[aria-pressed="true"] svg { fill: currentColor; }
.follow-button.on-glass { min-width: 52px; min-height: 52px; padding: 0 16px; }
.follow-button.on-glass[aria-pressed="true"] { background: #fff; color: var(--deep); border-color: #fff; }

/* 日历工具栏 */
.calendar-header .today-chip { min-width: 0; border-radius: 999px; padding: 6px 14px; font-size: .875rem; font-weight: 650; }
.calendar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 14px; }
.tool-button { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .875rem; }
.tool-button svg { width: 17px; height: 17px; }
.tool-button.is-on { border-color: var(--ink); font-weight: 650; }
.tool-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--sel); color: var(--on-sel); font-size: .75rem; }
.calendar-tools .date-jump { flex: 1 1 9rem; margin: 0; }
.calendar-tools .date-jump input { min-height: 40px; padding: 6px 10px; border-radius: 999px; }
.filter-note { display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; font-size: .8125rem; line-height: 1.6; color: var(--muted); }
.filter-note svg { width: 15px; height: 15px; }
.filter-note span { flex: 1; min-width: 0; }
.view-switch button { padding: 6px 11px; }
.swipe-surface { touch-action: pan-y; --drag: 0px; }
.swipe-surface.is-dragging { transform: translateX(var(--drag)); }
.swipe-surface.is-dragging .calendar-day { pointer-events: none; }

/* 月格标记 */
.calendar-day { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.calendar-day.is-today .day-number { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1.5px solid var(--ink); }
.calendar-day[aria-current="date"].is-today .day-number { border-color: var(--on-sel); }
.cell-event.is-followed { font-weight: 700; color: var(--ink); }
.calendar-day[aria-current="date"] .cell-event.is-followed { color: var(--on-sel); }
.cell-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: auto; padding-left: 2px; }
.mark-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); flex: none; }
.mark-icon svg { width: 12px; height: 12px; stroke-width: 2; }
.legend { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }
.legend svg { width: 14px; height: 14px; }
.grid-note .legend:first-child { margin-left: 4px; }

/* 日期面板 */
.day-panel .section-heading h2 small { margin-left: 8px; font-family: var(--sans); font-size: .8125rem; color: var(--muted); font-weight: 450; }
.panel-block { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h3, .panel-head h2 { font-size: 1rem; line-height: 1.5; font-weight: 700; }
.diary-peek { font-size: .9375rem; line-height: 1.75; color: var(--ink-2); overflow-wrap: anywhere; }
.mine-list { display: grid; gap: 6px; margin: 4px 0; }
.mine-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 6px; background: var(--tile); text-align: left; }
.mine-row i { width: 4px; align-self: stretch; border-radius: 2px; background: var(--dot); flex: none; }
.mine-time { flex: none; min-width: 3.2em; font-family: var(--label); font-size: .8125rem; font-weight: 600; color: var(--muted); }
.mine-title { flex: 1; min-width: 0; font-size: .9375rem; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.mine-kind { flex: none; font-size: .75rem; color: var(--muted); }

/* 周视图与议程 */
.week-list { display: grid; gap: 8px; }
.week-day { border-left: 3px solid var(--day, var(--line)); padding: 6px 0 10px 12px; background: var(--surface); }
.week-day + .week-day { border-top: 1px solid var(--line); }
.week-day.is-selected { background: var(--tile); }
.week-day header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.week-date { display: inline-flex; align-items: baseline; gap: 8px; padding: 0; min-height: 40px; }
.week-date b { font-family: "Instrument Serif", var(--serif); font-size: 1.625rem; font-weight: 400; line-height: 1; }
.week-date span { font-size: .875rem; color: var(--muted); }
.week-date em { font-style: normal; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--sel); color: var(--on-sel); }
.week-actions { display: flex; gap: 2px; }
.icon-link { display: inline-grid; place-items: center; width: 40px; height: 40px; min-height: 40px; border-radius: 50%; color: var(--ink); }
.icon-link svg { width: 18px; height: 18px; }
.week-body { display: grid; gap: 6px; }
.week-fests { display: flex; flex-wrap: wrap; gap: 6px; }
.fest-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 10px 4px 8px; border-left: 3px solid var(--bar); border-radius: 2px 6px 6px 2px; background: var(--tile); font-size: .8125rem; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.fest-chip svg { width: 14px; height: 14px; fill: currentColor; }
.fest-chip.is-followed { font-weight: 700; background: var(--soft); }
.agenda-list { display: grid; gap: 4px; }
.agenda-day { padding: 10px 0 14px 12px; border-left: 3px solid var(--day, var(--line)); }
.agenda-day + .agenda-day { border-top: 1px solid var(--line); }
.agenda-date button { display: flex; align-items: baseline; gap: 10px; padding: 0; min-height: 40px; font-family: var(--serif); font-size: 1.125rem; font-weight: 600; text-align: left; }
.agenda-date span { font-family: var(--sans); font-size: .8125rem; font-weight: 450; color: var(--muted); }
.agenda-day.is-today .agenda-date button { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.agenda-due { list-style: none; margin: 2px 0 6px; padding: 0; display: grid; gap: 4px; }
.agenda-due li { display: flex; align-items: center; gap: 6px; font-size: .8125rem; line-height: 1.6; color: #6b4a00; }
.agenda-due svg { width: 15px; height: 15px; }
.agenda-end { text-align: center; padding: 16px 0; }

/* 搜索 */
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px; margin-bottom: 12px; }
.search-field input { flex: 1; min-width: 0; min-height: 48px; border: 0; outline: none; background: transparent; font-size: 1rem; color: var(--ink); }
.search-field:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.result-count { font-size: .8125rem; color: var(--muted); margin-bottom: 4px; }

/* 卡片、表单 */
.settings-card { margin: 0 0 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.settings-card h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 1.0625rem; line-height: 1.5; font-weight: 700; }
.settings-card h2 svg { width: 19px; height: 19px; }
.settings-card > p { font-size: .875rem; line-height: 1.75; color: var(--muted); margin-bottom: 10px; }
.settings-card .secondary-button, .settings-card .primary-button { margin-top: 10px; }
.settings-card.is-stub { border-style: dashed; background: var(--surface); }
.stub-later { padding: 10px 12px; border-radius: 6px; background: var(--tile); font-size: .875rem; line-height: 1.75; color: var(--ink-2) !important; }
.stub-later strong { display: block; color: var(--ink); }
.file-button { position: relative; cursor: pointer; }
.import-box { margin-top: 12px; padding: 12px; border-radius: 6px; background: var(--tile); font-size: .875rem; line-height: 1.7; }
.import-list { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.import-list span { font-family: var(--label); font-size: .8125rem; color: var(--muted); margin-right: 6px; }
.edit-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; font-size: .875rem; line-height: 1.5; font-weight: 600; }
.field span small, .field-label small { margin-left: 6px; font-weight: 450; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 1rem; font-weight: 450; line-height: 1.6; accent-color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
.field input[aria-invalid="true"] { border-color: #b3261e; }
.field-error { margin-top: -8px; font-size: .8125rem; color: #b3261e; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.switch-row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-size: .9375rem; line-height: 1.6; cursor: pointer; }
.switch-row input, .radio-row input, .filter-chip input, .color-row input, .mood-row input { accent-color: var(--ink); }
.switch-row input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.switch-row small { display: block; font-size: .8125rem; color: var(--muted); }
.switch-row.compact { align-items: center; align-self: end; min-height: 46px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0 0 8px; font-size: .875rem; font-weight: 600; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.radio-row label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: .9375rem; cursor: pointer; flex: 1 1 auto; }
.radio-row label:has(input:checked) { border-color: var(--ink); font-weight: 650; }
.radio-row label small { display: block; font-size: .75rem; color: var(--muted); font-weight: 450; }
.radio-row input:disabled + span { color: var(--muted); }
.filter-group { margin: 12px 0; }
.filter-chip { display: inline-flex; margin: 0 6px 8px 0; cursor: pointer; }
.filter-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filter-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; }
.filter-chip input:checked + span { background: var(--sel); color: var(--on-sel); border-color: var(--ink); font-weight: 650; }
.filter-chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.color-row { display: flex; flex-wrap: wrap; gap: 6px; }
.color-row legend { width: 100%; }
.color-row label { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.color-row input { position: absolute; opacity: 0; }
.swatch { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px #0000001f; }
.swatch.is-auto { background: conic-gradient(var(--accent) 0 50%, #fff 0); }
.color-row input:checked + .swatch { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.color-row input:focus-visible + .swatch { outline: 3px solid var(--ink); outline-offset: 5px; }
.mood-row { display: flex; gap: 6px; flex-wrap: wrap; }
.mood-row legend { width: 100%; }
.mood-row label { flex: 1 1 52px; display: grid; justify-items: center; gap: 2px; min-height: 64px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 1.5rem; line-height: 1.2; }
.mood-row label small { font-size: .75rem; color: var(--muted); }
.mood-row input { position: absolute; opacity: 0; }
.mood-row label:has(input:checked) { border-color: var(--ink); background: var(--tile); }
.mood-row label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-actions > * { flex: 1 1 7rem; margin-top: 0; }
.save-state { font-size: .8125rem; color: var(--muted); }
.field-label { font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-item, .photo-add { position: relative; aspect-ratio: 1; margin: 0; border-radius: 6px; overflow: hidden; background: var(--tile); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; font-size: .75rem; color: var(--muted); text-align: center; }
.photo-remove { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; min-height: 32px; border-radius: 50%; background: #000000a0; color: #fff; font-size: 1.125rem; line-height: 1; }
.photo-add { display: grid; place-content: center; justify-items: center; gap: 4px; border: 1px dashed #b9bbc2; cursor: pointer; font-size: .8125rem; color: var(--muted); }
.photo-add:focus-within { outline: 3px solid var(--ink); }

/* 我的 */
.profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px; margin-bottom: 14px; border-radius: 8px; background: var(--wash); }
.profile-card h2 { font-size: 1.0625rem; font-weight: 700; }
.profile-card p { font-size: .8125rem; line-height: 1.7; color: var(--muted); }
.profile-card .secondary-button { grid-column: 1 / -1; margin-top: 8px; }
.avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); color: var(--muted); grid-row: span 1; }
.me-list { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.me-list li + li { border-top: 1px solid var(--line); }
.me-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; text-align: left; background: var(--surface); }
.me-row > span { flex: 1; min-width: 0; }
.me-row strong { display: block; font-size: .9375rem; line-height: 1.5; }
.me-row small { display: block; font-size: .8125rem; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.me-row > svg:last-child { width: 16px; height: 16px; color: var(--muted); }
.reminder-list { list-style: none; margin: 0; padding: 0; }
.reminder-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.reminder-row.is-due { background: var(--due-bg); padding-inline: 8px; border-radius: 6px; }
.reminder-when { flex: none; width: 5.5em; }
.reminder-when b { display: block; font-size: .9375rem; }
.reminder-when small, .reminder-copy small { display: block; font-size: .75rem; line-height: 1.5; color: var(--muted); }
.reminder-copy { flex: 1; min-width: 0; }
.reminder-copy strong { display: block; font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.reminder-row > svg { width: 16px; height: 16px; color: var(--muted); }
.reminder-list.is-past { opacity: .7; }

/* 今天页：我的日程（海报上的玻璃卡片） */
.today-agenda { margin: 4px 0 6px; padding: 12px 14px; border-radius: 18px; background: #ffffff1a; border: 1px solid #ffffff2b; color: #fff; }
.today-agenda .panel-head h2 { font-size: 1.0625rem; font-weight: 750; }
.today-agenda .text-button { color: #fff; }
.today-agenda .quiet-note { color: #ffffffc4; }
.today-agenda .mine-row { background: #ffffff1f; color: #fff; }
.today-agenda .mine-time, .today-agenda .mine-kind { color: #ffffffbf; }
.today-agenda .mine-row i { box-shadow: 0 0 0 1px #ffffff55; }
.due-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.due-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 10px; background: #fff; color: #111214; text-align: left; }
.due-row svg { width: 18px; height: 18px; color: #8a5a00; }
.due-row strong { display: block; font-size: .9375rem; }
.due-row small { display: block; font-size: .75rem; color: #65676d; }
.today-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }

/* 详情页动作 */
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip-button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .875rem; color: var(--ink); }
.chip-button svg { width: 17px; height: 17px; }
.chip-button[aria-pressed="true"] { border-color: var(--ink); font-weight: 650; }
.chip-button.is-stub { border-style: dashed; }
.is-solemn .follow-button[aria-pressed="true"] svg { fill: var(--muted); }

/* 弹出面板 */
.sheet .stub-later { margin-top: 12px; }
.sheet .filter-group legend { color: var(--ink); }

/* ---------- 交互状态、尺寸 ---------- */
@media (hover: hover) {
  .event-row:hover, .calendar-day:hover:not([aria-current]):not(.out-month), .step-nav button:hover:not([aria-current]) { background: var(--soft); }
  .day-button:hover:not([aria-current]) { background: #0000000a; }
  .is-poster .day-button:hover:not([aria-current]), .is-poster .day-navigation button:hover { background: #ffffff1a; }
  .next-block:hover { filter: brightness(1.06); }
  .mine-row:hover, .me-row:hover, .fest-chip:hover { filter: brightness(.96); }
  .primary-button:hover, .copy-button:hover, .secondary-button:hover, .hero-cta:hover { filter: brightness(.94); }
}
.page-hidden *, .page-hidden *::before, .page-hidden *::after { animation-play-state: paused !important; }
@media (max-width: 360px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .today-hero, .hero-art { margin-left: -14px; margin-right: -14px; }
  .hero-top { left: 14px; right: 14px; }
  .hero-caption { padding-left: 14px; padding-right: 14px; }
  .step-nav { margin-inline: -14px; padding-inline: 8px; }
  .week-strip, .calendar-view .month-grid, .calendar-view .calendar-weekdays { gap: 1px; margin-inline: -8px; }
  .calendar-day { min-height: 88px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 800px) {
  .app-shell { max-width: 840px; padding: 0 28px calc(116px + env(safe-area-inset-bottom)); }
  .view { padding-top: 22px; }
  .home-view, .detail-view, .calendar-view, .search-view, .subscribe-view, .form-view, .gifts-view, .me-view, .follow-view, .reminders-view, .people-view, .settings-view { max-width: 680px; margin: 0 auto; }
  .is-poster .home-view { padding-top: 22px; }
  .today-hero { margin: 0; border-radius: 28px; overflow: hidden; }
  .hero-stage { max-height: 580px; }
  .hero-top { padding-top: 20px; left: 24px; right: 24px; }
  .hero-caption { padding: 0 28px 26px; margin-top: -104px; }
  .next-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { margin-inline: 0; padding: 36px 90px 20px; }
  .step-nav { margin-inline: 0; padding-inline: 0; }
  .calendar-view .month-grid, .calendar-view .calendar-weekdays { margin-inline: 0; }
  .calendar-day { min-height: 110px; }
  .cell-event { font-size: .75rem; }
  .event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .event-row:last-child { border-bottom: 1px solid var(--line); }
  .art-mode { max-width: none; width: min(1240px, calc(100vw - 56px)); margin-left: calc((100% - min(1240px, calc(100vw - 56px))) / 2); }
  .month-board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-frame img { transform: none; }
}
/* 设置里选了「减少动态效果」：和系统设置一样处理 */
html.reduce-motion { scroll-behavior: auto; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; }
html.reduce-motion .hero-frame img { transform: none; }
