/* ==========================================================================
   Postly Design Studio — editor UI
   ========================================================================== */
:root {
    --bg: #0b0b10; --bg2: #121219; --bg3: #191922; --line: #262632; --line2: #34344a;
    --tx: #f4f4f8; --tx2: #a6a6b8; --tx3: #6d6d80;
    --pri: #7c5cff; --pri2: #9a80ff; --pri-glow: rgba(124,92,255,.16);
    --ok: #22c55e; --danger: #ef4444;
    --r: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--tx); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }

.ds-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ---------- top bar ---------- */
.ds-top { height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.ds-brand { display: flex; align-items: center; gap: 9px; font-family: 'Outfit', sans-serif; font-size: 1.02rem; white-space: nowrap; }
.ds-brand img { border-radius: 8px; object-fit: contain; }
.ds-brand b { color: var(--pri2); }
.ds-top-mid, .ds-top-right { display: flex; align-items: center; gap: 4px; }
.ds-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.ds-zoom { min-width: 46px; text-align: center; color: var(--tx2); font-size: .82rem; font-variant-numeric: tabular-nums; }

.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: .86rem; white-space: nowrap; transition: background .15s, border-color .15s; }
.ds-btn.primary { background: linear-gradient(135deg, #7c5cff, #a855f7); color: #fff; box-shadow: 0 6px 18px rgba(124,92,255,.35); }
.ds-btn.primary:hover { filter: brightness(1.08); }
.ds-btn.ghost { border: 1px solid var(--line2); background: var(--bg3); }
.ds-btn.ghost:hover { border-color: var(--pri); }
.ds-btn.sm { height: 32px; padding: 0 10px; font-size: .8rem; }
.ds-btn.full { width: 100%; }
.ds-ibtn { width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--tx2); }
.ds-ibtn:hover { background: var(--bg3); color: var(--tx); }
.ds-ibtn.on { background: var(--pri-glow); color: var(--pri2); }
.ds-ibtn.danger:hover { color: var(--danger); }
.ds-ibtn:disabled { opacity: .35; cursor: default; }

.ds-menu-wrap { position: relative; }
.ds-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.55); display: none; z-index: 60; }
.ds-menu.right { left: auto; right: 0; }
.ds-menu.open { display: block; }
.ds-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-align: left; }
.ds-menu button i { width: 16px; color: var(--pri2); }
.ds-menu button:hover { background: var(--bg3); }
.ds-menu-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tx3); padding: 6px 12px; }
.ds-menu-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- body ---------- */
.ds-body { flex: 1; display: flex; min-height: 0; }
.ds-rail { width: 76px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 6px; gap: 4px; overflow-y: auto; }
.ds-rail button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 2px; border-radius: 10px; color: var(--tx2); font-size: .68rem; font-weight: 600; }
.ds-rail button i { font-size: 1.15rem; }
.ds-rail button:hover { color: var(--tx); background: var(--bg3); }
.ds-rail button.active { color: #fff; background: var(--pri-glow); }
.ds-rail button.active i { color: var(--pri2); }

.ds-panel { width: 320px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--line); overflow-y: auto; position: relative; display: flex; flex-direction: column; }
.ds-panel section { display: none; padding: 16px 14px 10px; }
.ds-panel section.active { display: block; }
.ds-panel h3 { font-family: 'Outfit', sans-serif; font-size: 1.12rem; margin-bottom: 12px; }
.ds-panel h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--tx3); margin: 18px 0 9px; }
.ds-panel-close { display: none; }
.ds-hint { color: var(--tx3); font-size: .78rem; line-height: 1.5; margin: 8px 0; }
.ds-hint i { color: #f5b942; }
.ds-promo { margin: auto 12px 12px; padding: 12px; border-radius: 12px; display: flex; gap: 10px; align-items: center; background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(34,197,94,.1)); border: 1px solid rgba(124,92,255,.35); font-size: .8rem; color: var(--tx2); line-height: 1.4; }
.ds-promo b { color: #fff; }
.ds-promo > i:first-child { color: #f5b942; font-size: 1.1rem; }

/* templates */
.ds-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ds-chips button { padding: 6px 11px; border-radius: 50px; background: var(--bg3); border: 1px solid var(--line); font-size: .76rem; color: var(--tx2); font-weight: 600; }
.ds-chips button.active, .ds-chips button:hover { border-color: var(--pri); color: #fff; background: var(--pri-glow); }
.ds-tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ds-tpl { border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--bg3); transition: transform .15s, border-color .15s; display: flex; flex-direction: column; }
.ds-tpl:hover { transform: translateY(-2px); border-color: var(--pri); }
.ds-tpl .thumb { width: 100%; display: grid; place-items: center; background: #1d1d26; }
.ds-tpl img { width: 100%; height: auto; display: block; }
.ds-tpl span { font-size: .7rem; color: var(--tx2); padding: 6px 7px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* text */
.ds-textadd { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); margin-bottom: 8px; }
.ds-textadd:hover { border-color: var(--pri); }
.ds-textadd.h1 { font-family: 'Outfit'; font-weight: 800; font-size: 1.35rem; }
.ds-textadd.h2 { font-family: 'Outfit'; font-weight: 600; font-size: 1.05rem; }
.ds-textadd.p { font-size: .88rem; color: var(--tx2); }
.ds-textadd.urdu { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.05rem; direction: rtl; text-align: right; line-height: 2.1; padding-top: 4px; padding-bottom: 8px; }
.ds-style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-style { height: 64px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; padding: 4px; text-align: center; line-height: 1.05; }
.ds-style:hover { border-color: var(--pri); }

/* elements */
.ds-el-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ds-el { aspect-ratio: 1; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); display: grid; place-items: center; padding: 10px; }
.ds-el:hover { border-color: var(--pri); }
.ds-el svg { width: 100%; height: 100%; }
.ds-emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ds-emoji-grid button { aspect-ratio: 1; font-size: 1.45rem; border-radius: 8px; }
.ds-emoji-grid button:hover { background: var(--bg3); }

/* uploads */
.ds-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; border: 2px dashed var(--line2); border-radius: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ds-drop i { font-size: 1.6rem; color: var(--pri2); }
.ds-drop span { font-size: .78rem; color: var(--tx3); }
.ds-drop:hover, .ds-drop.over { border-color: var(--pri); background: var(--pri-glow); }
.ds-up-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; }
.ds-up-grid button { aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #222; }
.ds-up-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* background */
.ds-swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ds-swatches.big { grid-template-columns: repeat(4, 1fr); }
.ds-swatches button { aspect-ratio: 1; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); }
.ds-swatches button:hover { transform: scale(1.07); }
.ds-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--tx2); margin: 10px 0; }
.ds-row input[type=range] { width: 130px; accent-color: var(--pri); }
.ds-row input[type=color], .ds-color input { width: 34px; height: 30px; border: 1px solid var(--line2); border-radius: 7px; background: none; padding: 2px; cursor: pointer; }
.ds-check { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--tx2); margin: 10px 0; cursor: pointer; }
.ds-check input { accent-color: var(--pri); width: 16px; height: 16px; }
.ds-input { height: 34px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg3); padding: 0 9px; color: var(--tx); width: 100%; }
.ds-input.num { width: 72px; }
select.ds-input { cursor: pointer; }

/* AI */
.ds-ai-card { background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.ds-ai-card p { color: var(--tx2); font-size: .8rem; line-height: 1.55; margin: 6px 0 10px; }
.ds-ai-card.soon { opacity: .7; }
.ds-ai-head { display: flex; align-items: center; gap: 8px; }
.ds-ai-head i { color: var(--pri2); }
.ds-tag { margin-left: auto; font-size: .66rem; font-weight: 700; padding: 2px 8px; border-radius: 50px; background: rgba(34,197,94,.15); color: var(--ok); }
.ds-tag.soon { background: rgba(245,185,66,.15); color: #f5b942; }
.ds-ideas { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ds-ideas button { text-align: left; padding: 9px 11px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); font-size: .82rem; }
.ds-ideas button:hover { border-color: var(--pri); }

/* layers */
.ds-layers { display: flex; flex-direction: column; gap: 6px; }
.ds-layer { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); font-size: .82rem; text-align: left; }
.ds-layer.sel { border-color: var(--pri); background: var(--pri-glow); }
.ds-layer .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-layer i.k { width: 16px; color: var(--tx3); }
.ds-layer .act { color: var(--tx3); padding: 2px 4px; }
.ds-layer .act:hover { color: #fff; }

/* ---------- workspace ---------- */
.ds-work { flex: 1; position: relative; min-width: 0; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 40%, #16161f, #0b0b10 70%); }
.ds-ctx { min-height: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.ds-ctx[hidden] { display: none; }
.ds-ctx-group { display: flex; align-items: center; gap: 4px; padding-right: 8px; margin-right: 2px; border-right: 1px solid var(--line); }
.ds-ctx-group:last-child { border-right: 0; }
.ds-ctx-group[hidden] { display: none; }
#p-font { width: 150px; }
.ds-color { position: relative; display: inline-grid; place-items: center; }
.ds-color input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.ds-color i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line2); }

.ds-stage { flex: 1; overflow: auto; display: grid; place-items: center; padding: 28px; min-height: 0; }
.ds-canvas-wrap { box-shadow: 0 20px 60px rgba(0,0,0,.6); line-height: 0; background-image: linear-gradient(45deg,#2a2a33 25%,transparent 25%),linear-gradient(-45deg,#2a2a33 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#2a2a33 75%),linear-gradient(-45deg,transparent 75%,#2a2a33 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; background-color: #22222a; }

.ds-pop { position: absolute; top: 56px; right: 14px; z-index: 40; width: 280px; max-height: calc(100% - 70px); overflow-y: auto; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.55); }
.ds-pop h4 { font-size: .9rem; margin-bottom: 6px; }
.ds-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.ds-toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); background: #1f1f2b; border: 1px solid var(--line2); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .85rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 80; max-width: 90%; text-align: center; }
.ds-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* dialog */
.ds-dialog { margin: auto; border: 1px solid var(--line2); border-radius: 14px; background: var(--bg2); color: var(--tx); padding: 18px; width: min(560px, 94vw); }
.ds-dialog::backdrop { background: rgba(0,0,0,.6); }
.ds-dialog h3 { font-family: 'Outfit'; margin-bottom: 12px; }
.ds-size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ds-size-grid button { text-align: left; padding: 10px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); }
.ds-size-grid button:hover { border-color: var(--pri); }
.ds-size-grid b { display: block; font-size: .84rem; }
.ds-size-grid small { color: var(--tx3); font-size: .74rem; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .ds-panel { width: 280px; } }
@media (max-width: 860px) {
    .hide-sm { display: none !important; }
    .ds-body { flex-direction: column-reverse; }
    .ds-rail { width: 100%; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 4px; overflow-x: auto; overflow-y: hidden; flex-shrink: 0; }
    .ds-rail button { flex: 1 0 58px; padding: 7px 2px; }
    .ds-panel { position: absolute; left: 0; right: 0; bottom: 62px; width: auto; height: 46vh; border-right: 0; border-top: 1px solid var(--line2); border-radius: 16px 16px 0 0; z-index: 50; box-shadow: 0 -16px 40px rgba(0,0,0,.5); transform: translateY(110%); transition: transform .25s; }
    .ds-panel:not(.open) { visibility: hidden; transition: transform .25s, visibility 0s .25s; }
    .ds-panel.open { transform: translateY(0); visibility: visible; }
    .ds-panel-close { display: block; position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 8px; background: var(--bg3); z-index: 2; transform: rotate(-90deg); }
    .ds-tpl-grid { grid-template-columns: repeat(3, 1fr); }
    .ds-promo { display: none; }
    .ds-stage { padding: 14px; }
    .ds-pop { top: auto; bottom: 10px; right: 10px; left: 10px; width: auto; max-height: 50vh; }
    .ds-body { position: relative; }
}
@media (max-width: 480px) {
    .hide-xs { display: none !important; }
    .ds-brand span { display: none; }
    .ds-tpl-grid { grid-template-columns: 1fr 1fr; }
    #p-font { width: 118px; }
}

/* ==========================================================================
   v2 additions: photos, icons, QR, brand kit, masks, pages, guides, dialogs
   ========================================================================== */
.ds-input.full { width: 100%; margin-bottom: 8px; }
textarea.ds-input { height: auto; padding: 8px 9px; resize: vertical; line-height: 1.4; }
#tpl-search { margin-bottom: 10px; }
.ds-search { display: flex; gap: 6px; margin-bottom: 10px; }
.ds-search .ds-input { flex: 1; }
.ds-icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ds-icon-grid button { aspect-ratio: 1; border-radius: 8px; background: #f4f4f8; display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); }
.ds-icon-grid button:hover { outline: 2px solid var(--pri); }
.ds-icon-grid img { width: 100%; height: 100%; object-fit: contain; }
#photo-grid button { position: relative; }
#photo-grid button.busy::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='18' fill='none' stroke='%23fff' stroke-width='4' stroke-dasharray='80 40'/%3E%3C/svg%3E") center/30px no-repeat; }
.ds-brand-logo { height: 90px; border-radius: 10px; border: 1px dashed var(--line2); display: grid; place-items: center; background: var(--bg3); margin-bottom: 8px; overflow: hidden; }
.ds-brand-logo img { max-width: 80%; max-height: 80px; object-fit: contain; }
.ds-brand-logo span { color: var(--tx3); font-size: .8rem; }
.ds-brand-colors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ds-brand-colors .sw { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ds-brand-colors input[type=color] { width: 100%; height: 38px; border: 1px solid var(--line2); border-radius: 8px; background: none; padding: 2px; cursor: pointer; }
.ds-brand-colors button { font-size: .66rem; color: var(--tx2); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }
.ds-brand-colors button:hover { color: #fff; border-color: var(--pri); }
.ds-mask-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 6px; }
.ds-mask-grid button { aspect-ratio: 1; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); display: grid; place-items: center; padding: 7px; }
.ds-mask-grid button.on, .ds-mask-grid button:hover { border-color: var(--pri); background: var(--pri-glow); }
.ds-mask-grid svg { width: 100%; height: 100%; }
.ds-canvas-wrap { position: relative; }
.ds-grid-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.ds-guides { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.ds-guides i { position: absolute; background: #ff3ea5; }
.ds-guides i.v { width: 1px; top: 0; bottom: 0; }
.ds-guides i.h { height: 1px; left: 0; right: 0; }
.ds-pages { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg2); border-top: 1px solid var(--line); overflow-x: auto; }
.ds-pages-list { display: flex; gap: 8px; align-items: center; }
.ds-page { position: relative; height: 52px; border-radius: 6px; overflow: hidden; border: 2px solid var(--line2); background: #2a2a33; flex-shrink: 0; }
.ds-page img { height: 100%; display: block; }
.ds-page.cur { border-color: var(--pri); }
.ds-page b { position: absolute; left: 3px; bottom: 2px; font-size: .62rem; background: rgba(0,0,0,.7); color: #fff; padding: 0 4px; border-radius: 4px; line-height: 1.5; }
.ds-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 6px; }
.ds-check-grid label { display: flex; gap: 8px; align-items: center; padding: 9px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); font-size: .8rem; cursor: pointer; }
.ds-check-grid label small { display: block; color: var(--tx3); font-size: .7rem; }
.ds-check-grid input { accent-color: var(--pri); }
.ds-form { display: flex; flex-direction: column; gap: 8px; }
.ds-form label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--tx2); }
.ds-form .ds-check { flex-direction: row; }
.ds-dialog.wide { width: min(860px, 96vw); }
.ds-erase-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0; background: #222; border-radius: 8px; overflow: hidden; }
.ds-erase-wrap canvas { max-width: 100%; height: auto; display: block; }
#erase-mask { position: absolute; left: 0; top: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.ds-ai-out { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
#ai-img-out .res { display: flex; flex-direction: column; gap: 4px; grid-column: span 3; }
#ai-img-out .res img { width: 100%; border-radius: 8px; }
.ds-ai-card .ds-chips { margin: 8px 0; }
.ds-ai-card .ds-chips button { font-size: .7rem; padding: 4px 9px; }
#ai-quota { margin-top: -4px; }
/* bigger handles and buttons on touch screens */
@media (pointer: coarse) {
    .ds-ibtn { width: 42px; height: 42px; }
    .ds-btn.sm { height: 38px; }
    .ds-chips button { padding: 8px 12px; }
}
@media (max-width: 860px) {
    .ds-pages { padding: 4px 8px; }
    .ds-page { height: 40px; }
}
#ai-img-out { grid-template-columns: 1fr; }
#ai-img-out .res { grid-column: auto; }
#ai-img-out .res button { aspect-ratio: auto; height: 32px; background: var(--bg2); overflow: visible; border: 1px solid var(--line2); }

/* ---------- YT & Ads kit ---------- */
.ds-panel h4 small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--tx3); }
.ds-fx-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ds-fx-grid button { border-radius: 9px; border: 1px solid var(--line); background: #f4f4f5; padding: 6px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ds-fx-grid button:hover { outline: 2px solid var(--pri); }
.ds-fx-grid span { font-size: 1.25rem; line-height: 1.2; padding: 0 4px; border-radius: 4px; }
.ds-fx-grid small { font-size: .6rem; color: #52525b; }
.ds-kit-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-kit-list button { font-size: .72rem; font-weight: 800; padding: 7px 10px; min-width: 44px; display: grid; place-items: center; }
.ds-kit-list button:hover { outline: 2px solid var(--pri); }
#kit-safe.on { border-color: var(--pri); background: var(--pri-glow); }
.ds-safe { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.ds-safe > div { position: absolute; border: 2px dashed #ff3ea5; background: rgba(255, 62, 165, .16); }
.ds-safe.feed > div, .ds-safe.yt > div:last-child { background: none; }
.ds-safe span { position: absolute; left: 4px; top: 2px; font: 600 11px/1.3 Inter, sans-serif; color: #fff; background: #ff3ea5; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.ds-safe span:empty { display: none; }
/* feed preview */
.yp-wrap { display: flex; gap: 28px; flex-wrap: wrap; padding: 18px; border-radius: 12px; background: #ffffff; color: #0f0f0f; margin: 10px 0; }
.yp-wrap.dark { background: #0f0f0f; color: #f1f1f1; }
.yp-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .55; margin-bottom: 8px; }
.yp-thumb { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: #3f3f46; }
.yp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yp-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff; font: 600 11px/1 Inter, sans-serif; padding: 3px 5px; border-radius: 4px; }
.yp-meta { display: flex; gap: 10px; margin-top: 10px; }
.yp-av { width: 36px; height: 36px; border-radius: 50%; background: #a1a1aa; flex-shrink: 0; }
.yp-meta b, .yp-sm b { display: block; font-size: .92rem; line-height: 1.35; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.yp-meta small, .yp-sm small { display: block; font-size: .76rem; opacity: .65; margin-top: 4px; line-height: 1.4; }
.yp-side { display: flex; gap: 8px; margin-bottom: 8px; width: 380px; max-width: 100%; }
.yp-side .yp-thumb { border-radius: 8px; flex-shrink: 0; }
.yp-sm b { font-size: .82rem; }
.yp-fake { opacity: .45; }
.yp-card.phone .yp-thumb { border-radius: 0; }
