:root {
  color-scheme: light;
  --paper: #f7f4ef;
  --paper-deep: #efeae3;
  --ink: #292a2f;
  --ink-soft: #79777d;
  --line: rgba(56, 52, 58, 0.11);
  --mint: #9bcdb7;
  --mint-deep: #2f7560;
  --gold: #e4c178;
  --gold-deep: #805e20;
  --lilac: #c3a8d7;
  --lilac-deep: #675078;
  --coral: #e99c91;
  --coral-deep: #864c45;
  --sky: #9ec8dc;
  --sky-deep: #3e6c7f;
  --shadow: 0 24px 70px rgba(73, 59, 52, 0.16);
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: #e8e0d7; color: var(--ink); }

button, input, select { font: inherit; }
[hidden] { display: none !important; }
button { color: inherit; }

body {
  background:
    radial-gradient(circle at 14% 12%, rgba(195, 168, 215, 0.28), transparent 27rem),
    radial-gradient(circle at 85% 82%, rgba(155, 205, 183, 0.32), transparent 30rem),
    #e8e0d7;
}

.prototype-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 28px;
}

.phone {
  width: min(390px, 100vw);
  height: min(844px, calc(100vh - 40px));
  min-height: 680px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 42px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(51, 47, 44, 0.05);
}

.topbar {
  flex: 0 0 auto;
  min-height: 92px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 22px 18px 12px;
  background: rgba(247, 244, 239, 0.93);
  backdrop-filter: blur(20px);
  z-index: 12;
}

.topbar-copy { text-align: center; min-width: 0; }
.topbar h1 { margin: 2px 0 0; font: 700 20px/1.1 ui-serif, "Songti SC", serif; letter-spacing: 0.05em; }
.topbar.is-calendar { min-height: 78px; padding-bottom: 8px; }
.topbar.is-calendar .eyebrow { display: none; }
.topbar.is-calendar h1 { margin: 0; font: 650 22px/1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif; letter-spacing: .01em; }
.eyebrow, .section-kicker { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.4; letter-spacing: 0.12em; text-transform: uppercase; }

.icon-button, .avatar-button, .month-switch, .today-chip, .text-button, .round-action,
.floating-add, .bottom-nav button, .segmented-control button, .task-filter-row button,
.focus-task-picker, .secondary-control, .primary-control, .sheet-heading button,
.type-picker button, .color-picker button, .save-button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.icon-button { width: 44px; height: 44px; background: transparent; display: grid; place-content: center; gap: 4px; }
.icon-button span { width: 18px; height: 1.5px; border-radius: 1px; background: var(--ink); }
.icon-button span:nth-child(2) { width: 13px; }

.avatar-button {
  width: 38px; height: 38px; justify-self: end; position: relative; border-radius: 50%;
  display: grid; place-items: center; background: #24252a; color: white; font: 600 13px ui-serif, serif;
}
.avatar-orbit { position: absolute; inset: -3px; border: 1px solid rgba(47, 117, 96, 0.32); border-radius: 50%; }
.avatar-orbit::after { content: ""; position: absolute; width: 5px; height: 5px; right: 1px; top: 2px; border-radius: 50%; background: var(--mint); border: 2px solid var(--paper); }

.view-stack { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.app-view { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; padding: 10px 18px 122px; opacity: 0; pointer-events: none; transform: translateX(12px); transition: opacity 180ms ease, transform 220ms ease; scrollbar-width: none; }
.app-view::-webkit-scrollbar { display: none; }
.app-view.is-active { opacity: 1; pointer-events: auto; transform: translateX(0); }

.today-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 2px 20px; }
.today-hero h2, .section-intro h2, .calendar-toolbar h2, .focus-scene > h2 { margin: 5px 0 0; font: 650 27px/1.24 ui-serif, "Songti SC", serif; letter-spacing: 0.02em; }
.today-hero h2 { max-width: 250px; font-size: 22px; }
.today-date { display: flex; align-items: center; gap: 11px; }
.today-date > strong { font: 650 44px/1 ui-serif, "Songti SC", serif; letter-spacing: -.04em; }
.today-date > div { display: grid; gap: 3px; }
.today-date span { color: var(--ink-soft); font-size: 9px; letter-spacing: .14em; }
.today-date small { font-size: 13px; }

.progress-ring {
  --progress: 0;
  width: 62px; height: 62px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--mint-deep) calc(var(--progress) * 1%), rgba(47, 117, 96, 0.1) 0);
  position: relative;
}
.progress-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper); }
.progress-ring span { position: relative; font-weight: 700; font-size: 17px; }
.progress-ring small { color: var(--ink-soft); font-size: 10px; }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 6px; margin-bottom: 14px; border-block: 1px solid var(--line); }
.summary-strip div { display: flex; flex-direction: column; align-items: center; gap: 3px; border-right: 1px solid var(--line); }
.summary-strip div:last-child { border-right: 0; }
.summary-strip strong { font: 650 14px/1.2 ui-serif, serif; }
.summary-strip span { color: var(--ink-soft); font-size: 10px; }

.panel { margin-top: 17px; }
.panel-heading { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 11px; }
.panel-heading strong { color: var(--ink); font-size: 14px; }
.panel-heading > div { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(233, 156, 145, 0.16); }
.text-button { padding: 7px 0 7px 10px; background: transparent; color: var(--mint-deep); font-size: 11px; }

.now-card { min-height: 108px; border-radius: 22px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.42); }
.now-card h3 { margin: 4px 0 5px; font-size: 16px; }
.now-card p { margin: 0; font-size: 11px; color: rgba(41,42,47,.65); }
.card-label { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(41,42,47,.6); }
.round-action { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.66); color: var(--mint-deep); font-weight: 700; }

.category-mint { background: linear-gradient(135deg, #b9ddcd, var(--mint)); }
.category-gold { background: linear-gradient(135deg, #f0dca8, var(--gold)); }
.category-lilac { background: linear-gradient(135deg, #d9c5e8, var(--lilac)); }
.category-coral { background: linear-gradient(135deg, #f2bcb3, var(--coral)); }
.category-sky { background: linear-gradient(135deg, #c0deea, var(--sky)); }

.mini-timeline { position: relative; }
.mini-timeline::before { content: ""; position: absolute; left: 42px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline-row { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 5px 0; align-items: start; }
.timeline-row time { padding-top: 12px; color: var(--ink-soft); font: 500 10px/1 ui-monospace, monospace; }
.timeline-card { min-height: 61px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; border-radius: 15px; position: relative; }
.timeline-card::before { content: ""; position: absolute; width: 7px; height: 7px; left: -14px; top: 17px; background: inherit; border-radius: 50%; border: 3px solid var(--paper); }
.timeline-card span { grid-column: 1; font-size: 9px; opacity: .65; }
.timeline-card strong { grid-column: 1; font-size: 12px; }
.timeline-card small { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 8px; opacity: .64; }

.task-list { display: grid; gap: 9px; }
.task-row { min-height: 68px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 18px; background: rgba(255,255,255,.62); box-shadow: inset 0 0 0 1px var(--line); }
.task-list.compact .task-row { min-height: 54px; border-radius: 15px; }
.task-check { width: 24px; height: 24px; display: grid; place-items: center; border: 1.5px solid rgba(41,42,47,.22); border-radius: 50%; background: transparent; cursor: pointer; }
.task-check::after { content: ""; width: 8px; height: 4px; border-left: 1.7px solid white; border-bottom: 1.7px solid white; transform: rotate(-45deg) translateY(-1px); opacity: 0; }
.task-row.is-done .task-check { background: var(--mint-deep); border-color: var(--mint-deep); }
.task-row.is-done .task-check::after { opacity: 1; }
.task-copy { min-width: 0; }
.task-copy strong { display: block; margin-bottom: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-copy small { color: var(--ink-soft); font-size: 9px; }
.task-row.is-done { background: #e9e6e1; }
.task-row.is-done .task-copy { opacity: .48; }
.task-row.is-done .task-copy strong { text-decoration: line-through; }
.row-edit { background: transparent; border: 0; padding: 0; text-align: left; cursor: pointer; }
.task-copy small { white-space: normal; line-height: 1.5; }
.mini-focus { border: 0; width: 28px; height: 30px; background: transparent; color: var(--mint-deep); cursor: pointer; }
.project-card { padding: 15px 12px; background: rgba(255,255,255,.66); border: 1px solid var(--line); border-radius: 20px; }
.project-top { display: flex; gap: 8px; align-items: center; }
.project-dot { width: 7px; height: 25px; border-radius: 5px; flex-shrink: 0; }
.project-title { flex: 1; text-align: left; font-size: 15px; font-weight: 650; padding: 0; border: 0; background: transparent; cursor: pointer; }
.project-meta { margin: 8px 0 12px 15px; font-size: 9px; color: var(--ink-soft); }
.project-stats { display: flex; justify-content: space-between; gap: 5px; padding-bottom: 10px; font-size: 9px; color: var(--ink-soft); }
.project-stats strong { color: var(--mint-deep); font-weight: 550; }
.project-card summary { font-size: 10px; color: var(--ink-soft); cursor: pointer; padding: 7px 0; }
.project-children { display: grid; gap: 6px; }
.project-children .task-row { padding: 8px 6px; gap: 5px; grid-template-columns: 24px 1fr 24px; min-height: 58px; border-radius: 12px; }
.project-children .task-copy strong { font-size: 11px; }
.project-children .task-copy small { font-size: 8px; }
.add-child { margin-top: 10px; border: 0; border-radius: 10px; padding: 8px 12px; font-size: 10px; background: var(--paper-deep); cursor: pointer; }
.ready-copy, .empty-copy { color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.project-done .project-title { text-decoration: line-through; color: var(--ink-soft); }
.task-check.checked { background: var(--mint-deep); border-color: var(--mint-deep); }
.task-check.checked::after { opacity: 1; }
.event-done { filter: grayscale(.75); opacity: .55; text-decoration: line-through; }
.week-event, .day-event { border: 0; text-align: left; cursor: pointer; }
.timeline-card { border: 0; text-align: left; cursor: pointer; }
.now-empty { background: var(--paper-deep); }
.focus-picker-label { display: block; text-align: left; margin-top: 22px; font-size: 10px; color: var(--ink-soft); }
select.focus-task-picker { display: block; font-size: 11px; margin-top: 7px; color: var(--ink); height: 48px; }
.focus-parent { text-align: left; margin: 8px 3px; color: var(--ink-soft); font-size: 10px; }
.parent-field { display: block; margin-top: 10px; }
.parent-field > span { display: block; color: var(--ink-soft); font-size: 9px; margin-bottom: 5px; }
.parent-field select { width: 100%; padding: 10px; border: 1px solid var(--line); background: white; border-radius: 11px; font-size: 10px; color: var(--ink); }
.edit-history { font-size: 9px; line-height: 1.5; color: var(--ink-soft); }
.bottom-sheet { max-height: calc(100% - 24px); overflow-y: auto; }
.app-view[data-view="focus"] { padding-bottom: 90px; }
.focus-scene { min-height: 0; }
.focus-scene > .section-kicker, .focus-scene > h2 { display: none; }
.focus-picker-label { margin-top: 2px; }
.focus-orbit { width: 190px; height: 190px; margin: 14px auto; }
.focus-controls { gap: 24px; }
.focus-note { margin-top: 14px; padding: 12px 0; }

.calendar-navigation { display: none; grid-template-columns: 26px minmax(0,1fr) 26px; align-items: center; gap: 2px; }
.is-calendar .calendar-navigation { display: grid; }
.topbar.is-calendar h1 { display: none; }
.calendar-navigation button { padding: 5px 0; border: 0; background: transparent; font-size: 27px; cursor: pointer; }
.calendar-jump { position: relative; min-width: 0; font-size: 20px; font-weight: 650; white-space: nowrap; }
.calendar-jump input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.calendar-range { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; font-size: 9px; color: var(--ink-soft); min-height: 25px; }
.calendar-range button { border: 1px solid var(--line); border-radius: 50%; background: white; width: 27px; height: 27px; cursor: pointer; }
.calendar-mode { touch-action: pan-y; }

.segmented-control.focus-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 0; }
.focus-modes button:disabled { cursor: default; }
.focus-mode-hint { margin: 6px 0 0; color: var(--ink-soft); font-size: 8px; line-height: 1.5; }
.focus-scene .focus-orbit { width: 170px; height: 170px; margin: 8px auto; }

[data-calendar-event] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-y; }

.storage-bar { display: flex; align-items: center; gap: 6px; padding: 0 18px 5px; font-size: 9px; color: var(--mint-deep); }
.storage-bar span { flex: 1; }
.storage-bar button { border: 0; padding: 4px 6px; border-radius: 7px; background: var(--paper-deep); color: var(--ink); cursor: pointer; font-size: 9px; }
.storage-bar[data-status="failed"], .storage-bar[data-status="conflict"] { color: var(--coral-deep); }
.login-panel { width: min(360px, calc(100vw - 36px)); margin: 24px auto; padding: 28px; border-radius: 28px; background: var(--paper); border: 1px solid var(--line); }
.login-panel h2 { font: 650 28px ui-serif, 'Songti SC', serif; }
.login-panel > p:not(.section-kicker) { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.task-row.is-done .task-color { filter: grayscale(1); opacity: .35; }
.task-color { width: 6px; height: 34px; border-radius: 999px; }
.task-duration { color: var(--ink-soft); font: 500 9px ui-monospace, monospace; }

.calendar-toolbar { display: grid; grid-template-columns: 38px 1fr 38px 38px; align-items: center; gap: 4px; padding: 4px 0 12px; text-align: center; }
.calendar-toolbar h2 { margin-top: 0; font-size: 24px; }
.month-switch, .today-chip { height: 38px; border-radius: 50%; background: transparent; font-size: 25px; }
.today-chip { background: #292a2f; color: white; font-size: 12px; }
.segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 15px; border-radius: 14px; background: var(--paper-deep); }
.segmented-control button { padding: 8px; border-radius: 11px; background: transparent; color: var(--ink-soft); font-size: 11px; }
.segmented-control button.is-active { color: var(--ink); background: white; box-shadow: 0 3px 12px rgba(68,57,50,.08); }
.calendar-mode { display: none; }
.calendar-mode.is-active { display: block; }
.month-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-weekdays { padding-bottom: 7px; color: var(--ink-soft); font-size: 9px; text-align: center; }
.month-weekdays .weekend { color: var(--coral-deep); }
.month-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.month-day { min-width: 0; height: 104px; padding: 0; position: relative; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.32); overflow: hidden; text-align: left; vertical-align: top; }
.month-day.is-muted { opacity: .35; }
.month-day.is-today { background: rgba(155,205,183,.14); }
.day-number { width: 21px; height: 21px; position: absolute; top: 6px; left: 5px; display: grid; place-items: center; margin: 0; border-radius: 50%; font-size: 9px; line-height: 1; }
.month-day.is-today .day-number { background: #292a2f; color: white; }
.month-events { position: absolute; top: 29px; left: 3px; right: 3px; display: grid; gap: 1px; align-content: start; }
.month-event { display: block; min-width: 0; margin: 0; padding: 2px 3px; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 7px; line-height: 1.05; }
.event-mint { background: var(--mint); color: #234f42; }
.event-gold { background: var(--gold); color: #684b18; }
.event-lilac { background: var(--lilac); color: #564064; }
.event-coral { background: var(--coral); color: #6f3d37; }
.event-sky { background: var(--sky); color: #34596a; }
.month-more { display: block; padding: 1px 3px; color: var(--ink-soft); font-size: 7px; line-height: 1.1; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 12px 2px; color: var(--ink-soft); font-size: 8px; }
.calendar-legend span { display: flex; align-items: center; gap: 4px; }
.calendar-legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend-mint { background: var(--mint); }.legend-gold { background: var(--gold); }.legend-lilac { background: var(--lilac); }.legend-sky { background: var(--sky); }.legend-coral { background: var(--coral); }

.week-head { display: grid; grid-template-columns: 34px repeat(7, 1fr); position: sticky; top: 0; z-index: 4; background: var(--paper); }
.week-head button { min-width: 0; padding: 5px 0 8px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 10px ui-serif, serif; }
.week-head small { color: var(--ink-soft); font: 500 7px system-ui; }
.week-head button.is-today { color: white; background: #292a2f; border-radius: 16px 16px 0 0; }
.week-head button.is-today small { color: rgba(255,255,255,.7); }
.week-scroll { height: 538px; padding-top: 8px; overflow: auto; scrollbar-width: none; }
.week-scroll::-webkit-scrollbar { display: none; }
.week-grid { position: relative; height: 864px; margin-top: 4px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line) 47px, var(--line) 48px); }
.week-grid::before { content: ""; position: absolute; left: 34px; top: 0; right: 0; bottom: 0; background: repeating-linear-gradient(to right, transparent 0, transparent calc((100% / 7) - 1px), var(--line) calc((100% / 7) - 1px), var(--line) calc(100% / 7)); }
.week-hour { position: absolute; left: 0; width: 30px; color: var(--ink-soft); font: 500 7px ui-monospace, monospace; transform: translateY(-4px); text-align: right; }
.week-event { position: absolute; margin-left: 2px; padding: 5px 4px; border-radius: 7px; overflow: hidden; box-shadow: 0 2px 5px rgba(55,47,44,.07); }
.week-event strong { display: block; font-size: 7px; line-height: 1.15; }
.week-event small { display: block; margin-top: 2px; font-size: 6px; opacity: .65; }
.day-date-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.64); border: 1px solid var(--line); }
.day-date-card div { display: flex; align-items: baseline; gap: 7px; }
.day-date-card strong { font: 650 30px ui-serif, serif; }
.day-date-card span, .day-date-card p { color: var(--ink-soft); font-size: 10px; }
.day-date-card p { margin: 0; text-align: right; }
.day-scroll { height: 520px; margin-top: 12px; padding-top: 8px; overflow: auto; scrollbar-width: none; }
.day-scroll::-webkit-scrollbar { display: none; }
.day-grid { position: relative; height: 972px; margin-left: 2px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 53px, var(--line) 53px, var(--line) 54px); }
.day-hour { position: absolute; left: 0; width: 38px; color: var(--ink-soft); font: 500 8px ui-monospace, monospace; transform: translateY(-4px); text-align: right; }
.day-grid::before { content: ""; position: absolute; left: 48px; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.day-event { position: absolute; left: 56px; right: 4px; padding: 8px 10px; border-radius: 11px; overflow: hidden; box-shadow: 0 2px 7px rgba(55,47,44,.07); }
.day-event strong { display: block; font-size: 10px; }
.day-event small { display: block; margin-top: 4px; font-size: 8px; opacity: .65; }

.section-intro { padding: 5px 2px 15px; }
.task-filter-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.task-filter-row button { white-space: nowrap; padding: 8px 11px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); font-size: 10px; }
.task-filter-row button span { margin-left: 3px; opacity: .65; }
.task-filter-row button.is-active { background: #292a2f; color: white; }
.task-overview { margin-bottom: 16px; padding: 15px; border-radius: 19px; background: linear-gradient(135deg, rgba(195,168,215,.35), rgba(155,205,183,.34)); }
.task-overview > div:first-child { display: flex; align-items: center; justify-content: space-between; font-size: 10px; }
.task-overview strong { font: 650 15px ui-serif, serif; }
.task-overview small { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 9px; }
.soft-progress { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.6); }
.soft-progress i { display: block; height: 100%; border-radius: inherit; background: #292a2f; }

.focus-scene { min-height: 620px; text-align: center; padding-top: 5px; }
.focus-task-picker { width: 100%; margin-top: 22px; padding: 12px 14px; display: grid; grid-template-columns: 10px 1fr 24px; align-items: center; gap: 10px; text-align: left; border-radius: 18px; background: rgba(255,255,255,.66); border: 1px solid var(--line); }
.focus-task-picker small { display: block; color: var(--ink-soft); font-size: 8px; }
.focus-task-picker strong { display: block; margin-top: 3px; font-size: 11px; }
.focus-task-picker b { color: var(--ink-soft); text-align: center; }
.category-dot { width: 8px; height: 8px; border-radius: 50%; }
.category-mint-bg { background: var(--mint); }
.focus-orbit { width: 246px; height: 246px; margin: 31px auto 25px; position: relative; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.9) 0 42%, rgba(155,205,183,.28) 43% 51%, rgba(155,205,183,.06) 52% 66%, transparent 67%); }
.focus-orbit::before, .focus-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(47,117,96,.18); }
.focus-orbit::before { inset: 8px; }
.focus-orbit::after { inset: 25px; border-style: dashed; }
.orbit-line { position: absolute; border-radius: 50%; }
.orbit-one { inset: 2px; border-top: 2px solid var(--mint-deep); transform: rotate(32deg); }
.orbit-two { inset: 18px; border-right: 1px solid rgba(47,117,96,.32); transform: rotate(-24deg); }
.focus-orbit.is-paused .orbit-one { border-top-color: var(--lilac-deep); }
.focus-time { position: relative; z-index: 2; }
.focus-time strong { display: block; font: 500 43px/1 ui-monospace, "SF Mono", monospace; letter-spacing: -.06em; }
.focus-time span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 9px; letter-spacing: .1em; }
.focus-controls { display: flex; align-items: center; justify-content: center; gap: 27px; }
.primary-control { width: 62px; height: 62px; border-radius: 50%; background: #292a2f; color: white; font-size: 20px; box-shadow: 0 9px 22px rgba(41,42,47,.2); }
.secondary-control { width: 48px; background: transparent; color: var(--ink-soft); display: grid; place-items: center; gap: 4px; font-size: 18px; }
.secondary-control span { font-size: 8px; }
.focus-note { margin-top: 28px; padding: 15px; border-block: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; text-align: left; font-size: 10px; }
.focus-note span { color: var(--ink-soft); }
.focus-note strong { font-size: 11px; }
.focus-note p { grid-column: 1 / -1; margin: 8px 0 0; color: var(--ink-soft); font-size: 8px; }

.floating-add { position: absolute; right: 19px; bottom: 88px; z-index: 20; width: 50px; height: 50px; border-radius: 50%; background: #292a2f; color: white; font-size: 28px; line-height: 1; box-shadow: 0 10px 24px rgba(41,42,47,.24); }
.bottom-nav { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 18; height: 70px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 5px max(6px, env(safe-area-inset-bottom)); border: 1px solid rgba(255,255,255,.74); border-radius: 25px; background: rgba(246,242,237,.92); backdrop-filter: blur(22px); box-shadow: 0 12px 28px rgba(60,49,44,.15); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: transparent; color: var(--ink-soft); font-size: 8px; }
.bottom-nav button.is-active { color: var(--ink); }
.bottom-nav b { font-weight: 500; }
.nav-icon { width: 20px; height: 20px; position: relative; display: block; }
.icon-today::before { content: ""; position: absolute; inset: 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-today::after { content: ""; position: absolute; width: 3px; height: 3px; left: 9px; top: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 -6px 0 -1px currentColor; }
.icon-calendar { border: 1.5px solid currentColor; border-radius: 4px; margin: 2px; width: 17px; height: 17px; }
.icon-calendar::before { content: ""; position: absolute; left: -1.5px; right: -1.5px; top: 4px; border-top: 1.5px solid currentColor; }
.icon-tasks::before, .icon-tasks::after { content: ""; position: absolute; border: 1.5px solid currentColor; border-radius: 3px; }
.icon-tasks::before { width: 5px; height: 5px; left: 1px; top: 3px; box-shadow: 0 10px 0 -1.5px var(--paper), 0 10px 0 0 currentColor; }
.icon-tasks::after { width: 10px; height: 0; right: 1px; top: 6px; box-shadow: 0 10px 0 currentColor; border-width: 1px 0 0; border-radius: 0; }
.icon-focus { border: 1.5px solid currentColor; border-radius: 50%; margin: 1px; width: 18px; height: 18px; }
.icon-focus::before { content: ""; position: absolute; inset: 4px; border: 1.5px dashed currentColor; border-radius: 50%; }

.sheet-backdrop { position: absolute; inset: 0; z-index: 30; background: rgba(31,29,31,.25); backdrop-filter: blur(3px); }
.bottom-sheet { position: absolute; z-index: 31; left: 8px; right: 8px; bottom: 8px; padding: 8px 18px 18px; border-radius: 30px; background: #faf8f4; box-shadow: 0 -18px 50px rgba(44,38,36,.22); animation: sheetUp 220ms ease both; }
.bottom-sheet[hidden], .sheet-backdrop[hidden] { display: none; }
@keyframes sheetUp { from { transform: translateY(25px); opacity: 0; } }
.sheet-handle { width: 38px; height: 4px; margin: 2px auto 14px; border-radius: 999px; background: rgba(41,42,47,.15); }
.sheet-heading { display: flex; align-items: start; justify-content: space-between; }
.sheet-heading h2 { margin: 3px 0 15px; font: 650 22px ui-serif, serif; }
.sheet-heading button { width: 36px; height: 36px; border-radius: 50%; background: var(--paper-deep); font-size: 20px; }
.field-label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 9px; }
.quick-input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 15px; outline: 0; background: white; font-size: 12px; }
.quick-input:focus { border-color: rgba(47,117,96,.55); box-shadow: 0 0 0 3px rgba(155,205,183,.18); }
.type-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 12px; }
.type-picker button { padding: 9px; border-radius: 12px; background: var(--paper-deep); color: var(--ink-soft); font-size: 9px; }
.type-picker button.is-active { background: #292a2f; color: white; }
.schedule-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.schedule-fields label { min-width: 0; }
.schedule-fields label[hidden] { display: none; }
.schedule-fields span { display: block; margin: 0 0 5px 2px; color: var(--ink-soft); font-size: 8px; }
.schedule-fields input { width: 100%; height: 39px; padding: 0 9px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font-size: 9px; }
.color-picker { display: flex; justify-content: center; gap: 15px; padding: 17px 0; }
.color-picker button { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #faf8f4; box-shadow: 0 0 0 1px transparent; }
.color-picker button.is-active { box-shadow: 0 0 0 1px var(--ink); }
.color-mint { background: var(--mint); }.color-gold { background: var(--gold); }.color-lilac { background: var(--lilac); }.color-coral { background: var(--coral); }.color-sky { background: var(--sky); }
.save-button { width: 100%; padding: 13px; border-radius: 15px; background: #292a2f; color: white; font-size: 11px; }
.sheet-footnote { margin: 10px 0 0; text-align: center; color: var(--ink-soft); font-size: 8px; }
.toast { position: absolute; left: 50%; bottom: 92px; z-index: 40; padding: 9px 14px; border-radius: 999px; background: #292a2f; color: white; font-size: 9px; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.prototype-notes { width: 300px; padding: 28px; border-radius: 28px; background: rgba(250,248,244,.72); border: 1px solid rgba(255,255,255,.55); box-shadow: 0 18px 50px rgba(73,59,52,.09); backdrop-filter: blur(12px); }
.prototype-notes h2 { margin: 6px 0 14px; font: 650 30px/1.1 ui-serif, "Songti SC", serif; }
.prototype-notes p:not(.section-kicker) { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.note-list { display: grid; gap: 8px; margin-top: 20px; }
.note-list span { padding: 9px 11px; border-radius: 12px; background: rgba(255,255,255,.62); font-size: 10px; }

@media (max-width: 760px) {
  body { background: var(--paper); }
  .prototype-shell { display: block; padding: 0; }
  .phone { width: 100vw; height: 100dvh; min-height: 600px; border: 0; border-radius: 0; box-shadow: none; }
  .prototype-notes { display: none; }
  .topbar { padding-top: max(14px, env(safe-area-inset-top)); }
  .bottom-nav { bottom: max(8px, env(safe-area-inset-bottom)); }
}

@media (max-width: 340px) {
  .app-view { padding-inline: 13px; }
  .month-day { height: 92px; }
  .today-hero h2 { font-size: 19px; }
  .timeline-card small { display: none; }
}

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

/* Keep the schedule selector and timer together in the compact phone preview. */
.focus-scene { min-height: 0; }
.focus-scene > .section-kicker, .focus-scene > h2 { display: none; }
.focus-orbit { width: 190px; height: 190px; margin: 14px auto; }
.focus-note { margin-top: 14px; padding: 12px 0; }
