/* P3T1: color tokens (SPEC §5.3); P5T1: warm off-white + orange */
:root {
  color-scheme: light dark;
  --bg: #faf9f5;
  --sidebar: #f3f1ea;
  --surface: #ffffff;
  --hover: #ebe8df;
  --text: #1f1e1d;
  --muted: #6f6b63;
  --border: #e3dfd5;
  /* deep enough for white text at 4.5:1 */
  --accent: #b85636;
  --on-accent: #ffffff;
  --accent-soft: #f7ebe4;
  --done-text: #8f8a80;
  --locked-text: #a29d93;
  --locked-bg: #f1efe9;
  --warn-bg: #fff3cd;
  --warn-text: #6b4e00;
  --overlay: rgba(20, 18, 15, 0.45);
  --shadow: 0 1px 2px rgba(31, 30, 29, 0.06), 0 4px 14px rgba(31, 30, 29, 0.06);
  --radius: 10px;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", serif;
  /* P5T3: staircase indent per step and the step after which it stops growing */
  --stair: 20px;
  /* P7T2: the third step and every later one share the same indent (SPEC v1.6 §5.3) */
  --stair-max: 2;
  /* P7T7: open / done switch (Claude-style segmented control) */
  --track: #ebe8df;
  --thumb: #ffffff;
  /* P7T10: room kept under the page for the fixed ≡ button */
  --tabbar-space: 72px;
}

/* P3T1: dark mode follows the system setting; P5T1: near-black + brighter orange */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --sidebar: #1a1918;
    --surface: #201f1d;
    --hover: #2b2a27;
    --text: #ece9e1;
    --muted: #a29d93;
    --border: #34322e;
    /* bright orange carries dark text instead of white */
    --accent: #d97757;
    --on-accent: #1a1310;
    --accent-soft: #33241d;
    --done-text: #7d786f;
    --locked-text: #6e6a62;
    --locked-bg: #181817;
    --warn-bg: #3d3214;
    --warn-text: #f5d88a;
    --overlay: rgba(0, 0, 0, 0.6);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
    --track: #262523;
    --thumb: #3d3b37;
  }
}

/* P3T1: base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* P5T2: line icons follow the text color */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .dot {
  fill: currentColor;
  stroke: none;
}

/* P3T1: layout; P7T10: one column for every width — only the open project, centered (SPEC v1.8 §5.1) */
.layout {
  min-height: 100vh;
}

/* P7T10: project list as a drawer from the left (SPEC v1.8 F12, A17). It stays in the DOM;
   closed = off-screen + inert, and the view transition slides it between the two. */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  width: min(300px, 85vw);
  display: flex;
  flex-direction: column;
  padding: 16px;
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  view-transition-name: drawer;
}

.drawer.is-open {
  transform: none;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -4px;
  padding: 0 4px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 7;
  background: var(--overlay);
  view-transition-name: drawer-backdrop;
}

/* P7T10: round ≡ fixed at the bottom-left corner; .btn.drawer-btn so it beats the later .btn rule */
.btn.drawer-btn {
  position: fixed;
  left: calc(16px + env(safe-area-inset-left));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 5;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  box-shadow: var(--shadow);
  view-transition-name: drawer-btn;
}

.drawer-btn .icon {
  width: 22px;
  height: 22px;
}

/* P5T1: serif brand with the stairs mark */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 4px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.brand-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  stroke-width: 2.4;
}

.main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 40px;
  padding-bottom: calc(32px + var(--tabbar-space) + env(safe-area-inset-bottom));
}

.empty {
  color: var(--muted);
  padding: 24px 0;
  margin: 0;
}

/* P3T1: buttons and inputs (P3T10: every button is at least 40×40); P5T4: restyled */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover:not(:disabled) {
  border-color: var(--muted);
}

.btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  border-color: var(--accent);
  filter: brightness(1.08);
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover:not(:disabled) {
  border-color: transparent;
  background: var(--hover);
  color: var(--text);
}

.text-input {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.text-input::placeholder {
  color: var(--muted);
}

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.add-form {
  display: flex;
  gap: 8px;
}

.add-form .text-input {
  flex: 1;
}

/* P3T2: project list; the open project is highlighted; P5T4: sidebar look */
.project-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-item {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 0.15s;
}

.project-item:hover {
  background: var(--hover);
}

.project-item[aria-current="true"] {
  background: var(--hover);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* P7T7: done tab — gray name with the completion date under it (SPEC v1.6 F10) */
.project-item-name,
.project-item-meta {
  display: block;
}

.project-item-done .project-item-name {
  color: var(--done-text);
}

.project-item-meta {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

/* P7T6: one gray separator per deadline day (SPEC v1.6 F9) */
.project-sep {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 4px 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.project-sep:first-child {
  margin-top: 0;
}

.project-sep::before,
.project-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.side-empty {
  padding: 8px 4px 16px;
  font-size: 0.9rem;
}

.add-project {
  margin-top: 12px;
}

/* P3T1: project header and progress; P5T1: serif project name */
.project-header {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.project-name .rename-input {
  width: 100%;
  font-size: inherit;
  font-weight: inherit;
}

/* P7T5: F8 deadline button; P7T9: the calendar button shares the row */
/* P8T2: "已加入行事曆" reads as done, in the accent color */
.deadline-btn.calendar-added {
  color: var(--accent);
}

.deadline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.deadline-btn {
  min-height: 32px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.deadline-btn .icon {
  width: 16px;
  height: 16px;
}

.deadline-btn:hover:not(:disabled) {
  border-color: transparent;
  background: var(--hover);
  color: var(--text);
}

.deadline-btn.has-deadline {
  color: var(--text);
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s;
}

/* P3T3: step rows and the three looks of SPEC F3 */
.step-list {
  position: relative;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* P5T3: each step sits one stair further right, capped at --stair-max */
.step {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: calc(min(var(--i, 0), var(--stair-max)) * var(--stair));
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* P7T3: no handle — a not-done row is the grab area. pan-y keeps a plain swipe scrolling;
   no text selection or iOS callout so a long press can turn into a drag (A11). */
.step {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}

.step-current,
.step-locked {
  cursor: grab;
}

.step .rename-input {
  -webkit-user-select: text;
  user-select: text;
}

.step.pressing {
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
  transform: scale(0.99);
}

.step.lifted {
  opacity: 0.85;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.step-title {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
  overflow-wrap: anywhere;
}

.step .rename-input {
  flex: 1;
}

/* P5T3: done — receded step, flat on the page */
.step-done {
  background: transparent;
}

.step-done .step-title {
  color: var(--done-text);
  text-decoration: line-through;
}

/* P5T3: current — the only raised, outlined step */
.step-current {
  border-color: var(--accent);
  border-left-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

.step-current .step-title {
  font-weight: 600;
}

/* P5T3: locked — gray, dashed, with a lock icon */
.step-locked {
  background: var(--locked-bg);
  border-style: dashed;
  border-left-style: solid;
  color: var(--locked-text);
}

.step-locked .icon-btn {
  color: var(--locked-text);
}

.lock {
  display: flex;
  color: var(--locked-text);
}

.lock .icon {
  width: 16px;
  height: 16px;
}

.check-hit {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* P5T3: drawn checkbox; the native box is replaced but stays a real <input> (SPEC §6) */
.check {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--muted);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.step-current .check {
  border-color: var(--accent);
}

.check:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.check-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  color: var(--on-accent);
  stroke-width: 3;
  opacity: 0;
  pointer-events: none;
}

.check:checked + .check-mark {
  opacity: 1;
}

.check:disabled {
  border-style: dashed;
  border-color: var(--locked-text);
  background: transparent;
}

.check:disabled,
.check-hit:has(.check:disabled) {
  cursor: not-allowed;
}

/* P3T8: dragged row, drop line */
.step.dragging {
  opacity: 0.4;
}

.drop-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  pointer-events: none;
}

body.is-dragging {
  cursor: grabbing;
  user-select: none;
}

/* P3T4: shared dialog; P5T4: softer panel */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay);
}

.dialog {
  position: relative;
  width: min(380px, 100%);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.dialog:focus {
  outline: none;
}

.dialog-message {
  margin: 0 0 20px;
}

.dialog-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* P3T9: celebrate dialog */
.dialog-celebrate {
  text-align: center;
}

.dialog-celebrate .dialog-actions {
  justify-content: center;
}

.celebrate-title {
  position: relative;
  margin: 8px 0 4px;
  font-family: var(--font-serif);
  font-size: 1.6rem;
}

.celebrate-project {
  position: relative;
  margin: 0 0 20px;
  color: var(--muted);
  overflow-wrap: anywhere;
}


/* P3T9: pure CSS confetti, about 2 seconds */
.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: -16px;
  left: var(--x);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: hsl(var(--hue) 85% 60%);
  opacity: 0;
  animation: confetti-fall 1.6s ease-in var(--delay) forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(320px) rotate(calc(var(--spin) * 540deg));
  }
}

/* P6T1: view transitions. Only named parts animate; the rest of the page swaps instantly. */
.progress-fill {
  view-transition-name: progress-fill;
}

.add-form[data-form="add-step"] {
  view-transition-name: add-step;
}

::view-transition {
  /* clicks go straight through to the already-updated page (SPEC v1.4: never block input) */
  pointer-events: none;
}

::view-transition-old(root) {
  display: none;
}

::view-transition-new(root) {
  animation: none;
}

::view-transition-group(*) {
  animation-duration: 0.22s;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

::view-transition-old(*),
::view-transition-new(*) {
  animation-duration: 0.22s;
}

/* P6T2: a step that only exists on one side is being added or deleted;
   P7T8: same for sidebar entries entering / leaving a tab */
::view-transition-new(*.step):only-child,
::view-transition-new(*.proj):only-child {
  animation: step-in 0.22s cubic-bezier(0.2, 0, 0, 1) both;
}

::view-transition-old(*.step):only-child,
::view-transition-old(*.proj):only-child {
  animation: step-out 0.18s ease-in both;
}

/* P7T8: the switch track, thumb and labels are captured separately; paint order keeps the
   labels above the sliding thumb */
.tabs {
  view-transition-name: tabs;
}

.tabs-thumb {
  view-transition-name: tabs-thumb;
}

#tab-open {
  view-transition-name: tab-open;
}

#tab-done {
  view-transition-name: tab-done;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes step-out {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* P6T2: one-shot cues on the step that just changed */
.step-just-done .check,
.step-just-done .check-mark {
  animation: check-pop 0.32s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes check-pop {
  0% {
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.step-just-unlocked {
  animation: unlock-glow 0.6s ease-out;
}

@keyframes unlock-glow {
  from {
    box-shadow: 0 0 0 10px var(--accent-soft), var(--shadow);
  }
}

/* P6T2: dialogs fade and grow in */
.dialog-overlay {
  animation: fade-in 0.18s ease-out;
}

.dialog {
  animation: dialog-in 0.22s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
}

/* P3T9: no confetti; P6T2: no other motion either (view transitions are skipped in view.js) */
@media (prefers-reduced-motion: reduce) {
  .confetti {
    display: none;
  }

  .progress-fill {
    transition: none;
  }

  .step-just-done .check,
  .step-just-done .check-mark,
  .step-just-unlocked,
  .dialog-overlay,
  .dialog {
    animation: none;
  }

  .step.pressing {
    transition: none;
    transform: none;
  }
}

/* P7T7: open / done switch; P7T10: at the bottom of the drawer (A19) */
.tabbar {
  margin-top: 12px;
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--track);
  box-shadow: var(--shadow);
}

.tabs-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--thumb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tabs-thumb.is-right {
  transform: translateX(100%);
}

.tab {
  position: relative;
  min-width: 0;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected="true"] {
  color: var(--text);
  font-weight: 600;
}

/* P7T4: date-time picker (SPEC v1.6 F8) */
.dialog-picker {
  width: min(360px, 100%);
  max-height: 100%;
  padding: 20px;
  overflow-y: auto;
}

.dialog-title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-title {
  font-weight: 600;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.cal-navs {
  display: flex;
}

.cal-nav {
  color: var(--accent);
}

.cal-nav .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  justify-items: center;
}

.cal-weekdays {
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.cal-grid {
  row-gap: 2px;
}

.cal-day {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.cal-day:hover {
  background: var(--hover);
}

.cal-day.is-today {
  color: var(--accent);
  font-weight: 600;
}

/* selected day: solid orange circle; text uses the same color as primary buttons (4.5:1) */
.cal-day.is-selected {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

/* hour wheel: 5 visible rows, scroll-snap, faded toward the edges */
.wheel {
  --wheel-item: 36px;
  position: relative;
  margin: 12px 0 16px;
}

.wheel-band {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--wheel-item) * 2);
  height: var(--wheel-item);
  border-radius: var(--radius);
  background: var(--hover);
  pointer-events: none;
}

.wheel-scroll {
  position: relative;
  height: calc(var(--wheel-item) * 5);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
  mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
  border-radius: var(--radius);
}

.wheel-scroll::-webkit-scrollbar {
  display: none;
}

.wheel-scroll:focus-visible {
  outline-offset: -2px;
}

.wheel-pad {
  height: calc(var(--wheel-item) * 2);
}

.wheel-item {
  height: var(--wheel-item);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  color: var(--muted);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.wheel-item.is-selected {
  color: var(--text);
  font-weight: 600;
}

.picker-actions {
  flex-wrap: wrap;
}

.actions-side {
  margin-right: auto;
}

/* P3T10: storage warning bar */
.storage-warning {
  padding: 8px 16px;
  background: var(--warn-bg);
  color: var(--warn-text);
  text-align: center;
}

/* P3T10: phone width; P7T10: same one-column layout, smaller margins */
@media (max-width: 639.98px) {
  /* P5T3: shallower stairs so titles keep their width */
  /* P7T2: 1.5× the v1.5 phone indent */
  :root {
    --stair: 9px;
  }

  .main {
    padding: 16px;
    padding-bottom: calc(16px + var(--tabbar-space) + env(safe-area-inset-bottom));
  }
}
