/* 家庭行程管家 — 共用样式
   设计原则：家人只读页大字号、单列、高对比；规划端信息密度更高 */

:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-2: #5c574f;
  --ink-3: #8d867c;
  --line: #e5e0d8;
  --line-2: #d5cec3;
  --accent: #2f6f4f;
  --accent-soft: #e8f1ec;
  --warn: #a35a12;
  --warn-soft: #fdf1e3;
  --danger: #a33a2c;
  --danger-soft: #fbeae7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.05), 0 4px 14px rgba(28, 26, 23, 0.05);
  --sans:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

/* ---------- 布局 ---------- */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 96px;
}
.wrap--wide {
  max-width: 880px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 242, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar__title {
  font-size: 16px;
  font-weight: 650;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  flex: none;
}

/* ---------- 通用元件 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  padding: 9px 14px;
  border-radius: 9px;
  cursor: pointer;
  line-height: 1.3;
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.06s;
}
.btn:hover {
  background: #faf9f7;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: #275c41;
}
.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.btn--ghost:hover {
  background: #efece7;
}
.btn--danger {
  color: var(--danger);
  border-color: #e8cfca;
}
.btn--danger:hover {
  background: var(--danger-soft);
}
.btn--sm {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 7px;
}
.btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

.field {
  margin-bottom: 12px;
}
.field > label,
.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.input,
.select,
.textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 10px 11px;
  line-height: 1.4;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea {
  resize: vertical;
  min-height: 64px;
}

.row {
  display: flex;
  gap: 10px;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.row--tight {
  gap: 8px;
}

.muted {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
}
.hint {
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.5;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
}
.empty__emoji {
  font-size: 40px;
  display: block;
  margin-bottom: 10px;
}

/* ---------- 标签（产品差异点） ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag[data-tone="elder"] {
  background: #eef1f7;
  color: #3c5384;
}
.tag[data-tone="nap"] {
  background: var(--warn-soft);
  color: var(--warn);
}
.tag[data-tone="med"] {
  background: var(--danger-soft);
  color: var(--danger);
}
.tag[data-tone="wheel"] {
  background: #eceef0;
  color: #4d5359;
}
.tag[data-tone="kid"] {
  background: #f0eefb;
  color: #5a4a94;
}
.tag[data-tone="walk"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.tagpick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tagpick__item {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.tagpick__item[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 行程列表 ---------- */
.tripcard {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 16px;
  margin-bottom: 12px;
}
.tripcard:active {
  transform: translateY(1px);
}
.tripcard__head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 5px;
}
.tripcard__title {
  font-size: 16px;
  font-weight: 650;
  flex: 1;
}
.tripcard__meta {
  font-size: 13px;
  color: var(--ink-3);
}
.tripcard__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ---------- 编辑器：天 / 事项 ---------- */
.day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.day__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fbfaf8;
  border-bottom: 1px solid var(--line);
}
.day__date {
  font-size: 15px;
  font-weight: 650;
  flex: 1;
}
.day__body {
  padding: 12px 14px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 10px;
  background: #fdfcfb;
}
.item__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.item__time {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 14px;
  color: var(--ink-2);
  flex: none;
}
.item__n {
  font-size: 12px;
  color: var(--ink-3);
  flex: none;
}

/* ---------- 家人只读页 ---------- */
.reader {
  max-width: 560px;
}

.reader__hero {
  padding: 22px 16px 18px;
  text-align: center;
}
.reader__emoji {
  font-size: 44px;
  line-height: 1;
}
.reader__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
}
.reader__when {
  font-size: 16px;
  color: var(--ink-2);
  font-weight: 550;
}
.reader__countdown {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.rday {
  margin-bottom: 22px;
}
.rday__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 9px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.rday__label {
  font-size: 19px;
  font-weight: 700;
}
.rday__date {
  font-size: 14px;
  color: var(--ink-3);
  margin-left: auto;
}
.rday__today {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
}

/* 家人端字号整体放大 —— 老人要能直接看清 */
.ritem {
  display: flex;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.ritem:last-child {
  border-bottom: none;
}
.ritem__time {
  flex: none;
  width: 62px;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  padding-top: 1px;
}
.ritem__main {
  flex: 1;
  min-width: 0;
}
.ritem__title {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
  margin-bottom: 5px;
}
.ritem__line {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.65;
}
.ritem__note {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.65;
  white-space: pre-wrap;
  margin-top: 3px;
}
.ritem__link {
  display: inline-block;
  margin-top: 7px;
  font-size: 15px;
  font-weight: 600;
}

.rlist {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rcheck {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.5;
}
.rcheck:last-child {
  border-bottom: none;
}
.rcheck__box {
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line-2);
  border-radius: 5px;
  margin-top: 1px;
}
.rcheck__who {
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-3);
  flex: none;
}

/* 提醒条 */
.alerts {
  margin-bottom: 18px;
}
.alert {
  display: flex;
  gap: 10px;
  font-size: 16px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: #6f3d0b;
  margin-bottom: 8px;
  border: 1px solid #f0dfc7;
}
.alert--danger {
  background: var(--danger-soft);
  color: #7a2b20;
  border-color: #eed3ce;
}

/* ---------- 打印（给老人的 A4 大字版） ---------- */
.printonly {
  display: none;
}

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
  }
  body {
    background: #fff;
  }
  .noprint,
  .topbar,
  .btn {
    display: none !important;
  }
  .printonly {
    display: block;
  }
  .wrap {
    max-width: none;
    padding: 0;
  }
  .card,
  .day {
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0 0 14pt;
  }
  .ritem,
  .rcheck {
    break-inside: avoid;
  }
  .rday {
    break-inside: avoid-page;
  }
  .ritem__title {
    font-size: 12pt;
  }
  .ritem__line,
  .ritem__note {
    font-size: 11pt;
  }
  .reader__title {
    font-size: 20pt;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  @page {
    margin: 14mm;
  }
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(28, 26, 23, 0.93);
  color: #fff;
  font-size: 14px;
  font-weight: 550;
  padding: 10px 16px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s,
    transform 0.18s;
  z-index: 60;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast[data-show="1"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 底部固定操作条 ---------- */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(247, 245, 242, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.actionbar__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}
.actionbar__inner > * {
  flex: 1;
}

/* ---------- 清单 / 预算 ---------- */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.check:last-child {
  border-bottom: none;
}
.check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--accent);
}
.check__name {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
}
.check input[type="checkbox"]:checked + .check__name {
  color: var(--ink-3);
  text-decoration: line-through;
}
.check__del {
  flex: none;
  border: none;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 2px 4px;
}
.check__del:hover {
  color: var(--danger);
}

.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.sum-row:last-child {
  border-bottom: none;
}
.sum-row strong {
  font-variant-numeric: tabular-nums;
}
.sum-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 2px;
  margin-top: 4px;
  border-top: 2px solid var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin: 22px 0 10px;
}

/* ---------- 首页 hero ---------- */
.hero {
  padding: 26px 0 8px;
}
.hero__h1 {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0 0 10px;
}
.hero__p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}

.demo-note {
  margin-top: 22px;
}

/* ---------- 选项卡 ---------- */
.tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 16px;
  padding: 4px;
  background: #efece7;
  border-radius: 11px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs__item {
  flex: 1 0 auto;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.tabs__item[aria-current="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(28, 26, 23, 0.09);
}

/* ---------- 提醒折叠条 ---------- */
.alerts-banner {
  background: var(--warn-soft);
  border: 1px solid #f0dfc7;
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.alerts-banner > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 550;
  color: #6f3d0b;
  cursor: pointer;
  list-style: none;
}
.alerts-banner > summary::-webkit-details-marker {
  display: none;
}
.alerts-banner > summary::after {
  content: "展开";
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
  flex: none;
}
.alerts-banner[open] > summary::after {
  content: "收起";
}
.alerts-banner__body {
  padding: 0 14px 12px;
}
.alerts-banner .alert {
  margin-bottom: 6px;
  font-size: 14px;
}
.alerts-banner .alert:last-child {
  margin-bottom: 0;
}

/* ---------- 图标选择器 ---------- */
.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emoji-btn {
  width: 42px;
  height: 42px;
  font-size: 20px;
  line-height: 1;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.emoji-btn[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* ---------- 开关 ---------- */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  padding: 10px 11px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
}
.switch input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  margin: 0;
}

/* ---------- 弹窗 ---------- */
dialog#modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
}
dialog#modal::backdrop {
  background: rgba(28, 26, 23, 0.45);
}
dialog#modal[open] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
@media (min-width: 600px) {
  dialog#modal[open] {
    align-items: center;
  }
}
.dlg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(28, 26, 23, 0.22);
  padding: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow: auto;
}
.dlg__head {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.dlg__head strong {
  font-size: 17px;
  flex: 1;
}

/* ---------- 窄屏微调 ---------- */
@media (max-width: 420px) {
  .wrap {
    padding-left: 14px;
    padding-right: 14px;
  }
  .hero__h1 {
    font-size: 23px;
  }
  .ritem__time {
    width: 54px;
    font-size: 16px;
  }
  .topbar__title {
    font-size: 15px;
  }
}
.brand {
  text-decoration: none;
  color: var(--ink);
}
h1 {
  letter-spacing: -0.04em;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
  margin: 8px 0 18px;
}
.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 36px;
  background: #e8efe5;
  margin: 12px 0 32px;
}
.home-hero h1 {
  font-size: 40px;
  line-height: 1.25;
  margin: 18px 0;
  position: relative;
  z-index: 1;
}
.home-hero p {
  color: #50624e;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
}
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-art {
  position: absolute;
  right: 28px;
  bottom: 54px;
  opacity: 0.6;
  font-size: 68px;
  transform: rotate(-7deg);
}
.hero-art span {
  display: block;
}
.hero-art span:last-child {
  position: absolute;
  right: 68px;
  top: -60px;
  font-size: 42px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.trip-emoji {
  font-size: 30px;
}
.trip-hero {
  padding: 20px 0;
}
.trip-hero h1 {
  font-size: 30px;
  margin: 14px 0;
}
.trip-hero p {
  color: var(--ink-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  margin-bottom: 24px;
}
.stats div {
  padding: 18px;
  border-right: 1px solid var(--line);
}
.stats div:last-child {
  border: 0;
}
.stats strong {
  display: block;
  font-size: 22px;
  color: var(--accent);
}
.stats span {
  font-size: 12px;
  color: var(--ink-3);
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 14px;
  margin-bottom: 22px;
}
.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  padding: 14px 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.tabs button.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}
.grow {
  flex: 1;
}
.footer {
  text-align: center;
  margin-top: 36px;
}
.alerts {
  margin-top: 16px;
}
.ritem__note {
  overflow-wrap: anywhere;
}
.tripcard__title {
  overflow-wrap: anywhere;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #85b397;
  outline-offset: 3px;
}
dialog {
  width: min(580px, calc(100% - 24px));
  max-height: 90dvh;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
}
dialog::backdrop {
  background: #16221d80;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.large-type .ritem__title {
  font-size: 24px;
}
.large-type .ritem__line,
.large-type .ritem__note,
.large-type .rcheck {
  font-size: 22px;
}
@media (max-width: 600px) {
  .home-hero {
    padding: 24px;
  }
  .home-hero h1 {
    font-size: 32px;
  }
  .hero-art {
    right: -12px;
    bottom: 110px;
    font-size: 48px;
    opacity: 0.22;
  }
  .topbar__title {
    font-size: 12px;
  }
  .trip-hero h1 {
    font-size: 26px;
  }
  .stats div {
    padding: 14px 10px;
  }
  .stats strong {
    font-size: 19px;
  }
  .item__head {
    flex-wrap: wrap;
  }
  .item__head .grow {
    min-width: 55%;
  }
  .tripcard__head {
    flex-wrap: wrap;
  }
  .tabs {
    justify-content: space-between;
    gap: 5px;
  }
}
@media print {
  .hero-art,
  .stats,
  .tabs {
    display: none;
  }
  .large-type .ritem__note,
  .large-type .ritem__line {
    font-size: 14pt;
  }
  .rday {
    break-inside: auto;
  }
  .footer {
    margin-top: 12pt;
  }
}
/* v1 — responsive family workspace */
:root {
  --ink-3: #716c63;
  --radius: 16px;
}
body {
  line-height: 1.6;
}
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.btn {
  touch-action: manipulation;
}
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.btn--sm {
  min-height: 40px;
  padding: 8px 12px;
}
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn--primary {
  box-shadow: 0 2px 4px #2f6f4f18;
}
.btn--block {
  display: flex;
}
.card {
  box-shadow: none;
}
.input,
.select,
.textarea {
  font-size: 16px;
  min-height: 46px;
  border-radius: 11px;
}
.textarea {
  min-height: 90px;
}
.field > label {
  font-size: 14px;
}
.field > label input,
.field > label select,
.field > label textarea {
  margin-top: 7px;
}
.hint {
  font-size: 13px;
  color: var(--ink-3);
}
.muted {
  font-size: 14px;
}
.check {
  align-items: center;
  min-height: 52px;
}
.check input[type="checkbox"],
.tagpick__item input {
  accent-color: var(--accent);
}
.check input[type="checkbox"] {
  width: 23px;
  height: 23px;
  margin: 0;
}
.check__del {
  min-width: 44px;
  min-height: 44px;
}
.tagpick__item {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
}
.tagpick__item:has(input:checked) {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.tagpick__item input {
  margin-right: 6px;
}
.tag {
  font-size: 12px;
  padding: 5px 9px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: white;
  padding: 10px;
}
.skip-link:focus {
  top: 12px;
}
.brand {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.brand-symbol {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: white;
  font-size: 21px;
}
.topbar__inner {
  max-width: 1320px;
  min-height: 68px;
  padding: 12px 32px;
}
.topbar__title {
  text-align: right;
  font-size: 13px;
  color: var(--ink-3);
  margin-right: 16px;
}
.topbar {
  background: #f7f5f2ee;
}
.wrap {
  max-width: 1200px;
  padding: 30px 36px 56px;
  width: 100%;
  min-width: 0;
}
.sidebar {
  display: none;
}
.signed-in .shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}
.signed-in .sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 68px;
  height: calc(100dvh - 68px);
  border-right: 1px solid var(--line);
  padding: 30px 22px;
}
.sidebar .brand {
  font-size: 19px;
}
.sidebar-subtitle {
  font-size: 12px;
  color: var(--ink-3);
  margin: 8px 0 30px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav .btn {
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink-2);
}
.sidebar nav .nav-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
  font-size: 12px;
  color: var(--ink-3);
}
.sidebar-bottom .family-mark {
  font-size: 26px;
  margin-bottom: 12px;
}
.sidebar-bottom strong {
  color: var(--ink-2);
  font-size: 14px;
}
.sidebar-bottom span {
  display: block;
  margin-top: 12px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading h1 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 7px 0;
  line-height: 1.4;
}
.page-heading p {
  color: var(--ink-2);
  font-size: 14px;
  margin: 5px 0;
}
.eyebrow {
  font-size: 11px !important;
  color: var(--accent) !important;
  letter-spacing: 0.14em;
}
.page-heading > .btn {
  flex-shrink: 0;
}
.dashboard-banner {
  border-radius: 22px;
  min-height: 236px;
  background: #e8efe5;
  display: flex;
  padding: 30px 34px;
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
}
.dashboard-banner > div:first-child {
  z-index: 1;
}
.dashboard-banner h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.5;
  margin: 12px 0;
  letter-spacing: -0.03em;
}
.dashboard-banner p {
  color: #53634e;
  font-size: 13px;
  margin: 0;
}
.banner-art {
  position: absolute;
  width: 330px;
  height: 210px;
  right: 30px;
  bottom: -5px;
}
.sun {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e7c985;
  position: absolute;
  top: 22px;
  right: 46px;
}
.hill {
  position: absolute;
  bottom: -25px;
  width: 300px;
  height: 140px;
  border-radius: 70% 70% 0 0;
  transform: rotate(-12deg);
}
.hill-one {
  background: #cbdcc4;
  right: -60px;
}
.hill-two {
  background: #a4c09e;
  left: -70px;
  bottom: -35px;
}
.house {
  position: absolute;
  right: 114px;
  bottom: 47px;
  font-size: 91px;
  line-height: 1;
  color: #638061;
}
.tree {
  position: absolute;
  right: 28px;
  bottom: 58px;
  font-size: 92px;
  color: #476e49;
}
.banner-caption {
  font-size: 9px;
  letter-spacing: 0.14em;
  position: absolute;
  right: 0;
  bottom: 21px;
  color: #476447;
}
.overview-row {
  display: flex;
  gap: 24px;
  margin: 28px 0 32px;
}
.overview-row div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-right: 1px solid var(--line);
  padding-right: 28px;
}
.overview-row div:last-child {
  border: 0;
}
.overview-row strong {
  font-size: 27px;
  font-weight: 600;
}
.overview-row span {
  font-size: 13px;
  color: var(--ink-3);
}
.search-field {
  display: flex;
  gap: 10px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 20px;
  max-width: 380px;
}
.search-field span {
  font-size: 26px;
  color: var(--ink-3);
}
.search-field input {
  border: 0;
  outline: 0;
  background: none;
  width: 100%;
  padding: 9px 0;
  font: inherit;
  font-size: 15px;
}
.search-field:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.trip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.tripcard {
  padding: 24px;
  margin: 0;
  box-shadow: none;
  position: relative;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.tripcard:hover {
  border-color: #a4b7a5;
  box-shadow: 0 6px 20px #2f6f4f09;
}
.tripcard__head {
  align-items: center;
  margin: 0 0 22px;
}
.trip-cover-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: #eef2e9;
  border-radius: 14px;
  height: 56px;
  width: 56px;
}
.type-medical .trip-cover-icon {
  background: #edf1f8;
}
.type-family .trip-cover-icon {
  background: #f6eeec;
}
.trip-kind {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}
.tripcard__head .trip-kind {
  flex: 1;
}
.trip-title-link {
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.tripcard h3 {
  font-size: 19px;
  margin: 0 0 8px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.tripcard__meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}
.trip-faces {
  display: flex;
  align-items: center;
  margin: 20px 0;
}
.trip-faces > span {
  border-radius: 50%;
  border: 2px solid white;
  background: var(--accent-soft);
  width: 29px;
  height: 29px;
  font-size: 18px;
  margin-left: -5px;
  text-align: center;
}
.trip-faces > span:first-child {
  margin-left: 0;
}
.trip-faces small {
  margin-left: 9px;
  font-size: 12px;
  color: var(--ink-3);
}
.tripcard__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  gap: 8px;
}
.trip-countdown {
  font-size: 12px;
  color: var(--accent);
}
.trip-countdown.past {
  color: var(--ink-3);
}
.card-menu {
  position: relative;
}
.card-menu summary {
  list-style: none;
  font-size: 22px;
  width: 44px;
  height: 44px;
  text-align: center;
  cursor: pointer;
}
.card-menu summary::-webkit-details-marker {
  display: none;
}
.card-menu > div {
  position: absolute;
  top: 38px;
  right: 0;
  width: 140px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  z-index: 4;
  box-shadow: var(--shadow);
}
.card-menu .btn {
  display: flex;
  width: 100%;
  font-size: 13px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line-2);
  border-radius: 18px;
}
.empty-state p {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.8;
  margin-bottom: 22px;
}
.empty-state .hero-actions {
  justify-content: center;
}
.empty-illustration {
  font-size: 42px;
  color: #739373;
  display: block;
  margin-bottom: 16px;
}
.empty-state h2 {
  margin: 0;
  font-size: 22px;
}
.migration-note {
  padding: 12px 16px;
  border: 1px solid #cbdcc9;
  background: #f1f6ef;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  margin-bottom: 28px;
}
.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 50px 0 72px;
}
.landing-hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.25;
  letter-spacing: -0.05em;
  margin: 26px 0;
  font-weight: 650;
}
.landing-hero p {
  line-height: 1.9;
  color: var(--ink-2);
  font-size: 16px;
}
.landing-hero .muted {
  font-size: 12px;
  margin-top: 18px;
}
.landing-hero .hero-actions {
  margin-top: 26px;
}
.landing-scene {
  background: #e8efe5;
  height: 400px;
  border-radius: 35% 35% 24px 24px;
  position: relative;
  overflow: hidden;
}
.scene-sun {
  position: absolute;
  color: #cfa752;
  font-size: 90px;
  right: 40px;
  top: 20px;
}
.scene-hill {
  width: 480px;
  height: 200px;
  background: #ccddc6;
  position: absolute;
  bottom: -60px;
  left: -100px;
  border-radius: 50% 70% 0 0;
  transform: rotate(-14deg);
}
.scene-tree {
  font-size: 135px;
  color: #8ca987;
  position: absolute;
  right: 0;
  bottom: 0;
}
.scene-card {
  position: absolute;
  left: 40px;
  right: 50px;
  top: 94px;
  background: #fffefb;
  border-radius: 18px;
  box-shadow: 0 15px 40px #3f674d18;
  padding: 24px;
  transform: rotate(-4deg);
}
.scene-card span {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  margin-bottom: 18px;
}
.scene-card strong {
  display: block;
  font-size: 16px;
  margin: 12px 0 5px;
}
.scene-card small {
  font-size: 12px;
  color: var(--accent);
}
.scene-card div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-2);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.feature-grid article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  width: 45px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  font-size: 25px;
}
.feature-grid h2 {
  font-size: 18px;
  margin: 18px 0 10px;
}
.feature-grid p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  margin: 0;
}
.landing-cta {
  border-radius: 18px;
  padding: 30px;
  background: #ece9e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.landing-cta h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}
.editor-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.back-link {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
}
.save-state {
  font-size: 12px;
  color: var(--accent);
}
.save-state.pending {
  color: var(--ink-3);
}
.save-state.error,
.save-state.conflict {
  color: var(--warn);
}
.trip-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 30px 0 24px;
}
.trip-hero h1 {
  margin: 10px 0;
  font-size: 30px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.trip-hero h1 span {
  font-size: 27px;
}
.trip-hero p {
  font-size: 13px;
  margin: 0;
  color: var(--ink-3);
}
.trip-hero .hero-actions {
  justify-content: flex-end;
  flex-shrink: 0;
  max-width: 270px;
}
.tabs {
  gap: 28px;
  margin-bottom: 24px;
}
.tabs button {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}
.tabs button > span {
  font-size: 21px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 26px;
  align-items: start;
}
.context-panel {
  position: sticky;
  top: 92px;
}
.context-panel .card {
  padding: 20px;
}
.context-panel h3 {
  margin-top: 12px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 0;
  font-size: 13px;
  color: var(--ink-2);
}
.summary-line strong {
  color: var(--ink);
  font-weight: 550;
}
.progress-track {
  background: #edf0e9;
  height: 5px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 20px;
}
.progress-value {
  display: block;
  height: 100%;
  background: #699266;
}
.progress-0 {
  width: 0;
}
.progress-10 {
  width: 10%;
}
.progress-20 {
  width: 20%;
}
.progress-30 {
  width: 30%;
}
.progress-40 {
  width: 40%;
}
.progress-50 {
  width: 50%;
}
.progress-60 {
  width: 60%;
}
.progress-70 {
  width: 70%;
}
.progress-80 {
  width: 80%;
}
.progress-90 {
  width: 90%;
}
.progress-100 {
  width: 100%;
}
.gentle-note {
  padding: 22px;
  border-radius: 16px;
  background: #edf0e6;
  margin: 20px 0;
}
.gentle-note > span {
  font-size: 28px;
  color: #7d9970;
}
.gentle-note h3 {
  margin: 10px 0;
}
.gentle-note p {
  color: #5e6d53;
  font-size: 13px;
  margin: 0;
}
.context-panel > .muted {
  font-size: 12px;
}
.day-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 18px;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.day-nav a {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  background: white;
}
.day-nav a:hover {
  border-color: var(--accent);
}
.day-nav span {
  font-size: 12px;
  margin-left: 5px;
  color: var(--ink-3);
}
.day {
  border-radius: 16px;
  box-shadow: none;
  scroll-margin-top: 90px;
}
.day__head {
  padding: 12px 20px;
  background: #fdfcf9;
}
.day__body {
  padding: 18px 20px;
}
.item {
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0 18px;
  margin-bottom: 18px;
  border-radius: 0;
}
.item__head {
  margin-bottom: 10px;
}
.item__time {
  color: var(--accent);
  font-size: 13px;
}
.item .ritem__line {
  font-size: 14px;
  margin: 0 0 8px;
}
.item .ritem__note {
  font-size: 14px;
  margin: 10px 0 0;
}
.item a {
  font-size: 13px;
}
.item__head .btn {
  min-height: 36px;
  padding: 6px 9px;
  font-size: 12px;
}
.reminder-card {
  padding: 15px 18px;
  background: #faf9f4;
}
.reminder-card summary {
  font-size: 13px;
}
.reminder-card .alert {
  font-size: 14px;
}
.sync-warning {
  margin-top: 18px;
  background: #fdf1e3;
  border: 1px solid #ead5b6;
  border-radius: 12px;
  padding: 16px;
  color: #764714;
  font-size: 14px;
}
.sync-warning p {
  font-size: 13px;
  margin: 8px 0 14px;
}
.undo-bar {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c3025;
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 13px;
  z-index: 50;
  box-shadow: var(--shadow);
}
.undo-bar[hidden] {
  display: none;
}
.undo-bar .btn {
  background: transparent;
  color: white;
  border-color: #769484;
}
.upload-zone {
  border: 1px dashed #adbca8;
  border-radius: 16px;
  background: #f3f6ef;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 22px;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 24px;
}
.upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e3ebdd;
  font-size: 26px;
  color: var(--accent);
}
.upload-zone > span:last-of-type {
  font-size: 13px;
  color: var(--ink-3);
}
.upload-zone input {
  width: 100%;
  max-width: 290px;
  margin-top: 15px;
  font-size: 13px;
}
.upload-zone.uploading {
  opacity: 0.65;
}
.document-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 12px;
  background: white;
  margin-bottom: 12px;
}
.document-icon {
  background: #eef0ea;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 9px;
  border-radius: 8px;
}
.document-row > div {
  flex: 1;
  min-width: 0;
}
.document-row strong {
  font-size: 14px;
  display: block;
  overflow-wrap: anywhere;
}
.document-row small {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}
dialog {
  width: min(580px, calc(100% - 32px));
  padding: 0;
  border-radius: 20px;
  max-height: calc(100dvh - 50px);
  box-shadow: 0 24px 100px #12251a26;
}
dialog form {
  padding: 0;
}
dialog::backdrop {
  background: #18231f66;
}
.dialog-head {
  padding: 20px 24px 12px;
}
.dialog-head h2 {
  font-size: 21px;
  margin: 0;
  line-height: 1.5;
}
.dialog-head .btn {
  flex-shrink: 0;
}
.dialog-content {
  padding: 8px 24px 0;
}
.dialog-content > p {
  font-size: 14px;
  color: var(--ink-2);
}
.dialog-actions {
  position: sticky;
  bottom: 0;
  padding: 18px 24px;
  background: white;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}
.form-error {
  margin: 16px 24px 0;
  border-radius: 10px;
  padding: 12px;
  color: #8f3528;
  background: #fbeae7;
  font-size: 14px;
}
.form-error[hidden] {
  display: none;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}
.consent {
  font-size: 13px;
  border: 0;
  gap: 12px;
  margin-top: 10px;
}
.optional-health {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.optional-health summary {
  color: var(--ink-2);
  font-size: 14px;
  margin-bottom: 16px;
}
.share-intro {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 18px 0;
}
.share-intro > span {
  font-size: 32px;
  color: var(--accent);
}
.share-intro p {
  margin: 5px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.account-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0 24px;
}
.avatar {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}
.account-summary p {
  margin: 3px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.account-options {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}
.recovery-code {
  font-family: monospace;
  overflow-wrap: anywhere;
  margin-bottom: 16px;
}
.template-preview {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.template-preview span {
  float: right;
  font-size: 12px;
  color: var(--ink-3);
}
.template-preview p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 2;
}
.policy-view {
  max-width: 820px;
}
.policy {
  margin-top: 22px;
  padding: 36px;
}
.policy h1 {
  font-size: 30px;
}
.policy h2 {
  font-size: 18px;
  margin-top: 30px;
}
.policy p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.9;
}
.loading-state {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  font-size: 14px;
  color: var(--ink-3);
}
.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.reader {
  max-width: 760px;
}
.reader .reader__hero {
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.reader .hero-actions {
  position: sticky;
  top: 82px;
  background: #f7f5f2f2;
  padding: 8px 0;
}
.reader .rday__head {
  border-bottom-width: 1px;
}
.reader .rday {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.reader .ritem {
  padding: 20px 0;
}
.reader .ritem__line,
.reader .ritem__note {
  font-size: 17px;
  color: #4f4b43;
}
.reader .ritem__title {
  font-size: 20px;
}
.reader .ritem__time {
  width: 66px;
  font-size: 18px;
}
.reader .rcheck {
  font-size: 17px;
}
.large-type .ritem__title {
  font-size: 26px;
}
.large-type .ritem__line,
.large-type .ritem__note,
.large-type .rcheck {
  font-size: 22px;
}
.reader .footer {
  font-size: 12px;
}
.toast {
  bottom: 30px;
  max-width: 440px;
  width: max-content;
  white-space: normal;
}
@media (min-width: 1500px) {
  .trip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wrap {
    max-width: 1350px;
  }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .signed-in .shell {
    grid-template-columns: 176px minmax(0, 1fr);
  }
  .signed-in .sidebar {
    padding: 24px 14px;
  }
  .sidebar .brand {
    font-size: 17px;
  }
  .sidebar nav .btn {
    font-size: 13px;
    padding: 10px;
  }
  .sidebar-subtitle {
    font-size: 11px;
  }
  .wrap {
    padding: 28px 24px 48px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .context-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    position: static;
  }
  .context-panel .gentle-note {
    margin: 0;
  }
  .context-panel > .btn,
  .context-panel > .muted {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .dashboard-banner {
    padding: 24px;
  }
  .banner-art {
    right: -52px;
    width: 250px;
    opacity: 0.65;
  }
  .dashboard-banner h2 {
    font-size: 25px;
  }
  .tripcard {
    padding: 18px;
  }
  .tripcard__bottom {
    flex-wrap: wrap;
  }
  .trip-hero {
    align-items: flex-start;
  }
  .trip-hero .hero-actions {
    max-width: 190px;
  }
  .trip-hero h1 {
    font-size: 26px;
  }
  .tabs {
    gap: 20px;
  }
  .tabs button {
    font-size: 13px;
  }
  .landing-scene {
    height: 350px;
  }
  .scene-card {
    left: 22px;
    right: 22px;
    padding: 20px;
  }
  .feature-grid {
    gap: 22px;
  }
  .feature-grid h2 {
    font-size: 16px;
  }
}
@media (max-width: 767px) {
  .signed-in .shell {
    display: block;
  }
  .signed-in .sidebar {
    display: none;
  }
  .wrap {
    padding: 20px 16px 100px;
  }
  .topbar__inner {
    padding: 10px 16px;
    min-height: 60px;
    gap: 8px;
  }
  .topbar__title {
    display: none;
  }
  .topbar .brand {
    font-size: 18px;
    flex: 1;
  }
  .topbar .brand-symbol {
    height: 26px;
    width: 26px;
  }
  .topbar .btn {
    font-size: 13px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading > .btn {
    align-self: flex-start;
  }
  .dashboard-banner {
    min-height: 204px;
    padding: 24px;
    border-radius: 18px;
  }
  .dashboard-banner h2 {
    font-size: 25px;
  }
  .dashboard-banner p {
    max-width: 220px;
  }
  .banner-art {
    right: -88px;
    width: 250px;
    opacity: 0.38;
  }
  .overview-row {
    gap: 10px;
    justify-content: space-between;
    margin: 24px 0;
  }
  .overview-row div {
    display: block;
    padding-right: 14px;
    flex: 1;
  }
  .overview-row strong {
    display: block;
    font-size: 25px;
  }
  .overview-row span {
    font-size: 12px;
  }
  .trip-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tripcard {
    padding: 22px;
  }
  .tripcard__head {
    flex-wrap: nowrap;
    margin-bottom: 16px;
  }
  .tripcard__bottom {
    flex-wrap: nowrap;
  }
  .trip-faces {
    margin: 16px 0;
  }
  .search-field {
    max-width: none;
  }
  .section-head h2 {
    font-size: 19px;
  }
  .migration-note {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading p {
    font-size: 13px;
  }
  .landing-hero {
    display: block;
    padding: 12px 0 32px;
  }
  .landing-hero h1 {
    font-size: 38px;
    margin: 22px 0;
  }
  .landing-hero p {
    font-size: 15px;
  }
  .landing-hero .hero-actions {
    gap: 10px;
  }
  .landing-scene {
    height: 320px;
    margin-top: 32px;
    border-radius: 22px;
  }
  .scene-card {
    left: 26px;
    right: 40px;
    top: 58px;
  }
  .scene-sun {
    top: 0;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0;
  }
  .feature-grid h2 {
    margin: 10px 0;
  }
  .feature-grid article {
    position: relative;
    padding-left: 60px;
  }
  .feature-grid article > span {
    position: absolute;
    left: 0;
    top: 8px;
  }
  .landing-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }
  .landing-cta h2 {
    font-size: 21px;
  }
  .editor-topline {
    font-size: 12px;
  }
  .trip-hero {
    display: block;
    padding: 24px 0 20px;
  }
  .trip-hero h1 {
    font-size: 27px;
  }
  .trip-hero .hero-actions {
    max-width: none;
    justify-content: flex-start;
    margin-top: 20px;
    gap: 8px;
  }
  .trip-hero .hero-actions > .btn {
    flex: 1;
    font-size: 13px;
    padding: 10px 8px;
  }
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fffffff5;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    backdrop-filter: blur(12px);
    margin: 0;
    padding: 7px 8px calc(8px + env(safe-area-inset-bottom));
    z-index: 30;
    gap: 2px;
    justify-content: space-around;
  }
  .tabs button {
    flex: 1;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
  }
  .tabs button.active {
    border: 0;
    background: #e8f1ec;
    color: var(--accent);
  }
  .tabs button > span {
    font-size: 22px;
    line-height: 1.2;
  }
  .workspace {
    display: block;
  }
  .context-panel {
    display: none;
  }
  .day-nav {
    position: sticky;
    top: 60px;
    z-index: 10;
    background: #f7f5f2ed;
    padding: 10px 0;
  }
  .day__head {
    padding: 10px 14px;
  }
  .day__date {
    font-size: 14px;
  }
  .day__body {
    padding: 14px;
  }
  .item__head {
    flex-wrap: wrap;
    gap: 5px;
  }
  .item__time {
    width: 100%;
    font-size: 13px;
    margin-bottom: 3px;
  }
  .item__head .grow {
    min-width: 0;
    flex: 1;
    font-size: 16px;
  }
  .item__head .btn {
    min-height: 44px;
  }
  .day {
    scroll-margin-top: 130px;
  }
  .reminder-card {
    padding: 13px 14px;
  }
  .upload-zone {
    padding: 28px 14px;
  }
  .document-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .document-row > div {
    min-width: calc(100% - 65px);
  }
  .document-row .btn {
    margin-left: auto;
  }
  .document-row .btn + .btn {
    margin-left: 0;
  }
  .undo-bar {
    bottom: 90px;
    max-width: calc(100% - 32px);
    width: max-content;
    font-size: 12px;
    gap: 12px;
  }
  .toast {
    bottom: 94px;
    max-width: calc(100vw - 32px);
  }
  .reader {
    padding-bottom: 40px;
  }
  .reader .hero-actions {
    top: 60px;
    gap: 6px;
  }
  .reader .hero-actions .btn {
    min-height: 44px;
    font-size: 12px;
    padding: 10px;
  }
  .reader .rday {
    padding: 18px 14px;
  }
  .reader .ritem {
    gap: 10px;
  }
  .reader .ritem__time {
    width: 54px;
    font-size: 17px;
  }
  .reader .ritem__title {
    font-size: 19px;
  }
  .reader .ritem__note,
  .reader .ritem__line {
    font-size: 16px;
  }
  .large-type .ritem__title {
    font-size: 24px;
  }
  .large-type .ritem__line,
  .large-type .ritem__note {
    font-size: 21px;
  }
  .policy {
    padding: 22px;
  }
  .policy h1 {
    font-size: 26px;
  }
  .policy p {
    font-size: 14px;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    max-height: 93dvh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
  .dialog-head {
    padding: 18px 20px 10px;
  }
  .dialog-head h2 {
    font-size: 19px;
  }
  .dialog-content {
    padding: 8px 20px 0;
  }
  .dialog-actions {
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  }
  .dialog-actions > .btn {
    flex: 1;
  }
  .form-error {
    margin: 14px 20px 0;
  }
  .optional-health summary {
    font-size: 13px;
  }
  .dialog-content .row {
    gap: 10px;
  }
  .dialog-content .input[type="date"] {
    padding: 10px 6px;
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .skip-link,
  .editor-topline,
  .context-panel,
  .tabs,
  .day-nav,
  .undo-bar,
  .toast,
  dialog {
    display: none !important;
  }
  .shell,
  .signed-in .shell {
    display: block;
  }
  .reader .hero-actions {
    display: none;
  }
  .wrap,
  .reader {
    max-width: none;
    padding: 0;
  }
  .reader .rday,
  .reader .card {
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .reader .rday {
    break-inside: auto;
  }
  .reader .ritem {
    break-inside: avoid;
    padding: 9pt 0;
  }
  .reader .ritem__title {
    font-size: 13pt;
  }
  .reader .ritem__note,
  .reader .ritem__line {
    font-size: 12pt;
  }
  .reader .ritem__time {
    font-size: 13pt;
  }
  .reader .rcheck {
    font-size: 12pt;
  }
  .large-type .ritem__title {
    font-size: 16pt;
  }
  .large-type .ritem__note,
  .large-type .ritem__line {
    font-size: 14pt;
  }
  .reader .reader__hero {
    padding-top: 0;
  }
  .reader .footer {
    font-size: 9pt;
  }
  .reader .rday__head {
    font-size: 13pt;
  }
}
@media (max-width: 359px) {
  .dialog-content .row {
    flex-direction: column;
    gap: 0;
  }
  .trip-hero .hero-actions {
    flex-wrap: wrap;
  }
  .trip-hero .hero-actions > .btn {
    flex: 1 1 40%;
  }
  .trip-hero .hero-actions > .btn--primary {
    flex-basis: 100%;
    order: -1;
  }
}
