/* Ervo app. Looks like normal texting: white or black background, your messages
   in blue, Ervo's in light or dark gray. Follows the phone's light/dark setting.
   Sizes scale with the phone's width, so it fits any screen from small phones to tablets. */
:root {
  --bg: #ffffff; --surface: #f2f2f7; --surface-2: #e5e5ea; --text: #000000; --text-2: #3c3c43;
  --line: #d1d1d6; --blue: #0a7cff; --brand: #6b2fd0;
  --them: #e9e9eb; --them-text: #000000;
  --field-bg: #1c1c1e; --field-text: #ffffff; --field-hint: #aeaeb2;
  --group: #f2f2f7; --card: #ffffff;
  --glass: rgba(242, 242, 247, 0.62); --glass-line: rgba(60, 60, 67, 0.18); --pill: #ffffff;
  --steps: #ff6a1f; --green: #34c759;
  --font: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif;
  --col: 720px; /* widest the content gets on tablets and folding phones */
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --text: #ffffff; --text-2: #c7c7cc;
  --line: #38383a; --brand: #7a4be0;
  --them: #262629; --them-text: #ffffff;
  --field-bg: #ffffff; --field-text: #000000; --field-hint: #6c6c70;
  --group: #000000; --card: #1c1c1e;
  --glass: rgba(37, 37, 40, 0.58); --glass-line: rgba(255, 255, 255, 0.12); --pill: #2c2c2e;
  color-scheme: dark;
}

/* 1rem is about 15px on small phones and 17px on big ones */
html { font-size: clamp(14px, 4vw, 17px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--text-2); margin: 0; }

.screen {
  position: fixed; inset: 0; display: none; flex-direction: column; background: var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.screen.active { display: flex; animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Keep a comfortable reading width on tablets and big phones in landscape */
.welcome-top, .step, .preview-note, .chips, .attach-sheet, .link-row, .composer, .stats-body {
  width: 100%; max-width: var(--col); margin-left: auto; margin-right: auto;
}

/* Splash */
.splash { align-items: center; justify-content: center; gap: 14px; }
.splash-logo { display: flex; align-items: center; gap: 12px; animation: pop 0.6s cubic-bezier(.2, .8, .2, 1) both; }
.splash-logo .sym { height: clamp(56px, 18vw, 84px); }
.splash-logo .word { height: clamp(40px, 13vw, 60px); }
.tagline { margin: 0; color: var(--text-2); font-weight: 600; animation: fade 0.6s 0.3s both; }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

/* Welcome / sign-up */
.welcome { overflow-y: auto; }
.welcome-top { text-align: center; padding: clamp(20px, 7vh, 56px) 24px 18px; }
.avatar-xl { width: clamp(96px, 34vw, 150px); height: clamp(96px, 34vw, 150px); object-fit: contain; animation: bob 3.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.welcome-top h1 { margin: 8px 0 6px; font-size: 1.85rem; letter-spacing: -0.8px; }
.step { display: none; padding: 0 24px 24px; }
.step.active { display: block; animation: fade 0.3s ease both; }
.hint { color: var(--text-2); font-size: 0.875rem; margin: 0 4px 12px; min-height: 20px; }
.field { width: 100%; height: 3.4rem; border-radius: 16px; border: 0; background: var(--field-bg); color: var(--field-text); padding: 0 18px; font-size: 16px; outline: none; }
.field::placeholder { color: var(--field-hint); }
.field:focus { box-shadow: 0 0 0 3px rgba(10, 124, 255, 0.45); }
.field.code { letter-spacing: 10px; text-align: center; font-size: 1.4rem; font-weight: 700; }
.field.soft { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.field.soft::placeholder { color: var(--text-2); }
.error { color: #d70015; font-size: 0.875rem; margin: 8px 4px 10px; min-height: 20px; }
[data-theme="dark"] .error { color: #ff6961; }
.demo { font-size: 0.8rem; text-align: center; color: var(--text-2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--field-bg); border-radius: 999px; padding: 4px; margin-bottom: 10px; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.seg span { display: flex; align-items: center; justify-content: center; height: 2.75rem; border-radius: 999px; font-weight: 700; color: var(--field-text); }
.seg input:checked + span { background: var(--brand); color: #fff; }
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3.25rem; border-radius: 999px; border: 0; font-weight: 700; font-size: 1rem; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.link { background: none; color: var(--text); text-decoration: underline; min-height: 44px; margin-top: 6px; font-weight: 600; }

/* Chat header: centered avatar and name, like a text thread */
/* Chat: the header and bottom bar are frosted glass and the messages scroll behind them,
   like iMessage. --head-h and --dock-h are measured in app.js. */
.chat { padding-top: 0; padding-bottom: 0; }
.chat-header { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; padding: calc(6px + env(safe-area-inset-top)) max(10px, calc((100% - var(--col)) / 2)) 8px; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border-bottom: 0.5px solid var(--glass-line); }
.chat-header .who { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.avatar { width: clamp(40px, 12vw, 50px); height: clamp(40px, 12vw, 50px); border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px var(--line); }
.avatar img { width: 86%; height: 86%; object-fit: contain; }
.who b { font-size: 0.95rem; font-weight: 700; margin-top: 2px; }
/* Status pill: what Ervo is doing right now */
.status { display: inline-flex; align-items: center; gap: 5px; max-width: min(78vw, 360px); margin-top: 3px; padding: 3px 11px; border-radius: 999px; background: var(--pill); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); font-size: 0.75rem; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
.status > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.status.busy { color: var(--text); }
.status.busy .status-ico { animation: nod 1.2s ease-in-out infinite; }
.status-ico:empty { display: none; }
@keyframes nod { 0%, 100% { transform: none; } 50% { transform: translateY(-2px) rotate(-8deg); } }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--blue); display: flex; align-items: center; justify-content: center; }
#theme-toggle { grid-column: 1; grid-row: 1; }
#menu-btn { grid-column: 3; grid-row: 1; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .sun { display: block; }
[data-theme="dark"] .icon-btn .moon { display: none; }
.menu { position: absolute; right: max(10px, calc((100% - var(--col)) / 2)); top: calc(100% + 4px); z-index: 5; background: var(--bg); border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22), 0 0 0 1px var(--line); padding: 6px; width: min(250px, calc(100vw - 20px)); }
.menu-who { margin: 6px 10px 8px; font-size: 0.8rem; color: var(--text-2); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 10px; border-radius: 10px; min-height: 44px; font-size: 0.95rem; }
.menu button:active { background: var(--surface); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 8px; }
.mi { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.mi svg { width: 17px; height: 17px; }
.mi.stats { background: #ff375f; }
.mi.apps { background: var(--blue); }
.mi.greet { background: #ff9f0a; }
.mi.wake { background: #7b4bd6; }
.menu-version { margin: 4px 10px 6px; font-size: 0.75rem; color: var(--text-2); }

.preview-note { margin-top: 0; margin-bottom: 6px; padding: 0 16px; font-size: 0.75rem; color: var(--text-2); text-align: center; }

/* Messages */
.thread { flex: 1; min-height: 0; overflow-y: auto; padding: calc(var(--head-h, 100px) + 10px) max(12px, calc((100% - var(--col)) / 2 + 12px)) calc(var(--dock-h, 110px) + 8px); display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.thread > * { flex-shrink: 0; } /* messages keep their size; the thread scrolls instead */
.msg { max-width: min(80%, 34rem); padding: 0.5em 0.8em; border-radius: 19px; font-size: 1rem; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; animation: rise 0.22s ease both; margin-top: 4px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: var(--them); color: var(--them-text); border-bottom-left-radius: 6px; }
.msg.photo { padding: 3px; background: none; border-radius: 18px; }
.msg.photo img { display: block; max-width: min(220px, 60vw); max-height: 280px; border-radius: 16px; }
.msg.link { padding: 0; overflow: hidden; background: var(--them); color: var(--them-text); }
.msg.me.link { background: var(--surface-2); }
.msg.link a { display: block; padding: 10px 13px; color: inherit; text-decoration: none; }
.msg.link b { display: block; font-size: 0.95rem; }
.msg.link small { display: block; color: var(--text-2); font-size: 0.8rem; }
.msg.link .link-top { height: 6px; background: var(--blue); }
.receipt { align-self: flex-end; font-size: 0.7rem; color: var(--text-2); margin: 1px 4px 2px; }
.voice-tag { display: block; font-size: 0.7rem; opacity: 0.8; margin-bottom: 2px; }
/* While Ervo works: picture, name, spinner and what it's doing */
.typing { align-self: flex-start; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--them); color: var(--them-text); margin-top: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); animation: rise 0.22s ease both; }
.typing img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--blue) 12%, var(--bg)); flex: none; }
.typing-body { display: flex; flex-direction: column; line-height: 1.2; }
.typing-body b { font-size: 0.9rem; }
.typing-body small { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-2); }
.typing-body em { font-style: normal; }
.typing .spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--blue) 25%, transparent); border-top-color: var(--blue); animation: spin 0.8s linear infinite; }
.typing .dots { display: none; gap: 3px; }
.typing.is-typing .spin { display: none; }
.typing.is-typing .dots { display: inline-flex; }
.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); animation: dots 1s infinite; }
.typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.typing .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dots { 0%, 100% { opacity: 0.35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }

/* Buttons under one of Ervo's messages: open an app, add to calendar */
.acts { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; max-width: 90%; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--blue); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.act svg { width: 16px; height: 16px; }

/* Suggestions */
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding-bottom: env(safe-area-inset-bottom); background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border-top: 0.5px solid var(--glass-line); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 12px; scrollbar-width: none; scroll-padding: 12px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass-line); background: color-mix(in srgb, var(--bg) 75%, transparent); color: var(--blue); font-size: 0.875rem; font-weight: 500; }
.chip:last-child { margin-right: 18px; }
.chip:active { background: var(--surface); }

/* Attach sheet + link row */
.attach-sheet { display: flex; gap: 10px; padding: 8px 12px 0; }
.attach-sheet button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 16px; border: 0; background: var(--surface); color: var(--text); font-size: 0.875rem; font-weight: 600; min-height: 44px; }
.sheet-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.sheet-ico svg { width: 22px; height: 22px; }
.sheet-ico.photo { background: var(--green); }
.sheet-ico.link { background: var(--blue); }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px 0; }
.link-row .field { flex: 1 1 100%; height: 46px; border-radius: 23px; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.link-row .field::placeholder { color: var(--text-2); }
.link-row .error { flex: 1 1 100%; margin: 0 4px; min-height: 0; }
.pill { flex: 1; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--blue); color: #fff; font-weight: 600; font-size: 0.95rem; }
.pill.ghost { background: var(--surface); color: var(--text); }

/* Composer */
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 10px 10px; }
.round { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; }
.round svg { width: 20px; height: 20px; }
.round.plus { width: 40px; height: 40px; background: var(--surface); color: var(--text-2); margin-bottom: 2px; transition: transform 0.2s; }
.round.plus[aria-expanded="true"] { transform: rotate(45deg); }
.bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; min-height: 44px; border: 1px solid var(--glass-line); border-radius: 22px; padding: 3px 4px 3px 14px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.bar input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font-size: 16px; padding: 8px 0; }
.bar input::placeholder { color: var(--text-2); }
.round.mic { background: none; color: var(--text-2); }
.round.send { background: var(--blue); color: #fff; }

/* Voice: glowing edges, a small owl and an "Ask Ervo" bar */
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.voice { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(0, 0, 0, 0.42); animation: fade 0.2s ease both; }
.chat:has(.voice:not([hidden])) .dock, .chat:has(.voice:not([hidden])) .to-latest { visibility: hidden; }
.voice[hidden] { display: none; }
.voice-glow { position: absolute; inset: 0; pointer-events: none; padding: 7px; box-shadow: inset 0 0 60px rgba(123, 75, 214, 0.45); border-radius: 34px;
  background: conic-gradient(from var(--spin), #7b4bd6, #3b82f6, #22d3ee, #ff9f0a, #ec4899, #7b4bd6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: blur(5px); opacity: 0.95; animation: glow-spin 3.2s linear infinite, glow-in 0.4s ease both; }
.voice.listening .voice-glow { animation: glow-spin 1.6s linear infinite, glow-breathe 1.2s ease-in-out infinite; }
.voice.thinking .voice-glow { animation: glow-spin 0.9s linear infinite; opacity: 1; }
@keyframes glow-spin { to { --spin: 360deg; } }
@keyframes glow-breathe { 0%, 100% { opacity: 0.75; padding: 6px; } 50% { opacity: 1; padding: 12px; } }
@keyframes glow-in { from { opacity: 0; } }
.voice-dock { position: relative; padding: 0 12px calc(14px + env(safe-area-inset-bottom)); width: min(100%, var(--col)); margin: 0 auto; }
.voice-status { margin: 0 0 8px; text-align: center; font-size: 0.85rem; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.voice-bar { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 96%, transparent); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border: 1px solid var(--glass-line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); animation: rise 0.25s ease both; }
.voice-ava { flex: none; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--blue) 14%, var(--bg)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.voice-ava img { width: 36px; height: 36px; object-fit: contain; animation: owl-pop 0.45s cubic-bezier(.2, 1.4, .4, 1) both; }
.voice.listening .voice-ava { box-shadow: 0 0 0 0 rgba(123, 75, 214, 0.6); animation: callring 1.2s infinite; }
@keyframes owl-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.voice-bar input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font-size: 16px; padding: 8px 4px; }
.voice-bar input::placeholder { color: var(--text-2); }
.voice-mic { width: 40px; height: 40px; background: var(--blue); color: #fff; }
.voice.listening .voice-mic { background: #ff3b30; }
.voice-x { width: 40px; height: 40px; background: var(--surface); color: var(--text-2); }

/* Pop-up mode ("Hey Ervo" over other apps): see-through, with answers above the bar */
html.overlay, html.overlay body, html.overlay .screen { background: transparent !important; }
html.overlay .chat-header, html.overlay .dock, html.overlay .to-latest, html.overlay #splash { display: none !important; }
html.overlay .voice { background: transparent; }
html.overlay .thread { position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom)); top: 18%; z-index: 11; padding: 8px max(12px, calc((100% - var(--col)) / 2 + 12px)); justify-content: flex-end; pointer-events: auto; }
html.overlay .thread > * { pointer-events: auto; }
html.overlay .msg.them { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
html.overlay .typing { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }

/* ---------- Ervo Stats (grouped cards, like a health summary) ---------- */
.stats { background: var(--group); }
.stats-header { display: flex; align-items: center; min-height: 48px; padding: 4px max(6px, calc((100% - var(--col)) / 2)); }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 10px 0 4px; border: 0; background: none; color: var(--blue); font-size: 1.05rem; }
.back svg { width: 22px; height: 22px; }
.stats-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 28px; overscroll-behavior: contain; }
.stats-date { margin: 4px 2px 0; font-size: 0.8rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.3px; }
.stats-body h1 { margin: 2px 2px 6px; font-size: 2.1rem; letter-spacing: -0.8px; }
.stats-weather { margin: 0 2px 4px; color: var(--text-2); font-size: 0.95rem; }
.stats-body h2 { margin: 22px 4px 8px; font-size: 1.25rem; letter-spacing: -0.3px; }
.card { background: var(--card); border-radius: 16px; padding: 14px 16px; }
.card-note { margin: 10px 0 0; font-size: 0.85rem; color: var(--text-2); }
.card-note:empty { display: none; }
.card .pill { width: 100%; margin-top: 12px; }
.foot-note { margin: 10px 6px 0; font-size: 0.8rem; color: var(--text-2); }

.steps-top { display: flex; align-items: center; gap: 16px; }
.ring { width: clamp(84px, 26vw, 120px); height: clamp(84px, 26vw, 120px); transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 13; stroke-linecap: round; }
.ring-bg { stroke: color-mix(in srgb, var(--steps) 20%, transparent); }
.ring-fg { stroke: var(--steps); stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 0.9s cubic-bezier(.2, .8, .2, 1); }
.steps-num { display: flex; flex-direction: column; }
.label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--steps); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.steps-num b { font-size: 2.2rem; letter-spacing: -1px; line-height: 1.1; }
.steps-num small { color: var(--text-2); font-size: 0.85rem; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 78px; margin-top: 14px; }
.week:empty { display: none; }
.week .bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.week .bar-col i { width: 100%; max-width: 26px; border-radius: 6px; background: color-mix(in srgb, var(--steps) 45%, transparent); min-height: 4px; }
.week .bar-col.today i { background: var(--steps); }
.week .bar-col span { font-size: 0.7rem; color: var(--text-2); }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mini-stats:empty { display: none; }
.mini-stats div { background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.mini-stats small { display: block; font-size: 0.75rem; color: var(--text-2); }
.mini-stats b { font-size: 1.15rem; }

.list { padding: 4px 0; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none; color: var(--text); text-align: left; text-decoration: none; min-height: 56px; }
.row + .row { border-top: 1px solid var(--line); }
.row .txt { flex: 1; min-width: 0; }
.row .txt b { display: block; font-size: 0.95rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .txt small { display: block; font-size: 0.8rem; color: var(--text-2); }
.row .side { font-size: 0.8rem; color: var(--text-2); white-space: nowrap; }
.row .switch { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--blue); color: #fff; font-weight: 600; font-size: 0.85rem; flex: none; }
.row .switch.on { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.empty { margin: 0; padding: 14px 16px; color: var(--text-2); font-size: 0.9rem; }

/* App and event icons: plain shapes, not real brand logos */
.app-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.app-ico svg { width: 20px; height: 20px; }
.app-ico.big { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 6px; }
.app-ico.big svg { width: 34px; height: 34px; }
.app-ico.calendar { background: #1a73e8; }
.app-ico.shop { background: #ff9900; }
.app-ico.health { background: #ff375f; }
.app-ico.location { background: var(--green); }
.app-ico.mail { background: #d93025; }
.app-ico.done { background: var(--brand); }

/* ---------- Bottom sheets: permission and greeting settings ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.45); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s ease both; }
.sheet { width: 100%; max-width: 520px; max-height: 92%; overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); animation: up 0.28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 6px 0 8px; font-size: 1.3rem; text-align: center; letter-spacing: -0.3px; }
.sheet > .muted { text-align: center; font-size: 0.9rem; margin-bottom: 14px; }
.perm-list { margin: 8px 0 0; padding: 0; list-style: none; }
.perm-list li { position: relative; padding: 9px 0 9px 28px; font-size: 0.95rem; border-top: 1px solid var(--line); }
.perm-list li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.perm-note { font-size: 0.8rem; color: var(--text-2); margin: 10px 0 0; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; }
.choice .txt b { display: block; font-size: 1rem; }
.choice .txt small { display: block; color: var(--text-2); font-size: 0.8rem; margin-top: 2px; }
.app-ico.calendar-phone { background: #ff3b30; }

/* Product picks from Ervo's research */
.products { align-self: stretch; display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.products::-webkit-scrollbar { display: none; }
.product { flex: none; width: min(78%, 280px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 18px; background: var(--them); color: var(--them-text); }
.product b { font-size: 0.95rem; line-height: 1.25; }
.product small { color: var(--text-2); font-size: 0.8rem; font-weight: 600; }
.product p { margin: 2px 0 0; font-size: 0.875rem; line-height: 1.35; flex: 1; }
.product-btns { display: flex; gap: 6px; margin-top: 8px; }
.product-btns .act { flex: 1; justify-content: center; padding: 0 10px; background: var(--bg); }
.act.primary { background: var(--blue) !important; color: #fff; border-color: transparent; }

/* Links inside Ervo's messages */
.inline-link { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.msg.them .inline-link { color: var(--blue); }
.act.danger { background: transparent !important; color: #ff3b30; border-color: rgba(255, 59, 48, 0.45); }
.product.gone { opacity: 0.45; }
.product.gone .act { display: none; }
.product-btns > small { color: var(--text-2); font-size: 0.8rem; }

/* All activity */
.see-all { cursor: pointer; }
.see-all .txt b { color: var(--blue); }
.see-all .side { font-size: 1.4rem; line-height: 1; }
.filters { display: flex; gap: 10px; margin: 10px 0 4px; }
.filters label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.filters select { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 0.95rem; }
.stats-body h2.day { margin: 18px 4px 8px; font-size: 0.85rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.3px; }

.update-logo { display: block; width: 64px; height: 56px; margin: 0 auto 4px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: inherit; transition: width 0.25s; }
.progress.busy i { width: 35%; animation: busy 1.1s ease-in-out infinite; }
@keyframes busy { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.field-label { display: block; font-size: 0.85rem; font-weight: 600; margin: 4px 4px 6px; }
.toggles { margin-top: 14px; border-radius: 14px; background: var(--surface); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 14px; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle span { font-weight: 500; }
.toggle small { display: block; color: var(--text-2); font-size: 0.75rem; font-weight: 400; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle i { position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--surface-2); transition: background 0.2s; flex: none; }
[data-theme="dark"] .toggle i { background: #3a3a3c; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle input:focus-visible + i { box-shadow: 0 0 0 3px rgba(10, 124, 255, 0.45); }

/* Very small phones */
@media (max-width: 340px) {
  .composer { gap: 6px; padding: 6px 6px 8px; }
  .round.plus { width: 36px; height: 36px; }
  .stats-body { padding: 0 10px 24px; }
}
/* Short screens, like phones in landscape */
@media (max-height: 520px) {
  .welcome-top { padding-top: 12px; }
  .avatar-xl { width: 80px; height: 80px; }
  .preview-note { display: none; }
}
/* Tablets: center the sheets */
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 22px; }
}

/* Reduce Motion: no bouncing, sliding or glowing; things just appear. Spinners keep turning
   so Ervo never looks frozen (Apple: keep progress indicators moving). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .typing .spin, .progress.busy i { animation-duration: 0.8s !important; animation-iteration-count: infinite !important; }
  .typing .dots i { animation: none !important; opacity: 0.7; }
}

/* Calendar day card: tap events to pick them, then Remove */
.daycard { align-self: flex-start; width: min(92%, 360px); margin: 6px 0 2px; padding: 12px; border-radius: 20px; background: var(--them); color: var(--them-text); display: flex; flex-direction: column; gap: 6px; animation: rise 0.22s ease both; }
.daycard h3 { margin: 6px 4px 2px; font-size: 1rem; }
.daycard h3:first-child { margin-top: 0; }
.dayrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 0; background: var(--bg); color: var(--text); text-align: left; font-size: 0.95rem; transition: background 0.15s, color 0.15s; }
.dayrow .dt { flex: none; width: 4.6em; font-weight: 700; font-size: 0.85rem; color: var(--text-2); }
.dayrow .dn { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.dayrow .dn small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--text-2); }
.dayrow .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: transparent; }
.dayrow .tick svg { width: 14px; height: 14px; }
.dayrow[aria-pressed="true"] { background: var(--blue); color: #fff; }
.dayrow[aria-pressed="true"] .dt, .dayrow[aria-pressed="true"] .dn small { color: rgba(255, 255, 255, 0.8); }
.dayrow[aria-pressed="true"] .tick { background: #fff; border-color: #fff; color: var(--blue); }
.dayrow.gone { opacity: 0.45; }
.dayrow.gone .dn { text-decoration: line-through; }
.dayrow.gone .tick { visibility: hidden; }
.daycard.busy { opacity: 0.7; pointer-events: none; }
.daycard-note { margin: 2px 4px; font-size: 0.8rem; color: var(--text-2); }
.daycard .pill { flex: none; margin-top: 4px; width: 100%; }
.pill.danger { background: #ff3b30; }
.pill:disabled { background: var(--surface); color: var(--text-2); }
.act:disabled { opacity: 0.5; }

/* Jump to the newest message, when you've scrolled up and something new arrives */
.to-latest { position: absolute; right: max(14px, calc((100% - var(--col)) / 2 + 14px)); bottom: calc(var(--dock-h, 110px) + 10px); z-index: 4; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); color: var(--blue); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.to-latest[hidden] { display: none; }
.to-latest svg { width: 20px; height: 20px; }

/* Calling someone */
.dayrow .initial { flex: none; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--blue) 18%, var(--bg)); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.dayrow .callico { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #34c759; color: #fff; display: flex; align-items: center; justify-content: center; }
.dayrow .callico svg { width: 18px; height: 18px; }
.callrow { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.callrow .dn { font-weight: 700; font-size: 1.05rem; }
.callrow .dn small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--text-2); }
.callring { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.6); animation: callring 1.2s infinite; }
@keyframes callring { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(52, 199, 89, 0); } }

/* ---------- 0.2.7 ---------- */
/* Day labels between messages, like a text thread */
.day-sep { align-self: center; margin: 12px 0 4px; font-size: 0.72rem; font-weight: 600; color: var(--text-2); }
.msg.old, .products.old, .acts.old { animation: none; }
html.overlay .day-sep { display: none; }

/* Product picks: a picture on top */
.product { padding: 10px 12px 12px; }
.product-pic { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 6px; padding: 8px; border: 0; border-radius: 14px; background: #fff; overflow: hidden; }
.product-pic img { width: 100%; height: 100%; object-fit: contain; }
.product-pic.none { aspect-ratio: auto; height: 64px; background: color-mix(in srgb, #ff9900 14%, var(--bg)); color: #ff9900; }
.product-pic.none svg { width: 40px; height: 40px; }

/* Menu icons */
.mi.newchat { background: var(--green); }
.mi.library { background: #5856d6; }

/* Compact rows with switches (Connected apps, What Ervo remembers) */
.row.compact { min-height: 48px; padding: 7px 14px; gap: 11px; }
.row.compact .app-ico { width: 30px; height: 30px; border-radius: 8px; }
.row.compact .app-ico svg { width: 17px; height: 17px; }
.row.compact .txt b { font-size: 0.92rem; }
.row.compact .txt small { font-size: 0.76rem; }
.row.compact .txt small:empty { display: none; }
.row.memory .txt b { white-space: normal; font-weight: 500; }
.row.tap { cursor: pointer; }
.link-btn { flex: none; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 0.85rem; padding: 6px 4px; min-height: 36px; }
.toggle.mini { min-height: 0; padding: 0; flex: none; position: relative; }
.toggle.mini i { width: 44px; height: 26px; }
.toggle.mini i::after { width: 22px; height: 22px; }
.toggle.mini input:checked + i::after { transform: translateX(18px); }
.app-ico.open { background: #8e8e93; }
.app-ico.phone { background: var(--green); }
.app-ico.clock { background: #ff9f0a; }
.app-ico.chat { background: var(--blue); }
.app-ico.brain { background: #af52de; }

/* Calendar picker */
.cal-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; margin: 0 4px; }
.choice.current { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; }
.cal-note { text-align: center; margin: 6px 0; font-size: 0.85rem; }

/* Chats & media */
.lib-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 8px 0 14px; border-radius: 12px; background: var(--surface-2); }
[data-theme="dark"] .lib-tabs { background: var(--surface); }
.lib-tabs button { min-height: 36px; border: 0; border-radius: 9px; background: none; color: var(--text); font-weight: 600; font-size: 0.9rem; }
.lib-tabs button[aria-selected="true"] { background: var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); }
[data-theme="dark"] .lib-tabs button[aria-selected="true"] { background: #3a3a3c; }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 14px; overflow: hidden; }
.lib-pic { aspect-ratio: 1; border: 0; padding: 0; background: #fff; overflow: hidden; }
.lib-pic img { width: 100%; height: 100%; object-fit: cover; }
.lib-new { width: 100%; margin-top: 14px; }
.lib-back { flex: none; margin-bottom: 10px; }
.lib-chat { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 16px; background: var(--card); }
.photo-view { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade 0.2s ease both; }
.photo-view img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* Ervo Stats: a sky that matches the time of day, with see-through cards on top */
#stats { --sky-1: #2f7fd3; --sky-2: #5aa2e6; --sky-3: #9cc9f0; background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 45%, var(--sky-3) 100%); transition: background 0.6s; }
#stats[data-sky="dawn"] { --sky-1: #34407e; --sky-2: #c86f8f; --sky-3: #f2b07e; }
#stats[data-sky="dusk"] { --sky-1: #23265a; --sky-2: #7d4a8c; --sky-3: #e9845a; }
#stats[data-sky="night"] { --sky-1: #070b1e; --sky-2: #141c45; --sky-3: #262b5c; }
#stats[data-sky="day"][data-weather="cloudy"] { --sky-1: #5d7590; --sky-2: #8399b1; --sky-3: #b4c2d1; }
#stats[data-sky="day"][data-weather="wet"] { --sky-1: #3e4f63; --sky-2: #5b6d82; --sky-3: #8796a8; }
#stats[data-sky="night"][data-weather="wet"], #stats[data-sky="night"][data-weather="cloudy"] { --sky-1: #0d1119; --sky-2: #1c2330; --sky-3: #2c3442; }
#stats::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.6s;
  background-image: radial-gradient(1.2px 1.2px at 12% 14%, #fff 50%, transparent), radial-gradient(1px 1px at 32% 8%, #fff 50%, transparent), radial-gradient(1.4px 1.4px at 58% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 76% 6%, #fff 50%, transparent), radial-gradient(1.2px 1.2px at 88% 22%, #fff 50%, transparent), radial-gradient(1px 1px at 22% 30%, #fff 50%, transparent), radial-gradient(1px 1px at 68% 34%, #fff 50%, transparent); }
#stats[data-sky="night"]::before { opacity: 0.8; }
#stats .stats-header, #stats .stats-body { position: relative; }
#stats .back { color: #fff; }
#stats .stats-body h2 { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
#stats .foot-note { color: rgba(255, 255, 255, 0.85); }
#stats .card { background: color-mix(in srgb, var(--card) 80%, transparent); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); }
#stats .mini-stats div { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.sky-hero { color: #fff; padding: 4px 2px 6px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2); }
.sky-hero .stats-date { color: rgba(255, 255, 255, 0.85); }
.sky-now { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.sky-emoji { font-size: 2.2rem; }
.sky-temp { font-size: 3rem; font-weight: 300; letter-spacing: -2px; line-height: 1; }
.sky-cond { display: flex; flex-direction: column; font-weight: 600; font-size: 0.95rem; }
.sky-cond small { font-weight: 500; opacity: 0.85; font-size: 0.8rem; }
.sky-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sky-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 0.8rem; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sky-chip .dot { color: var(--steps); }

/* ---------- 0.2.8: side chats, tap-to-answer choices, Psyche and Ideas ---------- */
.chat-header { grid-template-columns: 44px 44px 1fr 44px 44px; gap: 2px; }
.chat-header .who { grid-column: 3; }
#chats-btn { grid-column: 1; grid-row: 1; }
#theme-toggle { grid-column: 4; grid-row: 1; }
#menu-btn { grid-column: 5; grid-row: 1; }
.chat-name { max-width: min(60vw, 280px); margin-top: 3px; font-size: 0.72rem; font-weight: 600; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi.ideas { background: #ffcc00; color: #3a2a00; }
.mi.psyche { background: var(--brand); }

/* Chats drawer: Main chat on top, side chats under it */
.chats-wrap { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0); transition: background 0.2s; }
.chats-wrap.open { background: rgba(0, 0, 0, 0.35); }
.chats-drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(300px, 82vw); padding: calc(14px + env(safe-area-inset-top)) 10px 20px; background: var(--bg); box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25); transform: translateX(-102%); transition: transform 0.2s ease; overflow-y: auto; }
.chats-wrap.open .chats-drawer { transform: none; }
.chats-title { margin: 4px 10px 12px; font-size: 1.35rem; font-weight: 700; }
.chat-item { display: flex; align-items: center; border-radius: 12px; }
.chat-item.current { background: var(--surface); }
.chat-go { flex: 1; min-width: 0; min-height: 44px; padding: 9px 12px; border: 0; background: none; color: var(--text); text-align: left; }
.chat-go b { display: block; font-size: 0.97rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-go small { display: block; margin-top: 1px; font-size: 0.78rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-x { flex: none; min-width: 36px; height: 36px; margin-right: 4px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.chat-x svg { width: 16px; height: 16px; }
.chat-x.sure { background: #ff3b30; color: #fff; }
.chats-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 4px 12px; font-size: 0.8rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.3px; }
.chats-plus { width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--blue); display: flex; align-items: center; justify-content: center; }
.chats-plus svg { width: 20px; height: 20px; }
.chats-empty { margin: 6px 12px; font-size: 0.85rem; color: var(--text-2); line-height: 1.4; }
.side-banner { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px auto 10px; padding: 6px 8px 6px 14px; width: fit-content; max-width: 92%; border-radius: 999px; background: var(--surface); font-size: 0.78rem; color: var(--text-2); }
.side-banner button { border: 0; border-radius: 999px; padding: 5px 11px; background: var(--blue); color: #fff; font-size: 0.78rem; font-weight: 600; }

/* Tap-to-answer options (the chosen one gets a check) */
.choices { display: flex; flex-direction: column; gap: 6px; max-width: min(78%, 420px); margin: 2px 0 10px; animation: rise 0.25s ease; }
.choice-opt { position: relative; min-height: 44px; padding: 10px 40px 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 0.95rem; text-align: left; }
.choice-opt:not(:disabled):active { background: var(--surface); }
.choice-opt:disabled { color: var(--text-2); opacity: 0.75; }
.choice-opt.picked { opacity: 1; color: var(--text); border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.choice-opt.picked::after { content: ""; position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat; }
[data-theme="dark"] .choice-opt.picked::after { background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
.choices.old { animation: none; }

/* Psyche and Ideas */
.row.style-row .txt b { font-weight: 500; color: var(--text-2); }
.row.style-row .side { white-space: normal; text-align: right; color: var(--text); max-width: 62%; font-size: 0.88rem; }
.psyche-tell { margin-top: 24px; padding: 16px; }
.psyche-tell b { display: block; font-size: 1rem; }
.psyche-tell small { display: block; margin-top: 4px; color: var(--text-2); font-size: 0.86rem; line-height: 1.4; }
.row.idea { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; cursor: pointer; }
.row.idea .txt b { white-space: normal; line-height: 1.3; }
.row.idea .txt small { margin-top: 3px; line-height: 1.35; }
.row.idea:active { background: var(--surface); }
.ideas-refresh { display: block; width: 100%; margin-top: 18px; }
.app-ico.map { background: #30b0c7; }
.app-ico.plane { background: #0a84ff; }
.app-ico.heart { background: #ff375f; }
.app-ico.home { background: #a2845e; }
.app-ico.ball { background: #34c759; }
.app-ico.book { background: #ff9500; }
.app-ico.tooth { background: #64d2ff; }
.app-ico.doctor { background: #ff453a; }
.app-ico.money { background: #30d158; }
.app-ico.star { background: #ffcc00; color: #3a2a00; }
.app-ico.camera { background: #5e5ce6; }
.app-ico.music { background: #ff2d55; }
.app-ico.car { background: #636366; }
.app-ico.sun { background: #ff9f0a; }
.app-ico.people { background: #5856d6; }
.app-ico.food { background: #ff6a1f; }
.app-ico.brain { background: var(--brand); }

/* ---------- 0.2.8: one calm gray chat, Ervo floating at the top, purple bubbles ---------- */
#chat {
  --chat-bg: #f2f2f3; --me: #6b2fd0; --me-text: #ffffff; --them: #ffffff; --them-text: #111111;
  --chat-field: #ffffff; --chat-ico: #6e6e73; --accent: #6b2fd0;
}
[data-theme="dark"] #chat {
  --chat-bg: #212121; --me: #7a4be0; --me-text: #ffffff; --them: #2f2f2f; --them-text: #ececec;
  --chat-field: #2f2f2f; --chat-ico: #b4b4b4; --accent: #b69cff;
}
html:not(.overlay) #chat { background: var(--chat-bg); }
/* No bar: just Ervo's picture, name and what it's doing, over a soft fade */
.chat-header { background: linear-gradient(var(--chat-bg) 80%, color-mix(in srgb, var(--chat-bg) 0%, transparent)); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; padding-bottom: 14px; }
.chat-header .avatar { width: clamp(38px, 11vw, 44px); height: clamp(38px, 11vw, 44px); box-shadow: none; }
.chat-header .who b { font-size: 0.88rem; font-weight: 600; }
.chat-header .status { background: color-mix(in srgb, var(--text) 8%, var(--chat-bg)); box-shadow: none; font-weight: 500; }
.chat-header .icon-btn { color: var(--chat-ico); }
.chat-name { color: var(--accent); }
/* Messages: yours in purple, Ervo's a shade off the background */
.msg.me { background: var(--me); color: var(--me-text); }
.msg.me.link { background: color-mix(in srgb, var(--text) 10%, var(--chat-bg)); color: var(--text); }
.msg.them { background: var(--them); color: var(--them-text); }
[data-theme="light"] .msg.them, :root:not([data-theme]) .msg.them { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.msg.them .inline-link { color: var(--accent); }
.typing { background: var(--them); color: var(--them-text); box-shadow: none; }
.typing .spin { border-color: color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); }
.choice-opt { background: transparent; border-color: color-mix(in srgb, var(--text) 16%, transparent); }
.side-banner { background: color-mix(in srgb, var(--text) 7%, var(--chat-bg)); }
.side-banner button { background: var(--me); }
.day-sep { color: var(--chat-ico); }
/* Bottom: the same gray, no bar line */
.dock { background: linear-gradient(color-mix(in srgb, var(--chat-bg) 0%, transparent), var(--chat-bg) 34%); -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 0; }
.chip { background: transparent; border-color: color-mix(in srgb, var(--text) 16%, transparent); color: var(--text); }
.bar { background: var(--chat-field); border-color: color-mix(in srgb, var(--text) 10%, transparent); }
.to-latest { background: var(--chat-field); color: var(--chat-ico); -webkit-backdrop-filter: none; backdrop-filter: none; }
#chat #send-btn { background: var(--me); }
.msg.me.photo { background: none; padding: 0; }

/* ---------- 0.2.9: built to Apple's and Samsung's (One UI) design guidelines ---------- */
/* Launch: the first frame is the chat's plain background, no logo */
.splash { background: #f2f2f3; }
[data-theme="dark"] .splash { background: #212121; }

/* Text never smaller than 11pt (Apple), even on small phones */
.status, .chat-name, .receipt, .voice-tag, .week .bar-col span, .day-sep, .menu-version, .mini-stats small,
.toggle small, .dayrow .dn small, .row.compact .txt small, .chat-go small, .side-banner, .side-banner button,
.typing-body small, .chats-head, .sky-chip, .sky-cond small, .row .txt small, .row .side, .card-note, .perm-note,
.product small, .msg.link small, .stats-date, .preview-note, .demo { font-size: max(11px, 0.8rem); }

/* Touch targets at least 44 x 44 (Apple), with space between them (Samsung) */
.act, .chip { min-height: 44px; }
.chats-plus { width: 44px; height: 44px; }
.chat-x { min-width: 44px; height: 44px; }
.link-btn { min-height: 44px; }
.to-latest { width: 44px; height: 44px; }
/* Small buttons keep their look but get a bigger invisible hit area */
.round, .side-banner button, .row .switch, .lib-tabs button { position: relative; }
.round::after, .side-banner button::after, .row .switch::after { content: ""; position: absolute; inset: -6px; }

/* Every button shows it's being pressed */
button, .act, .chip { transition: opacity 0.1s, background-color 0.15s, transform 0.1s; }
.btn:active, .pill:active, .act:active, .round:active, .icon-btn:active, .back:active, .chat-go:active,
.link-btn:active, .choice:active, .chats-plus:active, .side-banner button:active, .to-latest:active,
.row .switch:active, .lib-tabs button:active, .dayrow:active, .product-pic:active, .attach-sheet button:active { opacity: 0.6; }
.chip:active { background: color-mix(in srgb, var(--text) 8%, transparent); }
button:disabled { cursor: default; }

/* A clear focus ring for keyboards, switches and screen readers (Samsung focus mark) */
:focus-visible { outline: 2.5px solid var(--accent, var(--blue)); outline-offset: 2px; border-radius: 10px; }
.bar input:focus-visible, .field:focus-visible { outline: none; }

/* Increase Contrast (iPhone) and high-contrast settings: darker secondary text and borders */
@media (prefers-contrast: more) {
  :root { --text-2: #1c1c1e; --line: #8e8e93; --glass-line: rgba(0, 0, 0, 0.45); }
  [data-theme="dark"] { --text-2: #f2f2f7; --line: #8e8e93; --glass-line: rgba(255, 255, 255, 0.5); }
  #chat { --chat-ico: #3a3a3c; }
  [data-theme="dark"] #chat { --chat-ico: #e5e5ea; }
  .chip, .choice-opt, .bar { border-color: var(--line) !important; }
  .msg.them { box-shadow: 0 0 0 1px var(--line); }
}
@media (forced-colors: active) {
  .msg, .chip, .act, .choice-opt, .bar, .sheet, .menu, .msg-menu { border: 1px solid CanvasText; }
}

/* Menu: where AI is used */
.menu-ai { margin: 6px 10px 0; font-size: max(11px, 0.78rem); line-height: 1.35; color: var(--text-2); }

/* Sheets: a grabber at the top; swipe down to close. Bottom-sheet easing from One UI. */
.sheet { position: relative; padding-top: 26px; animation-timing-function: cubic-bezier(0.22, 0.25, 0, 1); transition: transform 0.25s cubic-bezier(0.22, 0.25, 0, 1); }
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: color-mix(in srgb, var(--text) 22%, transparent); }
.chats-drawer { transition-timing-function: cubic-bezier(0.22, 0.25, 0, 1); }

/* Touch and hold a reply: Copy, Ask again */
@media (pointer: coarse) { .msg.them { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
.msg.them { transition: transform 0.15s; }
.msg.held { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important; }
.msg-menu { position: fixed; z-index: 40; min-width: 180px; padding: 6px; border-radius: 14px; background: var(--bg); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--line); animation: fade 0.15s ease both; }
[data-theme="dark"] .msg-menu { background: #2c2c2e; }
.msg-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font-size: 1rem; text-align: left; }
.msg-menu button:active { background: var(--surface); opacity: 1; }
.msg-menu svg { width: 20px; height: 20px; color: var(--text-2); flex: none; }

/* Small notice at the bottom, like "Copied" */
.toast { position: fixed; left: 50%; bottom: calc(var(--dock-h, 110px) + 16px); z-index: 45; max-width: min(86vw, 420px); padding: 10px 16px; border-radius: 999px; background: color-mix(in srgb, var(--text) 88%, transparent); color: var(--bg); font-size: 0.9rem; font-weight: 600; text-align: center; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.25s cubic-bezier(0.22, 0.25, 0, 1); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Bigger text sizes (up to 200%): let long labels wrap instead of cutting them off */
.chip { max-width: 80vw; overflow: hidden; text-overflow: ellipsis; }
.row .txt b { white-space: normal; }

/* Wide screens: Galaxy Z Fold open, tablets (840dp and up). Chats stay open beside the chat. */
html.docked .chats-wrap { position: fixed; top: 0; bottom: 0; left: 0; right: auto; width: 300px; z-index: 5; background: none !important; transition: none; }
html.docked .chats-drawer { width: 100%; transform: none; box-shadow: none; border-right: 1px solid var(--line); background: var(--bg); }
html.docked #chat { left: 300px; }
html.docked #chats-btn { visibility: hidden; }

/* Flex mode: a Galaxy Z Flip or Fold half folded on a table. Messages stay on the top half;
   the message box and suggestions sit on the bottom half, away from the crease. */
@media (vertical-viewport-segments: 2) {
  #chat .dock { top: env(viewport-segment-top 0 1); display: flex; flex-direction: column; justify-content: flex-end; background: var(--chat-bg); }
  #chat .thread { padding-bottom: calc(100vh - env(viewport-segment-bottom 0 0) + 12px); }
  #chat .to-latest { bottom: calc(100vh - env(viewport-segment-bottom 0 0) + 12px); }
}
html.first .screen.active { animation: none; }
/* Typing fields grow with the text size too (never under 16px, so iPhone doesn't zoom in) */
.bar input, .voice-bar input, .field, .link-row .field { font-size: max(16px, 1rem); }
.field.code { font-size: 1.4rem; }

/* =====================================================================================
   0.2.9: Ervo, designed like an iPhone app (Apple Human Interface Guidelines, iOS 26)
   - One tint color (Ervo purple) for everything you can tap. No more mixed blue.
   - iOS text styles: Large Title 34, Title 3 20, Headline/Body 17, Subhead 15, Footnote 13,
     Caption 12, never under 11. They scale with the phone's text size.
   - iOS system colors: grouped gray backgrounds with white cards (black and dark gray at night).
   - Liquid Glass only on the floating controls (header buttons, message bar, menus, sheets),
     never on the content. A soft scroll edge keeps them readable over the messages.
   - Inset grouped lists with hairline separators and chevrons; iOS switches, capsule
     buttons and segmented controls; screens push in from the right and pop back.
   The same design runs on Android; only things Android does itself (back gesture, haptics)
   are left to Android.
   ===================================================================================== */
:root {
  --tint: #6b2fd0; --tint-fill: #6b2fd0; --on-tint: #ffffff;
  --tint-soft: color-mix(in srgb, #6b2fd0 13%, transparent);
  --bg: #ffffff; --group: #f2f2f7; --card: #ffffff; --surface: #f2f2f7; --surface-2: #e5e5ea;
  --text: #000000; --text-2: #6c6c70; --text-3: #aeaeb2;
  --fill: rgba(120, 120, 128, 0.12); --fill-2: rgba(120, 120, 128, 0.2);
  --sep: rgba(60, 60, 67, 0.22); --line: #d1d1d6;
  --red: #ff3b30; --green: #34c759;
  --blue: var(--tint);
  /* Liquid Glass */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-solid: #f9f9fb;
  --glass-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.85), inset 0 1px 0.5px rgba(255, 255, 255, 0.95), 0 0 0 0.5px rgba(0, 0, 0, 0.07);
  --glass-shadow: 0 6px 22px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.06);
  --glass-blur: blur(16px) saturate(1.9) brightness(1.04);
  /* Text styles */
  --fs-large: 2rem; --fs-title2: 1.294rem; --fs-title3: 1.176rem; --fs-body: 1rem; --fs-callout: 0.941rem;
  --fs-sub: 0.882rem; --fs-foot: max(11px, 0.765rem); --fs-cap: max(11px, 0.706rem); --fs-cap2: max(11px, 0.647rem);
  /* iPhone-like springs */
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Roboto, "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, Roboto, "Segoe UI", sans-serif;
}
[data-theme="dark"] {
  --tint: #b69cff; --tint-fill: #7a4be0; --on-tint: #ffffff;
  --tint-soft: color-mix(in srgb, #9d7bff 22%, transparent);
  --bg: #000000; --group: #000000; --card: #1c1c1e; --surface: #1c1c1e; --surface-2: #2c2c2e;
  --text: #ffffff; --text-2: #aeaeb2; --text-3: #636366;
  --fill: rgba(118, 118, 128, 0.24); --fill-2: rgba(118, 118, 128, 0.32);
  --sep: rgba(84, 84, 88, 0.6); --line: #38383a;
  --red: #ff453a; --green: #30d158;
  --glass-bg: rgba(44, 44, 48, 0.58);
  --glass-solid: #2c2c2e;
  --glass-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16), inset 0 1px 0.5px rgba(255, 255, 255, 0.2), 0 0 0 0.5px rgba(0, 0, 0, 0.4);
  --glass-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}
body { font-family: var(--font); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
h1, h2, .welcome-top h1, .chats-title { font-family: var(--font-display); }

/* The glass material, for floating controls only */
.chat-header .icon-btn, .who-pill, .round.plus, .bar, .chip, .to-latest, .menu, .msg-menu,
.stats-header .back, .voice-bar, .photo-x, .sky-chip {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--glass-shadow);
  border: 0;
}

/* ---------- Chat ---------- */
#chat { --chat-bg: #f2f2f7; --me: var(--tint-fill); --me-text: #fff; --them: #ffffff; --them-text: #000; --chat-field: var(--glass-bg); --chat-ico: var(--text); --accent: var(--tint); }
[data-theme="dark"] #chat { --chat-bg: #000000; --them: #262628; --them-text: #fff; --chat-ico: var(--text); }
.splash { background: #f2f2f7; }
[data-theme="dark"] .splash { background: #000; }

/* Header: two round glass buttons, Ervo's picture, and his name in a glass capsule.
   The scroll edge softly blurs messages that slide under it. */
.chat-header { grid-template-columns: 44px 1fr 44px; gap: 8px; padding: calc(6px + env(safe-area-inset-top)) max(16px, calc((100% - var(--col)) / 2 + 4px)) 10px; background: none; }
.chat-header::before { content: ""; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--chat-bg) 35%, color-mix(in srgb, var(--chat-bg) 0%, transparent));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
#chats-btn { grid-column: 1; }
.chat-header .who { grid-column: 2; gap: 0; }
#menu-btn { grid-column: 3; }
.chat-header .icon-btn { width: 44px; height: 44px; color: var(--text); align-self: start; margin-top: 8px; }
.chat-header .icon-btn svg { width: 21px; height: 21px; }
.chat-header .avatar { width: 46px; height: 46px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); position: relative; z-index: 1; }
.who-pill { display: flex; flex-direction: column; align-items: center; margin-top: -6px; padding: 7px 14px 5px; border-radius: 999px; max-width: min(66vw, 320px); min-width: 0; }
.chat-header .who b { margin: 0; font-size: var(--fs-foot); font-weight: 600; line-height: 1.2; color: var(--text); }
.chat-header .status { margin: 0; padding: 0; background: none !important; box-shadow: none; font-size: var(--fs-cap2); font-weight: 500; line-height: 1.25; color: var(--text-2); max-width: 100%; }
.chat-header .status.busy { color: var(--tint); }
.chat-name { margin: 0; font-size: var(--fs-cap2); line-height: 1.25; color: var(--tint); }

/* Messages: iMessage-style bubbles that group, with a tail on the last one of each run */
.thread { gap: 0; padding-left: max(14px, calc((100% - var(--col)) / 2 + 14px)); padding-right: max(14px, calc((100% - var(--col)) / 2 + 14px)); }
.msg { position: relative; margin-top: 10px; padding: 7px 13px 8px; border-radius: 19px; font-size: var(--fs-body); line-height: 1.3; max-width: min(76%, 34rem); }
.msg.me, .msg.them { border-radius: 19px; }
.msg.me + .msg.me, .msg.them + .msg.them { margin-top: 2px; }
[data-theme="light"] .msg.them, :root:not([data-theme]) .msg.them { box-shadow: none; }
.msg.me:not(.photo):not(.link):not(:has(+ .msg.me))::before,
.msg.them:not(.photo):not(.link):not(:has(+ .msg.them))::before { content: ""; position: absolute; bottom: 0; width: 20px; height: 18px; z-index: -1; }
.msg.me:not(.photo):not(.link):not(:has(+ .msg.me))::after,
.msg.them:not(.photo):not(.link):not(:has(+ .msg.them))::after { content: ""; position: absolute; bottom: 0; width: 10px; height: 20px; background: var(--chat-bg); z-index: -1; }
.msg.me::before { right: -7px; background: var(--me); border-bottom-left-radius: 16px 14px; }
.msg.me::after { right: -10px; border-bottom-left-radius: 10px; }
.msg.them::before { left: -7px; background: var(--them); border-bottom-right-radius: 16px 14px; }
.msg.them::after { left: -10px; border-bottom-right-radius: 10px; }
.msg { isolation: isolate; }
html.overlay .msg::before, html.overlay .msg::after { display: none; }
.msg.photo { margin-top: 10px; }
.msg.photo img { border-radius: 18px; }
.msg.link { border-radius: 18px; }
.msg.link .link-top { background: var(--tint-fill); }
.receipt { font-size: var(--fs-cap2); color: var(--text-2); margin: 3px 6px 0; }
.day-sep { margin: 16px 0 2px; font-size: var(--fs-cap); font-weight: 600; color: var(--text-2); }
.typing { margin-top: 10px; border-radius: 22px; padding: 6px 16px 6px 6px; }
.typing img { background: #fff; }
.typing-body b { font-size: var(--fs-sub); font-weight: 600; }
.typing-body small { font-size: var(--fs-foot); }
.acts { gap: 8px; margin-top: 8px; }
.act { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--tint-soft); color: var(--tint); font-size: var(--fs-sub); font-weight: 600; position: relative; }
.act::after { content: ""; position: absolute; inset: -4px 0; }
.act.primary { background: var(--tint-fill) !important; color: var(--on-tint); }
.act.danger { background: color-mix(in srgb, var(--red) 13%, transparent) !important; color: var(--red); border: 0; }
.product { border-radius: 22px; background: var(--them); }
.product-btns .act { background: var(--tint-soft); }
.inline-link, .msg.them .inline-link { color: var(--tint); }
.choice-opt { border-radius: 16px; border: 0; background: var(--them); color: var(--text); box-shadow: inset 0 0 0 1px var(--sep); font-size: var(--fs-body); }
.choice-opt.picked { box-shadow: inset 0 0 0 2px var(--tint); color: var(--text); }
.choice-opt.picked::after, [data-theme="dark"] .choice-opt.picked::after { background-color: var(--tint-fill); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
.daycard { border-radius: 24px; background: var(--them); }
.dayrow { border-radius: 14px; background: color-mix(in srgb, var(--text) 4%, var(--them)); }
.dayrow[aria-pressed="true"] { background: var(--tint-fill); }
.dayrow[aria-pressed="true"] .tick { color: var(--tint-fill); }
.dayrow .initial { background: var(--tint-soft); color: var(--tint); }
.side-banner { background: var(--fill); color: var(--text-2); font-size: var(--fs-cap); }
.side-banner button { background: var(--tint-fill); }

/* Context menu: the reply lifts out, everything else blurs (Apple context menus) */
#chat::after { content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; background: rgba(0, 0, 0, 0.12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity 0.25s var(--ease-ios); }
#chat.ctx::after { opacity: 1; }
#chat.ctx .msg.held { z-index: 7; }
.msg.held { transform: scale(1.03); transition: transform 0.3s var(--ease-ios); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important; }
.msg.held::before, .msg.held::after { display: none; }
.msg-menu { min-width: 220px; padding: 6px 0; border-radius: 22px; transform-origin: top left; animation: pop-in 0.3s var(--ease-ios) both; }
[data-theme="dark"] .msg-menu { background: var(--glass-bg); }
.msg-menu button { justify-content: space-between; flex-direction: row-reverse; min-height: 46px; padding: 0 18px; border-radius: 0; font-size: var(--fs-body); }
.msg-menu button + button { box-shadow: inset 0 0.5px 0 var(--sep); }
.msg-menu svg { color: var(--text); width: 20px; height: 20px; }
.msg-menu button:active { background: var(--fill); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }

/* Bottom: suggestions as glass capsules, then + and the message capsule */
.dock { background: none; padding-bottom: env(safe-area-inset-bottom); }
.dock::before { content: ""; position: absolute; inset: -22px 0 0; z-index: -1; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--chat-bg) 0%, transparent), var(--chat-bg) 70%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }
.chips { gap: 8px; padding: 8px 16px 6px; scroll-padding: 16px; }
.chip { min-height: 38px; padding: 0 15px; border-radius: 999px; color: var(--text); font-size: var(--fs-sub); font-weight: 500; position: relative; }
.chip::after { content: ""; position: absolute; inset: -3px 0; }
.chip:active { background: var(--fill-2); }
.composer { gap: 10px; padding: 4px 16px 10px; align-items: flex-end; }
.round.plus { width: 44px; height: 44px; margin: 0; color: var(--text); }
.round.plus svg { width: 20px; height: 20px; }
.bar { min-height: 44px; border-radius: 22px; padding: 3px 4px 3px 16px; }
.bar input { font-size: max(16px, var(--fs-body)); }
.bar input::placeholder { color: var(--text-2); }
.round.mic { width: 36px; height: 36px; color: var(--text-2); }
.round.send, #chat #send-btn { width: 34px; height: 34px; background: var(--tint-fill); color: var(--on-tint); }
.round.send svg { width: 18px; height: 18px; }
.attach-sheet { gap: 10px; padding: 8px 16px 2px; }
.attach-sheet button { border-radius: 22px; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), var(--glass-shadow); font-size: var(--fs-sub); }
.sheet-ico { border-radius: 12px; }
.sheet-ico.link { background: var(--tint-fill); }
.link-row { padding: 8px 16px 2px; }
.link-row .field { border-radius: 22px; background: var(--card); border: 0; box-shadow: inset 0 0 0 0.5px var(--sep); }
.to-latest { width: 40px; height: 40px; color: var(--text); right: max(16px, calc((100% - var(--col)) / 2 + 16px)); }
.to-latest::after { content: ""; position: absolute; inset: -2px; }

/* The menu: a glass panel that grows out of the ••• button; groups split by a wider line */
.menu { right: max(16px, calc((100% - var(--col)) / 2 + 4px)); top: calc(100% - 4px); width: min(264px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow-y: auto; padding: 0; border-radius: 26px; transform-origin: top right; animation: pop-in 0.32s var(--ease-ios) both; }
.menu-who { margin: 0; padding: 14px 18px 8px; font-size: var(--fs-foot); color: var(--text-2); }
.menu-group + .menu-group { border-top: 8px solid var(--fill); }
.menu button { gap: 14px; padding: 0 18px; min-height: 46px; border-radius: 0; font-size: var(--fs-body); color: var(--text); }
.menu-group button + button { box-shadow: inset 0 0.5px 0 var(--sep); }
.menu button:active { background: var(--fill-2); opacity: 1; }
.menu .mi { width: 22px; height: 22px; border-radius: 0; background: none !important; color: var(--text) !important; }
.menu .mi svg { width: 21px; height: 21px; }
.menu button.danger, .menu button.danger .mi { color: var(--red) !important; }
.menu hr { display: none; }
.menu-ai { margin: 0; padding: 10px 18px 2px; border-top: 8px solid var(--fill); font-size: var(--fs-cap); color: var(--text-2); }
.menu-version { margin: 0; padding: 4px 18px 14px; font-size: var(--fs-cap); color: var(--text-2); }

/* ---------- Pushed screens: Stats, Psyche, Ideas, Chats & Media, All activity ---------- */
.stats { background: var(--group); }
.stats-header { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 0; padding: calc(6px + env(safe-area-inset-top)) max(16px, calc((100% - var(--col)) / 2 + 4px)) 6px; }
.stats-header::before { content: ""; position: absolute; inset: 0 0 -14px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.2s;
  background: linear-gradient(var(--group) 40%, color-mix(in srgb, var(--group) 0%, transparent));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.stats-header.edge::before { opacity: 1; }
.stats-header .back { grid-column: 1; width: 44px; height: 44px; padding: 0; border-radius: 50%; justify-content: center; color: var(--text); }
.stats-header .back svg { width: 22px; height: 22px; margin-left: -2px; }
.nav-title { grid-column: 2; text-align: center; font-size: var(--fs-body); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.25s var(--ease-ios); }
.stats-header.scrolled .nav-title { opacity: 1; transform: none; }
.stats-body { padding: calc(58px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); }
.screen.stats { padding-top: 0; }
.stats-body h1 { margin: 6px 4px 4px; font-size: var(--fs-large); font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; }
.stats-weather { margin: 0 4px 6px; font-size: var(--fs-sub); color: var(--text-2); }
.stats-body h2 { margin: 26px 4px 8px; font-size: var(--fs-title3); font-weight: 700; letter-spacing: 0; }
.stats-body h2.day { font-size: var(--fs-foot); font-weight: 600; text-transform: none; letter-spacing: 0; }
.stats-date { font-size: var(--fs-foot); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.card { border-radius: 24px; padding: 14px 16px; background: var(--card); }
.list { padding: 0; overflow: hidden; }
.card-note, .foot-note { font-size: var(--fs-foot); }
.foot-note { margin: 8px 18px 0; }

/* Inset grouped rows: 44pt+ tall, hairline separators that start where the text starts */
.row { min-height: 52px; padding: 9px 16px; gap: 14px; }
.row + .row { border-top: 0; background-image: linear-gradient(var(--sep), var(--sep)); background-repeat: no-repeat; background-size: calc(100% - 62px) 0.5px; background-position: right top; }
.row.compact + .row.compact, .row.compact + .row { background-size: calc(100% - 58px) 0.5px; }
.row .txt b { font-size: var(--fs-body); font-weight: 400; }
.row .txt small { font-size: var(--fs-foot); color: var(--text-2); margin-top: 1px; }
.row .side { font-size: var(--fs-sub); color: var(--text-2); }
.row.tap:active, .row.idea:active, .see-all:active, a.row:active { background-color: var(--fill-2); opacity: 1; }
.see-all .txt b { color: var(--tint); }
.chev { flex: none; display: flex; color: var(--text-3); margin-right: -4px; }
.chev svg { width: 15px; height: 15px; }
.app-ico { width: 32px; height: 32px; border-radius: 8px; }
.app-ico svg { width: 19px; height: 19px; }
.row.compact .app-ico { width: 30px; height: 30px; border-radius: 7px; }
.app-ico.done, .app-ico.brain, .app-ico.chat { background: var(--tint-fill); }
.app-ico.plane { background: #0a84ff; }
.empty { padding: 14px 16px; font-size: var(--fs-sub); }
.row .switch { min-height: 30px; padding: 0 14px; border-radius: 999px; background: var(--tint-soft); color: var(--tint); font-size: var(--fs-sub); font-weight: 600; }
.row .switch.on { background: var(--fill); color: var(--text); border: 0; }
.link-btn { color: var(--tint); font-size: var(--fs-sub); }
.row.style-row .txt b { color: var(--text); font-weight: 400; }
.row.style-row .side { color: var(--text-2); font-size: var(--fs-sub); }
.psyche-tell { border-radius: 24px; }
.psyche-tell b { font-size: var(--fs-body); font-weight: 600; }
.psyche-tell small { font-size: var(--fs-sub); }
.mini-stats div { border-radius: 14px; background: var(--fill); }
.filters select { border-radius: 12px; border: 0; background: var(--card); min-height: 44px; font-size: var(--fs-body); }
.filters label { font-size: var(--fs-foot); }
.lib-grid { border-radius: 20px; gap: 2px; }

/* Ervo Stats keeps its sky (like the Weather app), with white glass on top */
#stats .stats-header { position: absolute; }
#stats .stats-header .back { color: #fff; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.35); }
#stats .nav-title { color: #fff; }
#stats .stats-header::before { background: linear-gradient(var(--sky-1) 40%, transparent); }
#stats .card { border-radius: 24px; }
#stats .row + .row { background-image: linear-gradient(var(--sep), var(--sep)); }
.sky-chip { background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3); }

/* Segmented controls (Personal / Business, Photos / Links / Chats) */
.seg, .lib-tabs { display: grid; gap: 0; padding: 3px; border-radius: 999px; background: var(--fill); }
[data-theme="dark"] .lib-tabs { background: var(--fill); }
.seg span, .lib-tabs button { min-height: 36px; height: auto; border-radius: 999px; color: var(--text); font-size: var(--fs-sub); font-weight: 500; transition: background 0.25s var(--ease-ios), box-shadow 0.25s; }
.seg input:checked + span, .lib-tabs button[aria-selected="true"] { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
[data-theme="dark"] .seg input:checked + span, [data-theme="dark"] .lib-tabs button[aria-selected="true"] { background: #636366; }
.seg input:focus-visible + span { outline: 2.5px solid var(--tint); outline-offset: 1px; }

/* Buttons: capsules. Filled tint for the main action, gray for the rest. */
.btn { min-height: 50px; border-radius: 999px; font-size: var(--fs-body); font-weight: 600; }
.btn.primary { background: var(--tint-fill); color: var(--on-tint); }
.btn.link { color: var(--tint); text-decoration: none; font-weight: 400; }
.pill { min-height: 50px; border-radius: 999px; background: var(--tint-fill); color: var(--on-tint); font-size: var(--fs-body); font-weight: 600; }
.pill.ghost { background: var(--fill); color: var(--text); }
.pill.danger { background: var(--red); color: #fff; }
.pill:disabled { background: var(--fill); color: var(--text-3); }
.card .pill { min-height: 46px; }
.ideas-refresh { color: var(--tint) !important; }

/* Text fields: white on the gray background, rounded like iOS */
.field { height: 52px; border-radius: 14px; background: var(--card); color: var(--text); box-shadow: inset 0 0 0 0.5px var(--sep); padding: 0 16px; }
.field::placeholder { color: var(--text-3); }
.field:focus { box-shadow: inset 0 0 0 2px var(--tint); }
.field.soft { background: var(--card); border: 0; }
.error { color: var(--red); font-size: var(--fs-foot); }
[data-theme="dark"] .error { color: var(--red); }

/* Welcome: an iOS onboarding screen */
/* The sign-in screen scrolls, so nothing falls off at large text sizes */
#welcome { background: var(--group); overflow-y: auto; }
.welcome-top h1 { font-size: var(--fs-large); font-weight: 700; letter-spacing: 0.01em; }
.welcome-top .muted { font-size: var(--fs-body); color: var(--text-2); }
.hint { font-size: var(--fs-foot); margin: 8px 6px 12px; }
.demo { font-size: var(--fs-foot); }

/* Switches (iOS 26 shape: a wide track and a capsule knob) */
.toggles { border-radius: 24px; background: var(--card); }
.toggle { min-height: 52px; padding: 0 16px; }
.toggle + .toggle { border-top: 0; box-shadow: inset 0 0.5px 0 var(--sep); }
.toggle span { font-weight: 400; font-size: var(--fs-body); }
.toggle small { font-size: var(--fs-foot); }
.toggle i { width: 62px; height: 28px; background: var(--fill-2); }
[data-theme="dark"] .toggle i { background: var(--fill-2); }
.toggle i::after { top: 2px; left: 2px; width: 38px; height: 24px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.04); transition: transform 0.3s var(--ease-ios); }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle:active i::after { width: 44px; }
.toggle:active input:checked + i::after { transform: translateX(14px); }
.toggle.mini i { width: 54px; height: 26px; }
.toggle.mini i::after { width: 32px; height: 22px; }
.toggle.mini input:checked + i::after { transform: translateX(18px); }
.toggle input:focus-visible + i { box-shadow: 0 0 0 3px var(--tint-soft), 0 0 0 1.5px var(--tint); }

/* Sheets float above the bottom edge with big round corners (iOS 26), glass-like */
.sheet-wrap { background: rgba(0, 0, 0, 0.3); padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
.sheet { max-width: 500px; border-radius: 34px; padding: 26px 20px 20px; background: var(--glass-solid); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); animation: sheet-up 0.42s var(--ease-ios) backwards; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sheet { background: color-mix(in srgb, var(--glass-solid) 90%, transparent); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); }
}
@keyframes sheet-up { from { transform: translateY(105%); } to { transform: none; } }
.sheet::before { top: 7px; width: 36px; height: 5px; margin-left: -18px; background: var(--fill-2); }
.sheet h2 { font-size: var(--fs-title3); font-weight: 700; margin: 4px 0 6px; }
.sheet > .muted { font-size: var(--fs-sub); color: var(--text-2); }
.sheet-actions { gap: 10px; margin-top: 18px; }
.perm-list li { font-size: var(--fs-body); border-top: 0; box-shadow: inset 0 0.5px 0 var(--sep); }
.perm-note { font-size: var(--fs-foot); }
.choice { border-radius: 20px; border: 0; background: var(--card); box-shadow: inset 0 0 0 0.5px var(--sep); }
.choice.current { box-shadow: inset 0 0 0 2px var(--tint); border: 0; }
.field-label { font-size: var(--fs-foot); font-weight: 600; color: var(--text-2); margin: 6px 6px 6px; }
.progress i { background: var(--tint-fill); }
/* Confirm sign-out: an iOS confirmation dialog, red button first */
.sheet-wrap.action .sheet { text-align: center; }
.sheet-wrap.action .sheet-actions { flex-direction: column; }
.sheet-wrap.action .pill { flex: none; width: 100%; }
@media (min-width: 700px) { .sheet { border-radius: 34px; } .sheet-wrap { padding-bottom: 8px; } }

/* Chats list: a sidebar with a large title and inset grouped rows */
.chats-drawer { background: var(--group); padding: calc(14px + env(safe-area-inset-top)) 16px 20px; width: min(320px, 86vw); }
.chats-title { margin: 6px 4px 14px; font-size: var(--fs-large); font-weight: 700; }
.chat-item { background: var(--card); border-radius: 0; }
#chats-list > .chat-item:first-child { border-radius: 16px; }
.chats-head + .chat-item { border-top-left-radius: 16px; border-top-right-radius: 16px; }
.chats-head ~ .chat-item:last-child { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }
.chat-item + .chat-item { box-shadow: inset 0 0.5px 0 var(--sep); }
.chat-item.current { background: var(--card); }
.chat-item.current .chat-go b { color: var(--tint); font-weight: 600; }
.chat-go { min-height: 52px; padding: 9px 16px; }
.chat-go b { font-size: var(--fs-body); font-weight: 400; }
.chat-go small { font-size: var(--fs-foot); }
.chats-head { margin: 24px 4px 8px; font-size: var(--fs-title3); font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; }
.chats-plus { color: var(--tint); border-radius: 50%; }
.chat-x { color: var(--text-3); }
.chat-x.sure { background: var(--red); border-radius: 999px; }
.chats-empty { margin: 4px 6px; font-size: var(--fs-foot); }
html.docked .chats-drawer { border-right: 0.5px solid var(--sep); background: var(--group); }

/* Talking to Ervo */
.voice-bar { background: var(--glass-bg); }
.voice-mic { background: var(--tint-fill); }
.voice.listening .voice-mic { background: var(--red); }
.voice-x { background: var(--fill); }

/* Full-screen photo: a Close button */
.photo-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; background: rgba(120, 120, 128, 0.36); }
.photo-x svg { width: 20px; height: 20px; }

/* Small notice */
.toast { background: var(--glass-bg); color: var(--text); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), var(--glass-shadow); font-size: var(--fs-sub); }

/* Focus ring in the tint color */
:focus-visible { outline-color: var(--tint); }

/* ---------- Moving between screens: push in from the right, pop back (iOS navigation) ---------- */
.screen.active { animation: none; }
.screen.push-in { animation: push-in 0.42s var(--ease-ios) both; z-index: 2; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1); }
.screen.pop-out { display: flex; animation: pop-out 0.38s var(--ease-ios) both; z-index: 2; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1); pointer-events: none; }
.screen.under { display: flex; animation: under-in 0.42s var(--ease-ios) both; z-index: 1; }
.screen.under:not(.active) { animation-name: under-out; pointer-events: none; }
@keyframes push-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pop-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes under-in { from { transform: translateX(-28%); filter: brightness(0.92); } to { transform: none; filter: none; } }
@keyframes under-out { from { transform: none; } to { transform: translateX(-28%); filter: brightness(0.92); } }

/* ---------- Accessibility settings ---------- */
/* Reduce Transparency: solid bars instead of glass */
@media (prefers-reduced-transparency: reduce) {
  .chat-header .icon-btn, .who-pill, .round.plus, .bar, .chip, .to-latest, .menu, .msg-menu, .stats-header .back, .voice-bar, .toast, .attach-sheet button, .sheet {
    background: var(--glass-solid) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  #chat::after { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(0, 0, 0, 0.4); }
}
/* Increase Contrast: solid controls with a visible edge */
@media (prefers-contrast: more) {
  :root { --text-2: #3a3a3c; --sep: rgba(60, 60, 67, 0.6); --glass-bg: #ffffff; }
  [data-theme="dark"] { --text-2: #e5e5ea; --sep: rgba(235, 235, 245, 0.45); --glass-bg: #1c1c1e; }
  .chat-header .icon-btn, .who-pill, .round.plus, .bar, .chip, .to-latest, .menu, .msg-menu, .stats-header .back { box-shadow: 0 0 0 1px var(--text-2); }
}
/* Reduce Motion: screens swap with a quick fade instead of sliding */
@media (prefers-reduced-motion: reduce) {
  .screen.push-in, .screen.pop-out, .screen.under { animation: none !important; }
  .screen.pop-out, .screen.under:not(.active) { display: none; }
}
/* Menus hold a lot of text, so their glass is denser (Apple: larger glass is more opaque) */
.menu, .msg-menu, [data-theme="dark"] .msg-menu { background: color-mix(in srgb, var(--glass-solid) 84%, transparent); -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8); }

/* ---------- Suggestions picked from your Psyche ----------
   New ones rise in one after another with a spring; old ones fade down first.
   A small sparkle marks the ones Ervo picked for you (Apple: show where intelligence is used). */
.chip { display: inline-flex; align-items: center; gap: 6px; animation: chip-in 0.46s var(--ease-ios) both; animation-delay: calc(var(--i, 0) * 45ms); }
.chip svg { width: 14px; height: 14px; flex: none; color: var(--tint); }
.chip.mine { background: color-mix(in srgb, var(--tint) 9%, var(--glass-bg)); }
.chips.leaving .chip { animation: chip-out 0.16s ease-in both; }
@keyframes chip-in { from { opacity: 0; transform: translateY(10px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes chip-out { to { opacity: 0; transform: translateY(6px) scale(0.96); } }

/* ---------- Icons with depth: layered like iOS app icons ----------
   Each icon is a colored tile with a soft light from above, a darker base, a fine
   texture, a glossy top edge, and a white symbol that casts a small shadow. */
.app-ico { position: relative; isolation: isolate; overflow: hidden;
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.55), inset 0 -1.5px 2px rgba(0, 0, 0, 0.16), 0 2px 6px -1px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.1); }
.app-ico::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(130% 90% at 50% -10%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.16)),
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAhA0lEQVR42m2d527kOgyFKcvdU5L3f8jNFI+7df+IFx8OZoFgkym2LFHk4WFRSCkNZraaWWdmLzML+ac3s9HMqvx+YWYXM0tm9jaz2sy2/Norvx/ltTp/N+bfSzOb8jVqM9vN7MjvN2b2ye9Zvm9vZmf+XJVf3/Nr/lPke7T5Glu+z2pmc36/z/dtzGzJ4zvN7Jmftcv/+30T3qvz9575/S5ff8vj9vn4yWNb87WvZvbI14v59TJfz/Jrj5BSqsxsyF/a8o8vSpVfD/n1I/+U+cYxX2w2s9+8YDF//pO/3+XPnvnhDzO757/5bzSzW37/ne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XaaSxicSzk0ornBI5o15OxDilU8sqh8mxgmcAUhokMBNA0y8oSkxo7F3ByPNs5IuZvd0GVCwcA2NYgEcxoCPW0L4QZUqYvA6qpoLRZKMntn5kW8dSOrRPUkB4gTTTB3nKUefMBa0E9bAKpoSER8H9i3jtLYxxCQPNQuxVsvI2qEs2IG/+A4zQVyOGZqGAAAAAAElFTkSuQmCC"); }
.app-ico::after { content: ""; position: absolute; left: 8%; right: 8%; top: 4%; height: 42%; z-index: -1; pointer-events: none; border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0)); }
.app-ico svg { position: relative; filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, 0.3)); stroke-width: 2.2; }
[data-theme="dark"] .app-ico { box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.4), inset 0 -1.5px 2px rgba(0, 0, 0, 0.3), 0 2px 8px -1px rgba(0, 0, 0, 0.6); }
/* Ideas get bigger tiles, like a home screen */
.row.idea { gap: 14px; }
.row.idea .app-ico { width: 44px; height: 44px; border-radius: 11px; }
.row.idea .app-ico svg { width: 24px; height: 24px; }
.row.idea + .row.idea { background-size: calc(100% - 74px) 0.5px; }
.app-ico.big { border-radius: 16px; }
@media (prefers-contrast: more) { .app-ico::before, .app-ico::after { display: none; } }

/* ===== 0.2.9 (more): stronger scroll edges, list cards, store picker ===== */
/* Apple's scroll edge: content fades out well before it reaches the controls, so nothing
   reads through Ervo's name, the buttons or the suggestions. */
.chat-header::before { inset: 0 0 -26px;
  background: linear-gradient(var(--chat-bg) 62%, color-mix(in srgb, var(--chat-bg) 0%, transparent));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.dock::before { inset: -30px 0 0;
  background: linear-gradient(color-mix(in srgb, var(--chat-bg) 0%, transparent), var(--chat-bg) 34%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); }
.thread { padding-top: calc(var(--head-h, 100px) + 22px); padding-bottom: calc(var(--dock-h, 110px) + 24px); }

/* List cards: a plan for a day, a grocery list, to-dos */
.listcard { width: min(94%, 380px); gap: 4px; padding: 12px 10px 10px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 6px 4px; }
.list-head h3 { margin: 0 !important; font-size: var(--fs-body); font-weight: 600; }
.list-count { flex: none; font-size: var(--fs-foot); color: var(--text-2); font-variant-numeric: tabular-nums; }
.listrow { display: flex; align-items: stretch; gap: 6px; }
.listrow .dayrow { flex: 1; min-width: 0; }
.listcard .dayrow .tick { order: -1; }
.listcard .dayrow[aria-pressed="true"] { background: color-mix(in srgb, var(--tint) 14%, var(--bg)); color: var(--text); }
.listcard .dayrow[aria-pressed="true"] .dt, .listcard .dayrow[aria-pressed="true"] .dn small { color: var(--text-2); }
.listcard .dayrow[aria-pressed="true"] .tick { background: var(--tint); border-color: var(--tint); color: #fff; }
.listrow.done .dn { text-decoration: line-through; color: var(--text-2); }
.listrow.done .dayrow[aria-pressed="true"] { background: var(--bg); }
.list-find { flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--bg); color: var(--tint); display: none; align-items: center; justify-content: center; }
.listrow.has-store .list-find { display: flex; }
.list-find svg { width: 19px; height: 19px; }
.list-find:active { background: var(--fill-2); }
.listcard .pill:disabled { opacity: 0.5; }
.store-pick { margin: 6px 2px 0; display: flex; flex-direction: column; gap: 8px; }
.store-label { margin: 4px 6px 0; font-size: var(--fs-foot); font-weight: 600; color: var(--text-2); }
.store-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.store-chip { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: var(--fs-sub); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.store-chip svg { width: 16px; height: 16px; color: var(--tint); }
.store-chip[aria-checked="true"] { background: var(--tint); color: #fff; }
.store-chip[aria-checked="true"]::before { content: "✓"; font-weight: 700; }
.store-chip.more[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--tint); }
.store-other { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.store-other[hidden] { display: none; }
.store-other .near { grid-column: 1 / -1; }
.store-other .pill { margin: 0; width: auto; min-height: 40px; }
.field-clear { position: relative; }
.field-clear input { width: 100%; min-height: 40px; padding: 0 36px 0 12px; border: 0; border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: var(--fs-body); }
.clear-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--text-2); color: var(--bg); font-size: 16px; line-height: 1; opacity: 0.6; }
.clear-x[hidden] { display: none; }

/* Update ready: a small dot on ••• instead of a pop-up at launch (Apple: no alerts at startup) */
#menu-btn { position: relative; }
#menu-btn.has-update::after { content: ""; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 2px var(--chat-bg); }
#check-update.ready { color: var(--tint); font-weight: 600; }
.listcard .dayrow .tick { border-color: color-mix(in srgb, var(--text-2) 60%, transparent); }

/* 0.3.4: Ervo's answer appears word by word, with a soft cursor while it's still writing */
.msg.them.streaming::after { content: "▍"; margin-left: 2px; opacity: .45; animation: ervo-caret 1s steps(2, start) infinite; }
@keyframes ervo-caret { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .msg.them.streaming::after { animation: none; } }

/* ===== 0.3.5: Ervo's look, weather before you leave, intro, feedback and "learned" notes ===== */
#avatar-btn { cursor: pointer; border-radius: 50%; }
#avatar-btn:focus-visible { outline: 3px solid var(--tint); outline-offset: 3px; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin: 6px 0 4px; max-height: 52vh; overflow-y: auto; padding: 4px; }
.look-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 18px; border: 2px solid transparent; background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.8rem; font-weight: 600; min-height: 44px; cursor: pointer; }
.look-grid button img { width: 64px; height: 64px; object-fit: contain; }
.look-grid button[aria-checked="true"] { border-color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, var(--bg)); }
.day-picks { display: flex; gap: 6px; justify-content: space-between; margin: 0 0 8px; }
.day-picks button { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.day-picks button[aria-pressed="true"] { background: var(--tint-fill); border-color: var(--tint-fill); color: var(--on-tint); }
.text-btn { display: block; margin: 2px auto 8px; padding: 10px 14px; min-height: 44px; border: 0; background: none; color: var(--tint); font: inherit; font-weight: 600; cursor: pointer; }
.intro-sheet { text-align: left; }
.intro-owl { display: block; width: 72px; height: 72px; object-fit: contain; margin: 0 auto 4px; }
.intro-sheet h2 { text-align: center; }
.intro-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 14px; }
.intro-list li { display: flex; gap: 12px; align-items: flex-start; }
.intro-ico { font-size: 1.4rem; line-height: 1.2; flex: none; width: 32px; text-align: center; }
.intro-list b { display: block; }
.intro-list small { display: block; color: var(--text-2); font-size: 0.85rem; line-height: 1.4; margin-top: 2px; }
.learn-card { padding: 4px 0; }
/* Under Ervo's newest answer: was it helpful? (Microsoft AI guideline 15) */
.fb { display: flex; gap: 4px; align-items: center; margin: -2px 0 6px 6px; color: var(--text-2); font-size: 0.8rem; }
.fb button { width: 36px; height: 36px; min-width: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); font-size: 1rem; cursor: pointer; display: grid; place-items: center; }
.fb button:hover, .fb button:focus-visible { background: var(--surface-2); }
.fb .fb-why { display: flex; flex-wrap: wrap; gap: 6px; }
.fb .fb-why button { width: auto; height: auto; min-height: 36px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 0.8rem; font-weight: 600; }
/* "Added to your Psyche" (Microsoft AI guideline 16: show what your words change) */
.learned { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px 6px; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--tint) 10%, transparent); color: var(--text-2); font-size: 0.82rem; max-width: 86%; }
.learned b { color: var(--text); font-weight: 600; }
.learned button { border: 0; background: none; color: var(--tint); font: inherit; font-weight: 700; padding: 6px 4px; min-height: 32px; cursor: pointer; }

/* ===== 0.3.6: bottom tabs, a Settings page, a deeper black, 3D emoji, typing dots ===== */
/* A modern black: not flat #000 but a deep slate, a soft violet glow on one side, a cool blue on the other,
   and a whisper of grain so big dark areas don't look empty. Soothing at night, still true black for OLED edges. */
[data-theme="dark"] {
  --bg: #0b0b10; --group: #0b0b10; --card: #17171e; --surface: #17171e; --surface-2: #23232c;
  --line: #2c2c35; --sep: rgba(99, 99, 120, 0.42); --pill: #23232c;
  --glass-bg: rgba(38, 38, 48, 0.62); --glass-solid: #23232c;
  --bg-art:
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAhA0lEQVR42m2d527kOgyFKcvdU5L3f8jNFI+7df+IFx8OZoFgkym2LFHk4WFRSCkNZraaWWdmLzML+ac3s9HMqvx+YWYXM0tm9jaz2sy2/Norvx/ltTp/N+bfSzOb8jVqM9vN7MjvN2b2ye9Zvm9vZmf+XJVf3/Nr/lPke7T5Glu+z2pmc36/z/dtzGzJ4zvN7Jmftcv/+30T3qvz9575/S5ff8vj9vn4yWNb87WvZvbI14v59TJfz/Jrj5BSqsxsyF/a8o8vSpVfD/n1I/+U+cYxX2w2s9+8YDF//pO/3+XPnvnhDzO757/5bzSzW37/ne/hE9/m6535emOe2ANj7CEIVX7QOV/HxxTztS1PUMLEc8H8Pke+9zs/f5OvveS/+/y7C9csQrDnexQQxp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EcxoCPW0L4QZUqYvA6qpoLRZKMntn5kW8dSOrRPUkB4gTTTB3nKUefMBa0E9bAKpoSER8H9i3jtLYxxCQPNQuxVsvI2qEs2IG/+A4zQVyOGZqGAAAAAAElFTkSuQmCC"),
    radial-gradient(75% 48% at -5% 42%, rgba(122, 75, 224, 0.2), transparent 62%),
    radial-gradient(70% 45% at 105% 78%, rgba(10, 132, 255, 0.13), transparent 62%),
    #0b0b10;
}
[data-theme="dark"] #chat { --chat-bg: #0b0b10; --them: #1e1e27; }
[data-theme="dark"] .screen { background: var(--bg-art); }
[data-theme="dark"] .splash { background: #0b0b10; }

/* Bottom tabs: Chat, Ideas, Goals, Files */
:root { --tab-h: calc(58px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tab-h); padding: 4px max(8px, calc((100% - var(--col)) / 2)) env(safe-area-inset-bottom); background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-top: 0.5px solid var(--glass-line); }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--text-2); font-size: 0.68rem; font-weight: 600; letter-spacing: 0; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
.tabbar button svg { width: 25px; height: 25px; transition: transform 0.28s var(--ease-ios); }
.tabbar button[aria-current="page"] { color: var(--tint); }
.tabbar button[aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
.tabbar button:active svg { transform: scale(0.9); }
body.tabs-on .dock { bottom: var(--tab-h); padding-bottom: 0; }
body.tabs-on .thread { padding-bottom: calc(var(--dock-h, 110px) + var(--tab-h) + 24px); }
body.tabs-on .screen.stats .stats-body { padding-bottom: calc(var(--tab-h) + 28px); }
body.tabs-on #ideas .back, body.tabs-on #goalpage .back, body.tabs-on #library .back { visibility: hidden; }
/* While you type, the tabs step aside so the keyboard doesn't push everything up */
body.kbd .tabbar { display: none; }
body.kbd .dock { bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
body.kbd .thread { padding-bottom: calc(var(--dock-h, 110px) + 24px); }

/* Settings page: Ervo at the top, then compact grouped rows */
.set-hero { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; color: var(--text); margin: 4px 0 2px; padding: 12px 14px; cursor: pointer; }
.set-hero img { width: 54px; height: 54px; border-radius: 50%; background: #fff; object-fit: cover; flex: none; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); }
.set-hero .txt { flex: 1; min-width: 0; }
.set-hero b { display: block; font-size: var(--fs-body); font-weight: 600; }
.set-hero small { display: block; color: var(--text-2); font-size: var(--fs-foot); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-edit { color: var(--tint); font-weight: 600; font-size: var(--fs-sub); }
.set-hero:active { background: var(--fill); }
#settings .stats-body h2 { margin: 18px 10px 6px; font-size: var(--fs-cap2); font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }
#settings .card.list.compact { padding: 0; overflow: hidden; margin-top: 0; }
#settings .card.list.compact + .card.list.compact { margin-top: 14px; }
#settings .row.compact { min-height: 46px; padding: 6px 12px 6px 10px; gap: 11px; border-radius: 0; }
#settings .row.compact + .row.compact { border-top: 0.5px solid var(--sep); }
#settings .row.compact .app-ico { width: 30px; height: 30px; border-radius: 8px; }
#settings .row.compact .app-ico svg { width: 17px; height: 17px; }
#settings .row.compact .txt b { font-size: var(--fs-sub); font-weight: 500; }
#settings .row.compact .txt small { font-size: var(--fs-cap2); }
#settings .row.danger .txt b { color: var(--red); }
#settings .row.compact:active { background: var(--fill); }
#settings .foot-note { text-align: center; color: var(--text-3); margin: 18px 0 0; }
#settings .menu-version { margin-top: 2px; }
.menu { display: none !important; } /* the old drop-down is gone */

/* While Ervo works: its picture and name, then three dots bouncing like someone typing */
.typing .spin, .typing em { display: none !important; }
.typing .dots { display: inline-flex !important; align-items: center; gap: 4px; min-height: 1.1em; padding: 2px 1px; }
.typing .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: dots 1.25s ease-in-out infinite; }
.typing .dots i:nth-child(2) { animation-delay: 0.18s; }
.typing .dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes dots { 0%, 60%, 100% { opacity: 0.4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-5px); } }

/* 3D emoji pictures */
.e3d { width: 1.3em; height: 1.3em; vertical-align: -0.3em; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); }
.status-ico .e3d { width: 15px; height: 15px; vertical-align: -3px; }
.sky-emoji .e3d { width: 50px; height: 50px; vertical-align: middle; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)); }
.intro-ico .e3d { width: 30px; height: 30px; }

/* ===== 0.3.7: bubble tails without the box, 3D row icons, feedback, Ervo Stats with a living sky ===== */
/* Bubble tails are one masked shape now. The old version cut the tail with a box the colour of the
   background, which showed as a small square once the background stopped being flat black. */
.msg.me:not(.photo):not(.link):not(:has(+ .msg.me))::after,
.msg.them:not(.photo):not(.link):not(:has(+ .msg.them))::after { display: none; }
.msg.them:not(.photo):not(.link):not(:has(+ .msg.them))::before { left: -6px; width: 20px; height: 18px; border-radius: 0; background: var(--them);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M20 0H6.5C6.5 9 4.5 14 0 18C8 18 14 18 20 17Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M20 0H6.5C6.5 9 4.5 14 0 18C8 18 14 18 20 17Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%; }
.msg.me:not(.photo):not(.link):not(:has(+ .msg.me))::before { right: -6px; width: 20px; height: 18px; border-radius: 0; background: var(--me);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M0 0H13.5C13.5 9 15.5 14 20 18C12 18 6 18 0 17Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M0 0H13.5C13.5 9 15.5 14 20 18C12 18 6 18 0 17Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%; }

/* Row icons: a 3D picture on a clear background. The coloured square only shows if the picture can't load. */
.app-ico.e3dico { background: transparent !important; box-shadow: none !important; }
.app-ico.e3dico::before, .app-ico.e3dico::after { display: none !important; }
.app-ico.e3dico img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3)); }
.row.compact .app-ico.e3dico img { width: 28px; height: 28px; }
#settings .row.compact .app-ico { background: var(--ico-bg, var(--brand)); }
#settings .row.compact .app-ico.e3dico img { width: 26px; height: 26px; }

/* Feedback: a back arrow and "Tell Ervo…" beside the reasons */
.fb .fb-why .fb-back { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: transparent; color: var(--text-2); font-size: 1.3rem; font-weight: 600; line-height: 1; }
.fb .fb-why .fb-tell { background: var(--tint-soft); color: var(--tint); }

/* Ervo Stats: usage ring, milestone badges, busy meter */
.dot.usage { color: var(--tint); }
.usage-ring .ring-bg { stroke: color-mix(in srgb, var(--tint) 22%, transparent); }
.usage-ring .ring-fg { stroke: var(--tint); }
.badges { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; margin: 0 -4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.badges::-webkit-scrollbar { display: none; }
.badge { flex: none; width: 108px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px 10px; border-radius: 18px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); position: relative; overflow: hidden; }
.badge .badge-ico { display: block; width: 44px; height: 44px; font-size: 1.9rem; line-height: 44px; }
.badge .badge-ico .e3d { width: 44px; height: 44px; vertical-align: top; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3)); }
.badge b { font-size: var(--fs-cap2); font-weight: 600; line-height: 1.2; }
.badge small { font-size: var(--fs-cap2); color: var(--text-2); }
.badge:not(.got) .badge-ico { filter: grayscale(1); opacity: 0.45; }
.badge:not(.got)::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--tint) calc(var(--p, 0) * 100%), color-mix(in srgb, var(--text) 12%, transparent) 0); }
.badge.got { background: color-mix(in srgb, var(--tint) 16%, transparent); box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--tint) 40%, transparent); }
.busy-title { margin: 0 2px 2px; font-size: var(--fs-sub); font-weight: 600; }
.busy-card { padding-bottom: 12px; margin-bottom: 10px; }
.busy .bar-col i { background: color-mix(in srgb, var(--tint) 35%, transparent); }
.busy .bar-col.today i { background: var(--tint); }
.busy .bar-col.full i { background: color-mix(in srgb, var(--red) 70%, var(--tint)); }
.busy .bar-col span { white-space: nowrap; }

/* The living sky behind Ervo Stats: sun or moon, drifting clouds, rain, snow, falling leaves and the ground.
   Follows the time of day, the weather and the season. Apple HIG: it stays behind the content, text keeps its
   contrast, and every animation stops when the phone asks for reduced motion. */
.sky-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
#stats .stats-header, #stats .stats-body { z-index: 1; }
.sky-scene > div { position: absolute; opacity: 0; transition: opacity 0.8s; }
.sky-scene .sun { top: 9%; right: 10%; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff8dc, #ffd45e 55%, #ffb627 100%);
  box-shadow: 0 0 40px 14px rgba(255, 214, 102, 0.55), 0 0 120px 50px rgba(255, 196, 70, 0.25); animation: sun-breathe 6s ease-in-out infinite; }
#stats[data-sky="day"]:not([data-weather="wet"]):not([data-weather="snow"]) .sun { opacity: 1; }
#stats[data-sky="day"][data-weather="cloudy"] .sun { opacity: 0.5; }
#stats[data-sky="dawn"] .sun, #stats[data-sky="dusk"] .sun { opacity: 1; top: 30%; background: radial-gradient(circle at 40% 40%, #ffe1b3, #ff9a4d 60%, #ff6a3d); box-shadow: 0 0 50px 16px rgba(255, 150, 80, 0.5), 0 0 140px 60px rgba(255, 120, 70, 0.25); }
.sky-scene .moon { top: 10%; right: 14%; width: 70px; height: 70px; border-radius: 50%; background: #f4f1e6; box-shadow: inset -16px 8px 0 4px #c9c4b3, 0 0 30px 8px rgba(255, 255, 255, 0.25); }
#stats[data-sky="night"] .moon { opacity: 0.95; }
/* Clouds: a soft body with two bumps */
.sky-scene .cloud { height: 34px; width: 110px; border-radius: 40px; background: rgba(255, 255, 255, 0.92); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12)); }
.sky-scene .cloud::before, .sky-scene .cloud::after { content: ""; position: absolute; bottom: 8px; border-radius: 50%; background: inherit; }
.sky-scene .cloud::before { left: 18px; width: 48px; height: 48px; }
.sky-scene .cloud::after { left: 52px; width: 36px; height: 36px; }
.sky-scene .c1 { top: 15%; left: -130px; animation: drift 70s linear infinite; }
.sky-scene .c2 { top: 26%; left: -130px; transform: scale(0.75); animation: drift 95s linear 20s infinite; }
.sky-scene .c3 { top: 8%; left: -130px; transform: scale(1.2); animation: drift 120s linear 45s infinite; }
#stats[data-weather="cloudy"] .cloud, #stats[data-weather="wet"] .cloud, #stats[data-weather="snow"] .cloud { opacity: 1; }
#stats[data-sky="day"][data-weather=""] .c1, #stats[data-sky="day"]:not([data-weather]) .c1, #stats[data-sky="dawn"] .c1, #stats[data-sky="dusk"] .c1 { opacity: 0.9; }
#stats[data-weather="cloudy"] .cloud { background: rgba(214, 220, 228, 0.95); }
#stats[data-weather="wet"] .cloud { background: rgba(120, 130, 145, 0.95); }
#stats[data-weather="snow"] .cloud { background: rgba(200, 206, 214, 0.95); }
#stats[data-sky="night"] .cloud { background: rgba(60, 66, 84, 0.9); }
@keyframes drift { from { transform: translateX(0) scale(var(--s, 1)); } to { transform: translateX(calc(100vw + 260px)) scale(var(--s, 1)); } }
.sky-scene .c2 { --s: 0.75; } .sky-scene .c3 { --s: 1.2; }
/* Rain: fine streaks falling behind glass, with drops that run down slowly */
.sky-scene .rain { inset: 0; background-image: repeating-linear-gradient(100deg, transparent 0 11px, rgba(255, 255, 255, 0.18) 11px 12px, transparent 12px 23px); background-size: 100% 60px; animation: rain-fall 0.6s linear infinite; }
.sky-scene .drops { inset: 0; background-image: radial-gradient(3px 5px at 20% 30%, rgba(255, 255, 255, 0.35) 60%, transparent 62%), radial-gradient(2px 4px at 65% 15%, rgba(255, 255, 255, 0.3) 60%, transparent 62%), radial-gradient(3px 6px at 85% 55%, rgba(255, 255, 255, 0.32) 60%, transparent 62%), radial-gradient(2px 4px at 40% 70%, rgba(255, 255, 255, 0.3) 60%, transparent 62%), radial-gradient(3px 5px at 10% 80%, rgba(255, 255, 255, 0.3) 60%, transparent 62%); background-size: 220px 260px; animation: drops-run 9s linear infinite; -webkit-backdrop-filter: blur(0.6px); backdrop-filter: blur(0.6px); }
#stats[data-weather="wet"] .rain, #stats[data-weather="wet"] .drops { opacity: 1; }
@keyframes rain-fall { to { background-position: -14px 60px; } }
@keyframes drops-run { to { background-position: 0 260px; } }
/* Snow: soft flakes drifting down */
.sky-scene .snow { inset: 0; background-image: radial-gradient(3px 3px at 15% 20%, #fff 60%, transparent 62%), radial-gradient(2px 2px at 45% 60%, #fff 60%, transparent 62%), radial-gradient(3px 3px at 75% 35%, #fff 60%, transparent 62%), radial-gradient(2px 2px at 90% 80%, #fff 60%, transparent 62%), radial-gradient(2.5px 2.5px at 30% 85%, #fff 60%, transparent 62%), radial-gradient(2px 2px at 60% 10%, #fff 60%, transparent 62%); background-size: 240px 240px; animation: snow-fall 12s linear infinite; }
#stats[data-weather="snow"] .snow { opacity: 0.9; }
@keyframes snow-fall { to { background-position: 40px 240px; } }
/* Fall: a few leaves tumbling down on dry days */
.sky-scene .leaves { inset: 0; background-image: radial-gradient(6px 4px at 20% 10%, #e0812f 60%, transparent 62%), radial-gradient(5px 4px at 60% 30%, #c8452a 60%, transparent 62%), radial-gradient(6px 4px at 85% 5%, #e9a23b 60%, transparent 62%), radial-gradient(5px 3px at 40% 60%, #b8542b 60%, transparent 62%); background-size: 300px 320px; animation: leaves-fall 16s ease-in-out infinite; }
#stats[data-season="fall"]:not([data-weather="wet"]):not([data-weather="snow"]) .leaves { opacity: 0.9; }
@keyframes leaves-fall { 0% { background-position: 0 0; } 50% { background-position: 40px 160px; } 100% { background-position: -10px 320px; } }
/* The ground: a soft hill whose colour follows the season */
.sky-scene .ground { left: -20%; right: -20%; bottom: -22vh; height: 34vh; border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: 0.55; background: linear-gradient(#3f9a4a, #2f7a3a); }
#stats[data-season="fall"] .ground { background: linear-gradient(#c58a3a, #8a5a26); }
#stats[data-season="winter"] .ground, #stats[data-weather="snow"] .ground { background: linear-gradient(#eef2f6, #c9d3de); opacity: 0.7; }
#stats[data-season="spring"] .ground { background: linear-gradient(#5db65f, #3b8e45); }
#stats[data-sky="night"] .ground { filter: brightness(0.45); }
#stats[data-weather="wet"] .ground { filter: brightness(0.75) saturate(0.8); }
#stats .sky-hero { position: relative; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
@keyframes sun-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .sky-scene * { animation: none !important; } .sky-scene .cloud { left: 10%; } .sky-scene .c2 { left: 55%; } .sky-scene .c3 { left: 30%; } }

/* ===== 0.3.10: the sky scene follows the real weather (rain and clouds were losing to the sun) ===== */
/* Each weather sets a few knobs; the elements only read the knobs, so nothing can win by accident. */
#stats { --k-sun: 0; --k-rays: 0; --k-moon: 0; --k-c1: 0.7; --k-c2: 0; --k-c3: 0; --k-c4: 0; --k-dark: 0; --k-fog: 0; --k-rain: 0; --k-rain2: 0; --k-drops: 0; --k-snow: 0;
  --cloud: rgba(255, 255, 255, 0.92); }
#stats[data-weather="clear"] { --k-sun: 1; --k-rays: 1; --k-c1: 0.55; }
#stats[data-weather="partly"] { --k-sun: 1; --k-rays: 0.5; --k-c1: 0.95; --k-c2: 0.9; }
#stats[data-weather="cloudy"] { --k-c1: 1; --k-c2: 1; --k-c3: 1; --k-c4: 0.9; --k-dark: 0.45; --cloud: rgba(208, 215, 224, 0.96); }
#stats[data-weather="fog"] { --k-c1: 0.6; --k-fog: 1; --k-sun: 0.25; --cloud: rgba(215, 220, 228, 0.8); }
#stats[data-weather="drizzle"] { --k-c1: 1; --k-c2: 1; --k-c3: 0.9; --k-dark: 0.5; --k-rain: 0.55; --k-drops: 0.7; --cloud: rgba(170, 180, 194, 0.96); }
#stats[data-weather="wet"] { --k-c1: 1; --k-c2: 1; --k-c3: 1; --k-c4: 1; --k-dark: 0.75; --k-rain: 1; --k-rain2: 1; --k-drops: 1; --cloud: rgba(120, 130, 146, 0.97); }
#stats[data-weather="storm"] { --k-c1: 1; --k-c2: 1; --k-c3: 1; --k-c4: 1; --k-dark: 0.9; --k-rain: 1; --k-rain2: 1; --k-drops: 1; --cloud: rgba(78, 86, 102, 0.98); }
#stats[data-weather="snow"] { --k-c1: 1; --k-c2: 1; --k-c3: 0.9; --k-dark: 0.3; --k-snow: 1; --cloud: rgba(222, 227, 234, 0.96); }
#stats[data-sky="night"] { --k-sun: 0 !important; --k-rays: 0 !important; --cloud: rgba(62, 68, 88, 0.92); }
#stats[data-sky="night"][data-weather="clear"], #stats[data-sky="night"][data-weather="partly"], #stats[data-sky="night"][data-weather=""] { --k-moon: 1; }
/* Sky colours for the new kinds */
#stats[data-sky="day"][data-weather="partly"] { --sky-1: #3b82cf; --sky-2: #6ea9e3; --sky-3: #a9cdee; }
#stats[data-sky="day"][data-weather="fog"] { --sky-1: #8c98a6; --sky-2: #a9b3bf; --sky-3: #c9d0d8; }
#stats[data-sky="day"][data-weather="drizzle"] { --sky-1: #52657c; --sky-2: #7287a0; --sky-3: #9fb0c2; }
#stats[data-sky="day"][data-weather="storm"] { --sky-1: #242c39; --sky-2: #3a4556; --sky-3: #5b6778; }
#stats[data-sky="day"][data-weather="snow"] { --sky-1: #7d8da3; --sky-2: #a2b0c2; --sky-3: #d2dbe6; }
#stats[data-sky="dawn"][data-weather="wet"], #stats[data-sky="dusk"][data-weather="wet"], #stats[data-sky="dawn"][data-weather="storm"], #stats[data-sky="dusk"][data-weather="storm"] { --sky-1: #2a2f45; --sky-2: #4d4f6a; --sky-3: #7a6a78; }
#stats[data-sky="night"][data-weather="storm"] { --sky-1: #05070d; --sky-2: #121724; --sky-3: #1f2634; }
/* The elements read the knobs */
#stats .sky-scene .sun { opacity: var(--k-sun) !important; }
#stats .sky-scene .moon { opacity: var(--k-moon) !important; }
#stats .sky-scene .c1 { opacity: var(--k-c1) !important; }
#stats .sky-scene .c2 { opacity: var(--k-c2) !important; }
#stats .sky-scene .c3 { opacity: var(--k-c3) !important; }
#stats .sky-scene .c4 { opacity: var(--k-c4) !important; }
#stats .sky-scene .rain { opacity: var(--k-rain) !important; }
#stats .sky-scene .rain2 { opacity: var(--k-rain2) !important; }
#stats .sky-scene .drops { opacity: var(--k-drops) !important; }
#stats .sky-scene .snow { opacity: var(--k-snow) !important; }
#stats .sky-scene .cloud { background: var(--cloud) !important; }
/* Clouds start spread across the sky (negative delays), instead of all queuing off-screen to the left */
.sky-scene .c1 { animation-delay: -25s !important; }
.sky-scene .c2 { animation-delay: -60s !important; }
.sky-scene .c3 { animation-delay: -95s !important; }
.sky-scene .c4 { top: 20%; left: -160px; --s: 1.5; animation: drift 150s linear -40s infinite; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22)); }
/* A heavy sky: a darker band of cloud across the top, denser the worse the weather */
.sky-scene .dark { left: 0; right: 0; top: 0; height: 46%; opacity: var(--k-dark) !important; background: linear-gradient(rgba(40, 46, 58, 0.85), rgba(60, 68, 82, 0.5) 60%, transparent); }
/* Fog: soft layers drifting slowly */
.sky-scene .fog { inset: 0; opacity: var(--k-fog) !important; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0) 0 40px, rgba(255, 255, 255, 0.16) 40px 70px, rgba(255, 255, 255, 0) 70px 120px); background-size: 100% 240px; animation: fog-roll 24s linear infinite; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@keyframes fog-roll { to { background-position: 0 240px; } }
/* Sun rays: a slow wheel of light behind the sun on clear days */
.sky-scene .rays { top: calc(9% - 90px); right: calc(10% - 90px); width: 272px; height: 272px; border-radius: 50%; opacity: var(--k-rays) !important;
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 170, 0.18) 0 7deg, transparent 7deg 22deg); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); mask-image: radial-gradient(circle, #000 20%, transparent 70%); animation: rays-turn 60s linear infinite; }
@keyframes rays-turn { to { transform: rotate(360deg); } }
/* Heavier, faster rain in front of the fine streaks, slanted by the wind */
.sky-scene .rain2 { inset: -10% 0 0; background-image: repeating-linear-gradient(104deg, transparent 0 17px, rgba(255, 255, 255, 0.28) 17px 18.5px, transparent 18.5px 35px); background-size: 100% 90px; animation: rain-fall2 0.42s linear infinite; }
@keyframes rain-fall2 { to { background-position: -22px 90px; } }
/* Lightning: a flash across the sky now and then */
.sky-scene .flash { inset: 0; background: radial-gradient(120% 60% at 60% 0%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.2) 50%, transparent 75%); opacity: 0 !important; }
#stats[data-weather="storm"] .sky-scene .flash { animation: lightning 9s linear infinite; opacity: 1 !important; }
@keyframes lightning { 0%, 88%, 100% { visibility: hidden; } 89%, 89.6% { visibility: visible; } 89.7%, 90.6% { visibility: hidden; } 90.7%, 91.4% { visibility: visible; } 91.5% { visibility: hidden; } }
/* Wet ground shines a little */
#stats[data-weather="wet"] .ground, #stats[data-weather="storm"] .ground, #stats[data-weather="drizzle"] .ground { background: linear-gradient(#2f6a3a, #1f4a2a); box-shadow: inset 0 14px 30px rgba(255, 255, 255, 0.12); }
.steps-num .label .dot.usage { color: var(--tint) !important; }

/* ===== 0.4.0: Ervo for Business teams ===== */
.id-code { margin: 10px 0 8px; padding: 14px; border-radius: 14px; background: var(--surface); text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text); user-select: all; -webkit-user-select: all; }
.row .txt b.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.05em; }
.hours-row { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin-top: 8px; }
.hours-row .field-label { margin: 0; }
.danger-text { color: var(--red) !important; }
/* An employee's chat, read by the owner */
.tc-thread { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tc-day { align-self: center; margin: 10px 0 2px; font-size: var(--fs-cap2); font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.tc-msg { max-width: 86%; padding: 8px 12px 9px; border-radius: 16px; font-size: var(--fs-sub); line-height: 1.35; }
.tc-msg small { display: block; margin-bottom: 2px; font-size: var(--fs-cap2); color: var(--text-2); }
.tc-msg.them-user { align-self: flex-end; background: color-mix(in srgb, var(--tint) 18%, var(--card)); border-bottom-right-radius: 5px; }
.tc-msg.ervo { align-self: flex-start; background: var(--card); border-bottom-left-radius: 5px; }
.tc-msg span { white-space: pre-wrap; word-break: break-word; }
#teamchat-remove { display: block; margin: 8px auto 0; }
/* 0.4.2: the Add Employee ID button is a normal filled pill; role tags */
#team-add { display: block; width: 100%; margin-top: 10px; color: var(--on-tint) !important; }

/* ===== 0.4.3: switching curtain, icon owner toggle, lighter rendering ===== */
.switching { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); color: var(--text); animation: fade 0.18s ease both; }
.switching.out { animation: curtain-out 0.3s ease both; }
.switching img { width: 96px; height: 96px; object-fit: contain; animation: curtain-pop 0.42s var(--ease-ios) both; }
.switching b { font-family: var(--font-display); font-size: var(--fs-title2, 1.3rem); font-weight: 700; letter-spacing: 0.01em; animation: curtain-text 0.42s var(--ease-ios) both; }
@keyframes curtain-pop { from { opacity: 0; transform: scale(0.8) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes curtain-text { from { opacity: 0; transform: translateY(10px); letter-spacing: 0.12em; } to { opacity: 1; transform: none; letter-spacing: 0.01em; } }
@keyframes curtain-out { to { opacity: 0; } }
.look-icon-row { margin-top: 14px; }
.newid-role { margin: 10px 0 2px; }
/* Smoother: no expensive effects where they don't earn their keep */
.app-ico.e3dico img { filter: none; }
.e3d { filter: none; }
.tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 92%, transparent); }
.screen:not(.active) .sky-scene * { animation-play-state: paused !important; }
.screen.push-in, .screen.pop-out { box-shadow: none; }
.row { content-visibility: auto; contain-intrinsic-size: 56px; }
.look-grid img { content-visibility: auto; }

/* ===== 0.5.0: glass, order and return cards, the day card and the calendar pop-up ===== */
/* Glass: a frosted surface with a hairline highlight, tuned for both themes */
:root { --glass-card: rgba(255, 255, 255, 0.72); --glass-hi: rgba(255, 255, 255, 0.85); --glass-line2: rgba(60, 60, 90, 0.12); }
[data-theme="dark"] { --glass-card: rgba(34, 34, 46, 0.62); --glass-hi: rgba(255, 255, 255, 0.14); --glass-line2: rgba(255, 255, 255, 0.09); }
.glass { background: var(--glass-card); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: inset 0 0 0 0.5px var(--glass-line2), inset 0 1px 0 var(--glass-hi), 0 10px 30px rgba(0, 0, 0, 0.12); }
[data-theme="dark"] .glass { box-shadow: inset 0 0 0 0.5px var(--glass-line2), inset 0 1px 0 var(--glass-hi), 0 14px 36px rgba(0, 0, 0, 0.45); }
/* Cards on the settings and stats pages: frosted look without a live blur (a dozen blurs made the slide-in stutter) */
.screen.stats .card { background: var(--glass-card); box-shadow: inset 0 0 0 0.5px var(--glass-line2), inset 0 1px 0 var(--glass-hi); }
.sheet { background: var(--glass-card); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: inset 0 0 0 0.5px var(--glass-line2), inset 0 1px 0 var(--glass-hi); }
.msg.them { box-shadow: inset 0 0 0 0.5px var(--glass-line2), inset 0 1px 0 var(--glass-hi); }
[data-theme="dark"] .msg.them { background: rgba(36, 36, 48, 0.78); }
.stats-body h1, .welcome-top h1 { background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 72%, var(--tint))); -webkit-background-clip: text; background-clip: text; color: transparent; }
#stats .stats-body h1 { background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.78)); -webkit-background-clip: text; background-clip: text; }

/* Order, return and refund cards */
.tracker { align-self: flex-start; width: min(94%, 400px); margin: 8px 0 4px; padding: 14px 14px 12px; border-radius: 22px; color: var(--text); animation: rise 0.3s var(--ease-ios) both; }
.tk-head { display: flex; align-items: center; gap: 10px; }
.tk-badge { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 12%, transparent); flex: none; }
.tk-badge .e3d { width: 28px; height: 28px; vertical-align: top; }
.tk-badge.letter { background: var(--c); color: #fff; font-weight: 800; font-size: 1.1rem; }
.tk-text { flex: 1; min-width: 0; }
.tk-text b { display: block; font-size: var(--fs-body); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-text small { display: block; color: var(--text-2); font-size: var(--fs-cap2); }
.tk-chip { flex: none; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 16%, transparent); color: var(--tint); font-size: var(--fs-cap2); font-weight: 700; white-space: nowrap; }
.tk-chip.ok { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.tk-bar { position: relative; height: 6px; margin: 16px 8px 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 10%, transparent); }
.tk-fill { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 3px; background: linear-gradient(90deg, var(--tint-fill), var(--tint)); transition: width 0.9s var(--ease-ios); overflow: hidden; }
.tracker:not(.done) .tk-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: translateX(-100%); animation: tk-shimmer 1.8s ease-in-out infinite; }
.tracker.done .tk-fill { background: var(--green); }
.tk-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 14%, transparent); }
.tk-dot.on { background: var(--tint); box-shadow: 0 0 0 2px var(--tint); }
.tracker.done .tk-dot.on { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.tk-dot.now::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--tint); opacity: 0.6; animation: tk-pulse 1.6s ease-out infinite; }
.tk-steps { display: flex; justify-content: space-between; margin: 0 2px 10px; font-size: 0.68rem; color: var(--text-2); }
.tk-steps span { flex: 1; text-align: center; } .tk-steps span:first-child { text-align: left; } .tk-steps span:last-child { text-align: right; }
.tk-steps .now { color: var(--text); font-weight: 700; }
.tk-rows { display: grid; gap: 4px; }
.tk-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); font-size: var(--fs-sub); }
.tk-row.tap { cursor: pointer; }
.tk-remoji .e3d { width: 22px; height: 22px; vertical-align: top; }
.tk-rlabel { color: var(--text-2); flex: none; }
.tk-rvalue { flex: 1; min-width: 0; text-align: right; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tk-acts .pill { min-height: 36px; padding: 0 12px; font-size: var(--fs-cap2); }
@keyframes tk-shimmer { to { transform: translateX(100%); } }
@keyframes tk-pulse { from { transform: scale(0.6); opacity: 0.8; } to { transform: scale(1.5); opacity: 0; } }
.lib-trackers { display: grid; gap: 10px; }
.lib-trackers .tracker { width: 100%; margin: 0; animation: none; }
.lib-tabs { grid-template-columns: repeat(4, 1fr); }

/* The day card in chat */
.calcard { align-self: flex-start; width: min(94%, 400px); margin: 8px 0 4px; padding: 14px; border-radius: 22px; color: var(--text); animation: rise 0.3s var(--ease-ios) both; }
.cc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cc-ico .e3d { width: 26px; height: 26px; vertical-align: top; }
.cc-head b { font-size: var(--fs-body); font-weight: 700; }
.cc-head small { color: var(--text-2); }
.cc-weather { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 12%, transparent); font-size: var(--fs-cap2); }
.cc-weather .e3d { width: 18px; height: 18px; vertical-align: top; }
.cc-list { display: grid; gap: 4px; }
.cc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); font-size: var(--fs-sub); }
.cc-emoji .e3d { width: 24px; height: 24px; vertical-align: top; }
.cc-time { flex: none; min-width: 58px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cc-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-src { color: var(--text-3); }
.cc-empty { margin: 4px 2px; color: var(--text-2); font-size: var(--fs-sub); }
.cc-foot { display: flex; gap: 6px; margin-top: 10px; }
.cc-foot .pill { min-height: 36px; padding: 0 12px; font-size: var(--fs-cap2); }

/* Calendar pop-up */
.calsheet { max-height: 92%; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.cal-head h2 { margin: 0; text-align: center; flex: 1; }
.cal-nav { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.cal-nav svg { width: 20px; height: 20px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 10px; }
.cal-dow { text-align: center; font-size: var(--fs-cap2); font-weight: 600; color: var(--text-2); padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1; border-radius: 12px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sub); display: grid; place-items: center; cursor: pointer; }
.cal-day i { position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--tint); opacity: 0; }
.cal-day.busy i { opacity: 1; }
.cal-day.today span { color: var(--tint); font-weight: 700; }
.cal-day.picked { background: var(--tint-fill); color: var(--on-tint); }
.cal-day.picked span { color: var(--on-tint); } .cal-day.picked i { background: var(--on-tint); }
.cal-day-title { margin: 6px 2px 6px; font-weight: 700; }
.cal-events { display: grid; gap: 4px; min-height: 48px; max-height: 32vh; overflow-y: auto; }
/* Sheets stay readable over a busy chat: more body in the glass */
:root { --glass-sheet: rgba(255, 255, 255, 0.92); }
[data-theme="dark"] { --glass-sheet: rgba(30, 30, 40, 0.9); }
.sheet { background: var(--glass-sheet); }
.sheet.glass { background: var(--glass-sheet); }

/* Ervo's Look: the grid scrolls on its own, inside the sheet, and the sheet never closes on a swipe */
#look .sheet { overflow: hidden; display: flex; flex-direction: column; max-height: 88%; }
#look .look-grid { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 2px 14px; -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent); mask-image: linear-gradient(#000 calc(100% - 22px), transparent); }
#look .look-grid::-webkit-scrollbar { width: 0; }

/* Smooth slides: the moving screen gets its own layer, and no blur or heavy paint runs while it moves */
.screen.push-in, .screen.pop-out, .screen.under { will-change: transform; }
.screen.push-in *, .screen.pop-out * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.screen.stats .card, .screen.stats .row { contain: content; }
#stats .card { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--card) 86%, transparent); }
