:root {
  color-scheme: light;
  --bg: #faf7f2;
  --surface: #fffcf9;
  --ink: #382d30;
  --muted: #766866;
  --line: #ece1da;
  --rose: #9c4055;
  --rose-dark: #813347;
  --pink: #f8e7e8;
  --sage: #e9efe6;
  --green: #35624c;
  --butter: #f7ecd9;
  --shadow: 0 12px 40px #5c343008;
  --serif: "Songti SC", "Noto Serif CJK SC", STSong, SimSun, Georgia, serif;
  --side-width: 237px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
body { min-width: 280px; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
main:focus { outline: none; }

.skip {
  position: fixed;
  z-index: 40;
  top: .75rem;
  left: .75rem;
  transform: translateY(-200%);
  background: var(--surface);
  border-radius: 8px;
  padding: .5rem 1rem;
}
.skip:focus { transform: translateY(0); }

.icon { flex: 0 0 auto; vertical-align: middle; }
.overline {
  color: var(--rose);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .18em;
  line-height: 1.4;
  margin-bottom: 6px;
}
.muted { color: var(--muted); }
.positive { color: var(--green); }
.blush { background: var(--pink); color: var(--rose); }
.sage { background: var(--sage); color: var(--green); }
.butter { background: var(--butter); color: #805a2c; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  min-width: 0;
  box-shadow: var(--shadow);
}

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #fae7e9;
  font-size: 19px;
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 13px; font-weight: 750; letter-spacing: -.025em; }
.brand-copy small { color: var(--rose); font-size: 8px; font-weight: 800; letter-spacing: .16em; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 9;
  width: var(--side-width);
  display: flex;
  flex-direction: column;
  padding: 27px 19px 20px;
  background: #fffaf6;
  border-right: 1px solid var(--line);
}
.sidebar .brand { padding: 0 3px; }
.sidebar-caption {
  margin: 45px 0 10px 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
}
.side-nav { display: grid; gap: 5px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #695b5d;
  font-weight: 650;
}
.nav-link:hover { background: #fbf1ee; color: var(--rose); }
.nav-link.active { background: #f8e7e7; color: var(--rose-dark); border-color: #f1dcdf; }
.nav-link .icon { width: 18px; height: 18px; }
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffcf9;
  min-width: 0;
}
.sidebar-foot > div:last-child { min-width: 0; }
.sidebar-foot strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.sidebar-foot strong span { color: var(--rose); }
.sidebar-foot small { color: var(--muted); font-size: 10px; }
.avatar-pair { display: flex; flex: 0 0 auto; }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #f6dfe2;
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 800;
}
.avatar.alternate { background: var(--sage); color: var(--green); }
.avatar-pair .avatar { width: 27px; height: 27px; border: 2px solid var(--surface); }
.avatar-pair .avatar + .avatar { margin-left: -7px; }

.app-main { margin-left: var(--side-width); min-width: 0; }
.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: #fffbf7;
}
.topbar-actions, .breadcrumb, .topbar-date { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breadcrumb { color: var(--muted); font-size: 13px; }
.breadcrumb .icon, .topbar-date .icon { width: 15px; height: 15px; }
.breadcrumb strong { color: var(--ink); }
.topbar-date { color: var(--muted); font-size: 12px; white-space: nowrap; margin-right: 7px; }
.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 4px 6px;
  max-width: 190px;
}
.profile-button:hover { background: var(--pink); }
.profile-button .icon { color: var(--rose); width: 14px; height: 14px; }
.profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.mobile-brand, .mobile-nav { display: none; }

.content { width: min(100%, 1260px); min-height: 55vh; margin: 0 auto; padding: 28px 34px 48px; }
.starting { min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center; }
.starting h1 { font: 700 clamp(22px, 4vw, 31px)/1.3 var(--serif); }
.starting p, .loading { color: var(--muted); }
.loading { padding: 44px 12px; text-align: center; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  min-height: 41px;
  padding: 9px 14px;
  border: 1px solid transparent;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: background .16s, border-color .16s;
}
.button .icon { width: 17px; height: 17px; }
.button.primary { background: var(--rose); color: white; border-color: var(--rose); }
.button.primary:hover { background: var(--rose-dark); border-color: var(--rose-dark); }
.button.secondary { color: var(--rose-dark); background: #fbf0ee; border-color: #f2dedf; }
.button.secondary:hover { background: #f7e4e5; border-color: #edd1d5; }
.button.soft { background: #fff7f0c7; color: var(--rose-dark); border-color: #fff7f0; }
.button.soft:hover { background: #fff8f3; }
.button.light { color: var(--rose-dark); background: #fff6eb; border-color: #fff6eb; }
.button.light:hover { background: white; border-color: white; }
.button.danger { color: #9c3045; }
.button.danger:hover { background: #f9e4e6; }
.button.danger-solid { color: white; background: #a62f47; }
.button.danger-solid:hover { background: #90263b; }
.button.wide { width: 100%; min-height: 48px; }
.button.status-button { min-height: 33px; padding: 4px 8px; border-color: var(--line); color: var(--muted); font-size: 11px; }
.button.status-button.sage { background: var(--sage); color: var(--green); border-color: #dde7d9; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 9px;
}
.icon-button .icon { width: 17px; height: 17px; }
.icon-button:hover { border-color: var(--line); background: #faf0ed; color: var(--rose); }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--rose-dark); font-size: 12px; font-weight: 700; }
.text-link .icon { width: 15px; height: 15px; }
.text-link:hover { text-decoration: underline; }

.hero {
  isolation: isolate;
  position: relative;
  min-height: 321px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-radius: 23px;
  border: 1px solid #efceca;
  background: linear-gradient(110deg, #fae5e1 0%, #f8ddd9 55%, #f4cfca 100%);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 13% 5%, #fff3e7bb, transparent 62%);
}
.hero-art { position: absolute; z-index: -1; width: min(62%, 625px); height: auto; right: 0; bottom: 0; pointer-events: none; }
.hero-content { min-width: 0; padding: 31px 37px 34px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #bd75854a;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--rose-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.eyebrow .icon { width: 13px; height: 13px; }
.hero h1 {
  margin: 13px 0 9px;
  font: 750 clamp(38px, 4.2vw, 60px)/1.16 var(--serif);
  letter-spacing: .015em;
  color: #572d39;
}
.hero h1 span { color: var(--rose); }
.hero p { margin-bottom: 18px; color: #784e57; font-size: 14px; }
.hero-number { position: absolute; bottom: 15px; right: 19px; color: #70414b; font-size: 9px; letter-spacing: .15em; }
.counter {
  width: fit-content;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 11px;
  background: #fff9f1c9;
  color: #70414b;
  font-size: 12px;
}
.counter .icon { color: var(--rose); width: 16px; height: 16px; }
.counter strong { color: var(--rose-dark); font: 700 21px/1.15 Georgia, serif; }

.checkin-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  margin-top: 13px;
  padding: 10px 13px;
  border: 1px solid #dfe7da;
  border-radius: 16px;
  background: #f2f5ec;
}
.checkin-summary:hover { border-color: #bdcdbb; }
.checkin-summary > div { flex: 1; min-width: 0; }
.checkin-summary h2 { font-size: 16px; }
.checkin-summary-members { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 11px; }
.checkin-summary-members strong { color: var(--green); }
.checkin-summary .text-link { flex: 0 0 auto; color: var(--green); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 27px 0 11px; }
.section-heading h2 { font: 750 25px/1.25 var(--serif); }
.section-heading time { color: var(--muted); font-size: 12px; }
.quick-grid, .memory-grid, .metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.quick-card { display: flex; flex-direction: column; align-items: flex-start; padding: 17px; }
.tile-icon {
  display: inline-grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border-radius: 12px;
  flex: 0 0 auto;
}
.tile-icon .icon { width: 19px; height: 19px; }
.quick-card h3 { margin-top: 9px; font-size: 17px; font-weight: 800; }
.quick-title .muted { font-size: 11px; }
.quick-money {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 13px 0;
}
.quick-money > div { min-width: 0; }
.quick-money span { display: block; font-size: 10px; color: var(--muted); }
.quick-money strong { font: 700 clamp(16px, 1.6vw, 21px)/1.2 Georgia, serif; overflow-wrap: anywhere; }
.quick-middle { flex: 1; width: 100%; margin: 13px 0; font-size: 12px; min-height: 34px; }
.quick-event { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.quick-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-event time { flex: 0 0 auto; color: var(--rose); font-size: 11px; font-variant-numeric: tabular-nums; }
.today-meal { color: var(--rose-dark); font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.card-actions { width: 100%; margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; }
.card-actions .button { min-height: 33px; padding: 5px 9px; font-size: 11px; }
.card-actions .button .icon { width: 14px; height: 14px; }

.memory-tile { display: flex; align-items: center; gap: 10px; border: 1px solid #3c202010; border-radius: 16px; padding: 10px 12px; min-width: 0; }
.memory-tile:hover { border-color: currentColor; }
.memory-tile .tile-icon { width: 35px; height: 35px; background: #fffaf5a6; }
.memory-tile .tile-icon .icon { width: 16px; height: 16px; }
.memory-tile > span:nth-child(2) { flex: 1; min-width: 0; }
.memory-tile strong, .memory-tile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memory-tile small { color: #665858; font-size: 11px; }
.memory-tile > .icon { width: 15px; height: 15px; }

.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 13px; padding: 4px 0 21px; }
.page-intro h1 { font: 750 clamp(32px, 4vw, 47px)/1.2 var(--serif); letter-spacing: .025em; }
.page-intro p:last-child { margin-top: 7px; color: var(--muted); }
.page-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.page-tools h2, .panel-header h2 { font-size: 18px; font-weight: 800; }
.page-tools p, .panel-header p { font-size: 12px; }
.date-controls { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.date-controls .icon-button { width: 30px; height: 34px; }
.date-control { border: 0; color: var(--ink); background: transparent; min-width: 0; max-width: 145px; font-size: 13px; padding: 3px; }
.metric { min-width: 0; border: 1px solid #6338360b; border-radius: 17px; padding: 15px 17px; }
.metric span { display: block; font-size: 12px; font-weight: 700; }
.metric strong { display: block; margin-top: 5px; font: 700 clamp(23px, 3vw, 39px)/1.15 Georgia, serif; overflow-wrap: anywhere; }
.list-panel { margin-top: 15px; padding: 16px 19px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 0 10px; }
.segments { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; background: #f9f3ee; }
.segments button { border: 0; border-radius: 7px; color: var(--muted); background: transparent; padding: 5px 9px; white-space: nowrap; font-weight: 700; font-size: 12px; }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--rose-dark); box-shadow: 0 2px 5px #53292c0f; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 11px; border-top: 1px solid var(--line); padding: 10px 0; min-width: 0; }
.row:last-child { padding-bottom: 2px; }
.row .tile-icon { width: 36px; height: 36px; }
.row .tile-icon .icon { width: 16px; height: 16px; }
.row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-main strong, .row-main small { display: block; }
.row-main small { margin-top: 1px; color: var(--muted); font-size: 12px; }
.amount { font: 700 17px/1.15 Georgia, serif; text-align: right; flex: 0 1 auto; overflow-wrap: anywhere; }
.empty { display: grid; justify-items: center; text-align: center; gap: 7px; padding: 32px 12px; color: var(--ink); }
.empty p { max-width: 410px; color: var(--muted); font-size: 13px; }
.empty .button { margin-top: 5px; }
.empty-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 2px; background: #f7eae6; color: var(--rose); border-radius: 15px; }

.calendar-panel { padding: 15px 17px 17px; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.day-cell {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  padding: 8px 3px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcf8f3;
  color: var(--ink);
}
.day-cell small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.day-cell strong { font: 700 22px/1.1 Georgia, serif; }
.day-cell.is-today { border-color: #db9da6; }
.day-cell[aria-pressed="true"] { background: #f8e4e6; color: var(--rose-dark); border-color: #e2a5ae; }
.day-cell[aria-pressed="true"] small { color: var(--rose-dark); }
button.day-cell:hover { background: #f9eeea; }
button.day-cell[aria-pressed="true"]:hover { background: #f8e4e6; }
.day-cell i { display: block; width: 4px; height: 4px; border-radius: 50%; margin-top: 3px; }
.day-cell i.has-event { background: var(--rose); }
.toggle-check {
  width: 28px; height: 28px; flex: 0 0 auto; display: inline-grid; place-items: center;
  border: 1px solid #dbcec6; color: transparent; border-radius: 8px; background: #fffaf5;
}
.toggle-check .icon { width: 15px; height: 15px; }
.toggle-check:hover { color: #8a7f73; }
.toggle-check[aria-pressed="true"] { background: var(--sage); color: var(--green); border-color: #bdcdbb; }
.completed .row-main strong, .completed > span:not(.tag) { color: var(--muted); text-decoration: line-through; }
.event-time { color: var(--rose-dark); flex: 0 0 37px; font-size: 12px; font-variant-numeric: tabular-nums; }
.schedule-calendar { min-height: 36px; }
.tag { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; }

.checkin-day { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.checkin-day time, .checkin-week-label { color: var(--muted); font-size: 12px; }
.checkin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.checkin-person { min-width: 0; padding: 14px 16px; }
.checkin-person-head, .checkin-task { display: flex; align-items: center; gap: 10px; }
.checkin-person-head { padding-bottom: 10px; }
.checkin-person-head h2 { font-size: 17px; }
.checkin-task { min-height: 62px; padding: 8px 0; border-top: 1px solid var(--line); }
.checkin-task .tile-icon { width: 36px; height: 36px; }
.checkin-task .button, .checkin-person-foot .button { min-height: 44px; }
.checkin-task .button { min-width: 70px; }
.checkin-pending { background: #f4eee8; color: var(--muted); }
.checkin-person-foot { display: flex; justify-content: flex-end; padding-top: 6px; }
.checkin-licensed {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 11px;
  padding: 11px;
  background: var(--sage);
  color: var(--green);
}
.checkin-licensed small { display: block; }
.checkin-history .icon-button { width: 39px; height: 40px; }
.checkin-history .icon-button:disabled { cursor: default; opacity: .4; }
.checkin-week-label { min-width: 38px; text-align: center; }
.checkin-history-row { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.checkin-history-row time { flex: 0 0 auto; min-width: 90px; color: var(--muted); font-size: 12px; }
.checkin-history-row > div { display: flex; flex-wrap: wrap; gap: 5px; }
.checkin-history .empty { padding-block: 21px; }

.food-feature { position: relative; isolation: isolate; min-height: 192px; overflow: hidden; border-radius: 21px; background: linear-gradient(115deg, #713546, #a55264); color: #fff6ec; }
.food-copy { padding: 23px 26px; min-width: 0; }
.food-copy .overline { color: #ffe4cf; }
.food-copy h2 { margin: 2px 0 6px; font: 750 clamp(27px, 4vw, 42px)/1.2 var(--serif); overflow-wrap: anywhere; }
.food-copy p:not(.overline) { max-width: 67%; color: #fff1e5; font-size: 13px; overflow-wrap: anywhere; }
.food-copy .button, .food-badge { margin-top: 13px; }
.food-decoration {
  position: absolute; z-index: -1; right: 22px; top: 50%; transform: translateY(-50%) rotate(-11deg);
  width: clamp(105px, 20vw, 215px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #fff5e34d; outline: 1px dashed #ffe6cb41; outline-offset: 9px;
  background: radial-gradient(circle, #fff1db14 58%, #fff2d600 59%); color: #fff1dc9c;
}
.food-decoration .icon { width: 32%; height: 32%; }
.food-badge { display: inline-flex; gap: 5px; align-items: center; padding: 5px 9px; border-radius: 999px; color: #fff7f1; background: #ffffff1b; font-size: 12px; }
.food-badge .icon { width: 15px; height: 15px; }
.food-week .day-cell { min-height: 59px; padding: 7px 3px; }
.food-week .day-cell strong { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font: 700 12px/1.3 system-ui, sans-serif; }

.life-tabs { display: flex; width: fit-content; max-width: 100%; gap: 4px; border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin-bottom: 14px; background: #f7efe9; }
.life-tabs a { padding: 7px 12px; font-size: 13px; color: var(--muted); border-radius: 8px; font-weight: 700; white-space: nowrap; }
.life-tabs a[aria-current="page"], .life-tabs a:hover { background: var(--surface); color: var(--rose-dark); }
.anniversary-grid, .journal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.anniversary-card, .journal-card { padding: 16px 18px; min-width: 0; overflow-wrap: anywhere; }
.anniversary-top, .journal-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 9px; }
.anniversary-card h3, .journal-card h3 { font: 750 22px/1.3 var(--serif); }
.anniversary-card .muted, .anniversary-note { margin-top: 4px; font-size: 12px; }
.anniversary-count { margin-top: 9px; color: var(--rose-dark); }
.anniversary-count strong { font: 700 25px/1.15 Georgia, serif; }
.journal-meta time { color: var(--muted); font-size: 12px; margin-left: auto; }
.journal-meta .icon-button { width: 32px; height: 32px; }
.journal-body { margin: 8px 0 13px; white-space: pre-wrap; }
.journal-author { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.journal-author .avatar { width: 25px; height: 25px; }

.gate {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(25px, 5vw, 69px);
  width: min(100%, 1210px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 25px;
}
.gate-cover {
  isolation: isolate;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(440px, 74vh, 700px);
  overflow: hidden;
  align-self: stretch;
  padding: 25px 28px;
  border: 1px solid #f0cecb;
  border-radius: 24px;
  background: radial-gradient(ellipse at 10% 8%, #fff4e7 0, transparent 62%), linear-gradient(135deg, #fae3df, #efc5c2);
}
.gate-cover .brand { align-self: start; }
.gate-cover .brand-mark { background: #fff5ed; }
.gate-message { margin-top: clamp(32px, 8vh, 105px); }
.gate-message > p { margin: 12px 0 9px; color: #572d39; font: 750 clamp(32px, 4vw, 54px)/1.17 var(--serif); letter-spacing: .02em; }
.gate-subtitle { color: #734a52; font-size: 13px; }
.gate-art { position: absolute; z-index: -1; right: 0; bottom: 0; width: 100%; height: auto; pointer-events: none; }
.gate-caption { margin-top: auto; color: #6b3c49; font-size: 9px; font-weight: 700; letter-spacing: .15em; padding-top: 145px; }
.gate-caption span { margin-right: 4px; }
.gate-content { width: min(100%, 480px); padding: 22px 0; }
.gate-content h1 { margin-bottom: 7px; font: 750 clamp(33px, 4vw, 51px)/1.18 var(--serif); }
.gate-content header > p:last-child, .gate-content > p:not(.overline) { color: var(--muted); }
.gate-content > .button { margin-top: 13px; }
.gate-form, .dialog-form { display: grid; gap: 12px; }
.gate-form { margin-top: 20px; }
.gate-form > .button { margin-top: 4px; }
.fields-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span, .check-field { font-size: 12px; font-weight: 700; color: #5f4b4d; }
.field input, .field textarea, .field select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #e7d9d1;
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fffcfa;
  font-size: 14px;
}
.field input::placeholder, .field textarea::placeholder { color: #827571; }
.field textarea { resize: vertical; }
.check-field { display: flex; align-items: center; gap: 6px; }
.check-field input { width: 16px; height: 16px; accent-color: var(--rose); }
.form-error { color: #8c263b; border-radius: 8px; background: #f9e5e7; padding: 7px 9px; font-size: 12px; }
dialog {
  color: var(--ink);
  background: var(--surface);
  width: min(530px, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 20px;
  box-shadow: 0 24px 90px #3d233548;
  overscroll-behavior: contain;
}
dialog::backdrop { background: #3c24335c; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 14px; }
.dialog-header h2 { font: 750 28px/1.16 var(--serif); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 1px; }
.dialog-actions .danger { margin-right: auto; }
.settings-account { display: flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere; }
.settings-account strong, .settings-account small { display: block; }
.settings-account small { color: var(--muted); }
.settings-links { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 13px; padding-top: 10px; }
.toast {
  position: fixed;
  z-index: 30;
  inset: auto 23px 22px auto;
  max-width: calc(100% - 30px);
  color: #fffaf4;
  background: #496655;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 30px #352d2b24;
  font-size: 13px;
  font-weight: 650;
}
.toast.is-error { background: #883b50; }
.toast a { display: inline-flex; align-items: center; min-height: 35px; padding-inline: 6px; text-decoration: underline; text-underline-offset: 3px; }
.field-hint { color: var(--muted); font-size: 12px; }

@media (max-width: 1080px) {
  :root { --side-width: 207px; }
  .sidebar { padding-inline: 14px; }
  .sidebar .brand-copy strong { font-size: 12px; white-space: nowrap; }
  .content, .topbar { padding-inline: 24px; }
  .hero-content { padding-inline: 29px; }
  .quick-grid, .memory-grid { gap: 10px; }
  .quick-card { padding: 13px; }
}

@media (max-width: 780px) {
  :root { font-size: 14px; }
  .sidebar, .breadcrumb, .topbar-date, .profile-name { display: none; }
  .app-main { margin-left: 0; }
  .topbar {
    height: calc(61px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  }
  .mobile-brand { display: inline-flex; }
  .brand-copy strong { font-size: 13px; }
  .profile-button { gap: 4px; min-height: 44px; padding-inline: 4px; }
  .content { padding: 16px 16px calc(86px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    z-index: 10;
    position: fixed;
    inset: auto 0 0;
    background: #fffcf8;
    border-top: 1px solid var(--line);
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav .nav-link { flex-direction: column; justify-content: center; gap: 3px; min-height: 49px; padding: 4px 1px; font-size: 10px; }
  .mobile-nav .icon { width: 18px; height: 18px; }
  .toast { inset: auto 15px calc(72px + env(safe-area-inset-bottom)) 15px; width: fit-content; }
  .gate { display: block; max-width: 610px; min-height: 100svh; padding: 12px 15px 28px; }
  .gate-cover { min-height: 224px; border-radius: 19px; padding: 14px 17px; }
  .gate-cover .brand-mark { width: 36px; height: 36px; }
  .gate-message { margin-top: 19px; }
  .gate-message > p { font-size: clamp(27px, 6vw, 36px); margin: 6px 0; }
  .gate-subtitle { font-size: 11px; }
  .gate-caption { display: none; }
  .gate-art { width: min(59%, 310px); }
  .gate-content { width: 100%; padding: 17px 2px; }
  .gate-content h1 { font-size: 34px; }
  .gate-form { margin-top: 15px; }
  .field input, .field textarea, .field select, .date-control { font-size: 16px; }
  .date-control { max-width: 130px; }
}

@media (max-width: 540px) {
  .hero { min-height: 258px; border-radius: 19px; }
  .hero-art { width: 78%; max-width: 330px; right: -36px; opacity: .76; }
  .hero-content { padding: 20px 16px 24px; }
  .hero h1 { font-size: clamp(32px, 9.8vw, 45px); margin: 11px 0 8px; }
  .hero p { max-width: 220px; margin-bottom: 12px; font-size: 12px; }
  .hero-number { bottom: 8px; right: 11px; font-size: 8px; }
  .section-heading { margin-top: 21px; }
  .section-heading h2 { font-size: 23px; }
  .section-heading time { font-size: 10px; text-align: right; }
  .quick-grid, .memory-grid, .anniversary-grid, .journal-grid { grid-template-columns: 1fr; gap: 9px; }
  .quick-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    padding: 12px;
    border-radius: 16px;
  }
  .quick-card > .tile-icon { grid-row: 1 / 3; width: 37px; height: 37px; }
  .quick-title { grid-column: 2; grid-row: 1; }
  .quick-card h3 { margin-top: 0; font-size: 16px; }
  .quick-money, .quick-middle { grid-column: 2 / -1; grid-row: 2; margin: 5px 0 0; min-height: 0; }
  .quick-money { grid-template-columns: repeat(2, minmax(0, 100px)); }
  .quick-money strong { font-size: 17px; }
  .card-actions { grid-column: 3; grid-row: 1; flex-wrap: nowrap; justify-content: end; align-self: center; margin: 0; gap: 6px; }
  .card-actions .text-link { min-height: 40px; font-size: 11px; white-space: nowrap; }
  .card-actions .text-link .icon { width: 12px; height: 12px; }
  .card-actions .button { min-height: 44px; padding: 5px 7px; }
  .page-intro { padding: 3px 0 15px; align-items: start; }
  .page-intro h1 { font-size: clamp(25px, 7vw, 36px); }
  .page-intro p:last-child { font-size: 12px; margin-top: 5px; }
  .page-intro > .button { min-height: 44px; font-size: 12px; padding: 7px 9px; margin-top: 15px; }
  .page-intro > .button .icon { width: 14px; height: 14px; }
  .metric-grid { gap: 6px; }
  .metric { padding: 10px 7px; border-radius: 11px; }
  .metric span { font-size: 10px; }
  .metric strong { font-size: clamp(15px, 4.6vw, 23px); }
  .list-panel, .calendar-panel { padding: 12px 10px; border-radius: 15px; }
  .panel-header h2, .page-tools h2 { font-size: 15px; }
  .panel-header p { font-size: 11px; }
  .segments button { min-height: 36px; padding: 5px 6px; font-size: 11px; }
  .row { gap: 6px; }
  .row .tile-icon { width: 31px; height: 31px; border-radius: 9px; }
  .row .icon-button { width: 40px; height: 44px; }
  .toggle-check { position: relative; }
  .toggle-check::before { content: ""; position: absolute; inset: -7px; }
  .row-main strong { font-size: 13px; }
  .row-main small { font-size: 11px; }
  .amount { font-size: 15px; max-width: 36%; }
  .week-strip { gap: 4px; }
  .day-cell { min-height: 62px; border-radius: 8px; }
  .day-cell strong { font-size: 18px; }
  .day-cell small { font-size: 9px; }
  .event-time { font-size: 11px; flex-basis: 32px; }
  .tag { padding: 3px 5px; font-size: 10px; }
  .checkin-grid { grid-template-columns: 1fr; gap: 9px; }
  .checkin-person { padding: 12px; border-radius: 15px; }
  .checkin-day time { font-size: 11px; }
  .checkin-summary { padding-inline: 10px; gap: 9px; }
  .checkin-summary .tile-icon { width: 36px; height: 36px; }
  .checkin-history-row time { min-width: 77px; font-size: 11px; }
  .food-copy { padding: 17px 14px; }
  .food-copy p:not(.overline) { max-width: 76%; }
  .food-decoration { right: -16px; opacity: .58; }
  .food-week .day-cell strong { font-size: 10px; }
  dialog { padding: 15px; }
}

@media (max-width: 350px) {
  .content { padding-inline: 10px; }
  .gate { padding-inline: 9px; }
  .hero p { max-width: 200px; }
  .section-heading time { max-width: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
