/* CODY – Cornerstone Digital Assistant
   Visual identity: warm off-white, charcoal ink, gold/champagne accents (from the Cornerstone Systems logo). */

:root {
  --bg: #FCFBF9; --surface: #FFFFFF; --surface-2: #F6F3EC; --ink: #23282F; --ink-2: #4A5058; --muted: #7C8087;
  --line: #ECE7DD; --gold: #BB995C; --gold-ink: #8A6D36; --gold-soft: color-mix(in srgb, var(--gold) 16%, var(--surface));
  --champagne: #EFE4CF; --danger: #B4513E; --ok: #5E8A64; --dark: #23282F; --on-dark: #FCFBF9;
  --shadow: 0 1px 2px rgba(35,40,47,.04), 0 8px 24px rgba(35,40,47,.06); --shadow-lg: 0 20px 60px rgba(35,40,47,.18);
  --r: 18px; --r-sm: 12px; --side: 264px; --top: 68px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --display: 'Montserrat', var(--font);
  --t-personal: #5C7C8A; --t-work: #3F4650; --t-meeting: #BB995C; --t-study: #7A8B5C; --t-reminder: #A0665C; --t-deadline: #B4513E;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #14171B; --surface: #1D2126; --surface-2: #252A31; --ink: #F3F0EA; --ink-2: #CFCBC3; --muted: #9A9FA8;
  --line: #2E343C; --gold-ink: #D9BC85; --champagne: #3A3325; --dark: #F3F0EA; --on-dark: #14171B; --t-work: #9AA3AE;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
p { margin: 0; } a { color: var(--gold-ink); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; } [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.ico { width: 20px; height: 20px; flex: none; }
.eyebrow { font: 600 11px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-ink); }
.muted { color: var(--muted); } .small { font-size: 13px; } .spacer { flex: 1; }
.only-mobile { display: none !important; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px 16px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: auto; }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .auth-logo { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
.brand b { display: block; font: 700 19px/1 var(--display); letter-spacing: .16em; }
.brand small { display: block; margin-top: 5px; font-size: 10.5px; letter-spacing: .04em; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--dark); color: var(--on-dark); }
.nav a.active .ico { color: var(--gold); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; }
.install-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1px dashed var(--gold); border-radius: var(--r-sm);
  background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--ink); }
.user-chip:hover { text-decoration: none; border-color: var(--gold); }
.user-chip-text { min-width: 0; } .user-chip b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip small { color: var(--muted); font-size: 11px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--champagne) center/cover; color: var(--gold-ink); display: grid; place-items: center;
  font: 600 14px var(--display); flex: none; overflow: hidden; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }
.scrim { display: none; }

.main { margin-left: var(--side); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; }
#view { flex: 1; padding: 28px 32px 120px; max-width: 1280px; width: 100%; margin: 0 auto; outline: none; }
.boot { display: grid; place-items: center; gap: 16px; padding: 18vh 0; color: var(--muted); }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.icon-btn:hover { border-color: var(--gold); }
.icon-btn.bare { border: 0; background: none; width: 34px; height: 34px; color: var(--muted); } .icon-btn.bare:hover { color: var(--ink); background: var(--surface-2); }
.badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #fff; font: 600 11px/18px var(--font); text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill-offline { background: #F6E3DE; color: var(--danger); } .pill-gold { background: var(--gold-soft); color: var(--gold-ink); } .pill-sample { background: var(--champagne); color: var(--gold-ink); letter-spacing: .06em; text-transform: uppercase; font-size: 10px; }
.wake-ind { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--gold); background: var(--gold-soft); color: var(--gold-ink); font-size: 12px; font-weight: 600; }
.wake-ind i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: blink 1.4s infinite; }
.wake-ind.paused { border-color: var(--line); background: var(--surface-2); color: var(--muted); } .wake-ind.paused i { background: var(--muted); animation: none; }
@keyframes blink { 50% { opacity: .25; } }
.bottom-nav { display: none; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: 16px; }
.grid { display: grid; gap: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .12s, border-color .15s, background .15s; }
.btn:hover { border-color: var(--gold); text-decoration: none; } .btn:active { transform: scale(.98); }
.btn-dark { background: var(--dark); color: var(--on-dark); border-color: var(--dark); } .btn-dark:hover { border-color: var(--gold); }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); } .btn-gold:hover { filter: brightness(1.05); }
.btn-danger { color: var(--danger); } .btn-danger:hover { border-color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; } .btn-block { width: 100%; padding: 13px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.field { display: grid; gap: 6px; margin-bottom: 14px; } .field > span, .field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=time], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { resize: vertical; min-height: 84px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .row > .field { flex: 1 1 160px; margin-bottom: 14px; } .row:has(> .field) { align-items: flex-start; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; } .check input { width: 17px; height: 17px; accent-color: var(--gold); }
.switch { position: relative; width: 44px; height: 26px; flex: none; } .switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + i { background: var(--gold); } .switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; } .tab { padding: 8px 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.tab.active { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.search { position: relative; flex: 1 1 220px; max-width: 360px; } .search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; } .search input { padding-left: 38px; border-radius: 99px; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); } .empty img { width: 96px; height: 96px; border-radius: 30%; margin-bottom: 12px; } .empty h3 { color: var(--ink); margin-bottom: 4px; font-size: 16px; }
.list { display: grid; } .list-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); } .list-row:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; } .list-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .list-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; margin-top: 2px; }
.list-row.clickable { cursor: pointer; border-radius: var(--r-sm); } .list-row.clickable:hover { background: var(--surface-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--gold)); flex: none; display: inline-block; }
.prio { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.prio-low { color: var(--muted); } .prio-medium { color: var(--t-personal); } .prio-high { color: var(--gold-ink); } .prio-urgent { color: var(--danger); }
.status-overdue { color: var(--danger); font-weight: 600; }

#modal-root:empty { display: none; }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(20,23,27,.45); display: grid; place-items: center; padding: 20px; animation: fade .18s; }
.modal { width: min(620px, 100%); max-height: min(90dvh, 860px); overflow: auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); animation: rise .22s; }
.modal-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 14px; background: var(--surface); z-index: 1; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; } .modal-body { padding: 20px 24px; } .modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 24px 22px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
#toasts { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; justify-items: center; width: max-content; max-width: 92vw; }
.toast { background: var(--dark); color: var(--on-dark); padding: 11px 18px; border-radius: 99px; box-shadow: var(--shadow-lg); font-weight: 500; font-size: 14px; animation: rise .2s; display: flex; gap: 12px; align-items: center; }
.toast.err { background: var(--danger); color: #fff; } .toast button { background: none; border: 0; color: var(--gold); font-weight: 700; }
.panel { position: fixed; top: calc(var(--top) + 8px); right: 24px; z-index: 60; width: min(400px, calc(100vw - 24px)); max-height: calc(100dvh - var(--top) - 40px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); animation: rise .18s; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.notif { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; } .notif.unread { background: var(--gold-soft); }
.notif b { font-size: 14px; } .notif p { font-size: 13px; color: var(--ink-2); white-space: pre-line; } .notif time { font-size: 11px; color: var(--muted); } .notif .row { margin-top: 6px; gap: 6px; }

/* ---------- mascot ---------- */
.mascot { --s: 120px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; }
.mascot img { width: 100%; height: 100%; border-radius: 30%; background: #fff; object-fit: cover; position: relative; z-index: 1; animation: breathe 4.2s ease-in-out infinite; user-select: none; }
.mascot-ring { position: absolute; inset: -4px; border-radius: 33%; border: 2px solid var(--champagne); z-index: 0; transition: border-color .3s, box-shadow .3s; }
.mascot-ring::after { content: ''; position: absolute; right: -4%; top: -4%; min-width: 28%; height: 28%; padding: 0 6%; border-radius: 99px; background: var(--gold); color: #fff; display: none; place-items: center;
  font: 700 calc(var(--s) * .14)/1 var(--display); z-index: 3; box-shadow: 0 2px 8px rgba(187,153,92,.5); }
.mascot::before, .mascot::after { content: ''; position: absolute; inset: -4px; border-radius: 33%; border: 2px solid var(--gold); opacity: 0; z-index: 0; pointer-events: none; }
.mascot-sm { --s: 44px; } .mascot-fab { --s: 60px; } .mascot-lg { --s: 120px; } .mascot-xl { --s: 240px; }
@keyframes breathe { 50% { transform: scale(1.03) translateY(-1.5%); } }
.mascot[data-state="listening"] .mascot-ring { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.mascot[data-state="listening"]::before, .mascot[data-state="waking"]::before { animation: wave 1.6s ease-out infinite; }
.mascot[data-state="listening"]::after, .mascot[data-state="waking"]::after { animation: wave 1.6s ease-out .8s infinite; }
@keyframes wave { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }
.mascot[data-state="waking"] img { animation: pop .5s ease-out; }
@keyframes pop { 40% { transform: scale(1.12) rotate(-3deg); } }
.mascot[data-state="thinking"] img { animation: think 2.2s ease-in-out infinite; }
.mascot[data-state="thinking"] .mascot-ring { border-color: var(--gold); border-style: dashed; animation: spin 7s linear infinite; }
.mascot[data-state="thinking"] .mascot-ring::after { display: none; }
@keyframes think { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } } @keyframes spin { to { transform: rotate(360deg); } }
.mascot[data-state="speaking"] img { animation: speak .42s ease-in-out infinite alternate; }
.mascot[data-state="speaking"] .mascot-ring { border-color: var(--gold); animation: glow .42s ease-in-out infinite alternate; }
@keyframes speak { to { transform: translateY(-2.5%) scale(1.02); } } @keyframes glow { to { box-shadow: 0 0 0 6px var(--gold-soft); } }
.mascot[data-state="happy"] img { animation: jump .55s ease-in-out 3; }
.mascot[data-state="happy"] .mascot-ring { border-color: var(--gold); } .mascot[data-state="happy"] .mascot-ring::after { content: '✓'; display: grid; animation: pop .5s; }
@keyframes jump { 40% { transform: translateY(-12%) rotate(4deg); } 70% { transform: translateY(0) rotate(-2deg); } }
.mascot[data-state="reminder"] .mascot-ring { border-color: var(--gold); } .mascot[data-state="reminder"] .mascot-ring::after { content: '!'; display: grid; animation: ringbell 1s ease-in-out infinite; }
.mascot[data-state="reminder"] img { animation: think 1.6s ease-in-out infinite; }
@keyframes ringbell { 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(0); } }

.fab { position: fixed; right: 26px; bottom: 26px; z-index: 50; border: 0; background: none; padding: 0; border-radius: 30%; touch-action: manipulation; -webkit-touch-callout: none; user-select: none;
  filter: drop-shadow(0 8px 18px rgba(187,153,92,.45)); transition: transform .15s; }
.fab:hover { transform: translateY(-3px) scale(1.04); } .fab .mascot-ring { border-color: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.fab.pressing { transform: scale(.94); }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 20px; touch-action: manipulation; }
.dash-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
.welcome { display: flex; align-items: center; gap: 24px; background: linear-gradient(120deg, var(--surface) 55%, var(--gold-soft)); position: relative; overflow: hidden; }
.welcome::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border: 1px solid var(--champagne); transform: rotate(45deg); pointer-events: none; }
.welcome h2 { font-size: 26px; margin: 8px 0 6px; } .welcome .line { color: var(--ink-2); max-width: 52ch; min-height: 1.5em; }
.welcome .hint { margin-top: 12px; font-size: 12px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; } .tile b { display: block; font: 600 28px/1 var(--display); } .tile span { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.tile.warn b { color: var(--danger); } .tile.gold b { color: var(--gold-ink); }
.progress { display: flex; align-items: center; gap: 22px; } .ring { --p: 0; width: 112px; height: 112px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--surface-2) 0); transition: --p .6s; }
.ring::before { content: ''; grid-area: 1/1; width: 88px; height: 88px; border-radius: 50%; background: var(--surface); } .ring b { grid-area: 1/1; font: 600 24px var(--display); z-index: 1; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick button, .quick a { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--ink); text-align: center; }
.quick button:hover, .quick a:hover { border-color: var(--gold); background: var(--gold-soft); text-decoration: none; } .quick .ico { color: var(--gold-ink); width: 22px; height: 22px; }
.sched-time { width: 78px; flex: none; font: 600 13px var(--display); color: var(--ink-2); } .sched-time small { display: block; font: 500 11px var(--font); color: var(--muted); }
.mini-chat { display: flex; gap: 8px; align-items: center; margin-top: 14px; } .mini-chat input { border-radius: 99px; }
.widget-top { display: flex; align-items: center; gap: 14px; } .bubble { background: var(--surface-2); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 14px; }

/* ---------- tasks ---------- */
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; color: transparent; transition: all .15s; padding: 0; }
.tick:hover { border-color: var(--gold); } .tick.done { background: var(--gold); border-color: var(--gold); color: #fff; } .tick .ico { width: 14px; height: 14px; stroke-width: 3; }
.done-title { text-decoration: line-through; color: var(--muted); }
.group-title { font: 600 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; display: flex; align-items: center; gap: 8px; }
.subtask { display: flex; align-items: center; gap: 10px; padding: 6px 0; } .subtask span { flex: 1; }
.history { font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; max-height: 160px; overflow: auto; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; } .cal-head h2 { font-size: 20px; min-width: 200px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 8px; font: 600 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; }
.cal-cell { background: var(--surface); min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal-cell:hover { background: var(--gold-soft); } .cal-cell.out { background: var(--bg); } .cal-cell.out .cal-num { color: var(--muted); opacity: .6; }
.cal-num { font: 600 13px var(--display); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; } .cal-cell.today .cal-num { background: var(--dark); color: var(--on-dark); }
.chip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 13%, var(--surface)); border-radius: 5px; padding: 2px 6px; font-size: 11.5px;
  font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.chip.task { border-left-style: dotted; background: none; color: var(--ink-2); } .chip.done { text-decoration: line-through; opacity: .6; } .cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
[data-type="personal"] { --c: var(--t-personal); } [data-type="work"] { --c: var(--t-work); } [data-type="meeting"] { --c: var(--t-meeting); } [data-type="study"] { --c: var(--t-study); } [data-type="reminder"] { --c: var(--t-reminder); } [data-type="deadline"] { --c: var(--t-deadline); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); } .legend span { display: inline-flex; align-items: center; gap: 6px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; } .week-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; min-height: 260px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.week-col.today { border-color: var(--gold); } .week-col h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .week-col h4 b { display: block; font-size: 20px; color: var(--ink); letter-spacing: 0; }
.week-col .chip { white-space: normal; padding: 5px 7px; } .chip small { display: block; color: var(--muted); font-size: 10.5px; }
.day-hours { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.hour { display: flex; gap: 12px; padding: 6px 14px; min-height: 46px; border-bottom: 1px solid var(--line); cursor: pointer; } .hour:last-child { border: 0; } .hour:hover { background: var(--gold-soft); }
.hour time { width: 62px; font-size: 12px; color: var(--muted); padding-top: 3px; flex: none; } .hour-events { flex: 1; display: grid; gap: 4px; } .hour .chip { white-space: normal; padding: 6px 10px; font-size: 13px; }

/* ---------- chat + assistant ---------- */
.chat-page { display: grid; grid-template-rows: 1fr auto; height: calc(100dvh - var(--top) - 56px); max-width: 860px; margin: 0 auto; }
.transcript { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 4px 16px; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; animation: rise .2s; }
.msg.user { align-self: flex-end; background: var(--dark); color: var(--on-dark); border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--shadow); }
.msg.error { align-self: flex-start; background: #F6E3DE; color: var(--danger); border-radius: 14px; } .msg time { display: block; font-size: 10.5px; opacity: .55; margin-top: 4px; }
.msg-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } .confirm { margin-top: 10px; padding: 12px; border: 1px solid var(--gold); background: var(--gold-soft); border-radius: 12px; display: grid; gap: 8px; white-space: normal; }
.confirm b { font-size: 13.5px; } .confirm .row { gap: 8px; } .confirm.resolved { border-color: var(--line); background: var(--surface-2); color: var(--muted); }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: bounce 1.1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 30% { transform: translateY(-6px); opacity: .5; } }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.composer textarea { border: 0; box-shadow: none !important; min-height: 24px; max-height: 140px; padding: 9px 8px; resize: none; background: none; }
.round { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink); }
.round.gold { background: var(--gold); color: #fff; } .round.dark { background: var(--dark); color: var(--on-dark); } .round.live { background: var(--danger); color: #fff; animation: glow 0.6s infinite alternate; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; } .suggest button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; } .suggest button:hover { border-color: var(--gold); }
.chat-empty { margin: auto; text-align: center; display: grid; justify-items: center; gap: 10px; padding: 20px; } .chat-empty h2 { font-size: 22px; }

#assistant { position: fixed; z-index: 90; right: 24px; bottom: 24px; width: min(430px, calc(100vw - 24px)); height: min(680px, calc(100dvh - 48px)); background: var(--bg); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow-lg); display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; animation: rise .25s; }
.as-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; } .as-head b { font: 700 13px var(--display); letter-spacing: .18em; }
.as-stage { display: grid; justify-items: center; gap: 8px; padding: 6px 16px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, transparent, var(--gold-soft)); }
.as-stage .mascot { --s: 104px; } .as-status { font: 600 14px var(--display); color: var(--ink-2); min-height: 1.4em; text-align: center; }
.wave { display: flex; gap: 3px; align-items: center; height: 26px; } .wave i { width: 3px; height: 4px; border-radius: 2px; background: var(--gold); transition: height .08s; }
.wave.idle i { opacity: .35; } .as-interim { font-size: 13px; color: var(--muted); min-height: 1.3em; text-align: center; font-style: italic; }
#assistant .transcript { padding: 14px; } #assistant .composer { margin: 0 12px 12px; } #assistant .msg { max-width: 90%; }

/* ---------- settings / misc pages ---------- */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--top) + 20px); display: grid; gap: 2px; } .settings-nav button { text-align: left; padding: 10px 14px; border: 0; background: none; border-radius: var(--r-sm); font-weight: 500; color: var(--ink-2); }
.settings-nav button.active { background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-weight: 600; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); } .set-row:last-child { border: 0; }
.set-row > div:first-child { min-width: 0; } .set-row b { display: block; font-size: 14.5px; } .set-row small { color: var(--muted); font-size: 12.5px; display: block; } .set-row select, .set-row input[type=time], .set-row input[type=text] { width: auto; min-width: 150px; max-width: 240px; }
.swatches { display: flex; gap: 8px; } .swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--c); padding: 0; } .swatch.active { box-shadow: 0 0 0 2px var(--ink); }
.note { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; color: var(--ink-2); margin: 10px 0; } .note.warn { background: #F9EEDC; color: #7A5A1E; } :root[data-theme="dark"] .note.warn { background: #3A3325; color: #E4CC99; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; align-items: end; height: 190px; padding-top: 10px; } .bar { display: grid; justify-items: center; gap: 6px; align-content: end; height: 100%; }
.bar i { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: var(--gold); min-height: 3px; } .bar i.zero { background: var(--surface-2); } .bar b { font-size: 12px; } .bar span { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mem { display: flex; gap: 14px; align-items: flex-start; padding: 16px 4px; border-bottom: 1px solid var(--line); } .mem:last-child { border: 0; } .mem p { white-space: pre-wrap; } .mem.off p { color: var(--muted); }
.star { border: 0; background: none; color: var(--line); padding: 2px; } .star.on { color: var(--gold); } .star.on .ico { fill: var(--gold); }

/* ---------- auth pages ---------- */
.auth-body { background: var(--bg); } .auth { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand { background: linear-gradient(160deg, #fff, var(--champagne)); display: grid; place-content: center; justify-items: center; gap: 12px; padding: 40px; text-align: center; position: relative; overflow: hidden; }
.auth-brand::before { content: ''; position: absolute; width: 520px; height: 520px; border: 1px solid rgba(187,153,92,.35); transform: rotate(45deg); }
.auth-logo { width: 92px; position: relative; } .auth-brand h2 { font: 700 34px var(--display); letter-spacing: .22em; margin-top: 10px; position: relative; } .auth-tag { color: var(--ink-2); position: relative; }
.auth-brand .mascot { margin: 18px 0 4px; } .auth-brand .mascot img { background: none; mix-blend-mode: multiply; } .auth-brand .mascot-ring { display: none; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; } .auth-card { width: min(400px, 100%); } .auth-card h1 { font-size: 26px; margin-bottom: 6px; } .auth-sub { color: var(--muted); margin-bottom: 24px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 18px; font-size: 14px; flex-wrap: wrap; }
.pw { position: relative; display: block; } .pw input { padding-right: 64px; } .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--gold-ink); font-weight: 600; font-size: 13px; padding: 6px 8px; }
.form-error { color: var(--danger); background: #F6E3DE; padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; } .form-ok { color: var(--ok); background: #E6F0E7; padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0 14px; } .auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#google-btn { display: grid; justify-content: center; } .auth-alt { margin-top: 22px; text-align: center; color: var(--ink-2); } .auth-foot { margin-top: 36px; text-align: center; font-size: 11px; letter-spacing: .08em; color: var(--muted); } .auth-foot span { color: var(--gold-ink); }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 24px; } .auth-mobile-brand img { border-radius: 30%; } .auth-mobile-brand span { font: 700 18px var(--display); letter-spacing: .2em; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .dash { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .only-mobile { display: grid !important; }
  .sidebar { transform: translateX(-105%); transition: transform .25s; box-shadow: var(--shadow-lg); width: min(300px, 86vw); padding-top: calc(22px + env(safe-area-inset-top)); } .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20,23,27,.4); opacity: 0; pointer-events: none; transition: opacity .25s; } .scrim.open { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; } .topbar { padding: 0 16px; padding-top: env(safe-area-inset-top); height: calc(var(--top) + env(safe-area-inset-top)); } .topbar h1 { font-size: 18px; }
  .wake-ind span { display: none; } .wake-ind { padding: 8px; }
  #view { padding: 18px 16px calc(150px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; position: fixed; inset: auto 0 0 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 10.5px; font-weight: 600; color: var(--muted); } .bottom-nav a.active { color: var(--ink); } .bottom-nav a.active .ico { color: var(--gold); } .bottom-nav a:hover { text-decoration: none; }
  .fab { right: 50%; transform: translateX(50%); bottom: calc(18px + env(safe-area-inset-bottom)); } .fab:hover { transform: translateX(50%); } .fab.pressing { transform: translateX(50%) scale(.94); }
  #toasts { bottom: calc(104px + env(safe-area-inset-bottom)); }
  .welcome { flex-direction: column; text-align: center; gap: 12px; } .welcome h2 { font-size: 22px; } .tiles { grid-template-columns: repeat(2, 1fr); } .quick { grid-template-columns: repeat(2, 1fr); }
  #assistant { inset: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .panel { right: 8px; left: 8px; width: auto; top: calc(var(--top) + env(safe-area-inset-top) + 6px); }
  .modal-back { padding: 0; align-items: end; } .modal { border-radius: 22px 22px 0 0; max-height: 92dvh; width: 100%; padding-bottom: env(safe-area-inset-bottom); }
  .settings { grid-template-columns: 1fr; } .settings-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; } .settings-nav button { white-space: nowrap; border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; }
  .set-row { flex-wrap: wrap; } .cal-cell { min-height: 70px; padding: 3px; } .cal-cell .chip { font-size: 10px; padding: 1px 3px; border-left-width: 2px; } .week { grid-template-columns: 1fr; } .week-col { min-height: 0; }
  .chat-page { height: calc(100dvh - var(--top) - 190px - env(safe-area-inset-bottom)); } .msg { max-width: 90%; }
  .auth { grid-template-columns: 1fr; } .auth-brand { display: none; } .auth-mobile-brand { display: flex; }
  .list-row { gap: 10px; } .icon-btn, .round, .tick { min-width: 40px; min-height: 40px; } .tick { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }

/* =====================================================================
   v1.1 — Live calls, alerts, planner
   ===================================================================== */
:root { --t-travel: #2F7A8C; --call-ok: #4E8A5B; }
[data-type="travel"] { --c: var(--t-travel); }
.pill-ok { background: color-mix(in srgb, var(--call-ok) 15%, var(--surface)); color: var(--call-ok); }
.pill .ico { width: 14px; height: 14px; }
.pbar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 10px 0 6px; }
.pbar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .4s; }
.pbar.over i { background: var(--danger); }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; margin-bottom: 12px; }
.back .ico { width: 16px; height: 16px; }

/* ---------- incoming / active call ---------- */
.call { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fade .2s; }
body.in-call { overflow: hidden; } body.in-call .fab { display: none; }
.call-screen { width: min(440px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow-lg); padding: 28px 24px 24px; overflow: hidden; }
.call-screen h2 { font-size: 26px; letter-spacing: .14em; }
.call-screen .mascot-xl { --s: 190px; margin: 10px 0 6px; }
.call-screen.active .mascot-xl { --s: 132px; margin: 0; }
.call-screen.ringing .mascot::before, .call-screen.ringing .mascot::after { content: ''; position: absolute; inset: -4px; border-radius: 34%; border: 2px solid var(--gold); animation: callwave 1.6s ease-out infinite; }
@keyframes callwave { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.16); } }
.call-screen > .eyebrow { margin-bottom: 14px; }
.call-screen.ringing .mascot::after { animation-delay: .8s; }
.call-screen.ringing .mascot img { animation: ringbell 1.2s ease-in-out infinite; }
.call-sub { color: var(--muted); }
.call-reason { font-size: 15px; color: var(--ink-2); max-width: 36ch; }
.call-status { min-height: 1.4em; font: 600 14px var(--display); color: var(--gold-ink); }
.call-actions { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.call-btn { display: grid; justify-items: center; gap: 6px; border: 0; background: none; font-weight: 600; font-size: 12px; color: var(--ink-2); }
.call-btn .ico { width: 64px; height: 64px; padding: 19px; border-radius: 50%; color: #fff; background: var(--ink-2); box-shadow: var(--shadow); transition: transform .15s; }
.call-btn:hover .ico { transform: scale(1.06); }
.call-btn.answer .ico { background: var(--call-ok); animation: pulse-ok 1.4s ease-in-out infinite; }
.call-btn.decline .ico { background: var(--danger); }
.call-btn.small .ico { width: 52px; height: 52px; padding: 15px; background: var(--surface-2); color: var(--ink); }
.call-btn.small.on .ico { background: var(--ink); color: var(--on-dark); }
@keyframes pulse-ok { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--call-ok) 22%, transparent); } }
.call-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font: 600 13px var(--display); color: var(--muted); }
.call-mascot-btn { border: 0; background: none; padding: 0; border-radius: 30%; }
.call-wave { height: 30px; } .call-wave i { width: 3px; }
.call-transcript { width: 100%; flex: 1; min-height: 90px; max-height: 32dvh; overflow-y: auto; text-align: left; display: grid; gap: 8px; align-content: start;
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; }
.call-transcript:empty { display: none; }
.call-line b { font: 600 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); margin-right: 6px; }
.call-line.user b { color: var(--muted); }
.call-line .confirm { display: block; margin-top: 6px; }
.call-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; justify-content: center; }
.call-line .call-acts { justify-content: flex-start; }
.call-type { width: 100%; display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 3px 4px 3px 14px; background: var(--surface); }
.call-type input[type="text"] { flex: 1; border: 0; outline: 0; box-shadow: none; background: none; min-width: 0; padding: 6px 0; height: auto; }
@media (max-width: 560px) {
  .call { padding: 0; } .call-screen { width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0; justify-content: center;
    padding: calc(24px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom)); }
  .call-screen.active { justify-content: flex-start; } .call-transcript { max-height: none; }
}

/* ---------- urgent alert banner ---------- */
.urgent-banner { position: fixed; z-index: 150; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 2px solid var(--danger);
  box-shadow: var(--shadow-lg); animation: rise .25s; }
.urgent-banner > div { flex: 1; min-width: 0; } .urgent-banner p { font-size: 13px; color: var(--muted); }

/* ---------- settings: calls ---------- */
.capab { display: grid; gap: 8px; margin: 4px 0 14px; }
.capab > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.capab b { font-size: 13px; } .capab span { grid-column: 1; font-size: 13px; color: var(--muted); }
.capab i { grid-row: 1 / 3; grid-column: 2; align-self: center; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-weight: 700; }
.capab i.ok { background: var(--gold-soft); color: var(--gold-ink); } .capab i.no { background: #F6E3DE; color: var(--danger); } .capab i .ico { width: 15px; height: 15px; }
.trig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-top: 10px; }
.trig-grid .check span { display: grid; } .trig-grid small { color: var(--muted); font-size: 12px; }

/* ---------- call history ---------- */
.call-row { align-items: flex-start; flex-wrap: wrap; }
.call-row > .row { margin-left: auto; }
.list > .list-row { min-width: 0; } .page-calls .list { grid-template-columns: minmax(0, 1fr); }
.page-calls { min-width: 0; } .page-calls .card-head { flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .call-row .list-main { flex-basis: calc(100% - 60px); } .call-row > .row { width: 100%; justify-content: flex-end; } }
.call-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); flex: none; }
.call-ico.missed, .call-ico.declined { background: #F6E3DE; color: var(--danger); } .call-ico .ico { width: 18px; height: 18px; }
.call-summary { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.call-row .call-acts { justify-content: flex-start; }

/* ---------- chat: plan card ---------- */
.plan-card { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.plan-card:hover { text-decoration: none; border-color: var(--gold); } .plan-card > span:nth-child(2) { flex: 1; display: grid; } .plan-card small { color: var(--muted); }
.plan-card > .ico { color: var(--gold-ink); }

/* ---------- planner ---------- */
.plan-hero { display: grid; gap: 16px; background: linear-gradient(135deg, var(--surface), var(--gold-soft)); }
.plan-hero h2 { font-size: 22px; margin: 6px 0 4px; }
.plan-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.cat-chip:hover { border-color: var(--gold); color: var(--ink); } .cat-chip .ico { width: 16px; height: 16px; color: var(--gold-ink); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.plan-tile { color: var(--ink); display: grid; gap: 4px; transition: border-color .15s, transform .15s; } .plan-tile:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-2px); }
.plan-tile h3 { font-size: 17px; margin-top: 10px; }
.plan-head { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; }
.plan-head h2 { font-size: 24px; margin: 10px 0 6px; }
.plan-head-side { display: grid; justify-items: center; align-content: start; gap: 4px; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 14px; } .plan-meta span { display: inline-flex; align-items: center; gap: 5px; } .plan-meta .ico { width: 16px; height: 16px; color: var(--gold-ink); }
.plan-summary { margin-top: 10px; color: var(--ink-2); max-width: 75ch; }
.plan-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.plan-tabs { margin: 18px 0 14px; }
.plan-day { margin-bottom: 14px; } .plan-day h2 { display: flex; align-items: center; gap: 8px; }
.day-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.plan-item { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.plan-item:hover .pi-title { color: var(--gold-ink); }
.pi-time b { display: block; font: 600 14px var(--display); } .pi-time small { color: var(--muted); }
.pi-title { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pi-body > p { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.pi-loc { display: flex; align-items: center; gap: 4px; color: var(--muted) !important; } .pi-loc .ico { width: 15px; height: 15px; }
.pi-sub b { color: var(--ink); font-weight: 600; }
.pi-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.pi-notes { display: flex; gap: 6px; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; } .pi-notes .ico { width: 15px; height: 15px; color: var(--gold-ink); }
.facts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.src { display: inline-block; padding: 1px 7px; border-radius: 6px; font: 600 10px/1.6 var(--display); letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; }
.src.est { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); } .src.ver { background: color-mix(in srgb, var(--call-ok) 15%, var(--surface)); color: var(--call-ok); }
.legend-src { margin-top: 16px; font-size: 12px; color: var(--muted); }
.weather { margin-top: 14px; } .weather h2 { display: flex; align-items: center; gap: 6px; }
.wx { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.wx-day { display: grid; gap: 2px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; } .wx-day small { color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 10px; }
.tl-day { margin: 10px 0 0 -18px; padding-left: 0; } .tl-day:first-child { margin-top: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 10px; cursor: pointer; padding: 6px 0; }
.tl-item::before { content: ''; position: absolute; left: -25px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface); }
.tl-item time { font: 600 13px var(--display); color: var(--ink-2); } .tl-item div { display: grid; } .tl-item small { font-size: 13px; color: var(--muted); }
.wk { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(110px, 1fr)); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.wk-hours { padding-top: 46px; } .wk-hours span { display: block; font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; border-top: 1px solid transparent; }
.wk-col { border-left: 1px solid var(--line); min-width: 0; }
.wk-head { height: 46px; display: grid; align-content: center; justify-items: center; font: 600 13px var(--display); border-bottom: 1px solid var(--line); background: var(--surface-2); } .wk-head small { font: 400 11px var(--font); color: var(--muted); }
.wk-body { position: relative; height: var(--h); background: repeating-linear-gradient(var(--surface) 0 45px, var(--line) 45px 46px); }
.wk-item { position: absolute; left: 3px; right: 3px; overflow: hidden; text-align: left; font-size: 12px; line-height: 1.3; padding: 3px 6px; border: 0; border-left: 3px solid var(--c);
  border-radius: 5px; background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--ink); }
.wk-any { padding: 6px; display: grid; gap: 4px; border-top: 1px solid var(--line); }
.map { position: relative; height: 440px; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-2); touch-action: none; cursor: grab; user-select: none; }
.map:active { cursor: grabbing; }
.map-tiles img { position: absolute; width: 256px; height: 256px; pointer-events: none; }
:root[data-theme="dark"] .map-tiles img { filter: brightness(.8) contrast(1.1); }
.map-pin { position: absolute; transform: translate(-50%, -100%); width: 30px; height: 30px; border-radius: 50% 50% 50% 0; rotate: -45deg; border: 2px solid #fff;
  background: var(--c); color: #fff; font: 700 12px var(--display); display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0,0,0,.3); padding: 0; }
.map-pin span { rotate: 45deg; }
.map-zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; } .map-zoom .icon-btn { background: var(--surface); box-shadow: var(--shadow); }
.map-attr { position: absolute; right: 6px; bottom: 4px; font-size: 11px; background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 1px 6px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th { text-align: left; font: 600 12px var(--display); color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); } .tbl tbody tr { cursor: pointer; } .tbl tbody tr:hover { background: var(--surface-2); }
.plan-mini { color: var(--ink); display: block; } .plan-mini:hover { text-decoration: none; } .plan-mini .pbar { margin: 6px 0 4px; height: 5px; }
@media (max-width: 860px) {
  .plan-head { grid-template-columns: 1fr; } .plan-head-side { justify-items: start; grid-row: 2; display: flex; align-items: center; gap: 12px; }
  .plan-item { grid-template-columns: 1fr; gap: 4px; } .trig-grid { grid-template-columns: 1fr; } .map { height: 360px; }
  .tl-item { grid-template-columns: 1fr; gap: 0; }
}
.call-acts .pill { white-space: normal; max-width: 100%; text-align: left; }
.call-screen .mascot::before, .call-screen .mascot::after { animation-name: callwave !important; }
.call-screen.active .call-mascot-btn { margin-bottom: 6px; }
