/* ---------- Theme tokens ---------- */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --surface-3: #e7eaf2;
  --border: #e3e6ee;
  --text: #171a2b;
  --text-2: #4a5068;
  --muted: #8a90a6;
  --accent: #5b5bf0;
  --accent-2: #7c5cff;
  --accent-soft: #ecebff;
  --accent-text: #ffffff;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --success: #16a37b;
  --success-soft: #e3f6ef;
  --gold: #e9b949;
  --mod: #8b5cf6;
  --bubble: #ffffff;
  --bubble-me: linear-gradient(135deg, var(--accent), var(--accent-2));
  --bubble-me-text: #ffffff;
  --shadow-sm: 0 1px 2px rgba(20, 24, 50, 0.06);
  --shadow: 0 4px 16px rgba(20, 24, 50, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 24, 50, 0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --left-w: 272px;
  --right-w: 320px;
}
body.night {
  --bg: #0d0f1e;
  --surface: #151829;
  --surface-2: #1c2036;
  --surface-3: #252a45;
  --border: #262b47;
  --text: #eceefa;
  --text-2: #b6bad3;
  --muted: #7d83a3;
  --accent-soft: #25264d;
  --danger-soft: #3a1d26;
  --success-soft: #133229;
  --bubble: #1f2340;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease, color 0.6s ease;
  overflow: hidden;
}
.side, .chat-header, .card, .composer-box, .modal-card, .bubble, .nav-item, .thread-tab, .role-bar { transition: background-color 0.5s ease, border-color 0.5s ease, color 0.3s ease; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--text); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.92rem;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s, filter 0.2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-success { background: var(--success); color: #fff; border-color: transparent; }
.btn-soft { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
body.night .btn-soft { color: #b8b6ff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 18px; font-size: 1rem; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
body.night .btn.on { color: #c9c7ff; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); display: inline-grid; place-items: center; font-size: 1rem; flex-shrink: 0;
  transition: background-color 0.2s, transform 0.15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.94); }

/* ---------- Join ---------- */
.join { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 5; }
.join-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, #7c5cff55, transparent 60%),
    radial-gradient(900px 600px at 110% 110%, #5b5bf055, transparent 60%),
    linear-gradient(160deg, #10132a, #1b1f45);
}
.join-card {
  position: relative; background: rgba(255,255,255,0.96); color: #171a2b; border-radius: 22px;
  padding: 36px 32px; width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px;
  text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.45); animation: rise 0.6s var(--ease);
}
.join-card h1 { margin: 0; font-size: 1.9rem; letter-spacing: -0.02em; }
.join-card p { margin: 0 0 6px; color: #5a6078; }
.join-logo { margin: -78px auto 0; width: 96px; height: 96px; border-radius: 28px; background: #1b1f45; box-shadow: 0 12px 30px rgba(0,0,0,0.35); padding: 10px; }
.join-logo svg { width: 100%; height: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 0.85rem; font-weight: 600; color: #4a5068; }
.field input {
  padding: 13px 14px; border-radius: 12px; border: 1.5px solid #e3e6ee; background: #f8f9fc; color: #171a2b; font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { outline: none; border-color: #5b5bf0; box-shadow: 0 0 0 4px #5b5bf022; background: #fff; }
.error { color: var(--danger); min-height: 1.2em; font-size: 0.9rem; }

/* ---------- Layout: three full-width columns ---------- */
.app {
  display: grid; grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w);
  height: 100vh; height: 100dvh; width: 100vw;
  padding-top: var(--fx-top, 0px); padding-bottom: var(--fx-bottom, 0px);
  transition: padding 0.6s var(--ease);
  animation: fade 0.5s var(--ease);
}
.side { background: var(--surface); overflow-y: auto; display: flex; flex-direction: column; }
.side-left { border-right: 1px solid var(--border); padding: 18px 14px; gap: 14px; }
.side-right { border-left: 1px solid var(--border); padding: 16px; gap: 14px; background: var(--bg); }
.scrim { display: none; }

/* Left */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; padding: 0 6px; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; background: #1b1f45; padding: 3px; }
.brand-logo svg { width: 100%; height: 100%; }
.me-card {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius);
  background: var(--surface-2);
}
.me-card .who { min-width: 0; }
.me-card .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .status { font-size: 0.78rem; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-title {
  display: flex; align-items: center; justify-content: space-between; margin: 14px 8px 6px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.nav-title .icon-btn { width: 26px; height: 26px; border-radius: 8px; font-size: 0.9rem; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent;
  padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; position: relative;
  transition: background-color 0.2s var(--ease), color 0.2s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.selected { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
body.night .nav-item.selected { color: #c9c7ff; }
.nav-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); font-size: 0.9rem; flex-shrink: 0; }
.nav-item.selected .nav-icon { background: var(--surface); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-meta { font-size: 0.75rem; color: var(--muted); }
.pill { background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 0.72rem; font-weight: 700; animation: pop 0.3s var(--ease); }
.empty-nav { padding: 6px 10px; color: var(--muted); font-size: 0.85rem; }

/* Avatars */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  color: #fff; font-weight: 700; font-size: 0.85rem; position: relative; user-select: none;
}
.avatar.sm { width: 28px; height: 28px; font-size: 0.75rem; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }

/* Center */
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.chat-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 22px; min-height: 68px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 2;
}
.chat-heading { flex: 1; min-width: 0; }
.chat-title { font-weight: 700; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; gap: 8px; }
.phase-corner { width: 42px; height: 42px; flex-shrink: 0; transition: transform 0.4s var(--ease); }
.phase-corner svg { width: 100%; height: 100%; }
.phase-corner.land { animation: land 0.35s ease-out; }
.only-mobile, .only-narrow { display: none; }

.trial-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 22px;
  background: linear-gradient(90deg, #e9b94933, #e9b94911); border-bottom: 1px solid var(--border);
  animation: slideDown 0.4s var(--ease);
}
.trial-banner .scales { width: 30px; height: 30px; }
.trial-banner .scales svg { width: 100%; height: 100%; }
.trial-banner .t-text { flex: 1; min-width: 160px; }
.trial-banner .t-title { font-weight: 700; }
.trial-banner .t-sub { font-size: 0.82rem; color: var(--text-2); }
.trial-banner .t-actions { display: flex; gap: 8px; }

.thread-tabs {
  display: flex; gap: 8px; padding: 10px 22px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--border);
}
.thread-tab {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); white-space: nowrap; font-weight: 500; font-size: 0.9rem; transition: all 0.2s var(--ease);
}
.thread-tab:hover { background: var(--surface-2); }
.thread-tab.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
body.night .thread-tab.on { color: #c9c7ff; }
.thread-tab.offline { opacity: 0.6; }
.thread-tab .new { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.role-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 22px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-2);
}
.role-actions { display: flex; gap: 8px; }

.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px 8px; display: flex; flex-direction: column; scroll-behavior: smooth; }
.msg-row { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; animation: msgIn 0.35s var(--ease); max-width: min(720px, 85%); }
.msg-row.cont { margin-top: 3px; }
.msg-row.cont .avatar { visibility: hidden; height: 0; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-body { display: flex; flex-direction: column; min-width: 0; }
.msg-row.me .msg-body { align-items: flex-end; }
.msg-meta { font-size: 0.78rem; color: var(--muted); margin: 0 4px 4px; display: flex; gap: 8px; align-items: baseline; }
.msg-meta .author { font-weight: 700; color: var(--text-2); }
.msg-meta .author.mod { color: var(--mod); }
.bubble {
  background: var(--bubble); padding: 9px 14px; border-radius: 18px; border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm); line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap;
}
.msg-row.cont:not(.me) .bubble { border-top-left-radius: 6px; }
.msg-row.me .bubble { background: var(--bubble-me); color: var(--bubble-me-text); border-radius: 18px; border-bottom-right-radius: 6px; }
.msg-row.me.cont .bubble { border-top-right-radius: 6px; }
.bubble.modb { border: 1.5px solid color-mix(in srgb, var(--mod) 45%, transparent); }
.role-msg { display: flex; align-items: center; gap: 12px; white-space: normal; }
.role-msg .art { width: 46px; height: 50px; flex-shrink: 0; }
.role-msg .art svg { width: 100%; height: 100%; }
.msg-system {
  align-self: center; margin: 14px 0 4px; padding: 6px 14px; border-radius: 999px; background: var(--surface-2);
  color: var(--text-2); font-size: 0.82rem; text-align: center; max-width: 90%; animation: msgIn 0.35s var(--ease);
}
.empty-state { margin: auto; text-align: center; color: var(--muted); max-width: 320px; animation: fade 0.4s var(--ease); }
.empty-state .big { font-size: 2.4rem; margin-bottom: 8px; }
.empty-state b { color: var(--text-2); display: block; margin-bottom: 4px; }

.composer { padding: 12px 22px 18px; background: var(--bg); }
.composer-box {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.composer-box input { flex: 1; min-width: 0; border: none; background: transparent; padding: 8px 0; font-size: 0.98rem; outline: none; }
.composer-box input:disabled { cursor: not-allowed; }
.send-btn {
  width: 40px; height: 40px; border-radius: 12px; border: none; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); transition: transform 0.15s var(--ease), opacity 0.2s;
}
.send-btn:hover:not(:disabled) { transform: scale(1.06); }
.send-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.composer.locked .composer-box { background: var(--surface-2); }

/* Right panel */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); animation: fade 0.4s var(--ease); }
.side-right > .card { flex-shrink: 0; }
.side-right > .card.grow { flex: 0 0 auto; }
.card-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card-title .count { background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 1px 8px; font-size: 0.72rem; letter-spacing: 0; }
.hint { margin: -2px 0 10px; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.phase-display { display: flex; align-items: center; gap: 12px; }
.phase-display .art { width: 48px; height: 48px; }
.phase-display .art svg { width: 100%; height: 100%; }
.phase-display .p-name { font-weight: 800; font-size: 1.15rem; }
.phase-display .p-sub { font-size: 0.8rem; color: var(--muted); }
.mod-tools { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; }
.segmented button { border: none; background: transparent; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--text-2); transition: all 0.25s var(--ease); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.trial-card { border-color: #e9b94980; background: linear-gradient(180deg, #e9b94922, var(--surface) 70%); }
.trial-card .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.trial-card .who b { font-size: 1.05rem; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s var(--ease); }
.trial-card .progress > i { background: linear-gradient(90deg, #e9b949, #f08c3a); }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-2); margin: 8px 0 4px; }
.vote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.voters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chip { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row .btn { flex: 1; }

.mod-box { display: flex; flex-direction: column; gap: 8px; }
.mod-box .current { display: flex; align-items: center; gap: 10px; }
.mod-box .current .label { font-weight: 600; }
.mod-box .current .sub { font-size: 0.78rem; color: var(--muted); }
.mod-box select, .modal-card select {
  width: 100%; padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2);
}
.transfer { display: flex; gap: 6px; }
.transfer select { flex: 1; min-width: 0; }

.players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.players li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius-sm); }
.players li:hover { background: var(--surface-2); }
.players li .pname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.players li.me .pname { font-weight: 700; }
.tag { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.tag.mod { background: color-mix(in srgb, var(--mod) 18%, transparent); color: var(--mod); }
.tag.muted { background: var(--danger-soft); color: var(--danger); }
.tag.you { background: var(--surface-2); color: var(--muted); }

.wipe-box { display: flex; flex-direction: column; gap: 12px; }
.wipe-item .progress-label { margin-top: 0; }
.wipe-item .btn { margin-top: 8px; }

/* Roles */
.players li .pname { display: flex; flex-direction: column; gap: 1px; }
.role-tag { font-size: 0.74rem; font-weight: 600; color: var(--rc, var(--muted)); }
.role-tag.none { color: var(--muted); font-weight: 500; font-style: italic; }
.tag.prot { background: #dbeafe; color: #1d4ed8; text-transform: none; letter-spacing: 0; }
body.night .tag.prot { background: #1e2f5c; color: #93c5fd; }
.protect-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px dashed var(--border); background: transparent;
  display: grid; place-items: center; font-size: 0.8rem; filter: grayscale(1); opacity: 0.55; flex-shrink: 0;
  transition: all 0.2s var(--ease);
}
.protect-btn:hover { opacity: 1; filter: none; border-color: #3b82f6; }
.protect-btn.on { filter: none; opacity: 1; border-style: solid; border-color: #3b82f6; background: #dbeafe; }
body.night .protect-btn.on { background: #1e2f5c; }
.role-setup { display: flex; flex-direction: column; gap: 6px; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); transition: opacity 0.2s; }
.stepper-row.off { opacity: 0.55; }
.stepper-label { font-weight: 600; font-size: 0.9rem; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper b { min-width: 18px; text-align: center; }
.stepper button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  font-weight: 700; display: grid; place-items: center; transition: transform 0.15s var(--ease);
}
.stepper button:active:not(:disabled) { transform: scale(0.9); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.civ-count { margin-right: 36px; }
.role-summary { font-size: 0.8rem; color: var(--muted); margin: 10px 0; line-height: 1.4; }
.role-summary.warn { color: var(--danger); font-weight: 600; }
.role-bar .btn.current { outline: 2px solid currentColor; outline-offset: 1px; }
.role-kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* Officer checks */
.btn-success-soft { background: var(--success-soft); color: var(--success); border-color: transparent; }
.check-bar { background: color-mix(in srgb, #3b82f6 10%, var(--surface-2)); }
.check-bar select { padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); min-width: 190px; }
.check-hint { font-size: 0.8rem; color: var(--muted); }
.check-bar .btn.current { outline: 2px solid currentColor; outline-offset: 1px; }
.bubble.check-bubble { background: var(--surface) !important; color: var(--text) !important; border: 1.5px solid #3b82f6; }
.check-kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #3b82f6; margin-bottom: 2px; }
.check-line { font-size: 1rem; }
.check-verdict.wolf { color: var(--danger); }
.check-verdict.civ { color: var(--success); }

/* ---------- Phase overlay ---------- */
.phase-overlay {
  position: fixed; z-index: 50; left: 50%; top: 50%; width: 280px; height: 280px;
  --dx: 0px; --dy: 0px; --s: 1;
  transform: translate(-50%, -50%) scale(0.7); opacity: 0; pointer-events: none; text-align: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease-out;
  will-change: transform, opacity;
}
.phase-overlay svg { width: 100%; height: 100%; }
.phase-overlay .caption {
  position: absolute; left: 50%; bottom: -46px; transform: translateX(-50%); white-space: nowrap;
  font-size: 2.2rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; text-shadow: 0 4px 20px rgba(0,0,0,0.6);
  transition: opacity 0.2s ease-out;
}
.phase-overlay.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
/* Glide into the corner using only transform, which the browser can animate smoothly. */
.phase-overlay.fly {
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(var(--s));
}
.phase-overlay.fly .caption { opacity: 0; }
.phase-flash { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; background: radial-gradient(circle at center, rgba(10,12,30,0.55), rgba(10,12,30,0.78)); will-change: opacity; }
.phase-flash.on { opacity: 1; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(8,10,25,0.66); display: grid; place-items: center; padding: 16px; animation: fade 0.25s var(--ease); }
.modal-card {
  background: var(--surface); color: var(--text); border-radius: 22px; padding: 28px; width: min(440px, 100%);
  text-align: center; box-shadow: var(--shadow-lg); animation: popIn 0.45s var(--ease); max-height: 90vh; overflow-y: auto;
}
.modal-card h2 { margin: 8px 0 4px; letter-spacing: -0.02em; }
.modal-card p { color: var(--text-2); margin: 6px 0; line-height: 1.5; }
.modal-card .art { margin: 0 auto; width: 140px; height: 140px; }
.modal-card .art svg { width: 100%; height: 100%; }
.modal-card .art.role { width: 190px; height: 210px; animation: flip 0.8s var(--ease); }
.modal-card .actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.modal-card .actions .btn { min-width: 110px; padding: 11px 18px; }
.modal-card input[type="text"], .modal-card .text-input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); margin-top: 10px; font-size: 1rem;
}
.modal-card .text-input:focus { outline: none; border-color: var(--accent); }
.verdict { font-size: 2.2rem; font-weight: 800; letter-spacing: 0.02em; margin: 4px 0; animation: popIn 0.6s var(--ease) 0.15s both; }
.verdict.guilty { color: var(--danger); }
.verdict.innocent { color: var(--success); }
.tally { display: flex; justify-content: center; gap: 10px; margin: 10px 0; }
.tally span { padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.tally .g { background: var(--danger-soft); color: var(--danger); }
.tally .i { background: var(--success-soft); color: var(--success); }
.vote-list { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.vote-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); animation: msgIn 0.4s var(--ease) both; }
.vote-list li .n { flex: 1; font-weight: 600; }
.pick-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; text-align: left; max-height: 300px; overflow-y: auto; }
.pick-list button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 600; transition: all 0.2s var(--ease); }
.pick-list button:hover { border-color: var(--danger); background: var(--danger-soft); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { background: #171a2b; color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 0.9rem; animation: toastIn 0.35s var(--ease); }
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }

/* ---------- Animations ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@keyframes pop { 0% { transform: scale(0.5); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes land { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes flip { from { transform: rotateY(90deg) scale(0.8); opacity: 0; } to { transform: rotateY(0) scale(1); opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Narrower screens: right panel slides in ---------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: var(--left-w) minmax(0, 1fr); }
  .side-right {
    position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(340px, 88vw);
    transform: translateX(100%); transition: transform 0.35s var(--ease); box-shadow: var(--shadow-lg);
  }
  .side-right.open { transform: none; }
  .only-narrow { display: inline-grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(8,10,25,0.45); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); }
  .scrim.on { opacity: 1; pointer-events: auto; }
}

/* ---------- Phones: left panel slides in too ---------- */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side-left {
    position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: min(300px, 85vw);
    transform: translateX(-100%); transition: transform 0.35s var(--ease); box-shadow: var(--shadow-lg);
  }
  .side-left.open { transform: none; }
  .only-mobile { display: inline-grid; }
  .chat-header { padding: 10px 12px; gap: 8px; min-height: 60px; }
  .phase-corner { width: 34px; height: 34px; }
  .messages { padding: 12px 12px 6px; }
  .msg-row { max-width: 92%; }
  .composer { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); }
  .trial-banner, .thread-tabs, .role-bar { padding-left: 12px; padding-right: 12px; }
  .msg-row .avatar { width: 28px; height: 28px; font-size: 0.72rem; }
}

/* ---------- Test bots ---------- */
.bot-row { display: grid; grid-template-columns: 64px 1fr; gap: 6px; }
.bot-row select { padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.bot-row #removeBotsBtn { grid-column: 1 / -1; }
.tag.bot { background: var(--surface-2); color: var(--text-2); text-transform: none; letter-spacing: 0; }

/* =========================================================
   Role themes: colors + screen-edge decorations
   ========================================================= */
.role-fx { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.role-fx.back { z-index: 0; }
.app { position: relative; z-index: 1; }
body[class*="fx-role-"] .chat,
body[class*="fx-role-"] .composer { background: transparent; }
.role-fx > * { pointer-events: none; }
.fx-edge { position: fixed; left: 0; right: 0; z-index: 2; }
.fx-top { top: 0; }
.fx-bottom { bottom: 0; }
body[class*="fx-role-"] .nav-item.selected,
body[class*="fx-role-"] .btn.on,
body[class*="fx-role-"] .thread-tab.on,
body[class*="fx-role-"] .btn-soft { color: var(--accent); }
body[class*="fx-role-"] .side-right { background: transparent; }

/* ---- Werewolf: red screen, fangs top and bottom, dripping blood ---- */
body.fx-role-werewolf { --fx-top: 22px; --fx-bottom: 22px; }
body:not(.night).fx-role-werewolf {
  --bg: #f3c9c9; --surface: #fff4f4; --surface-2: #f8dcdc; --surface-3: #f0c3c3; --border: #ebbaba;
  --accent: #c81e1e; --accent-2: #ef4444; --accent-soft: #fde0e0; --bubble: #fff4f4; --muted: #9a6464; --text-2: #6b3a3a;
}
body.night.fx-role-werewolf {
  --bg: #1e0506; --surface: #2b090b; --surface-2: #3b0f12; --surface-3: #4c161a; --border: #561a1f;
  --accent: #e5484d; --accent-2: #ff6b6b; --accent-soft: #4a1418; --bubble: #3b0f12; --muted: #b07a7d; --text-2: #e3b9bb;
}
.fangs {
  height: 30px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='30'%3E%3Crect width='56' height='9' fill='%235c0a0a'/%3E%3Cpath d='M0 7 Q8 36 16 7Z' fill='%23f5efe4'/%3E%3Cpath d='M16 7 Q22 20 28 7Z' fill='%23e9e0cf'/%3E%3Cpath d='M28 7 Q36 30 44 7Z' fill='%23f5efe4'/%3E%3Cpath d='M44 7 Q50 18 56 7Z' fill='%23e9e0cf'/%3E%3Cpath d='M6 22 Q8 30 9 24Z' fill='%23b3121f'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 56px 30px;
  filter: drop-shadow(0 4px 6px rgba(80, 0, 0, 0.45));
}
.fx-bottom.fangs { transform: scaleY(-1); }
.fx-vignette { position: fixed; inset: 0; animation: vignettePulse 5s ease-in-out infinite; will-change: opacity; }
.fx-role-werewolf .fx-vignette { background: radial-gradient(ellipse at center, transparent 55%, rgba(170, 0, 0, 0.42) 100%); }
.fx-role-serialkiller .fx-vignette { background: radial-gradient(ellipse at center, transparent 50%, rgba(40, 0, 0, 0.5) 100%); }
@keyframes vignettePulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
.drip {
  position: fixed; top: calc(var(--fx-top, 0px) + 2px); width: var(--w); height: var(--h); margin-left: calc(var(--w) / -2);
  background: linear-gradient(#6a0000, #c1121f); border-radius: 0 0 999px 999px; transform-origin: top;
  animation: dripGrow var(--t) ease-in-out var(--d) infinite; transform: scaleY(0.15); opacity: 0.9;
}
.drop {
  position: fixed; top: calc(var(--fx-top, 0px) + var(--h) - 4px); width: calc(var(--w) * 0.85); height: calc(var(--w) * 1.25);
  margin-left: calc(var(--w) * -0.425); background: #c1121f; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  opacity: 0; animation: dropFall var(--t) ease-in var(--d) infinite;
}
@keyframes dripGrow { 0% { transform: scaleY(0.15); } 45% { transform: scaleY(1); } 55% { transform: scaleY(1); } 100% { transform: scaleY(0.15); } }
@keyframes dropFall { 0%, 48% { opacity: 0; transform: translateY(0); } 52% { opacity: 0.95; transform: translateY(0); } 100% { opacity: 0; transform: translateY(80vh); } }

/* ---- Serial Killer: dark blood, splatters and slash marks ---- */
body.fx-role-serialkiller { --fx-top: 10px; --fx-bottom: 10px; }
body:not(.night).fx-role-serialkiller {
  --bg: #e6d6d4; --surface: #f8f1f0; --surface-2: #ede0de; --surface-3: #e0cdca; --border: #d9c3c0;
  --accent: #8b1d1d; --accent-2: #b91c1c; --accent-soft: #f2dcdc; --bubble: #f8f1f0; --muted: #85696a; --text-2: #5a3f40;
}
body.night.fx-role-serialkiller {
  --bg: #0e0405; --surface: #170808; --surface-2: #230c0d; --surface-3: #321113; --border: #3a1416;
  --accent: #b91c1c; --accent-2: #dc2626; --accent-soft: #3a1014; --bubble: #230c0d; --muted: #9a7173; --text-2: #d6b3b5;
}
.blood-bar { height: 10px; background: linear-gradient(180deg, #4a0006, #8a0b12); }
.fx-bottom.blood-bar { background: linear-gradient(0deg, #4a0006, #8a0b12); }
.splat { position: fixed; width: 220px; height: 220px; opacity: 0.5; }
.splat svg, .slashes svg { width: 100%; height: 100%; }
.slashes { position: fixed; width: 110px; height: 140px; opacity: 0.4; }

/* ---- Doctor: clean teal, red-cross border, heartbeat line, floating crosses ---- */
body.fx-role-doctor { --fx-top: 12px; --fx-bottom: 34px; }
body:not(.night).fx-role-doctor {
  --bg: #dff3ef; --surface: #fbfffe; --surface-2: #e4f3f0; --surface-3: #d2ebe6; --border: #c9e4df;
  --accent: #0d9488; --accent-2: #14b8a6; --accent-soft: #d3f2ee; --bubble: #fbfffe; --muted: #5f8783; --text-2: #345a56;
}
body.night.fx-role-doctor {
  --bg: #051b1a; --surface: #0a2726; --surface-2: #103432; --surface-3: #16413e; --border: #1a4542;
  --accent: #2dd4bf; --accent-2: #5eead4; --accent-soft: #134e4a; --bubble: #103432; --muted: #7fb0aa; --text-2: #b5dcd7;
}
.crosses {
  height: 12px; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M10 2h4v3h3v3h-3v3h-4v-3H7V5h3z' fill='%23e5484d'/%3E%3C/svg%3E");
  background-size: 24px 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.ecg { height: 34px; background: #062b28; overflow: hidden; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); }
.ecg-line {
  position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 160px); will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='34'%3E%3Cpolyline points='0,18 40,18 48,18 54,10 60,18 70,18 76,2 84,32 90,18 104,18 110,13 118,18 160,18' fill='none' stroke='%2334f5c5' stroke-opacity='0.35' stroke-width='6' stroke-linejoin='round'/%3E%3Cpolyline points='0,18 40,18 48,18 54,10 60,18 70,18 76,2 84,32 90,18 104,18 110,13 118,18 160,18' fill='none' stroke='%2334f5c5' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 160px 34px; animation: ecgScroll 2.4s linear infinite;
}
@keyframes ecgScroll { from { transform: translateX(0); } to { transform: translateX(-160px); } }
.fx-glow { position: fixed; inset: 0; background: radial-gradient(ellipse at center, transparent 60%, rgba(20, 184, 166, 0.16) 100%); }
.plus {
  position: fixed; bottom: -60px; color: var(--accent); font-weight: 800; opacity: 0; line-height: 1;
  animation: floatUp var(--t) linear var(--d) infinite;
}
@keyframes floatUp { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 0.35; } 85% { opacity: 0.3; } 100% { transform: translateY(-110vh) rotate(90deg); opacity: 0; } }

/* ---- Officer: navy, flashing police lights, caution tape ---- */
body.fx-role-officer { --fx-top: 16px; --fx-bottom: 28px; }
body:not(.night).fx-role-officer {
  --bg: #dce4f5; --surface: #f8faff; --surface-2: #e5ebf8; --surface-3: #d3ddf2; --border: #c9d4ec;
  --accent: #1d4ed8; --accent-2: #3b82f6; --accent-soft: #dbe6fd; --bubble: #f8faff; --muted: #64739a; --text-2: #34446e;
}
body.night.fx-role-officer {
  --bg: #050a1c; --surface: #0b132c; --surface-2: #121d3d; --surface-3: #19284f; --border: #1d2b57;
  --accent: #3b82f6; --accent-2: #60a5fa; --accent-soft: #1e2f5c; --bubble: #121d3d; --muted: #7d8bb3; --text-2: #b6c2e3;
}
.sirens { height: 16px; background: #0b1023; overflow: visible; }
.siren { position: absolute; top: 0; height: 16px; width: 50%; }
.siren.red { left: 0; background: linear-gradient(90deg, #ff2a2a, #ff2a2a00); animation: sirenA 1.1s steps(1) infinite; }
.siren.blue { right: 0; background: linear-gradient(270deg, #2a6bff, #2a6bff00); animation: sirenB 1.1s steps(1) infinite; }
.siren::after { content: ''; position: absolute; top: 0; width: 70%; height: 140px; opacity: 0.25; }
.siren.red::after { left: 0; background: radial-gradient(ellipse at top left, #ff2a2a, transparent 70%); }
.siren.blue::after { right: 0; background: radial-gradient(ellipse at top right, #2a6bff, transparent 70%); }
@keyframes sirenA { 0% { opacity: 1; } 50% { opacity: 0.15; } }
@keyframes sirenB { 0% { opacity: 0.15; } 50% { opacity: 1; } }
.fx-sirenglow { position: fixed; inset: 0; }
.fx-sirenglow::before, .fx-sirenglow::after { content: ''; position: absolute; top: 0; bottom: 0; width: 120px; will-change: opacity; }
.fx-sirenglow::before { left: 0; background: linear-gradient(90deg, rgba(255, 42, 42, 0.28), transparent); animation: sirenA 1.1s steps(1) infinite; }
.fx-sirenglow::after { right: 0; background: linear-gradient(270deg, rgba(42, 107, 255, 0.28), transparent); animation: sirenB 1.1s steps(1) infinite; }
.tape {
  height: 28px; background: #facc15; border-top: 3px solid #111; border-bottom: 3px solid #111; overflow: hidden;
  display: flex; align-items: center; box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2);
}
.tape-text { white-space: nowrap; font-weight: 900; font-size: 13px; letter-spacing: 0.12em; color: #111; animation: tapeScroll 40s linear infinite; }
@keyframes tapeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.badge-watermark { position: fixed; right: calc(var(--right-w) + 30px); bottom: 70px; width: 220px; height: 240px; opacity: 0.06; }
.badge-watermark svg { width: 100%; height: 100%; }

/* ---- Civilian: warm fields, village skyline, drifting clouds, fireflies at night ---- */
body.fx-role-civilian { --fx-bottom: 44px; }
body:not(.night).fx-role-civilian {
  --bg: #efe9d4; --surface: #fffdf5; --surface-2: #f2ecd8; --surface-3: #e7dfc4; --border: #e2d8b9;
  --accent: #4d7c0f; --accent-2: #65a30d; --accent-soft: #e8f2d3; --bubble: #fffdf5; --muted: #7d7659; --text-2: #4f4a34;
}
body.night.fx-role-civilian {
  --bg: #0d120a; --surface: #141b10; --surface-2: #1c2516; --surface-3: #26311e; --border: #2a3520;
  --accent: #84cc16; --accent-2: #a3e635; --accent-soft: #26331a; --bubble: #1c2516; --muted: #8c977c; --text-2: #c7d1b4;
}
.village {
  height: 44px; background-repeat: repeat-x; background-size: 240px 44px; background-position: bottom;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='44'%3E%3Cg fill='%233f5a1e'%3E%3Crect y='34' width='240' height='10'/%3E%3Cpath d='M10 34V20l12-10 12 10v14z'/%3E%3Cpath d='M44 34V24l9-8 9 8v10z'/%3E%3Ccircle cx='80' cy='22' r='9'/%3E%3Crect x='78' y='26' width='4' height='8'/%3E%3Cpath d='M98 34V16l16-12 16 12v18z'/%3E%3Crect x='124' y='6' width='4' height='8'/%3E%3Ccircle cx='150' cy='25' r='7'/%3E%3Ccircle cx='162' cy='21' r='9'/%3E%3Cpath d='M178 34V22l11-9 11 9v12z'/%3E%3Cpath d='M208 34V26l8-7 8 7v8z'/%3E%3C/g%3E%3Cg fill='%23f6d365'%3E%3Crect x='19' y='24' width='5' height='5'/%3E%3Crect x='110' y='20' width='6' height='6'/%3E%3Crect x='186' y='25' width='5' height='5'/%3E%3C/g%3E%3C/svg%3E");
}
body.night .village { filter: brightness(0.55) saturate(0.7); }
.cloud {
  position: fixed; left: -220px; width: 180px; height: 50px; border-radius: 999px; background: #fff; opacity: 0.55;
  transform: scale(var(--s)); animation: cloudDrift var(--t) linear var(--d) infinite;
  will-change: transform;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 80px; height: 80px; left: 28px; top: -40px; }
.cloud::after { width: 60px; height: 60px; left: 92px; top: -26px; }
@keyframes cloudDrift { from { transform: translateX(0) scale(var(--s)); } to { transform: translateX(calc(100vw + 440px)) scale(var(--s)); } }
body.night .cloud { display: none; }
.firefly { position: fixed; width: 5px; height: 5px; border-radius: 50%; background: #e9f97a; box-shadow: 0 0 10px 3px #e9f97a88; opacity: 0; animation: firefly var(--t) ease-in-out var(--d) infinite; }
body:not(.night) .firefly { display: none; }
@keyframes firefly { 0%, 100% { opacity: 0; transform: translate(0, 0); } 30% { opacity: 0.9; } 50% { transform: translate(18px, -24px); opacity: 0.5; } 70% { opacity: 0.9; } }

@media (max-width: 760px) {
  .splat { width: 140px; height: 140px; }
  
}

.wipe-note { margin: 10px 0 0; }
#wipeBox .btn { margin-top: 10px; }

/* ---------- Role pictures ---------- */
.role-img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; }
.avatar.has-role { background: transparent; padding: 0; }
.avatar.has-role img { width: 100%; height: 100%; border-radius: 50%; display: block; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.me-card .avatar.has-role { width: 44px; height: 44px; }
.modal-card .art.role { width: 210px; height: 210px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35)); }
.role-msg .art { width: 52px; height: 52px; }

/* Moving decorations get their own layer so the browser only moves them, not redraws them. */
.drip, .drop, .plus, .firefly, .tape-text, .siren { will-change: transform, opacity; }
.role-fx { contain: strict; }

/* ---------- Phase timer ---------- */
.phase-timer {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); flex-shrink: 0; white-space: nowrap;
}
.phase-timer .pt-label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.phase-timer .pt-time { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; min-width: 3.1em; text-align: right; }
@media (max-width: 760px) {
  .phase-timer { padding: 4px 9px; }
  .phase-timer .pt-label { display: none; }
  .phase-timer .pt-time { font-size: 0.9rem; min-width: 0; }
}
