:root {
  --bg: #f4f5f3;
  --panel: #ffffff;
  --panel-2: #f8f9f7;
  --line: #e3e6e1;
  --line-2: #d3d8d1;
  --text: #1c2420;
  --muted: #69736d;
  --faint: #9aa39d;
  --accent: #1f7a62;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ec;
  --danger: #b8432f;
  --danger-soft: #f8e7e3;
  --warn: #a8720b;
  --warn-soft: #fbf1db;
  --ok: #2b7d47;
  --ok-soft: #e4f3e8;
  --sel: #e9f3ef;
  --hover: #f1f3f0;
  --shadow: 0 8px 30px rgba(20, 30, 25, .14);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614; --panel: #191e1b; --panel-2: #1e2420; --line: #2a312d; --line-2: #36403a;
    --text: #e4e9e5; --muted: #9aa59e; --faint: #6c7770; --accent: #3fb08f; --accent-ink: #0d1411;
    --accent-soft: #1d3a31; --danger: #e0715c; --danger-soft: #3a221d; --warn: #e0a83a; --warn-soft: #3a2f17;
    --ok: #5cc27e; --ok-soft: #1b3324; --sel: #1f3029; --hover: #212824; --shadow: 0 8px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121614; --panel: #191e1b; --panel-2: #1e2420; --line: #2a312d; --line-2: #36403a;
  --text: #e4e9e5; --muted: #9aa59e; --faint: #6c7770; --accent: #3fb08f; --accent-ink: #0d1411;
  --accent-soft: #1d3a31; --danger: #e0715c; --danger-soft: #3a221d; --warn: #e0a83a; --warn-soft: #3a2f17;
  --ok: #5cc27e; --ok-soft: #1b3324; --sel: #1f3029; --hover: #212824; --shadow: 0 8px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* ---------- кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); background: var(--panel); border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line-2)); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn.icon.sm { width: 28px; }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); outline: none; }
textarea.input { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: block; margin-bottom: 12px; }
div.field { margin-bottom: 12px; }
label.field > span, div.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- вход ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.login h1 { font-size: 20px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.login p { margin: 0 0 20px; color: var(--muted); }
.login .btn { width: 100%; justify-content: center; height: 40px; margin-top: 6px; }
.err { color: var(--danger); background: var(--danger-soft); padding: 8px 10px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.logo svg { width: 18px; height: 18px; }

/* ---------- каркас ---------- */
.app { height: 100%; display: grid; grid-template-rows: 54px 1fr; }
.top { display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; min-width: 0; }
.top .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { flex: 1; max-width: 560px; margin-left: 24px; position: relative; }
.search input { padding-left: 34px; background: var(--panel-2); }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--faint); }
.top .spacer { flex: 1; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid transparent; background: none; cursor: pointer; }
.user-btn:hover { background: var(--hover); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; background: var(--accent); flex: none; text-transform: uppercase; }
.menu { position: absolute; z-index: 50; min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--hover); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menu .menu-head { padding: 8px 10px; color: var(--muted); font-size: 12px; }

.main { display: grid; grid-template-columns: 250px minmax(320px, 420px) 1fr; min-height: 0; }
.side { border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 8px 24px; background: var(--panel-2); }
.side .btn.primary { width: calc(100% - 8px); margin: 0 4px 14px; justify-content: center; height: 38px; }
.side h4, .adm-side h4 { margin: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.nav { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; color: var(--text); min-height: 32px; }
.nav:hover { background: var(--hover); }
.nav.active { background: var(--sel); color: var(--accent); font-weight: 600; }
.nav .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .cnt { font-size: 12px; font-weight: 700; color: var(--accent); }
.nav .cnt.dim { color: var(--faint); font-weight: 500; }
.nav.sub { padding-left: 34px; min-height: 29px; font-size: 13.5px; }
.nav.sub2 { padding-left: 50px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.caret { width: 16px; height: 16px; flex: none; color: var(--faint); transition: transform .15s; }
.caret.open { transform: rotate(90deg); }

/* ---------- список писем ---------- */
.list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.list-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); min-height: 52px; }
.list-head h2 { font-size: 16px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-head .sel-count { font-weight: 600; flex: 1; }
.list-body { overflow-y: auto; flex: 1; }
.msg { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 8px; padding: 10px 12px 10px 10px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.msg:hover { background: var(--hover); }
.msg.active { background: var(--sel); }
.msg.unread .who, .msg.unread .subj { font-weight: 700; }
.msg.unread::before { content: ''; position: absolute; left: 3px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.msg .cb { grid-row: 1 / span 3; padding-top: 1px; }
.msg .cb input { width: 15px; height: 15px; accent-color: var(--accent); margin: 2px 0 0 4px; }
.msg .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .date { font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.msg .subj { grid-column: 2 / span 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .prev { grid-column: 2 / span 2; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); max-width: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.msg .flag { color: var(--warn); }
.msg svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty svg.i { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.more { padding: 14px; text-align: center; }
.warnbar { padding: 8px 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; border-bottom: 1px solid var(--line); }

/* ---------- чтение ---------- */
.reader { overflow-y: auto; min-height: 0; background: var(--panel); }
.reader-empty { height: 100%; display: grid; place-items: center; color: var(--faint); text-align: center; }
.reader-empty svg.i { width: 48px; height: 48px; stroke-width: 1.2; }
.r-bar { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.r-subj { font-size: 20px; font-weight: 650; margin: 18px 22px 6px; line-height: 1.3; word-break: break-word; }
.r-boxtag { margin: 0 22px 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.t-item { margin: 0 14px 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.t-item.collapsed { cursor: pointer; }
.t-item.collapsed:hover { background: var(--hover); }
.t-head { display: flex; gap: 10px; padding: 12px 14px; align-items: flex-start; }
.t-head .grow > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-head .from b { font-weight: 650; }
.t-head .addr { color: var(--muted); font-size: 12.5px; }
.t-head .date { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.t-body { padding: 0 14px 14px; }
.t-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.t-frame { width: 100%; border: 0; display: block; min-height: 60px; background: #fff; border-radius: 6px; }
.imgbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; background: var(--warn-soft); color: var(--warn); border-radius: 8px; font-size: 13px; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.att { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); max-width: 280px; background: var(--panel-2); }
.att:hover { border-color: var(--accent); }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small { color: var(--muted); white-space: nowrap; }
.r-quick { margin: 4px 14px 30px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- окно письма ---------- */
.compose { position: fixed; z-index: 40; right: 20px; bottom: 0; width: min(720px, calc(100vw - 40px)); height: min(640px, calc(100vh - 70px)); background: var(--panel); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.compose.max { right: 50%; transform: translateX(50%); width: min(1000px, calc(100vw - 40px)); height: calc(100vh - 40px); bottom: 20px; border-radius: 12px; border-bottom: 1px solid var(--line-2); }
.compose.min { height: 46px; overflow: hidden; }
.c-head { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); cursor: pointer; background: var(--panel-2); border-radius: 12px 12px 0 0; }
.c-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-row { display: flex; align-items: center; gap: 8px; padding: 2px 14px; border-bottom: 1px solid var(--line); min-height: 40px; }
.c-row > label { width: 54px; color: var(--muted); font-size: 13px; flex: none; }
.c-row select, .c-row > input { border: 0; outline: none; background: transparent; flex: 1; height: 36px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; align-items: center; padding: 4px 0; position: relative; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; max-width: 100%; }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { border: 0; background: none; cursor: pointer; padding: 0 4px; color: var(--muted); font-size: 15px; line-height: 1; }
.chips input { border: 0; outline: none; background: transparent; flex: 1; min-width: 140px; height: 28px; }
.suggest { position: absolute; top: 100%; left: 0; z-index: 5; min-width: 280px; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; }
.suggest div { padding: 7px 10px; border-radius: 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest div.on, .suggest div:hover { background: var(--hover); }
.c-tools { display: flex; gap: 2px; padding: 4px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.c-body { flex: 1; overflow-y: auto; padding: 14px; outline: none; min-height: 120px; word-break: break-word; }
.c-body blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line-2); color: var(--muted); }
.c-body:empty::before { content: attr(data-ph); color: var(--faint); }
.c-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.c-att { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px 4px 9px; max-width: 260px; }
.c-att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-att .bar { width: 40px; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.c-att .bar i { display: block; height: 100%; background: var(--accent); }
.c-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.drop { position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 2px dashed var(--accent); border-radius: 12px; display: grid; place-items: center; font-weight: 600; color: var(--accent); pointer-events: none; }

/* ---------- модальные окна, тосты ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10, 16, 13, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px 10px; }
.modal-head h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 4px 20px 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; flex-wrap: wrap; }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--panel); padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow); pointer-events: auto; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); color: #fff; }
.toast button { border: 0; background: none; color: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.secret-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0 12px; }
.secret-box .kv { display: grid; grid-template-columns: 130px 1fr auto; gap: 6px 10px; align-items: center; }
.secret-box .kv > span:nth-child(3n+1) { color: var(--muted); font-size: 13px; }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin: 6px 0 12px; }
.note.info { background: var(--accent-soft); color: var(--accent); }

/* ---------- админка ---------- */
.adm { display: grid; grid-template-columns: 220px 1fr; min-height: 0; }
.adm-side { border-right: 1px solid var(--line); background: var(--panel-2); padding: 12px 8px; overflow-y: auto; }
.adm-main { overflow-y: auto; padding: 22px 26px 40px; min-width: 0; }
.adm-main h1 { font-size: 22px; margin: 0 0 4px; }
.adm-main .lead { color: var(--muted); margin: 0 0 20px; }
.adm-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.adm-head > div:first-child { flex: 1; min-width: 220px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tile .v { font-size: 26px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 12.5px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 15px; flex: 1; }
.card-body { padding: 14px 16px; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.off td { opacity: .55; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.mute { background: var(--hover); color: var(--muted); }
.badge.acc { background: var(--accent-soft); color: var(--accent); }
.usage { width: 120px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.usage i { display: block; height: 100%; background: var(--accent); }
.dns-val { font-family: var(--mono); font-size: 12px; word-break: break-all; max-width: 520px; }
.acc-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.acc-list .acc-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.acc-list .acc-row:last-child { border-bottom: 0; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: var(--text); }

/* ---------- узкие экраны ---------- */
.only-mobile { display: none !important; }
@media (max-width: 1100px) {
  .main { grid-template-columns: 220px minmax(280px, 360px) 1fr; }
}
@media (max-width: 860px) {
  .only-mobile { display: inline-flex !important; }
  .hide-mobile { display: none !important; }
  .top { padding: 0 8px; gap: 6px; }
  .search { margin-left: 4px; }
  .main { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 45; top: 54px; bottom: 0; left: 0; width: 280px; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  body.drawer .side, body.drawer .adm-side { transform: none; }
  .list { border-right: 0; }
  .reader { position: fixed; inset: 54px 0 0 0; z-index: 30; }
  body:not(.reading) .reader { display: none; }
  .compose, .compose.max { inset: 0; width: 100%; height: 100%; right: 0; bottom: 0; transform: none; border-radius: 0; border: 0; }
  .c-head { border-radius: 0; }
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; z-index: 45; top: 54px; bottom: 0; left: 0; width: 260px; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  .adm-main { padding: 16px; }
  .r-subj { margin: 14px 16px 6px; font-size: 18px; }
  .t-item { margin: 0 8px 10px; }
  .secret-box .kv { grid-template-columns: 100px 1fr auto; }
}

.sig-wrap { border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.sig-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sig-wrap .c-tools { padding: 3px 6px; }
.input.sig-ed { height: auto; min-height: 110px; max-height: 320px; overflow-y: auto; padding: 8px 10px; border: 0; box-shadow: none; }
.sig-ed:empty::before { content: attr(data-ph); color: var(--faint); white-space: pre-line; }
.sig-ed img { max-width: 100%; }
