:root {
  --ink: #fbf3e6;
  --ink-soft: rgba(251, 243, 230, 0.72);
  --glass: rgba(26, 18, 15, 0.38);
  --accent: #ff6a5a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #140f0d; color: var(--ink); overflow: hidden; }
body { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; -webkit-font-smoothing: antialiased; }
.feed { position: fixed; inset: 0; display: grid; place-items: center; }
canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

.boot { position: absolute; inset: auto 24px 50%; margin: 0; text-align: center; font-size: 17px; font-style: italic; color: var(--ink-soft); }
.boot[hidden] { display: none; }
.hud { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left)); pointer-events: none; }
.hud.top { top: 0; }
.hud.bottom { bottom: 0; align-items: flex-end; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 6px 9px; border-radius: 999px; background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font: 600 11px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.16em; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,106,90,0.6); animation: beat 2.4s ease-in-out infinite; }
.live.peeking .dot { background: #e8c37a; animation: none; }
@keyframes beat { 0%,100% { box-shadow: 0 0 0 0 rgba(255,106,90,0.5); } 50% { box-shadow: 0 0 0 6px rgba(255,106,90,0); } }
.where { padding: 7px 12px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 12px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.04em; color: var(--ink-soft); }
.where .sep { margin: 0 7px; opacity: 0.5; }
#clock { font-variant-numeric: tabular-nums; color: var(--ink); }

.tools { display: flex; gap: 8px; pointer-events: auto; }
.tool { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0.55; transition: opacity 0.3s; }
.tool:hover, .tool:focus-visible { opacity: 1; }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.peek { position: absolute; bottom: 70px; right: max(18px, env(safe-area-inset-right)); width: min(380px, calc(100vw - 36px)); max-height: min(70vh, 560px);
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(26,18,15,0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font: 500 13px/1.3 ui-sans-serif, system-ui, sans-serif; box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.peek[hidden] { display: none; }
.peek-row { display: flex; align-items: center; gap: 8px; }
.peek-row strong { font: 600 15px/1 "Iowan Old Style", Palatino, Georgia, serif; min-width: 120px; text-align: center; }
.peek-row .grow { flex: 1; }
.peek input[type=range] { flex: 1; min-width: 0; accent-color: #e8c37a; }
.peek output { min-width: 62px; font-variant-numeric: tabular-nums; text-align: right; }
.chip { border: 1px solid rgba(251,243,230,0.28); background: transparent; color: var(--ink); padding: 6px 10px; border-radius: 999px; font: inherit; cursor: pointer; }
.chip.icon { width: 30px; height: 30px; padding: 0; font-size: 18px; line-height: 1; }
.chip.on, .chip[aria-pressed=true] { background: rgba(232,195,122,0.25); }
.chip:hover, .chip:focus-visible { border-color: rgba(251,243,230,0.6); }
.day-notes { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.day-notes button { width: 100%; display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 6px 8px; border-radius: 10px; font: inherit; cursor: pointer; }
.day-notes button:hover, .day-notes button:focus-visible { background: rgba(251,243,230,0.1); }
.day-notes time { flex: 0 0 64px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.day-notes .visit time, .day-notes .visit span { color: #f2cf8e; }
.day-notes .now button { background: rgba(232,195,122,0.16); }
@media (max-width: 600px) {
  .where { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .live .dot { animation: none; } }
