:root {
  color-scheme: dark;
  --bg: #12100e;
  --bg-side: #18150f;
  --bg-raise: #221e18;
  --ink: #f6f1e7;
  --muted: #b6ab9e;
  --faint: #7d7468;
  --line: rgba(246, 236, 220, 0.1);
  --amber: #f0a35e;
  --amber-deep: #c47a32;
  --paper: #f4ecdf;
  --paper-ink: #241c14;
  --danger: #e38b7a;
  --good: #8fce7a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --kb: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at -10% -20%, rgba(240, 163, 94, 0.18), transparent 55%),
    radial-gradient(900px 540px at 110% -10%, rgba(176, 72, 48, 0.16), transparent 50%),
    radial-gradient(800px 480px at 50% 120%, rgba(88, 122, 78, 0.1), transparent 46%),
    var(--bg);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--amber); color: #1a1208; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
[hidden] { display: none !important; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}
button.mark {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
button.mark:hover { color: var(--amber); }
.support { color: var(--muted); }
.support a, .welcome a { color: var(--amber); }

#gate {
  min-height: 100dvh;
  display: grid;
  align-items: center;
  gap: 36px;
  padding: 32px 22px 48px;
  max-width: 1080px;
  margin: 0 auto;
}

.gate-copy h1 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3rem, 8vw, 5.6rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}
.facts li {
  padding-left: 16px;
  border-left: 2px solid rgba(240, 163, 94, 0.7);
  color: var(--muted);
  line-height: 1.4;
}

.gate-card, .create, .me-card, .sheet-card {
  background: rgba(28, 24, 19, 0.88);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.gate-card {
  padding: 26px 22px 22px;
  display: grid;
  gap: 8px;
}
.gate-card label, .create-title {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.gate-card label span, .fine, .sort-note, .hint {
  color: var(--faint);
  font-weight: 400;
}
.gate-card input, .gate-card textarea, .create input, .search input, .composer textarea, .sheet-card textarea, .sheet-card input {
  width: 100%;
  border: 1px solid transparent;
  background: #100e0c;
  border-radius: 16px;
  padding: 14px 14px;
}
.gate-card input { font-size: 1.25rem; }
.gate-card textarea { resize: vertical; min-height: 84px; }
.counter { margin: 0; text-align: right; color: var(--faint); font-size: 0.82rem; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 4px;
  line-height: 1.35;
}
.check input { width: 1.15rem; height: 1.15rem; margin-top: 2px; accent-color: var(--amber); }
.fine { font-size: 0.82rem; line-height: 1.45; margin: 4px 0 0; }
.fine a, .rules-link { color: var(--amber); }
.rules-link { font-size: 0.92rem; }
.form-error { color: var(--danger); margin: 0; min-height: 0; }

.primary, .send, .text-btn, .ghost, .icon-btn {
  border: 0;
  background: transparent;
}
.primary {
  background: var(--amber);
  color: #1a1208;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 18px;
  margin-top: 6px;
}
.primary:disabled { opacity: 0.55; cursor: wait; }

#app {
  height: calc(100dvh - var(--kb));
  min-height: 0;
  overflow: hidden;
}

#sidebar {
  background: rgba(18, 16, 12, 0.96);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  gap: 12px;
}
.side-head, .top, .me-row, .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.me-card { padding: 14px; border-radius: 22px; box-shadow: none; display: grid; gap: 8px; }
.me-card h2 { margin: 0; font-size: 1.2rem; font-family: var(--serif); font-weight: 560; }
.me-card textarea { min-height: 72px; resize: vertical; }
.me-actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ghost, .text-btn {
  border-radius: 999px;
  padding: 8px 12px;
  background: #2a241c;
  color: var(--ink);
}
.text-btn { font-weight: 650; }
.text-btn .badge, .count-zero { color: var(--faint); }
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  height: 1.2rem;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1208;
  font-size: 0.75rem;
  font-weight: 700;
}

.search input { background: #100e0c; }
.sort-note { margin: -4px 4px 0; font-size: 0.78rem; }
.chan-scroll {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}
.create, .me-card, .side-head, .search, .sort-note { flex: 0 0 auto; }
.chan {
  text-align: left;
  border: 0;
  width: 100%;
  color: inherit;
  background: transparent;
  border-radius: 16px;
  padding: 10px 10px 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: center;
}
.chan > span:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chan:hover { background: rgba(246, 236, 220, 0.04); }
.chan.is-on { background: rgba(240, 163, 94, 0.12); box-shadow: inset 3px 0 0 var(--amber); }
.chan .name {
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chan .blurb, .chan .when { color: var(--faint); font-size: 0.82rem; line-height: 1.3; }
.chan .blurb {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(143, 206, 122, 0.7);
  animation: pulse 1.8s infinite;
}
.count {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 560;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.count small { display: block; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--faint); font-weight: 600; }
.count.is-zero { color: #a39888; font-size: 1.2rem; }
.count:not(.is-zero) { color: #ffd7a8; }
.create { padding: 12px; display: grid; gap: 8px; box-shadow: none; border-radius: 22px; }
.create-title { margin: 0; }

#main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.top { padding: 12px 12px 0; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.top-actions { display: flex; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.room-meta { min-width: 0; flex: 1 1 12rem; }
.room-meta h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-meta p { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
.ttl { color: var(--faint) !important; }
.ttl.warn { color: var(--amber) !important; }
.faces { display: flex; align-items: center; margin-top: 6px; }
.faces i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #12100e;
  margin-left: -3px;
  display: block;
}
.faces i:first-child { margin-left: 0; }
.hidden-note {
  margin: 8px 12px 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(227, 139, 122, 0.12);
  color: #f0c2b8;
  font-size: 0.88rem;
}

.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px 12px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--bg));
}
.chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  border: 1px solid var(--line);
  background: #241f19;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 10px 8px 12px;
}
.chip.is-on { background: var(--paper); color: var(--paper-ink); }
.chip .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.chip .n {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  background: rgba(240, 163, 94, 0.18);
  color: #ffd7a8;
  border-radius: 999px;
  min-width: 1.4rem;
  text-align: center;
  padding: 1px 6px;
}
.chip.is-on .n { background: #241c14; color: var(--paper); }
.chip .n[data-n="0"] { display: none; }

.log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 14px 16px;
}
.welcome { margin: auto; max-width: 36rem; padding: 12px; }
.welcome h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 12px;
}
.welcome p { color: var(--muted); line-height: 1.5; }
.msg { display: flex; flex-direction: column; max-width: min(78%, 460px); margin: 2px 0; }
.msg.mine { align-self: flex-start; align-items: flex-start; }
.msg.theirs { align-self: flex-end; align-items: flex-end; }
.who {
  background: none;
  border: 0;
  padding: 0 2px 3px;
  font-weight: 700;
  font-size: 0.82rem;
}
.bubble {
  padding: 10px 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}
.mine .bubble {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 18px 18px 18px 7px;
  box-shadow: inset 3px 0 0 var(--user, var(--amber));
}
.theirs .bubble {
  background: color-mix(in srgb, var(--user) 38%, #2a241c);
  color: #f7f1e8;
  border-radius: 18px 18px 7px 18px;
}
.bubble a { color: inherit; }
.meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; padding: 0 4px; }
.time { color: var(--faint); font-size: 0.72rem; }
.erase {
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 0.78rem;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.erase.is-armed { color: var(--danger); font-weight: 700; text-decoration: none; }
.erase:disabled { opacity: 0.5; }
.empty-log { color: var(--faint); margin: auto; text-align: center; max-width: 18rem; line-height: 1.45; }

.quote {
  display: grid;
  gap: 1px;
  width: 100%;
  margin: 0 0 8px;
  padding: 0 0 0 8px;
  border: 0;
  border-left: 2px solid currentColor;
  background: transparent;
  text-align: left;
  color: inherit;
  opacity: 0.82;
  font-size: 0.8rem;
}
.quote b { font-size: 0.74rem; }
.quote span, .replying p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg.is-target .bubble { outline: 2px solid var(--amber); outline-offset: 2px; }
.reacts { display: flex; gap: 4px; margin-top: 4px; }
.react, .quiet {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 0.78rem;
  padding: 4px 7px;
  border-radius: 999px;
}
.react.is-on { background: rgba(240, 163, 94, 0.18); color: var(--ink); }
.typing {
  margin: 0;
  min-height: 0;
  padding: 0 18px 4px;
  color: var(--faint);
  font-size: 0.82rem;
}
.composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
}
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--amber);
  background: #241f1a;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}
.replying p { margin: 0; }
.composer textarea {
  flex: 1;
  min-width: 0;
  width: auto;
  resize: none;
  max-height: 140px;
  border-radius: 22px;
  background: #241f1a;
  border: 1px solid var(--line);
  padding: 12px 14px;
}
.send {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1208;
  display: grid;
  place-items: center;
}
.send svg { width: 22px; height: 22px; }
.send:disabled { opacity: 0.45; }

.invite {
  margin: 0 12px 8px;
  padding: 12px;
  border-radius: 18px;
  background: var(--bg-raise);
  display: grid;
  gap: 8px;
}
.invite p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.invite input {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #2a241c;
}

.jump {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  border: 0;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #2a241c;
  display: grid;
  place-items: center;
}
.icon-btn span, .icon-btn span::before, .icon-btn span::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  position: relative;
  border-radius: 2px;
}
.icon-btn span::before, .icon-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}
.icon-btn span::before { top: -5px; }
.icon-btn span::after { top: 5px; }

#backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 20; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 7, 6, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-card {
  width: min(460px, 100%);
  max-height: min(86dvh, 760px);
  overflow: auto;
  border-radius: 28px 28px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
}
.sheet-card h3 { font-family: var(--serif); font-weight: 560; font-size: 1.8rem; margin: 0; }
.person, .thread-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; }
.person b, .thread-btn b { display: block; }
.person span, .thread-btn span { color: var(--muted); font-size: 0.88rem; }
.bio-block { white-space: pre-wrap; line-height: 1.45; color: var(--ink); }
.dm-log { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.danger { background: transparent; color: var(--danger); border: 0; padding: 8px 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--paper);
  color: var(--paper-ink);
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 50;
  max-width: min(92vw, 420px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 959px) {
  #app { display: block; }
  #main { height: 100%; }
  #sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(90vw, 380px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    border-right: 1px solid var(--line);
  }
  #app.show-menu #sidebar { transform: none; }
  .desktop-only { display: none !important; }
}
@media (min-width: 960px) {
  #gate { grid-template-columns: 1.2fr 0.8fr; padding: 48px; }
  #app { display: grid; grid-template-columns: 360px minmax(0, 1fr); }
  #sidebar {
    position: static;
    border-right: 1px solid var(--line);
    height: calc(100dvh - var(--kb));
  }
  .mobile-only { display: none !important; }
  .sheet { justify-content: flex-end; align-items: stretch; }
  .sheet-card { width: min(420px, 100%); max-height: none; height: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(143, 206, 122, 0); }
}

.rules { max-width: 720px; margin: 0 auto; padding: 32px 18px 72px; }
.rules .mark a { color: inherit; text-decoration: none; }
.rules h1 { margin: 8px 0 6px; font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
.rules h2 { margin: 28px 0 8px; font-size: 1.15rem; }
.rules .lede, .rules li, .rules p { color: var(--muted); line-height: 1.5; }
.rules a { color: var(--amber); }
.rules ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 8px; }

.admin { max-width: 980px; margin: 0 auto; padding: 32px 18px 72px; }
.admin h1 { margin: 8px 0 6px; font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
.admin .lede { max-width: 62ch; color: var(--muted); }
.admin-login { max-width: 420px; margin-top: 22px; }
.admin-meter { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.admin-meter article {
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bg-raise);
}
.admin-meter strong { display: block; font-size: 1.25rem; }
.admin-meter span, .admin-note { color: var(--muted); font-size: 0.92rem; }
.admin-note { max-width: 68ch; }
.admin-grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-rooms, .admin-detail {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(18, 16, 12, 0.72);
}
.admin-room, .admin-line {
  text-align: left;
  border: 0;
  border-radius: 16px;
  padding: 10px 12px;
  background: #2a241c;
}
.admin-room.is-on { outline: 2px solid var(--amber); }
.admin-room small, .admin-line small { display: block; color: var(--faint); }
.admin-line.is-hidden { opacity: 0.62; }
.admin-rename { display: flex; gap: 8px; }
.admin-rename input { flex: 1; border: 0; border-radius: 999px; padding: 10px 14px; background: #2a241c; }
.admin-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
@media (max-width: 800px) {
  .admin-grid { grid-template-columns: 1fr; }
}

.me-head { display: flex; align-items: center; gap: 10px; }
.setting { display: grid; gap: 6px; }
.segment { display: flex; flex-wrap: wrap; gap: 4px; }
.segment button {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: #100e0c;
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
}
.segment button.is-on { background: var(--amber); color: #241c14; font-weight: 650; }
.segment-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.avatar.is-quiet { box-shadow: 0 0 0 2px #9a9186; }
.quiet-mark {
  margin-left: 6px;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.people-find {
  width: 100%;
  margin: 4px 0 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: #100e0c;
  color: inherit;
  font: inherit;
}
.avatar { display: block; border-radius: 50%; object-fit: cover; background: #2a211c; flex: 0 0 auto; }
.who { display: inline-flex; align-items: center; gap: 6px; }
.faces .avatar { margin-left: -6px; box-shadow: 0 0 0 2px #12100e; }
.faces .avatar:first-child { margin-left: 0; }
.person { grid-template-columns: 36px minmax(0, 1fr); align-items: center; }
.sheet-head h3 { flex: 1; }
.chan-section {
  margin: 12px 4px 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.avatar-pick { border: 0; margin: 4px 0 0; padding: 0; }
.avatar-pick legend { font-weight: 650; padding: 0; }
.avatar-mode { display: flex; gap: 14px; margin: 8px 0; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.avatar-choice, .swatch, .hat {
  border: 2px solid transparent;
  background: #100e0c;
  color: inherit;
  border-radius: 999px;
  padding: 3px;
}
.hat { padding: 6px 10px; font: inherit; font-size: 0.82rem; }
.swatch { width: 28px; height: 28px; padding: 0; }
.avatar-choice.is-on, .swatch.is-on, .hat.is-on { border-color: var(--amber); }
.avatar-preview { margin: 8px 0; }
.file-label { display: inline-block; margin-bottom: 6px; }
#avatar-file { max-width: 100%; }
.prompts { margin: 0 12px 8px; color: var(--muted); }
.prompts summary { cursor: pointer; color: var(--amber); font-weight: 650; }
.prompts ol { margin: 8px 0 0; padding-left: 1.2rem; display: grid; gap: 4px; }
.prompts button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 2px 0;
}
.prompts button.is-on { color: var(--ink); font-weight: 650; }
.admin-spam { display: grid; gap: 8px; margin: 8px 0 16px; }
.admin-spam h2 { font-family: var(--serif); font-size: 1.4rem; margin: 0; }
.admin-spam article { padding: 10px 12px; border-radius: 16px; background: #2a241c; }
.admin-spam small, .admin-spam p { display: block; color: var(--muted); margin: 2px 0 0; }

.me-head { display: flex; align-items: center; gap: 8px; }
.me-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.me-toggle h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-caret { margin-left: auto; color: var(--faint); font-size: 0.85rem; }
.pm-switch {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #fff;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.pm-switch.is-on { background: #2f9e44; }
.pm-switch.is-off { background: #d64545; }
.pm-switch .pm-word { position: absolute; top: 7px; line-height: 1; }
.pm-switch.is-on .pm-word { left: 9px; }
.pm-switch.is-off .pm-word { right: 8px; }
.pm-knob {
  position: absolute;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.pm-switch.is-on .pm-knob { right: 3px; }
.pm-switch.is-off .pm-knob { left: 3px; }
.pm-pip {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  vertical-align: middle;
}
.pm-pip.is-on { background: #2f9e44; }
.pm-pip.is-off { background: #d64545; }
.invite-person { display: flex; gap: 8px; align-items: center; }
.invite-person input { flex: 1; min-width: 0; }
.create .hint { margin: 0; }
.poll { display: grid; gap: 6px; margin-top: 8px; }
.poll-opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  padding: 8px 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.poll-opt.is-mine { outline: 2px solid var(--amber); }
.poll-opt:disabled { cursor: default; opacity: 0.9; }
.poll-note { margin: 2px 2px 0; font-size: 0.78rem; color: var(--faint); }
.poll-box { display: grid; gap: 6px; }
.poll-toggle.is-on { color: #1a1208; background: var(--amber); }
.locked-note { margin: 0 16px 14px; color: var(--muted); }
