:root { --ink:#172329; --muted:#718083; --paper:#f5f7f3; --line:#dde4df; --accent:#e3a25d; --teal:#3b7772; }
* { box-sizing:border-box; }
/* Defensive: user-select inherits, so any future none on an ancestor would silently take away the
   long-press "paste" menu inside text fields. */
input,textarea { user-select:text; -webkit-user-select:text; }
/* Beats any display rule below: .login-shell sets display:flex, which otherwise outranks the
   browser's own [hidden] { display:none } and leaves the login form showing under every tab. */
[hidden] { display:none !important; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at 100% 0%, #e8efe8 0, transparent 35%), var(--paper); color:var(--ink); font-family:'DM Sans', sans-serif; }
button,input { font:inherit; }
button { cursor:pointer; }
.shell,.login-shell { width:min(100% - 32px, 680px); margin:0 auto; }
.topbar { display:flex; align-items:center; justify-content:space-between; padding:28px 0 22px; }
h1,h2 { font-family:'Space Grotesk', sans-serif; margin:0; letter-spacing:0; }
h1 { font-size:clamp(1.7rem, 6vw, 2.3rem); }
h2 { font-size:1.55rem; }
.kicker,.eyebrow { color:var(--teal); font-size:.68rem; font-weight:700; letter-spacing:.14em; margin:0 0 7px; }
.muted { color:var(--muted); }
.icon-button,.small-button { border:0; background:transparent; color:var(--muted); }
.icon-button { font-size:1.35rem; padding:8px; }
.today-label { color:var(--muted); font-size:.9rem; margin:10px 0 12px; }
.current-panel { align-items:center; background:var(--ink); border-radius:8px; color:#f9fbf5; display:flex; gap:15px; min-height:136px; overflow:hidden; padding:22px; position:relative; }
.current-panel:before { background:var(--accent); content:''; height:100%; left:0; position:absolute; top:0; width:5px; }
.status-dot { background:var(--accent); border-radius:50%; box-shadow:0 0 0 7px rgba(227,162,93,.15); height:11px; width:11px; }
.current-copy { display:flex; flex:1; flex-direction:column; gap:4px; }
.current-copy .eyebrow { color:#93c0b6; }
.current-copy strong { font-family:'Space Grotesk'; font-size:1.45rem; }
.duration { color:#b8c7c4; font-variant-numeric:tabular-nums; }
.stop-button { background:#314248; border:1px solid #536469; border-radius:5px; color:#fff; padding:9px 13px; }
.section-heading,.view-title { align-items:end; display:flex; justify-content:space-between; }
.section-heading { margin:30px 0 12px; }
.section-heading span { color:var(--muted); font-size:.78rem; }
.heading-tools { align-items:center; display:flex; gap:10px; }
.layout-toggle { background:#fff; border:1px solid var(--line); border-radius:5px; display:flex; flex:none; overflow:hidden; }
.layout-button { background:transparent; border:0; color:var(--muted); font-size:.95rem; line-height:1; padding:8px 10px; }
.layout-button.active { background:var(--teal); color:#fff; }
.activity-list,.manage-list,.timeline-list { display:flex; flex-direction:column; gap:8px; }
.activity-list.tiles { display:grid; gap:8px; grid-template-columns:repeat(auto-fill, minmax(108px, 1fr)); }
.activity-list.tiles .activity-row { align-items:flex-start; flex-direction:column; gap:9px; min-height:98px; padding:14px; }
.activity-list.tiles .activity-name { white-space:normal; word-break:break-word; }
.activity-list.tiles .color-swatch { height:16px; width:16px; }
.activity-list.tiles .arrow { display:none; }
.activity-list.tiles .check { margin-left:0; margin-top:auto; }
.activity-list.tiles .empty-state { grid-column:1 / -1; }
.activity-row { align-items:center; background:#fff; border:1px solid transparent; border-radius:6px; color:var(--ink); display:flex; gap:14px; min-height:59px; padding:0 16px; text-align:left; }
.activity-row:hover,.activity-row.selected { border-color:var(--activity-color); }
.activity-row.selected { background:#f8fbf6; font-weight:700; }
.color-swatch { background:var(--activity-color, #3b82f6); border-radius:50%; display:block; flex:none; height:13px; width:13px; }
.arrow,.check { color:var(--muted); font-size:1.3rem; margin-left:auto; }
.check { color:var(--activity-color); font-size:.75rem; }
.tabbar { background:rgba(245,247,243,.94); border-top:1px solid var(--line); bottom:0; display:flex; justify-content:space-around; left:50%; max-width:680px; padding:11px 0 max(11px, env(safe-area-inset-bottom)); position:fixed; transform:translateX(-50%); width:100%; z-index:3; }
.tabbar button { background:none; border:0; color:var(--muted); display:flex; flex-direction:column; font-size:.72rem; gap:4px; padding:3px 22px; }
.tabbar button span { font-size:1.25rem; line-height:1; }.tabbar button.active { color:var(--teal); font-weight:700; }
.view { padding-bottom:100px; }.view-title { margin:15px 0 24px; }.view-title input { background:#fff; border:1px solid var(--line); border-radius:5px; color:var(--ink); padding:8px; }
.timeline-controls { align-items:center; display:flex; gap:7px; margin-bottom:10px; }.zoom-button { background:#fff; border:1px solid var(--line); border-radius:5px; color:var(--ink); line-height:1; min-width:36px; padding:8px 10px; }.zoom-button:disabled { color:var(--line); cursor:default; }.zoom-level { color:var(--muted); font-size:.75rem; font-variant-numeric:tabular-nums; min-width:46px; text-align:center; }.zoom-slider { accent-color:var(--teal); background:transparent; flex:1; min-width:0; }.zoom-slider:focus-visible { outline:2px solid var(--teal); outline-offset:3px; }
.timeline-meta { color:var(--muted); display:flex; font-size:.72rem; justify-content:space-between; margin-bottom:6px; }.timeline-viewport { cursor:grab; overflow:hidden; position:relative; touch-action:pan-y; user-select:none; -webkit-user-select:none; }.timeline-viewport.grabbing { cursor:grabbing; }
.timeline-tick { border-left:1px solid var(--line); color:var(--muted); font-size:.68rem; height:100%; padding-left:4px; position:absolute; top:0; white-space:nowrap; }
.day-row { align-items:stretch; border:2px solid transparent; border-radius:6px; display:flex; gap:8px; margin-bottom:3px; padding:2px; }
.day-row.focus { background:rgba(59,119,114,.08); border-color:var(--teal); }
.day-row.ruler-row { border-color:transparent; margin-bottom:1px; }
.day-label { align-items:flex-start; color:var(--muted); display:flex; flex:none; flex-direction:column; font-size:.66rem; justify-content:center; line-height:1.25; width:42px; }
.day-label strong { color:var(--ink); font-size:.75rem; }
.day-row.focus .day-label strong { color:var(--teal); }
.timeline-ruler { flex:1; height:18px; min-width:0; overflow:hidden; position:relative; }
.timeline-track { background:#e4eae4; border-radius:4px; flex:1; height:34px; min-width:0; overflow:hidden; position:relative; }
.timeline-event { background:var(--activity-color); height:100%; min-width:3px; position:absolute; }
.timeline-event.selected { box-shadow:inset 0 0 0 2px var(--ink); }
.timeline-stage { position:relative; }
.timeline-popover { align-items:center; background:var(--ink); border-radius:7px; box-shadow:0 8px 22px rgba(23,35,41,.28); color:#f9fbf5; cursor:pointer; display:flex; gap:9px; max-width:min(88vw, 300px); padding:9px 12px; position:absolute; transform:translate(-50%, calc(-100% - 9px)); white-space:nowrap; z-index:4; }
.timeline-popover.below { transform:translate(-50%, 9px); }
.timeline-popover:after { border:6px solid transparent; border-top-color:var(--ink); content:''; left:50%; position:absolute; top:100%; transform:translateX(-50%); }
.timeline-popover.below:after { border-top-color:transparent; border-bottom-color:var(--ink); bottom:100%; top:auto; }
.popover-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.popover-copy strong { font-size:.85rem; overflow:hidden; text-overflow:ellipsis; }
.popover-copy small { color:#b8c7c4; font-size:.7rem; }
.timeline-popover em { color:var(--accent); font-size:.72rem; font-style:normal; font-weight:700; margin-left:auto; }
.timeline-item.flash { animation:flash 1.8s ease-out; }
@keyframes flash { 0%,55% { background:#fdf0dd; box-shadow:0 0 0 2px var(--accent); } 100% { background:#fff; box-shadow:0 0 0 2px transparent; } }
.export-panel { background:#fff; border:1px solid var(--line); border-radius:8px; margin-top:22px; padding:16px; }
.export-head p { font-size:.85rem; margin:0 0 14px; }
.export-fields { display:flex; gap:10px; margin-bottom:14px; }
.export-fields label { color:var(--muted); display:flex; flex:1; flex-direction:column; font-size:.72rem; font-weight:700; gap:6px; letter-spacing:.09em; min-width:0; text-transform:uppercase; }
.export-fields input { background:#fff; border:1px solid var(--line); border-radius:5px; color:var(--ink); font-weight:400; letter-spacing:0; min-width:0; padding:10px; width:100%; }
#export-csv { width:100%; }.timeline-item { align-items:center; background:#fff; border-radius:6px; display:flex; gap:12px; padding:13px 15px; }.timeline-item div { display:flex; flex:1; flex-direction:column; gap:3px; }.timeline-item span:last-child { color:var(--muted); font-size:.8rem; }.intro { margin:-11px 0 20px; }.add-button,.primary-button { background:var(--teal); border:0; border-radius:5px; color:#fff; font-weight:700; padding:10px 14px; }.manage-row { align-items:center; background:#fff; border-radius:6px; display:flex; gap:9px; min-height:63px; padding:10px 12px; }.manage-name { display:flex; flex:1; flex-direction:column; gap:3px; }.manage-name small { color:var(--muted); font-size:.72rem; }.small-button { font-size:1.1rem; padding:8px 5px; }.danger { color:#b85e53; font-size:1.3rem; }.empty-state { color:var(--muted); padding:30px 10px; text-align:center; }
.login-shell { align-items:flex-start; display:flex; flex-direction:column; justify-content:center; min-height:100vh; padding:30px 0; }.login-mark { align-items:center; background:var(--ink); border-radius:50%; color:var(--accent); display:flex; font-size:2.2rem; height:64px; justify-content:center; margin-bottom:26px; width:64px; }.login-shell h1 { font-size:clamp(2.2rem, 11vw, 4.5rem); max-width:500px; }.login-shell > .muted { margin:10px 0 30px; }.login-shell form { display:flex; flex-direction:column; gap:9px; max-width:480px; width:100%; }.login-actions { display:flex; gap:9px; margin-top:4px; }.login-actions .primary-button { flex:1; min-height:48px; }
.login-switch { color:var(--muted); font-size:.85rem; margin:14px 0 0; }
.link-button { background:none; border:0; color:var(--teal); font-weight:700; padding:0; text-decoration:underline; }.login-shell input { background:#fff; border:1px solid var(--line); border-radius:5px; flex:1; min-width:0; padding:14px; }.primary-button { padding:0 18px; white-space:nowrap; }
.modal-overlay { align-items:center; background:rgba(23,35,41,.44); bottom:0; display:flex; justify-content:center; left:0; opacity:0; padding:20px; position:fixed; right:0; top:0; transition:opacity .16s; z-index:10; }
.modal-overlay.open { opacity:1; }
.modal { background:var(--paper); border-radius:10px; box-shadow:0 18px 44px rgba(23,35,41,.22); max-height:calc(100vh - 40px); max-width:400px; overflow-y:auto; padding:22px; transform:translateY(8px); transition:transform .16s; width:100%; }
.modal-overlay.open .modal { transform:none; }
.modal h3 { font-family:'Space Grotesk', sans-serif; font-size:1.2rem; margin:0 0 10px; }
.modal-copy { color:var(--muted); font-size:.9rem; line-height:1.45; margin:0 0 20px; }
.modal-actions { display:flex; gap:9px; justify-content:flex-end; margin-top:22px; }
.ghost-button { background:transparent; border:1px solid var(--line); border-radius:5px; color:var(--ink); font-weight:500; padding:10px 14px; }
.danger-button { background:#b85e53; }
.field { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.field > span { color:var(--muted); font-size:.72rem; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }
.field input[type=text],.field input:not([type]) { background:#fff; border:1px solid var(--line); border-radius:5px; color:var(--ink); padding:12px; width:100%; }
.field input:focus-visible,.ghost-button:focus-visible,.swatch:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.swatch-grid { display:grid; gap:8px; grid-template-columns:repeat(auto-fill, minmax(38px, 1fr)); }
.swatch { background:var(--swatch); border:2px solid transparent; border-radius:6px; box-shadow:inset 0 0 0 1px rgba(23,35,41,.08); height:38px; padding:0; width:100%; }
.swatch.selected { border-color:var(--ink); }
.custom-color { align-items:center; background:#fff; border:1px solid var(--line); border-radius:5px; display:flex; gap:10px; margin-top:10px; padding:8px 10px; }
.custom-color input[type=color] { background:none; border:0; block-size:32px; cursor:pointer; inline-size:44px; padding:0; }
.custom-color span { color:var(--muted); font-size:.85rem; }
.custom-color em { color:var(--muted); font-size:.75rem; font-style:normal; font-variant-numeric:tabular-nums; margin-left:auto; }
/* Fixed rather than in the document flow, which would put it behind the tab bar or the header. */
.build-badge { color:var(--muted); font-size:.6rem; letter-spacing:.04em; margin:0; opacity:.7; pointer-events:none; position:fixed; right:12px; top:max(calc(env(safe-area-inset-top) + 6px), 6px); z-index:2; }
.update-banner { align-items:center; background:var(--ink); border-radius:6px; color:#f9fbf5; display:flex; font-size:.85rem; gap:12px; left:50%; max-width:calc(100% - 32px); padding:10px 12px; position:fixed; top:12px; transform:translateX(-50%); width:680px; z-index:6; }
.update-banner span { flex:1; }
.update-button { background:var(--accent); border:0; border-radius:5px; color:var(--ink); font-weight:700; padding:8px 14px; }
.update-button:disabled { opacity:.6; }
#toast { background:var(--ink); border-radius:5px; bottom:85px; color:#fff; left:50%; max-width:calc(100% - 32px); opacity:0; padding:12px 16px; pointer-events:none; position:fixed; transform:translate(-50%, 15px); transition:.2s; z-index:5; }#toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:520px) { .shell,.login-shell { width:min(100% - 24px, 680px); }.section-heading .count { display:none; }.login-shell form { flex-direction:column; }.primary-button { min-height:48px; }.current-panel { min-height:126px; }.current-copy strong { font-size:1.22rem; } }
