/* Japan 2026 · the Ford family trip app. Design: ../../app-design/canvas/*.dc.html */
:root {
  --ground: #F3F1EC;
  --ink: #1B1A19;
  --accent: #C8452B;
  --muted: #6B6862;
  --muted-2: #4A4744;
  --line: #BDBAB4;
  --chip: #D9D6D0;
  --pink: #F6D6E8;
  --blue: #D4E6F5;
  --peach: #FBE3D2;
  --mint: #D6EFE3;
  --lilac: #DCD6F7;
  --warm: #F7F0E7;
  --yes-bg: #FBECE8;
  --yes-ink: #9A2A17;
  --green: #2F5A3F;
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --top: max(54px, calc(var(--sat) + 14px));
  --tabs: calc(100px + var(--sab));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { min-height: 100vh; min-height: 100dvh; max-width: 520px; margin: 0 auto; position: relative; }
.page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-bottom: var(--tabs); background: var(--ground); }
.page.no-tabs { padding-bottom: 0; }
.wrap { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 12px; }

/* --- buttons and chips -------------------------------------------------- */
.rb { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px; background: #FFF; color: var(--ink); border: 0; padding: 0; cursor: pointer; flex-shrink: 0; }
.rb.glass { background: rgba(255,255,255,0.75); }
.rb.soft { background: var(--ground); }
.rb.dim { color: var(--muted); }
.rb img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--ground); color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.chip.booked { background: var(--ink); color: #FFF; }
.chip.needs-yes { background: var(--yes-bg); color: var(--yes-ink); }
.chip.optional, .chip.plan { background: var(--ground); color: var(--muted); }
.ink .chip.optional, .ink .chip.plan { background: rgba(255,255,255,0.14); color: #FFF; }
.chev { flex-shrink: 0; color: var(--line); }
.btn { display: flex; align-items: center; justify-content: center; height: 58px; border-radius: 18px; background: var(--accent); color: #FFF; font-size: 17px; font-weight: 800; border: 0; width: 100%; cursor: pointer; }
.btn:disabled { opacity: 0.55; }
.btn.small { height: 50px; border-radius: 16px; font-size: 15px; }
.linkish { align-self: center; font-size: 14px; font-weight: 700; color: #3C5A8A; min-height: 44px; display: flex; align-items: center; background: none; border: 0; cursor: pointer; }
.card { background: #FFF; border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ink { background: var(--ink); color: #FFF; }
.row { display: flex; align-items: center; gap: 14px; }
.datebox { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 14px; background: var(--ground); color: var(--ink); flex-shrink: 0; }
.datebox .d { font-size: 9px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.datebox .n { font-size: 20px; font-weight: 800; line-height: 1; }
.ink .datebox { background: #FFF; }
.ink .datebox .d { color: var(--ink); }
.h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.sec { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.sec a { font-size: 12px; font-weight: 700; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.foot { margin-top: auto; padding: 24px 20px 8px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }
.banner { margin: 0 20px; background: #FFF4D6; color: #5C470C; font-size: 12px; font-weight: 700; padding: 10px 14px; border-radius: 14px; display: flex; align-items: center; gap: 8px; }
.banner[hidden] { display: none; }
.empty { font-size: 13px; color: var(--muted); padding: 8px 2px; }
.body-html p { margin: 0 0 8px; }
.body-html p:last-child { margin-bottom: 0; }
.body-html ul, .body-html ol { margin: 4px 0 0; padding-left: 18px; }
.body-html a { font-weight: 700; color: var(--ink); border-bottom: 1.5px solid rgba(27,26,25,0.3); }
.ink .body-html a { color: #FFF; border-color: rgba(255,255,255,0.4); }
.body-html code { font-family: inherit; font-size: 12px; background: rgba(27,26,25,0.06); padding: 1px 5px; border-radius: 6px; }

/* --- top bar ------------------------------------------------------------ */
.topbar { padding: var(--top) 20px 0; display: flex; justify-content: space-between; align-items: center; }
.topbar .label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }

/* --- home --------------------------------------------------------------- */
.greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 14px 20px 0; }
.greet h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #4B6B3A; background: #FFF; padding: 6px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.sync.off { color: var(--yes-ink); }
.hero-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 184px; border-radius: 24px; padding: 18px 20px; overflow: hidden; background: #F6EFE6; flex-shrink: 0; }
.hero-card img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(246,239,230,0) 38%, rgba(246,239,230,0.88) 72%, rgba(246,239,230,0.96) 100%); }
.hero-card > span { position: relative; z-index: 1; }
.hero-card::after { z-index: 0; }
.hero-card .big { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.hero-card .sub { font-size: 13px; font-weight: 600; color: var(--muted-2); }
.today-card { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #FFF; border-radius: 22px; padding: 16px 18px; }
.today-card .t { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.today-card .eyebrow { color: var(--line); }
.today-card .title { font-size: 16px; font-weight: 800; }
.today-card .next { font-size: 12px; color: var(--chip); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legs { display: flex; flex-direction: column; gap: 10px; }
.leg-row { display: flex; align-items: center; gap: 14px; background: #FFF; border-radius: 22px; padding: 14px 16px; min-height: 44px; }
.leg-row img { width: 60px; height: 60px; border-radius: 18px; object-fit: cover; object-position: 78% center; flex-shrink: 0; }
.leg-row .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.leg-row .name { font-size: 17px; font-weight: 800; }
.leg-row .dates { font-size: 12px; font-weight: 600; color: var(--muted); }
.leg-row .sleep { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flights { display: flex; align-items: flex-start; gap: 12px; padding: 8px 6px; min-height: 44px; }
.flights svg { flex-shrink: 0; margin-top: 1px; }
.flights span { font-size: 12px; font-weight: 600; color: var(--muted); flex: 1; line-height: 1.5; }
.flights b { color: var(--ink); }

/* --- hero pages (leg, place) ------------------------------------------- */
.hero { position: relative; height: 300px; flex-shrink: 0; background: var(--warm); border-radius: 0 0 36px 36px; overflow: hidden; }
.hero.place { height: 290px; }
.hero img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero .scrim { position: absolute; left: 0; bottom: 0; width: 78%; height: 65%; background: linear-gradient(90deg, var(--scrim, #F7F0E7) 0%, color-mix(in srgb, var(--scrim, #F7F0E7) 82%, transparent) 55%, transparent 100%); }
.hero .scrim-top { position: absolute; left: 0; right: 0; top: 0; height: 120px; background: linear-gradient(180deg, color-mix(in srgb, var(--scrim, #F7F0E7) 45%, transparent) 0%, transparent 100%); }
.hero .bar { position: relative; padding: var(--top) 20px 0; display: flex; justify-content: space-between; }
.hero.photo img.art { object-position: center; }
.hero.photo .scrim { width: 100%; height: 68%; background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--scrim, #F7F0E7) 40%, transparent) 42%, color-mix(in srgb, var(--scrim, #F7F0E7) 88%, transparent) 80%, var(--scrim, #F7F0E7) 100%); }
.hero.photo .scrim-top { background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, transparent 100%); }
.credit { font-size: 11px; font-weight: 600; color: var(--muted); margin: -8px 0 4px; text-align: right; }
.credit a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.hero .title { position: absolute; left: 20px; right: 110px; bottom: 26px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hero .title h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.hero.place .title h1 { font-size: 30px; line-height: 1.05; }
.hero .title .sub { font-size: 13px; font-weight: 600; color: var(--muted-2); }
.sleep-card .top { display: flex; justify-content: space-between; align-items: center; }
.sleep-card .name { font-size: 18px; font-weight: 800; }
.sleep-card .note { font-size: 13px; color: var(--muted); line-height: 1.45; }
.sleep-card .more { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #3C5A8A; min-height: 44px; }
.day-row { display: flex; align-items: center; gap: 14px; background: #FFF; border-radius: 20px; padding: 12px 14px; min-height: 44px; }
.day-row .datebox { width: 48px; height: 48px; }
.day-row .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.day-row .title { font-size: 15px; font-weight: 800; }
.day-row .sum { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-row.ink .sum { color: var(--chip); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.place-tile { display: flex; flex-direction: column; gap: 10px; border-radius: 20px; padding: 14px; min-height: 44px; }
.place-tile svg { width: 34px; height: 34px; }
.place-tile .name { font-size: 14px; font-weight: 800; }
.place-tile .sub { font-size: 12px; color: var(--muted-2); }

/* --- day ---------------------------------------------------------------- */
.day-head { background: #FFF; border-radius: 0 0 32px 32px; padding: var(--top) 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.day-head .bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.day-head .bar .label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-head .nav { display: flex; gap: 4px; }
.day-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.day-head .meta { display: flex; flex-direction: column; gap: 6px; }
.day-head .meta span { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }
.day-head .pills { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--ground); }
.notice { display: flex; align-items: center; gap: 12px; background: #FFF4D6; border-radius: 16px; padding: 10px 14px; min-height: 44px; }
.notice p { font-size: 13px; font-weight: 700; color: #5C470C; flex: 1; }
.intro { font-size: 14px; color: var(--muted-2); padding: 0 4px; }
.rail { display: flex; gap: 12px; }
.rail .t { width: 48px; flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 14px; line-height: 1.2; }
.rail .t.word { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 16px; }
.block { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; background: #FFF; border-radius: 18px; padding: 14px 16px; min-height: 44px; }
.block.anchor { background: var(--ink); color: #FFF; padding: 16px; gap: 8px; }
.block.optional { background: #FFF; }
.block .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.block .title { font-size: 15px; font-weight: 800; }
.block.anchor .title { font-size: 17px; letter-spacing: -0.01em; }
.block .eyebrow { color: var(--muted-2); }
.block.anchor .eyebrow { color: var(--line); }
.block .text { font-size: 12px; color: var(--muted); line-height: 1.5; }
.block .text.lead { font-size: 14px; color: var(--ink); font-weight: 600; }
.block.anchor .text { color: var(--chip); }
.block.anchor .text.lead { color: #FFF; }
.block .places { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.block .places a { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--ground); }
.block.anchor .places a { background: rgba(255,255,255,0.14); }
.block .yes { align-self: flex-start; margin-top: 4px; width: auto; padding: 0 18px; height: 44px; border-radius: 22px; font-size: 14px; font-weight: 700; }
.block.needs-yes { box-shadow: inset 0 0 0 1.5px #F2C9BE; }
.block .sub { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.4; margin-top: -2px; }
.block.anchor .sub { color: var(--chip); }
.block .facts { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding-top: 10px; border-top: 1px solid #EEEBE5; }
.block.anchor .facts { border-top-color: rgba(255,255,255,0.12); }
.block .frow { display: flex; gap: 10px; align-items: flex-start; }
.block .frow .fi { flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.block .ft { display: block; flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--muted-2); }
.block .ft strong, .block .ft b { color: var(--ink); font-weight: 700; }
.block .ft a { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.block .ft .alt { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.block.anchor .frow .fi { color: var(--line); }
.block.anchor .ft { color: var(--chip); }
.block.anchor .ft strong, .block.anchor .ft b, .block.anchor .ft a { color: #FFF; }
.block.anchor .ft a { text-decoration-color: rgba(255,255,255,0.4); }
.block.anchor .ft .alt { color: var(--line); }
.block .steps { display: flex; flex-direction: column; }
.block .step { display: flex; gap: 10px; align-items: stretch; }
.block .step .dot { width: 16px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.block .step .dot i { display: block; width: 10px; height: 10px; border-radius: 5px; border: 2px solid var(--ink); box-sizing: border-box; margin-top: 4px; }
.block .step .dot em { display: block; flex: 1; width: 2px; background: var(--chip); margin: 3px 0; }
.block .step:last-child .dot i { background: var(--ink); }
.block .step:last-child .dot em { display: none; }
.block .step .ft { padding-bottom: 10px; }
.block .step:last-child .ft { padding-bottom: 0; }
.block.anchor .step .dot i { border-color: #FFF; }
.block.anchor .step:last-child .dot i { background: #FFF; }
.block.anchor .step .dot em { background: rgba(255,255,255,0.25); }
.block .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.block .foot .src { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: auto; text-align: right; }
.block.anchor .foot .src { color: var(--line); }
.pill.ink { background: var(--ink); color: #FFF; }
.pill.yes { background: var(--yes-bg); color: var(--yes-ink); }
.now { display: flex; align-items: center; gap: 8px; margin: -2px 0; }
.now .t { width: 48px; flex-shrink: 0; font-size: 11px; font-weight: 800; color: var(--accent); }
.now .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }
.now .line { flex: 1; height: 0; border-top: 2px dashed var(--accent); }
.private { background: var(--yes-bg); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.private .eyebrow { color: var(--yes-ink); display: flex; align-items: center; gap: 8px; }
.ask { display: flex; align-items: center; gap: 12px; background: #FFF; border-radius: 18px; padding: 10px 14px; min-height: 56px; margin-top: 6px; border: 0; width: 100%; text-align: left; cursor: pointer; }
.ask img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ask .t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ask .t b { font-size: 14px; font-weight: 800; }
.ask .t span { font-size: 12px; color: var(--muted); }

/* --- place -------------------------------------------------------------- */
.onplan { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #FFF; border-radius: 22px; padding: 16px 18px; }
.onplan .t { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.onplan .eyebrow { color: var(--line); }
.onplan .title { font-size: 16px; font-weight: 800; }
.onplan .sub { font-size: 12px; color: var(--chip); }
.fact { display: flex; flex-direction: column; gap: 4px; background: #FFF; border-radius: 18px; padding: 14px; }
.fact .eyebrow { color: var(--muted); letter-spacing: 0.06em; }
.fact .v { font-size: 14px; font-weight: 800; line-height: 1.35; }
.fact .s { font-size: 12px; color: var(--muted); }
.card h2.eyebrow { color: var(--muted); letter-spacing: 0.06em; font-size: 13px; }
.there { display: flex; gap: 12px; align-items: flex-start; }
.there .ic { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; background: var(--blue); flex-shrink: 0; }
.there .ic.pin { background: var(--pink); }
.there p { font-size: 14px; line-height: 1.5; }
.btns { display: flex; gap: 8px; margin-top: 4px; }
.btns a { flex: 1; display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 14px; background: var(--ground); font-size: 14px; font-weight: 800; }
.why p { font-size: 14px; line-height: 1.55; }

/* --- search ------------------------------------------------------------- */
.search-head { padding: var(--top) 20px 8px; display: flex; flex-direction: column; gap: 14px; }
.search-head .bar { display: flex; justify-content: space-between; align-items: center; }
.search-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.search-box { display: flex; align-items: center; gap: 10px; background: #FFF; border-radius: 18px; padding: 0 16px; height: 54px; }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 17px; font-weight: 600; color: var(--ink); min-width: 0; -webkit-appearance: none; appearance: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box button { width: 44px; height: 44px; margin-right: -12px; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.results { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.results h2 { margin: 4px 0 0; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.results h2 + h2, .results .hit + h2 { margin-top: 10px; }
.hit { display: flex; align-items: center; gap: 12px; background: #FFF; border-radius: 16px; padding: 10px 12px; min-height: 44px; }
.hit .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--ground); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.hit .ic svg { width: 24px; height: 24px; }
.hit .ic .d { font-size: 9px; font-weight: 800; color: var(--muted); line-height: 1; }
.hit .ic .n { font-size: 15px; font-weight: 800; line-height: 1; }
.hit .ic img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; object-position: 78% center; }
.hit .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hit .name { font-size: 15px; font-weight: 700; }
.hit .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
mark { background: #FFF1B8; color: inherit; border-radius: 4px; }
.jumps { display: flex; flex-wrap: wrap; gap: 8px; }
.jumps a { font-size: 13px; font-weight: 700; padding: 0 16px; border-radius: 999px; background: #FFF; height: 40px; display: flex; align-items: center; }
.jumps a.on { background: var(--ink); color: #FFF; }

/* --- chat --------------------------------------------------------------- */
.page.chat { height: 100vh; height: 100dvh; min-height: 0; }
.chat-head { background: linear-gradient(150deg, var(--blue) 0%, #E3F3EC 100%); border-radius: 0 0 32px 32px; padding: var(--top) 20px 18px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; flex-shrink: 0; }
.chat-head .sparks { position: absolute; left: 0; top: 0; width: 100%; height: 160px; }
.chat-head .bar { display: flex; justify-content: space-between; align-items: center; position: relative; }
.chat-head .who { display: flex; align-items: center; gap: 14px; position: relative; }
.chat-head .who img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.chat-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.chat-head .role { font-size: 12px; font-weight: 600; color: var(--muted-2); }
.chat-head .online { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--green); }
.chat-head .online i { width: 7px; height: 7px; border-radius: 4px; background: #4B6B3A; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.msg.me { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg.me p { max-width: 78%; background: var(--ink); color: #FFF; border-radius: 20px 20px 6px 20px; padding: 11px 15px; font-size: 15px; line-height: 1.4; font-weight: 500; white-space: pre-wrap; word-wrap: break-word; }
.msg.me .st { font-size: 11px; font-weight: 700; color: var(--muted); padding-right: 6px; }
.msg.me .st.late { color: var(--yes-ink); }
.msg.yuki { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; max-width: 88%; }
.msg.yuki p { background: #FFF; border-radius: 20px 20px 20px 6px; padding: 11px 15px; font-size: 15px; line-height: 1.4; font-weight: 500; word-wrap: break-word; }
.msg.yuki p a { font-weight: 700; border-bottom: 1.5px solid rgba(27,26,25,0.3); }
.msg.yuki .ver { font-size: 11px; font-weight: 700; color: var(--muted); padding-left: 6px; }
.msg.yuki .link { display: flex; align-items: center; gap: 10px; background: #FFF; border-radius: 16px; padding: 8px 10px; min-height: 44px; width: 100%; }
.msg.yuki .link .ic { width: 36px; height: 36px; border-radius: 11px; background: var(--ground); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.msg.yuki .link .ic .d { font-size: 9px; font-weight: 800; color: var(--muted); line-height: 1; }
.msg.yuki .link .ic .n { font-size: 15px; font-weight: 800; line-height: 1; }
.msg.yuki .link .t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.msg.yuki .link .t b { font-size: 14px; font-weight: 800; }
.msg.yuki .link .t span { font-size: 12px; color: var(--muted); }
.typing { display: flex; align-items: center; gap: 10px; }
.typing img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.typing .dots { background: #FFF; border-radius: 20px 20px 20px 6px; padding: 14px 16px; display: flex; gap: 5px; align-items: center; }
.typing .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); animation: bounce 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.typing .dots i:nth-child(3) { animation-delay: 0.3s; }
.typing span { font-size: 11px; font-weight: 700; color: var(--muted); }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }
.composer { padding: 0 16px 6px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.sugg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.sugg::-webkit-scrollbar { display: none; }
.sugg button { font-size: 12px; font-weight: 700; padding: 0 12px; border-radius: 999px; background: #FFF; border: 0; white-space: nowrap; height: 36px; display: flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.composer form { display: flex; align-items: center; gap: 8px; }
.composer input { flex: 1; height: 50px; border: 0; background: #FFF; border-radius: 25px; padding: 0 18px; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--ink); min-width: 0; outline: 0; }
.composer button.send { width: 50px; height: 50px; border-radius: 25px; border: 0; background: var(--accent); color: #FFF; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.composer button.send:disabled { opacity: 0.5; }
.page.chat .foot { margin-top: 0; padding: 4px 20px 0; }

/* --- sign in ------------------------------------------------------------ */
.signin { background: #050505; color: #FFF; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.signin .art { position: absolute; left: 0; top: 0; width: 100%; height: 62%; object-fit: cover; object-position: center top; }
.signin .art-fade { position: absolute; left: 0; right: 0; top: 40%; height: 30%; background: linear-gradient(180deg, rgba(5,5,5,0) 0%, #050505 100%); }
.signin .words { position: relative; margin-top: auto; padding: 0 28px 22px; display: flex; flex-direction: column; gap: 10px; }
.signin h1 { display: flex; align-items: baseline; gap: 12px; line-height: 1; }
.signin h1 .a { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; }
.signin h1 .b { font-size: 26px; font-weight: 600; letter-spacing: 0.02em; color: var(--chip); }
.signin .words p { font-size: 15px; font-weight: 600; color: var(--line); line-height: 1.5; }
.sheet { position: relative; background: #FFF; color: var(--ink); border-radius: 32px 32px 0 0; padding: 26px 24px calc(36px + var(--sab)); display: flex; flex-direction: column; gap: 14px; }
.sheet label { font-size: 13px; font-weight: 700; }
.field { display: flex; align-items: center; gap: 10px; background: var(--ground); border-radius: 18px; padding: 0 18px; height: 58px; }
.field .pre { font-size: 17px; font-weight: 700; color: var(--muted); }
.field input { flex: 1; border: 0; outline: 0; font-family: inherit; font-size: 19px; font-weight: 600; color: var(--ink); background: transparent; min-width: 0; }
.sheet .fine { font-size: 12px; color: var(--muted); line-height: 1.5; text-align: center; }
.err { font-size: 13px; font-weight: 700; color: var(--yes-ink); text-align: center; }
.err:empty { display: none; }

.code-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 24px calc(36px + var(--sab)); background: var(--ground); }
.code-page .bar { padding-top: var(--top); display: flex; align-items: center; justify-content: space-between; }
.code-page .mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 24px 0; }
.code-page h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.code-page .lead { font-size: 15px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.code-page form { display: flex; flex-direction: column; gap: 18px; }
.boxes { display: flex; gap: 8px; position: relative; }
.boxes .box { flex: 1; height: 62px; background: #FFF; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; }
.boxes .box.on { box-shadow: inset 0 0 0 2px var(--accent); }
.boxes input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.01; font-size: 26px; letter-spacing: 2em; border: 0; outline: 0; background: transparent; color: transparent; caret-color: transparent; }
.code-page .resend { text-align: center; font-size: 14px; color: var(--muted); background: none; border: 0; min-height: 44px; cursor: pointer; }
.code-page .resend b { color: #3C5A8A; }
.lockbox { display: flex; align-items: flex-start; gap: 10px; background: #FFF; border-radius: 18px; padding: 14px 16px; }
.lockbox p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.lockbox strong { color: var(--ink); }

/* --- tab bar ------------------------------------------------------------ */
#tabbar { position: fixed; left: 20px; right: 20px; bottom: calc(20px + var(--sab)); height: 66px; max-width: 480px; margin: 0 auto; background: var(--ink); border-radius: 33px; box-shadow: 0 12px 30px rgba(27,26,25,0.22); z-index: 40; }
#tabbar[hidden] { display: none; }
#tabbar .pill { position: absolute; top: 9px; height: 48px; width: 110px; border-radius: 24px; background: #FFF; transition: left 520ms var(--spring); transform-origin: center; }
#tabbar .pill.a { animation: pillA 560ms cubic-bezier(0.2, 0.8, 0.2, 1); }
#tabbar .pill.b { animation: pillB 560ms cubic-bezier(0.2, 0.8, 0.2, 1); }
#tabbar .tab { position: absolute; top: 9px; height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--line); font-size: 13px; font-weight: 800; transition: left 520ms var(--spring), width 520ms var(--spring), color 260ms; }
#tabbar .tab.on { color: var(--ink); }
#tabbar .tab span { opacity: 0; max-width: 0; overflow: hidden; white-space: nowrap; transition: opacity 240ms 160ms, max-width 420ms; }
#tabbar .tab.on span { opacity: 1; max-width: 64px; }
#tabbar .tab svg { flex-shrink: 0; }
@keyframes pillA { 0% { transform: scaleX(1) scaleY(1); } 35% { transform: scaleX(1.16) scaleY(0.9); } 70% { transform: scaleX(0.97) scaleY(1.03); } 100% { transform: scaleX(1) scaleY(1); } }
@keyframes pillB { 0% { transform: scaleX(1) scaleY(1); } 35% { transform: scaleX(1.16) scaleY(0.9); } 70% { transform: scaleX(0.97) scaleY(1.03); } 100% { transform: scaleX(1) scaleY(1); } }

/* --- menu --------------------------------------------------------------- */
#menu { position: fixed; inset: 0; z-index: 30; background: var(--warm); overflow: hidden; visibility: hidden; opacity: 0; transition: opacity 240ms, visibility 0s 240ms; }
#menu.open { visibility: visible; opacity: 1; transition: opacity 240ms; }
#menu .art { position: absolute; left: -110px; bottom: 0; width: 610px; height: 274px; object-fit: cover; object-position: center bottom; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%); mask-image: linear-gradient(180deg, transparent 0%, #000 45%); }
#menu .inner { position: relative; padding: calc(var(--top) + 2px) 90px 0 28px; display: flex; flex-direction: column; gap: 22px; max-width: 520px; margin: 0 auto; }
#menu .me { display: flex; align-items: center; gap: 12px; }
#menu .me .av { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 24px; background: var(--ink); color: #FFF; font-size: 18px; font-weight: 800; }
#menu .me .n { font-size: 17px; font-weight: 800; }
#menu .me .r { font-size: 12px; font-weight: 600; color: var(--muted-2); }
#menu nav { display: flex; flex-direction: column; gap: 2px; }
#menu nav a { display: flex; align-items: center; gap: 14px; height: 44px; font-size: 18px; font-weight: 600; color: var(--muted-2); }
#menu nav a.small { font-size: 14px; color: var(--muted); }
#menu nav a.on { font-size: 20px; font-weight: 800; color: var(--ink); }
#menu nav a i { width: 8px; height: 8px; border-radius: 4px; background: rgba(27,26,25,0.25); flex-shrink: 0; }
#menu nav a.on i { background: var(--accent); }
#menu nav a .r { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
#menu nav hr { border: 0; height: 1px; background: rgba(27,26,25,0.12); margin: 8px 0 8px 22px; }
#menu .peek { position: absolute; left: 318px; top: 40px; width: 390px; height: 100%; background: #FFF; border-radius: 32px; box-shadow: -12px 0 40px rgba(27,26,25,0.18); padding: 24px 0 0 20px; transform: translateX(60px); transition: transform 360ms var(--spring); }
#menu.open .peek { transform: translateX(0); }
#menu .peek .g { display: block; margin-top: 30px; width: 60px; height: 168px; border-radius: 24px 0 0 24px; background: linear-gradient(135deg, var(--lilac) 0%, var(--pink) 100%); }
#menu .peek .k { display: block; margin-top: 18px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
#menu .peek .rb { background: var(--ground); }
#menu .foot { position: absolute; left: 0; right: 0; bottom: calc(96px + var(--sab)); padding: 0 28px; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  #tabbar .pill, #tabbar .tab, #menu .peek { transition: none; }
  #tabbar .pill.a, #tabbar .pill.b { animation: none; }
  .typing .dots i { animation: none; opacity: 0.7; }
}
@media (min-width: 540px) {
  .hero, .day-head, .chat-head { border-radius: 36px; }
  .page { padding-left: 0; }
  #menu .peek { display: none; } /* the peek is pinned at 318px for a phone; once the column is centred it would sit on the nav */
}

/* --- planning meeting --------------------------------------------------- */
.meet-card { display: flex; align-items: center; gap: 14px; background: #FFF; border-radius: 22px; padding: 14px 16px; min-height: 44px; border: 2px solid var(--yes-bg); }
.meet-card .ic { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 16px; background: var(--yes-bg); color: var(--yes-ink); flex-shrink: 0; }
.meet-card .ic svg { width: 22px; height: 22px; }
.meet-card .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.meet-card .eyebrow { color: var(--yes-ink); }
.meet-card .title { font-size: 16px; font-weight: 800; }
.meet-card .sub { font-size: 12px; color: var(--muted); }
.item-row { display: flex; align-items: center; gap: 12px; background: #FFF; border-radius: 20px; padding: 12px 14px; min-height: 44px; }
.item-row.done { opacity: 0.6; }
.item-row .num { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 14px; background: var(--ground); font-size: 15px; font-weight: 800; flex-shrink: 0; }
.item-row .num.soon { background: var(--yes-bg); color: var(--yes-ink); }
.item-row .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.item-row .title { font-size: 15px; font-weight: 800; line-height: 1.25; }
.item-row .sum { font-size: 12px; color: var(--muted-2); line-height: 1.4; }
.item-row .meta { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.pill.soon { background: var(--yes-bg); color: var(--yes-ink); }
.pill svg { vertical-align: -3px; margin-right: 2px; }
.item-body { font-size: 14px; line-height: 1.55; gap: 4px; }
.item-body h3, .item-body h4, .item-body h5 { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.item-body h3:first-child, .item-body h4:first-child { margin-top: 0; }
.item-body ul, .item-body ol { margin: 2px 0 8px; padding-left: 20px; }
.item-body li { margin: 3px 0; }
.item-body li::marker { color: var(--muted); }
.item-body p { margin: 0 0 8px; }
.body-html h3, .body-html h4 { font-size: 14px; font-weight: 800; margin: 10px 0 4px; }
.item-body h3 + ul, .item-body h4 + ul { margin-top: 0; }
.item-row .num svg { width: 20px; height: 20px; }
.body-html img { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; margin: 6px 0 10px; background: var(--ground); }
.body-html h3 img, .body-html h4 img { margin-top: 8px; }
