/*
 * Our Circle: app styles, built on apple-tokens.css (Apple HIG tokens; load it first).
 * Layout: one readable column; a floating glass tab bar on phones, a sidebar from 1024px.
 * One accent (the app's evergreen). The journal page keeps book type: it is the brand moment.
 */
:root {
  --tint: rgb(47 93 74);
  --tint-text: rgb(47 93 74);         /* 7.4:1 on white */
  --on-tint: #fff;
  --tint-soft: rgba(47, 93, 74, 0.12);
  --ok-bg: rgb(212 239 220);
  --ok-ink: rgb(0 112 41);            /* 5.6:1 on its tint */
  --due-bg: rgb(204 20 35);           /* white text 5.4:1 */
  --paper: rgb(253 251 246);
  --paper-ink: rgb(42 38 32);
  --paper-rule: rgb(231 225 212);
  --paper-muted: rgb(110 104 94);
  --book: "EB Garamond", ui-serif, Georgia, serif;
  --book-display: "Cormorant Garamond", ui-serif, Georgia, serif;
  --spring: linear(0, 0.1151 6.3%, 0.2515 10.4%, 0.457 16.7%, 0.6265 22.9%, 0.7519 29.2%, 0.8392 35.4%, 0.8977 41.7%, 0.9359 47.9%, 0.9602 54.2%, 0.9756 60.4%, 0.9851 66.7%, 0.991 72.9%, 0.9946 79.2%, 0.9973 87.5%, 1);
  --tabbar-space: calc(84px + env(safe-area-inset-bottom));
  --sidebar: 232px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tint: rgb(98 180 141);
    --tint-text: rgb(122 201 162);
    --on-tint: rgb(8 28 20);
    --tint-soft: rgba(98, 180, 141, 0.16);
    --ok-bg: rgb(26 62 40);
    --ok-ink: rgb(120 220 150);
    --due-bg: rgb(220 38 52);
    --paper: rgb(30 28 25);
    --paper-ink: rgb(236 231 222);
    --paper-rule: rgb(62 57 50);
    --paper-muted: rgb(168 160 148);
  }
}

* { box-sizing: border-box; }
.nw { white-space: nowrap; }
body { hyphens: manual; }
html, body { margin: 0; }
body { background: var(--bg-grouped); overscroll-behavior-y: none; }
#main { max-width: 680px; margin: 0 auto; padding: env(safe-area-inset-top) 0 var(--tabbar-space); min-height: 100vh; outline: none; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex-shrink: 0; }
img, video { max-width: 100%; display: block; }

/* ---------- type (only the token scale) ---------- */
.display, .h1 { font-size: var(--text-title1); line-height: var(--lh-title1); letter-spacing: var(--tr-title1); font-weight: var(--weight-bold); margin: 0; text-wrap: balance; }
.display.sm { font-size: var(--text-title2); line-height: var(--lh-title2); }
h2 { font-size: var(--text-headline); line-height: var(--lh-headline); letter-spacing: var(--tr-headline); font-weight: var(--weight-semibold); margin: 0; }
.eyebrow { font-size: var(--text-footnote); line-height: var(--lh-footnote); font-weight: var(--weight-semibold); color: var(--label-secondary); }
.muted { color: var(--label-secondary); }
.small, .hint { font-size: var(--text-footnote); line-height: var(--lh-footnote); color: var(--label-secondary); }
.hint { margin: 6px 0; }
.center { text-align: center; }
.pad { padding: var(--space-5) var(--margin); }
.pad-x { padding: 0 var(--margin); }
.grow { flex: 1 1 auto; min-width: 0; }
.warm { color: var(--tint-text); font-weight: var(--weight-semibold); }
.right { display: flex; justify-content: flex-end; }

/* ---------- structure ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--margin) var(--space-3); }
.block { padding: 0 var(--margin); margin-bottom: var(--space-5); }
.row-head { display: flex; align-items: center; justify-content: space-between; min-height: var(--hit); margin-bottom: var(--space-1); }
.row-btns { display: flex; gap: var(--space-3); }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.mb { margin-bottom: var(--space-3); }

.card { padding: 0; border-radius: var(--radius-lg); }
.card.list { display: flex; flex-direction: column; overflow: hidden; }
.li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 0; background: none; text-align: left; width: 100%; text-decoration: none; color: inherit; min-height: 56px; position: relative; }
.li + .li::before, .li + .add-row::before { content: ""; position: absolute; top: 0; left: var(--space-4); right: 0; border-top: 0.5px solid var(--separator); }
.li.col { flex-direction: column; align-items: stretch; }
.li-main { display: flex; flex-direction: column; flex: 1 1 9rem; min-width: 0; gap: 1px; }
.li-title { font-weight: var(--weight-semibold); overflow-wrap: normal; word-break: normal; }
.li-title small { font-weight: var(--weight-regular); }
.li-sub { font-size: var(--text-footnote); line-height: var(--lh-footnote); color: var(--label-secondary); }
.chat-row .li-sub { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.li-sub.strong { color: var(--label); font-weight: var(--weight-semibold); }
.li-when { font-size: var(--text-footnote); color: var(--label-secondary); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.add-row { color: var(--tint-text); font-weight: var(--weight-semibold); }
.empty-card { padding: var(--space-4); color: var(--label-secondary); text-align: left; width: 100%; border: 0; font-size: var(--text-footnote); }
.link-card { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); text-decoration: none; color: var(--label); }
.sq { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--tint-soft); color: var(--tint-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sq.soft { background: var(--fill-tertiary); color: var(--label-secondary); }

.datechip { width: 48px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; border-radius: var(--radius-sm); padding: 5px 0; background: var(--fill-quaternary); color: var(--label); }
.datechip b { font-size: var(--text-caption2); line-height: var(--lh-caption2); font-weight: var(--weight-semibold); text-transform: uppercase; color: var(--tint-text); }
.datechip span { font-size: var(--text-headline); line-height: 1.2; font-weight: var(--weight-semibold); white-space: nowrap; }
.datechip.trip { width: auto; min-width: 48px; padding: 5px 8px; }
.datechip.gold { background: var(--tint); color: var(--on-tint); }
.datechip.gold b { color: var(--on-tint); }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: var(--radius-full); background: var(--tint-soft); font-size: var(--text-caption2); font-weight: var(--weight-semibold); color: var(--tint-text); vertical-align: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-footnote); color: var(--label-secondary); }

/* ---------- buttons (press feedback is a short scale) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--hit); padding: 0 var(--space-5); border-radius: var(--radius-full); border: 0; background: var(--tint); color: var(--on-tint); font-weight: var(--weight-semibold); text-decoration: none; white-space: nowrap; transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.btn.sm { min-height: 40px; padding: 0 var(--space-4); }
.btn.wide { width: 100%; }
.btn.ghost { background: var(--fill-tertiary); color: var(--tint-text); }
.btn.dark { border-radius: var(--radius-md); min-height: 52px; }
.btn.light { background: var(--label); color: var(--card-inverted-bg); }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .45; }
.row-btns .btn.ghost { border-radius: var(--radius-md); min-height: 52px; }
.row-btns.compact { flex-wrap: wrap; gap: var(--space-2); }
.row-btns.compact .btn { min-height: 40px; border-radius: var(--radius-full); padding: 0 var(--space-4); }
.btn-spacer { min-width: 88px; }
.icon-btn { width: var(--hit); height: var(--hit); border-radius: var(--radius-full); border: 0; background: var(--fill-tertiary); display: inline-flex; align-items: center; justify-content: center; color: var(--label); flex-shrink: 0; padding: 0; text-decoration: none; cursor: pointer; transition: transform var(--dur-fast) var(--ease); }
.icon-btn.sm { width: 40px; height: 40px; }
.linkish { background: none; border: 0; color: var(--tint-text); font-weight: var(--weight-semibold); display: inline-flex; align-items: center; gap: 4px; min-height: var(--hit); padding: 0 4px; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.chip { min-height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-full); border: 0; background: var(--fill-tertiary); color: var(--label); font-size: var(--text-footnote); font-weight: var(--weight-semibold); position: relative; }
.chip::after { content: ""; position: absolute; inset: -4px 0; }
@media (hover: hover) { .btn:hover, .icon-btn:hover, .chip:hover { opacity: .88; } }
.btn:active, .icon-btn:active, .chip:active, .tile:active, .ci-tab:active { transform: scale(.97); }

/* ---------- hub ---------- */
.today { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.today-row { display: flex; gap: var(--space-3); align-items: flex-start; color: var(--label-secondary); }
.today-line { font-size: var(--text-headline); line-height: var(--lh-headline); font-weight: var(--weight-semibold); color: var(--label); }
.today-sub { font-size: var(--text-footnote); color: var(--label-secondary); }

.chart { display: grid; grid-template-columns: clamp(100px, 18vw, 150px) minmax(0, 1fr); gap: var(--space-3); align-items: center; position: relative; }
.chart-others { display: flex; flex-direction: column; gap: var(--space-3); position: relative; }
.chart-others::before { content: ""; position: absolute; left: -7px; top: 30px; bottom: 30px; border-left: 1px solid var(--separator); }
.hh-row { display: flex; align-items: stretch; position: relative; }
.hh-row::before { content: ""; position: absolute; left: -7px; top: 50%; width: 7px; border-top: 1px solid var(--separator); }
.hh-row > .card { flex: 1 1 auto; min-width: 0; position: relative; z-index: 1; }
.mine-card { border-radius: var(--radius-lg); padding: var(--space-2); display: flex; flex-direction: column; gap: var(--space-2); }
.mine-head { display: flex; flex-direction: column; padding: 4px 4px 2px; text-decoration: none; }
.mine-name { font-size: var(--text-footnote); line-height: var(--lh-footnote); font-weight: var(--weight-semibold); color: var(--label); }
.hh { padding: var(--space-2); display: flex; flex-direction: column; gap: var(--space-2); box-shadow: var(--shadow-card); background: var(--card-bg); }
.hh-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding-left: 4px; }
.hh-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hh-title b { font-weight: var(--weight-semibold); }
.hh-title small { font-size: var(--text-caption2); color: var(--label-secondary); }
.msg-btn { color: var(--tint-text); }
.hh-tiles { display: flex; gap: 6px; }
/* concentric: card radius 22 − padding 8 = 14 */
.tile { flex: 1 1 0; min-width: 0; border-radius: var(--radius-md); overflow: hidden; border: 0; background: var(--fill-quaternary); padding: 0; display: flex; flex-direction: column; text-align: left; transition: transform var(--dur-fast) var(--ease); }
.mine-tile { flex: none; width: 100%; background: var(--card-bg); }
.tile-img { height: 76px; width: 100%; }
.mine-tile .tile-img { height: clamp(92px, 14vw, 120px); }
.tile-img.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--tint-soft); color: var(--tint-text); }
.tile-img.add small { font-size: var(--text-caption2); font-weight: var(--weight-semibold); }
.tile-name { min-height: 22px; display: flex; align-items: center; padding: 2px 7px; font-size: var(--text-caption1); font-weight: var(--weight-semibold); color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* tiles inside the inverted card go back to normal text colors */
.mine-tile { --label: rgb(21 23 26); --label-secondary: rgb(90 94 102); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mine-tile { --label: rgb(241 242 244); --label-secondary: rgb(163 168 175); } }

/* check-in tab: green = recent, red = past due (words carry it too: "Good" / "Due") */
.ci-tab { width: 46px; flex-shrink: 0; margin-left: -12px; padding: 8px 0 8px 12px; border: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.05; transition: transform var(--dur-fast) var(--ease); }
.ci-tab b { font-size: var(--text-caption1); font-weight: var(--weight-bold); }
.ci-tab small { font-size: 10px; font-weight: var(--weight-semibold); text-transform: uppercase; }
.ci-tab.ok { background: var(--ok-bg); color: var(--ok-ink); }
.ci-tab.due { background: var(--due-bg); color: #fff; }

.face { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--fill-tertiary); color: var(--label-secondary); display: inline-flex; align-items: center; justify-content: center; font-weight: var(--weight-semibold); font-size: var(--text-headline); flex-shrink: 0; overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face.sm { width: 28px; height: 28px; border-radius: 8px; font-size: var(--text-caption1); }
.face.sq-ic { background: var(--tint-soft); color: var(--tint-text); }
.face.tile-img { display: flex; width: 100%; height: 76px; border-radius: 0; font-size: var(--text-title2); background: transparent; }
.mine-tile .face.tile-img { height: clamp(92px, 14vw, 120px); background: var(--fill-quaternary); }

/* ---------- chats ---------- */
.unread { width: 9px; height: 9px; border-radius: 5px; background: var(--tint); display: inline-block; }
body[data-view="chat"] #main { padding-bottom: 0; }
body[data-view="chat"] .tabbar { display: none; }
.convo { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--bg); }
.convo-head { display: flex; align-items: center; gap: var(--space-3); padding: calc(var(--space-2) + env(safe-area-inset-top)) var(--space-3) var(--space-2); border-bottom: 0.5px solid var(--separator); background: var(--glass-bg-thick); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); position: sticky; top: 0; z-index: 2; }
.convo-title { display: flex; flex-direction: column; min-width: 0; }
.convo-title b { font-weight: var(--weight-semibold); }
.convo-title small { color: var(--label-secondary); font-size: var(--text-footnote); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgs { flex: 1 1 auto; overflow-y: auto; padding: var(--space-3); display: flex; flex-direction: column; gap: 3px; }
.stamp { text-align: center; font-size: var(--text-caption2); color: var(--label-secondary); margin: var(--space-3) 0 var(--space-1); }
.msg { display: flex; gap: var(--space-2); align-items: flex-end; max-width: 82%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.face-gap { width: 28px; flex-shrink: 0; }
.bubble-wrap { display: flex; flex-direction: column; min-width: 0; }
.who { font-size: var(--text-caption2); color: var(--label-secondary); margin: 0 0 2px 12px; }
.bubble { background: var(--bg-secondary); border-radius: 18px; padding: 7px 12px; }
.msg.mine .bubble { background: var(--tint); color: var(--on-tint); }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.media { margin-top: 6px; }
.media img, .media video { border-radius: 12px; max-height: 320px; width: auto; }
.dl { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-caption1); font-weight: var(--weight-semibold); margin-top: 4px; color: inherit; opacity: .85; }
.pending { padding: 6px var(--space-4); font-size: var(--text-footnote); color: var(--label-secondary); background: var(--bg); border-top: 0.5px solid var(--separator); }
.composer { display: flex; align-items: flex-end; gap: var(--space-2); padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom)); background: var(--glass-bg-thick); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); border-top: 0.5px solid var(--separator); }
.composer textarea { flex: 1 1 auto; resize: none; border: 0.5px solid var(--separator); border-radius: 20px; padding: 10px 14px; min-height: var(--hit); max-height: 140px; background: var(--bg); font-size: max(16px, var(--text-body)); }
.composer textarea:focus { outline: none; border-color: var(--tint); }
.composer .send { background: var(--tint); color: var(--on-tint); }

/* ---------- album ---------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--space-3); }
.album-card { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform var(--dur-fast) var(--ease); }
.album-card:active { transform: scale(.98); }
.cover { aspect-ratio: 4 / 3; background: var(--fill-quaternary); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; color: var(--label-secondary); }
.cover img, .cover video { width: 100%; height: 100%; object-fit: cover; }
.cover .play { position: absolute; color: #fff; font-style: normal; font-size: 26px; text-shadow: 0 1px 6px rgb(0 0 0 / .5); }
.album-meta { padding: var(--space-3); display: flex; flex-direction: column; gap: 2px; }
.album-meta b { font-weight: var(--weight-semibold); }
.album-meta small { font-size: var(--text-footnote); color: var(--label-secondary); }
.album-grid .empty-card { grid-column: 1 / -1; }
figure.full { margin: 0; background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
figure.full img, figure.full video { width: 100%; }
figure.full figcaption { padding: var(--space-2) var(--space-3); }

/* ---------- my page ---------- */
.privacy { margin: 0 var(--margin) var(--space-5); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--tint-soft); display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-footnote); line-height: var(--lh-footnote); color: var(--tint-text); }
.privacy span { color: var(--label); }
.profile { display: flex; gap: var(--space-4); align-items: center; }
.photo-pick { width: 112px; height: 132px; flex-shrink: 0; border-radius: var(--radius-lg); background: var(--tint-soft); color: var(--tint-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: var(--text-footnote); font-weight: var(--weight-semibold); cursor: pointer; overflow: hidden; box-shadow: var(--shadow-card); }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.profile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
select, .select-pill { -webkit-appearance: none; appearance: none; }
.select-pill { min-height: 40px; border-radius: var(--radius-full); border: 0; background: var(--fill-tertiary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding: 0 32px 0 14px; font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--label); }
input.select-pill { padding-right: 14px; background-image: none; }
.linkbox { background: var(--fill-quaternary); border-radius: var(--radius-sm); padding: var(--space-3); font-size: var(--text-footnote); overflow-wrap: anywhere; user-select: all; margin: 0; }

/* ---------- journal: a bound page ---------- */
.jr-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--margin) var(--space-3); }
.paper { margin: 0 var(--space-3); background: var(--paper); color: var(--paper-ink); border-radius: 6px var(--radius-lg) var(--radius-lg) 6px; border-left: 6px solid var(--tint); box-shadow: var(--shadow-card); padding: var(--space-5) var(--space-5) var(--space-3) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.paper-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1.5px solid var(--paper-ink); padding-bottom: var(--space-2); }
.paper-day { font-family: var(--book-display); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: 0; }
.paper-date { font-family: var(--book-display); font-size: 15px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-muted); margin-top: 4px; }
.paper-page { font-family: var(--book); font-size: 13px; font-style: italic; color: var(--paper-muted); text-align: right; line-height: 1.3; letter-spacing: 0; }
.paper-prompt { margin: 0; font-family: var(--book-display); font-size: 19px; font-style: italic; font-weight: 500; color: var(--tint-text); letter-spacing: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.sec-title { font-size: var(--text-caption2); font-weight: var(--weight-bold); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-muted); }
.mic-sm { width: 36px; height: 36px; border-radius: var(--radius-full); border: 0; background: var(--fill-quaternary); color: var(--tint-text); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.mic-sm::after { content: ""; position: absolute; inset: -4px; }
.mic-sm.on { background: var(--red); color: #fff; animation: none; }
textarea.ruled { width: 100%; border: 0; resize: none; background: transparent; font-family: var(--book); font-size: 18px; line-height: 28px; letter-spacing: 0; color: var(--paper-ink); min-height: 112px; padding: 0; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, var(--paper-rule) 27px, var(--paper-rule) 28px); background-attachment: local; }
textarea.ruled:focus { outline: none; box-shadow: none; }
.lines { margin: 0; padding-left: 26px; font-family: var(--book); color: var(--tint-text); }
.lines li { border-bottom: 1px solid var(--paper-rule); }
.lines input { width: 100%; border: 0; background: transparent; font-family: var(--book); font-size: 18px; letter-spacing: 0; color: var(--paper-ink); padding: 6px 0 3px; }
.lines input:focus { outline: none; box-shadow: none; }
.paper ::placeholder { color: var(--paper-muted); opacity: .7; font-style: italic; }
::placeholder { color: var(--placeholder); }
.paper-foot { display: flex; justify-content: space-between; align-items: center; }
.paper .muted, .paper .small { color: var(--paper-muted); }
.jr-nav { display: flex; justify-content: space-between; gap: var(--space-2); padding: var(--space-4) var(--space-3) 0; }
.jr-actions { display: flex; justify-content: center; gap: var(--space-5); padding: var(--space-2) 0; }
.search { display: flex; align-items: center; gap: var(--space-2); background: var(--fill-tertiary); border-radius: var(--radius-sm); padding: 0 var(--space-3); margin-bottom: var(--space-3); color: var(--label-secondary); }
.search input { flex: 1 1 auto; border: 0; background: none; min-height: var(--hit); color: var(--label); font-size: max(16px, var(--text-body)); }
.search input:focus { outline: none; box-shadow: none; }

/* goals (inside the journal page) */
.goals { border-top: 1.5px solid var(--paper-ink); padding-top: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.goals-head { display: flex; justify-content: space-between; align-items: center; }
.goal-group { display: flex; flex-direction: column; }
.goal-freq { font-family: var(--book-display); font-style: italic; font-size: 16px; color: var(--tint-text); margin: 4px 0 2px; }
.goal { display: flex; align-items: center; gap: var(--space-2); min-height: var(--hit); border-bottom: 1px solid var(--paper-rule); }
.goal-check { display: flex; align-items: center; justify-content: center; width: 32px; height: var(--hit); flex-shrink: 0; cursor: pointer; }
.goal-check input { width: 22px; height: 22px; accent-color: var(--tint); cursor: pointer; }
.goal-title { flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: 0; padding: 6px 0; font-family: var(--book); font-size: 17px; letter-spacing: 0; color: var(--paper-ink); }
.goal-track { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.goal-track i { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-rule); }
.goal-track i.on { background: var(--ok-ink); }
.goal-track i.now { outline: 1.5px solid var(--paper-ink); outline-offset: 1px; }
.goal-track small { font-size: var(--text-caption2); color: var(--paper-muted); margin-left: 4px; font-weight: var(--weight-semibold); min-width: 26px; }
.goal-empty { margin: 0; font-family: var(--book); font-style: italic; color: var(--paper-muted); font-size: 15px; }

/* ---------- forms & sheets ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--label-secondary); }
.field input, .field select, .field textarea { min-height: var(--hit); border: 0; border-radius: var(--radius-sm); padding: 10px 12px; background: var(--fill-tertiary); color: var(--label); font-size: max(16px, var(--text-body)); font-weight: var(--weight-regular); }
.field select { background: var(--fill-tertiary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: var(--focus-ring); }
.field small { font-weight: var(--weight-regular); }
.check { display: flex; gap: var(--space-3); align-items: center; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--tint); }
.checks { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-2); }
.checks legend { font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--label-secondary); margin-bottom: 4px; padding: 0; }
.sheet-wrap { position: fixed; inset: 0; background: rgb(0 0 0 / .32); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade-in var(--dur) var(--ease) both; }
.sheet { background: var(--bg-grouped-secondary); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; padding: var(--space-2) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--space-3); animation: sheet-up 380ms var(--spring) both; }
.sheet::before { content: ""; align-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--fill); margin-bottom: var(--space-1); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: var(--radius-sheet); max-width: 520px; } @keyframes sheet-up { from { transform: translateY(24px) scale(.98); opacity: 0; } } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: var(--text-title2); line-height: var(--lh-title2); font-weight: var(--weight-bold); }
.sheet .muted { margin: 0; font-size: var(--text-footnote); }
.sheet-actions { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-1); }
.sheet-actions .btn { min-width: 110px; }
.error { color: var(--red); background: rgba(255, 56, 60, 0.1); padding: var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-footnote); }

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-6) var(--margin); background: var(--bg-grouped); }
.auth-card { width: 100%; max-width: 400px; background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.auth-card h1 { font-size: var(--text-title1); line-height: var(--lh-title1); font-weight: var(--weight-bold); margin: var(--space-1) 0 0; }
.auth-card p { margin: 0; }
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--tint-text); font-weight: var(--weight-semibold); }
.or { display: flex; align-items: center; gap: var(--space-3); color: var(--label-secondary); font-size: var(--text-footnote); }
.or::before, .or::after { content: ""; flex: 1; border-top: 0.5px solid var(--separator); }

/* ---------- tab bar: floating glass on phones, sidebar from 1024px ---------- */
.side-brand { display: none; }
.tabbar { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 420px); height: 64px; padding: 6px; display: flex; gap: 2px; border-radius: var(--radius-full); background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-shadow), inset 0 0.5px 0 rgb(255 255 255 / .4); }
.tabbar a { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: var(--radius-full); font-size: var(--text-caption2); font-weight: var(--weight-semibold); color: var(--label-secondary); text-decoration: none; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.tabbar a.on { color: var(--tint-text); background: var(--fill-tertiary); }
.tabbar .dot { position: absolute; top: 7px; left: calc(50% + 7px); width: 9px; height: 9px; border-radius: 5px; background: var(--tint); border: 2px solid var(--card-bg); }
@media (prefers-reduced-transparency: reduce) { .tabbar, .composer, .convo-head { background: var(--bg-secondary); -webkit-backdrop-filter: none; backdrop-filter: none; } }

@media (min-width: 1024px) {
  :root { --tabbar-space: var(--space-8); }
  .tabbar { left: 0; top: 0; bottom: 0; transform: none; width: var(--sidebar); height: auto; padding: calc(var(--space-5) + env(safe-area-inset-top)) var(--space-3) var(--space-5); flex-direction: column; gap: 2px; border-radius: 0; background: var(--bg-grouped); -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; border-right: 0.5px solid var(--separator); box-shadow: none; }
  .side-brand { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3) var(--space-4); color: var(--tint-text); font-weight: var(--weight-bold); font-size: var(--text-headline); }
  .side-brand span { color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: var(--space-3); height: var(--hit); padding: 0 var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-body); font-weight: var(--weight-medium); color: var(--label); }
  .tabbar a .ic { color: var(--label-secondary); }
  .tabbar a.on { background: var(--fill-tertiary); color: var(--tint-text); font-weight: var(--weight-semibold); }
  .tabbar a.on .ic { color: var(--tint-text); }
  .tabbar .dot { position: static; margin-left: auto; border: 0; }
  body:has(.tabbar) #main, body:has(.tabbar) .demo-bar { margin-left: var(--sidebar); }
  #main { max-width: none; padding-left: max(var(--space-6), calc((100vw - var(--sidebar) - 720px) / 2)); padding-right: max(var(--space-6), calc((100vw - var(--sidebar) - 720px) / 2)); }
  body[data-view="chat"] .tabbar { display: flex; }
  body[data-view="chat"] #main { padding-left: 0; padding-right: 0; }
}

.demo-bar { position: sticky; top: 0; z-index: 30; background: var(--card-inverted-bg); color: var(--card-inverted-label); font-size: var(--text-footnote); padding: 6px var(--space-3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: center; }
.demo-bar select { background: transparent; color: inherit; border: 0.5px solid var(--card-inverted-separator); border-radius: 8px; padding: 3px 8px; font-size: var(--text-footnote); }
.demo-bar .linkish { color: inherit; text-decoration: underline; min-height: 28px; font-size: var(--text-footnote); }
body[data-view="chat"] .demo-bar { display: none; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-space) + 8px); transform: translateX(-50%) translateY(16px); background: var(--card-inverted-bg); color: var(--card-inverted-label); box-shadow: var(--shadow-3); padding: 10px 18px; border-radius: var(--radius-full); font-size: var(--text-footnote); font-weight: var(--weight-semibold); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--spring); z-index: 60; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.long { width: min(92vw, 440px); max-width: none; border-radius: 18px; padding: 14px 18px; text-align: left; font-weight: var(--weight-medium); line-height: 1.4; }

/* view change: the new screen rises in */
#main > * { animation: view-in 260ms var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
#main > .convo { animation: none; }

/* ---------- printed book (paper stays paper in dark mode) ---------- */
.bookdoc { background: #fff; margin: 0 var(--margin); padding: var(--space-6); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); font-family: var(--book); color: #1d1a16; font-size: 11.5pt; line-height: 1.5; letter-spacing: 0; }
.b-title { text-align: center; padding: 30% 0; }
.b-title h1 { font-family: var(--book-display); font-size: 34pt; margin: 0 0 12pt; }
.b-years { font-style: italic; color: #555; }
.b-day { margin-top: 26pt; break-inside: avoid-page; }
.bookdoc.each .b-day { break-before: page; margin-top: 0; }
.b-day h2 { font-family: var(--book-display); font-size: 22pt; margin: 0; letter-spacing: 0; }
.b-date { font-family: var(--book-display); font-size: 10pt; letter-spacing: .16em; text-transform: uppercase; color: #666; border-bottom: 0.75pt solid #222; padding-bottom: 4pt; margin-bottom: 8pt; }
.b-day h3 { font-family: var(--font-sans); font-size: 7.5pt; letter-spacing: .14em; text-transform: uppercase; color: #666; margin: 10pt 0 2pt; }
.b-day p { margin: 0 0 6pt; text-align: justify; hyphens: auto; }
.b-day ol { margin: 0 0 6pt; padding-left: 16pt; }
@media print {
  body { background: #fff; }
  .tabbar, .demo-bar, .no-print, #toast { display: none !important; }
  #main { padding: 0 !important; margin: 0 !important; max-width: none; }
  #main > * { animation: none; }
  .bookdoc { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .b-title { break-after: page; padding: 35% 0 0; }
}

/* ---------- start-up placeholder (shown before any code runs) ---------- */
.boot { max-width: 680px; margin: 0 auto; padding: calc(var(--space-5) + env(safe-area-inset-top)) var(--margin); display: flex; flex-direction: column; gap: var(--space-4); }
.boot-top { display: flex; flex-direction: column; gap: 8px; }
.boot-chart { display: grid; grid-template-columns: 100px 1fr; gap: var(--space-3); align-items: center; }
.boot-chart > div { display: flex; flex-direction: column; gap: var(--space-3); }
.sk { display: block; border-radius: var(--radius-md); background: var(--fill-quaternary); }
.sk-sm { width: 30%; height: 14px; } .sk-lg { width: 55%; height: 28px; }
.sk-card { height: 76px; border-radius: var(--radius-lg); } .sk-btn { width: 60%; height: 40px; border-radius: var(--radius-full); }
.sk-mine { height: 260px; border-radius: var(--radius-lg); } .sk-hh { height: 150px; border-radius: var(--radius-lg); }

/* ---------- header buttons, bell and nudges ---------- */
.top-btns { display: flex; gap: var(--space-2); }
.bell { position: relative; }
.badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--due-bg); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; border: 2px solid var(--bg-grouped); }
.checkin-strip { padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); border-left: 4px solid var(--due-bg); }
.cs-head { display: flex; align-items: center; gap: var(--space-2); color: var(--due-bg); }
.cs-head b { color: var(--label); font-weight: var(--weight-semibold); white-space: nowrap; }
.cs-head small { white-space: nowrap; }
.cs-head small { margin-left: auto; color: var(--label-secondary); font-size: var(--text-footnote); }
.cs-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cs-chip { min-height: 40px; padding: 4px 14px; border-radius: var(--radius-full); border: 0; background: var(--hh, var(--tint)); color: var(--hh-ink, #fff); box-shadow: inset 0 0 0 1.5px var(--hh-edge, transparent); font-weight: var(--weight-semibold); font-size: var(--text-footnote); text-align: left; line-height: 1.25; transition: transform var(--dur-fast) var(--ease); }
.cs-chip:active { transform: scale(.97); }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.alert-list li { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; border-bottom: 0.5px solid var(--separator); color: var(--label); }
.alert-list li .ic { color: var(--due-bg); margin-top: 2px; }

/* ---------- each household in its own green ---------- */
.hh-row { --hh: var(--tint); }
.hh { border-top: 0; overflow: hidden; padding: 0; }
.hh-head { background: var(--hh); color: var(--hh-ink, #fff); box-shadow: inset 0 -1.5px 0 var(--hh-edge, transparent); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); }
.hh-title small { color: rgba(255, 255, 255, 0.82); }
.hh .msg-btn { background: color-mix(in srgb, var(--hh-ink, #fff) 16%, transparent); color: var(--hh-ink, #fff); }
.hh-tiles { padding: var(--space-2); background: var(--hh-wash, transparent); }
.hh-row .tile { background: linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)), var(--hh); }
.hh-row .face.tile-img { color: var(--hh); background: transparent; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hh-row .tile { background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), var(--hh); }
  :root:not([data-theme="light"]) .hh-row .face.tile-img { color: rgb(226 240 231); }
}
.mine-card { background: var(--hh, var(--tint)); color: var(--hh-ink, #fff); box-shadow: var(--shadow-card); }
.mine-card .eyebrow { color: rgba(255, 255, 255, 0.82); }
.mine-name { color: var(--hh-ink, #fff); }
.mine-tile .face.tile-img { color: var(--hh, var(--tint)); }
.hh-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--hh); flex-shrink: 0; }
.face-btn { position: relative; border: 0; background: none; padding: 0; border-radius: var(--radius-sm); }
.face-cam { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 10px; background: var(--card-bg); color: var(--tint-text); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-1); }
.face-btn::after { content: ""; position: absolute; inset: -2px; }

/* ---------- photo cropper ---------- */
.crop-box { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: var(--radius-lg); background: #000; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.crop-box:active { cursor: grabbing; }
.crop-box img { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; }
.crop-box::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: var(--space-3); width: min(100%, 320px); margin: 0 auto; color: var(--label-secondary); }
.crop-zoom input { flex: 1; accent-color: var(--tint); min-height: var(--hit); }

/* ---------- every phone: narrow screens and big text ---------- */
@media (max-width: 359px) {
  :root { --margin: 12px; }
  .tabbar a span { font-size: 10px; }
}
/* When the chart gets too narrow for its text (small phones, or large text settings), stack it:
   your household becomes a row across the top, everyone else below. */
.chart-wrap { container-type: inline-size; }
@container (max-width: 21rem) {
  .chart { grid-template-columns: 1fr; }
  .chart-others::before, .hh-row::before { display: none; }
  .mine-card { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
  .mine-head { width: 100%; }
  .mine-tile { flex: 1 1 0; width: auto; min-width: 5rem; }
}
.hh-tiles { flex-wrap: wrap; }
.hh-tiles .tile { min-width: 4.2rem; }
.tile-name { font-size: clamp(11px, 0.72rem, 14px); }

/* ---------- Face ID lock: covers everything until unlocked ---------- */
.lock-screen { position: fixed; inset: 0; z-index: 2000; }

/* ---------- Birthdays & big days: grouped by month ---------- */
.month-head { font-size: var(--text-footnote); font-weight: var(--weight-semibold, 600); color: var(--label-secondary); text-transform: uppercase; letter-spacing: .04em; margin: var(--space-3) var(--space-2) var(--space-1); }
.li.past .li-title, .li.past .li-when { color: var(--label-secondary); }
.li.past .datechip { opacity: .6; }

/* ---------- In-app message banner ---------- */
.banner { position: fixed; z-index: 1500; top: calc(env(safe-area-inset-top) + var(--space-2)); left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 2 * var(--margin, 16px))); display: flex; gap: var(--space-3); align-items: center; text-align: left; padding: var(--space-3) var(--space-4); border: 0; border-radius: var(--radius-lg); background: var(--card-bg); color: var(--label); box-shadow: var(--shadow-card), 0 8px 30px rgb(0 0 0 / .18); animation: banner-in 320ms var(--spring, ease-out) both; cursor: pointer; }
.banner-text { display: flex; flex-direction: column; min-width: 0; }
.banner-text b { font-size: var(--text-subhead, 15px); }
.banner-text span { color: var(--label-secondary); font-size: var(--text-footnote, 13px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .banner { animation: none; } }

/* ---------- Circle switcher ---------- */
.circle-switch { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; border-radius: 8px; }
.circle-switch .chev svg { transform: rotate(90deg); color: var(--label-secondary); }
.circle-switch:focus-visible { outline: 2px solid var(--tint); outline-offset: 4px; }
button.side-brand { background: none; border: 0; font: inherit; cursor: pointer; text-align: left; } /* shown only in the computer sidebar */
.circle-list .li[aria-current="true"] .li-title { color: var(--tint); }

/* ---------- Family motto, saying, goal ---------- */
.family-words { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); position: relative; }
.family-words .motto { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; font-size: 1.75rem; line-height: 1.15; color: var(--tint); }
.family-words .saying { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.family-words .saying-text { font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 1.15rem; line-height: 1.35; color: var(--label); }
.family-words .fgoal { display: flex; flex-direction: column; gap: 6px; padding-top: var(--space-3); border-top: 0.5px solid var(--separator); }
.family-words .fgoal-title { font-weight: var(--weight-semibold, 600); font-size: var(--text-body, 17px); }
.progress { display: block; height: 8px; border-radius: 4px; background: var(--fill, rgb(120 120 128 / .16)); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--tint); border-radius: 4px; }
.fw-bar { display: flex; justify-content: flex-end; margin: 0 var(--space-1) var(--space-1); }
.fw-edit { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-footnote, 13px); min-height: 32px; padding: 0 var(--space-2); }

/* ---------- Calendar tab: the year as a list ---------- */
.year-month .month-head { position: sticky; top: env(safe-area-inset-top); z-index: 2; background: var(--bg-grouped); margin: 0; padding: var(--space-3) var(--space-2) var(--space-1); }
.year-empty { margin: 0 var(--space-2); color: var(--label-tertiary, var(--label-secondary)); font-size: var(--text-footnote, 13px); }

/* ---------- Journal: swipe between days ---------- */
.paper { touch-action: pan-y; will-change: transform; }
.paper.enter-right { animation: page-in-right 200ms cubic-bezier(.2,.8,.3,1) both; }
.paper.enter-left { animation: page-in-left 200ms cubic-bezier(.2,.8,.3,1) both; }
@keyframes page-in-right { from { transform: translateX(30%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes page-in-left { from { transform: translateX(-30%); opacity: .3; } to { transform: none; opacity: 1; } }
@media (pointer: fine) { .swipe-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .paper.enter-right, .paper.enter-left { animation: none; } }
body[data-view="journal"] #main { overflow-x: clip; }

/* ---------- Album: picking, uploading, photo wall, viewer ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-height: 42vh; overflow-y: auto; border-radius: var(--radius-md, 12px); }
.pick { position: relative; aspect-ratio: 1; background: var(--fill); overflow: hidden; border-radius: 6px; }
.pick img, .pick video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick .play, .wall-img .play { position: absolute; left: 6px; bottom: 4px; color: #fff; font-size: 12px; font-style: normal; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.pick-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 13px; border: 0; padding: 0; display: grid; place-items: center; background: rgb(0 0 0 / .55); color: #fff; cursor: pointer; }
.pick.add { border: 1.5px dashed var(--separator); background: none; display: grid; place-items: center; color: var(--tint); cursor: pointer; }
.upload-card { position: fixed; z-index: 1600; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-space, 90px) + var(--space-2)); width: min(480px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 8px; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--card-bg); box-shadow: var(--shadow-card), 0 10px 30px rgb(0 0 0 / .2); }
.upload-card small { color: var(--label-secondary); }
.upload-card .progress i { transition: width 200ms linear; }
.photo-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 var(--space-1, 4px); }
@media (min-width: 700px) { .photo-wall { grid-template-columns: repeat(4, 1fr); } }
.wall-item { all: unset; cursor: pointer; display: block; }
.wall-item:focus-visible { outline: 3px solid var(--tint); outline-offset: -3px; }
.wall-img { position: relative; display: block; aspect-ratio: 1; background: var(--fill); overflow: hidden; border-radius: 4px; }
.wall-img img, .wall-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.viewer { position: fixed; inset: 0; z-index: 2100; background: #000; color: #fff; display: flex; flex-direction: column; }
.viewer-top { display: flex; align-items: center; gap: var(--space-3); padding: calc(env(safe-area-inset-top) + 8px) var(--space-3) 8px; font-size: 15px; }
.viewer-top > span { flex: 1; color: rgb(255 255 255 / .8); }
.viewer-dl { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 8px 12px; border-radius: 18px; background: rgb(255 255 255 / .14); }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding-bottom: env(safe-area-inset-bottom); }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-btn { border: 0; background: rgb(255 255 255 / .14); color: #fff; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; cursor: pointer; }
.viewer-btn.prev, .viewer-btn.next { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer-btn.prev { left: 10px; } .viewer-btn.next { right: 10px; }
@media (pointer: coarse) { .viewer-btn.prev, .viewer-btn.next { display: none; } }

/* ---------- Album: waiting for the photo library, per-photo progress ---------- */
.pick-wait { position: fixed; inset: 0; z-index: 2050; display: grid; place-items: center; background: rgb(0 0 0 / .25); padding: var(--space-5); }
.pick-wait-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; max-width: 320px; padding: var(--space-6) var(--space-5); border-radius: var(--radius-lg); background: var(--card-bg); box-shadow: var(--shadow-card), 0 10px 30px rgb(0 0 0 / .2); }
.pick-wait-card small { color: var(--label-secondary); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--tint); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.pick-bar { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 2px; background: rgb(0 0 0 / .35); overflow: hidden; }
.pick-bar i { display: block; height: 100%; width: 0; background: #fff; transition: width 200ms linear; }
.pick-ok, .pick-bad { position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 11px; display: none; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.pick-ok { background: var(--tint); }
.pick-bad { background: var(--due-bg, #C0392B); }
.pick.done .pick-bar { display: none; } .pick.done .pick-ok { display: grid; }
.pick.failed .pick-bar { display: none; } .pick.failed .pick-bad { display: grid; }

.alert-list .mute { margin-left: auto; font-size: var(--text-footnote, 13px); }

/* ---------- Plans, billing, admin ---------- */
.plan-card { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.plan-line { display: flex; flex-direction: column; gap: 2px; }
.plan-usage { display: flex; flex-direction: column; gap: 6px; }
.progress.warn i { background: var(--due-bg, #C0392B); }
.plan-pick { display: flex; flex-direction: column; gap: var(--space-2); }
.plan-opt { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); border-radius: var(--radius-md, 12px); border: 1.5px solid var(--separator); cursor: pointer; }
.plan-opt:has(input:checked) { border-color: var(--tint); background: color-mix(in srgb, var(--tint) 7%, transparent); }
.plan-opt > span { display: flex; flex-direction: column; gap: 2px; }
.plan-opt .price { color: var(--tint); font-weight: 600; }
.plan-opt small { color: var(--label-secondary); }
.plan-notice { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); }
.plan-notice p { margin: 0; flex: 1; font-size: var(--text-subhead, 15px); }
.plan-switch { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; padding: var(--space-4); }
.plan-switch > div { display: flex; flex-direction: column; gap: 2px; }
.plan-switch small { color: var(--label-secondary); }
.plan-switch.on b { color: var(--tint); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--card-bg); box-shadow: var(--shadow-card); }
.stat-label { font-size: var(--text-footnote, 13px); color: var(--label-secondary); }
.stat-value { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stat small { color: var(--label-secondary); font-size: 12px; }

/* ---------- Journal lock ---------- */
.unlock-wrap { min-height: 60vh; display: grid; place-items: center; padding: var(--space-5) var(--margin, 16px); }
.unlock { max-width: 420px; width: 100%; padding: var(--space-6) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); text-align: center; }
.unlock .stack { text-align: left; }
.unlock-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 28px; background: var(--tint-soft, rgba(47,93,74,.12)); color: var(--tint); }
.recovery-code { font: 600 1.35rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-align: center; padding: var(--space-4); border-radius: var(--radius-md, 12px); background: var(--fill); user-select: all; -webkit-user-select: all; word-break: break-all; margin: 0; }
.danger-link { color: var(--due-bg, #C0392B) !important; font-size: var(--text-footnote, 13px); }

/* ---------- circle color picker ---------- */
.swatches { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: var(--space-2) var(--space-1); }
.swatches legend { padding: 0; margin-bottom: var(--space-2); font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--label-secondary); }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: var(--hit); cursor: pointer; font-size: var(--text-caption1); color: var(--label-secondary); text-align: center; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); transition: transform var(--dur-fast) var(--ease); }
.swatch input:checked + .sw-dot { box-shadow: 0 0 0 3px var(--card-bg, #fff), 0 0 0 5px var(--sw); transform: scale(0.92); }
.swatch input:checked ~ .sw-name { color: var(--label); font-weight: var(--weight-semibold); }
.swatch input:focus-visible + .sw-dot { outline: 2px solid var(--link, #0a84ff); outline-offset: 5px; }
/* Each chat takes its household's shade. */
.convo[style*="--chat"] .msg.mine .bubble, .convo[style*="--chat"] .composer .send { background: var(--chat); color: var(--chat-ink, #fff); }
.convo[style*="--chat"] .convo-head { box-shadow: inset 0 -3px 0 var(--chat); }
.convo[style*="--chat"] .composer textarea:focus { border-color: var(--chat); }

/* ---------- profile photos: square, filled, same size everywhere ---------- */
/* Every person's box is a square photo (the cropper makes square photos, so nothing is cut off) with the name under it.
   Households show their people at one size from the left; any room left over is a light shade of the household color. */
/* One size for everyone: the width of a photo in your household's column (or a third of the row when stacked). */
.chart { --tile: calc(clamp(100px, 18vw, 150px) - 16px); }
@container (max-width: 21rem) {
  .chart { --tile: calc((100cqw - 28px) / 3); }
  .mine-card { gap: 6px; }
  .mine-tile { flex: 0 0 var(--tile); width: var(--tile); min-width: 0; }
}
.tile-img, .face.tile-img, .mine-tile .tile-img, .mine-tile .face.tile-img { height: auto; aspect-ratio: 1 / 1; }
.face img.face-pic { width: 100%; height: 100%; object-fit: cover; }
.hh-tiles { --hh-wash: color-mix(in srgb, var(--hh) 12%, var(--card-bg)); justify-content: flex-start; }
.hh-tiles .tile, .hh-row .hh-tiles .tile { flex: 0 0 var(--tile); width: var(--tile); min-width: 0; }
.hh-row .tile { background: var(--card-bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.hh-row .face.tile-img:not(:has(img)), .mine-tile .face.tile-img:not(:has(img)) { background: color-mix(in srgb, var(--hh, var(--tint)) 16%, var(--card-bg)); }

/* ---------- family tree (Family tab) ---------- */
/* The head of the circle sits at the left; each generation under it steps in a little, with a connector line. */
.tree { container-type: inline-size; display: flex; flex-direction: column; gap: var(--space-3); }
.tree { --step: clamp(16px, 6cqw, 34px); --tile: clamp(86px, 29cqw, 132px); }
.tree-row { position: relative; margin-left: calc(var(--depth, 0) * var(--step)); }
.tree .hh-row::before { display: none; }
.tree-row:not([style*="--depth:0"])::before {
  content: ""; position: absolute; z-index: 0;
  left: calc(var(--step) * -0.62); width: calc(var(--step) * 0.62 - 2px);
  top: calc(var(--space-3) * -1 - 6px); height: calc(var(--space-3) + 6px + 26px);
  border-left: 2px solid var(--separator); border-bottom: 2px solid var(--separator); border-bottom-left-radius: 12px;
}
.tree .hh-row.is-mine > .card { box-shadow: 0 0 0 2px var(--hh), var(--shadow-card); }
.hh-you { display: block; font-size: var(--text-caption2); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.85); }
.tree .tile-img.add { aspect-ratio: 1 / 1; height: auto; }

/* ---------- message reactions ---------- */
/* Long-press keeps the phone's text menu away (Copy is in the reaction bar instead). */
.bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.bubble-wrap { position: relative; }
.reacts { align-self: flex-start; display: inline-flex; gap: 4px; margin: -6px 0 2px 10px; padding: 2px 7px; min-height: 26px; align-items: center; border-radius: 999px; border: 2px solid var(--bg); background: var(--bg-secondary); font-size: 14px; line-height: 1; position: relative; z-index: 1; cursor: pointer; }
.msg.mine .reacts { align-self: flex-end; margin: -6px 10px 2px 0; }
.reacts b { font-size: var(--text-caption2); font-weight: var(--weight-semibold); color: var(--label-secondary); margin-left: 2px; }
.reacts.has-mine { background: color-mix(in srgb, var(--chat, var(--tint)) 18%, var(--bg-secondary)); }
.react-wrap { position: fixed; inset: 0; z-index: 60; }
.react-bar { position: fixed; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: var(--card-bg); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), 0 0 0 0.5px var(--separator); animation: react-in var(--dur-fast, .16s) var(--ease, ease-out); }
.react-bar button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 26px; line-height: 1; display: flex; align-items: center; justify-content: center; color: var(--label-secondary); transition: transform .12s ease; }
.react-bar button:active { transform: scale(1.25); }
.react-bar button.on { background: color-mix(in srgb, var(--chat, var(--tint)) 22%, transparent); }
.react-bar .copy { font-size: 0; }
.react-big { font-size: 24px; width: 32px; text-align: center; }
@keyframes react-in { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .react-bar { animation: none; } }

/* ---------- the family as circles (Family tab) ---------- */
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 999px; background: var(--fill-tertiary); }
.seg::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--card-bg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); transition: transform .32s var(--spring, cubic-bezier(.2, .8, .2, 1)); }
.seg[data-on="list"]::before { transform: translateX(100%); }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; border-radius: 999px; min-height: 36px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--label-secondary); transition: color .2s; }
.seg button[aria-checked="true"] { color: var(--label); }
@media (prefers-reduced-motion: reduce) { .seg::before { transition: none; } }
.fam-wrap { margin-bottom: var(--space-3); }
.fam-view { position: relative; overflow: hidden; border-radius: var(--radius-lg); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--tint) 10%, var(--card-bg)), var(--card-bg) 70%); box-shadow: var(--shadow-card); }
.fam-map { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.fam-zoom { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; z-index: 3; }
.fam-zoom .icon-btn { background: var(--glass-bg, var(--card-bg)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); font-size: 20px; font-weight: 600; color: var(--label); }

/* A household bubble: a soft liquid sphere in the household's shade, slowly changing shape. */
.fam-bub { position: absolute; border: 0; padding: 0; background: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1; -webkit-tap-highlight-color: transparent; }
.fam-bub:focus-visible { outline: 3px solid var(--tint); outline-offset: 4px; }
.bub-fill { position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.85) 0 5%, rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--hh) 30%, #fff) 0%, color-mix(in srgb, var(--hh) 55%, #fff) 50%, color-mix(in srgb, var(--hh) 92%, #fff) 86%, var(--hh) 100%);
  box-shadow: inset 0 -10px 22px color-mix(in srgb, var(--hh) 45%, transparent), inset 0 6px 14px rgba(255, 255, 255, 0.55), 0 0 0 2.5px var(--card-bg), 0 8px 22px color-mix(in srgb, var(--hh) 28%, transparent);
  opacity: 0.97; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fam-bub:not(.light) .bub-fill { background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.5) 0 5%, rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--hh) 30%, #111) 0%, color-mix(in srgb, var(--hh) 50%, #111) 55%, var(--hh) 100%); }
}
.fam-bub.mine .bub-fill { box-shadow: inset 0 -10px 22px color-mix(in srgb, var(--hh) 45%, transparent), inset 0 6px 14px rgba(255, 255, 255, 0.55), 0 0 0 2.5px var(--card-bg), 0 0 0 6px color-mix(in srgb, var(--hh) 75%, #fff), 0 8px 22px color-mix(in srgb, var(--hh) 28%, transparent); }
.bub-people { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 0; }
.bub-hh { width: 100%; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--hh-ink, #fff); text-shadow: 0 1px 2px var(--hh-shadow, rgba(0, 0, 0, 0.5)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.bub-p { width: calc(var(--a) + 6px); height: calc(var(--a) + 20px); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.face.bub-face { width: var(--a); height: var(--a); border-radius: 50%; font-size: calc(var(--a) * 0.4); background: rgba(255, 255, 255, 0.92); color: var(--hh); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 2px 6px rgba(0, 0, 0, 0.15); }
.bub-name { max-width: calc(var(--a) + 12px); font-size: 13px; line-height: 1.15; font-weight: 700; color: var(--hh-ink, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px var(--hh-shadow, rgba(0, 0, 0, 0.55)); }

.bub-empty { font-size: 11px; color: #4a524d; }
.bub-due { position: absolute; z-index: 5; top: 8%; right: 8%; width: 28px; height: 28px; border-radius: 50%; background: var(--due-bg, #dc2634); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--card-bg); }
.bub-badge { position: absolute; z-index: 6; left: -8px; top: 38%; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--cel-ring); box-shadow: 0 0 0 2.5px var(--card-bg), 0 4px 12px rgba(0, 0, 0, 0.22); pointer-events: none; animation: cel-badge 1s ease-in-out var(--plays); }
@keyframes cel-badge { 0%, 100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.18) rotate(-10deg); } 70% { transform: scale(1.05) rotate(6deg); } }
/* Celebrations: on a big day the bubble comes alive for a few moments each time the page opens, then rests with a
   lit ring and its label. Only transform and opacity move (smooth on phones); nothing moves under Reduce Motion. */
.fam-bub.cel { z-index: 3; --plays: 6; }
.fam-bub.cel::before, .fam-bub.cel::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none; z-index: 0; }
/* the resting ring */
.fam-bub.cel::after { border: 5px solid var(--cel-ring); opacity: 1; }
.cel-bday { --cel-ring: #f5b301; } .cel-anniv { --cel-ring: #ff5b8a; } .cel-new { --cel-ring: #58b4f0; } .cel-big { --cel-ring: #a979f2; }
/* Birthday: a rainbow ring that turns */
.cel-bday::before { inset: -13px; background: conic-gradient(#ff5b5b, #f5b301, #3cc46a, #39a0ff, #a979f2, #ff5b8a, #ff5b5b);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px)); mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  animation: cel-spin 2.4s linear var(--plays) both; }
.cel-bday::after { opacity: 0; animation: cel-show .4s ease-out calc(2.4s * 6) forwards; }
/* Anniversary: a heartbeat */
.cel-anniv::before { border: 5px solid var(--cel-ring); animation: cel-ripple 1.3s ease-out var(--plays) both; }
/* New baby: a soft glow that breathes (a radial glow fading in and out, not a blurred shadow) */
.cel-new::before { inset: -34px; background: radial-gradient(closest-side, color-mix(in srgb, var(--cel-ring) 55%, transparent), transparent); animation: cel-breathe 2.2s ease-in-out var(--plays) both; }
/* Other big days: ripples */
.cel-big::before { border: 5px solid var(--cel-ring); animation: cel-ripple 1.8s ease-out var(--plays) both; }
.bub-sparks { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.bub-sparks i { position: absolute; bottom: 55%; left: calc(6% + var(--j) * 20%); font-style: normal; font-size: 30px; opacity: 0; animation: cel-rise 2.8s ease-out 4 both; animation-delay: calc(var(--j) * 0.55s); }
/* a glow behind the bubble (a radial gradient, not a blurred shadow), pulsing while it plays, then softly on */
.bub-halo { position: absolute; inset: -38px; border-radius: 50%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--cel-ring) 60%, transparent), transparent); opacity: 0.45; animation: cel-breathe 1.8s ease-in-out var(--plays); }
/* a pop when the page opens */
.fam-bub.cel .bub-fill { animation: cel-pop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.cel-anniv .bub-fill { animation: cel-pop .7s cubic-bezier(.3, 1.6, .5, 1) both, cel-beat 1.3s ease-in-out .7s var(--plays); }
@keyframes cel-pop { 0% { transform: scale(0.82); } 100% { transform: scale(1); } }
@keyframes cel-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes cel-show { to { opacity: 0.9; } }
@keyframes cel-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.06); } 30% { transform: scale(0.99); } 45% { transform: scale(1.04); } }
@keyframes cel-ripple { 0% { transform: scale(0.96); opacity: 0.8; } 100% { transform: scale(1.32); opacity: 0; } }
@keyframes cel-breathe { 0%, 100% { opacity: 0.25; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes cel-rise { 0% { transform: translateY(10px) scale(0.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-150px) scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fam-bub.cel::before, .bub-sparks i, .fam-bub.cel .bub-fill, .bub-halo, .bub-badge { animation: none !important; }
  .cel-bday::after { animation: none; opacity: 0.9; }
  .fam-bub.cel:not(.cel-bday)::before { opacity: 0; }
  .bub-sparks i { display: none; }
}
.hh-sheet .hh-cel { margin: 0 0 var(--space-2); padding: 8px 12px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--hh) 14%, var(--card-bg)); font-weight: 600; }
.hh-sheet .btn.wide { margin-top: var(--space-3); }

/* ---------- ☰ menu (top right) and the three bottom tabs ---------- */
.tabbar .tab-more { display: none; }
.menu-btn { position: fixed; z-index: 35; top: calc(env(safe-area-inset-top) + 14px); right: max(12px, calc((100vw - 680px) / 2 + 12px)); width: 44px; height: 44px; border-radius: 50%; border: 0.5px solid var(--glass-border, var(--separator)); display: flex; align-items: center; justify-content: center; color: var(--label);
  background: var(--glass-bg, var(--card-bg)); -webkit-backdrop-filter: blur(var(--glass-blur, 16px)) saturate(var(--glass-saturate, 1.6)); backdrop-filter: blur(var(--glass-blur, 16px)) saturate(var(--glass-saturate, 1.6)); box-shadow: var(--glass-shadow, 0 2px 10px rgba(0, 0, 0, 0.15)); }
body[data-view="chat"] .menu-btn { display: none; }
/* Room for the menu button beside each page's own header buttons. */
body.has-menu #main > header.top, body.has-menu #main > * > header.top { padding-right: calc(var(--margin) + 52px); }
.menu-wrap { position: fixed; inset: 0; z-index: 40; }
.menu-pop { position: fixed; top: calc(env(safe-area-inset-top) + 64px); right: max(12px, calc((100vw - 680px) / 2 + 12px)); min-width: 230px; padding: 6px; border-radius: 18px; background: var(--card-bg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 0 0 0.5px var(--separator); display: flex; flex-direction: column; animation: menu-in .16s ease-out; transform-origin: top right; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 0; background: none; color: var(--label); text-decoration: none; font-size: var(--text-body); font-weight: var(--weight-medium); text-align: left; }
.menu-pop a .ic, .menu-pop button .ic { color: var(--tint-text); }
.menu-pop a.on { background: var(--fill-tertiary); font-weight: var(--weight-semibold); }
.menu-pop a:active, .menu-pop button:active { background: var(--fill-tertiary); }
@keyframes menu-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu-pop { animation: none; } }
@media (min-width: 1024px) {
  .tabbar .tab-more { display: flex; }
  .menu-btn { display: none; }
  body.has-menu #main > header.top, body.has-menu #main > * > header.top { padding-right: var(--margin); }
}

.warn-text { color: var(--due-bg, #c4232f); }

/* ---------- year in review video ---------- */
.yr-wrap { position: fixed; inset: 0; z-index: 300; background: #000; display: flex; align-items: stretch; justify-content: center; }
.yr { width: min(100%, 520px); display: flex; flex-direction: column; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px calc(env(safe-area-inset-bottom) + 14px); color: #fff; }
.yr-top { display: flex; align-items: center; gap: 10px; }
.yr-top .icon-btn { color: #fff; background: rgba(255, 255, 255, 0.14); }
.yr-top .select-pill { color: #111; }
.yr-music { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-footnote); min-height: var(--hit); }
.yr-music input { width: 20px; height: 20px; accent-color: var(--tint); }
.yr-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.yr-stage canvas { max-height: 100%; max-width: 100%; height: auto; aspect-ratio: 9 / 16; flex: 1 1 auto; min-height: 0; border-radius: 22px; background: #111; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.yr-status { margin: 0; min-height: 20px; font-size: var(--text-footnote); color: rgba(255, 255, 255, 0.8); text-align: center; }
.yr-actions { display: flex; gap: 10px; justify-content: center; }
.yr-actions .btn { flex: 1; max-width: 220px; }
.yr-actions .btn.ghost { background: rgba(255, 255, 255, 0.14); color: #fff; }
.yr-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.yr-seg { color-scheme: light; }
.yr-seg::before { width: calc((100% - 6px) / var(--n, 2)); }
.yr-seg[data-on="180"]::before, .yr-seg[data-on="phone"]::before { transform: translateX(100%); }
.yr-seg[data-on="300"]::before { transform: translateX(200%); }
.yr-seg[data-on="60"]::before, .yr-seg[data-on="tv"]::before { transform: none; }
.yr .seg { background: rgba(255, 255, 255, 0.14); }
.yr .seg::before { background: rgba(255, 255, 255, 0.92); }
.yr .seg button { color: rgba(255, 255, 255, 0.85); }
.yr .seg button[aria-checked="true"] { color: #111; }
.yr-stage canvas { aspect-ratio: auto; }
.yr.wide .yr-stage canvas { width: 100%; height: auto; flex: 0 0 auto; }
.yr-stage:fullscreen { background: #000; justify-content: center; }
.yr-stage:fullscreen canvas { width: 100vw; height: 100vh; max-width: none; max-height: none; object-fit: contain; border-radius: 0; box-shadow: none; }
.yr-stage:fullscreen .yr-status { display: none; }
.yr-help { font-size: var(--text-footnote); line-height: 1.45; color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 8px 12px; }
.yr-help summary { cursor: pointer; font-weight: 600; color: #fff; min-height: 32px; display: flex; align-items: center; }
.yr-help p { margin: 6px 0; }
.yr-actions .btn { padding: 0 12px; }
.yr-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; text-align: left; color: var(--label); }
.yr-card-ic { font-size: 30px; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--tint-soft); }
.yr-card .li-main { flex: 1; min-width: 0; }
/* the player scrolls instead of squeezing the video; the video keeps its shape */
.yr { overflow-y: auto; }
.yr-stage { flex: 0 0 auto; }
.yr .yr-stage canvas { flex: 0 0 auto; max-height: none; }
.yr.wide .yr-stage canvas { width: 100%; height: auto; }
.yr:not(.wide) .yr-stage canvas { height: min(60vh, 820px); width: auto; max-width: 100%; }
.yr-top .select-pill { background-color: rgba(255, 255, 255, 0.92); color: #111; }

/* ---------- storage left (Album page) ---------- */
.storage-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.storage-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.storage-card .progress { display: block; height: 8px; border-radius: 999px; background: var(--fill-tertiary); overflow: hidden; }
.storage-card .progress i { display: block; height: 100%; border-radius: inherit; background: var(--tint); }
.storage-card.near .progress i { background: #e69a00; }
.storage-card.full .progress i { background: var(--due-bg, #c4232f); }
.storage-note { margin: 0; font-size: var(--text-footnote); color: var(--label-secondary); }
.storage-card.full .storage-note { color: var(--due-bg, #c4232f); }
.storage-card .btn { align-self: flex-start; }

/* ---------- two-tone circles: light household shades (white, cream, gold, orange) ---------- */
.fam-bub.light .bub-fill { box-shadow: inset 0 -10px 22px color-mix(in srgb, var(--hh-edge) 14%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--hh-edge) 45%, transparent), 0 0 0 2.5px var(--card-bg), 0 8px 22px rgba(0, 0, 0, 0.12); }
.fam-bub.light.mine .bub-fill { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hh-edge) 45%, transparent), 0 0 0 2.5px var(--card-bg), 0 0 0 6px var(--hh-edge), 0 8px 22px rgba(0, 0, 0, 0.12); }
.hh-swatch { box-shadow: inset 0 0 0 1.5px var(--hh-edge, transparent); }
.mine-card .eyebrow, .hh-title small { color: color-mix(in srgb, var(--hh-ink, #fff) 82%, transparent); }
/* two-tone swatches in the color pickers */
.swatch[style*="--sw2"] .sw-dot { background: linear-gradient(135deg, var(--sw) 0 50%, var(--sw2) 50% 100%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
.swatch[style*="--sw2"] input:checked + .sw-dot { box-shadow: 0 0 0 3px var(--card-bg, #fff), 0 0 0 5px var(--sw); }

/* initials in a household's color stay readable on light shades (white, cream, gold) */
.face.bub-face, .hh-row .face.tile-img, .mine-tile .face.tile-img { color: var(--hh-text, var(--hh, var(--tint))); }
.convo[style*="--chat"] .msg.mine .bubble, .convo[style*="--chat"] .composer .send { box-shadow: inset 0 0 0 1.5px var(--chat-edge, transparent); }

/* ---------- "turn on notifications" card ---------- */
.push-card { display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; }
.push-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--tint-soft); color: var(--tint-text); }
.push-main { flex: 1; min-width: 0; }
.push-main b { display: block; font-size: var(--text-headline); }
.push-main p { margin: 4px 0 10px; color: var(--label-secondary); font-size: var(--text-footnote); line-height: 1.4; }
.push-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- faster album uploads ---------- */
.pick-pic { position: absolute; inset: 0; display: block; }
.pick-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-wait-ic, .pick-vid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--fill-tertiary); color: var(--label-secondary); }
.pick-vid i { font-style: normal; font-size: 20px; }
.pick-vid small { font-size: 10px; }
.pick-wait-ic .spinner { width: 18px; height: 18px; }
.upload-btns { display: flex; gap: 8px; }
.upload-btns:empty { display: none; }
/* each picked item keeps a square shape even before its preview is ready */
.pick { align-self: start; }
.pick::before { content: ""; display: block; padding-top: 100%; }
.pick-grid { grid-auto-rows: max-content; }
.row-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pick.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pick.add::before { display: none; }
.pick.add { aspect-ratio: 1; }
.pick.add small { font-size: 11px; }
.pick-wait-card .btn { align-self: center; }

/* ---------- album list: a compact grid of covers (3 across on a phone, more on wider screens) ---------- */
.album-grid { grid-template-columns: repeat(auto-fill, minmax(min(30%, 104px), 1fr)); gap: 14px 10px; }
@media (min-width: 700px) { .album-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.album-card { background: none; box-shadow: none; border-radius: 0; overflow: visible; gap: 6px; }
.album-card .cover { aspect-ratio: 1 / 1; border-radius: 14px; box-shadow: var(--shadow-card); }
.album-meta { padding: 0 2px; gap: 0; min-width: 0; }
.album-meta b { font-size: var(--text-footnote); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.album-meta small { font-size: var(--text-caption1, 12px); }
/* a slimmer storage line above the album grid */
.storage-card { padding: 9px 12px; gap: 6px; }
.storage-line b { font-size: var(--text-footnote); }
.storage-card .progress { height: 6px; }
.row-links { margin-bottom: 4px; }

/* ---------- switching circles ---------- */
body.switching #main { opacity: 0.45; pointer-events: none; transition: opacity .18s ease-out; }
.switch-note { position: fixed; z-index: 60; left: 50%; top: 40%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--card-bg); color: var(--label); font-weight: var(--weight-semibold); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.switch-note .spinner { width: 18px; height: 18px; border-width: 2.5px; }
/* the page cross-fades into the other circle; the tab bar stays put */
.tabbar { view-transition-name: tabbar; }
.menu-btn { view-transition-name: menubtn; }
::view-transition { pointer-events: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: ease-out; }

/* Nudges you can clear */
.alert-list li > span { flex: 1; min-width: 0; }
.alert-list li > .btn { flex: none; align-self: center; }
.alert-list li .mute { margin-left: 6px; }
.cs-head .cs-done { margin-left: 10px; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 600; }

/* Month / Day / Year pickers (birthdays and anniversaries) */
.mdy-field { border: 0; padding: 0; margin: 0; }
.mdy-field legend { padding: 0; margin-bottom: 6px; }
.mdy { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.mdy select, .mdy input { min-height: var(--hit); width: 100%; min-width: 0; border: 0; border-radius: var(--radius-sm); padding: 10px 12px; background: var(--fill-tertiary); color: var(--label); font: inherit; font-size: max(16px, var(--text-body)); font-weight: var(--weight-regular); -webkit-appearance: none; appearance: none; }
.mdy select { background: var(--fill-tertiary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 28px; }
.mdy select:focus, .mdy input:focus { outline: none; box-shadow: var(--focus-ring); }

/* Everyone's birthdays on one screen */
.bd-group { margin: 6px 0 2px; font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--label-secondary); text-transform: uppercase; letter-spacing: .04em; }
.bd-row { display: grid; gap: 6px; padding: 10px 0; border-bottom: 0.5px solid var(--separator); }
.bd-row .bd-name { display: flex; align-items: center; gap: 10px; font-weight: var(--weight-semibold); color: var(--label); }
.bd-row .bd-name .face { width: 30px; height: 30px; font-size: 13px; flex: none; }
.bd-row .bd-name small { color: var(--label-secondary); font-weight: var(--weight-regular); margin-left: auto; }
.sheet [hidden] { display: none !important; }

/* Year in review: full screen (works on iPhone too) */
.yr-theater .yr-stage { position: fixed; inset: 0; z-index: 5; background: #000; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; }
.yr-theater .yr-stage canvas { flex: none !important; max-width: none !important; max-height: none !important; aspect-ratio: auto !important; border-radius: 0; box-shadow: none; }
.yr-theater .yr-status { display: none; }
.yr-wrap:fullscreen { background: #000; }
.yr-fullbar { position: fixed; top: calc(env(safe-area-inset-top) + 12px); right: calc(env(safe-area-inset-right) + 12px); z-index: 6; display: flex; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .25s ease-out; }
.yr-fullbar.on { opacity: 1; pointer-events: auto; }
.yr-fullbar button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(30, 30, 32, 0.72); color: #fff; font: 600 15px -apple-system, system-ui, sans-serif; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
/* Video turned sideways on an upright phone: the buttons sit where the top right is for someone watching it. */
.yr-fullbar.turned { top: auto; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px); transform-origin: 100% 100%; transform: rotate(90deg) translateY(100%); }
.yr-theater .yr-stage canvas { transition: opacity .2s ease-out; }
.yr-fullbar [hidden] { display: none; }
.yr-songbtn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: var(--text-footnote); font-weight: 600; cursor: pointer; }
.yr-songbtn:focus-within { box-shadow: var(--focus-ring); }
.nudge-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nudge-row { display: flex; gap: var(--space-3); align-items: flex-start; flex: 1; min-width: 0; cursor: pointer; }
.nudge-row > span { flex: 1; min-width: 0; }
.nudge-pick { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--tint); }
.alert-list li { align-items: center; }
.fam-zoom .icon-btn:disabled { opacity: 0.35; }
.fam-view.zoomed { cursor: grab; }

/* Get set up (new members) */
.setup-card { padding: 4px 0 6px; }
.setup-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 4px; }
.setup-head b { font-weight: var(--weight-semibold); }
.setup-head small { color: var(--label-secondary); margin-right: auto; }
.setup-step { width: 100%; text-align: left; background: none; border: 0; color: inherit; text-decoration: none; }
.setup-step.done .li-title { color: var(--label-secondary); text-decoration: line-through; }
.setup-tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--separator-opaque, #c7c7cc); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.setup-tick.on { background: var(--tint); border-color: var(--tint); color: var(--on-tint); }
.fam-switch { margin: -6px 0 4px; }
/* Family settings sections */
.seg[role="tablist"] { display: grid; width: 100%; }
.seg[role="tablist"]::before { width: calc((100% - 6px) / 3); }
.seg[data-on="circle"]::before { transform: translateX(100%); }
.seg[data-on="plan"]::before { transform: translateX(200%); }
.pm-row { flex-wrap: nowrap; }
.pm-row .li-main { flex: 1; min-width: 0; }
.pm-row .btn.sm { padding: 0 12px; flex: none; }
.pm-row .icon-btn { flex: none; }
/* My page: rarely changed settings, folded away */
.more-settings > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--card-bg); box-shadow: var(--shadow-card); cursor: pointer; font-weight: var(--weight-semibold); min-height: 44px; }
.more-settings > summary::-webkit-details-marker { display: none; }
.more-settings > summary::after { content: "›"; margin-left: auto; font-size: 22px; color: var(--label-secondary); transition: transform .2s; }
.more-settings[open] > summary::after { transform: rotate(90deg); }
.more-settings > summary small { flex-basis: 100%; order: 3; color: var(--label-secondary); font-weight: var(--weight-regular); font-size: var(--text-footnote); }
.more-settings > section { margin-top: 18px; }
.share-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 12px; }
.share-menu[hidden] { display: none; }
/* Every small button has a full finger-sized (44 px) tap area, even where it looks smaller. */
.icon-btn.sm, .btn.sm, .select-pill, .linkish.mute { position: relative; }
.icon-btn.sm::after, .btn.sm::after { content: ""; position: absolute; inset: -2px; min-height: 44px; min-width: 44px; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; }
.linkish.mute { min-height: 44px; padding: 0 8px; }
.fam-zoom .icon-btn.sm { width: 44px; height: 44px; }

/* Goal progress (journal) */
.gp-seg { display: grid; width: 100%; }
.gp-seg[data-on="month"]::before { transform: translateX(100%); }
.gp-nav { display: flex; align-items: center; gap: 10px; }
.gp-when { flex: 1; text-align: center; display: flex; flex-direction: column; }
.gp-when small { color: var(--label-secondary); font-size: var(--text-footnote); }
.gp-card { padding: 4px 16px; }
.gp-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 0.5px solid var(--separator); flex-wrap: wrap; }
.gp-row:last-child { border-bottom: 0; }
.gp-name { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.gp-name small { color: var(--label-secondary); font-size: var(--text-footnote); }
.gp-week { display: flex; gap: 4px; }
.gp-day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--label-secondary); }
.gp-day i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--separator-opaque, #c7c7cc); display: flex; align-items: center; justify-content: center; }
.gp-day.on i { background: var(--tint); border-color: var(--tint); color: var(--on-tint); }
.gp-day.off i { opacity: .35; border-style: dashed; }
.gp-day.now small { color: var(--tint-text); font-weight: 700; }
.gp-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--fill-tertiary); font-size: var(--text-footnote); font-weight: 600; color: var(--label-secondary); }
.gp-pill.on { background: var(--tint); color: var(--on-tint); }
.gp-pill.sm { min-height: 26px; padding: 0 9px; }
.gp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gp-bar { flex: 1 1 80px; height: 8px; border-radius: 4px; background: var(--fill-tertiary); overflow: hidden; }
.gp-bar i { display: block; height: 100%; background: var(--tint); border-radius: 4px; }
.gp-pct { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.gp-cal { padding: 12px 0 4px; border-bottom: 0.5px solid var(--separator); }
.gp-dow, .gp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.gp-dow span { text-align: center; font-size: 11px; color: var(--label-secondary); padding-bottom: 4px; }
.gp-cell { aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--label); font-size: var(--text-footnote); font-weight: 600;
  background: color-mix(in srgb, var(--tint) calc(var(--lv) * 85%), var(--fill-tertiary)); }
.gp-cell.dark { color: var(--on-tint); }
.gp-cell.future { opacity: .4; pointer-events: none; }
.gp-cell.now { box-shadow: inset 0 0 0 2px var(--tint); }
.gp-cell.blank { background: none; }
