/* Inviora dashboard */
:root {
  --brand: #7a2e4f; --brand-2: #5e2140; --brand-tint: #f6ecf0; --gold: #c9963f; --bg: #faf7f3; --panel: #ffffff; --ink: #1e1a17; --muted: #6f6760;
  --line: #ebe4da; --line-strong: #cfc4b6; --soft: #f3eee7; --ok: #1f7a52; --warn: #8f5206; --err: #b42318; --wa: #008069; --wa-2: #006b57;
  --r: 12px; --shadow: 0 1px 2px rgba(30,26,23,.05), 0 8px 24px rgba(30,26,23,.06); --ease-out: cubic-bezier(.16, 1, .3, 1);
  --f-head: 'Fraunces', Georgia, serif; --f-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'IBM Plex Sans Arabic', sans-serif;
  color-scheme: light;
}
[dir="rtl"] { --f-head: 'IBM Plex Sans Arabic', system-ui, sans-serif; --f-body: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-body); }
h1, h2, h3 { font-family: var(--f-head); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; text-wrap: balance; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.08rem; }
a { color: var(--brand); text-underline-offset: .2em; text-decoration-thickness: 1px; }
p { margin: 0 0 .8em; text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--ink); }
input, textarea, select { caret-color: var(--brand); }
::placeholder { color: #8a8178; opacity: 1; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px; }
.narrow { max-width: 640px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 20px; }
.ic { flex: none; display: block; }
[dir="rtl"] .ic-flip { transform: scaleX(-1); }
[hidden] { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 9px 18px; border-radius: 999px; font: 600 14px/1.2 var(--f-body); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s var(--ease-out); white-space: nowrap; }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: default; pointer-events: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--soft); border-color: var(--line-strong); }
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: 13px; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-wa { background: var(--wa); border-color: var(--wa); }
.btn-wa:hover { background: var(--wa-2); border-color: var(--wa-2); }
.btn-danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); background: transparent; }
.btn-danger:hover { background: color-mix(in srgb, var(--err) 7%, transparent); }
.link { display: inline-flex; align-items: center; min-height: 36px; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.link:hover { color: var(--brand); }

/* forms */
.fld { display: block; }
.fld > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.fld small { display: block; margin-top: 5px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: 15px/1.4 var(--f-body); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
input[aria-invalid="true"] { border-color: var(--err); }
textarea { resize: vertical; min-height: 84px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 13px; margin-bottom: 8px; padding: 0; }
.alert { background: #fdecea; color: var(--err); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.alert.ok { background: #e7f5ee; color: var(--ok); }
.alert.info { background: #fff4df; color: var(--warn); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 8px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; text-decoration: none; color: var(--ink); font: 600 20px var(--f-head); border-radius: 8px; }
.logo.sm { width: 38px; height: 38px; min-height: 0; justify-content: center; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink); flex: none; }
.logo.sm:hover { background: var(--soft); }
.topnav { display: flex; gap: 2px; flex: 1; }
.topnav a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); text-decoration: none; padding: 0 11px; border-radius: 8px; font-weight: 500; }
.topnav a:hover { color: var(--ink); background: var(--soft); }
.topnav a.on { color: var(--ink); background: var(--soft); }
.topright { display: flex; align-items: center; gap: 8px; }
.topright form { margin: 0; }
.langsw { display: flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; }
.langsw a { display: inline-grid; place-items: center; min-width: 34px; min-height: 28px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--muted); padding: 0 7px; border-radius: 999px; }
.langsw a:hover { color: var(--ink); }
.langsw a.on { background: var(--ink); color: #fff; }
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .topnav { order: 3; flex-basis: 100%; overflow-x: auto; margin-inline: -4px; }
  .topright { margin-inline-start: auto; }
}

/* landing */
.hero-l { max-width: 1120px; margin: 0 auto; padding: 56px 16px 32px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero-l h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.02em; max-width: 15ch; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 36em; }
.hero-copy .row { margin-top: 26px; }
.occ-chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.occ-chips a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; }
.occ-chips a:hover { background: var(--line); }
.hero-phone { display: flex; justify-content: center; }
@media (max-width: 860px) { .hero-l { grid-template-columns: 1fr; padding-top: 32px; gap: 36px; } }
.feats-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 56px; align-items: start; padding-top: 48px; padding-bottom: 48px; }
.feats-wrap > h2 { font-size: clamp(1.5rem, 3vw, 2rem); position: sticky; top: 80px; }
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.feats li { padding: 22px 0; border-top: 1px solid var(--line-strong); }
.feats h3 { display: flex; align-items: center; gap: 10px; margin-bottom: .35em; font-size: 1.12rem; }
.feats h3 .ic { color: var(--brand); }
.feats p { color: var(--muted); margin: 0; max-width: 42ch; }
@media (max-width: 860px) { .feats-wrap { grid-template-columns: 1fr; } .feats-wrap > h2 { position: static; } .feats { grid-template-columns: 1fr; } }
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; gap: 12px; font-weight: 500; font-size: 1.02rem; position: relative; }
.steps span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 18px; inset-inline-start: 48px; inset-inline-end: -12px; height: 1px; background: var(--line-strong); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; gap: 18px; } .steps li { flex-direction: row; align-items: center; } .steps li::after { display: none; } }
.section-head { margin-bottom: 4px; }
.foot { text-align: center; padding: 40px 16px; border-top: 1px solid var(--line); margin-top: 40px; color: var(--muted); }

/* phone frame */
.phone { width: 340px; max-width: 100%; aspect-ratio: 9 / 18.5; border-radius: 44px; border: 10px solid #151515; background: #000; overflow: hidden; box-shadow: 0 30px 60px rgba(30,26,23,.22); position: relative; }
.phone::before { content: ''; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 90px; height: 22px; background: #151515; border-radius: 999px; z-index: 2; }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* templates gallery */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 24px; }
.chips a, .chips button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); text-decoration: none; font: 500 13px var(--f-body); cursor: pointer; }
.chips a:hover, .chips button:hover { background: var(--soft); }
.chips a.on, .chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tgrid { --tw: 240px; --ts: .6154; display: grid; grid-template-columns: repeat(auto-fill, var(--tw)); gap: 28px 22px; justify-content: center; }
@media (max-width: 560px) { .tgrid { --tw: 158px; --ts: .4051; gap: 20px 12px; } }
.tcard { width: var(--tw); }
.tthumb { display: block; width: var(--tw); height: calc(var(--tw) * 16 / 9); border-radius: 16px; overflow: hidden; position: relative; background: var(--soft); box-shadow: var(--shadow); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.tthumb:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(30,26,23,.06), 0 18px 36px rgba(30,26,23,.12); }
.tthumb iframe { width: 390px; height: 693px; border: 0; transform: scale(var(--ts)); transform-origin: 0 0; pointer-events: none; position: absolute; top: 0; left: 0; }
.tmeta { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 12px; }
.tmeta h3 { margin: 0; font-size: 1rem; }
.tmeta p { margin: 2px 0 0; }
.tactions { display: flex; gap: 6px; margin-top: 10px; }
.tactions .btn { flex: 1; min-width: 0; padding-inline: 8px; white-space: normal; text-align: center; line-height: 1.2; }
.tier { font: 600 10px/1.5 var(--f-body); text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; vertical-align: middle; font-style: normal; white-space: nowrap; }
[dir="rtl"] .tier { letter-spacing: 0; }
.tier.free { background: #e7f5ee; color: var(--ok); }
.tier.premium { background: #fbf0dc; color: #7e4f08; }
.swatch { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.swatch i { width: 12px; height: 12px; display: block; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); padding: 23px; }
.plan.current { background: var(--soft); }
.plan .price { font: 600 2rem var(--f-head); margin: 4px 0 14px; font-variant-numeric: tabular-nums; }
.plan .price small { font: 400 13px var(--f-body); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.plan li { padding: 7px 0; border-bottom: 1px solid var(--line); padding-inline-start: 26px; position: relative; }
.plan li::before { content: ''; position: absolute; inset-inline-start: 0; top: 10px; width: 16px; height: 16px; background: var(--ok); -webkit-mask: var(--mask-check) center / contain no-repeat; mask: var(--mask-check) center / contain no-repeat; }
.plan li.muted::before { background: var(--muted); -webkit-mask-image: var(--mask-dash); mask-image: var(--mask-dash); }
:root { --mask-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); --mask-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E"); }
.plan form { margin: 0; }

/* auth */
.auth { display: grid; place-items: center; padding: 56px 16px; }
.auth .panel { width: 100%; max-width: 400px; padding: 28px; }
.auth form > * + * { margin-top: 16px; }
.auth form + form, .auth .switch, .auth .row-links { margin-top: 16px; }
.auth .or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 0; }
.auth .or::before, .auth .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth .row-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
input.code { font: 600 26px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .45em; text-align: center; padding-inline-start: calc(12px + .45em); }
.cf-turnstile { min-height: 65px; }

/* Signed in but email not confirmed yet */
.verify-bar { margin: 0; padding: 10px 18px; background: #fff4df; color: var(--warn); font-size: 14px; text-align: center; border-bottom: 1px solid #f1dfb8; }
.verify-bar a { color: inherit; font-weight: 600; }

/* Account page */
.account { max-width: 720px; }
.account > * + * { margin-top: 18px; }
.account h2 { font-size: 1.15rem; }
.account .acc-name { font: 600 1.2rem/1.3 var(--f-head); margin: 0 0 4px; }
.account p { margin: 0; }
.account .panel > p + form, .account .panel > h2 + form { margin-top: 12px; }
.account .stack > * + * { margin-top: 14px; }
.account .rows { list-style: none; margin: 4px 0 0; padding: 0; }
.account .rows li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.account .rows li:first-child { border-top: 0; }
.account .rows li > .muted { flex-basis: 100%; }
.account .rows li.bad strong { color: var(--err); }
.account .rows + form { margin-top: 12px; }
.account .danger { border-color: color-mix(in srgb, var(--err) 25%, var(--line)); }
.account .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.account .check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--err); }
.pill.ok { background: #e7f5ee; color: var(--ok); }
.pill.warn { background: #fff4df; color: var(--warn); }

/* events list */
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head-row h1, .head-row h3 { margin: 0; }
.empty-state { text-align: center; padding: 56px 20px; }
.elist { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ecard { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.ethumb { width: 104px; flex: none; position: relative; display: grid; place-items: end center; padding: 10px 8px; text-align: center; font: 600 14px/1.15 var(--f-head); overflow: hidden; }
.ethumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ethumb span { position: relative; padding: 4px 6px; text-shadow: 0 1px 8px rgba(255,255,255,.5); overflow-wrap: anywhere; }
.ethumb.dark span { text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.ethumb.dark span { color: #fff; }
.ebody { padding: 14px 16px; flex: 1; min-width: 0; }
.erow { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.erow h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stats b { color: var(--ink); }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.published { background: #e7f5ee; color: var(--ok); }

/* new event */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label, .checks label { cursor: pointer; }
.seg input, .tpick input, .checks input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-weight: 500; transition: background .15s, color .15s; }
.seg label:hover span { background: var(--soft); }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + span, .tpick input:focus-visible + .tp, .checks input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.tpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tpick label { cursor: pointer; position: relative; transition: opacity .2s; }
.tp, .tlist button { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; position: relative; font: 600 13px var(--f-body); color: var(--ink); text-align: start; transition: border-color .15s, transform .2s var(--ease-out); }
.tp img, .tlist button img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--soft); }
.tp b, .tlist button b { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; font-weight: 600; }
.tp em, .tlist button em { position: absolute; top: 6px; inset-inline-end: 6px; }
.tpick label:hover .tp, .tlist button:hover { transform: translateY(-2px); }
.tpick input:checked + .tp, .tlist button.on { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 1px; }
.tpick label.dim { opacity: .4; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.checks label:hover span { background: var(--soft); }
.checks input:checked + span { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); font-weight: 600; }

/* event tabs */
.etabs { display: flex; gap: 2px; overflow-x: auto; }
.etabs a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; font-size: 14px; }
.etabs a:hover { color: var(--ink); background: var(--soft); }
.etabs a.on { background: var(--ink); color: #fff; }
.wrap > .etabs { margin-bottom: 20px; }

/* editor */
.app-editor { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-inline-start: auto; white-space: nowrap; }
.save-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.save-state.saving::before { background: var(--line-strong); animation: pulse 1s ease-in-out infinite alternate; }
.save-state.err { color: var(--err); }
.save-state.err::before { background: var(--err); }
.save-state.dirty { color: var(--warn); }
.save-state.dirty::before { background: var(--gold); }
.ed-actions { display: flex; gap: 6px; }
.ed-body { flex: 1; display: grid; grid-template-columns: minmax(360px, 480px) 1fr; min-height: 0; }
.ed-form { overflow-y: auto; border-inline-end: 1px solid var(--line); background: #fff; padding: 6px 0 96px; scrollbar-width: thin; }
.ed-preview { overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; background: var(--bg); }
.ed-ptools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ltabs { display: flex; gap: 2px; background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.ltabs button { min-height: 30px; border: 0; background: none; padding: 0 12px; border-radius: 999px; font: 600 12px var(--f-body); color: var(--muted); cursor: pointer; }
.ltabs button:hover { color: var(--ink); }
.ltabs button.on { background: var(--brand); color: #fff; }
.pas { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.pas input:not([type]) { width: 170px; min-height: 34px; padding: 5px 12px; font-size: 13px; border-radius: 999px; }
.ed-preview .phone { height: min(780px, calc(100dvh - 130px)); width: auto; max-width: 100%; flex: none; }
.ed-toggle { display: none; position: fixed; bottom: 16px; inset-inline-end: 16px; z-index: 20; box-shadow: 0 10px 24px rgba(30,26,23,.25); }
@media (max-width: 900px) {
  .ed-body { grid-template-columns: 1fr; }
  .ed-preview { display: none; }
  .ed-toggle { display: inline-flex; }
  .app-editor.show-preview .ed-form { display: none; }
  .app-editor.show-preview .ed-preview { display: flex; }
  .ed-top { flex-wrap: wrap; }
  .ed-top .etabs { order: 5; flex-basis: 100%; }
}
.acc { border-bottom: 1px solid var(--line); }
.acc > summary { list-style: none; cursor: pointer; min-height: 56px; padding: 10px 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.acc > summary:hover { background: var(--bg); }
.acc > summary:focus-visible { outline-offset: -2px; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: ''; margin-inline-start: auto; width: 9px; height: 9px; border-inline-end: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease-out); }
.acc[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.acc > summary .ico { width: 32px; height: 32px; border-radius: 9px; background: var(--soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.acc-body { padding: 4px 18px 22px; display: grid; gap: 16px; }
.sub { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; background: var(--bg); }
.sub-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tog { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; font-size: 14px; }
.tog input { width: 38px; height: 22px; appearance: none; -webkit-appearance: none; background: var(--line-strong); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.tog input::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: inset-inline-start .25s var(--ease-out); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tog input:checked { background: var(--brand); }
.tog input:checked::after { inset-inline-start: 18px; }
.optin { align-items: flex-start; gap: 12px; }
.optin input { margin-top: 1px; }
.optin span { display: grid; gap: 2px; }
.optin small { font-size: 13px; }
.lbadge { font: 700 10px/1.6 var(--f-body); font-style: normal; color: var(--brand); background: var(--brand-tint); padding: 0 6px; border-radius: 6px; margin-inline-start: 6px; vertical-align: middle; }
.tlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.tlist button { cursor: pointer; }
.notice { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: #fbf0dc; color: #6e4407; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.media-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.media-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.media-row audio { height: 36px; max-width: 220px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; inset-inline-end: 4px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(20,16,12,.7); color: #fff; cursor: pointer; padding: 0; }
.thumb button:hover { background: rgba(20,16,12,.9); }
.thumb .mv { inset-inline-end: auto; inset-inline-start: 4px; }
.upl { position: relative; overflow: hidden; }
.upl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upl:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.copyrow { display: flex; gap: 6px; margin: 14px 0; align-items: center; }
.copyrow input { font-size: 13px; }
@media (max-width: 560px) { .gapp .copyrow { flex-wrap: wrap; } .gapp .copyrow input { flex-basis: 100%; } }
.dlg { border: 0; border-radius: 18px; padding: 26px; width: min(480px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(20,16,12,.25); }
.dlg::backdrop { background: rgba(20,16,12,.45); }
.dlg h2 { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.dlg h2 .ic { color: var(--gold); }

/* guests */
.gapp { display: grid; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.kpi { padding: 14px 16px; border-inline-start: 1px solid var(--line); }
.kpi:first-child { border-inline-start: 0; }
.kpi b { display: block; font: 600 1.6rem/1.2 var(--f-head); font-variant-numeric: tabular-nums; }
.kpi b small { font: 500 .85rem var(--f-body); color: var(--muted); }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.yes b { color: var(--ok); }
.kpi.no b { color: var(--err); }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpi:nth-child(4) { border-inline-start: 0; } .kpi:nth-child(n+4) { border-top: 1px solid var(--line); } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.addbox { display: grid; gap: 12px; }
.addrow { display: grid; grid-template-columns: 2fr 1.4fr 1fr .7fr .9fr auto; gap: 8px; align-items: end; }
@media (max-width: 760px) { .addrow { grid-template-columns: 1fr 1fr; } .addrow .fld:first-child { grid-column: span 2; } }
.glist { display: grid; gap: 8px; }
.grow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.gname { font-weight: 600; }
.gsub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.gacts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); text-decoration: none; }
.pill.sent { background: #eaf1fb; color: #24548f; }
.pill.opened { background: #f3ecfb; color: #5f3891; }
.pill.yes { background: #e7f5ee; color: var(--ok); }
.pill.no { background: #fdecea; color: var(--err); }
.resp { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; }
.resp.hidden { opacity: .55; }
.resp p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sendbox { text-align: center; }
.sendbox pre { text-align: start; white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 14px; font: 14px/1.5 var(--f-body); max-height: 260px; overflow: auto; }
.toast { position: fixed; z-index: 100; bottom: 24px; left: 50%; translate: -50% 0; max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 14px; font-size: 14px; box-shadow: 0 10px 30px rgba(20,16,12,.25); animation: toast .35s var(--ease-out) both; }
.toast a { color: #fff; }
@media (max-width: 640px) { .grow { grid-template-columns: 1fr; } .gacts { justify-content: flex-start; } }

@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
