/* Platform UI: landing, onboarding, seller panel, super-admin */
:root {
  --ink: #12201f; --ink-2: #4b5a58; --ink-3: #87938f; --line: #e1e6e4; --bg: #f3f6f5; --bg-2: #eaf0ee; --card: #fff;
  --brand: #0e3b43; --brand-2: #155e63; --on-brand: #fff; --accent: #0e3b43; --on-accent: #fff; --sun: #f0a202; --sun-bg: #fff4d6;
  --side: 248px;
}
body.ui { background: var(--bg); }
.ui h1, .ui h2, .ui h3 { letter-spacing: -.3px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.card + .card { margin-top: 14px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 14px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 16px; font-weight: 800; }

/* ---------- landing ---------- */
.lp-nav { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 16px 20px; }
.logo { font-weight: 900; font-size: 20px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo i { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 14px; }
.hero { max-width: 1120px; margin: 0 auto; padding: 30px 20px 50px; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; padding-top: 60px; } }
.hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.35; font-weight: 900; margin: 0 0 16px; }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 32em; margin: 0 0 26px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn { min-height: 52px; padding: 0 26px; font-size: 16px; }
/* chat → product transformation (the memorable bit) */
.morph { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.phone { background: #fff; border-radius: 28px; border: 1px solid var(--line); padding: 14px; box-shadow: 0 24px 60px -24px rgba(14,59,67,.35); }
.phone.chat { background: #dfe9e6; }
.phone .ph-h { font-size: 12px; font-weight: 800; color: var(--ink-2); margin: 0 4px 10px; display: flex; justify-content: space-between; }
.bubble { background: #fff; border-radius: 16px 16px 4px 16px; padding: 6px; font-size: 12.5px; line-height: 1.8; margin-inline-start: 18px; }
.bubble .pic { aspect-ratio: 4/5; border-radius: 12px; background: linear-gradient(160deg, #c9b8a6, #8a6f5a 70%); margin-bottom: 6px; }
.bubble p { margin: 0 6px 4px; white-space: pre-line; }
.bubble .tick { display: block; text-align: left; color: var(--brand-2); font-size: 11px; margin: 0 6px; }
.reply { background: var(--brand); color: #fff; border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-size: 12px; margin: 8px 18px 0 0; }
.shop-tile { display: grid; gap: 3px; grid-template-columns: repeat(2, 1fr); }
.shop-tile span { aspect-ratio: 4/5; border-radius: 6px; background: var(--bg-2); }
.shop-tile span.new { background: linear-gradient(160deg, #c9b8a6, #8a6f5a 70%); position: relative; outline: 3px solid var(--sun); animation: pop .6s 1.2s both; }
.shop-tile span.new::after { content: "۴۵۰٬۰۰۰"; position: absolute; bottom: 4px; right: 4px; background: #fff; border-radius: 99px; padding: 0 6px; font-size: 10px; font-weight: 800; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .shop-tile span.new { animation: none; } }
.lp-sec { max-width: 1120px; margin: 0 auto; padding: 40px 20px; }
.lp-sec h2 { font-size: 26px; font-weight: 900; margin: 0 0 22px; }
.feat { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feat .card h3 { margin: 0 0 6px; font-size: 16px; } .feat .card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plan h3 { margin: 0; } .plan .price { font-size: 28px; font-weight: 900; margin: 6px 0 12px; } .plan ul { padding: 0 18px 0 0; margin: 0 0 16px; color: var(--ink-2); line-height: 2.1; }
.plan.pro { border: 2px solid var(--brand); }
.showcase { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.showcase a { text-decoration: none; } .showcase .cv { aspect-ratio: 4/5; border-radius: 14px; background: var(--bg-2) center/cover; margin-bottom: 6px; }
.lp-foot { text-align: center; color: var(--ink-3); padding: 30px 20px 40px; font-size: 13px; }

/* ---------- onboarding ---------- */
.narrow { max-width: 520px; margin: 0 auto; padding: 24px 18px 60px; }
.steps-dots { display: flex; gap: 6px; margin: 0 0 20px; } .steps-dots i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); } .steps-dots i.on { background: var(--brand); }
.tpl-pick { display: grid; gap: 10px; }
.tpl { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; padding: 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; text-align: right; }
.tpl[aria-pressed="true"] { border-color: var(--brand); }
.tpl .thumb { aspect-ratio: 4/5; border-radius: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 4px; background: var(--bg-2); }
.tpl .thumb i { background: #cbbfb3; border-radius: 2px; } .tpl.soon { opacity: .5; cursor: default; }
.slug-input { display: flex; align-items: stretch; direction: ltr; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.slug-input span { padding: 0 12px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); font-size: 13px; }
.slug-input input { border: 0; outline: 0; flex: 1; padding: 0 12px; min-height: 48px; min-width: 0; }
.slug-input:focus-within { border-color: var(--ink); }

/* ---------- app shell (panel/admin) ---------- */
.app { min-height: 100dvh; }
.side { position: fixed; inset-block: 0; right: 0; width: var(--side); background: var(--brand); color: #d9e7e5; padding: 16px 12px; display: none; flex-direction: column; gap: 4px; z-index: 30; overflow-y: auto; }
@media (min-width: 980px) { .side { display: flex; } .main { margin-right: var(--side); } }
.side .logo { color: #fff; margin: 4px 8px 14px; } .side .logo i { background: var(--sun); color: var(--brand); }
.shop-switch { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.08); border: 0; color: #fff; text-align: right; margin-bottom: 10px; width: 100%; }
.shop-switch img, .shop-switch .av { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 900; flex: none; }
.shop-switch span { display: grid; line-height: 1.4; min-width: 0; } .shop-switch b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .shop-switch small { color: #9fbdb9; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit; font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.on { background: #fff; color: var(--brand); }
.nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav .cnt { margin-inline-start: auto; background: var(--sun); color: var(--brand); border-radius: 99px; font-size: 11.5px; font-weight: 800; padding: 0 8px; }
.side .grow { flex: 1; }
.side .me { font-size: 13px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side .me button { background: none; border: 0; color: #9fbdb9; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 16px; background: rgba(243,246,245,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 18px; margin: 0; font-weight: 900; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .back { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; font-size: 20px; }
.content { padding: 16px; max-width: 1180px; margin: 0 auto; padding-bottom: calc(90px + var(--safe-b)); }
@media (min-width: 980px) { .content { padding: 24px 28px 40px; } }

.btabs { position: fixed; z-index: 40; inset-inline: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(62px + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); }
.btabs a { display: grid; place-items: center; align-content: center; text-decoration: none; font-size: 11px; color: var(--ink-3); position: relative; }
.btabs a.on { color: var(--brand); font-weight: 800; }
.btabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btabs .cnt { position: absolute; top: 6px; left: calc(50% - 22px); background: var(--sun); color: var(--brand); font-size: 10.5px; font-weight: 800; border-radius: 99px; padding: 0 6px; }
@media (min-width: 980px) { .btabs { display: none; } }

/* KPI + chart */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; display: grid; gap: 2px; }
.kpi span { color: var(--ink-2); font-size: 13px; } .kpi b { font-size: 22px; font-weight: 900; }
.kpi.hot { background: var(--sun-bg); border-color: #f5d27a; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 140px; }
.bars div { background: var(--bg-2); border-radius: 6px 6px 2px 2px; position: relative; min-height: 4px; }
.bars div.v { background: var(--brand-2); }
.bars div:hover::after { content: attr(data-t); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.bars-x { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; font-size: 10.5px; color: var(--ink-3); text-align: center; margin-top: 6px; }
.two { display: grid; gap: 14px; } @media (min-width: 980px) { .two { grid-template-columns: 1.4fr 1fr; } .two > .card + .card { margin-top: 0; } }

/* lists & tables */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .input { min-height: 42px; flex: 1; min-width: 180px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding-bottom: 2px; }
.tabs button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; font-size: 13.5px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs button i { font-style: normal; font-size: 11.5px; background: var(--bg-2); color: var(--ink-2); border-radius: 99px; padding: 0 6px; }
.tabs button.on i { background: rgba(255,255,255,.2); color: #fff; }
.list { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; cursor: pointer; }
.li:last-child { border-bottom: 0; } .li:hover { background: #fafcfb; }
.li .thumb { width: 52px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--bg-2); }
.li .t { display: grid; min-width: 0; line-height: 1.6; } .li .t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .li .t small { color: var(--ink-3); }
.li .e { display: grid; justify-items: end; gap: 4px; font-size: 13.5px; }
.li input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-2); } .empty-state h3 { margin: 0 0 6px; color: var(--ink); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th, .tbl td { text-align: right; padding: 10px; border-bottom: 1px solid var(--line); } .tbl th { color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.bulkbar { position: sticky; bottom: calc(70px + var(--safe-b)); z-index: 15; display: flex; gap: 8px; align-items: center; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 14px; margin-top: 10px; }
.bulkbar .btn { min-height: 34px; padding: 0 12px; font-size: 13px; background: rgba(255,255,255,.12); color: #fff; }
@media (min-width: 980px) { .bulkbar { bottom: 16px; } }
.fab { position: fixed; z-index: 35; left: 18px; bottom: calc(78px + var(--safe-b)); width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--sun); color: var(--brand); font-size: 30px; box-shadow: 0 10px 24px rgba(14,59,67,.25); display: grid; place-items: center; text-decoration: none; }
@media (min-width: 980px) { .fab { display: none; } }

/* product editor */
.editor { display: grid; gap: 14px; } @media (min-width: 980px) { .editor { grid-template-columns: 1fr 340px; align-items: start; } .editor aside { position: sticky; top: 76px; } }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.imgs .im { position: relative; aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: var(--bg-2); cursor: grab; }
.imgs .im img { width: 100%; height: 100%; object-fit: cover; }
.imgs .im button { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; }
.imgs .im:first-child::after { content: "کاور"; position: absolute; bottom: 4px; right: 4px; background: #fff; border-radius: 99px; font-size: 10.5px; padding: 0 6px; font-weight: 800; }
.imgs .im.dragging { opacity: .4; }
.imgs .add { aspect-ratio: 4/5; border-radius: 12px; border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--ink-3); cursor: pointer; text-align: center; font-size: 13px; background: #fff; }
.imgs .add.busy { animation: sk 1s infinite; background: linear-gradient(90deg, #fff, var(--bg-2), #fff); background-size: 200% 100%; }
.opt-row { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.opt-row .tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 8px; background: #fff; }
.opt-row .tags span { background: var(--bg-2); border-radius: 99px; padding: 2px 6px 2px 10px; font-size: 13.5px; display: inline-flex; gap: 4px; align-items: center; }
.opt-row .tags span button { border: 0; background: none; color: var(--ink-3); font-size: 15px; line-height: 1; }
.opt-row .tags input { border: 0; outline: 0; flex: 1; min-width: 90px; min-height: 30px; }
.vtable { width: 100%; border-collapse: collapse; } .vtable td, .vtable th { padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; text-align: right; }
.vtable input { width: 100%; min-height: 38px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 8px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; } .presets button { border: 1px dashed var(--line); background: #fff; border-radius: 99px; padding: 3px 12px; font-size: 12.5px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; } .switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand-2); } .switch input:checked + span::after { right: 21px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.srow > div { display: grid; } .srow small { color: var(--ink-3); }

/* payment review — receipt beside details */
.review { display: grid; gap: 14px; } @media (min-width: 860px) { .review { grid-template-columns: 1fr 1fr; } }
.receipt-view { background: #1d2b2a; border-radius: 16px; min-height: 280px; display: grid; place-items: center; overflow: hidden; }
.receipt-view img { max-height: 70vh; width: 100%; object-fit: contain; cursor: zoom-in; }
.receipt-view.zoom img { max-height: none; cursor: zoom-out; }
.kv { display: grid; gap: 0; margin: 0; } .kv div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 700; text-align: left; }
.match { font-size: 12.5px; padding: 2px 8px; border-radius: 99px; } .match.ok { background: var(--ok-bg); color: var(--ok); } .match.no { background: var(--err-bg); color: var(--err); }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.decide .btn { min-height: 54px; font-size: 16px; }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { position: relative; padding: 0 22px 14px 0; font-size: 13.5px; } .timeline li::before { content: ""; position: absolute; right: 4px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-2); } .timeline li::after { content: ""; position: absolute; right: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); } .timeline li:last-child::after { display: none; }

/* inbox */
.inbox { display: grid; height: calc(100dvh - 140px); background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
@media (min-width: 860px) { .inbox { grid-template-columns: 320px 1fr; height: calc(100dvh - 110px); } }
.convs { overflow-y: auto; border-left: 1px solid var(--line); } .conv { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; } .conv.on { background: var(--bg-2); }
.conv .av { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-weight: 800; flex: none; }
.conv div { display: grid; min-width: 0; } .conv small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat { display: flex; flex-direction: column; min-height: 0; background: #e9efed; }
.msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 75%; padding: 7px 12px; border-radius: 14px; background: #fff; font-size: 14.5px; white-space: pre-wrap; }
.msg.me { align-self: flex-start; background: #d6ede5; } .msg time { display: block; font-size: 10.5px; color: var(--ink-3); text-align: left; }
.composer { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid var(--line); } .composer textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; }
@media (max-width: 859px) { .inbox.open .convs { display: none; } .inbox:not(.open) .chat { display: none; } }

.code-box { font-family: ui-monospace, monospace; direction: ltr; background: var(--ink); color: #e7f3ef; border-radius: 12px; padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.8; white-space: pre; }
.bigcode { font-size: 34px; font-weight: 900; letter-spacing: 6px; text-align: center; direction: ltr; padding: 12px; border: 2px dashed var(--brand-2); border-radius: 14px; margin: 10px 0; }
.dns { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13.5px; } .dns dt { color: var(--ink-3); } .dns dd { margin: 0; direction: ltr; text-align: left; font-weight: 700; word-break: break-all; }
.acc-row { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; position: relative; }
.acc-row .rm { position: absolute; top: 8px; left: 8px; }
.lp-nav-r { display: flex; gap: 14px; align-items: center; }
.lp-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; } .lp-links a { color: var(--ink-2); }
.pblog { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pb-card { padding: 0; overflow: hidden; } .pb-card a { text-decoration: none; } .pb-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.pb-card h2, .pb-card h3 { font-size: 17px; margin: 12px 16px 6px; line-height: 1.6; } .pb-card p, .pb-card small { margin: 0 16px 12px; display: block; color: var(--ink-2); }
.pb-article h1 { font-size: clamp(26px, 6vw, 36px); line-height: 1.5; margin: 6px 0; }
.prose-body { font-size: 16.5px; line-height: 2.15; } .prose-body h2 { font-size: 21px; margin: 26px 0 8px; } .prose-body img { border-radius: 14px; }
.prose-body blockquote { margin: 16px 0; padding: 4px 16px; border-inline-start: 3px solid var(--brand-2); color: var(--ink-2); }

/* ===== v1.2 panel ===== */
.seo-card summary { cursor: pointer; list-style: none; } .seo-card summary::-webkit-details-marker { display: none; }
.seo-card[open] summary { margin-bottom: 12px; }
.serp { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); margin-bottom: 14px; font-family: Vazirmatn, Tahoma, sans-serif; }
.serp-url { color: #1d6b3a; font-size: 12.5px; direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { color: #1a0dab; font-size: 17px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-desc { color: #4d5156; font-size: 13.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cnt { font-weight: 400; font-size: 12px; float: left; }
.md { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.md-bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--line); background: var(--bg); }
.md-bar button, .md-img { border: 0; background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
.md-bar button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.md-ta { border: 0; border-radius: 0; min-height: 320px; font-size: 15px; line-height: 2; }
.md-ta:focus { border: 0; } .md-prev { padding: 14px 16px; min-height: 320px; }
.smart-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.smart-btn { text-align: right; border: 1.5px dashed var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.smart-btn:hover { border-color: var(--brand-2); } .smart-btn small { color: var(--ink-3); line-height: 1.7; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg-2); border-radius: 999px; padding: 4px; }
.seg3 label { cursor: pointer; } .seg3 input { position: absolute; opacity: 0; }
.seg3 span { display: grid; place-items: center; min-height: 38px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.seg3 input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg3 input:focus-visible + span { outline: 2px solid var(--brand); }
label.chip { cursor: pointer; } label.chip.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.cart-thumbs { display: flex; } .cart-thumbs img, .cart-thumbs i { width: 40px; height: 50px; border-radius: 8px; object-fit: cover; background: var(--bg-2); border: 2px solid #fff; margin-inline-start: -14px; }
.cart-thumbs img:first-child, .cart-thumbs i:first-child { margin-inline-start: 0; }
.cover-pick { display: grid; place-items: center; aspect-ratio: 16/10; border: 1.5px dashed var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; color: var(--ink-3); }
.cover-pick img { width: 100%; height: 100%; object-fit: cover; }
details.card > summary { cursor: pointer; }

/* ===== v1.3 panel ===== */
.slide-row { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
@media (min-width: 760px) { .slide-row { grid-template-columns: 260px 1fr; } }
.slide-row.off { opacity: .55; }
.slide-imgs { display: grid; grid-template-columns: 3fr 1.2fr; gap: 8px; }
.slide-img { aspect-ratio: 16/7; border: 1.5px dashed var(--line); border-radius: 10px; display: grid; place-items: center; overflow: hidden; cursor: pointer; color: var(--ink-3); font-size: 12px; background: #fff; }
.slide-img.m { aspect-ratio: 4/5; } .slide-img img { width: 100%; height: 100%; object-fit: cover; }
.slide-fields { display: grid; gap: 8px; } .slide-fields .input { min-height: 42px; }
.slide-opts { display: flex; gap: 8px; flex-wrap: wrap; } .slide-opts .select { width: auto; min-height: 40px; } .slide-acts { margin-inline-start: auto; display: flex; gap: 4px; }
.style-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sp { border: 2px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; display: grid; gap: 4px; background: #fff; }
.sp:has(input:checked) { border-color: var(--brand); } .sp input { position: absolute; opacity: 0; } .sp small { color: var(--ink-3); font-size: 12px; }
.sp-prev { height: 54px; display: flex; gap: 5px; align-items: center; margin-bottom: 4px; }
.sp-prev i { background: var(--bg-2); flex: none; }
.sp-stories i { width: 30px; height: 30px; border-radius: 50%; outline: 2px solid #d9c6b4; outline-offset: 2px; }
.sp-cards { display: grid; grid-template-columns: repeat(4, 1fr); } .sp-cards i { aspect-ratio: 1; border-radius: 6px; background: linear-gradient(160deg, #d8c3ae, #9b7b62); }
.sp-tiles i { width: 60px; height: 38px; border-radius: 6px; background: linear-gradient(160deg, #d8c3ae, #9b7b62); }
.sp-chips i { width: 34px; height: 18px; border-radius: 99px; border: 1.5px solid #cfd8d5; background: #fff; }
.sp-hidden i { display: none; } .sp-hidden::after { content: "—"; color: var(--ink-3); }
.cat-attr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-bottom: 6px; }
.cat-checks { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
