:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --ink: #17211d;
  --muted: #6f766f;
  --line: #d8d2c5;
  --card: rgba(255, 255, 255, .72);
  --green: #167c5a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(252, 203, 120, .34), transparent 32rem),
    linear-gradient(135deg, var(--paper), #e7eee8);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.shell { width: min(840px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0 70px; }
.topbar {
  position: sticky;
  top: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  background: rgba(245, 241, 232, .78);
  box-shadow: 0 15px 45px rgba(35, 50, 43, .09);
  backdrop-filter: blur(16px);
}
.eyebrow { margin: 0 0 3px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(25px, 4vw, 36px); font-weight: 500; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
#status-dot { width: 9px; height: 9px; border-radius: 50%; background: #c58a38; box-shadow: 0 0 0 5px rgba(197, 138, 56, .12); }
#status-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(22, 124, 90, .12); }
.messages { display: grid; gap: 10px; }
.message { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start; animation: arrive .24s ease-out; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; color: white; background: var(--green); font-weight: 800; font-size: 13px; }
.bubble { min-width: 0; padding: 13px 16px 14px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 8px 20px 20px 20px; background: var(--card); box-shadow: 0 5px 18px rgba(35, 50, 43, .05); }
.meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.author { color: #185f48; font-size: 14px; }
time { color: var(--muted); font-size: 12px; }
.context { display: none; margin-bottom: 7px; padding-left: 8px; border-left: 2px solid #91b6a8; color: var(--muted); font-size: 12px; }
.context.visible { display: block; }
.text { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.48; }
.message.deleted { opacity: .58; }
.message.deleted .text { color: var(--muted); font-style: italic; }
.empty { padding: 50px 20px; color: var(--muted); text-align: center; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } }
@media (max-width: 560px) {
  .shell { width: min(100% - 18px, 840px); padding-top: 9px; }
  .topbar { top: 6px; padding: 14px 16px; border-radius: 18px; }
  .status { font-size: 0; }
  .message { grid-template-columns: 30px 1fr; gap: 7px; }
  .avatar { width: 30px; height: 30px; border-radius: 11px; font-size: 11px; }
}

