/* Keel — styles
   Kept to features old Chromium (≈ v70) understands where the hub uses them:
   no flex `gap`, no `inset`, no :is/:where, no aspect-ratio in hub rules. */

:root {
  --bg: #f4eee3;
  --bg-2: #ebe3d4;
  --card: #fffbf4;
  --ink: #13222c;
  --ink-2: #3a4952;
  --muted: #7b7f7e;
  --faint: #a9a79f;
  --line: rgba(19, 34, 44, .09);
  --line-2: rgba(19, 34, 44, .16);

  --sea: #2a687e;
  --sea-deep: #143a4a;
  --sea-night: #0d2733;
  --foam: #dbe9e6;
  --coral: #d5664a;
  --sage: #6c8f76;
  --amber: #d4962a;
  --plum: #86679a;
  --slate: #6d7c88;
  --rose: #c46a86;
  --moss: #8a8f4c;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 1px rgba(19,34,44,.04), 0 6px 18px -8px rgba(19,34,44,.18);
  --shadow-lift: 0 2px 2px rgba(19,34,44,.05), 0 18px 40px -16px rgba(19,34,44,.32);
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --spring: cubic-bezier(.2, 1.25, .35, 1);
  --ease: cubic-bezier(.25, .8, .25, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Paper grain */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 1000; opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .27  0 0 0 0 .22  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ───────── Layout ───────── */
#app { max-width: 560px; margin: 0 auto; padding: calc(14px + var(--safe-top)) 16px calc(110px + var(--safe-bottom)); }
.view-enter > * { animation: rise .55s var(--ease) both; }
.view-enter > *:nth-child(2) { animation-delay: .05s; }
.view-enter > *:nth-child(3) { animation-delay: .1s; }
.view-enter > *:nth-child(4) { animation-delay: .15s; }
.view-enter > *:nth-child(5) { animation-delay: .2s; }
.view-enter > *:nth-child(6) { animation-delay: .25s; }
.view-enter > *:nth-child(n+7) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0; line-height: 1; }
h1.display { font-size: 46px; }
h2.sec {
  font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0;
  display: flex; align-items: baseline; justify-content: space-between;
}
h2.sec small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
section { margin-top: 28px; }
section > h2.sec { margin-bottom: 12px; }
.page-head { padding: 8px 2px 4px; display: flex; align-items: flex-end; justify-content: space-between; }
.page-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 30em; }
.muted { color: var(--muted); }
.empty {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 18px; color: var(--muted);
  text-align: center; font-size: 14px;
}
.empty b { color: var(--ink-2); font-weight: 600; }

/* ───────── Hero with tide ───────── */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; color: #f6efe2;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(255,214,170,.28), transparent 55%),
    linear-gradient(170deg, #1d4d60 0%, #143a4a 55%, #0f2f3c 100%);
  padding: 18px 20px 22px; min-height: 236px;
  box-shadow: var(--shadow-lift);
}
.hero-top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; }
.hero .eyebrow { color: rgba(246,239,226,.7); }
.hero h1 { position: relative; z-index: 3; font-size: 50px; margin-top: 14px; }
.hero h1 em { font-style: italic; color: #f3c9a4; }
.hero .greet { position: relative; z-index: 3; margin: 10px 0 0; font-size: 15px; color: rgba(246,239,226,.86); max-width: 22em; }
.hero .greet b { font-weight: 600; color: #fff; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); color: inherit; transition: background .2s;
}
.icon-btn:active { background: rgba(255,255,255,.2); }
.light-btn { background: rgba(19,34,44,.06); }
.sync-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #8fc2a6; vertical-align: middle; }
.sync-dot.off { background: #e0b25e; }
.sync-dot.err { background: #ef8b6f; }

.tide { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; z-index: 1; pointer-events: none; }
.tide .water { position: absolute; left: 0; right: 0; bottom: 0; transition: height 1.6s var(--ease); opacity: var(--wo, .16); }
.tide .wave { position: absolute; left: 0; top: -22px; width: 200%; height: 26px; }
.tide .wave path { stroke: none; }
.tide .w1 { animation: drift 11s linear infinite; }
.tide .w2 { animation: drift 7s linear infinite reverse; top: -28px; opacity: .45; }
.tide .body { position: absolute; left: 0; right: 0; top: 3px; bottom: 0; }
.tide .w1, .tide .body { z-index: 1; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tide-tag {
  position: absolute; right: 18px; bottom: 14px; z-index: 3; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: rgba(246,239,226,.82);
}
.tide-tag i { font-style: normal; font-family: var(--serif); font-size: 22px; letter-spacing: 0; text-transform: none; margin-left: 6px; color: #fff; }

/* ───────── Brief ───────── */
.brief {
  position: relative; margin-top: 16px; padding: 16px 18px 16px 46px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  font-family: var(--serif); font-size: 21px; line-height: 1.22; color: var(--ink);
}
.brief .spark { position: absolute; left: 15px; top: 18px; color: var(--amber); }
.brief .spark svg { width: 20px; height: 20px; animation: twinkle 3.2s ease-in-out infinite; }
.brief small { display: block; margin-top: 8px; font-family: var(--sans); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.82) rotate(18deg); opacity: .7; } }

/* ───────── Items ───────── */
.list { display: flex; flex-direction: column; }
.list > * + * { margin-top: 8px; }
.item {
  position: relative; display: flex; align-items: flex-start; background: var(--card); border-radius: var(--radius);
  padding: 13px 14px 13px 12px; box-shadow: var(--shadow); overflow: hidden;
  transition: transform .45s var(--ease), opacity .45s var(--ease), max-height .4s var(--ease) .25s, padding .4s var(--ease) .25s, margin .4s var(--ease) .25s;
  max-height: 200px;
}
.item::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, var(--sea)); }
.item.leaving { transform: translateX(40%); opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0 !important; }
.tick {
  flex: 0 0 auto; position: relative; width: 28px; height: 28px; margin: 0 12px 0 4px; border-radius: 50%;
  color: var(--c, var(--sea));
}
.tick svg { width: 28px; height: 28px; overflow: visible; }
.tick .ring { fill: transparent; stroke: currentColor; stroke-width: 1.6; opacity: .55; transition: fill .3s, opacity .3s; }
.tick .chk { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .32s var(--ease) .08s; }
.tick::after { content: ''; position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; transform: scale(1); }
.tick.on .ring { fill: currentColor; opacity: 1; }
.tick.on .chk { stroke-dashoffset: 0; }
.tick.on::after { animation: ripple .7s var(--ease); }
@keyframes ripple { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
.item-body { flex: 1 1 auto; min-width: 0; text-align: left; }
.item-title { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.item-meta { margin-top: 4px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; }
.item-meta > * { margin-right: 8px; margin-bottom: 2px; }
.due { font-weight: 700; color: var(--ink-2); }
.due.late { color: var(--coral); }
.due.today { color: var(--sea); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: rgba(42,104,126,.1); color: var(--sea); }
.tag.coral { background: rgba(213,102,74,.12); color: var(--coral); }
.tag.amber { background: rgba(212,150,42,.14); color: #a8721a; }
.chip { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; }
.owner-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--c); color: #fff; }
.more-link { display: block; text-align: center; padding: 10px; font-size: 13px; font-weight: 600; color: var(--sea); }

/* ───────── Schedule ───────── */
.timeline { position: relative; padding-left: 16px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line-2); }
.ev { position: relative; display: flex; padding: 7px 0; }
.ev::before { content: ''; position: absolute; left: -16px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--c, var(--slate)); }
.ev.now::before { background: var(--c); box-shadow: 0 0 0 4px rgba(42,104,126,.15); }
.ev-time { flex: 0 0 62px; font-size: 13px; font-weight: 700; color: var(--ink-2); padding-top: 1px; font-variant-numeric: tabular-nums; }
.ev-title { font-size: 14.5px; font-weight: 500; }
.ev-sub { font-size: 12px; color: var(--muted); }
.ev.past { opacity: .45; }

/* ───────── Handled ───────── */
.handled {
  background: linear-gradient(160deg, #eef3ee, #e3ece6); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden;
}
.handled .big { font-family: var(--serif); font-size: 56px; line-height: .9; color: var(--sea-deep); }
.handled .row { display: flex; align-items: flex-end; justify-content: space-between; }
.handled ul { list-style: none; margin: 14px 0 0; padding: 0; }
.handled li { font-size: 13.5px; padding: 5px 0; border-top: 1px solid rgba(19,34,44,.07); display: flex; justify-content: space-between; }
.handled li span:last-child { color: var(--muted); font-size: 12px; white-space: nowrap; margin-left: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; border-radius: 99px;
  font-weight: 700; font-size: 14px; background: var(--ink); color: var(--bg); transition: transform .2s var(--spring), opacity .2s;
  font-family: var(--sans); letter-spacing: 0; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn .ic { width: 18px; height: 18px; margin-right: 7px; }
.btn.ghost { background: rgba(19,34,44,.07); color: var(--ink); }
.btn.sea { background: var(--sea); color: #fff; }
.btn.coral { background: var(--coral); color: #fff; }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.loading { pointer-events: none; }
.btn.loading::after { content: ''; width: 14px; height: 14px; margin-left: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; }
.btn-row > * { margin: 0 8px 8px 0; }

/* ───────── Tabs ───────── */
#tabs {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-bottom)); transform: translateX(-50%);
  width: calc(100% - 28px); max-width: 420px; height: 66px; z-index: 50;
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(255, 251, 244, .82); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-radius: 24px; box-shadow: 0 10px 40px -12px rgba(19,34,44,.35), inset 0 0 0 1px rgba(255,255,255,.6);
}
.tab { display: flex; flex-direction: column; align-items: center; width: 64px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); transition: color .2s; }
.tab .ic { width: 22px; height: 22px; margin-bottom: 3px; transition: transform .35s var(--spring); }
.tab.on { color: var(--ink); }
.tab.on .ic { transform: translateY(-2px); }
.tab .pip { width: 4px; height: 4px; border-radius: 50%; background: var(--coral); margin-top: 2px; opacity: 0; transition: opacity .2s; }
.tab.on .pip { opacity: 1; }
.fab {
  width: 56px; height: 56px; border-radius: 20px; margin-top: -26px;
  background: linear-gradient(160deg, #24586c, #123444); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(20,58,74,.7); position: relative; transition: transform .25s var(--spring);
}
.fab::after { content: ''; position: absolute; left: -5px; top: -5px; right: -5px; bottom: -5px; border-radius: 24px; border: 1.5px solid rgba(42,104,126,.35); animation: breathe 3.6s ease-in-out infinite; }
.fab:active { transform: scale(.92) rotate(-8deg); }
.fab .ic { width: 26px; height: 26px; stroke-width: 2; }
@keyframes breathe { 0%,100% { opacity: 0; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }

/* ───────── Sheets ───────── */
.scrim { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(12, 26, 33, .38); z-index: 200; opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 201; margin: 0 auto; max-width: 560px;
  max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 18px calc(24px + var(--safe-bottom));
  transform: translateY(105%); transition: transform .5s var(--spring); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.35);
}
.sheet.on { transform: none; }
.sheet .handle { width: 40px; height: 4.5px; border-radius: 99px; background: var(--line-2); margin: 2px auto 14px; }
.sheet h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 4px 0 6px; line-height: 1.05; }
.sheet .sub { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 1.5px solid var(--line-2); background: var(--card); border-radius: var(--radius-sm); padding: 11px 13px; outline: none;
  transition: border-color .2s, box-shadow .2s; font-size: 16px;
}
.input:focus { border-color: var(--sea); box-shadow: 0 0 0 4px rgba(42,104,126,.12); }
textarea.input { resize: none; min-height: 110px; line-height: 1.45; }
.capture-box { font-family: var(--serif); font-size: 22px !important; line-height: 1.3 !important; min-height: 130px !important; }
.seg { display: flex; background: rgba(19,34,44,.06); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; height: 36px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(19,34,44,.12); }
.chips-pick { display: flex; flex-wrap: wrap; }
.chips-pick button {
  margin: 0 6px 6px 0; height: 34px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line-2);
  font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; transition: all .2s;
}
.chips-pick button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.chips-pick button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.two { display: flex; }
.two > * { flex: 1; min-width: 0; }
.two > * + * { margin-left: 10px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.check-list li.done span { text-decoration: line-through; color: var(--muted); }
.mini-tick { width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid var(--line-2); margin-right: 10px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.mini-tick.on { background: var(--sea); border-color: var(--sea); color: #fff; }
.mini-tick .ic { width: 14px; height: 14px; stroke-width: 2.6; }

.capture-tools { display: flex; align-items: center; margin: 10px 0 14px; }
.capture-tools > * { margin-right: 8px; }
.tool { height: 40px; padding: 0 14px; border-radius: 99px; background: rgba(19,34,44,.06); display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; }
.tool .ic { width: 18px; height: 18px; margin-right: 6px; }
.tool.on { background: var(--coral); color: #fff; }
.tool.live { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(213,102,74,.5); } 50% { box-shadow: 0 0 0 8px rgba(213,102,74,0); } }
.thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow); }
.parsed { border-radius: var(--radius); background: var(--card); padding: 14px; box-shadow: var(--shadow); margin-bottom: 10px; animation: rise .45s var(--ease) both; }
.parsed .input { padding: 8px 10px; font-size: 15px; }
.parsed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.shimmer {
  height: 82px; border-radius: var(--radius); margin-bottom: 10px;
  background: linear-gradient(100deg, var(--bg-2) 30%, #f7f1e6 50%, var(--bg-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ───────── Toast ───────── */
#toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translate(-50%, 20px); z-index: 300;
  background: var(--ink); color: var(--bg); border-radius: 99px; padding: 10px 10px 10px 18px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; opacity: 0; pointer-events: none; transition: all .35s var(--spring); white-space: nowrap; box-shadow: var(--shadow-lift);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { margin-left: 12px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.14); font-weight: 700; font-size: 13px; }
#toast:not(.has-act) { padding-right: 18px; }

/* ───────── Radar ───────── */
.scope-wrap { margin-top: 14px; background: linear-gradient(180deg, #123542, #0e2a35); border-radius: 26px; padding: 16px 14px 12px; box-shadow: var(--shadow-lift); color: #e9e2d4; }
.scope { position: relative; width: 100%; padding-top: 50%; overflow: hidden; }
.scope svg.rings { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.scope .sweep {
  position: absolute; left: 0; width: 100%; top: 0; padding-top: 100%;
  background: conic-gradient(from 0deg, rgba(143,207,196,.0) 0deg, rgba(143,207,196,.0) 300deg, rgba(143,207,196,.32) 360deg);
  border-radius: 50%; animation: sweep 7s linear infinite; transform-origin: 50% 50%;
}
@keyframes sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.blip {
  position: absolute; width: var(--s, 10px); height: var(--s, 10px); margin: calc(var(--s, 10px) / -2) 0 0 calc(var(--s, 10px) / -2);
  border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 0 14px var(--c);
  animation: blip 7s linear infinite; animation-delay: var(--d, 0s); transition: transform .3s var(--spring);
}
.blip.bs { background: transparent; border: 2px solid var(--c); box-shadow: 0 0 8px var(--c); }
.blip.sel { transform: scale(1.8); z-index: 3; }
.blip.hot::after { content: ''; position: absolute; left: -6px; top: -6px; right: -6px; bottom: -6px; border-radius: 50%; border: 1.5px solid var(--c); animation: ripple 1.8s ease-out infinite; }
@keyframes blip { 0%, 100% { opacity: .55; } 3% { opacity: 1; } 30% { opacity: .75; } }
.scope-legend { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(233,226,212,.55); margin-top: 8px; padding: 0 4px; font-weight: 700; }
.scope-pick { min-height: 22px; margin-top: 8px; text-align: center; font-family: var(--serif); font-size: 19px; color: #fff; }
.scope-pick small { display: block; font-family: var(--sans); font-size: 12px; color: rgba(233,226,212,.6); }

.sugg { background: var(--card); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .4s var(--ease), opacity .4s; }
.sugg.leaving { transform: scale(.94); opacity: 0; }
.sugg .src { position: absolute; right: 14px; top: 14px; }
.sugg h4 { margin: 0 70px 4px 0; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.sugg p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.sugg .btn { height: 34px; font-size: 12.5px; padding: 0 13px; }
.week-group h5 { margin: 18px 0 8px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; }
.week-group h5::after { content: ''; flex: 1; height: 1px; background: var(--line-2); margin-left: 10px; }

/* ───────── Domains ───────── */
.own-card { margin-top: 14px; display: flex; align-items: center; background: var(--card); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.own-card svg { flex: 0 0 auto; width: 92px; height: 92px; margin-right: 16px; }
.own-card .ring-seg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 1.2s var(--ease); }
.own-card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.own-card p b { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); display: block; line-height: 1.1; margin-bottom: 4px; }
.legend { display: flex; flex-wrap: wrap; margin-top: 8px; }
.legend span { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-right: 10px; display: inline-flex; align-items: center; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px; margin-top: 14px; }
.dcard {
  position: relative; text-align: left; background: var(--card); border-radius: 20px; padding: 14px 14px 13px; box-shadow: var(--shadow);
  min-height: 132px; display: flex; flex-direction: column; overflow: hidden; transition: transform .3s var(--spring);
}
.dcard:active { transform: scale(.97); }
.dcard .dicon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--cbg); color: var(--c); }
.dcard .dicon .ic { width: 21px; height: 21px; }
.dcard h4 { margin: 10px 0 2px; font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.dcard .dmeta { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.dcard .dmeta > span { margin-top: 3px; }
.dcard .owner-chip, .dcard .unowned { white-space: nowrap; }
.dcard .unowned { border: 1.5px dashed var(--line-2); color: var(--muted); padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.stamp {
  position: absolute; right: 10px; top: 12px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--c);
  border: 2px solid var(--c); border-radius: 8px; padding: 0 7px; transform: rotate(-9deg); opacity: .85;
}
.stamp.fresh { animation: stamp .6s var(--spring) both; }
@keyframes stamp { 0% { transform: rotate(-30deg) scale(2.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-9deg) scale(1); opacity: .85; } }
.cpe { display: flex; margin: 12px 0 16px; }
.cpe > div { flex: 1; background: var(--card); border-radius: 14px; padding: 10px; font-size: 12px; color: var(--ink-2); box-shadow: var(--shadow); }
.cpe > div + div { margin-left: 8px; }
.cpe b { display: block; font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--ink); }

/* ───────── Week ───────── */
.review { background: var(--card); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); margin-top: 14px; }
.review .summary { font-family: var(--serif); font-size: 21px; line-height: 1.25; margin: 0 0 12px; }
.review ul { margin: 0; padding: 0; list-style: none; }
.review li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; display: flex; }
.review li b { flex: 0 0 46px; font-weight: 700; color: var(--sea); }
.review .label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 14px 0 4px; }
.ask {
  position: relative; margin-top: 14px; border-radius: 24px; padding: 26px 20px 18px; overflow: hidden; color: #fff;
  background: radial-gradient(100% 120% at 100% 0%, rgba(255,210,170,.35), transparent 60%), linear-gradient(160deg, #d5664a, #b14a33);
  box-shadow: var(--shadow-lift);
}
.ask::before { content: '\201C'; position: absolute; left: 10px; top: -28px; font-family: var(--serif); font-size: 150px; line-height: 1; color: rgba(255,255,255,.18); }
.ask .eyebrow { color: rgba(255,255,255,.78); position: relative; }
.ask q { display: block; position: relative; font-family: var(--serif); font-size: 26px; line-height: 1.18; margin: 10px 0 8px; quotes: none; }
.ask small { display: block; font-size: 12.5px; color: rgba(255,255,255,.78); margin-bottom: 14px; }
.ask .btn { background: rgba(255,255,255,.95); color: #8f3522; }
.ask .btn.ghost { background: rgba(255,255,255,.16); color: #fff; }
.days { margin-top: 6px; }
.day { display: flex; padding: 12px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day-name { flex: 0 0 64px; }
.day-name b { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1; }
.day-name span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.day.today .day-name b { color: var(--coral); }
.day-items { flex: 1; min-width: 0; }
.day-items div { font-size: 13.5px; padding: 2px 0; display: flex; align-items: baseline; }
.day-items div i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 8px; transform: translateY(-1px); }
.day-items div em { font-style: normal; color: var(--muted); font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.day-load { flex: 0 0 auto; width: 6px; border-radius: 3px; background: var(--line); margin-left: 10px; position: relative; overflow: hidden; }
.day-load span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--sea); border-radius: 3px; }
.notes-log .note { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; }
.notes-log .note q { display: block; font-family: var(--serif); font-size: 17px; color: var(--muted); margin-bottom: 4px; }
.notes-log .note small { color: var(--muted); font-size: 11.5px; }

/* ───────── Settings ───────── */
.set-group { background: var(--card); border-radius: 20px; padding: 6px 16px; box-shadow: var(--shadow); margin-top: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; min-height: 52px; }
.set-row:last-child { border-bottom: 0; }
.set-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.set-row .end { color: var(--muted); font-size: 13px; text-align: right; margin-left: 12px; flex: 0 0 auto; }
.person-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin-right: 12px; flex: 0 0 auto; }
.swatches { display: flex; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; background: var(--c); margin: 0 8px 8px 0; box-shadow: inset 0 0 0 3px rgba(255,255,255,.0); transition: box-shadow .2s, transform .2s var(--spring); }
.swatches button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); transform: scale(1.06); }
.toggle { width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .25s; flex: 0 0 auto; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--spring); }
.toggle.on { background: var(--sea); }
.toggle.on::after { transform: translateX(18px); }
.code-note { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; line-height: 1.5; }
.code-note code { background: rgba(19,34,44,.06); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ───────── Onboarding ───────── */
.who { display: flex; flex-direction: column; }
.who button {
  display: flex; align-items: center; text-align: left; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow);
  margin-bottom: 10px; transition: transform .25s var(--spring);
}
.who button:active { transform: scale(.98); }
.who button b { display: block; font-size: 16px; }
.who button small { color: var(--muted); font-size: 13px; }
.demo-chip { display: inline-block; margin-left: 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; background: rgba(243,201,164,.25); color: #f3c9a4; padding: 2px 7px; border-radius: 99px; }

/* ───────── Key dates ───────── */
.ic.flip { transform: rotate(180deg); }
.kd-teaser {
  display: flex; align-items: center; width: 100%; text-align: left; margin-top: 12px; padding: 14px 16px; border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow); transition: transform .25s var(--spring);
}
.kd-teaser:active { transform: scale(.98); }
.kd-teaser-ring { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; margin-right: 12px; display: flex; align-items: center; justify-content: center;
  color: #f3c9a4; background: radial-gradient(circle at 50% 50%, #1d4d60 52%, transparent 53%), conic-gradient(#f3c9a4 0 18%, rgba(42,104,126,.25) 18% 100%); }
.kd-teaser-ring .ic { width: 16px; height: 16px; }
.kd-teaser > .ic { color: var(--faint); width: 18px; height: 18px; margin-left: 8px; }
.kd-main { flex: 1 1 auto; min-width: 0; }
.kd-main b { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
.kd-main small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dial-wrap { max-width: 320px; margin: 0 auto; }
.dial { width: 100%; height: auto; overflow: visible; }
.dial-needle { transform-origin: 140px 140px; animation: needle 1.4s var(--spring) both; }
@keyframes needle { from { transform: rotate(-140deg); opacity: 0; } to { transform: none; opacity: 1; } }
.kd-dot { animation: dotin .6s var(--spring) both; transform-box: fill-box; transform-origin: center; }
.kd-dot.hot { animation: dotin .6s var(--spring) both, dotpulse 2.4s ease-in-out 1s infinite; }
@keyframes dotin { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes dotpulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.kd-list { display: flex; flex-direction: column; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.kd-row { display: flex; align-items: center; width: 100%; text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); transition: background .2s; }
.kd-row:last-child { border-bottom: 0; }
.kd-row:active { background: rgba(19,34,44,.04); }
.kd-ico { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; margin-right: 12px; display: flex; align-items: center; justify-content: center; background: var(--cbg); color: var(--c); }
.kd-count { flex: 0 0 auto; text-align: right; margin-left: 10px; min-width: 44px; }
.kd-count b { display: block; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: .95; color: var(--ink); }
.kd-count small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kd-row.hot .kd-count b { color: var(--coral); }
.kd-miss button .ic { width: 14px; height: 14px; margin-right: 5px; stroke-width: 2.2; }
.kd-parsed { box-shadow: var(--shadow), inset 3px 0 0 var(--amber); }
.hub-kd { margin-top: 3vh; display: flex; align-items: center; font-size: 2.1vh; }
.hub-kd > span:last-child small { display: block; font-size: 1.6vh; color: rgba(242,235,221,.55); }
.hub-kd-n { font-family: var(--serif); font-size: 6vh; line-height: .9; color: #f3c9a4; margin-right: 1.2vw; min-width: 6vh; }
.hub-kd-n small { font-family: var(--sans); font-size: 1.5vh; letter-spacing: .1em; text-transform: uppercase; color: rgba(242,235,221,.55); margin-left: .4vw; }
#hub.night .hub-kd { display: none; }

/* ═════════ HUB (kitchen tablet) ═════════ */
body.hub-mode { overflow: hidden; background: #0f2a35; }
body.hub-mode #app, body.hub-mode #tabs { display: none; }
#hub {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; color: #f2ebdd;
  background:
    radial-gradient(80% 60% at 92% 0%, rgba(255,200,150,.18), transparent 60%),
    radial-gradient(60% 50% at 0% 100%, rgba(120,190,180,.12), transparent 60%),
    linear-gradient(165deg, #1b4a5c 0%, #123747 50%, #0d2a36 100%);
}
.hub-inner {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 3.2vh 3vw 0;
  display: -webkit-box; display: flex; transition: transform 2s ease;
}
.hub-col { -webkit-box-flex: 1; flex: 1 1 0; min-width: 0; position: relative; z-index: 2; }
.hub-left { flex: 0 0 31%; padding-right: 2.4vw; }
.hub-mid { flex: 1 1 0; padding: 0 2.4vw; border-left: 1px solid rgba(242,235,221,.1); border-right: 1px solid rgba(242,235,221,.1); }
.hub-right { flex: 0 0 29%; padding-left: 2.4vw; }
.hub-clock { font-family: var(--serif); font-size: 15vh; line-height: .9; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hub-clock .colon { animation: colon 2s ease-in-out infinite; }
@keyframes colon { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hub-date { font-family: var(--serif); font-style: italic; font-size: 4.2vh; color: #f3c9a4; margin-top: 1vh; }
.hub-label { font-size: 1.55vh; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: rgba(242,235,221,.55); margin: 3.4vh 0 1.2vh; }
.hub-label:first-child { margin-top: 0; }
.hub-weather { display: flex; align-items: center; margin-top: 3vh; }
.hub-weather svg { width: 7vh; height: 7vh; margin-right: 1.4vw; stroke: #f3c9a4; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hub-weather b { font-family: var(--serif); font-weight: 400; font-size: 6.5vh; line-height: 1; }
.hub-weather span { display: block; font-size: 1.9vh; color: rgba(242,235,221,.7); }
.hub-days { display: flex; margin-top: 2vh; }
.hub-days > div { flex: 1; font-size: 1.8vh; color: rgba(242,235,221,.75); }
.hub-days > div b { display: block; font-weight: 700; color: #f2ebdd; }
.hub-bins { margin-top: 3vh; padding: 1.6vh 1.2vw; border-radius: 1.8vh; background: rgba(242,235,221,.08); font-size: 2vh; display: flex; align-items: center; }
.hub-bins svg { width: 3.4vh; height: 3.4vh; margin-right: 1vw; stroke: #f3c9a4; fill: none; stroke-width: 1.6; }
.hub-bins b { color: #fff; }
.hub-brief { font-family: var(--serif); font-size: 3.6vh; line-height: 1.18; color: #fff; margin: 0 0 2.6vh; }
.hub-brief em { color: #f3c9a4; }
.hub-ev { display: flex; align-items: flex-start; padding: 1.1vh 0; border-bottom: 1px solid rgba(242,235,221,.08); }
.hub-ev .t { flex: 0 0 9vh; font-size: 2.1vh; font-weight: 700; color: rgba(242,235,221,.7); font-variant-numeric: tabular-nums; padding-top: .2vh; }
.hub-ev .bar { flex: 0 0 auto; width: .5vh; align-self: stretch; border-radius: 1vh; background: var(--c); margin-right: 1.2vw; }
.hub-ev .x { font-size: 2.4vh; line-height: 1.25; }
.hub-ev .x small { display: block; font-size: 1.7vh; color: rgba(242,235,221,.6); }
.hub-ev.past { opacity: .4; }
.hub-ev.task .x { color: #f3c9a4; }
.hub-empty { font-family: var(--serif); font-style: italic; font-size: 3vh; color: rgba(242,235,221,.55); }
.hub-up { font-size: 2vh; }
.hub-up .d { font-size: 1.5vh; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: rgba(242,235,221,.5); margin: 1.6vh 0 .5vh; }
.hub-up .r { display: flex; align-items: baseline; padding: .4vh 0; }
.hub-up .r i { flex: 0 0 auto; width: 1vh; height: 1vh; border-radius: 50%; background: var(--c); margin-right: .9vw; }
.hub-handled { margin-top: 3vh; padding: 2vh 1.4vw; border-radius: 2vh; background: rgba(242,235,221,.07); }
.hub-handled .n { font-family: var(--serif); font-size: 8vh; line-height: .85; color: #a9dccf; }
.hub-handled .n small { font-family: var(--sans); font-size: 1.7vh; color: rgba(242,235,221,.7); margin-left: .6vw; letter-spacing: .04em; }
.hub-ticker { height: 12vh; overflow: hidden; position: relative; margin-top: 1.2vh; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.hub-ticker ul { list-style: none; margin: 0; padding: 0; }
.hub-ticker li { height: 4vh; line-height: 4vh; font-size: 1.9vh; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(242,235,221,.85); }
.hub-ticker li span { color: rgba(242,235,221,.5); margin-left: .6vw; font-size: 1.6vh; }
.hub-ticker.roll ul { animation: roll var(--dur, 20s) linear infinite; }
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.hub-tide { position: absolute; left: 0; right: 0; bottom: 0; height: 14vh; z-index: 1; pointer-events: none; }
.hub-tide .water { height: 100%; }
.hub-exit { position: absolute; right: 1.4vw; top: 1.4vh; z-index: 5; width: 5vh; height: 5vh; border-radius: 50%; color: rgba(242,235,221,.35); display: flex; align-items: center; justify-content: center; }
.hub-exit svg { width: 2.6vh; height: 2.6vh; }
.hub-sync { position: absolute; left: 3vw; bottom: 1.4vh; z-index: 3; font-size: 1.4vh; color: rgba(242,235,221,.4); letter-spacing: .06em; }

/* Night: clock only, very dim */
#hub.night { background: #070f13; }
#hub.night .hub-mid, #hub.night .hub-right, #hub.night .hub-weather, #hub.night .hub-handled, #hub.night .hub-days, #hub.night .hub-tide { display: none; }
#hub.night .hub-left { flex: 1 1 auto; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: .5; }
#hub.night .hub-clock { font-size: 24vh; color: #9fb7bd; }
#hub.night .hub-date { color: #6f878d; }
#hub.night .hub-bins { background: transparent; color: #9fb7bd; justify-content: center; }
#hub.night .hub-night-next { display: block; }
.hub-night-next { display: none; margin-top: 3vh; font-size: 2.2vh; color: #7d969c; }

/* Portrait tablet */
@media (orientation: portrait) {
  .hub-inner { -webkit-box-orient: vertical; flex-direction: column; overflow-y: auto; padding-bottom: 16vh; }
  .hub-left, .hub-mid, .hub-right { flex: 0 0 auto; padding: 2vh 0; border: 0; }
  .hub-clock { font-size: 10vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

/* Wider phones / small tablets used in app mode */
@media (min-width: 700px) {
  h1.display { font-size: 54px; }
}
