/* Klema admin */
:root {
  --bg: #f6f6f9;
  --surface: #ffffff;
  --ink: #17161f;
  --ink-2: #4a4858;
  --muted: #7c7a8c;
  --line: #e7e6ee;
  --line-2: #d9d7e3;
  --primary: #6c5ce7;
  --primary-ink: #5443d6;
  --primary-soft: #efedfd;
  --danger: #d63c4a;
  --success: #1f9d63;
  --warning: #c98a0b;
  --side: #15141f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 22, 31, .04), 0 4px 16px rgba(23, 22, 31, .06);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body.admin { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary-ink); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.right { text-align: right; }
.icon { width: 18px; height: 18px; flex: none; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; vertical-align: middle; margin-left: 6px; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 13.5px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { border-color: #c4c1d4; background: #fbfbfd; }
.btn:disabled { opacity: .5; cursor: default; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: #efeff4; border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--dashed { border-style: dashed; background: transparent; color: var(--ink-2); height: 44px; }
.btn--dashed:hover { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-soft); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn--lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; font-size: 16px; }
.icon-btn:hover { background: #ececf2; color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.icon-btn--danger:hover { color: var(--danger); background: #fdecee; }
.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font: 14px var(--font); color: var(--ink); transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; min-height: 70px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7a8c' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.input:focus, .rte__content:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108, 92, 231, .18); }
.input:disabled { background: #f3f3f6; color: var(--muted); }
.input--lg { height: 48px; font-size: 17px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line-2); border-right: 0; border-radius: 8px 0 0 8px; background: #f3f3f6; color: var(--muted); }
.input-prefix .input { border-radius: 0 8px 8px 0; }
.color-input { display: flex; gap: 8px; }
.color-swatch { width: 44px; height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; background: #fff; cursor: pointer; }
.search { position: relative; display: block; max-width: 360px; flex: 1; }
.search .icon { position: absolute; left: 11px; top: 10px; color: var(--muted); }
.search .input { padding-left: 36px; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.alert--error { background: #fdecee; color: #a52734; border: 1px solid #f7c9ce; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; text-transform: capitalize; background: #ececf2; color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--published { background: #e3f6ec; color: #15794b; }
.badge--draft { background: #f1f0f5; color: #6a6879; }
.badge--changed { background: #fff3db; color: #9a6a06; }
.link { font-weight: 600; text-decoration: none; }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: #c7c5d6; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 16px 12px; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 4px 8px 18px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #7d6cf0, #5443d6); display: grid; place-items: center; color: #fff; }
.sidebar__brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar__brand-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__brand-text small { color: #8b89a0; font-size: 12px; }
.sidebar__nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.sidebar__nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: #c7c5d6; text-decoration: none; font-weight: 500; }
.sidebar__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__nav a.is-active { background: rgba(124, 108, 240, .22); color: #fff; }
.sidebar__nav a .icon { width: 17px; height: 17px; opacity: .85; }
.sidebar__group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f6d84; padding: 16px 10px 6px; }
.sidebar__foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: grid; gap: 10px; }
.sidebar__site { display: flex; align-items: center; gap: 8px; color: #c7c5d6; text-decoration: none; padding: 6px 10px; border-radius: 7px; }
.sidebar__site:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.sidebar__user form { margin: 0 0 0 auto; }
.sidebar__user .icon-btn { color: #8b89a0; }
.sidebar__user .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar__user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sidebar__user-text strong { color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-text small { color: #8b89a0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #2b2940; color: #fff; display: grid; place-items: center; font-weight: 700; text-decoration: none; flex: none; }
.main { min-width: 0; }
.page { padding: 32px 40px 64px; max-width: 1200px; }
.page__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page__head h1 { font-size: 26px; }
.page__head p { margin: 6px 0 0; }
.page__actions { display: flex; gap: 8px; }
.crumb { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 8px; }
.crumb:hover { color: var(--ink); }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .page { padding: 24px 18px; } }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.dash-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23,22,31,.05), 0 10px 26px rgba(23,22,31,.09); }
.dash-card__main { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 18px; text-decoration: none; color: inherit; }
.dash-card__icon { grid-row: span 2; width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; }
.dash-card__icon--sm { width: 34px; height: 34px; }
.dash-card__count { font-size: 22px; font-weight: 700; line-height: 1.1; }
.dash-card__label { color: var(--muted); font-weight: 500; }
.dash-card__add { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.dash-card__add:hover { background: var(--primary-soft); color: var(--primary-ink); }
.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .dash-cols { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.panel__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel__head h2 { font-size: 15px; }
.recent { list-style: none; margin: 0; padding: 6px; }
.recent li > a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; }
.recent li > a:hover { background: #f6f6f9; }
.recent li.muted { padding: 12px; }
.recent__title { flex: 1; font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.recent__title small { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent__date { font-size: 12.5px; }

/* Lists */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfbfd; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #fafaff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table__title { font-weight: 600; color: var(--ink); text-decoration: none; }
.empty { padding: 36px; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 4px; border-radius: 12px; transition: background .12s, outline-color .12s; outline: 2px dashed transparent; }
.media-grid.is-drag, .modal__card.is-drag { outline: 2px dashed var(--primary); background: var(--primary-soft); }
.media-grid.is-busy { opacity: .6; pointer-events: none; }
.media-tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; cursor: pointer; padding: 0; text-align: left; font: inherit; transition: box-shadow .12s, border-color .12s; }
.media-tile:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.15); }
.media-tile img, .media-tile__file { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f0eff5; }
.media-tile__file { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.media-tile__name { padding: 8px 10px; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-grid--modal { max-height: 60vh; overflow: auto; }

/* Auth */
.auth-page { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(circle at 30% 10%, #2a2550, #15141f 60%); }
.auth-card { width: min(420px, calc(100vw - 32px)); background: #fff; border-radius: 16px; padding: 36px 34px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.auth-card__logo { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #7d6cf0, #5443d6); color: #fff; display: grid; place-items: center; margin-bottom: 18px; }
.auth-card__logo .icon { width: 26px; height: 26px; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .muted { margin: 0 0 20px; }
.stack { display: grid; gap: 14px; }

/* Fields */
.fields { display: grid; gap: 18px; }
.field { min-width: 0; }
.field-row { display: flex; flex-wrap: wrap; gap: 14px; }
.field-row > .field { flex: 1 1 calc(var(--w, 100%) - 14px); min-width: 140px; }
.field__label { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.field__label--row { justify-content: space-between; }
.field__desc { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.field__error { color: var(--danger); font-size: 12.5px; font-weight: 500; margin-top: 5px; }
.has-error .input, .has-error .rte { border-color: var(--danger); }
.req { color: var(--danger); }
.group { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; margin: 0; background: #fcfcfe; }
.group legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.group > .fields { gap: 14px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { width: 36px; height: 20px; border-radius: 999px; background: #d4d2de; position: relative; transition: background .15s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px rgba(108,92,231,.25); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; cursor: pointer; }

/* Rich text */
.rte { border: 1px solid var(--line-2); border-radius: 8px; background: #fff; overflow: hidden; }
.rte__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: #fafafc; }
.rte__btn { width: 30px; height: 28px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; font: 700 12px var(--font); }
.rte__btn:hover { background: #ebeaf2; color: var(--ink); }
.rte__btn .icon { width: 16px; height: 16px; }
.rte__content { min-height: 120px; max-height: 480px; overflow: auto; padding: 10px 14px; border: 0; border-radius: 0; }
.prose-admin { font-size: 14.5px; line-height: 1.6; }
.prose-admin > :first-child { margin-top: 0; }
.prose-admin p { margin: 0 0 .7em; }
.prose-admin h2 { font-size: 19px; margin: 1em 0 .4em; }
.prose-admin h3 { font-size: 16px; margin: 1em 0 .4em; }
.prose-admin blockquote { margin: .8em 0; padding-left: 12px; border-left: 3px solid var(--primary); color: var(--ink-2); }
.prose-admin ul, .prose-admin ol { padding-left: 1.3em; }

/* Uploads */
.upload__empty { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 10px; background: #fbfbfd; color: var(--ink-2); cursor: pointer; font: 500 13.5px var(--font); }
.upload__empty:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.upload__item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.upload__item img, .upload__file { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: #f0eff5; display: grid; place-items: center; font-weight: 700; font-size: 11px; color: var(--muted); flex: none; }
.upload__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upload__meta strong, .upload__meta small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload__actions { display: flex; gap: 4px; align-items: center; }
.upload-panel { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.upload-panel img { max-height: 320px; border-radius: 8px; max-width: 100%; }
.upload-panel__pending { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* Array & block rows */
.rows { display: grid; gap: 8px; margin-bottom: 10px; }
.row-card { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; transition: box-shadow .12s, border-color .12s; }
.row-card.is-open { box-shadow: var(--shadow); }
.row-card.is-dragging { opacity: .45; }
.row-card.drop-before { box-shadow: 0 -3px 0 var(--primary); }
.row-card.drop-after { box-shadow: 0 3px 0 var(--primary); }
.row-card__head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 4px; cursor: pointer; user-select: none; min-height: 44px; }
.row-card__title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-card__title small { font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.row-card__actions { display: flex; gap: 0; opacity: 0; transition: opacity .12s; }
.row-card__head:hover .row-card__actions, .row-card.is-open .row-card__actions { opacity: 1; }
.row-card__actions .icon-btn { width: 28px; height: 28px; }
.row-card__actions .icon { width: 16px; height: 16px; }
.row-card__body { padding: 6px 14px 16px; border-top: 1px solid var(--line); }
.row-card__body > .fields { padding-top: 10px; gap: 14px; }
.grip { color: #b5b3c4; cursor: grab; display: grid; place-items: center; width: 22px; }
.grip:active { cursor: grabbing; }
.chev { color: var(--muted); display: grid; place-items: center; }
.chev .icon { width: 16px; height: 16px; }
.block-card__icon { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; flex: none; }
.block-card__icon .icon { width: 17px; height: 17px; }
.block-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108, 92, 231, .16); }
.blocks-empty { text-align: center; padding: 28px 16px; border-radius: 10px; background: #fafafd; border: 1px dashed var(--line-2); margin-bottom: 10px; }
.blocks-empty p { margin: 4px 0 0; }
.add-row { margin-top: 2px; }

/* Standard edit view */
.edit { min-height: 100vh; }
.edit__head { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 22px 40px 16px; background: rgba(246, 246, 249, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.edit__title { display: flex; align-items: center; gap: 12px; }
.edit__title h1 { font-size: 24px; }
.edit__actions { display: flex; align-items: center; gap: 8px; }
.edit__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding: 28px 40px 80px; max-width: 1240px; }
.edit__main { min-width: 0; }
.edit__main > .fields { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.edit__main > .field { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-top: 18px; }
.edit__side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
@media (max-width: 1000px) { .edit__body { grid-template-columns: 1fr; padding: 20px; } .edit__head { padding: 18px 20px 14px; } }
.doc-meta { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; }
.doc-meta > div { display: flex; justify-content: space-between; }
.doc-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; margin-right: 6px; white-space: nowrap; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.save-state--dirty i { background: var(--warning); }
.save-state--saving i { background: var(--primary); animation: pulse 1s infinite; }
.save-state--error i { background: var(--danger); }
.save-state--error { color: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }

/* Live editor */
body.is-live { overflow: hidden; }
.live-app { display: grid; grid-template-rows: 56px 1fr; height: 100vh; }
.live__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 5; }
.live__left, .live__right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.live__right { justify-content: flex-end; }
.live__title { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: 4px; }
.live__title strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live__center { display: flex; gap: 8px; }
.seg { display: flex; background: #f1f0f6; border-radius: 9px; padding: 3px; gap: 2px; }
.seg__btn { width: 34px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-active { background: #fff; color: var(--primary-ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg__btn:disabled { opacity: .35; cursor: default; }
.live__body { display: grid; grid-template-columns: 400px 1fr; min-height: 0; }
.panel-hidden .live__body { grid-template-columns: 0 1fr; }
.panel-hidden .live__panel { visibility: hidden; }
.live__panel { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 9px 12px; font: 600 13px var(--font); color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--primary); }
.live__form { flex: 1; overflow-y: auto; padding: 16px 16px 60px; }
.live__form .doc-meta { margin-top: 18px; }
.live__form .doc-tools { margin-top: 12px; }
.canvas { position: relative; background: #e9e8ef; background-image: radial-gradient(#d6d4e0 1px, transparent 1px); background-size: 18px 18px; overflow: auto; display: flex; justify-content: center; padding: 18px; min-height: 0; }
.canvas__frame { width: 100%; height: 100%; transition: width .25s ease; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 18px 50px rgba(30, 25, 60, .18); background: #fff; }
.canvas__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.canvas__frame.device-tablet { width: 834px; }
.canvas__frame.device-mobile { width: 390px; }
@media (max-width: 1100px) { .live__body { grid-template-columns: 340px 1fr; } .live__center .seg:first-child { display: none; } }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(20, 18, 34, .45); display: grid; place-items: center; padding: 20px; animation: fade .12s ease; }
.modal__card { width: min(520px, 100%); max-height: calc(100vh - 40px); background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; animation: pop .16s ease; }
.modal__card--wide { width: min(880px, 100%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); gap: 12px; }
.modal__head h2 { font-size: 16px; }
.modal__body { padding: 16px 18px 20px; overflow: auto; }
.modal__tools { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dropzone-hint { font-size: 12.5px; margin: -6px 0 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.block-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.block-option { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; text-align: left; padding: 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s, transform .12s; }
.block-option:hover, .block-option:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.15); transform: translateY(-1px); outline: none; }
.block-option__icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 9px; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; }
.block-option small { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* Toasts */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; }
.toast { display: flex; align-items: center; gap: 14px; background: #1d1b2e; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 500; animation: pop .16s ease; transition: opacity .3s, transform .3s; }
.toast--success { background: #14523a; }
.toast--error { background: #8f1f2b; }
.toast.is-out { opacity: 0; transform: translateY(6px); }
.toast__action { background: rgba(255,255,255,.15); border: 0; color: #fff; padding: 5px 10px; border-radius: 6px; font-weight: 600; cursor: pointer; }

/* Quick create */
.quick { min-height: 100vh; display: grid; place-items: start center; padding: 60px 20px; }
.quick__card { width: min(720px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.quick__card h1 { font-size: 26px; }
.quick__card p { margin: -8px 0 4px; }
.quick__card .btn--lg { justify-self: start; }
.templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.template { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.template.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.18); }
.template small { color: var(--muted); }
.template__thumb { display: flex; flex-direction: column; gap: 4px; height: 110px; padding: 8px; border-radius: 8px; background: #f4f3f9; margin-bottom: 6px; overflow: hidden; }
.template__thumb i { display: block; border-radius: 4px; background: #dcd9ea; height: 14px; flex: none; }
.template__thumb .t-hero { height: 44px; background: linear-gradient(135deg, #7d6cf0, #a99ff5); }
.template__thumb .t-cards { height: 26px; background: repeating-linear-gradient(90deg, #dcd9ea 0 30%, transparent 30% 35%); }
.template__thumb .t-cta { background: #c9c3f5; }
.template__thumb .t-content { height: 30px; background: repeating-linear-gradient(180deg, #dcd9ea 0 4px, transparent 4px 8px); }
.template__thumb .t-blank { height: 100%; background: transparent; border: 2px dashed #d4d1e4; }
@media (max-width: 640px) { .templates { grid-template-columns: 1fr; } }
/* Grid children must be allowed to shrink so long block summaries ellipsize. */
.fields > *, .rows > *, .field-row > * { min-width: 0; }
.live__form { overflow-x: hidden; }

/* Platform admin & invites */
.platform-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: var(--side); color: #c7c5d6; }
.platform-bar__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.platform-bar__right { display: flex; align-items: center; gap: 12px; }
.platform-bar__right form { margin: 0; }
.platform-bar .btn--ghost { color: #c7c5d6; }
.platform-bar .btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.platform .page { margin: 0 auto; }
.page--narrow { max-width: 760px; }
.platform-form, .invite-form { display: grid; gap: 16px; padding: 22px; margin-bottom: 18px; }
.panel__title { font-weight: 700; font-size: 15px; }
.panel--danger { border-color: #f3c3c8; }
.btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger-solid:hover { background: #b92f3c; border-color: #b92f3c; }
.alert--success { background: #e3f6ec; color: #15794b; border: 1px solid #bfe8d2; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix .input { border-radius: 8px 0 0 8px; }
.input-suffix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 8px 8px 0; background: #f3f3f6; color: var(--muted); white-space: nowrap; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; }
.invite-result__body { display: grid; gap: 12px; padding: 18px; }
code { background: #ececf2; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* Theme gallery */
.design-panel .live__form { padding: 18px 18px 60px; }
.design-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 12px; }
.design-h:not(:first-child) { margin-top: 26px; }
.design-desc { color: var(--ink-2); margin: 12px 0 0; font-size: 13.5px; }
.design-page { width: auto; height: 34px; font-size: 13px; }
.theme-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s; }
.theme-card:hover { border-color: #c4c1d4; }
.theme-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.18); }
.theme-card__meta { display: flex; flex-direction: column; padding: 0 2px 2px; }
.theme-card__meta strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.theme-card__meta small { color: var(--muted); font-size: 11.5px; }
.design-field { margin-bottom: 16px; }
.font-list { display: grid; gap: 6px; }
.font-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; cursor: pointer; text-align: left; color: var(--ink); }
.font-opt span { font-size: 19px; line-height: 1.2; }
.font-opt small { color: var(--muted); font-size: 11.5px; }
.font-opt:hover { border-color: #c4c1d4; }
.font-opt.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.15); }
.seg--wide { width: 100%; }
.seg--wide .seg__btn { flex: 1; width: auto; height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; font: 600 12.5px var(--font); }
.corner-demo { width: 16px; height: 12px; border: 2px solid currentColor; display: inline-block; }

/* Theme thumbnails */
.tthumb { --r: 6px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; gap: 5px; padding: 6px; font-family: var(--hf); border: 1px solid rgba(0,0,0,.06); }
.tthumb__bar { display: flex; align-items: center; gap: 4px; height: 10px; }
.tthumb__bar i { width: 9px; height: 9px; border-radius: 3px; background: var(--p); }
.tthumb__bar b { width: 12px; height: 3px; border-radius: 2px; background: var(--ink); opacity: .35; }
.tthumb__bar span { margin-left: auto; width: 18px; height: 7px; border-radius: 4px; background: var(--p); }
.tthumb__hero { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--r); background: linear-gradient(135deg, var(--p), color-mix(in srgb, var(--p) 45%, #120d1f)); color: #fff; }
.tthumb__txt { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tthumb__txt strong { font-size: 13px; font-weight: 700; line-height: 1; }
.tthumb__txt em { width: 46px; height: 3px; background: rgba(255,255,255,.6); border-radius: 2px; }
.tthumb__txt u { width: 22px; height: 6px; background: var(--a); border-radius: 3px; }
.tthumb__img { display: none; }
.tthumb__cards { display: flex; gap: 4px; height: 16px; }
.tthumb__cards i { flex: 1; background: var(--sf); border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.tthumb--classic .tthumb__bar { justify-content: center; } .tthumb--classic .tthumb__bar span { display: none; }
.tthumb--classic .tthumb__hero { border-radius: 0; outline: 1px solid rgba(255,255,255,.5); outline-offset: -5px; }
.tthumb--classic .tthumb__cards i { border-radius: 0; }
.tthumb--modern .tthumb__hero { background: var(--bg); color: var(--ink); justify-content: space-between; padding: 0 4px; gap: 6px; }
.tthumb--modern .tthumb__txt { align-items: flex-start; }
.tthumb--modern .tthumb__txt strong { font-size: 15px; font-weight: 800; letter-spacing: -0.04em; }
.tthumb--modern .tthumb__txt em { background: var(--ink); opacity: .25; }
.tthumb--modern .tthumb__img { display: block; width: 42%; height: 88%; border-radius: 6px; background: linear-gradient(160deg, var(--p), var(--a)); }
.tthumb--bold { color: #fff; }
.tthumb--bold .tthumb__bar b { background: #fff; }
.tthumb--bold .tthumb__bar span { background: var(--a); border-radius: 0; }
.tthumb--bold .tthumb__hero { border-radius: 0; align-items: flex-end; justify-content: flex-start; padding: 6px; background: radial-gradient(circle at 80% 10%, var(--p), transparent 70%), #000; }
.tthumb--bold .tthumb__txt { align-items: flex-start; }
.tthumb--bold .tthumb__txt strong { font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; }
.tthumb--bold .tthumb__txt u { border-radius: 0; }
.tthumb--bold .tthumb__cards i { border-radius: 0; box-shadow: none; background: var(--sf); }
.tthumb--sanctuary .tthumb__hero { background: var(--bg); color: var(--ink); justify-content: space-between; padding: 0 6px; }
.tthumb--sanctuary .tthumb__txt { align-items: flex-start; }
.tthumb--sanctuary .tthumb__txt strong { font-weight: 500; font-size: 14px; }
.tthumb--sanctuary .tthumb__txt em { background: var(--a); height: 1px; width: 24px; }
.tthumb--sanctuary .tthumb__txt u { background: var(--p); border-radius: 1px; }
.tthumb--sanctuary .tthumb__img { display: block; width: 34%; height: 92%; border-radius: 999px 999px 3px 3px; background: linear-gradient(170deg, var(--p), var(--a)); outline: 1px solid var(--a); outline-offset: 2px; }
.tthumb--warm .tthumb__hero { border-radius: 8px; }
.tthumb--warm .tthumb__cards i { border-radius: 5px; }

/* Platform: starting theme picker */
.theme-pick { border: 0; padding: 0; margin: 0; }
.theme-pick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 6px; }
.theme-pick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick__card { display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1.5px solid var(--line, #e3e5ea); border-radius: 10px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.theme-pick__card small { color: var(--muted, #6b7280); font-size: 11px; line-height: 1.3; }
.theme-pick__swatch { position: relative; display: flex; gap: 4px; align-items: flex-start; height: 54px; border-radius: 6px; padding: 8px; margin-bottom: 6px; border: 1px solid rgba(0,0,0,.06); }
.theme-pick__swatch i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.theme-pick__swatch b { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 14px; border-radius: 3px; opacity: .9; }
.theme-pick__opt input:checked + .theme-pick__card { border-color: var(--primary, #2563eb); box-shadow: 0 0 0 3px var(--primary-soft); }
.theme-pick__opt input:focus-visible + .theme-pick__card { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.tthumb--metro .tthumb__bar span { width: 20px; border-radius: 6px; }
.tthumb--metro .tthumb__hero { border-radius: 5px; align-items: flex-end; justify-content: flex-start; padding: 6px; background: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,.1)), linear-gradient(140deg, #3a3a3e, #7d6a58); }
.tthumb--metro .tthumb__txt { align-items: flex-start; }
.tthumb--metro .tthumb__txt strong { font-size: 15px; font-weight: 800; letter-spacing: -0.07em; }
.tthumb--metro .tthumb__txt u { width: 24px; background: var(--p); border-radius: 6px; }
.tthumb--metro .tthumb__cards i { background: var(--a); box-shadow: none; border-radius: 4px; }

/* Block Content / Style tabs */
.btabs { display: flex; gap: 2px; background: #f1f0f6; border-radius: 9px; padding: 3px; margin-bottom: 14px; }
.btabs__btn { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 7px 10px; font: 600 12.5px var(--font); color: var(--ink-2); cursor: pointer; }
.btabs__btn.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.btabs__btn span { display: inline-flex; align-items: center; gap: 6px; }
.btabs__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; }

/* Style panel */
.style-panel { display: flex; flex-direction: column; gap: 8px; }
.sp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.sp-sec { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sp-sec > summary { list-style: none; cursor: pointer; padding: 10px 12px; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.sp-sec > summary::-webkit-details-marker { display: none; }
.sp-sec > summary::after { content: "+"; font-size: 16px; color: var(--muted); font-weight: 500; }
.sp-sec[open] > summary::after { content: "–"; }
.sp-body { padding: 2px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.sp-row { display: flex; flex-direction: column; gap: 6px; }
.sp-label { font: 600 12px var(--font); color: var(--ink-2); }
.seg--style { flex-wrap: wrap; }
.seg--style .seg__btn { height: 30px; min-width: 0; padding: 0 6px; font-size: 12px; }
.sp-size { display: flex; flex-direction: column; gap: 6px; }
.sp-px { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.sp-px .input { width: 96px; }
.input--sm { height: 32px; padding: 4px 9px; font-size: 13px; }
.sp-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sp-swatch { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); background: var(--c, #fff); cursor: pointer; padding: 0; flex: none; }
.sp-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.sp-swatch--none { background: linear-gradient(135deg, #fff 45%, #e0464b 45%, #e0464b 55%, #fff 55%); }
.sp-swatch--custom { background: var(--c, conic-gradient(#f44, #fd4, #4d6, #4bf, #84f, #f44)); overflow: hidden; }
.sp-swatch--custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.sp-hex { width: 92px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.sp-range { width: 100%; accent-color: var(--primary); }
.sp-switch { font-weight: 500; font-size: 12.5px; }
.dash-export { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 16px; border-top: 1px solid var(--line); }
.dash-export > div { display: flex; flex-direction: column; gap: 2px; }
.dash-export small { font-size: 12px; }
.auth-forgot { font-weight: 500; font-size: 12.5px; color: var(--primary-ink); text-decoration: none; }
.auth-forgot:hover { text-decoration: underline; }
.auth-alt { text-align: center; margin: 14px 0 0; font-size: 13px; }
.auth-alt a { color: var(--primary-ink); }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-panel__info { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.45; padding: 10px 12px; background: #f6f6f9; border-radius: 8px; }
.upload-panel__info .btn { align-self: flex-start; }

/* Storage use */
.storage { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 14px; margin-bottom: 16px; }
.storage__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.storage__bar { height: 8px; border-radius: 99px; background: #ececf2; overflow: hidden; }
.storage__bar span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--primary); }
.storage__note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
.storage--warn { background: #fff8e6; border-color: #f3dda0; }
.storage--warn .storage__bar span { background: #d99a00; }
.storage--warn .storage__note { color: #7a5500; }
.storage--full { background: #fdecee; border-color: #f7c9ce; }
.storage--full .storage__bar span { background: #c8343f; }
.storage--full .storage__note { color: #a52734; }
.dash-storage { padding: 14px 18px 2px; border-top: 1px solid var(--line); }
.dash-storage .storage { border: 0; padding: 0; background: none; margin-bottom: 12px; }
.storage__bar.is-warn span { background: #d99a00; }
.storage__bar.is-full span { background: #c8343f; }
.field > .storage__bar { display: block; margin-top: 4px; max-width: 320px; }
.nowrap { white-space: nowrap; }

/* Inbox */
.inbox-forms { display: grid; gap: 10px; }
.inbox-form { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.inbox-form:hover { border-color: var(--line-2); }
.inbox-form__main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inbox-form__main strong { font-size: 15px; }
.inbox-form__counts { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.empty-panel { padding: 28px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.badge--s-new { background: #efedfd; color: #5443d6; }
.badge--s-open { background: #fff3db; color: #9a6a06; }
.badge--s-done { background: #f1f0f5; color: #6a6879; }
.badge--s-confirmed { background: #e3f6ec; color: #15794b; }
.badge--s-waitlist { background: #fff3db; color: #9a6a06; }
.badge--s-cancelled { background: #fdecee; color: #a52734; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13px; }
.chip span { color: var(--muted); font-size: 12px; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active span { color: rgba(255,255,255,.7); }
.inbox-filter { align-items: center; }
.inbox-filter .field__label { margin: 0; white-space: nowrap; }
.inbox-filter .input { max-width: 420px; }
.spots { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin-bottom: 14px; }
.spots > div { padding: 14px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.spots > div:last-child { border-right: 0; }
.spots strong { font-size: 20px; }
.spots small { color: var(--muted); }
td.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.answer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.answer { padding: 6px 0; }
.answer__event { display: flex; gap: 10px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #faf9fd; }
.answers { margin: 0; }
.answers__row { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.answers__row:last-child { border-bottom: 0; }
.answers dt { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.answers dd { margin: 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-side { padding: 16px; display: grid; gap: 14px; margin-bottom: 10px; }
.input--textarea { height: auto; padding: 9px 11px; line-height: 1.45; resize: vertical; }
@media (max-width: 900px) { .answer-layout { grid-template-columns: 1fr; } }

/* Style tab: device switcher (linked to the preview size) */
.sp-devices { display: grid; gap: 6px; padding: 2px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sp-devices .seg__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; }
.sp-devices .seg__btn .icon { width: 15px; height: 15px; }
.sp-devices small { font-size: 12px; line-height: 1.4; }
.sp-devdot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); position: absolute; top: 5px; right: 6px; }
.seg__btn.is-inherited:not(.is-active) { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 45%, transparent); color: var(--primary-ink); }
.sp-vis { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-vis__btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--primary-soft); color: var(--primary-ink); font: 500 13px var(--font); cursor: pointer; }
.sp-vis__btn .icon { width: 15px; height: 15px; }
.sp-vis__btn.is-off { background: var(--surface); color: var(--muted); text-decoration: line-through; }

/* Platform: church addresses */
.domain-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.domain-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: center; }
.domain-list li > small { grid-column: 2; }
.domain-help { grid-column: 2; font-size: 12.5px; line-height: 1.45; color: #9a6a06; }
.domain-pending { color: #9a6a06; }
