:root {
  --accent: #ec4899;
  --accent-2: #db2777;
  --accent-soft: rgba(236, 72, 153, .14);
  --bg: #0f0d14;
  --panel: #17141e;
  --panel-2: #1f1b28;
  --line: #2a2534;
  --text: #f3eef7;
  --muted: #9a90a8;
  --bubble: #221d2c;
  --mine: #3a1a2f;
  --danger: #ef4444;
  --ok: #22c55e;
  --radius: 12px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f4f8;
  --panel: #ffffff;
  --panel-2: #f3eff5;
  --line: #e6e0ea;
  --text: #1d1724;
  --muted: #776d84;
  --bubble: #f3eff5;
  --mine: #fde7f2;
  --accent-soft: rgba(236, 72, 153, .1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
button { cursor: pointer; border: 0; background: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; }
.row.two { flex-wrap: wrap; align-items: flex-start; }
.row.two > * { flex: 1 1 140px; min-width: 0; }
.label { font-size: 14px; font-weight: 700; color: var(--text); }
.label .muted { font-weight: 400; }
.field { display: flex; flex-direction: column; gap: 6px; }
.error { color: var(--danger); font-size: 13px; min-height: 1em; }
.empty { color: var(--muted); padding: 10px 14px; }
.link { color: var(--accent); font-weight: 600; padding: 2px 4px; }
.link:hover { text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: background .15s, transform .05s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.icon { padding: 7px; width: 36px; height: 36px; }
.btn.sm { padding: 5px 12px; }
.btn.danger { color: var(--danger); }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 400; }
.pills button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pills.tiny button { padding: 4px 10px; font-size: 12px; }

.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text); }
.check a { color: var(--accent); font-weight: 600; }
.check input { width: 18px; height: 18px; flex: none; }
.check input { width: auto; margin-top: 2px; accent-color: var(--accent); }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand .brand-name { background: linear-gradient(90deg, var(--accent), #f472b6 60%, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand.big { font-size: 28px; }
/* Small, muted chat-bubble mark; dots are cut out by drawing them in the page background colour. */
.logo { display: inline-flex; width: .95em; height: .95em; color: #38bdf8; opacity: .8; flex: none; }
.logo svg { width: 100%; height: 100%; fill: currentColor; }
.logo svg circle { fill: var(--panel); }
.welcome-logo { width: 44px; height: 44px; margin: 0 auto 6px; }
.legal .logo svg circle { fill: var(--bg); }

/* Avatars & flags */
.av { --s: 36px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-weight: 700; color: #fff; font-size: calc(var(--s) * .42); background: var(--c, var(--accent)); overflow: hidden; position: relative; user-select: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { --s: 28px; }
.av.lg { --s: 64px; }
.av.xl { --s: 84px; }
.av.on::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }
.flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; flex: none; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.g { font-size: 12px; font-weight: 700; }

/* Login */
.screen { height: 100%; }
#login { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; overflow: auto; padding: 20px 16px; background: radial-gradient(1000px 500px at 50% -10%, var(--accent-soft), transparent); }
#login.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.avatar-pick { display: flex; align-items: center; gap: 14px; }
.avatar-drop { position: relative; cursor: pointer; }
.avatar-drop .cam { position: absolute; right: -2px; bottom: -2px; background: var(--accent); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; border: 3px solid var(--panel); }
.select-flag { position: relative; }
.select-flag img { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 15px; border-radius: 2px; pointer-events: none; }
.select-flag select { padding-left: 40px; }

/* App layout */
/* dvh = the visible height on phones (excludes the browser bar / keyboard). minmax(0,1fr) stops long text widening the page. */
.screen { height: 100vh; height: 100dvh; }
#app { display: grid; grid-template-columns: 270px minmax(0, 1fr) 250px; }
#side, #members { background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
#side { border-right: 1px solid var(--line); }
#members { border-left: 1px solid var(--line); }
.side-head, .chat-head, .mem-head { height: 60px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.side-scroll { flex: 1; overflow-y: auto; padding-bottom: 10px; }
.sec-title { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 6px; border-radius: 10px; cursor: pointer; position: relative; }
.item:hover { background: var(--panel-2); }
.item.active { background: var(--accent-soft); }
.item.active::before { content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.item .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; font-size: 17px; flex: none; }
.item .meta { flex: 1; min-width: 0; }
.item .t { font-weight: 600; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.off .t { opacity: .55; }
.badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.item .x { opacity: 0; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.item:hover .x { opacity: 1; }
.item .x:hover { background: var(--line); color: var(--text); }
.tag18 { font-size: 10px; font-weight: 800; color: var(--danger); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }

.me { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.me:hover { background: var(--panel-2); }
.me .meta { flex: 1; min-width: 0; }

/* Main chat */
#main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.chat-title .meta { min-width: 0; }
.chat-title b { font-size: 16px; display: flex; gap: 6px; align-items: center; }
.chat-title .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-actions { display: flex; gap: 6px; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 16px 6px; overscroll-behavior: contain; }
.m { display: flex; gap: 10px; padding: 3px 6px; border-radius: 10px; position: relative; content-visibility: auto; contain-intrinsic-size: 0 48px; }
.m:hover { background: var(--accent-soft); }
.m.cont { padding-top: 0; }
.m.cont .av { visibility: hidden; height: 0; }
.m .body { min-width: 0; flex: 1; }
.m .who { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.m .who b { cursor: pointer; }
.m .who time { color: var(--muted); font-size: 11px; }
.m .txt { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.m.mention { background: rgba(250, 204, 21, .09); box-shadow: inset 3px 0 0 #facc15; }
.m .img { max-width: min(320px, 100%); max-height: 320px; border-radius: 10px; margin-top: 4px; cursor: zoom-in; display: block; }
.m audio { margin-top: 4px; height: 36px; max-width: 100%; }
.m .quote { font-size: 12px; color: var(--muted); border-left: 3px solid var(--accent); padding: 2px 8px; margin: 2px 0 4px; background: var(--panel-2); border-radius: 0 6px 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m .reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.m .reacts button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.m .reacts button.mine { border-color: var(--accent); background: var(--accent-soft); }
.m .hov { position: absolute; right: 8px; top: -14px; display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.m:hover .hov { display: flex; }
.m .hov button { padding: 3px 6px; border-radius: 6px; }
.m .hov button:hover { background: var(--panel-2); }
.m.sys { display: block; color: var(--muted); font-size: 12px; padding: 1px 6px 1px 52px; }
.msgs.pm .m.sys { max-width: none; }
.m.sys:hover { background: none; }
.m.sys.warn { color: #fca5a5; font-weight: 600; background: rgba(239, 68, 68, .1); border-left: 3px solid var(--danger); border-radius: 6px; margin: 2px 0; padding-top: 4px; padding-bottom: 4px; }
[data-theme="light"] .m.sys.warn { color: #b91c1c; }
.m.sys.warn.mention { box-shadow: none; background: rgba(239, 68, 68, .2); }
.at { color: var(--accent); font-weight: 700; }
.at.self { background: #facc15; color: #1d1724; border-radius: 4px; padding: 0 4px; }
.m.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: rgba(250, 204, 21, .35); } 100% { background: transparent; } }
.badge.at-badge { background: #facc15; color: #1d1724; }
.mention-pop { display: flex; flex-direction: column; grid-template-columns: none; width: 260px; padding: 4px; gap: 0; }
.mention-pop button { display: flex; align-items: center; gap: 8px; font-size: 14px; text-align: left; padding: 6px 8px; }
.mention-pop button.on { background: var(--accent-soft); }
.day { text-align: center; color: var(--muted); font-size: 11px; margin: 10px 0; }

/* PM bubbles */
.msgs.pm .m { max-width: 78%; }
.msgs.pm .m.mine { margin-left: auto; flex-direction: row-reverse; }
.msgs.pm .m .body { background: var(--bubble); padding: 7px 11px; border-radius: 14px; }
.msgs.pm .m.mine .body { background: var(--mine); }
.msgs.pm .m:hover { background: none; }

.typing { height: 20px; padding: 0 22px; font-size: 12px; color: var(--muted); font-style: italic; flex: none; }
.reply-bar, .rec-bar { display: flex; align-items: center; gap: 10px; margin: 0 14px; padding: 8px 12px; background: var(--panel-2); border-radius: 10px 10px 0 0; font-size: 13px; }
.reply-bar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rec-bar { justify-content: flex-start; }
.rec-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.rec-bar .link { margin-left: auto; }
@keyframes pulse { 50% { opacity: .3; } }

.composer { flex: none; display: flex; align-items: flex-end; gap: 4px; margin: 0 14px 14px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; position: relative; }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { border: 0; background: transparent; resize: none; max-height: 140px; padding: 8px 6px; }
.tool { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; cursor: pointer; flex: none; }
.tool:hover { background: var(--panel-2); }
.tool.rec { background: var(--danger); }
.send { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 16px; flex: none; }
.send:hover { background: var(--accent-2); }
.pop { position: absolute; bottom: 54px; left: 0; width: 300px; max-width: 90vw; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.35); z-index: 5; }
.pop button { font-size: 20px; padding: 4px; border-radius: 6px; }
.pop button:hover { background: var(--panel-2); }

/* Members */
.mem-tools { padding: 10px 10px 4px; display: flex; flex-direction: column; gap: 8px; }
.mem-tools input { padding: 8px 10px; }
.mem-tools .row input { flex: 1; }
.mem-tools select { flex: none; width: 92px; padding: 8px 6px; font-size: 12px; }
.modal.lock { z-index: 65; background: rgba(0,0,0,.75); backdrop-filter: blur(3px); }
.block-card { align-items: center; text-align: center; max-width: 340px; }
.block-card h2 { margin: 0; }
.block-ring { width: 84px; height: 84px; border-radius: 50%; border: 5px solid var(--danger); display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--danger); }
.mem-list { flex: 1; overflow-y: auto; padding: 4px 0 10px; }
.mem-list .item { padding: 6px 8px; }
.mem-list .sec-title { padding: 10px 12px 4px; }
input:disabled, .pills button:disabled { opacity: .55; cursor: not-allowed; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.modal .card { width: 100%; max-width: 420px; max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.modal .card.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 18px; }
@keyframes fade { from { opacity: 0; } }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.room-card { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); text-align: left; }
.room-card:hover { border-color: var(--accent); }
.room-card .ico { font-size: 22px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--panel); border-radius: 10px; flex: none; }
.room-card .meta { flex: 1; min-width: 0; }
.room-card .t { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.room-card .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .n { font-size: 12px; color: var(--ok); font-weight: 700; white-space: nowrap; }
.room-card.joined { border-color: var(--accent); }
/* Silhouettes: dark shadow figures with a pink rim glow, framing the start page and room picker */
.sil-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sil-wrap { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sil { position: absolute; bottom: 0; height: min(94vh, 860px); width: auto; fill: url(#silGrad);
  filter: drop-shadow(0 0 1.5px rgba(244, 114, 182, .9)) drop-shadow(0 0 22px rgba(236, 72, 153, .45)); }
.sil.left { left: max(0px, calc(50% - 660px)); }
.sil.right { right: max(0px, calc(50% - 660px)); transform: scaleX(-1); }
[data-theme="light"] .sil { opacity: .8; }
#login.overlay .sil-wrap { display: none; }
.login-card, .picker-wrap { position: relative; z-index: 1; }
#picker .sil { height: min(80vh, 720px); }
#picker .sil.left { left: 0; }
#picker .sil.right { right: 0; }
@media (max-width: 1050px) { .sil-wrap { display: none; } }
@media (max-width: 1400px) { #picker .sil-wrap { display: none; } }
#picker { overflow-y: auto; background: radial-gradient(1000px 500px at 50% -10%, var(--accent-soft), transparent); }
.picker-wrap { max-width: 900px; margin: 0 auto; padding: 28px 16px; display: flex; flex-direction: column; gap: 14px; }
.picker-wrap .room-card { cursor: pointer; padding: 14px; }
.icon-in { width: 56px; text-align: center; font-size: 18px; }
.profile-card { align-items: center; text-align: center; }
.profile-card .row { width: 100%; }
.profile-card .row .btn { flex: 1; }


.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.9); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 8px; }
.toast.warn { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, var(--panel)); }
#toasts { position: fixed; top: 14px; right: 14px; z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); max-width: 320px; cursor: pointer; animation: fade .15s; }

.mob { display: none; }
#scrim { display: none; }

@media (max-width: 1100px) {
  #app { grid-template-columns: 250px minmax(0, 1fr); }
  #members { position: fixed; right: 0; top: 0; bottom: 0; width: 280px; z-index: 30; transform: translateX(100%); transition: transform .2s; }
  #app.show-mem #members { transform: none; }
  #members .mob { display: inline-flex; }
  #app.show-mem #scrim { display: block; }
}
@media (max-width: 760px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  #side { position: fixed; left: 0; top: 0; bottom: 0; width: 300px; max-width: 86vw; z-index: 30; transform: translateX(-100%); transition: transform .22s ease; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  #members { width: 300px; max-width: 86vw; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  #app.show-side #side { transform: none; box-shadow: 10px 0 40px rgba(0,0,0,.4); }
  #app.show-side #scrim { display: block; }
  .chat-head { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; gap: 8px; }
  .chat-head .mob { display: inline-flex; }
  .chat-title .ico, .chat-title .av { --s: 34px; }
  .chat-title b { font-size: 15px; }
  .msgs { padding: 10px 6px 4px; }
  .m { gap: 8px; padding: 3px 4px; }
  .m .img { max-width: 100%; }
  .m.sys { padding-left: 46px; }
  .composer { margin: 0 6px calc(6px + env(safe-area-inset-bottom)); padding: 4px; border-radius: 22px; }
  .tool { width: 38px; height: 38px; }
  .send { width: 40px; height: 40px; border-radius: 50%; }
  .msgs.pm .m { max-width: 88%; }
  .reply-bar, .rec-bar { margin: 0 6px; }
  /* 16px stops iPhone Safari zooming in when a field is tapped */
  input, select, textarea { font-size: 16px; }
  .item { padding: 10px; }
  .btn.icon { width: 40px; height: 40px; }
  .card { padding: 18px 16px; border-radius: 16px; }
  #login { padding: 12px; align-items: start; }
  .login-card { gap: 12px; }
  .login-card .pills { gap: 5px; }
  .login-card .pills button { padding: 7px 9px; font-size: 13px; }
  .brand.big { font-size: 24px; }
  .avatar-pick .av.xl { --s: 72px; }
  .modal { padding: 10px; align-items: end; }
  .modal .card { max-height: 88dvh; border-radius: 18px; }
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .picker-wrap { padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom)); }
  #toasts { left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); }
  .toast { max-width: none; }
  .pop { left: 0; right: 0; width: auto; max-width: none; }
}

/* Touch screens: no hover, so tap a message to show its reactions/reply bar. */
@media (hover: none) {
  .m:hover { background: none; }
  .m:hover .hov { display: none; }
  .m.show-hov { background: var(--accent-soft); }
  .m.show-hov .hov { display: flex; }
  .m .hov { top: auto; bottom: 100%; right: 4px; }
  .m .hov button { padding: 6px 8px; font-size: 18px; }
  .item .x { opacity: .6; padding: 6px 8px; }
}

/* Unread count on the ☰ button so phone users notice new messages in other chats */
.mob[data-n]::after { content: attr(data-n); position: absolute; top: -4px; right: -4px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 5px; min-width: 16px; text-align: center; }
#sideToggle { position: relative; }
#scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 25; }

/* Terms / Privacy pages */
body.legal-page { overflow: auto; height: auto; min-height: 100%; }
.legal { max-width: 760px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 18px calc(48px + env(safe-area-inset-bottom)); line-height: 1.65; font-size: 15px; }
.legal .brand { text-decoration: none; color: inherit; display: inline-flex; }
.legal h1 { font-size: 28px; margin: 14px 0 2px; }
.legal h2 { font-size: 18px; margin: 28px 0 6px; color: var(--accent); }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal a { color: var(--accent); }
.legal .table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 600; }
.legal-foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Start page "about" section below the form (for visitors and search engines) */
#login:not(.overlay) { grid-template-rows: minmax(calc(100dvh - 40px), auto) auto; }
.seo { position: relative; z-index: 1; width: 100%; max-width: 760px; margin: 28px 0 24px; padding: 22px 22px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.65; color: var(--muted); }
.seo h1 { font-size: 22px; margin: 0 0 8px; color: var(--text); }
.seo h2 { font-size: 17px; margin: 22px 0 6px; color: var(--text); }
.seo h3 { font-size: 15px; margin: 14px 0 2px; color: var(--text); }
.seo p { margin: 0 0 10px; }
.seo a { color: var(--accent); }
.seo-rooms { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seo-rooms a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
#login.overlay .seo { display: none; }
.legal .cta { display: inline-block; text-decoration: none; color: #fff; margin: 8px 0; }
@media (max-width: 760px) {
  #login:not(.overlay) { grid-template-rows: auto auto; }
  .seo { padding: 16px 16px 4px; margin-top: 20px; }
}
.legal .post-list { list-style: none; padding: 0; }
.post-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-card a { text-decoration: none; font-size: 17px; }
.post-card p { margin: 4px 0 0; }
