@font-face { font-family: "Outfit"; font-style: normal; font-weight: 300 500; font-display: swap; src: url(fonts/outfit-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 300 500; font-display: swap; src: url(fonts/outfit-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #111;
  --mute: #808080;
  --line: #e7e7e7;
  --pad: 24px;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #fff; color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
button { cursor: pointer; color: var(--mute); transition: color 0.2s; }
button:hover, button:focus-visible { color: var(--ink); outline: none; }
button:disabled { color: #d4d4d4; cursor: default; }

#frames { position: fixed; inset: 0; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; transition: opacity 0.5s; }
#stage, #past { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; pointer-events: none; user-select: none; }
#notice { position: fixed; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); width: max-content; max-width: min(420px, 80vw); margin: 0; text-align: center; font-size: 16px; line-height: 1.5; color: var(--mute); pointer-events: none; }
#page { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

#brand, #day, #dev { position: fixed; top: calc(var(--pad) - 4px); margin: 0; font-weight: 400; line-height: 1; pointer-events: none; }
#brand { left: var(--pad); font-size: 24px; font-weight: 400; letter-spacing: 0.02em; }
#day { right: var(--pad); font-size: 16px; color: var(--mute); padding-top: 6px; letter-spacing: 0.02em; }
#dev { left: 50%; transform: translateX(-50%); font-size: 12px; color: #c8873a; padding-top: 9px; }

#bubble {
  position: fixed; transform: translate(-50%, calc(-100% - 12px)); max-width: min(260px, 70vw); padding: 6px 12px; text-align: center;
  font-size: 15px; line-height: 1.3; color: var(--ink); background: #fff; border: 1px solid #d6d6d6; border-radius: 12px;
  pointer-events: none; transition: opacity 0.5s;
}
#bubble .q { display: block; font-size: 12px; color: var(--mute); margin-bottom: 3px; }
#bubble .q:empty { display: none; }
#bubble::after {
  content: ""; position: absolute; left: var(--tail, 50%); bottom: -5px; width: 8px; height: 8px; background: #fff;
  border-right: 1px solid #d6d6d6; border-bottom: 1px solid #d6d6d6; transform: translateX(-50%) rotate(45deg);
}

footer { position: fixed; left: var(--pad); right: var(--pad); bottom: max(var(--pad), env(safe-area-inset-bottom)); }
#thought { margin: 0 0 14px; height: 4.2em; max-width: 62ch; font-size: 19px; line-height: 1.4; color: #2b2b2b; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

#rail { position: relative; height: 34px; cursor: ew-resize; touch-action: none; user-select: none; }
#ticks { position: absolute; inset: 0; width: 100%; height: 100%; }

#bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 6px; font-size: 14px; line-height: 1.2; min-height: 20px; }
#status { color: var(--mute); }
#status button { font-style: normal; margin-right: 10px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
#corner { display: flex; align-items: baseline; gap: 14px; justify-content: flex-end; }
#msg { color: var(--mute); }
#noteForm { margin: 0; }
#noteText { width: min(260px, 52vw); border-bottom: 1px solid var(--ink); outline: none; font-size: 14px; padding-bottom: 1px; }
#noteText::placeholder { color: #bdbdbd; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  :root { --pad: 18px; }
  #thought { font-size: 17px; }
}
