/* Sign-in, account and legal pages. Builds on styles.css (same tokens and components). */

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--topbar-h); padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.page-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; }
.page-brand > span:not(.pb-word) { font-size: 1.5rem; }
.page-main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 28px 16px 48px; }
.page-main.narrow { max-width: 440px; }
.page-foot { padding: 18px 16px 28px; text-align: center; font-size: 0.8rem; color: var(--muted); }
.page-foot a { color: var(--text-2); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel h1 { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 4px; }
.panel h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.panel .lede { color: var(--text-2); font-size: 0.92rem; margin-bottom: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row > .grow { flex: 1 1 200px; min-width: 0; }

.provider-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px;
  border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface-2);
  font-weight: 700; text-decoration: none; color: var(--text);
}
.provider-btn:hover { background: var(--surface-3); }
.provider-btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.provider-btn .logo { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8rem; margin: 6px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--border-strong); background: var(--bg); outline: none;
}
.input:focus { border-color: var(--brand); }
.input-at { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--bg); padding-left: 12px; }
.input-at:focus-within { border-color: var(--brand); }
.input-at span { color: var(--muted); font-weight: 700; }
.input-at .input { border: 0; padding-left: 4px; height: 42px; }
.label { font-size: 0.82rem; font-weight: 700; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.hint { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.hint.err { color: var(--danger); }
.hint.ok { color: var(--ok); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.check a { color: var(--text); }

.alert { padding: 10px 14px; border-radius: var(--r); font-size: 0.88rem; background: var(--surface-2); border: 1px solid var(--border-strong); }
.alert.err { background: var(--danger-soft); border-color: rgba(255, 77, 106, 0.4); }
.alert.ok { background: var(--ok-soft); border-color: rgba(61, 220, 151, 0.35); }
.alert.warn { background: var(--warn-soft); border-color: rgba(255, 181, 71, 0.4); }
/* A notice at the top of a page keeps the same 16px gap as between panels from whatever follows it */
.alert:not(.hidden) + * { margin-top: 16px; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1 1 200px; min-width: 0; }
.list-row strong { display: block; }
.list-row small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }

.avatar-big { width: 88px; height: 88px; border-radius: 50%; background: var(--av, var(--brand)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.6rem; overflow: hidden; flex-shrink: 0; }
.avatar-big img { width: 100%; height: 100%; object-fit: cover; }

.danger-zone { border-color: rgba(255, 77, 106, 0.35); }
.radio { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--text-2); }
.radio input { margin-top: 3px; accent-color: var(--danger); }

.code-box { font-family: var(--mono); font-size: 1.4rem; letter-spacing: 0.12em; padding: 10px 16px; border-radius: var(--r); background: var(--surface-3); display: inline-block; }

/* Legal documents */
.legal { line-height: 1.65; }
.legal h1 { font-size: 1.8rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 6px; }
.legal h2 { font-size: 1.15rem; font-weight: 800; margin: 28px 0 8px; }
.legal h3 { font-size: 1rem; font-weight: 800; margin: 18px 0 6px; }
.legal p, .legal li { color: var(--text-2); font-size: 0.95rem; }
.legal p + p { margin-top: 10px; }
.legal ol, .legal ul { padding-left: 22px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.legal ol { list-style: decimal; }
.legal ul { list-style: disc; }
.legal strong { color: var(--text); }
.legal .meta { color: var(--muted); font-size: 0.86rem; }
.legal .callout { margin: 16px 0; padding: 12px 14px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid rgba(255, 181, 71, 0.4); color: var(--text); font-size: 0.9rem; }
.legal mark { background: rgba(255, 181, 71, 0.25); color: var(--text); padding: 0 3px; border-radius: 3px; }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.legal address { font-style: normal; color: var(--text-2); }

@media (max-width: 640px) {
  .panel { padding: 16px; }
  .page-main { padding: 18px 12px 40px; }
}

/* moderation queue */
.page-wide .page-main { max-width: 820px; }
.mod-body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2, rgba(255,255,255,0.04)); padding: 10px 12px; border-radius: 10px; }
.panel .switch-row + .switch-row { margin-top: 8px; }
.page-brand .pb-word { font-size: inherit; }

.mod-img { display: block; max-width: 100%; max-height: 360px; margin-top: 8px; border-radius: 10px; border: 1px solid var(--border, rgba(127,127,127,.3)); }

/* sign-in page: email/password + phone fallback */
.row-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hint.center { text-align: center; margin-top: 14px; }
.phone-area { display: none; }
.use-phone .phone-area { display: flex; }
.use-phone .email-only { display: none; }
.code-input { font-size: 1.3rem; letter-spacing: 0.2em; text-align: center; font-variant-numeric: tabular-nums; }

/* account: security */
.section-gap { margin-top: 26px; }
.qr-wrap { display: inline-block; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--border, rgba(127,127,127,.3)); }
.qr-wrap svg { display: block; width: 200px; height: 200px; }
.steps { margin: 0; padding-left: 20px; }
.backup-codes { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; border-radius: 12px; background: var(--surface-2, rgba(127,127,127,.08)); font-family: Menlo, Consolas, monospace; font-size: 1rem; }
.code-input { letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.panel .hint.center { padding: 0; }

/* Chideout header logo on the sign-in, account and legal pages */
.page-brand img.pb-logo { width: 30px; height: 30px; border-radius: 9px; display: block; }
.page-brand .pb-word { font-size: 1.2rem; letter-spacing: -0.03em; }
.page-brand .wm-hide { color: var(--logo-text, var(--brand-text)); font-size: inherit; }
.page-top { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--brand) 55%, transparent); }

/* "or" between the email and phone ways to sign up */
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Profile banner (scaled to cover, never stretched) ---------- */
.banner-edit { display: flex; flex-direction: column; gap: 8px; }
.banner-box {
  --av: #343249;
  position: relative; width: 100%; aspect-ratio: 3 / 1; overflow: hidden; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--av) 70%, #000), color-mix(in srgb, var(--av) 35%, var(--surface-2)));
  border: 1px solid var(--border);
}
.banner-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.banner-tools { gap: 12px; }
textarea.input { resize: vertical; min-height: 76px; line-height: 1.45; font: inherit; }

/* ---------- Status ---------- */
.status-row { display: flex; gap: 8px; }
.status-row .status-emoji { width: 64px; flex: 0 0 64px; text-align: center; font-size: 1.2rem; }
.status-row .input:not(.status-emoji) { flex: 1; min-width: 0; }
.switch-row small, .radio-row small { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 400; margin-top: 2px; line-height: 1.4; }

/* ---------- Group chats ---------- */
.radio-set { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.radio-set.is-off { opacity: 0.45; }
.radio-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.radio-row input { margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.radio-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ga-list { max-height: 280px; overflow-y: auto; }
.check-line { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-line input { accent-color: var(--brand); width: 18px; height: 18px; flex-shrink: 0; }
#ga-chosen-wrap { margin-top: 12px; }

/* ---------- Dialogs (are-you-sure, cropper) ---------- */
.confirm-dialog, .crop-dialog {
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); color: var(--text);
  padding: 20px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.confirm-dialog::backdrop, .crop-dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.confirm-dialog h2 { font-size: 1.15rem; margin: 0; }
.confirm-dialog p { margin: 0; color: var(--text-2); line-height: 1.5; }
.row.end { justify-content: flex-end; }
.crop-dialog { width: min(560px, calc(100vw - 24px)); padding: 16px; }
.crop-inner { display: flex; flex-direction: column; gap: 12px; }
.crop-title { font-size: 1.1rem; margin: 0; }
.crop-hint { margin: 0; color: var(--muted); font-size: 0.84rem; }
.crop-stage { position: relative; width: 100%; max-height: 62vh; margin: 0 auto; overflow: hidden; border-radius: 12px; background: #000; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage.is-round { width: min(100%, 360px); }
.crop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); border-radius: 12px; }
.crop-stage.is-round .crop-mask { border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
.crop-zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; }
.crop-zoom input { flex: 1; accent-color: var(--brand); }
.crop-actions { display: flex; align-items: center; gap: 8px; }
.crop-actions .grow { flex: 1; }

/* Status emoji: a button that opens the reactions-style emoji picker */
.status-emoji-wrap { position: relative; flex: 0 0 64px; display: flex; }
.status-row .status-emoji-wrap .status-emoji { width: 64px; flex: 0 0 64px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); padding: 0; }
.status-emoji .ic { width: 24px; height: 24px; }
.status-emoji.has-emoji { font-size: 1.5rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; color: inherit; }
.status-emoji:hover { border-color: var(--brand); }
.status-emoji-clear {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: 0.9rem; line-height: 1; cursor: pointer;
}
.status-emoji-clear:hover { color: var(--text); }

/* Top bar on Profile / Account settings: same controls as the app */
.page-top.has-bar { gap: 10px; }
.page-top-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.page-top-right .persona-btn { margin-left: 4px; }
@media (max-width: 640px) { .page-top-right .persona-btn-text { display: none; } }
.page-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.profile-link-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); text-decoration: none; flex-wrap: wrap; transition: background 0.12s ease, border-color 0.12s ease; }
.profile-link-card:hover { background: var(--hover); border-color: var(--brand); }
.profile-link-card .grow { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-link-card small { color: var(--muted); font-size: 0.82rem; }
.avatar-big.sm { width: 52px; height: 52px; font-size: 1.05rem; }

/* ---------- Your logo (Account settings) ---------- */
.logo-studio { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.logo-studio > * { min-width: 0; }
.logo-field .seg-btn { min-width: 0; padding: 0 6px; }
.logo-preview { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); }
.logo-preview-big { width: 104px; height: 104px; display: block; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18)); }
.logo-preview-side { display: flex; flex-direction: column; gap: 10px; }
.logo-preview-head { display: inline-flex; align-items: center; gap: 7px; font-weight: 900; font-size: 1.05rem; letter-spacing: -0.04em; color: var(--text); }
.logo-preview-head img { border-radius: 9px; }
.logo-preview-small { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.logo-preview-small img { image-rendering: auto; }
.logo-preview-avatar.avatar.sm { width: 24px; height: 24px; }
.logo-field { display: flex; flex-direction: column; gap: 6px; }
.logo-field .seg { max-width: 380px; }
.logo-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; max-width: 760px; }
.logo-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer;
  color: var(--text-2); font: inherit; transition: border-color 0.12s ease, transform 0.12s ease;
}
.logo-swatch:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.logo-swatch-img { width: 44px; height: 44px; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15)); }
.logo-swatch { min-width: 0; width: 100%; }
/* Names that don't fit end in "…" (single line, so it works the same in every app font) */
.logo-swatch-name, .lg-chip-name { display: block; max-width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.35; padding: 0 2px; }
.logo-swatch-name { font-size: 0.74rem; font-weight: 700; }
.logo-swatch[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; color: var(--text); }
.logo-swatch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Colour picker: the classics in a card, with an expand button in its top-right corner that bursts open the full sheet (account.js) */
.lg-colors { position: relative; max-width: 760px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.lg-colors .logo-swatches { max-width: none; }
.lg-colors-head { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0 46px 10px 2px; flex-wrap: wrap; row-gap: 2px; }
.lg-colors-current { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 800; color: var(--text); }
.lg-colors-dot { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 3px var(--border-strong); }
.lg-colors-more { font-size: 0.76rem; font-weight: 600; color: var(--muted); }
.lg-expand {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 2px solid transparent; border-radius: 11px; color: var(--text);
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from 200deg, #ff2d55, #ff8a00, #ffd60a, #34c759, #0a84ff, #bf5af2, #ff2d55) border-box;
  transition: transform 0.18s cubic-bezier(.3, 1.6, .5, 1), box-shadow 0.18s ease;
}
.lg-expand svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.lg-expand:hover { transform: scale(1.08); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16); }
.lg-expand:hover svg { transform: scale(1.12); }
.lg-expand:active { transform: scale(0.94); }
.lg-expand:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* The big colour sheet itself lives in logo-sheet.css (shared with the header logo) */
@media (prefers-reduced-motion: reduce) {
  .lg-expand, .lg-expand svg { transition: none; }
}
@media (max-width: 560px) {
  .logo-studio { grid-template-columns: minmax(0, 1fr); }
  .logo-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logo-preview { flex-direction: row; align-items: center; width: 100%; }
  .logo-preview-big { width: 84px; height: 84px; }
}
.lg-colors-current { min-width: 0; max-width: 100%; }
#lg-color-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.35; }

/* ---------- Moderation console (/moderation): tabs, queue badges, safety holds, users & bans (mod.html / mod.js) ---------- */
.mod-page .page-main { max-width: 880px; }
.mod-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
}
.mod-tabs::-webkit-scrollbar { display: none; }
.mod-tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: var(--r-pill); color: var(--text-2); font-weight: 700; font-size: 0.86rem; text-decoration: none; white-space: nowrap;
}
.mod-tab:hover { color: var(--text); background: var(--hover); }
.mod-tab.is-active { background: var(--brand); color: var(--brand-ink); }
.mod-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mod-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--danger); color: #fff;
  font-size: 0.7rem; font-weight: 800; line-height: 20px; text-align: center;
}
.mod-tabpanel > .panel + .stack, .mod-tabpanel > .panel + .mod-toolbar, .mod-tabpanel > .panel + #user-detail:not(:empty) { margin-top: 16px; }
.mod-toolbar { margin-bottom: 12px; }
.mod-seg { max-width: 460px; }
.panel .mod-seg { margin-top: -4px; }
.mod-empty { margin: 0 !important; }
.mod-pad { padding: 10px 0; }

.mod-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text-2); font-size: 0.72rem; font-weight: 700; white-space: nowrap; text-transform: none;
}
.mod-chip.ok { background: var(--ok-soft); color: var(--ok); }
.mod-chip.warn { background: var(--warn-soft); color: var(--warn); }
.mod-chip.danger { background: var(--danger-soft); color: var(--danger); }
.mod-chip.info { background: var(--alias-soft); color: var(--alias); }
.mod-chip.brand { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.mod-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.mod-tags:last-child { margin-bottom: 0; }

/* queue */
.mod-item-head { justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mod-item-head small { color: var(--muted); font-size: 0.8rem; }
.mod-item p + p, .mod-item p + .mod-sens, .mod-item p + a { margin-top: 6px; }
.mod-actions { margin-top: 12px; gap: 8px; }
.mod-badge.illegal {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; font-size: 0.74rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase;
}
.mod-badge.illegal::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.mod-cat { font-size: 0.86rem; font-weight: 800; color: var(--danger); }
.panel.is-illegal { border: 2px solid var(--danger); background: linear-gradient(var(--danger-soft), var(--danger-soft)), var(--surface); }
.mod-csam-box { margin-top: 12px; padding: 12px; border-radius: var(--r); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.mod-csam-box p { font-size: 0.86rem; color: var(--text); margin-bottom: 10px; }
.mod-csam-box .btn { white-space: normal; height: auto; min-height: 32px; padding: 6px 14px; text-align: center; }
.btn.mod-csam-quiet { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.mod-sens { margin-top: 8px; }
.mod-sens .hint { display: block; margin-top: 4px; }
.mod-img.is-blurred, .mod-hold-photo.is-blurred { filter: blur(24px); }
.mod-sens .mod-img { cursor: pointer; overflow: hidden; }

/* safety holds */
.mod-legal { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.mod-steps { list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; color: var(--text-2); line-height: 1.5; }
.mod-steps strong { color: var(--text); }
.mod-steps a { color: var(--text); font-weight: 700; }
.mod-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 4px 0 10px; font-size: 0.88rem; }
.mod-dl dt { color: var(--muted); font-weight: 700; font-size: 0.8rem; padding-top: 2px; }
.mod-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mod-dl a, .mod-ban a, .mod-hold a { color: var(--text); }
.mod-page code { font-family: var(--mono); font-size: 0.8rem; background: var(--surface-2); padding: 2px 6px; border-radius: var(--r-sm); overflow-wrap: anywhere; word-break: break-all; }
.mod-hashes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mod-hash { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.mod-k { color: var(--muted); font-weight: 700; font-size: 0.76rem; }
.mod-hold-img { position: relative; margin-top: 10px; border-radius: var(--r); overflow: hidden; min-height: 150px; display: grid; }
.mod-hold-img > * { grid-area: 1 / 1; }
.mod-hold-ph { background: repeating-linear-gradient(45deg, var(--surface-2) 0 12px, var(--surface-3) 12px 24px); filter: blur(2px); }
.mod-hold-ph-text { position: relative; align-self: center; justify-self: center; max-width: 420px; padding: 16px; margin: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border-strong); text-align: center; }
.mod-hold-ph-text p { font-size: 0.86rem; margin-bottom: 6px; }
.mod-hold-ph-text .btn { margin-top: 4px; }
.mod-hold-img.is-loaded { display: block; min-height: 0; overflow: hidden; }
.mod-hold-photo {
  display: block; max-width: 100%; max-height: 420px; border-radius: var(--r); cursor: pointer; background: var(--surface-2);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none;
}
.mod-hold-img.is-loaded .hint { margin-top: 6px; }

/* users & bans */
.mod-results { margin-top: 10px; }
.mod-results:empty { display: none; }
.mod-user-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); text-align: left; color: var(--text); cursor: pointer; padding-left: 8px; padding-right: 8px; border-radius: 0; }
.mod-user-row:first-child { border-top: 0; }
.mod-user-row:hover, .mod-user-row.is-on { background: var(--hover); }
.mod-user-row.is-on { box-shadow: inset 3px 0 0 var(--brand); }
.mod-user-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.mod-user-head .grow { flex: 1 1 240px; min-width: 0; }
.mod-user-head h2 { font-size: 1.3rem; font-weight: 900; margin-bottom: 2px; overflow-wrap: anywhere; }
.mod-user-head .mod-tags { margin-top: 8px; }
.mod-user-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 220px; text-align: right; }
.mod-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mod-stats > div { padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mod-stats b { font-size: 1.3rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.mod-stats span { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.mod-stats .is-danger { background: var(--danger-soft); }
.mod-stats .is-danger b { color: var(--danger); }
.mod-vpn { font-style: normal; color: var(--warn); font-weight: 800; }
.mod-stats-note { margin-top: 6px; }
.mod-h { font-size: 0.78rem; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; margin: 18px 0 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mod-h .hint { text-transform: none; letter-spacing: 0; }
.mod-linked-row { cursor: pointer; gap: 8px; padding: 10px 0; }
.mod-linked-row input { width: 18px; height: 18px; accent-color: var(--danger); flex-shrink: 0; }
.mod-ban { display: flex; flex-direction: column; gap: 4px; }
.stack > .mod-ban { padding: 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); }
.stack > .mod-ban.is-active { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.mod-ban-head { gap: 6px; }
.mod-ban-head .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.mod-reason { font-weight: 700; font-size: 0.92rem; overflow-wrap: anywhere; }
.mod-ban .mod-actions { margin-top: 6px; }
.mod-evade { color: var(--danger); }
.mod-evasion .btn { flex-shrink: 0; }

/* dialogs */
.mod-dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.mod-dialog h2 { font-size: 1.15rem; font-weight: 900; }
.mod-dialog .stack { gap: 12px; }
.mod-ban-dialog { width: min(520px, calc(100vw - 24px)); }
.mod-ban-dialog .radio-set { margin-top: 0; }
.mod-ban-dialog .radio-row input { accent-color: var(--danger); }
.mod-ban-dialog .radio-row:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.mod-ban-dialog .label .hint { font-weight: 500; }
.mod-ban-nums { align-items: flex-start; }
.mod-ban-nums .label { flex: 1 1 160px; }
.mod-ban-dialog select.input { appearance: auto; }
.mod-also { color: var(--danger); font-weight: 700; }

@media (max-width: 640px) {
  .mod-tabs { flex-wrap: wrap; justify-content: center; border-radius: var(--r-lg); }
  .mod-tab { flex: 0 1 auto; height: 34px; padding: 0 12px; font-size: 0.82rem; }
  .mod-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-user-cta { align-items: flex-start; text-align: left; max-width: none; width: 100%; }
  .mod-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mod-dl dd { margin-bottom: 6px; }
  .mod-hash { grid-template-columns: minmax(0, 1fr) auto; }
  .mod-hash .mod-k { grid-column: 1 / -1; }
  .mod-actions .btn { flex: 1 1 auto; }
}

/* ---------- ban options: always-blocked line + separate opt-in boxes ---------- */
.mod-always { padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.mod-always-k { display: block; font-size: 0.72rem; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.mod-always p { font-size: 0.84rem; color: var(--text-2); line-height: 1.45; }
.mod-opts { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mod-opts legend { margin-bottom: 6px; padding: 0; flex-direction: row; gap: 8px; align-items: baseline; }
.mod-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.mod-opt input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--danger); flex-shrink: 0; }
.mod-opt strong { font-size: 0.9rem; }
.mod-opt small { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 400; margin-top: 2px; line-height: 1.4; }
.mod-opt:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.mod-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.mod-opt-wrap { display: flex; flex-direction: column; gap: 8px; }
.mod-opt-wrap.is-on { padding: 0 0 10px; border-radius: 12px; background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger); }
.mod-opt-wrap.is-on .mod-opt { border-color: transparent; background: none; }
.mod-opt-wrap.is-on > :not(.mod-opt) { margin-left: 12px; margin-right: 12px; }
.mod-net-warn { font-size: 0.8rem; line-height: 1.45; color: var(--text-2); padding: 8px 10px 8px 12px; border-radius: var(--r-sm, 8px); background: var(--warn-soft); border-left: 3px solid var(--warn); }
.mod-net-warn strong { color: var(--warn); }
.mod-neighbors { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.mod-neighbors.is-warn { color: var(--warn); font-weight: 800; }
.mod-neighbors.is-warn::before { content: '⚠ '; }
.mod-stats-note + .mod-neighbors { margin-top: 4px; }
.mod-netdays { max-width: 340px; }
.mod-netdays .input { max-width: 120px; }
.mod-ban-len { max-width: 240px; }
#ban-ok { white-space: normal; height: auto; min-height: 40px; text-align: center; }

/* ---------- appeals ---------- */
.mod-appeal.is-pending { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.mod-appeal .mod-h:first-of-type { margin-top: 12px; }
.mod-appeal-msg { font-size: 0.92rem; line-height: 1.5; }
.mod-appeal-ban { padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.mod-appeal-ban .mod-tags { margin-bottom: 2px; }
.mod-decision { margin-top: 12px; padding: 10px 12px; border-radius: var(--r); border-left: 3px solid var(--muted); background: var(--surface-2); }
.mod-decision.is-ok { border-left-color: var(--ok); }
.mod-decision.is-no { border-left-color: var(--danger); }
.mod-decision-text { margin-top: 4px; font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
#ask-dialog #ask-count { align-self: flex-end; font-variant-numeric: tabular-nums; }
#ask-dialog textarea.input { min-height: 96px; padding: 10px 14px; }

/* ---------- sign-in page: banned + appeal ---------- */
.ban-screen h1 { margin-bottom: 6px; }
.ban-screen .lede { margin-bottom: 14px; }
.ban-facts { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.ban-facts > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.ban-facts dt { font-size: 0.74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ban-facts dd { margin: 0; font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.appeal-form { padding-top: 16px; border-top: 1px solid var(--border); }
.appeal-form h2 { margin-bottom: 0; }
.appeal-form textarea.input { padding: 10px 14px; min-height: 120px; }
.appeal-count { display: flex; justify-content: space-between; gap: 8px; }
#ap-count { margin-left: auto; font-variant-numeric: tabular-nums; }
#ap-count.err { color: var(--danger); }
.appeal-state { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border-strong); margin-bottom: 4px; }
.appeal-state strong { display: block; font-size: 0.95rem; }
.appeal-state p { font-size: 0.86rem; color: var(--text-2); margin-top: 2px; }
.appeal-state > div { min-width: 0; flex: 1; }
.appeal-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--muted); }
.appeal-dot.is-wait { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.appeal-dot.is-ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.appeal-dot.is-no { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.appeal-reply { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--border-strong); background: var(--surface); border-radius: 0 var(--r-sm, 8px) var(--r-sm, 8px) 0; font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.appeal-nopass { font-size: 0.88rem; color: var(--text-2); padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.appeal-nopass a, .appeal-state a { color: var(--text); font-weight: 700; }
.ban-screen > .hint.center { margin-top: 16px; }
.mod-opt input:checked, .mod-linked-row input:checked { background: var(--danger); border-color: var(--danger); }
.appeal-state p.hint { color: var(--muted); font-size: 0.78rem; }
.appeal-reply + p, .appeal-state p.hint + p { margin-top: 8px; }
@media (max-width: 640px) { .mod-ban-dialog .row.end .btn { flex: 1 1 auto; } }

/* Colour designators: a rounded bar along the left edge instead of a thick border that bends into a crescent at the corners */
.mod-net-warn, .mod-decision { position: relative; border-left: 0 !important; }
.mod-net-warn { --stripe: var(--warn); }
.mod-decision { --stripe: var(--muted); }
.mod-decision.is-ok { --stripe: var(--ok); }
.mod-decision.is-no { --stripe: var(--danger); }
.mod-net-warn::before, .mod-decision::before {
  content: ''; position: absolute; pointer-events: none;
  left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--stripe);
}
