/* Rachel's STATIC: STATIC's look (theme.css, Barlow), but big, plain and calm.
   Mobile first: built for a small iPhone (375px), still fine on iPad and desktop. Light by default. */
/* Colors, fonts and both themes come from ../theme.css (loaded first); index.html sets data-theme. */
:root { --text: 20px; }   /* her Text size slider sets this */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; background: var(--rack); color: var(--ink);
       font: 400 var(--text)/1.45 var(--font); -webkit-text-size-adjust: 100%;
       -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cat6); outline-offset: 2px; }

.screen { max-width: 640px; margin: 0 auto;
          padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
                   max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.center { min-height: 100dvh; display: grid; place-items: center; }
h1 { font-size: 1.6em; font-weight: 600; line-height: 1.2; margin: 12px 0 20px; }
h2 { font-size: 1.15em; font-weight: 600; margin: 0 0 8px; }
.muted { color: var(--steel); }
.big { font-size: 1.2em; }
.stack { display: grid; gap: 18px; margin-bottom: 20px; }

.field { display: grid; gap: 6px; font-weight: 500; }
.field input, .field textarea, .field select, .to-box input, .mail-help textarea {
  width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px;
  background: var(--panel); font-size: 1em; }
.field input:focus, .to-box input:focus, .mail-help textarea:focus { border-color: var(--cat6); outline: none; }

.big-btn { width: 100%; min-height: 60px; border: 0; border-radius: 12px; font-size: 1.1em; font-weight: 600; }
.primary { background: var(--cat6); color: var(--on-cat6); }
.danger { background: var(--live); color: var(--on-live); }
.big-btn:disabled { opacity: 0.55; }
.msg { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bad-bg); font-weight: 500; }

.back { min-height: 48px; padding: 0 4px; border: 0; background: none; color: var(--cat6); font-size: 1.05em; font-weight: 600; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.card p { margin: 0 0 14px; }

.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { min-height: 72px; padding: 14px 18px; border: 2px solid var(--line); border-radius: 14px;
        background: var(--panel); text-align: left; font-size: 1.1em; font-weight: 600; }
.tile:active { background: var(--panel-2); }

/* ==== Rachel Edit 3: her app ==================================================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.secondary { background: var(--panel-2); color: var(--ink); }
.link-btn { min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--cat6); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.offline { position: sticky; top: 0; z-index: 5; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
           background: var(--warn-bg); color: var(--ink); font-weight: 500; text-align: center; }
.bar { display: flex; justify-content: space-between; align-items: center; }

/* home */
.tile { position: relative; display: flex; align-items: center; width: 100%; }
.tile .count { margin-left: auto; min-width: 32px; padding: 2px 10px; border-radius: 999px; background: var(--live); color: var(--on-live); text-align: center; font-size: 0.85em; }
.suggested { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin: -6px 0 16px; scrollbar-width: none; }
.chip { flex: none; min-height: 48px; padding: 8px 16px; border: 2px solid var(--cat6); border-radius: 999px;
        background: var(--panel); color: var(--cat6); font-weight: 600; text-align: left; }
.suggested .chip { background: var(--cat6); color: var(--on-cat6); }

/* chat */
.chat-screen { display: flex; flex-direction: column; min-height: 100dvh; }
.chat-screen h1 { margin-bottom: 12px; }
.intro { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.intro p { width: 100%; margin: 0; }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.msg-me, .msg-static { max-width: 92%; padding: 12px 14px; border-radius: 16px; }
.msg-me { align-self: flex-end; background: var(--cat6); color: var(--on-cat6); border-bottom-right-radius: 4px; }
.msg-static { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-me p, .msg-static p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-static .more { margin-top: 10px; }
.msg-static .done { margin-top: 10px; font-weight: 600; }
.msg-static.thinking { color: var(--steel); }
.msg-static.error { background: var(--bad-bg); }
.action-btn { display: block; width: 100%; min-height: 52px; margin-top: 10px; border: 0; border-radius: 10px; font-weight: 600; }
.card-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.card-note.bad { background: var(--bad-bg); } .card-note.warn { background: var(--warn-bg); } .card-note.ok { background: var(--ok-bg); }
.composer { position: sticky; bottom: 0; display: grid; gap: 10px; margin: 0 -16px; padding: 12px 16px;
            padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--rack); border-top: 1px solid var(--line); }
.composer textarea { width: 100%; min-height: 64px; max-height: 40vh; padding: 12px 14px; border: 2px solid var(--line);
                     border-radius: 12px; background: var(--panel); font-size: 1em; resize: vertical; }
.composer textarea:focus { border-color: var(--cat6); outline: none; }
.composer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.composer-extra:empty { display: none; }
.mic, .send { min-height: 60px; border: 0; border-radius: 12px; font-size: 1.05em; font-weight: 600; }
.mic { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--panel-2); color: var(--ink); }
.mic svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mic.on { background: var(--live); color: var(--on-live); }
.send:disabled { opacity: 0.55; }

/* lists: history, notifications, memory */
.list { display: grid; gap: 10px; margin-top: 12px; }
.day { margin: 14px 0 0; font-size: 1em; color: var(--steel); }
.row { display: flex; align-items: stretch; gap: 8px; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 2px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--line);
            border-radius: 12px; background: var(--panel); text-align: left; }
.static-row { cursor: default; }
.row-title { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { color: var(--steel); font-size: 0.85em; overflow-wrap: anywhere; }
.row-del { flex: none; min-width: 84px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); font-weight: 600; }
.note { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.note h2 { margin: 2px 0 4px; }
.note p { margin: 0; }
.note.unread { border-left: 6px solid var(--cat6); }
.note.safety { border-left: 6px solid var(--live); }

/* settings */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices button { min-height: 56px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 600; }
.choices button[aria-checked="true"] { border-color: var(--cat6); background: var(--cat6); color: var(--on-cat6); }
input[type=range] { width: 100%; height: 44px; accent-color: var(--cat6); }
.switches { display: grid; gap: 4px; }
.switch { display: flex; align-items: center; gap: 14px; min-height: 52px; font-weight: 500; }
.switch input { width: 28px; height: 28px; flex: none; accent-color: var(--cat6); }

/* Undo bar */
.undo-bar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20;
            display: flex; align-items: center; gap: 12px; max-width: 616px; margin: 0 auto; padding: 10px 10px 10px 16px;
            border-radius: 14px; background: var(--ink); color: var(--rack); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.undo-bar span { flex: 1; font-weight: 500; }
.undo-btn { min-height: 52px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--cat6); color: var(--on-cat6); font-weight: 600; }


/* Rachel Edit 4: accounts in Settings */
.conn { display: grid; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.conn h3 { margin: 0; font-size: 1.05em; }
.conn p { margin: 0; }

/* Rachel Edit 5: verdicts */
.result { display: grid; gap: 12px; margin-top: 16px; }
.screen > .field, .screen > .big-btn { margin-bottom: 14px; }
.verdict { padding: 16px; border-radius: 14px; border: 2px solid var(--line); }
.verdict p { margin: 8px 0 0; }
.verdict-word { font-size: 1.6em; font-weight: 600; line-height: 1.1; }
.verdict.ok { background: var(--ok-bg); border-color: var(--ok); }
.verdict.warn { background: var(--warn-bg); border-color: var(--warn); }
.verdict.bad { background: var(--bad-bg); border-color: var(--live); }
.pre { white-space: pre-line; }
.steps { padding-left: 1.2em; margin: 8px 0; }
.steps li { margin-bottom: 6px; }

/* Rachel Edit 6: email */
.note .big-btn { margin-top: 10px; }
.link-as-btn { display: flex; align-items: center; justify-content: center; margin-top: 10px; text-decoration: none; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo { display: grid; gap: 4px; padding: 0; border: 0; background: none; text-align: left; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--panel-2); }
.photo-full { width: 100%; border-radius: 12px; }

/* Rachel Edit 8: inventory */
.inv { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.inv img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--panel-2); }
.inv > button { grid-column: 1 / -1; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
.inv h2 { margin: 0 0 4px; }
.inv p { margin: 0 0 4px; }

/* Rachel Edit 9 */
.field select { width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 1em; }

/* ==== Rachel look v10: warmer light theme, folding sections, gentle motion ====================== */
:root, :root[data-theme="light"] {
  --rack: #F6F4EF;        /* warm off-white page, like paper */
  --panel-2: #EEEBE4; --line: #E2DED5; --ink: #1C2228; --steel: #55606A; --cat6: #1E63B5;
  --shadow: 0 1px 2px rgba(40, 32, 20, .06), 0 2px 8px rgba(40, 32, 20, .05);
  --chev: #A9A39A;
  --t-blue: #DDE9F8; --t-red: #FBE3E1; --t-amber: #FCEFD2; --t-green: #DDF1E5; --t-gray: #ECE9E3;
}
:root[data-theme="dark"] {
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --chev: #6B7680;
  --t-blue: #22364D; --t-red: #46282A; --t-amber: #43391F; --t-green: #1F3A2D; --t-gray: #2C363E;
}
h1 { letter-spacing: -0.01em; }
#home-hello { margin-top: 20px; }
#home-hello .date { display: block; margin-bottom: 4px; font-size: .5em; font-weight: 500; color: var(--steel); letter-spacing: 0; }

/* white on warm, a soft shadow instead of a grey outline */
.card, .note, .row-main, .msg-static, .tile { border-color: transparent; box-shadow: var(--shadow); }
.composer textarea, .field input, .field textarea, .field select, .choices button { border-color: var(--line); }
.big-btn, .mic, .send { border-radius: 14px; }
.primary { box-shadow: 0 2px 6px rgba(30, 99, 181, .25); }
.msg-me, .msg-static { border-radius: 18px; }
.composer { background: color-mix(in srgb, var(--rack) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* home: Talk on top, shortcuts, then groups with an icon and a chevron on every button */
.tiles { gap: 22px; grid-template-columns: 1fr !important; }
.tile:has(.ico) { gap: 14px; }
.group-box { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.group-box .tile { min-height: 68px; border: 0; border-radius: 0; box-shadow: none; padding: 10px 14px; }
.group-box .tile + .tile { border-top: 1px solid var(--line); }
.tile .ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.15em; }
.tile .label { flex: 1; }
.tile .chev { color: var(--chev); font-size: 1.5em; font-weight: 400; line-height: 1; transition: transform .15s; }
.tile:active .chev { transform: translateX(3px); }
.tile .count { margin-left: 0; animation: pulse 2s ease 0.4s 2; }
.tone-blue .ico { background: var(--t-blue); } .tone-red .ico { background: var(--t-red); }
.tone-amber .ico { background: var(--t-amber); } .tone-green .ico { background: var(--t-green); } .tone-gray .ico { background: var(--t-gray); }
.tile.hero { min-height: 84px; border: 0; border-radius: 18px; background: var(--cat6); color: var(--on-cat6); font-size: 1.2em; }
.tile.hero .ico { background: rgba(255,255,255,.18); }
.tile.hero .chev { color: rgba(255,255,255,.8); }
.suggested .chip { box-shadow: var(--shadow); }

/* folding sections: tap the heading; a chevron turns and a hint says what's hidden */
.fold-head { display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0; cursor: pointer; user-select: none; -webkit-user-select: none; }
.fold-hint { display: none; margin-left: auto; white-space: nowrap; padding: 2px 12px; border-radius: 999px; background: var(--panel-2); color: var(--steel);
             font-size: .75em; font-weight: 600; letter-spacing: 0; text-transform: none; }
.fold-alert .fold-hint { background: var(--live); color: var(--on-live); }
.fold-chev { margin-left: auto; color: var(--chev); font-size: 1.4em; line-height: 1; transform: rotate(90deg); transition: transform .25s ease; }
.closed > .fold-head .fold-hint { display: inline-block; }
.closed > .fold-head .fold-hint + .fold-chev { margin-left: 0; }
.closed > .fold-head .fold-chev { transform: rotate(0deg); }
.fold.closed > :not(.fold-head) { display: none; }
.fold:not(.closed) > :not(.fold-head) { animation: fold-in .25s ease both; }
.group > .fold-head { margin: 0 4px 6px; }
.card.fold > .fold-head { margin: -6px 0 2px; }
.card.fold.closed { padding-bottom: 10px; padding-top: 10px; }
.plain { display: grid; gap: 10px; margin: 18px 0; }
.plain > .fold-head { font-size: 1.15em; }
.note.fold > .fold-head { font-size: 1.15em; }
.note h3 { margin: 2px 0 4px; font-size: 1.05em; }

/* chat: three moving dots while STATIC thinks; Tell me more and Copy side by side */
.dots { display: inline-flex; gap: 6px; padding: 6px 2px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.msg-actions:empty { display: none; }
.msg-me, .msg-static { animation: rise .25s ease both; }

/* scam answers: a coloured stripe and a round badge, so the answer reads at a glance */
.verdict { border-width: 0; border-left-width: 8px; border-style: solid; box-shadow: var(--shadow); animation: pop .35s cubic-bezier(.2, 1.3, .5, 1) both; }
.verdict-word { display: flex; align-items: center; gap: 12px; }
.badge { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; font-size: .7em; color: #fff; }
.verdict.ok .badge { background: var(--ok); } .verdict.warn .badge { background: var(--warn); } .verdict.bad .badge { background: var(--live); }

/* the photo picker looks like a button, not the browser's grey box */
input[type=file] { width: 100%; padding: 14px; border: 2px dashed var(--line); border-radius: 12px; background: var(--panel); }
input[type=file]::file-selector-button { margin-right: 12px; padding: 10px 16px; border: 0; border-radius: 10px; background: var(--panel-2); font: inherit; font-weight: 600; color: var(--ink); }

.note.unread { border-left-color: var(--cat6); }
.note.safety { border-left: 6px solid var(--live); }

/* motion: screens slide in (back slides the other way), buttons give a little when pressed */
.screen { animation: enter .28s cubic-bezier(.2, .8, .2, 1) both; }
.nav-back .screen { animation-name: enter-back; }
.big-btn, .tile, .chip, .choices button, .row-del, .undo-btn { transition: transform .12s ease; }
.big-btn:active, .tile:active, .chip:active, .choices button:active, .row-del:active, .undo-btn:active { transform: scale(.97); }
.undo-bar { animation: slide-up .3s cubic-bezier(.2, .9, .3, 1.1) both; }
.to-top { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 15; min-height: 52px; padding: 0 18px;
          border: 0; border-radius: 999px; background: var(--ink); color: var(--rack); font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.2);
          animation: slide-up .25s ease both; }

@keyframes enter { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes fold-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-5px); } }
@keyframes pulse { 50% { transform: scale(1.18); } }

/* iPhone "Reduce Motion" on: no movement at all */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.group > .fold-head { font-size: 1.1em; }

/* ==== Home button: big, blue, a house on it, and it stays at the top while she scrolls ============ */
.home-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px 0 16px; border: 0; border-radius: 999px;
            background: var(--cat6); color: var(--on-cat6); font-size: 1.05em; font-weight: 600; text-decoration: none;
            box-shadow: 0 3px 10px rgba(30, 99, 181, .3); transition: transform .12s ease; }
.home-btn:active { transform: scale(.96); }
.home-btn .house { font-size: 1.1em; line-height: 1; }
.screen > .home-btn, .screen > .nav-bar { position: sticky; top: max(10px, env(safe-area-inset-top)); z-index: 12; }
.nav-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.nav-bar .back:not(.home-btn) { min-height: 56px; padding: 0 18px; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); }
.chat-screen > .bar { position: sticky; top: 0; z-index: 12; flex-wrap: wrap; gap: 8px; margin: 0 -16px; padding: max(10px, env(safe-area-inset-top)) 16px 10px;
                      background: color-mix(in srgb, var(--rack) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.bar-right { display: flex; gap: 14px; margin-left: auto; }
.bar-right .link-btn { font-size: .9em; }

/* ==== Past chats ================================================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.filters button { min-height: 48px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--panel); font-weight: 600; }
.filters button[aria-pressed="true"] { border-color: var(--cat6); background: var(--cat6); color: var(--on-cat6); }
.continue { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--t-blue); color: var(--ink); }

/* ==== the bell on home: her inbox, top right ====================================================== */
#screen-home { position: relative; }
.bell { position: absolute; top: max(40px, calc(env(safe-area-inset-top) + 24px)); right: max(16px, env(safe-area-inset-right)); z-index: 5;
        display: grid; place-items: center; width: 60px; height: 60px; border: 0; border-radius: 50%;
        background: var(--panel); box-shadow: var(--shadow); font-size: 1.5em; transition: transform .12s ease; }
.bell:active { transform: scale(.94); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px;
              display: flex; align-items: center; justify-content: center; line-height: 1;   /* line-height 1: the number sits in the middle */
              background: var(--live); color: var(--on-live); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
              border: 3px solid var(--rack); animation: pulse 2s ease .4s 2; }
.bell.ringing .bell-icon { display: inline-block; animation: ring 1.4s ease .6s 1; transform-origin: 50% 10%; }
#home-hello { padding-right: 72px; }   /* the greeting never runs under the bell */
@keyframes ring { 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-16deg); } 50% { transform: rotate(8deg); } 60% { transform: none; } }

/* ==== Bubba's Phone ================================================================================ */
.bubba-status::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--steel); }
.bubba-status.on::before { background: var(--ok); }
.bubba-modes, .bubba-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bubba-modes { margin-bottom: 10px; }
.bubba-lockdown { background: var(--live); color: var(--on-live); box-shadow: 0 2px 8px rgba(201, 60, 53, .3); }
.bubba-callonly { background: #E8A317; color: #2B1D00; }
.bubba-restore { margin-bottom: 14px; background: var(--ok); color: #FFFFFF; box-shadow: 0 2px 8px rgba(31, 122, 80, .3); }
.bubba-banner { margin-bottom: 14px; font-weight: 500; }
.bubba-app .bubba-two, .note .bubba-two { margin-top: 10px; }
.bubba-chips { margin-top: 10px; }
.bubba-chips[hidden] { display: none !important; }
.bubba-form select, .bubba-form input[type=time] { width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 1em; }
:root[data-theme="dark"] .bubba-callonly { background: #C98A0E; }
.bubba-note { margin: 0 0 14px; font-size: .9em; }
.bubba-vol { margin-bottom: 8px; }
.bubba-vol-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bubba-lock { min-height: 48px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--panel); font-weight: 600; }
.bubba-lock.on { border-color: var(--cat6); background: var(--cat6); color: var(--on-cat6); }

/* ==== Tours (tours.js): dim everything but the highlighted part, a card with the explanation ======= */
.tour-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }   /* only its parts catch taps: the hole lets them through */
.tour-block, .tour-lid, .tour-sheet { pointer-events: auto; }
.tour-layer[hidden] { display: none; }
.tour-block { position: fixed; background: rgba(10, 14, 18, .58); transition: all .25s ease; }
.tour-ring { position: fixed; border-radius: 16px; box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 7px var(--cat6); pointer-events: none; transition: all .25s ease; }
.tour-ring.tap { animation: tour-pulse 1.6s ease-in-out infinite; }
.tour-ring[hidden], .tour-lid[hidden] { display: none; }
.tour-lid { position: fixed; }
.tour-layer.moving .tour-sheet { opacity: 0; }
.tour-sheet { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto;
              max-height: 70vh; overflow-y: auto; padding: 16px 18px 18px; border-radius: 20px; background: var(--panel);
              box-shadow: 0 12px 40px rgba(0, 0, 0, .3); transition: opacity .2s; }
.tour-sheet.centered { top: 50%; bottom: auto; transform: translateY(-50%); }
.tour-sheet.pop { animation: pop .3s ease both; }
.tour-sheet.centered.pop { animation: none; }
.tour-sheet h2 { margin: 6px 0 6px; font-size: 1.3em; }
.tour-sheet p { margin: 0 0 12px; }
.tour-head { display: flex; align-items: center; justify-content: space-between; }
.tour-count { color: var(--steel); font-size: .85em; font-weight: 600; }
.tour-end { min-height: 44px; font-size: .9em; }
.tour-dots { display: flex; gap: 6px; margin: 4px 0 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dots i.done { background: var(--steel); }
.tour-dots i.on { width: 22px; border-radius: 999px; background: var(--cat6); }
.tour-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.tour-try { padding: 10px 12px; border-radius: 12px; background: var(--t-blue); font-weight: 600; }
.tour-ex { display: grid; gap: 8px; margin: 4px 0 12px; padding: 12px; border-radius: 14px; background: var(--rack); font-size: .9em; }
.tour-ex .verdict { padding: 10px 12px; animation: none; }
.tour-ex .verdict-word { font-size: 1.15em; }
.tour-ex .badge { width: 30px; height: 30px; }
.tour-chat { display: flex; flex-direction: column; gap: 8px; }
.tour-chat .msg-me, .tour-chat .msg-static { animation: none; }
.tour-quote { margin: 0; font-style: italic; }
.tour-phone { display: grid; justify-items: center; gap: 10px; padding: 16px 12px; border-radius: 18px; background: #F6F4EF; border: 2px solid var(--line); color: #1C2228; }
.tour-phone strong { font-size: 1.2em; }
.tour-okay { padding: 8px 28px; border-radius: 999px; background: #1E63B5; color: #FFFFFF; font-weight: 600; }
.tour-list { display: grid; gap: 10px; }
.tour-pick { min-height: 72px; }
.tour-pick .label { display: grid; gap: 2px; }
.tour-pick small { color: var(--steel); font-size: .8em; font-weight: 500; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 12px rgba(30, 99, 181, .55); } }

/* ==== Themes (2026-11-18): her home button looks, line drawings, Settings groups, What's new ============ */
:root, :root[data-theme="light"] { --i-blue: #1E63B5; --i-red: #C93C35; --i-amber: #9A6700; --i-green: #1F7A50; --i-gray: #55606A; }
:root[data-theme="dark"] { --i-blue: #3F8CDB; --i-red: #E5534B; --i-amber: #F4D35E; --i-green: #3FB27F; --i-gray: #A3AEB6; }
svg.line { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
.mark { display: inline-flex; align-items: center; margin-right: 8px; vertical-align: -0.2em; }
.big-btn .mark, .bubba-lock .mark { margin-right: 10px; }
.big-btn:has(.mark), .bubba-lock:has(.mark) { display: inline-flex; align-items: center; justify-content: center; }
.house svg.line { width: 1.2em; height: 1.2em; }
.bell-icon svg.line { width: 1.6em; height: 1.6em; }
.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; border: 2px solid var(--i-gray); vertical-align: .05em; }
.dot.on { background: var(--i-green); border-color: var(--i-green); }

/* the drawn icon on a home button: no box, just the line drawing */
.tile:has(.ico-line) { gap: 14px; }
.tile .ico-line { flex: none; display: grid; place-items: center; width: 36px; color: var(--ink); }
.tile .ico-line svg.line { width: 30px; height: 30px; }
.tile.hero .ico-line { color: var(--on-cat6); }
.home-colors .tone-red .ico-line { color: var(--i-red); }
.home-colors .tone-amber .ico-line { color: var(--i-amber); }
.home-colors .tone-green .ico-line { color: var(--i-green); }
.home-colors .tone-gray .ico-line { color: var(--i-gray); }
.home-colors .tile.hero .ico-line { color: var(--on-cat6); }

/* Big squares: two per row, drawing on top, words under it */
.home-grid .group-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: none; box-shadow: none; overflow: visible; }
.home-grid .group-box .tile { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px;
  min-height: 112px; padding: 14px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); line-height: 1.2; }
.home-grid .group-box .tile + .tile { border-top: 0; }
.home-grid .group-box .tile .chev { display: none; }
.home-grid .group-box .tile .count { position: absolute; top: 10px; right: 10px; }
.home-grid .tone-red .ico-line { color: var(--i-red); }
.home-grid .tone-amber .ico-line { color: var(--i-amber); }
.home-grid .tone-green .ico-line { color: var(--i-green); }
.home-grid .tone-gray .ico-line { color: var(--i-gray); }
.home-grid .group-box .tile .ico-line { width: auto; }
.home-grid .group-box .tile .ico-line svg.line { width: 34px; height: 34px; }

/* Just words: the button's name, then one plain line about it */
.tile .label .sub { display: block; margin-top: 2px; font-size: .8em; font-weight: 400; color: var(--steel); line-height: 1.3; }
.tile.hero .label .sub { color: var(--on-cat6); opacity: .85; }
.home-words .group-box .tile { padding-block: 12px; }

/* Themes screen: each look is one big button with a small sample of it */
.theme-list { display: grid; gap: 16px; margin-top: 16px; }
.theme-pick { display: grid; gap: 8px; width: 100%; padding: 16px; text-align: left; background: var(--panel); color: var(--ink);
  border: 3px solid transparent; border-radius: 18px; box-shadow: var(--shadow); font: inherit; cursor: pointer; }
.theme-pick.on { border-color: var(--cat6); }
.theme-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.theme-name { font-size: 1.15em; font-weight: 600; }
.theme-using { padding: 4px 12px; border-radius: 999px; background: var(--cat6); color: var(--on-cat6); font-size: .8em; font-weight: 600; }
.theme-about { color: var(--steel); }
.theme-preview { pointer-events: none; margin-top: 4px; font-size: .85em; }
.theme-preview .group-box { background: var(--rack); box-shadow: none; }
.home-grid.theme-preview .group-box { background: none; }
.home-grid.theme-preview .group-box .tile { min-height: 90px; background: var(--rack); box-shadow: none; }
.home-grid.theme-preview .group-box .tile:last-child { display: none; }
.theme-preview .tile { min-height: 52px; }

/* Settings: plain group headings between the cards */
.set-group { margin: 28px 4px 10px; font-size: 1em; font-weight: 600; color: var(--steel); }
#screen-settings > h1 + .set-group, #screen-settings > h1 + * + .set-group { margin-top: 8px; }
.set-link { margin-top: 12px; min-height: 56px; font-size: 1em; }
.set-logout { margin-top: 32px; }

/* What's new: covers the whole app until she taps Okay */
.whats-new { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--rack); color: var(--ink); }
.whats-new-in { flex: 1; overflow-y: auto; max-width: 640px; width: 100%; margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left)); }
.whats-new-tag { margin: 0; color: var(--cat6); font-weight: 600; }
.whats-new h1 { margin: 4px 0 20px; font-size: 1.7em; }
.whats-new section { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }
.whats-new h2 { margin: 0 0 6px; font-size: 1.1em; }
.whats-new section p { margin: 0; }
.whats-new-bar { padding: 12px max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  max-width: 640px; width: 100%; margin: 0 auto; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
/* the two side-by-side Bubba buttons: drawing above the words, so they don't wrap around it */
.bubba-two .big-btn:has(.mark) { flex-direction: column; gap: 4px; padding-block: 10px; }
.bubba-two .big-btn .mark { margin-right: 0; }

/* ==== Notes, Calendar, chat cards and "it's working" signs (2026-11-18) ================================= */
:root, :root[data-theme="light"] { --notes: #A06A00; --notes-soft: #FFF6DA; --paper: #FFFFFF; --cal-red: #C93C35; }
:root[data-theme="dark"] { --notes: #F4C542; --notes-soft: #3A3420; --paper: #232B32; --cal-red: #E5534B; }

/* the spinner, on any button that's waiting and in Loading… lines */
.spin { display: inline-block; width: 1em; height: 1em; border: 2.5px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -0.15em; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 12px; }
button.busy { position: relative; pointer-events: none; opacity: .85; }
button.busy::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: 10px; border: 2.5px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -0.12em; }
.tile.busy::after { position: absolute; right: 44px; top: 50%; margin-top: -.45em; }

/* "One moment…": a thin moving bar at the very top after 0.3 s, and a pill after 1.5 s */
.work-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent 0 30%, var(--cat6) 30% 60%, transparent 60%); background-size: 200% 100%; transition: opacity .2s; }
.is-working .work-bar { opacity: 1; animation: workbar 1.1s linear infinite; }
@keyframes workbar { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.work-pill { position: fixed; left: 50%; top: max(10px, env(safe-area-inset-top)); z-index: 60; transform: translate(-50%, -150%);
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--rack);
  font-weight: 600; font-size: .9em; box-shadow: 0 4px 16px rgba(0,0,0,.2); transition: transform .25s ease; pointer-events: none; }
.is-working-long .work-pill { transform: translate(-50%, 0); }

/* thinking bubble with words */
.msg-static.thinking { display: flex; align-items: center; gap: 12px; }
.think-words { color: var(--steel); font-size: .95em; }

/* the box she types in: app links and the app she's using */
.app-links { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.app-links::-webkit-scrollbar { display: none; }
.app-link { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font-size: .85em; font-weight: 600; white-space: nowrap; }
.app-link .mark { margin: 0; color: var(--cat6); }
.app-link svg.line { width: 1.2em; height: 1.2em; }
.mode-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 4px 4px 4px 14px; border-radius: 999px;
  background: var(--cat6); color: var(--on-cat6); font-weight: 600; font-size: .9em; }
.mode-pill .mark { margin: 0; }
.mode-x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: inherit; }
.mode-x .mark { margin: 0; }

/* cards in the chat */
.chat-card { margin-top: 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 10px; }
.msg-static .chat-card { color: var(--ink); }
.cc-head { display: flex; align-items: center; gap: 8px; font-size: .8em; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--steel); }
.cc-head .mark { margin: 0; }
.note-card .cc-head { color: var(--notes); }
.cc-note { display: grid; gap: 6px; }
.cc-note-title { margin: 0; font-weight: 700; font-size: 1.1em; }
.cc-line { margin: 0; }
.cc-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.cc-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-circle { color: var(--steel); margin: 0; }
.cc-circle svg.line { width: 1.5em; height: 1.5em; }
.cc-check.done .cc-circle { color: var(--notes); }
.cc-check.done .cc-circle svg circle { fill: var(--notes); stroke: var(--notes); }
.cc-check.done .cc-circle svg path { stroke: var(--paper); }
.cc-check:not(.done) .cc-circle svg path { opacity: 0; }
.cc-check.done > span:last-child { color: var(--steel); text-decoration: line-through; }
.cc-check input:focus-visible + .cc-circle { outline: 3px solid var(--cat6); border-radius: 50%; }
.cc-check.busy { opacity: .6; }
.cc-more { margin: 0; color: var(--steel); font-size: .9em; }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-actions button, .ec-open { min-height: 48px; border-radius: 12px; border: 0; font-weight: 600; }
.event-card.pending { border-style: dashed; border-width: 2px; }
.ec-top { display: flex; gap: 14px; align-items: flex-start; }
.date-tile { flex: none; width: 64px; border-radius: 12px; overflow: hidden; text-align: center; background: var(--panel-2); display: grid; }
.dt-m { background: var(--cal-red); color: #FFFFFF; font-size: .7em; font-weight: 700; letter-spacing: .08em; padding: 2px 0; }
.dt-d { font-size: 1.6em; font-weight: 700; line-height: 1.15; padding-top: 2px; }
.dt-w { font-size: .7em; color: var(--steel); padding-bottom: 4px; }
.ec-info { display: grid; gap: 4px; min-width: 0; }
.ec-title { margin: 0; font-weight: 700; font-size: 1.1em; }
.ec-line { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--steel); }
.ec-line .mark { margin: 0; }
.ec-line svg.line { width: 1.1em; height: 1.1em; }
.ec-state { margin: 4px 0 0; font-size: .85em; font-weight: 600; color: var(--ok); }
.pending .ec-state { color: var(--steel); }
.evc-day { margin: 6px 0 0; font-weight: 700; font-size: .9em; }
.evc-row { display: flex; gap: 12px; align-items: baseline; }
.evc-time { flex: none; width: 5.5em; color: var(--steel); font-size: .9em; font-variant-numeric: tabular-nums; }

/* ---- Notes: the list ---- */
.notes-h1 { font-size: 2em; margin-bottom: 12px; }
.notes-search { width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--panel-2); font-size: 1em; color: var(--ink); }
.notes-search:focus { outline: 3px solid var(--notes); }
.notes-body { margin-top: 8px; padding-bottom: 96px; }
.notes-group { margin: 22px 4px 8px; font-size: 1.05em; font-weight: 700; }
.notes-list { background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.note-row { display: grid; gap: 2px; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; color: var(--ink); }
.note-row + .note-row { border-top: 1px solid var(--line); }
.note-row:active { background: var(--panel-2); }
.note-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-sub { color: var(--steel); font-size: .9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-sub b { color: var(--ink); font-weight: 500; }
.note-checks { display: inline-flex; align-items: center; gap: 6px; font-size: .85em; color: var(--steel); }
.note-checks .mark { margin: 0; }
.note-checks.all { color: var(--notes); }
.notes-count { text-align: center; color: var(--steel); font-size: .85em; margin-top: 16px; }
.notes-empty { padding: 24px 8px; color: var(--steel); }
.notes-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; padding: 12px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--rack); border-top: 1px solid var(--line); }
.notes-new { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 640px; margin: 0 auto; background: var(--notes); color: var(--paper); }
:root[data-theme="dark"] .notes-new { color: #1A2026; }
.notes-new .mark { margin: 0; }

/* ---- Notes: writing one ---- */
#screen-note { padding-bottom: 110px; }
.note-top { position: sticky; top: max(0px, env(safe-area-inset-top)); z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: 8px 0; background: var(--rack); }
.notes-back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 8px 0 0; border: 0; background: none;
  color: var(--notes); font-size: 1.05em; font-weight: 600; }
.chev-l { font-size: 1.6em; line-height: 1; margin-top: -3px; }
.note-status { flex: 1; text-align: center; color: var(--steel); font-size: .85em; }
.note-tools { display: flex; gap: 4px; }
.note-tool { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; min-height: 52px; padding: 4px 6px;
  border: 0; border-radius: 10px; background: none; color: var(--notes); font-size: .7em; font-weight: 600; }
.note-tool .mark { margin: 0; }
.note-paper { background: var(--paper); border-radius: 16px; padding: 14px 18px 40px; min-height: 60vh; box-shadow: var(--shadow); cursor: text; }
.note-date { margin: 0 0 12px; text-align: center; color: var(--steel); font-size: .8em; }
.nl { display: flex; align-items: flex-start; gap: 10px; min-height: 1.6em; }
.nl-text { flex: 1; min-width: 0; outline: none; white-space: pre-wrap; word-break: break-word; line-height: 1.5; padding: 3px 0; caret-color: var(--notes); }
.nl-title .nl-text { font-size: 1.45em; font-weight: 700; line-height: 1.25; padding-bottom: 6px; }
.nl-text[data-empty][data-ph]::before { content: attr(data-ph); color: var(--steel); opacity: .7; pointer-events: none; }
.nl-circle { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin: -4px 0 -4px -6px; border: 0; background: none; color: var(--steel); }
.nl-circle .mark { margin: 0; }
.nl-circle svg.line { width: 1.55em; height: 1.55em; }
.nl-check:not(.nl-done) .nl-circle svg path { opacity: 0; }
.nl-done .nl-circle { color: var(--notes); }
.nl-done .nl-circle svg circle { fill: var(--notes); stroke: var(--notes); }
.nl-done .nl-circle svg path { stroke: var(--paper); }
.nl-done .nl-text { color: var(--steel); text-decoration: line-through; }
.note-bar { position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 12; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--rack); border-top: 1px solid var(--line); }
.note-bar-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--notes-soft); color: var(--notes); font-weight: 700; }
.note-bar-btn .mark { margin: 0; }
.note-bar-done { min-height: 52px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--notes); color: var(--paper); font-weight: 700; }
:root[data-theme="dark"] .note-bar-done { color: #1A2026; }

/* ---- Calendar ---- */
.cal-month { margin: -8px 0 10px; color: var(--steel); font-weight: 600; }
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.day-strip::-webkit-scrollbar { display: none; }
.day-pill { flex: none; scroll-snap-align: center; display: grid; justify-items: center; gap: 2px; width: 62px; padding: 8px 0 6px;
  border: 0; border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.dp-wd { font-size: .7em; font-weight: 600; color: var(--steel); text-transform: uppercase; letter-spacing: .04em; }
.dp-n { font-size: 1.3em; font-weight: 700; line-height: 1.1; }
.day-pill.today .dp-n { color: var(--cal-red); }
.dp-dot { width: 7px; height: 7px; border-radius: 50%; }
.dp-dot.has { background: var(--steel); }
.day-pill.on { background: var(--cat6); color: var(--on-cat6); }
.day-pill.on .dp-wd, .day-pill.on .dp-n { color: var(--on-cat6); }
.day-pill.on .dp-dot.has { background: var(--on-cat6); }
.cal-day, .cal-soon { margin-top: 10px; }
.cal-day-h { font-size: 1.2em; margin: 8px 4px 10px; }
.cal-free { padding: 6px 4px 4px; }
.cal-list { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.cal-ev { display: flex; gap: 14px; padding: 12px 16px; }
.cal-ev + .cal-ev { border-top: 1px solid var(--line); }
.cal-when { flex: none; width: 5.6em; display: grid; font-variant-numeric: tabular-nums; }
.cal-when b { font-weight: 700; }
.cal-when span { color: var(--steel); font-size: .85em; }
.cal-what { display: grid; min-width: 0; }
.cal-title { font-weight: 600; }
.cal-sub { color: var(--steel); font-size: .9em; }
.cal-add { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 6px; }
.cal-add .mark { margin: 0; }
.cal-form { display: grid; gap: 16px; }
.field-label { margin: 0 0 6px; font-weight: 500; }
.cal-time { display: grid; gap: 10px; }
.icon-btn .mark { margin-right: 0; }
/* app screens with bars fixed to the bottom: the slide-in mustn't leave a transform behind (it would carry the bars off-screen) */
.app-screen { animation-fill-mode: backwards; }
.notes-bar { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.notes-bar > * { min-height: 56px; }
.notes-ask { border: 0; border-radius: 12px; background: var(--notes-soft); color: var(--notes); font-weight: 700; }
/* the app links scroll inside the box; they must never make the page wider than the phone */
.composer > *, .composer-extra { min-width: 0; max-width: 100%; }
.app-links { max-width: 100%; }

/* ==== the Apps button and picker in Talk to STATIC (2026-11-18) ======================================== */
.composer-row { grid-template-columns: auto 1fr 1fr; }
.apps-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; min-width: 72px;
  padding: 0 12px; border: 0; border-radius: 14px; background: var(--panel-2); color: var(--ink); font-size: .8em; font-weight: 700; }
.apps-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.apps-btn.on { background: var(--cat6); color: var(--on-cat6); }
.apps-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim, rgba(24,32,38,.4)); }
.apps-in { width: 100%; max-width: 640px; max-height: 88dvh; overflow-y: auto; background: var(--rack); border-radius: 22px 22px 0 0;
  padding: 16px max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  display: grid; gap: 14px; align-content: start; animation: sheet-up .22s ease both; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.apps-head { display: flex; align-items: center; gap: 8px; }
.apps-head h2 { flex: 1; margin: 0; font-size: 1.25em; }
.apps-back { min-height: 48px; font-size: 1em; text-decoration: none; }
.apps-close { min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--panel-2); color: var(--ink); font-weight: 600; }
.apps-about { margin: -6px 0 0; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-tile { display: grid; justify-items: start; align-content: space-between; gap: 10px; min-height: 96px; padding: 14px; border: 0;
  border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); text-align: left; font-weight: 600; line-height: 1.2; }
.app-tile .mark { margin: 0; color: var(--cat6); }
.app-tile svg.line { width: 30px; height: 30px; }
.app-tile.on { outline: 3px solid var(--cat6); }
.apps-all { display: flex; align-items: center; justify-content: center; gap: 10px; }
.apps-all .mark { margin: 0; }
.apps-group { margin: 6px 4px 0; font-size: 1em; color: var(--steel); }
.apps-list { display: grid; gap: 8px; }
.apps-box { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.apps-row { display: flex; align-items: center; }
.apps-row + .apps-row { border-top: 1px solid var(--line); }
.apps-use { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px; border: 0; background: none;
  color: var(--ink); text-align: left; }
.apps-use .mark { margin: 0; color: var(--cat6); }
.apps-use svg.line { width: 28px; height: 28px; }
.apps-words { display: grid; min-width: 0; }
.apps-words b { font-weight: 600; }
.apps-words span { color: var(--steel); font-size: .85em; line-height: 1.3; }
.apps-open { flex: none; min-height: 44px; margin-right: 12px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: none; color: var(--cat6); font-weight: 700; font-size: .85em; }

/* STATIC next to Home (2026-11-18): same pill, quieter color so Home stays the main way back */
.static-btn { background: var(--panel); color: var(--cat6); box-shadow: var(--shadow); }
/* All apps: name and line on top, Ask STATIC and Open underneath */
.apps-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; }
.apps-info { display: flex; align-items: center; gap: 14px; min-width: 0; }
.apps-info .mark { margin: 0; color: var(--cat6); }
.apps-info svg.line { width: 28px; height: 28px; }
.apps-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.apps-ask { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--cat6); color: var(--on-cat6); font-weight: 700; font-size: .85em; }
.apps-btns .apps-open { margin-right: 0; }

/* ==== Notes, made better (2026-11-18): Format, Speak, More, lists, Recently deleted ======================= */
/* the bottom bar: three tools with their name under them, and Done */
.note-bar { gap: 6px; }
.note-bar .note-bar-btn { flex-direction: column; justify-content: center; gap: 2px; min-width: 64px; min-height: 58px; padding: 4px 8px;
  font-size: .7em; background: none; }
.note-bar .note-bar-btn svg.line { width: 26px; height: 26px; }
.note-bar .note-bar-btn.on { background: var(--notes-soft); }
#note-mic.on { background: var(--live); color: var(--on-live); }
.note-bar-done { margin-left: auto; }
/* Format: the kinds of line, just above the bar */
.note-format { position: fixed; left: 0; right: 0; bottom: calc(var(--kb, 0px) + 82px); z-index: 12; display: flex; gap: 8px; overflow-x: auto;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: var(--rack);
  border-top: 1px solid var(--line); scrollbar-width: none; }
.note-format::-webkit-scrollbar { display: none; }
.fmt-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: .85em; }
.fmt-btn .mark { margin: 0; color: var(--notes); }
.fmt-btn.on { border-color: var(--notes); background: var(--notes-soft); color: var(--notes); }
/* the kinds of line in a note */
.nl-heading .nl-text { font-size: 1.15em; font-weight: 700; padding-top: 8px; }
.nl-mark { flex: none; min-width: 1.2em; padding: 3px 0; line-height: 1.5; color: var(--notes); font-weight: 700; text-align: right; }
.nl-num { min-width: 1.6em; font-variant-numeric: tabular-nums; }
/* the More menu */
.note-sheet { position: fixed; inset: 0; z-index: 45; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim, rgba(24,32,38,.4)); }
.note-sheet-in { width: 100%; max-width: 640px; max-height: 88dvh; overflow-y: auto; background: var(--rack); border-radius: 22px 22px 0 0;
  padding: 16px max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  display: grid; gap: 8px; animation: sheet-up .22s ease both; }
.sheet-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--paper); color: var(--ink); font-weight: 600; text-align: left; box-shadow: var(--shadow); }
.sheet-row .mark { margin: 0; color: var(--notes); }
.sheet-row svg.line { width: 26px; height: 26px; }
.sheet-row.danger-row { color: var(--live); margin-top: 8px; }
.sheet-row.danger-row .mark { color: var(--live); }
.sheet-label { margin: 10px 4px 0; font-weight: 700; color: var(--steel); font-size: .9em; }
/* the list: pinned mark, Recently deleted */
.note-pin { margin: 0 6px 0 0; color: var(--notes); }
.note-pin svg.line { width: 1em; height: 1em; vertical-align: -0.1em; }
.notes-trash { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 18px;
  border: 0; border-radius: 12px; background: none; color: var(--steel); font-weight: 600; }
.notes-trash .mark { margin: 0; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.trash-row + .trash-row { border-top: 1px solid var(--line); }
.trash-words { flex: 1; min-width: 0; display: grid; }
.trash-put { flex: none; min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 700; }
/* the note card in chat: headings and lists */
.cc-heading { margin: 4px 0 0; font-weight: 700; }
.cc-li { display: flex; gap: 8px; }
.cc-mark { flex: none; min-width: 1.2em; color: var(--notes); font-weight: 700; }
.note-pin { display: inline-block; }
.note-pin svg.line { display: inline-block; }
#screen-note.fmt-open { padding-bottom: 180px; }
/* three pills (Back, Home, STATIC) fit on one line on a small iPhone */
.nav-bar .home-btn { padding: 0 16px 0 12px; }
.nav-bar .back:not(.home-btn) { padding: 0 14px; }
.nav-bar { gap: 8px; }
.nav-bar:has(> :nth-child(3)) > * { font-size: .82em; min-height: 52px; }
.nav-bar:has(> :nth-child(3)) > .home-btn { padding: 0 12px 0 10px; gap: 6px; }
.nav-bar:has(> :nth-child(3)) > .back:not(.home-btn) { padding: 0 12px; }

/* Home: just the house in a circle (2026-11-18) */
.home-btn.home-circle { width: 56px; height: 56px; min-height: 56px; padding: 0; justify-content: center; border-radius: 50%; flex: none; }
.home-btn.home-circle .house { font-size: 1.3em; }
.home-btn.home-circle .house svg.line { width: 28px; height: 28px; }
.nav-bar:has(> :nth-child(3)) > .home-btn.home-circle { width: 52px; height: 52px; padding: 0; }
/* the STATIC button fades once she scrolls */
.static-btn { transition: opacity .2s ease, transform .2s ease; }
.scrolled .static-btn { opacity: 0; transform: translateY(-8px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .static-btn { transition: none; } }

/* Home: "Home" with the house at the top; once she scrolls it folds into just the house in a circle (2026-11-18) */
.home-btn:not(.static-btn) { transition: padding .2s ease, width .2s ease; }
.home-word { display: inline-block; max-width: 6em; overflow: hidden; white-space: nowrap; transition: max-width .2s ease, opacity .15s ease; }
.scrolled .home-btn:not(.static-btn) { width: 56px; height: 56px; min-height: 56px; padding: 0; justify-content: center; gap: 0; border-radius: 50%; }
.scrolled .home-btn:not(.static-btn) .home-word { max-width: 0; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .home-btn, .home-word { transition: none; } }

/* ==== Notes home, folders, tags and colors (2026-11-18) ================================================ */
:root, :root[data-theme="light"] { --n-red: #C93C35; --n-orange: #C25E00; --n-yellow: #A06A00; --n-green: #1F7A50; --n-blue: #1E63B5; --n-purple: #7442C2; }
:root[data-theme="dark"] { --n-red: #E5534B; --n-orange: #F0883E; --n-yellow: #F4C542; --n-green: #3FB27F; --n-blue: #3F8CDB; --n-purple: #B48AF0; }
.note-dot { display: inline-block; flex: none; width: .7em; height: .7em; border-radius: 50%; margin-right: 8px; vertical-align: .05em; }
.dot-none { display: none; }
.sheet-row .dot-none { display: inline-block; border: 2px solid var(--line); }
.dot-red { background: var(--n-red); } .dot-orange { background: var(--n-orange); } .dot-yellow { background: var(--n-yellow); }
.dot-green { background: var(--n-green); } .dot-blue { background: var(--n-blue); } .dot-purple { background: var(--n-purple); }
.sheet-row .note-dot { width: 22px; height: 22px; margin: 0; }
/* Continue and Pinned */
.notes-continue { display: grid; gap: 2px; width: 100%; margin-top: 14px; padding: 14px 16px; border: 0; border-radius: 16px; text-align: left;
  background: var(--notes-soft); color: var(--ink); }
.nc-label { font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--notes); }
.nc-title { font-weight: 700; font-size: 1.1em; }
.nc-sub { color: var(--steel); font-size: .85em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.pin-row::-webkit-scrollbar { display: none; }
.pin-card { flex: none; scroll-snap-align: start; width: 46%; min-width: 150px; max-width: 220px; min-height: 96px; display: grid; align-content: space-between; gap: 8px;
  padding: 12px 14px; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.pc-top { display: flex; align-items: baseline; }
.pc-title { font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pc-sub { color: var(--steel); font-size: .8em; }
/* folders */
.folder-list { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.folder-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 0 16px; border: 0; background: none; color: var(--ink); text-align: left; }
.folder-row + .folder-row { border-top: 1px solid var(--line); }
.folder-row .mark { margin: 0; color: var(--notes); }
.folder-row svg.line { width: 26px; height: 26px; }
.fr-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-count { color: var(--steel); font-variant-numeric: tabular-nums; }
.fr-chev { color: var(--chev, var(--steel)); font-size: 1.4em; line-height: 1; }
.folder-add { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 6px; padding: 0 8px; border: 0; background: none; color: var(--notes); font-weight: 700; }
.folder-add .mark { margin: 0; }
.folder-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sort-choices { margin-bottom: 4px; }
.notes-more { width: 100%; margin-top: 14px; }
/* tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 600; font-size: .9em; }
.tag-chip b { color: var(--steel); font-weight: 600; }
.tag-chip.on { border-color: var(--notes); background: var(--notes-soft); color: var(--notes); }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.note-tag, .note-folder { font-size: .8em; color: var(--steel); }
.note-folder { font-weight: 600; }
.note-title { display: flex; align-items: baseline; }
/* in a note: folder, color and tags under the date */
.note-meta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -4px 0 14px; }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px;
  background: var(--panel-2); color: var(--steel); font-size: .8em; font-weight: 600; max-width: 100%; }
.meta-chip .mark { margin: 0; }
.meta-chip svg.line { width: 1.2em; height: 1.2em; }
.meta-chip .note-dot { margin: 0; }
.meta-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* sheets: inputs and the folder picture picker */
.sheet-input { width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 1em; }
.sheet-input:focus { border-color: var(--notes); outline: none; }
.icon-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.icon-choice { display: grid; place-items: center; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--notes); }
.icon-choice[aria-checked="true"] { border-color: var(--notes); background: var(--notes-soft); }
.icon-choice .mark { margin: 0; }
/* ↑ Top sits above a screen's bottom bar (Notes) instead of on it */
body:has(#screen-notes:not([hidden]) .notes-bar) .to-top { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 84px); }

/* ==== Notes' own look (2026-11-18): STATIC's blue, square ticks, label-maker tape, tiles and cards — not Apple's ==== */
:root, :root[data-theme="light"] { --notes: var(--cat6); --notes-soft: var(--t-blue, #DDE9F8); --tape-ink: #182026; --tape-bg: #F2F0E6; }
:root[data-theme="dark"] { --notes: #3F8CDB; --notes-soft: var(--t-blue, #22364D); }
/* titles in STATIC's narrow face */
.notes-h1, .nl-title .nl-text, .nc-title, .pc-title, .note-title, .cc-note-title, .ft-name {
  font-family: var(--narrow, "Barlow Condensed", "Barlow", system-ui, sans-serif); letter-spacing: .01em; }
.nl-title .nl-text { font-size: 1.7em; font-weight: 600; }
.note-title { font-size: 1.12em; font-weight: 600; }
/* the label-maker strip: STATIC's tape */
.meta-tape, .nc-label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 2px;
  background: var(--tape-bg); color: var(--tape-ink); font-family: var(--narrow, system-ui); font-weight: 600; font-size: .78em;
  text-transform: uppercase; letter-spacing: .1em; box-shadow: 0 1px 0 rgba(24, 32, 38, .25); }
.meta-tape .mark { margin: 0; color: var(--tape-ink); }
.meta-tape svg.line { width: 1.1em; height: 1.1em; }
.nc-label { min-height: 26px; width: max-content; padding: 0 8px; font-size: .7em; }
/* in a note: tape, color and tags on the left, the date under them; the back button is the app's own pill */
.note-meta-row { justify-content: flex-start; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.note-when { flex-basis: 100%; color: var(--steel); font-size: .78em; }
.note-paper { border-radius: 10px; padding-top: 18px; }
.notes-back { min-height: 52px; padding: 0 18px 0 12px; border-radius: 999px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); font-size: .95em; }
.notes-back .chev-l { color: var(--notes); }
/* square ticks (in the note and in chat cards) */
.nl-done .nl-circle svg rect, .cc-check.done .cc-circle svg rect { fill: var(--notes); stroke: var(--notes); }
.nl-check:not(.nl-done) .nl-circle svg path, .cc-check:not(.done) .cc-circle svg path { opacity: 0; }
.nl-mark { color: var(--steel); }
/* folders: tiles, two across; All notes spans the row */
.folder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.folder-tile { display: grid; align-content: space-between; gap: 14px; min-height: 104px; padding: 14px; border: 0; border-radius: 14px;
  background: var(--paper); color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.folder-tile:first-child { grid-column: 1 / -1; min-height: 76px; grid-template-columns: 1fr auto; align-items: center; }
.folder-tile:first-child .ft-top { order: 2; }
.ft-top { display: flex; align-items: center; justify-content: space-between; }
.ft-top .mark { margin: 0; color: var(--notes); }
.ft-top svg.line { width: 30px; height: 30px; }
.ft-count { min-width: 32px; padding: 2px 10px; border-radius: 999px; background: var(--panel-2); color: var(--steel); font-size: .85em; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ft-name { font-size: 1.15em; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.folder-tile:active { transform: scale(.98); }
/* notes in a list: separate cards, a progress bar for checklists */
.notes-list { background: none; box-shadow: none; border-radius: 0; overflow: visible; display: grid; gap: 10px; }
.notes-list .note-row { padding: 14px 16px; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); gap: 4px; }
.notes-list .note-row + .note-row { border-top: 0; }
.note-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-checks { gap: 10px; }
.nb-track { display: inline-block; width: 84px; height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.nb-fill { display: block; height: 100%; border-radius: 999px; background: var(--notes); }
.note-checks.all { color: var(--ok); }
.note-checks.all .nb-fill { background: var(--ok); }
/* last edited */
.notes-continue { gap: 6px; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
/* pinned: like notes clipped to a board */
.pin-card { border-radius: 10px; }

/* ==== Notes phase 2 (2026-11-18): Undo/Redo, lock, history, warning, modes, photos, printing =================== */
/* the top bar fits Back, the saving words, Undo, Redo and More; the bottom bar fits four tools and Done */
.note-top { gap: 4px; }
.note-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-tool { min-width: 46px; padding: 4px 4px; }
.note-tool:disabled { opacity: .35; }
.note-bar .note-bar-btn { flex: 1 1 0; min-width: 0; padding: 4px 2px; }
.note-bar-done { flex: none; }
/* the PIN pad */
.lock-box { display: grid; justify-items: center; gap: 10px; padding: 24px 0 40px; text-align: center; }
.lock-box h1 { margin: 0; font-family: var(--narrow, system-ui); }
.lock-icon svg.line { width: 52px; height: 52px; color: var(--notes); }
.lock-face { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 320px; }
.lock-face .mark { margin: 0; }
.lock-sheet { display: grid; justify-items: center; gap: 10px; }
.pin-words { margin: 6px 0 0; font-weight: 600; }
.pin-dots { display: flex; gap: 14px; min-height: 22px; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--steel); }
.pin-dot.on { background: var(--ink); border-color: var(--ink); }
.pin-msg { margin: 0; min-height: 1.4em; color: var(--live); font-weight: 600; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; justify-content: center; }
.pin-key { width: 76px; height: 76px; border: 0; border-radius: 50%; background: var(--panel); color: var(--ink); font-size: 1.5em; font-weight: 600; box-shadow: var(--shadow); }
.pin-key.pin-ok { background: var(--notes); color: var(--on-cat6); font-size: 1.1em; }
.pin-key:active { transform: scale(.94); }
.meta-locked { color: var(--notes); }
/* the password warning */
.note-warn { display: grid; gap: 8px; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--ink); }
.note-warn p { margin: 0; font-weight: 500; }
.note-warn button { justify-self: start; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; font-weight: 700; }
/* text size */
.size-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.size-btn { width: 96px; font-size: 1.3em; }
.size-show { margin: 0; min-width: 4em; text-align: center; font-weight: 700; font-size: 1.2em; }
/* earlier copies */
.version-row { min-height: 72px; }
.version-words { display: grid; text-align: left; }
.version-words b { font-weight: 700; }
.version-words span { color: var(--steel); font-size: .85em; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.version-text { max-height: 50dvh; overflow-y: auto; padding: 12px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.version-text p { margin: 0 0 6px; }
.version-text .vl-text:first-child { font-weight: 700; font-size: 1.15em; }
.vl-heading { font-weight: 700; }
/* full-screen modes */
.note-mode { position: fixed; inset: 0; z-index: 46; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; background: var(--rack); color: var(--ink);
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
.mode-head { display: flex; align-items: center; gap: 10px; }
.mode-head h2 { flex: 1; margin: 0; font-family: var(--narrow, system-ui); font-size: 1.5em; }
.cook-where { margin: 8px 0 0; color: var(--steel); font-weight: 700; }
.cook-section { margin: 0; color: var(--notes); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85em; min-height: 1.2em; }
.cook-step { flex: 1; margin: 0; font-size: 2.1em; line-height: 1.3; font-weight: 600; }
.cook-buttons { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; }
.cook-buttons .big-btn { min-height: 72px; }
.shop-list, .shop-cart { display: grid; gap: 10px; }
.shop-item { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 76px; padding: 0 18px; border: 0; border-radius: 14px;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow); font-size: 1.35em; font-weight: 600; text-align: left; }
.shop-item .mark { margin: 0; color: var(--steel); }
.shop-item svg.line { width: 34px; height: 34px; }
.shop-item:not(.got) svg path { opacity: 0; }
.shop-item.got { color: var(--steel); text-decoration: line-through; box-shadow: none; }
.shop-item.got svg rect { fill: var(--notes); stroke: var(--notes); }
.shop-item.got svg path { stroke: var(--paper); }
.shop-cart summary { min-height: 52px; display: flex; align-items: center; font-weight: 700; color: var(--steel); cursor: pointer; }
.shop-empty { font-size: 1.3em; color: var(--ok); font-weight: 700; }
.shop-done { margin-top: auto; }
.large-text { font-size: 1.9em; line-height: 1.4; }
.large-text p, .large-text h3 { margin: 0 0 .5em; }
.large-done { color: var(--steel); text-decoration: line-through; }
/* photos in a note */
.nl-photo { display: grid; gap: 6px; justify-items: start; margin: 8px 0; }
.note-photo { max-width: 100%; max-height: 360px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.photo-del { min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--panel-2); color: var(--steel); font-size: .8em; font-weight: 600; }
/* printing: only the note, black on white, no backgrounds or shadows (saves ink) */
#print-area { display: none; }
@media print {
  html.printing body > *:not(#print-area) { display: none !important; }
  html.printing #print-area { display: block; color: #000; background: #fff; font: 12pt/1.45 Georgia, "Times New Roman", serif; }
  html.printing, html.printing body { background: #fff !important; }
  #print-area .print-note { break-after: page; }
  #print-area .print-note:last-child { break-after: auto; }
  #print-area h1 { font-size: 18pt; margin: 0 0 4pt; }
  #print-area h2 { font-size: 13pt; margin: 10pt 0 4pt; }
  #print-area p { margin: 0 0 3pt; }
  #print-area .print-meta { color: #555; font-size: 10pt; margin-bottom: 8pt; }
  #print-area .print-done { color: #555; text-decoration: line-through; }
}

/* ==== Notes phase 3 (2026-11-18): summary, tips, line buttons, joining ===================================== */
.note-summary, .note-tip { display: grid; gap: 6px; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--notes-soft); }
.note-summary p, .note-tip p { margin: 0; }
.sum-label { font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--notes); }
.note-summary .link-btn { justify-self: start; }
.note-tip button { justify-self: start; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; font-weight: 700; }
.nl { flex-wrap: wrap; }
.nl-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; padding-left: 0; }
.nl-check .nl-links, .nl-bullet .nl-links, .nl-number .nl-links { padding-left: 40px; }
.nl-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px;
  background: var(--notes-soft); color: var(--notes); font-size: .78em; font-weight: 700; text-decoration: none; }
.nl-link .mark { margin: 0; }
.nl-link svg.line { width: 1.1em; height: 1.1em; }
.title-idea { margin: 0; font-family: var(--narrow, system-ui); font-size: 1.5em; font-weight: 600; }
.dupe-card { display: grid; gap: 8px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--warn-bg); }
.dupe-card p { margin: 0; font-weight: 500; }
.dupe-card .primary { min-height: 48px; border: 0; border-radius: 12px; font-weight: 700; }
.dupe-card .link-btn { justify-self: start; }
/* phase 4: reminder and repeat chips, the tidy-up card */
.meta-time { color: var(--notes); background: var(--notes-soft); }
.tidy-names { font-size: .9em; color: var(--steel); }

/* ==== Notes phase 5 (2026-11-18): links to her other apps ================================================== */
.cal-note { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 40px; margin-top: 6px; padding: 0 12px;
  border: 0; border-radius: 999px; background: var(--notes-soft); color: var(--notes); font-size: .8em; font-weight: 700; }
.cal-note .mark { margin: 0; }
.cal-note svg.line { width: 1.1em; height: 1.1em; }
.cal-note.has { background: var(--notes); color: var(--on-cat6); }
.wip-tile { border: 2px dashed var(--line); box-shadow: none; background: none; }
.wip-tile .ft-count { background: var(--warn-bg); color: var(--ink); }
.wip-badge { display: inline-block; margin: 0; padding: 6px 12px; border-radius: 6px; background: var(--warn-bg); font-weight: 700; }
.wip-list { display: grid; gap: 8px; padding-left: 22px; }
.place-row { cursor: default; }
.ft-count:empty { display: none; }

/* ==== Notes phase 6 (2026-11-18): offline ==================================================================== */
.notes-offline { margin: 10px 0; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--ink); font-size: .9em; }
.notes-offline b { font-weight: 700; }

/* Speak from anywhere: a round mic beside STATIC; its panel shows what she said and STATIC's answer */
.speak-btn { width: 56px; padding: 0; justify-content: center; border-radius: 50%; }
.speak-btn .house svg.line { width: 26px; height: 26px; }
.nav-bar:has(> :nth-child(4)) > * { font-size: .8em; }
.nav-bar:has(> :nth-child(4)) > .speak-btn { width: 50px; min-height: 50px; }
.quick-h { margin: 0; font-family: var(--narrow, system-ui); font-size: 1.6em; }
.quick-said { margin: 0; font-size: 1.15em; font-weight: 600; }
.quick-voice .msg-static { margin: 0; }

/* Tours on iPhone (2026-11-18): Rachel saw no gray-out. The four gray panels stay (they hold back taps), but
   the gray itself is now drawn by one big shadow around the highlight, and by the whole layer when nothing is
   highlighted, which iPhones draw reliably. */
.tour-block { background: transparent; transition: none; }
.tour-ring { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 7px var(--cat6), 0 0 0 200vmax rgba(10, 14, 18, .58); transition: none; }
.tour-ring.tap { animation: none; }
.tour-layer.no-target { background: rgba(10, 14, 18, .58); }
.tour-layer.picking { background: rgba(10, 14, 18, .58); }

/* shopping mode (2026-11-18): the cart is a clear button; Done shopping asks right in the screen */
.shop-body { display: grid; gap: 12px; }
.shop-cart-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 0 18px; border: 2px solid var(--notes);
  border-radius: 14px; background: var(--notes-soft); color: var(--notes); font-size: 1.1em; font-weight: 700; text-align: left; }
.shop-cart-btn .mark { margin: 0; }
.shop-cart-btn svg.line { width: 28px; height: 28px; }
.shop-cart-btn > span:nth-child(2) { flex: 1; }
.shop-cart-hint { font-size: .8em; text-decoration: underline; text-underline-offset: 3px; }
.shop-cart-chev { font-size: 1.6em; line-height: 1; transition: transform .15s; }
.shop-cart-chev.open { transform: rotate(90deg); }
.shop-cart-list .muted { margin: 0; }
.shop-finish { display: grid; gap: 12px; margin-top: 8px; }
.shop-finish h3 { margin: 0; font-size: 1.6em; }
.shop-finish p { margin: 0 0 4px; font-size: 1.1em; }
.shop-finish .link-btn { justify-self: center; min-height: 52px; }
/* panels opened from a full-screen mode go on top of it */
.note-sheet { z-index: 48; }

/* ==== more styles in a note, and a neater Format panel (2026-11-18) ============================================== */
.nl-subheading .nl-text { font-size: 1.05em; font-weight: 700; color: var(--steel); text-transform: uppercase; letter-spacing: .05em; padding-top: 6px; }
.nl-quote .nl-text { font-style: italic; color: var(--steel); }
.nl-quote-mark { font-size: 1.6em; line-height: 1; color: var(--steel); font-family: Georgia, serif; }
.nl-important { margin: 4px 0; padding: 4px 8px; border-radius: 8px; background: var(--warn-bg); }
.nl-important .nl-text { font-weight: 600; }
.nl-imp-mark { margin: 0; color: var(--warn); padding-top: 4px; }
.nl-imp-mark svg.line { width: 1.2em; height: 1.2em; }
.nl-l1 { padding-left: 1.6em; } .nl-l2 { padding-left: 3.2em; } .nl-l3 { padding-left: 4.8em; }
.nl-divider { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.nl-divider hr { flex: 1; border: 0; border-top: 2px solid var(--line); margin: 0; }
.divider-del { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--panel-2); color: var(--steel); }
.divider-del .mark { margin: 0; }
.divider-del svg.line { width: 16px; height: 16px; }
/* the Format panel: a tidy grid in three groups, and a line saying what the current line is */
.note-format { display: grid; gap: 10px; overflow-x: visible; overflow-y: auto; max-height: 52vh; padding: 12px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  box-shadow: 0 -6px 18px rgba(24, 32, 38, .08); }
.note-format[hidden] { display: none; }
.fmt-where { margin: 0; font-size: .8em; color: var(--steel); font-weight: 600; }
.fmt-group { display: grid; gap: 6px; }
.fmt-label { margin: 0; font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); }
.fmt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.note-format .fmt-btn { flex: initial; justify-content: flex-start; min-height: 50px; padding: 0 10px; font-size: .8em; }
.fmt-btn:disabled { opacity: .35; }
.fmt-heading span:last-child { font-size: 1.15em; font-weight: 800; }
.fmt-subheading span:last-child { text-transform: uppercase; letter-spacing: .04em; font-size: .9em; }
.fmt-quote span:last-child { font-style: italic; }
.fmt-important { background: var(--warn-bg); }
#screen-note.fmt-open { padding-bottom: 52vh; }
.cc-quote { font-style: italic; color: var(--steel); }
.cc-important { font-weight: 700; }
.cc-hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
#print-area .print-quote { font-style: italic; }
#print-area .print-important { font-weight: 700; }
#print-area hr { border: 0; border-top: 1px solid #000; }
.fmt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.note-format .fmt-btn { min-width: 0; gap: 6px; padding: 0 8px; white-space: normal; line-height: 1.1; text-align: left; }
.note-format .fmt-btn > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.note-format .fmt-btn .mark { flex: none; }
/* two roomy columns: at her text size three were too tight and broke words */
.fmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.note-format .fmt-btn { width: 100%; box-sizing: border-box; overflow: hidden; }
.note-format .fmt-btn > span:last-child { overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==== Calendar phase 1 (2026-11-18): Today card, views, colors, sections, week, month ============================ */
.cal-dot { display: inline-block; flex: none; width: .7em; height: .7em; border-radius: 50%; margin-right: 8px; vertical-align: .05em; background: var(--steel); }
.cal-today { display: grid; gap: 6px; margin: 4px 0 14px; padding: 16px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.ct-label { margin: 0; font-size: .8em; font-weight: 700; color: var(--steel); text-transform: uppercase; letter-spacing: .06em; }
.ct-next { margin: 0; font-size: 1.25em; line-height: 1.3; }
.ct-next b { font-weight: 700; }
.ct-sub { margin: 0; color: var(--steel); }
.ct-words { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.day-words { margin: 0 0 10px; }
.ct-read { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 700; }
.ct-read .mark { margin: 0; }
.cal-views { margin-bottom: 10px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cal-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); font-size: .8em; font-weight: 600; }
.cal-chip.off { opacity: .45; text-decoration: line-through; }
.cal-chip.static { border-style: dashed; }
.dp-dots { display: flex; gap: 3px; min-height: 7px; }
.cal-day-h.big { font-size: 1.3em; margin-top: 16px; }
.cal-title { display: flex; align-items: baseline; }
.cal-ev-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-later { margin-top: 16px; }
.cal-later > summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border: 2px solid var(--line);
  border-radius: 14px; background: var(--panel); font-weight: 700; cursor: pointer; list-style: none; }
.cal-later > summary::-webkit-details-marker { display: none; }
.cal-later-hint { color: var(--cat6); text-decoration: underline; text-underline-offset: 3px; font-size: .85em; }
.cal-later-day { margin: 14px 4px 6px; font-weight: 700; }
.cal-later .cal-ev { background: var(--panel); border-radius: 12px; margin-bottom: 6px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.cal-nav p { margin: 0; font-weight: 700; text-align: center; font-size: .9em; }
.cal-nav button { min-height: 48px; padding: 0 12px; border: 0; border-radius: 12px; font-weight: 600; font-size: .85em; }
.cal-arrow { width: 52px; font-size: 1.5em !important; }
.cal-month-h { margin: 0; font-size: 1.2em; }
.cal-week { display: grid; gap: 8px; }
.week-row { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--panel);
  color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.week-row.today { outline: 2px solid var(--cal-red); }
.wr-day { flex: none; width: 3.2em; display: grid; }
.wr-day b { font-weight: 700; }
.wr-day span { font-size: 1.3em; font-weight: 700; }
.wr-what { display: grid; gap: 4px; min-width: 0; }
.wr-ev { display: flex; align-items: baseline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cm-wd { text-align: center; font-size: .75em; font-weight: 700; color: var(--steel); padding: 4px 0; }
.cm-day { display: grid; justify-items: center; align-content: start; gap: 3px; min-height: 52px; padding: 6px 0; border: 0; border-radius: 10px;
  background: var(--panel); color: var(--ink); }
.cm-day.other { opacity: .4; }
.cm-day.today .cm-n { color: var(--cal-red); font-weight: 800; }
.cm-day.on { background: var(--cat6); color: var(--on-cat6); }
.cm-day.on .cm-n { color: var(--on-cat6); }
.cm-n { font-weight: 600; }
.cal-tools { display: grid; gap: 10px; margin-top: 18px; }
.cal-tools .big-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.cal-tools .mark { margin: 0; }
#print-area .print-day { break-inside: avoid; margin-bottom: 10pt; }
#print-area .print-cal h2 { font-size: 14pt; border-bottom: 1px solid #000; padding-bottom: 2pt; }

/* Calendar phase 2: the Add form's quick starts, calendar picker, travel time */
.cal-quick { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--panel); }
.cal-photo { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .9em; }
.cal-photo .mark { margin: 0; }
.cal-pick .cal-chip[aria-checked="true"] { border-color: var(--cat6); background: var(--t-blue, #DDE9F8); color: var(--ink); }
.cal-form select, .cal-form textarea { width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); font: inherit; color: var(--ink); }
.cal-travel { display: block; margin-top: 4px; font-size: .85em; font-weight: 600; color: var(--ok); }
.cal-ev-btns .cal-note .mark { margin: 0; }

/* Calendar phase 3: reminders and While you were away */
.remind-list { display: grid; gap: 6px; }
.remind-row .mark { color: var(--steel); }
.remind-row:not(.on) svg path { opacity: 0; }
.remind-row.on .mark { color: var(--cat6); }
.remind-row.on svg rect { fill: var(--cat6); stroke: var(--cat6); }
.remind-row.on svg path { stroke: var(--panel); }
.remind-own { display: grid; grid-template-columns: 5em 1fr auto; gap: 8px; align-items: center; }
.remind-own button { min-height: 52px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 700; }
.remind-own select, .remind-own input { min-height: 52px; }
.cal-away { display: grid; gap: 6px; margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--warn-bg); }
.cal-away h2 { margin: 0; font-size: 1.1em; }
.cal-away p { margin: 0; }
.cal-away button { justify-self: start; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; font-weight: 700; }

/* Calendar phase 4: who's coming, birthdays, Bubba, the family calendar */
.cal-who { display: flex; gap: 6px; align-items: center; }
.cal-who svg { width: 18px; height: 18px; flex: none; }
.cal-who-help { margin: -6px 0 6px; font-size: .9em; }
.cal-extra { display: grid; gap: 8px; margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cal-extra h2 { margin: 0; font-size: 1.1em; }
.cal-extra p { margin: 0; }
.cx-row { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid var(--line); }
.cx-row:first-of-type { border-top: 0; }
.cx-title .cal-dot { margin-right: 8px; }
.cx-tip { color: var(--steel); }
.cx-row .cal-note { justify-self: start; }
.cal-wip summary { display: flex; gap: 10px; align-items: center; cursor: pointer; min-height: 44px; font-size: 1.05em; }
.wip-tag { padding: 2px 10px; border-radius: 999px; background: var(--warn-bg); font-size: .85em; font-weight: 700; }
.cal-wip ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* Calendar phase 5: clashes, medicine, weather, free time */
.cal-clash { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); font-weight: 600; }
.cal-clash svg { width: 22px; height: 22px; flex: none; }
.cal-meds { margin: 10px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.cal-meds p { margin: 2px 0; }
.cm-h { font-weight: 700; }
.cm-row { white-space: pre; }
.cm-row.past { color: var(--steel); }
.cal-weather { display: block; margin-top: 4px; color: var(--steel); }
.cal-weather.wet { color: inherit; font-weight: 600; }
.free-list { display: grid; gap: 6px; }
.med-list { display: grid; gap: 10px; margin-bottom: 14px; }
.med-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.med-row p { margin: 2px 0 0; }
.med-row button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; font-weight: 700; }
.med-times { display: grid; gap: 8px; margin-bottom: 8px; }
.med-times input { min-height: 52px; }
@media (max-width: 380px) { .med-row { grid-template-columns: 1fr 1fr; } .med-row > div { grid-column: 1 / -1; } }
/* A back button plus Home, STATIC and Speak: Home is just the house, so all four fit on a phone */
.nav-bar:has(> :nth-child(4)) > .home-btn:not(.static-btn) { width: 52px; height: 52px; padding: 0; justify-content: center; }
.nav-bar:has(> :nth-child(4)) > .home-btn:not(.static-btn) .home-word { display: none; }

/* Calendar phase 6: scam warnings on events, What's next? */
.cal-warn { display: grid; gap: 4px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); border: 2px solid var(--live); }
.cal-warn.suspicious { background: var(--warn-bg); border-color: var(--warn); }
.cal-warn p { margin: 0; }
.cw-head { display: flex; gap: 6px; align-items: center; }
.cw-head svg { width: 20px; height: 20px; }
.ct-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-list { margin: 10px 0 0; padding-left: 1.4em; display: grid; gap: 4px; font-size: 1.05em; }

/* Email phase 1: her inbox, one email at a time */
.mail-sum { display: grid; gap: 8px; margin: 0 0 14px; padding: 16px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.ms-label { margin: 0; font-size: .85em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.ms-words { margin: 0; font-size: 1.1em; line-height: 1.5; }
.ms-read { justify-self: start; }
.mail-find { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 14px; }
.mail-find input { min-height: 56px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; }
.mail-find-go { min-height: 56px; padding: 0 20px; border: 0; border-radius: 14px; font-weight: 700; }
.mail-tabs { margin-bottom: 10px; }
.mail-list { display: grid; gap: 8px; }
.mail-row { display: grid; gap: 3px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mail-row.unread { border-left: 6px solid var(--cat6); }
.mail-row.unread .mr-from, .mail-row.unread .mr-subject { font-weight: 800; }
.mail-row.careful { background: var(--bad-bg); border-color: var(--live); }
.mr-top { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.mr-from { font-weight: 700; font-size: 1.05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-when { flex: none; color: var(--steel); font-size: .9em; }
.mr-subject { font-size: 1.02em; }
.mr-preview { color: var(--steel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mr-tag { display: inline-flex; gap: 4px; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--rack); font-size: .85em; font-weight: 600; }
.mr-tag svg { width: 16px; height: 16px; }
.mail-empty, .mail-hint { margin: 4px 0; }
.mail-snoozed { margin-top: 10px; }
.mail-more { margin-top: 22px; }
.mail-more h2 { margin: 0 0 8px; }
.mail-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mail-tool { display: flex; gap: 8px; align-items: center; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; font: inherit; font-weight: 700; text-align: left; }
.mail-tool svg { width: 24px; height: 24px; flex: none; }
.mail-head { margin: 4px 0 0; }
.mail-head p { margin: 0; }
.mh-from { font-size: 1.15em; }
.mh-address, .mh-when { color: var(--steel); font-size: .92em; overflow-wrap: anywhere; }
.mail-subject { margin: 10px 0 12px; font-size: 1.45em; line-height: 1.3; }
.mail-warn { display: grid; gap: 4px; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--bad-bg); border: 2px solid var(--live); }
.mail-warn.suspicious { background: var(--warn-bg); border-color: var(--warn); }
.mail-warn p { margin: 0; }
.mail-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.15em; line-height: 1.65; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.mail-atts { margin-top: 16px; display: grid; gap: 8px; }
.mail-atts h2 { margin: 0; font-size: 1.1em; }
.att-row { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.att-info { display: grid; overflow-wrap: anywhere; }
.att-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.att-btns button { min-height: 48px; padding: 0 14px; border: 0; border-radius: 10px; font-weight: 700; }
.att-warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--bad-bg); font-weight: 600; }
.att-full { width: 100%; border-radius: 12px; }
.mail-actions { display: grid; gap: 8px; margin-top: 16px; }
.mail-set { display: grid; gap: 8px; margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.mail-set h2 { margin: 0; font-size: 1.1em; }
.mail-set p { margin: 0; }
.ms-read, .mail-bar button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 700; }
.ms-read .mark, .mail-bar .mark { margin: 0; }
.mail-tabs { grid-template-columns: 1fr 1fr; }
.mail-actions .big-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Email phase 2: reply, write, check */
.mail-write { width: 100%; margin: 0 0 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.quick-replies { margin-top: 14px; }
.qr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-chips .chip { background: var(--panel); color: inherit; font: inherit; font-weight: 600; }
.mail-compose textarea.mail-text { font-size: 1.1em; line-height: 1.55; }
.mail-help { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--rack); border: 1px dashed var(--line); }
.mail-help p { margin: 0; }
.mail-help-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mail-help-btns button, .mail-compose > .big-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.mail-help-btns .on { background: var(--live); color: var(--on-live); }
.mail-checked { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.mail-checked p { margin: 0; }
.mail-body.small { font-size: 1em; padding: 12px; }
.to-box { display: grid; gap: 8px; }
.to-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.to-chip { min-height: 44px; }
.to-box input { min-height: 52px; }
.to-sugg { display: grid; gap: 6px; }
.mail-replying { margin: 0; font-size: 1.15em; font-weight: 700; }
.email-card .ec-line { margin: 0; }

/* Email phase 3: sender check, links, blocked list */
.mail-sender { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0 !important; padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.mail-sender svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.mail-sender.ok { background: var(--ok-bg); }
.mail-sender.bad { background: var(--bad-bg); border: 2px solid var(--live); }
.mail-links { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.mail-links summary { display: flex; gap: 8px; align-items: center; min-height: 44px; font-weight: 700; cursor: pointer; }
.mail-links summary svg { width: 22px; height: 22px; }
.link-list { display: grid; gap: 8px; margin-top: 8px; }
.link-row { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--rack); }
.link-row p { margin: 0; }
.link-row.scam { background: var(--bad-bg); border: 2px solid var(--live); }
.link-row.suspicious { background: var(--warn-bg); }
.lr-head { display: flex; gap: 6px; align-items: center; }
.lr-head svg { width: 20px; height: 20px; }
.lr-site { font-weight: 700; overflow-wrap: anywhere; }
.link-row button { justify-self: start; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; font-weight: 700; }
.blocked-row { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.blocked-row button { flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; font-weight: 700; }
.mail-set-in { display: grid; gap: 8px; }
.mail-set-in p { margin: 0; }

/* Email phase 4: appointments, clean-up, space */
.mail-appts { display: grid; gap: 8px; margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 2px solid var(--cat6); }
.mail-appts h2 { margin: 0; font-size: 1.1em; }
.appt-row { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.appt-row:first-of-type { border-top: 0; padding-top: 0; }
.appt-row p { margin: 0; }
.appt-title { font-weight: 700; font-size: 1.05em; }
.appt-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.appt-btns button { min-height: 48px; padding: 0 16px; border: 0; border-radius: 10px; font-weight: 700; }
.space-bar { height: 18px; border-radius: 999px; background: var(--rack); border: 1px solid var(--line); overflow: hidden; }
.space-bar span { display: block; height: 100%; background: var(--cat6); }
.space-bar.full span { background: var(--live); }

/* Email phase 5: waiting to send */
.mail-outbox { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); font-weight: 600; }
.mail-outbox p { margin: 0; }
.mail-outbox { display: grid; gap: 6px; }
.mail-outbox .secondary { justify-self: start; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; font-weight: 700; }

/* Email: reload, drafts, subscriptions */
.mail-title { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.mail-title h1 { margin: 0; }
.mail-reload { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; font-weight: 700; }
.mail-reload.busy svg { animation: spin 1s linear infinite; }
.mail-reload .mark { margin: 0; }
.mail-drafts { display: block; margin: -4px 0 12px; }
.mail-saved { margin: 0; text-align: center; }
.mail-compose .danger.big-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.subs-list { display: grid; gap: 10px; margin-bottom: 14px; }
.sub-row { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.sub-row.unsubscribed { opacity: .75; }
.sub-info { display: grid; gap: 2px; overflow-wrap: anywhere; }
.sub-info b { font-size: 1.1em; }
.sub-addr { font-size: .9em; }
.sub-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sub-btns button { min-height: 52px; padding: 0 10px; border-radius: 12px; font-weight: 700; }
.sub-btns .danger { background: var(--live); color: var(--on-live); border: 0; }
.sub-btns .primary { background: var(--cat6); color: var(--on-cat6); border: 0; }
.sub-btns .danger-outline { grid-column: 1 / -1; background: var(--panel); color: var(--live); border: 2px solid var(--live); }
.sub-state { grid-column: 1 / -1; margin: 0; font-weight: 600; color: var(--steel); }
.plain-list { margin: 0 0 12px; padding-left: 1.2em; display: grid; gap: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* no ↑ Top in Notes: it covered the Done button */
body:has(#screen-notes:not([hidden])) .to-top, body:has(#screen-note:not([hidden])) .to-top { display: none; }

/* Notes: the bar rides on top of the iPhone keyboard; the note leaves room under its last line */
.note-bar { transition: bottom .12s ease-out; }
.kb-open #screen-note { padding-bottom: calc(var(--kb, 0px) + 120px); }
#note-lines .nl { cursor: text; }
#note-lines .nl-circle { touch-action: manipulation; }

/* Calendar: Add event, an empty day to tap, her own length, the event just added */
.cal-free-add { display: grid; gap: 4px; width: 100%; padding: 14px 16px; border: 2px dashed var(--line); border-radius: 14px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cal-free-plus { color: var(--cat6); font-weight: 700; }
.cal-form .choices { grid-template-columns: repeat(3, 1fr); }
.cal-own-len { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cal-own-len select { min-height: 56px; padding: 0 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; font: inherit; }
.cal-ends { margin: 8px 0 0; font-weight: 600; }
.cal-ev.just-added { outline: 3px solid var(--cat6); outline-offset: 2px; border-radius: 12px; transition: outline-color .6s; }

/* Bubba: Custom take-away time */
.bubba-custom select, .bubba-custom input { min-height: 56px; padding: 0 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; font: inherit; width: 100%; }
.bubba-custom .bubba-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Email: folding sections with a red count, a yellow "Be careful" tag, old drafts */
.mail-sec { margin: 0 0 12px; }
.mail-sec > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 4px; cursor: pointer; list-style: none; }
.mail-sec > summary::-webkit-details-marker { display: none; }
.mail-sec > summary::before { content: "›"; display: inline-block; width: 1em; font-size: 1.4em; font-weight: 700; color: var(--steel); transition: transform .15s; }
.mail-sec[open] > summary::before { transform: rotate(90deg); }
.ms-title { flex: 1; font-size: 1.25em; font-weight: 800; }
.count-bubble { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--live); color: var(--on-live); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.count-bubble.zero { background: var(--line); color: var(--ink); }
.mr-tag.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }
.mr-tag.bad { background: var(--bad-bg); color: var(--live); }
.draft-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.draft-del { min-width: 84px; border: 0; border-radius: 14px; background: var(--live); color: var(--on-live); font-weight: 700; }
.old-drafts { margin-top: 18px; }
.old-drafts .big-btn { margin-top: 6px; }

/* the inbox tabs, with a red count on each */
.mail-tabs { grid-template-columns: 1fr 1fr; }
.mail-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; }
.mail-tabs .count-bubble { min-width: 26px; height: 26px; font-size: .9em; }
.mail-tabs button[aria-checked="true"] .count-bubble.zero { background: var(--on-cat6); color: var(--cat6); }
.mail-tabs button { white-space: nowrap; font-size: .95em; gap: 6px; }
.mail-tabs .count-bubble { min-width: 24px; height: 24px; padding: 0 6px; font-size: .85em; }

/* Final polish (2026-11-18) */
/* room under the last button, so the ↑ Top button never sits on it */
.screen:not(#screen-chat):not(#screen-note):not(#screen-notes) { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
/* week view: a long event name wraps instead of running off the screen */
.wr-ev { min-width: 0; }
.wr-ev span { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
/* the smallest phones: with a back button, STATIC is just its icon too, so the row stays one line */
@media (max-width: 360px) {
  .nav-bar:has(> :nth-child(4)) { gap: 6px; }
  .nav-bar:has(> :nth-child(4)) > .static-btn:not(.speak-btn) { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .nav-bar:has(> :nth-child(4)) > .static-btn:not(.speak-btn) > span:not(.house):not(.mark) { display: none; }
  .nav-bar:has(> :nth-child(4)) > .back:not(.home-btn) { padding: 0 10px; }
}
