/* North Star — D 方向的设计令牌与组件。事实用 Inter，产品“说话”的句子用 Newsreader。 */
:root {
  --ground: #0E0E0F; --surface: #1A1A1B; --line: #222224; --hair: #1B1B1D; --edge: #3A3936;
  --text: #F1EFEA; --text-2: #C4C1B9; --text-3: #9A978F; --text-4: #85827B;
  --gold: #E7C27A;
  --food-bg: #352C1A; --food-fg: #F2D597; --food-dim: #C9AE78;
  --move-bg: #1B3026; --move-fg: #A3E0C3; --move-dim: #82C2A3;
  --sleep-bg: #1E2637; --sleep-fg: #B3C7EE; --sleep-dim: #8FA6D4;
  --cal-fg: #A7A49C;
  --serif: Newsreader, Georgia, "Songti SC", serif;
  --sans: Inter, -apple-system, system-ui, "PingFang SC", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #0A0A0B; }
body { color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #F2D9A8; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.app { max-width: 430px; min-height: 100vh; margin: 0 auto; background: var(--ground); display: flex; flex-direction: column; position: relative; }
.screen { flex: 1; display: flex; flex-direction: column; padding-bottom: 24px; }
.pad { padding-left: 20px; padding-right: 20px; }
.quiet { color: var(--text-3); }
.faint { color: var(--text-4); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.zh { font-family: "PingFang SC", "Noto Sans SC", var(--sans); }

h1 { margin: 0; font-family: var(--serif); font-weight: 300; letter-spacing: -0.025em; line-height: 1.05; }
h1.day { font-size: 52px; line-height: 1; }
h1.say { font-size: 34px; line-height: 1.1; }
h2 { margin: 0; font-size: 17px; font-weight: 500; }
h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--text-3); }
.voice { font-family: var(--serif); font-size: 17px; line-height: 1.4; color: var(--text); }

.head { padding: 28px 12px 0 20px; display: flex; justify-content: space-between; align-items: flex-start; }
.head .stack { display: flex; flex-direction: column; gap: 6px; }
.back { height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 15px; }
.topbar { padding: 18px 12px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.chip { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; margin-right: 8px; }
.food { background: var(--food-bg); color: var(--food-fg); }
.move { background: var(--move-bg); color: var(--move-fg); }
.sleep { background: var(--sleep-bg); color: var(--sleep-fg); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; }

.next { margin: 14px 20px 18px; display: flex; align-items: flex-start; gap: 8px; font-size: 16px; line-height: 1.4; }
.next svg { flex: none; margin-top: 4px; }
.next .gold { color: var(--gold); }
.strip { margin: 0 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; color: var(--text); }
.strip .voice { flex: 1; }
.daynote { margin: 10px 20px 0; font-size: 13px; color: var(--text-3); }

/* 时间轴：一分钟一像素 */
.timeline { position: relative; margin: 22px 20px 0 0; }
.hour { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 12px; }
.hour span { width: 44px; text-align: right; font-size: 11px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.hour i { flex: 1; height: 1px; background: var(--hair); }
.row { position: absolute; left: 56px; right: 0; border-radius: 6px; display: flex; gap: 10px; padding: 0 10px; align-items: center; color: inherit; overflow: hidden; }
.row.tall { align-items: flex-start; padding-top: 9px; }
.row.tiny { border-radius: 4px; }
.row.tiny .name { font-size: 11px; }
.row .t { width: 36px; flex: none; font-size: 11px; font-variant-numeric: tabular-nums; }
.row .name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .note { flex: none; font-size: 11px; max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.cal { border: 1px solid #262628; background: repeating-linear-gradient(135deg, #131314 0 6px, #171718 6px 12px); color: var(--cal-fg); }
.row.cal .t, .row.cal .note { color: var(--text-4); }
.row.food .t, .row.food .note { color: var(--food-dim); }
.row.move .t, .row.move .note { color: var(--move-dim); }
.row.sleep .t, .row.sleep .note { color: var(--sleep-dim); }
.row.faded { opacity: 0.55; }
.row.struck .name { text-decoration: line-through; }
.row.estimate { outline: 1px dashed var(--food-dim); outline-offset: -1px; }
.nudge { position: absolute; right: 10px; display: flex; align-items: center; gap: 6px; font-size: 11px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nudge::before { content: ""; width: 5px; height: 5px; border-radius: 3px; background: currentColor; flex: none; }
.nudge.sleep, .nudge.move, .nudge.food { background: none; }
.gap-label { position: absolute; left: 56px; right: 0; text-align: center; font-size: 12px; color: var(--text-4); }
.now { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.now span { width: 44px; text-align: right; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--ground); }
.now b { width: 7px; height: 7px; border-radius: 4px; background: var(--text); }
.now i { flex: 1; height: 1.5px; background: var(--text); margin-left: -6px; }

.fab { position: sticky; bottom: 86px; align-self: flex-end; margin: 18px 20px 0 0; height: 50px; padding: 0 22px; border-radius: 25px; border: 1px solid var(--edge); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 10px 28px rgba(0,0,0,0.55); z-index: 2; }
.fab:hover { color: var(--text); }
.tabs { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 10px; background: var(--ground); border-top: 1px solid var(--hair); z-index: 3; }
.tabs a { height: 60px; color: var(--text-4); font-size: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 500; }

/* 列表与分组 */
.group { margin: 28px 20px 0; display: flex; flex-direction: column; }
.group > h2, .group > h3 { margin-bottom: 4px; }
.group .between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--hair); font-size: 14px; color: var(--text-2); }
.li:last-child { border-bottom: 1px solid var(--hair); }
.li .k { width: 38px; flex: none; font-size: 13px; color: var(--text-4); padding-top: 1px; }
.li .v { flex: 1; min-width: 0; }
.li.plain { color: var(--text); font-size: 15px; justify-content: space-between; }
.li .sub { display: block; margin-top: 2px; font-size: 13px; color: var(--text-3); }
a.li:hover { color: var(--text); }
.step { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--hair); }
.step .n { width: 22px; flex: none; font-family: var(--serif); font-size: 24px; line-height: 1; font-weight: 300; }
.step .body { flex: 1; font-size: 15px; line-height: 1.5; }
.step .tag { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.needs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; font-size: 14px; }
.needs div { padding: 10px 0; border-top: 1px solid var(--hair); }
.card { margin: 20px 20px 0; padding: 12px 14px; border-radius: 10px; background: var(--surface); font-size: 13px; line-height: 1.5; color: var(--text-2); }
details { margin-top: 8px; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--gold); font-size: 14px; }

/* 周视图 */
.weekgrid { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); gap: 4px; padding: 0 20px; }
.weekgrid .dayname { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 8px; font-size: 11px; color: var(--text-4); }
.weekgrid .dayname b { font-size: 15px; font-weight: 400; color: var(--cal-fg); font-variant-numeric: tabular-nums; }
.weekgrid .dayname.today { color: var(--gold); }
.weekgrid .dayname.today b { color: var(--text); font-weight: 600; }
.weekgrid .axis { position: relative; height: 340px; }
.weekgrid .axis span { position: absolute; right: 4px; font-size: 10px; color: var(--text-4); }
.weekgrid .col { position: relative; height: 340px; border-radius: 6px; background: #131314; }
.weekgrid .col.today { background: var(--surface); }
.weekgrid .col span { position: absolute; left: 3px; right: 3px; border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 20px 0; font-size: 12px; color: var(--cal-fg); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }

/* 操作 */
.actions { margin-top: auto; padding: 28px 20px 4px; display: flex; flex-direction: column; gap: 6px; }
.primary { height: 54px; border-radius: 27px; border: 0; background: var(--text); color: var(--ground); font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; width: 100%; }
.primary:hover { color: var(--ground); }
.primary[disabled] { background: #2A2A2C; color: var(--text-4); cursor: default; }
.outline { height: 52px; border-radius: 26px; border: 1px solid var(--edge); background: none; color: var(--text); font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; width: 100%; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ghost { height: 48px; border: 0; background: none; color: var(--text-2); font-size: 15px; }
.seg { display: grid; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface); }
.seg button { min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); font-size: 14px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: #2E2D2B; color: var(--text); }
.effort { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.effort button { height: 44px; border: 0; border-radius: 6px; background: var(--surface); color: var(--text-3); font-size: 14px; font-weight: 500; }
.effort button[aria-pressed="true"] { background: var(--move-fg); color: var(--ground); }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; min-height: 54px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text); }
.opt[aria-pressed="true"] { background: var(--surface); }
.opt .t1 { font-size: 16px; font-weight: 500; display: block; }
.opt .t2 { font-size: 13px; color: var(--text-3); display: block; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-3); }
.field input { height: 48px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 16px; }
.twocol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.before-after { margin: 24px 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.before-after .lab { font-size: 12px; color: var(--text-4); margin-bottom: 6px; }
.mini { border-radius: 6px; padding: 8px 10px; font-size: 12px; font-weight: 500; display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.mini small { font-size: 11px; font-weight: 400; opacity: 0.8; }
.mini.none { border: 1px dashed var(--edge); color: var(--text-4); font-weight: 400; }
.foot { margin: 24px 20px 0; font-size: 12px; line-height: 1.5; color: var(--text-4); }
.banner { margin: 0; padding: 8px 20px; background: #151516; border-bottom: 1px solid var(--hair); font-size: 12px; color: var(--text-3); }
.error { margin: 40px 20px; }
.loading { margin: 60px 20px; color: var(--text-4); font-size: 13px; }

/* 下拉选择（日历屏里给事件定类型） */
select { height: 40px; max-width: 150px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 14px; flex: none; }
