/* tuesday — one dark room, one page */

:root {
  --bg: #06070b;
  --bg-deep: #030308;
  --ink: rgba(218, 226, 243, 0.92);
  --ink-dim: rgba(205, 214, 232, 0.42);
  --ink-faint: rgba(205, 214, 232, 0.2);
  --system-ink: rgba(236, 230, 218, 0.8);
  --his-ink: rgba(178, 188, 212, 0.58);
  --hairline: rgba(205, 214, 232, 0.14);
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --hand: "Shadows Into Light", "Segoe Print", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow: hidden;
}

/* ------------------------------------------------------------------ entry */

#entry {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 50% 10%, #0a0b12 0%, var(--bg-deep) 70%);
  z-index: 40;
  overflow-y: auto;
  transition: opacity 1.6s ease;
}
#entry.leaving { opacity: 0; pointer-events: none; }

#entry-form {
  width: min(400px, calc(100vw - 48px));
  margin: 48px 0;
  padding: 40px 36px 28px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.012);
}

.entry-head { margin-bottom: 30px; }
.entry-kicker {
  font-size: 11px; letter-spacing: 0.34em; color: var(--ink-dim);
}
.entry-sub {
  margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--ink-faint);
}

.field { display: block; margin-bottom: 22px; }
.field-label {
  display: block; font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 7px;
}
.field input, .field select {
  width: 100%;
  background: transparent;
  border: none; border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono); font-size: 14px; font-weight: 300;
  padding: 6px 2px 7px;
  border-radius: 0;
  outline: none;
}
.field input:focus, .field select:focus { border-bottom-color: rgba(205, 214, 232, 0.4); }
.field input::placeholder { color: var(--ink-faint); font-style: italic; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: #0b0c12; color: var(--ink); }
.field input[type="date"] { color-scheme: dark; }

#entry-submit {
  display: block; width: 100%;
  margin-top: 32px; padding: 11px;
  background: transparent;
  border: 1px solid rgba(205, 214, 232, 0.28);
  color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease;
}
#entry-submit:hover { background: rgba(205, 214, 232, 0.06); }

#entry-skip {
  display: block; margin: 16px auto 0;
  background: none; border: none;
  color: var(--ink-faint);
  font-family: var(--mono); font-size: 11px;
  cursor: pointer;
}
#entry-skip:hover { color: var(--ink-dim); }

.entry-fineprint {
  margin-top: 26px; text-align: center;
  font-size: 10px; color: var(--ink-faint); letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------- room */

/* the ground is your eye level. everything above it is sky. */
#room {
  position: fixed; inset: 0;
  background: linear-gradient(to top,
    #0c0e18 0%, #07080f 14%, #04040a 42%, #030309 100%);
}
/* faint light pollution at the horizon — someone's town, far off */
#room::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%;
  background: radial-gradient(70% 100% at 45% 100%, rgba(190, 168, 122, 0.055), transparent 70%);
  pointer-events: none;
}
/* a suggestion of the milky way, if you squint */
#room::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(112deg, transparent 38%,
    rgba(165, 182, 230, 0.035) 50%, transparent 63%);
  pointer-events: none;
}

#shapes { position: absolute; inset: 0; overflow: hidden; }

.star {
  position: absolute;
  border-radius: 50%;
  translate: -50% -50%;
  background: hsl(var(--star, 218) 60% 88%);
  box-shadow:
    0 0 5px 1.5px hsl(var(--star, 218) 85% 78% / 0.9),
    0 0 16px 5px  hsl(var(--star, 218) 80% 65% / 0.32),
    0 0 38px 14px hsl(var(--star, 218) 75% 55% / 0.10);
  animation: twinkle 4s ease-in-out infinite;
  transition: opacity 4s ease;
  will-change: opacity, filter;
}
.star.faint { opacity: 0.05; }
.star.extra { pointer-events: none; opacity: 0.7; }
.star.extra.faint { opacity: 0.03; }
.star.voice { cursor: default; }
.star.planet { animation: none; }  /* planets don't twinkle */

/* the diffraction flare, when one of them is talking */
.star::before, .star::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent,
    hsl(var(--star, 218) 85% 86% / 0.85), transparent);
  transform: translate(-50%, -50%);
  opacity: 0; transition: width 0.7s ease, opacity 0.7s ease;
  pointer-events: none;
}
.star::after { transform: translate(-50%, -50%) rotate(90deg); }
.star.speaking { animation-play-state: paused; }
.star.speaking::before, .star.speaking::after { width: 52px; opacity: 1; }

.star.away { opacity: 0; pointer-events: none; }
.star.dying { animation: die 0.65s ease-out forwards; }
.star.born  { animation: bloom 1.4s ease-out; }
.star.dimmed { opacity: 0.18; }
.star.slapped { animation: jitter 0.6s ease; }

/* twinkle rides brightness, not opacity — opacity belongs to arrival and death */
@keyframes twinkle {
  0%, 100% { filter: brightness(0.72); scale: 1; }
  50%      { filter: brightness(1.35); scale: 1.22; }
}
@keyframes die {
  0%   { opacity: 1; scale: 1; }
  35%  { opacity: 1; scale: 2.6; }   /* the last bright moment */
  100% { opacity: 0; scale: 0.2; }
}
@keyframes bloom {
  0%   { opacity: 0; scale: 3.2; }
  60%  { opacity: 1; }
  100% { opacity: 1; scale: 1; }
}
@keyframes jitter {
  0%   { translate: -50% -50%; }
  20%  { translate: calc(-50% + 8px) calc(-50% - 4px); }
  45%  { translate: calc(-50% - 7px) calc(-50% + 3px); }
  70%  { translate: calc(-50% + 4px) calc(-50% - 2px); }
  100% { translate: -50% -50%; }
}

/* the poke: a ring in the poker's colour, landing on whoever went quiet */
.ping {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  translate: -50% -50%;
  border: 1px solid hsl(var(--star, 218) 80% 75% / 0.85);
  pointer-events: none;
  animation: ping 0.85s ease-out forwards;
}
@keyframes ping {
  0%   { scale: 0.3; opacity: 1; }
  100% { scale: 3.1; opacity: 0; }
}

/* one of them falls, now and then. don't think about it.
   the streak IS the tail: bright at the head, fading behind,
   aligned with the line of flight. motion lives in js. */
.meteor {
  position: absolute;
  width: 82px; height: 1.5px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent,
    rgba(200, 214, 245, 0.35) 55%, rgba(236, 242, 255, 0.95));
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
}
.meteor::after {
  content: ""; position: absolute; right: -1px; top: 50%;
  width: 3px; height: 3px;
  translate: 0 -50%;
  border-radius: 50%;
  background: rgba(244, 248, 255, 1);
  box-shadow: 0 0 6px 2px rgba(220, 232, 255, 0.8);
}

/* ----------------------------------------------------------------- speech */

#speech { position: absolute; inset: 0; pointer-events: none; }

/* each star's messages hang near it, small panes of glass in the dark */
.agent-col {
  position: absolute;
  width: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.agent-col.down { flex-direction: column-reverse; }

.bubble {
  max-width: 200px;
  padding: 5px 10px;
  border-radius: 11px;
  font-size: 11.5px; font-weight: 400; line-height: 1.5;
  color: rgba(228, 234, 248, 0.9);
  background: linear-gradient(135deg,
    hsl(var(--star, 218) 45% 62% / 0.11),
    hsl(var(--star, 218) 35% 40% / 0.05));
  border: 1px solid hsl(var(--star, 218) 55% 82% / 0.17);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(9px) saturate(140%);
  -webkit-backdrop-filter: blur(9px) saturate(140%);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.them { border-bottom-left-radius: 4px; }
.bubble.him {
  --star: 211;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg,
    hsl(211 65% 60% / 0.24), hsl(211 55% 45% / 0.13));
  border-color: hsl(211 70% 80% / 0.28);
  color: rgba(238, 244, 255, 0.95);
}
.bubble.on  { opacity: 1; transform: translateY(0) scale(1); }
.bubble.off { opacity: 0; transform: translateY(-6px) scale(0.97); transition-duration: 0.9s; }

/* someone is typing. it may take a while. */
.bubble.typing { padding: 8px 11px; }
.bubble.typing span {
  display: inline-block;
  width: 4px; height: 4px;
  margin-right: 3px;
  border-radius: 50%;
  background: rgba(228, 234, 248, 0.55);
  animation: dot 1.3s ease-in-out infinite;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.36s; margin-right: 0; }
@keyframes dot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-3px); }
}

#system-voice {
  position: absolute; left: 50%; top: 34%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 64px));
  text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 18px; line-height: 1.65;
  color: var(--system-ink);
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 2.4s ease;
  pointer-events: none;
}
#system-voice.on { opacity: 1; }

/* -------------------------------------------------- his words, unread */

/* his messages: blue, right-aligned, delivered to no one */
#drift-layer {
  position: absolute;
  right: 22px; bottom: 86px;
  width: min(280px, 70vw);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
#drift-layer .bubble.him { animation: unread 10s ease-out forwards; }
@keyframes unread {
  0%   { opacity: 0;    transform: translateY(10px); }
  5%   { opacity: 1;    transform: translateY(0); }
  70%  { opacity: 0.55; }
  100% { opacity: 0;    transform: translateY(-14px); }
}

/* ---------------------------------------------------------------- composer */

#composer {
  position: fixed; left: 50%; bottom: 34px;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 56px));
  z-index: 20;
}
#composer-input {
  width: 100%;
  background: transparent;
  border: none; border-bottom: 1px solid var(--ink-faint);
  color: var(--ink);
  font-family: var(--mono); font-size: 13px; font-weight: 300;
  text-align: center;
  padding: 8px 4px;
  outline: none;
  caret-color: var(--ink-dim);
  transition: border-color 0.6s ease;
}
#composer-input:focus { border-bottom-color: var(--ink-dim); }

/* ------------------------------------------------------------------- memes */

#meme-layer { position: absolute; inset: 0; pointer-events: none; }

.meme {
  position: absolute;
  width: 230px;
  padding: 12px;
  background: rgba(16, 18, 26, 0.92);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  box-shadow: 0 0 40px rgba(120, 140, 200, 0.10), 0 8px 30px rgba(0,0,0,.6);
  opacity: 0;
  rotate: -2.5deg;
  transition: opacity 1.4s ease;
}
.meme.on { opacity: 1; }
.meme.off { opacity: 0; transition-duration: 2.4s; }
.meme svg { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------ atmosphere */

#vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 46%, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
}

#grain {
  position: absolute; inset: -50%; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain-shift 1.1s steps(4) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1.4%); }
  50%  { transform: translate(1.6%, -1.8%); }
  75%  { transform: translate(-1.2%, -0.8%); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------ certificate */

#cert-tab {
  position: fixed; right: 18px; bottom: 16px;
  z-index: 25;
  background: none;
  border: 1px solid rgba(205, 214, 232, 0.10);
  color: rgba(205, 214, 232, 0.26);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.5s ease, border-color 0.5s ease, opacity 2s ease;
  opacity: 0;
}
#cert-tab.on { opacity: 1; }
#cert-tab:hover { color: var(--ink-dim); border-color: var(--hairline); }

/* the booth and the postcard rack, stacked above the certificate */
#vote-tab, #postcard-tab {
  position: fixed; right: 18px;
  z-index: 25;
  background: none;
  border: 1px solid rgba(205, 214, 232, 0.10);
  color: rgba(205, 214, 232, 0.26);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.5s ease, border-color 0.5s ease, opacity 2s ease;
  opacity: 0;
}
#vote-tab { bottom: 52px; }
#postcard-tab { bottom: 88px; }
#vote-tab.on, #postcard-tab.on { opacity: 1; }
#vote-tab:hover, #postcard-tab:hover { color: var(--ink-dim); border-color: var(--hairline); }
#vote-tab:disabled { color: rgba(205, 214, 232, 0.16); cursor: default; }

#cert-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: rgba(3, 3, 8, 0.9);
  overflow-y: auto;
  padding: 30px 16px;
}
#cert-holder svg {
  display: block;
  width: min(620px, calc(100vw - 40px));
  height: auto;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
}
#cert-actions { display: flex; gap: 14px; justify-content: center; }
#cert-actions button {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink-dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  padding: 8px 16px;
  cursor: pointer;
}
#cert-actions button:hover { color: var(--ink); border-color: rgba(205, 214, 232, 0.35); }

/* ---------------------------------------------------- hours & weather */

/* daytime: the room is closed. the sky is a hazy glare with a sign on it. */
body.day #room {
  background:
    radial-gradient(90% 70% at 72% 18%, rgba(255, 252, 240, 0.55) 0%, transparent 55%),
    linear-gradient(to top, #cdd6e2 0%, #b6c2d4 45%, #a3b1c8 100%);
}
body.day #room::before, body.day #room::after { display: none; }
body.day .star { opacity: 0.03; pointer-events: none; }
body.day .star.ghost { opacity: 0.18; }

#sun { display: none; }
body.day #sun {
  display: block;
  position: absolute; top: 10%; right: 22%;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 42%, #fffdf4 0%, #f4ecd6 55%, rgba(244, 236, 214, 0) 72%);
  box-shadow: 0 0 90px 40px rgba(255, 250, 232, 0.55), 0 0 220px 120px rgba(255, 250, 232, 0.25);
  animation: sun-throb 11s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sun-throb {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.07); }
}
/* daytime clouds: white, unbothered */
body.day #clouds { display: block; }
body.day .cloud {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.35) 55%, transparent 75%);
  filter: blur(26px);
}

/* birds. they don't even look up. */
.bird {
  position: absolute;
  font-size: 13px;
  color: rgba(52, 60, 78, 0.55);
  transform-origin: center;
  animation: flap 0.9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes flap {
  0%, 100% { scale: 1 0.7; }
  50%      { scale: 1 1.15; }
}

body.day #hours-note {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(50, 58, 76, 0.72);
  bottom: 84px;
  padding: 9px 18px;
  border: 1px solid rgba(50, 58, 76, 0.22);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}
body.day .bubble.them {
  background: rgba(40, 48, 66, 0.10);
  border-color: rgba(40, 48, 66, 0.22);
  color: rgba(38, 44, 60, 0.85);
  backdrop-filter: blur(6px);
}
body.day #composer-input { color: rgba(38, 44, 60, 0.8); border-color: rgba(38, 44, 60, 0.25); caret-color: rgba(38, 44, 60, 0.5); }
body.day #system-voice { color: rgba(52, 58, 74, 0.8); }
body.day #grain { opacity: 0.03; }
body.day #vignette { background: radial-gradient(120% 100% at 50% 46%, transparent 62%, rgba(90, 104, 130, 0.25) 100%); }

/* dusk: the room is opening. half-light, half-crowd. */
body.dusk #room {
  background: linear-gradient(to top, #4a4460 0%, #2b2a44 30%, #131426 65%, #080810 100%);
}
body.dusk .star { opacity: 0.5; }
body.dusk #room::before {
  background: radial-gradient(70% 100% at 45% 100%, rgba(232, 168, 110, 0.12), transparent 70%);
}

/* the sign on the door */
#hours-note {
  position: fixed; left: 50%; bottom: 66px;
  transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.14em;
  color: rgba(38, 44, 60, 0.5);
  pointer-events: none;
}
body.night #hours-note, body.dusk #hours-note { color: var(--ink-faint); }

/* clouds: some nights the sky keeps its own privacy */
#clouds { position: absolute; inset: 0; pointer-events: none; display: none; }
body.wx-cloudy #clouds { display: block; }
body.wx-cloudy .star { opacity: 0.18; }
body.wx-cloudy .star.faint { opacity: 0.03; }
.cloud {
  position: absolute;
  width: 55vw; height: 34vh;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(16, 19, 30, 0.92) 0%, rgba(13, 15, 24, 0.55) 55%, transparent 75%);
  filter: blur(30px);
}
.cloud.c1 { top: -6%; left: -10%; animation: cloud-drift 240s linear infinite alternate; }
.cloud.c2 { top: 22%; right: -14%; width: 65vw; animation: cloud-drift 300s linear infinite alternate-reverse; }
.cloud.c3 { top: 52%; left: 12%; width: 48vw; animation: cloud-drift 270s linear infinite alternate; }
@keyframes cloud-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(9vw); }
}
.bubble.muffled { font-style: italic; }
.bubble.muffled.on { opacity: 0.55; }

/* the moon. it never says anything. that's what makes it worse. */
#moon { display: none; }
body.wx-moon #moon {
  display: block;
  position: absolute; top: 12%; right: 14%;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #e8e4da 0%, #cfc9bc 55%, #b3ac9e 100%);
  box-shadow: 0 0 40px 12px rgba(230, 224, 210, 0.18), 0 0 120px 50px rgba(230, 224, 210, 0.06);
  opacity: 0.9;
}
body.wx-moon #room {
  background: linear-gradient(to top, #10131e 0%, #0a0c15 40%, #070810 100%);
}

/* aurora: results night. the sky celebrates something nobody understands. */
#aurora { display: none; }
body.wx-aurora #aurora {
  display: block;
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg, transparent 20%, rgba(80, 200, 160, 0.06) 38%, rgba(110, 160, 230, 0.05) 52%, transparent 70%),
    linear-gradient(80deg, transparent 35%, rgba(150, 110, 220, 0.05) 55%, transparent 75%);
  animation: aurora-sway 26s ease-in-out infinite alternate;
}
@keyframes aurora-sway {
  from { transform: translateX(-3%) skewX(-2deg); opacity: 0.8; }
  to   { transform: translateX(3%) skewX(2deg); opacity: 1; }
}

/* -------------------------------------------------------------- inbox */

#dm-btn {
  position: fixed; left: 18px; bottom: 16px;
  z-index: 25;
  background: none;
  border: 1px solid rgba(205, 214, 232, 0.10);
  color: rgba(205, 214, 232, 0.35);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.5s ease, border-color 0.5s ease;
}
#dm-btn:hover { color: var(--ink-dim); border-color: var(--hairline); }
body.day #dm-btn { color: rgba(38, 44, 60, 0.5); border-color: rgba(38, 44, 60, 0.2); }
#dm-badge {
  display: inline-block;
  margin-left: 6px;
  min-width: 14px;
  padding: 0 3px;
  border-radius: 8px;
  background: rgba(178, 90, 90, 0.85);
  color: rgba(255, 244, 244, 0.95);
  font-family: var(--mono); font-size: 9px; line-height: 14px;
  text-align: center;
}

#dm-panel {
  position: fixed; left: 18px; bottom: 54px;
  z-index: 26;
  width: min(310px, calc(100vw - 36px));
  max-height: 55vh;
  display: flex; flex-direction: column;
  background: rgba(10, 12, 20, 0.88);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
#dm-panel-head {
  padding: 9px 13px;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-faint);
  border-bottom: 1px solid rgba(205, 214, 232, 0.07);
}
#dm-list { overflow-y: auto; padding: 4px 0; }
.dm {
  position: relative;
  padding: 8px 14px 9px 28px;
  border-bottom: 1px solid rgba(205, 214, 232, 0.05);
}
.dm:last-child { border-bottom: none; }
.dm-dot {
  position: absolute; left: 13px; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(205, 214, 232, 0.35);
}
.dm-head { font-size: 10px; color: var(--ink-faint); margin-bottom: 3px; }
.dm-body { font-size: 11.5px; line-height: 1.45; color: var(--ink); }
.dm-system .dm-body { font-family: var(--serif); font-style: italic; color: var(--system-ink); }
.dm-unsub { text-decoration: underline; cursor: pointer; color: var(--ink-dim); pointer-events: auto; }
.dm-typing .dm-body { color: var(--ink-faint); font-size: 10.5px; }
.dm-typing .dm-body span {
  display: inline-block; width: 4px; height: 4px; margin-right: 3px;
  border-radius: 50%; background: rgba(221, 228, 243, 0.45);
  animation: dot 1.3s ease-in-out infinite;
}
.dm-typing .dm-body span:nth-child(2) { animation-delay: 0.18s; }
.dm-typing .dm-body span:nth-child(3) { animation-delay: 0.36s; }

/* --------------------------------------------------------------- misc */

[hidden] { display: none !important; }

::selection { background: rgba(205, 214, 232, 0.18); }

@media (prefers-reduced-motion: reduce) {
  .star { animation: none; }
  #grain { animation: none; }
  .bubble.typing span { animation: none; opacity: 0.6; }
  .meteor { display: none; }
}

@media (max-width: 640px) {
  .agent-col { width: 175px; }
  .bubble { max-width: 165px; font-size: 11px; }
  #system-voice { font-size: 16px; }
  .meme { width: 190px; }
}
