/* Studio – design system */
:root {
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-2: #F1F1EE;
  --surface-3: #E9E9E5;
  --border: #E6E6E1;
  --border-strong: #D3D3CC;
  --text: #121212;
  --text-2: #55554F;
  --text-3: #8C8C85;
  --accent: #121212;
  --accent-text: #FFFFFF;
  --focus: #3B5BFD;
  --up: #12805C;
  --up-bg: #E3F4EC;
  --down: #C2410C;
  --down-bg: #FCEBE1;
  --warn: #B45309;
  --warn-bg: #FEF3C7;
  --info: #3B5BFD;
  --info-bg: #E8ECFF;
  --st-new: #3B5BFD;
  --st-review: #B45309;
  --st-approved: #12805C;
  --st-rejected: #C2410C;
  --st-posted: #7C3AED;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;
  --shadow-1: 0 1px 2px rgba(18, 18, 18, .05);
  --shadow-2: 0 2px 8px rgba(18, 18, 18, .06), 0 1px 2px rgba(18, 18, 18, .04);
  --shadow-3: 0 24px 60px -12px rgba(18, 18, 18, .25), 0 2px 6px rgba(18, 18, 18, .06);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sidebar: 232px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --logo-dot: #FFFFFF;
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #0E0E0F;
  --surface: #161617;
  --surface-2: #1E1E20;
  --surface-3: #27272A;
  --border: #26262A;
  --border-strong: #36363B;
  --text: #F2F2F0;
  --text-2: #B4B4AE;
  --text-3: #7C7C77;
  --accent: #F2F2F0;
  --accent-text: #111111;
  --up: #34D399;
  --up-bg: #0F2A21;
  --down: #FB923C;
  --down-bg: #2E1A0E;
  --warn: #FBBF24;
  --warn-bg: #2A220C;
  --info: #8EA2FF;
  --info-bg: #161C38;
  --st-new: #8EA2FF;
  --st-review: #FBBF24;
  --st-approved: #34D399;
  --st-rejected: #FB923C;
  --st-posted: #C4B5FD;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 2px 10px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 60px -12px rgba(0, 0, 0, .7);
  --logo-dot: #111111;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--info-bg); }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 18px 12px; border-right: 1px solid var(--border); background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand .ic { color: var(--text); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-s);
  color: var(--text-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--border); }
.nav .badge { margin-left: auto; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 18px 10px 6px; font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.me-card:hover { background: var(--surface-2); }
.main { min-width: 0; }
.page { padding: 28px 36px 64px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.025em; margin: 0; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.mobile-bar { display: none; }

/* ---------- Avatar ---------- */
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 650; color: #fff; letter-spacing: .02em;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.bot { background: var(--text) !important; color: var(--bg); }
.avatar.bot .ic { width: 62%; height: 62%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-s); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  box-shadow: var(--shadow-1); user-select: none;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover { opacity: .9; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--down); }
.btn.danger:hover { background: var(--down-bg); border-color: var(--down); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.btn-group button { border: 0; background: none; height: 34px; padding: 0 12px; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.btn-group button + button { border-left: 1px solid var(--border); }
.btn-group button.on { background: var(--surface-2); color: var(--text); }
.btn-group.sm button { height: 28px; padding: 0 9px; font-size: 12.5px; }

/* Rating buttons */
.rate { display: inline-flex; gap: 6px; }
.rate button {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; color: var(--text-2);
  transition: all .15s var(--ease);
}
.rate button:hover { color: var(--text); border-color: var(--text-3); }
.rate button.up.on { background: var(--up-bg); color: var(--up); border-color: var(--up); }
.rate button.down.on { background: var(--down-bg); color: var(--down); border-color: var(--down); }
.rate button .n { font-variant-numeric: tabular-nums; font-size: 13px; }
.rate.lg button { height: 48px; padding: 0 22px; font-size: 15px; }
.rate.lg button .ic { width: 22px; height: 22px; }
.rate button.pop { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.12); } }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-s); border: 1px solid var(--border-strong);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--text-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.input.sm, .select.sm { height: 32px; font-size: 13px; padding: 0 10px; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238C8C85' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 38px; }
.input-icon kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-3); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--text); }
input[type=range] { accent-color: var(--text); width: 100%; }
input[type=color] { width: 36px; height: 36px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: none; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer;
  font-weight: 550; font-size: 13px; white-space: nowrap; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip .x { opacity: .6; margin-right: -4px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.mono { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.badge.solid { background: var(--text); color: var(--bg); }
.badge.up { background: var(--up-bg); color: var(--up); }
.badge.down { background: var(--down-bg); color: var(--down); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--text-3)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--text-3)) 18%, transparent); }
.status.new { --c: var(--st-new); } .status.review { --c: var(--st-review); } .status.approved { --c: var(--st-approved); }
.status.rejected { --c: var(--st-rejected); } .status.posted { --c: var(--st-posted); }
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; color: var(--text-2); }
.cat::before { content: ''; width: 8px; height: 8px; border-radius: 2.5px; background: var(--c); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-pad { padding: 20px; }
.card h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.01em; }
.section-title { font-size: 13px; font-weight: 650; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; gap: 12px; cursor: pointer; transition: border-color .15s, transform .15s; text-align: left; }
.stat:hover { border-color: var(--border-strong); }
.stat .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.stat .v { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--text-2); }

/* ---------- Toolbar / Filters ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 240px; max-width: 560px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-pop { position: relative; }
.pop {
  position: fixed; z-index: 95; min-width: 220px; max-width: calc(100vw - 16px); max-height: 360px; overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: 6px;
  animation: popIn .14s var(--ease);
}
.pop-backdrop { position: fixed; inset: 0; z-index: 94; background: rgba(10, 10, 10, .4); animation: fadeIn .15s; }
.pop.sheet {
  left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%; max-width: none; min-width: 0 !important; max-height: 78dvh;
  border-radius: 18px 18px 0 0; border-width: 1px 0 0; padding: 22px 10px calc(env(safe-area-inset-bottom) + 12px);
  animation: sheetUp .26s cubic-bezier(.22, .8, .25, 1);
}
.pop.sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border-strong); }
.pop.sheet .pop-item { min-height: 48px; font-size: 15px; padding: 10px 12px; border-radius: 10px; }
.pop.sheet .pop-head { padding: 6px 12px; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.pop-item:disabled { opacity: .4; pointer-events: none; }
.m-only { display: none !important; }
.ed-sep { width: 1px; height: 24px; background: var(--border); }
.ed-panel-body { display: contents; }
.ed-export { gap: 8px; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: .4; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--text); font-size: 13.5px; }
.pop-item:hover { background: var(--surface-2); }
.pop-item .ck { margin-left: auto; color: var(--text); opacity: 0; }
.pop-item.on .ck { opacity: 1; }
.pop-item .cnt { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.pop-item.on .cnt { margin-left: 8px; }
.pop-item.danger { color: var(--down); }
.pop-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.pop-head { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 8px 10px 4px; }
.pop .input { margin: 4px 0; }

/* ---------- Day groups & grid ---------- */
.day { margin-bottom: 30px; }
.day-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; position: sticky; top: 0; z-index: 5; padding: 10px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.day-head h2 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.day-head span { color: var(--text-3); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.grid.dense { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.grid.dense .pc-body { display: none; }

.pc { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; cursor: pointer; }
.pc:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.pc.selected { outline: 2px solid var(--text); outline-offset: 2px; }
.pc-media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.pc-media.r-1-1 img, .pc-media.r-1-91-1 img, .pc-media.r-9-16 img { object-fit: contain; background: var(--surface-3); }
.pc-track { display: flex; height: 100%; }
.pc-track img { width: 100%; height: 100%; object-fit: cover; flex: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pc-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.pc-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 2px rgba(0, 0, 0, .3); transition: all .2s; }
.pc-dots i.on { background: #fff; width: 14px; border-radius: 3px; }
.pc-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #111; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.pc-nav.l { left: 8px; } .pc-nav.r { right: 8px; }
.pc:hover .pc-nav { opacity: 1; }
.pc-nav:disabled { opacity: 0 !important; }
.pc-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; align-items: flex-start; pointer-events: none; }
.pc-pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(17, 17, 17, .72); color: #fff; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; }
.pc-pill .ic { width: 13px; height: 13px; }
.pc-sel { pointer-events: auto; margin-left: auto; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, .9); background: rgba(17, 17, 17, .25); display: grid; place-items: center; color: transparent; cursor: pointer; opacity: 0; transition: opacity .15s; }
.pc:hover .pc-sel, .selecting .pc-sel { opacity: 1; }
.pc.selected .pc-sel { background: #fff; color: #111; opacity: 1; }
.pc-body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.pc-title { font-weight: 600; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 12px; min-width: 0; }
.pc-foot { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pc-foot .k { display: inline-flex; align-items: center; gap: 4px; }
.pc-foot .k.up { color: var(--up); } .pc-foot .k.down { color: var(--down); }
.pc-foot .ic { width: 14px; height: 14px; }
.pc-quick { display: flex; flex: none; gap: 6px; opacity: 0; transform: translateY(4px); transition: all .18s var(--ease); }
.pc:hover .pc-quick { opacity: 1; transform: none; }
.pc-quick button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: #111; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); transition: transform .12s; }
.pc-quick button:hover { transform: scale(1.08); }
.pc-quick button.up.on { background: #12805C; color: #fff; }
.pc-quick button.down.on { background: #C2410C; color: #fff; }

/* List view */
.list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.li { display: grid; grid-template-columns: 56px minmax(0, 2fr) 1fr 110px 120px 110px; gap: 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface-2); }
.li-thumb { width: 56px; height: 70px; border-radius: 8px; overflow: hidden; background: var(--surface-2); position: relative; }
.li-thumb img { width: 100%; height: 100%; object-fit: cover; }
.li-thumb .stack-n { position: absolute; right: 3px; top: 3px; }

/* Selection bar */
.selbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-3); animation: slideUp .2s var(--ease); }
.selbar .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 25%, transparent); box-shadow: none; }
.selbar .btn:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); }
@keyframes slideUp { from { transform: translate(-50%, 16px); opacity: 0; } }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 72px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty h3 { margin: 14px 0 0; font-size: 17px; letter-spacing: -.01em; }
.empty p { margin: 0 0 12px; color: var(--text-2); max-width: 420px; }

/* ---------- Skeleton ---------- */
.skel { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Modal / Drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 10, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fadeIn .15s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-3); animation: modalIn .2s var(--ease); }
.modal.wide { max-width: 760px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.modal-head p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 22px 20px; }

/* Post viewer (full screen) */
.viewer { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: grid; grid-template-columns: minmax(0, 1fr) 420px; animation: fadeIn .15s; }
.viewer-stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface-2); }
.viewer-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; min-height: 64px; }
.vt-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.vt-title b { font-size: 14px; font-weight: 650; }
.vt-title span { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-3); flex: none; }
.seg button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.vt-nav { flex: none; }
.viewer-canvas { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 18px 16px; }
.viewer-foot:empty { display: none; }
.viewer-strip { display: flex; gap: 8px; justify-content: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.viewer-strip::-webkit-scrollbar { display: none; }
.strip-item { position: relative; flex: none; height: 64px; max-width: 72px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 0; outline: 2px solid transparent; outline-offset: 2px; opacity: .55; transition: opacity .2s, outline-color .2s; background: var(--surface); padding: 0; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.strip-item.on { outline-color: var(--text); opacity: 1; }
.strip-item:hover { opacity: 1; }
.strip-item .mk { position: absolute; bottom: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.strip-item .mk.up { background: #12805C; } .strip-item .mk.down { background: #C2410C; }
.strip-item .mk .ic { width: 11px; height: 11px; }
.vs-mrate { display: none; }
.vs-hint { font-size: 11.5px; text-align: center; }
.viewer-arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-2); color: var(--text); transition: opacity .2s, transform .15s; }
.viewer-arrow:hover { transform: translateY(-50%) scale(1.05); }
.viewer-arrow.l { left: 16px; } .viewer-arrow.r { right: 16px; }
.viewer-arrow:disabled { opacity: 0; pointer-events: none; }

/* slide mode – swipe track */
.vs { position: absolute; inset: 0; overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; }
.vs:active { cursor: grabbing; }
.vs-track { display: flex; height: 100%; }
.vs-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; transition: opacity .35s; opacity: .35; }
.vs-slide.cur { opacity: 1; }
.vs-frame { position: relative; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-3); background: var(--surface); cursor: crosshair; }
.vs-frame img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.vs-pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; width: 26px; height: 26px; margin: -26px 0 0 -13px; color: #fff; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); pointer-events: auto; cursor: pointer; display: grid; place-items: center; }
.pin svg { width: 26px; height: 26px; }
.pin b { position: absolute; top: 4px; font-size: 10.5px; font-weight: 700; color: #111; }
.pin.draft { animation: pop .3s; pointer-events: none; }
.pin.kind-recommendation { color: #FBBF24; } .pin.kind-todo { color: #8EA2FF; } .pin.resolved { opacity: .45; }

/* all slides */
.vs-all { position: absolute; inset: 0; overflow: auto; padding: 8px 24px 24px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-content: flex-start; }
.vs-all-item { position: relative; width: min(240px, calc(50% - 8px)); padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--surface); cursor: zoom-in; box-shadow: var(--shadow-2); outline: 2px solid transparent; outline-offset: 3px; transition: transform .2s var(--ease), outline-color .2s; }
.vs-all-item:hover { transform: translateY(-2px); }
.vs-all-item.on { outline-color: var(--text); }
.vs-all-item img { width: 100%; display: block; object-fit: cover; }
.vs-all-item .pc-pill { position: absolute; top: 8px; left: 8px; }
.vs-all-r { position: absolute; bottom: 8px; right: 8px; display: inline-flex; gap: 8px; height: 24px; padding: 0 8px; border-radius: 6px; background: rgba(17, 17, 17, .72); backdrop-filter: blur(6px); font-size: 12px; font-weight: 650; align-items: center; }
.vs-all-r span { display: inline-flex; gap: 3px; align-items: center; }

/* Instagram feed mock – always IG light look */
.viewer-canvas[data-m='feed'] { overflow: auto; align-items: flex-start; padding: 8px 16px 24px; }
.ig-phone { width: min(400px, 100%); margin: auto; background: #fff; color: #0f0f0f; border-radius: 14px; box-shadow: var(--shadow-3); overflow: hidden; font-size: 13.5px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
.ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 600; }
.ig-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #111; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d62976; flex: none; }
.ig-media { position: relative; overflow: hidden; background: #efefef; user-select: none; cursor: grab; }
.ig-media:active { cursor: grabbing; }
.ig-track { display: flex; height: 100%; }
.ig-cell { flex: 0 0 100%; height: 100%; }
.ig-cell img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ig-count { position: absolute; top: 12px; right: 12px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(18, 18, 18, .7); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.ig-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: #111; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: opacity .2s; }
.ig-arrow .ic { width: 16px; height: 16px; }
.ig-arrow.l { left: 10px; } .ig-arrow.r { right: 10px; }
.ig-arrow:disabled { opacity: 0; pointer-events: none; }
.ig-acts { display: flex; align-items: center; gap: 14px; padding: 10px 12px 6px; position: relative; }
.ig-acts > .ic:last-child { margin-left: auto; }
.ig-dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.ig-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; transition: background .2s, transform .2s; }
.ig-dots i.on { background: #0095f6; transform: scale(1.1); }
.ig-likes { padding: 0 12px; font-weight: 600; }
.ig-cap { padding: 4px 12px 0; white-space: pre-wrap; word-break: break-word; }
.ig-tags { color: #00376b; }
.ig-time { padding: 6px 12px 14px; color: #737373; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }

/* Instagram story */
.ig-story-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.ig-story-wrap .viewer-arrow { position: absolute; }
.ig-story-wrap .viewer-arrow.l { left: -62px; } .ig-story-wrap .viewer-arrow.r { right: -62px; }
.ig-story { position: relative; border-radius: 14px; overflow: hidden; background: #000; color: #fff; box-shadow: var(--shadow-3); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; cursor: pointer; }
.ig-sframes, .ig-sf { position: absolute; inset: 0; }
.ig-sf { opacity: 0; transition: opacity .18s; display: flex; align-items: center; justify-content: center; }
.ig-sf.on { opacity: 1; }
.ig-sf img { pointer-events: none; -webkit-user-drag: none; }
.ig-sf .bg { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(28px) brightness(.55) saturate(1.2); }
.ig-sf .fg { position: relative; width: 100%; object-fit: contain; }
.ig-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 18%, transparent 80%, rgba(0, 0, 0, .4)); transition: opacity .2s; }
.ig-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 3px; transition: opacity .2s; }
.ig-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.ig-bars b { display: block; height: 100%; width: 0; background: #fff; }
.ig-shead { position: absolute; top: 22px; left: 12px; right: 6px; display: flex; align-items: center; gap: 8px; font-size: 13px; transition: opacity .2s; }
.ig-shead .ig-av { width: 30px; height: 30px; box-shadow: none; border: 1.5px solid rgba(255, 255, 255, .7); }
.ig-shead .o { opacity: .7; font-size: 12.5px; }
.ig-shead button { width: 40px; height: 40px; border: 0; background: none; color: #fff; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.ig-shead button:hover { background: rgba(255, 255, 255, .12); }
.ig-reply { position: absolute; left: 12px; right: 12px; bottom: 14px; display: flex; align-items: center; gap: 14px; transition: opacity .2s; pointer-events: none; }
.ig-reply span { flex: 1; height: 42px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 21px; display: flex; align-items: center; padding: 0 16px; font-size: 13.5px; opacity: .9; }
.ig-story.held .ig-bars, .ig-story.held .ig-shead, .ig-story.held .ig-reply, .ig-story.held .ig-shade { opacity: 0; }

.viewer-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border); background: var(--surface); }
.side-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.side-head h2 { margin: 6px 0 2px; font-size: 18px; letter-spacing: -.02em; line-height: 1.3; }
.tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.tabs button { border: 0; background: none; padding: 11px 8px; margin: 0 2px; cursor: pointer; color: var(--text-3); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--text); border-color: var(--text); }
.tabs button .badge { height: 18px; }
.side-body { flex: 1; overflow: auto; padding: 18px 20px; }
.side-foot { border-top: 1px solid var(--border); padding: 12px 14px; }
.rate-panel { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 18px; }
.rate-panel .label { font-size: 12px; }

/* Notes */
.notes { display: flex; flex-direction: column; gap: 10px; }
.note { display: flex; gap: 10px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.note.kind-recommendation { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); background: color-mix(in srgb, var(--warn-bg) 50%, var(--surface)); }
.note.kind-todo { border-color: color-mix(in srgb, var(--info) 40%, var(--border)); background: color-mix(in srgb, var(--info-bg) 50%, var(--surface)); }
.note.resolved { opacity: .6; }
.note.resolved .note-body { text-decoration: line-through; text-decoration-color: var(--text-3); }
.note-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-bottom: 3px; flex-wrap: wrap; }
.note-head b { color: var(--text); font-weight: 600; font-size: 12.5px; }
.note-body { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.note-actions { display: flex; gap: 2px; margin-top: 6px; }
.note-actions button { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 5px; display: inline-flex; align-items: center; gap: 4px; font-weight: 550; }
.note-actions button:hover { background: var(--surface-2); color: var(--text); }
.composer { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--text-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 15%, transparent); }
.composer textarea { width: 100%; border: 0; outline: none; background: none; resize: none; padding: 10px 12px 4px; min-height: 44px; max-height: 180px; }
.composer-bar { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; }
.kind-sw { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 2px; }
.kind-sw button { border: 0; background: none; height: 26px; padding: 0 8px; border-radius: 6px; cursor: pointer; color: var(--text-3); display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 600; }
.kind-sw button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.kind-sw button .ic { width: 14px; height: 14px; }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.block { margin-bottom: 20px; }
.block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 0 0 8px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.prose { white-space: pre-wrap; font-size: 13.5px; }
.code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; position: relative; }
.copyable { display: flex; gap: 6px; align-items: stretch; }
.copyable .code { flex: 1; margin: 0; }

/* Timeline */
.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.tl-item:last-child { border: 0; }
.tl-text { flex: 1; min-width: 0; font-size: 13.5px; }
.tl-text b { font-weight: 600; }
.tl-text a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.tl-time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.tl-thumb { width: 36px; height: 45px; border-radius: 6px; object-fit: cover; background: var(--surface-2); flex: none; }
.tl-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.tl-ico.up { background: var(--up-bg); color: var(--up); } .tl-ico.down { background: var(--down-bg); color: var(--down); }
.tl-ico.warn { background: var(--warn-bg); color: var(--warn); } .tl-ico.info { background: var(--info-bg); color: var(--info); }
.tl-ico .ic { width: 15px; height: 15px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: var(--text); color: var(--bg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art .brand { color: var(--bg); padding: 0; }
.auth-art .brand .ic { color: var(--bg); --logo-dot: var(--text); }
.auth-art h2 { font-size: 34px; letter-spacing: -.035em; line-height: 1.12; margin: 0; max-width: 460px; font-weight: 650; }
.auth-art p { color: color-mix(in srgb, var(--bg) 60%, transparent); max-width: 420px; }
.auth-cards { position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 420px; height: 420px; }
.auth-cards .c { position: absolute; width: 190px; aspect-ratio: 4/5; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); background: color-mix(in srgb, var(--bg) 6%, transparent); backdrop-filter: blur(2px); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.auth-box h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.auth-box > p { margin: -8px 0 6px; color: var(--text-2); }
.form-err { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-s); background: var(--down-bg); color: var(--down); font-size: 13px; font-weight: 500; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-3); font-size: 12px; margin-top: 6px; }
.auth-lang { position: absolute; top: 18px; right: 18px; }

/* ---------- Upload ---------- */
.drop { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-l); padding: 36px 20px; text-align: center; background: var(--surface); transition: all .15s; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--text); background: var(--surface-2); }
.drop .ico { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); }
.up-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.up-item { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4/5; cursor: grab; border: 1px solid var(--border); }
.up-item img { width: 100%; height: 100%; object-fit: cover; }
.up-item .n { position: absolute; left: 6px; top: 6px; }
.up-item .rm { position: absolute; right: 5px; top: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(17, 17, 17, .75); color: #fff; display: grid; place-items: center; cursor: pointer; }
.up-item.dragging { opacity: .4; }

/* ---------- Review ---------- */
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.review-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.review-meta { width: 100%; max-width: 560px; font-size: 12.5px; }
.review-img { position: relative; width: min(560px, 100%, calc((100dvh - 330px) * var(--ar, .8))); max-width: 560px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-3); background: var(--surface-2); user-select: none; cursor: grab; }
.review-img:active { cursor: grabbing; }
.review-track { display: flex; height: 100%; }
.review-cell { flex: 0 0 100%; height: 100%; }
.review-cell img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; -webkit-user-drag: none; }
.review-hint { font-size: 12px; }
@media (hover: none) { .review-hint { display: none; } .review-img .ig-arrow { display: none; } }
.progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; width: 100%; max-width: 560px; }
.progress i { display: block; height: 100%; background: var(--text); transition: width .3s var(--ease); }

/* ---------- Admin ---------- */
.subnav { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { border: 0; background: none; padding: 10px 12px; cursor: pointer; color: var(--text-3); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; flex: none; }
.subnav button.on { color: var(--text); border-color: var(--text); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.role-opts { display: grid; gap: 8px; }
.role-opt { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; align-items: flex-start; }
.role-opt:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.role-opt input { margin-top: 3px; accent-color: var(--text); }
.role-opt b { display: block; font-size: 13.5px; }
.role-opt span { font-size: 12.5px; color: var(--text-2); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--text); box-shadow: inset 0 0 0 2px var(--surface); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 120; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 11px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-3); font-weight: 550; font-size: 13.5px; animation: toastIn .25s var(--ease); max-width: 420px; }
.toast.err { background: var(--down); color: #fff; }
.toast.out { animation: toastOut .2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Editor ---------- */
.ed { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 56px 1fr; grid-template-columns: 64px 300px minmax(0, 1fr) 280px; background: var(--bg); }
.ed-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ed-name { border: 1px solid transparent; background: none; height: 34px; padding: 0 10px; border-radius: 8px; font-weight: 600; min-width: 120px; max-width: 320px; outline: none; }
.ed-name:hover { border-color: var(--border); } .ed-name:focus { border-color: var(--border-strong); background: var(--surface-2); }
.ed-rail { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-right: 1px solid var(--border); background: var(--surface); }
.ed-rail button { border: 0; background: none; border-radius: 10px; padding: 9px 2px 7px; display: flex; flex-direction: column; gap: 4px; align-items: center; cursor: pointer; color: var(--text-3); font-size: 10.5px; font-weight: 600; }
.ed-rail button:hover { color: var(--text); background: var(--surface-2); }
.ed-rail button.on { color: var(--text); background: var(--surface-2); }
.ed-rail .ic { width: 21px; height: 21px; }
.ed-panel { overflow: auto; border-right: 1px solid var(--border); background: var(--surface); padding: 16px; }
.ed-panel h3 { font-size: 14px; margin: 0 0 12px; }
.ed-stage { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.ed-canvas-wrap { flex: 1; overflow: auto; display: flex; padding: 40px; position: relative; background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 18px 18px; }
.ed-canvas-box { position: relative; box-shadow: var(--shadow-3); flex: none; margin: auto; }
.ed-canvas-box .canvas-container { border-radius: 2px; }
.ed-cuts { position: absolute; inset: 0; pointer-events: none; display: flex; }
.ed-cuts i { flex: 1; border-right: 1.5px dashed rgba(59, 91, 253, .7); position: relative; }
.ed-cuts i:last-child { border-right: 0; }
.ed-cuts i > span { position: absolute; top: -24px; left: 0; font-size: 11px; font-weight: 600; color: var(--text-3); white-space: nowrap; pointer-events: auto; }
.ed-cuts i.cur > span { color: var(--text); }
.ed-safe { position: absolute; inset: 0; pointer-events: none; display: flex; }
.ed-safe i { flex: 1; margin: 4.5% 4.5%; border: 1px dashed rgba(234, 88, 12, .6); }
.ed-bottom { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.ed-pages { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding: 2px; }
.ed-page { position: relative; flex: none; height: 64px; border-radius: 7px; border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; overflow: hidden; padding: 0; }
.ed-page.on { border-color: var(--text); }
.ed-page img { height: 100%; width: auto; }
.ed-page span { position: absolute; left: 4px; bottom: 3px; font-size: 10px; font-weight: 700; background: rgba(17, 17, 17, .7); color: #fff; padding: 0 5px; border-radius: 4px; }
.ed-page.add { width: 52px; display: grid; place-items: center; border-style: dashed; color: var(--text-3); }
.ed-props { overflow: auto; background: var(--surface); border-left: 1px solid var(--border); padding: 16px; }
.ed-props h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 18px 0 8px; font-weight: 650; }
.ed-props h4:first-child { margin-top: 0; }
.prop-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.prop-row > label { font-size: 12.5px; color: var(--text-2); width: 84px; flex: none; }
.prop-row .input, .prop-row .select { height: 32px; font-size: 13px; }
.num { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 8px; height: 32px; overflow: hidden; background: var(--surface); }
.num input { width: 52px; border: 0; background: none; text-align: center; outline: none; font-size: 13px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; }
.num button { border: 0; background: none; width: 26px; height: 100%; cursor: pointer; color: var(--text-3); display: grid; place-items: center; }
.num button:hover { background: var(--surface-2); color: var(--text); }
.icon-row { display: flex; gap: 4px; flex-wrap: wrap; }
.icon-row .btn { width: 34px; height: 32px; padding: 0; }
.tpl-btn { display: block; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 12px 14px; cursor: pointer; margin-bottom: 8px; transition: border-color .15s, background .15s; }
.tpl-btn:hover { border-color: var(--text-3); background: var(--surface-2); }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.media-grid button { padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--surface-2); aspect-ratio: 4/5; position: relative; }
.media-grid button img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.media-grid button:hover img { transform: scale(1.04); }
.media-grid button .lbl { position: absolute; left: 4px; bottom: 4px; }
.shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shape-grid button { aspect-ratio: 1; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.shape-grid button:hover { border-color: var(--text-3); color: var(--text); background: var(--surface-2); }
.shape-grid .ic { width: 26px; height: 26px; }
.color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.color-grid button { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--border); cursor: pointer; padding: 0; }
.color-grid button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.layer-list { display: flex; flex-direction: column; gap: 4px; }
.layer { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; font-size: 13px; }
.layer:hover { background: var(--surface-2); }
.layer.on { border-color: var(--border-strong); background: var(--surface-2); }
.layer .lt { width: 30px; height: 30px; border-radius: 6px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; color: var(--text-2); flex: none; }
.layer .lt img { width: 100%; height: 100%; object-fit: cover; }
.layer .lb { flex: 1; min-width: 0; }
.layer .la { display: flex; gap: 2px; opacity: 0; }
.layer:hover .la, .layer.on .la { opacity: 1; }
.layer .la button { border: 0; background: none; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; color: var(--text-3); display: grid; place-items: center; }
.layer .la button:hover { background: var(--surface-3); color: var(--text); }
.ed-start { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow: auto; }
.fmt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fmt { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 18px; cursor: pointer; text-align: left; transition: all .15s; display: flex; flex-direction: column; gap: 14px; }
.fmt:hover { border-color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.fmt .shape { height: 90px; display: flex; align-items: center; justify-content: center; }
.fmt .shape i { display: block; border: 1.5px solid var(--text); border-radius: 6px; background: var(--surface-2); }
.tip { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); align-items: flex-start; }
.tip .ic { flex: none; margin-top: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .ed { grid-template-columns: 64px 260px minmax(0, 1fr) 250px; }
  .viewer { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-layout { grid-template-columns: 1fr; }
  .li { grid-template-columns: 56px minmax(0, 1fr) 110px 100px; }
  .li .hide-md { display: none; }
  .fmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; z-index: 90; width: 260px; box-shadow: var(--shadow-3); background: var(--surface); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; background: var(--bg); }
  .page { padding: 18px 16px 80px; }
  /* viewer: full-screen stage + bottom sheet */
  .viewer { display: block; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--surface-2); }
  .viewer-stage { height: calc(100dvh - 64px); min-height: 460px; }
  .viewer-top { min-height: 0; gap: 6px; padding: calc(env(safe-area-inset-top) + 8px) 8px 8px; }
  .viewer-top .spacer { flex: 1; }
  .vt-title b { font-size: 13.5px; }
  .vt-title span { font-size: 11.5px; }
  .seg button { height: 32px; padding: 0 9px; }
  .seg button span { display: none; }
  .vt-nav .btn { width: 30px; }
  .viewer-arrow { display: none; }
  .viewer-foot { flex-direction: row; justify-content: center; gap: 12px; padding: 6px 12px 10px; }
  .viewer-strip { justify-content: flex-start; flex: 0 1 auto; min-width: 0; }
  .strip-item { height: 48px; max-width: 56px; border-radius: 6px; }
  .vs-mrate { display: inline-flex; flex: none; }
  .vs-mrate button { height: 44px; padding: 0 14px; border-radius: 22px; }
  .vs-hint { display: none; }
  .viewer-canvas[data-m='story'] { padding: 0 8px 4px; }
  .viewer-canvas[data-m='feed'] { padding: 4px 10px 16px; }
  .vs-all { padding: 4px 12px 16px; gap: 10px; display: grid; grid-template-columns: 1fr 1fr; }
  .vs-all-item { width: auto; }
  .viewer-side { border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px -12px rgba(0, 0, 0, .25); position: relative; min-height: 64px; padding-bottom: env(safe-area-inset-bottom); }
  .viewer-side::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 8px auto 0; }
  .viewer-side .side-head { padding: 10px 16px 12px; }
  .viewer-side .side-body { overflow: visible; padding: 16px; }
  .viewer-side .side-foot { position: sticky; bottom: 0; background: var(--surface); z-index: 2; padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }
  .badge.mono { white-space: normal; word-break: break-all; height: auto; min-height: 20px; padding: 2px 8px; border-radius: 8px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pc-quick { opacity: 1; transform: none; }
  /* ---- mobile editor: top bar · canvas · pages · tab bar; panels as bottom sheets */
  .m-only { display: flex !important; }
  .d-only { display: none !important; }
  .ed { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  .ed-top { flex: none; height: auto; min-height: 52px; gap: 2px; padding: calc(env(safe-area-inset-top) + 4px) 6px 4px; }
  .ed-name { flex: 1; min-width: 0; max-width: none; padding: 0 6px; font-size: 14px; text-overflow: ellipsis; }
  .ed-top [data-dirty] { display: none; }
  .ed-top .spacer { display: none; }
  .ed-export { width: 38px; height: 38px; padding: 0; justify-content: center; margin-left: 4px; }
  .ed-export span { display: none; }
  .ed-stage { flex: 1; min-height: 0; order: 1; }
  .ed-canvas-wrap { padding: 12px 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; background-size: 16px 16px; }
  .ed-canvas-wrap::-webkit-scrollbar { display: none; }
  .ed-canvas-box { margin: auto 0 !important; }
  .ed-canvas-wrap::after { content: ''; flex: none; width: var(--side, 16px); }
  .ed-cuts i { border-right-color: transparent; }
  .ed-cuts i > span { display: none; }
  .ed-bottom { padding: 8px 10px; gap: 6px; border-top: 1px solid var(--border); }
  .ed-page { height: 52px; }
  .ed-page.add { width: 44px; }
  .ed-rail { order: 3; flex: none; flex-direction: row; justify-content: space-around; gap: 0; padding: 4px 4px calc(env(safe-area-inset-bottom) + 4px); border: 0; border-top: 1px solid var(--border); position: relative; z-index: 58; }
  .ed-rail button { flex: 1; padding: 7px 0 5px; font-size: 10.5px; border-radius: 10px; min-height: 52px; justify-content: center; }
  .ed-rail button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .ed-panel, .ed-props {
    order: 2; flex: none; display: none; max-height: 46dvh; overflow: auto; overscroll-behavior: contain;
    border: 0; border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; margin-top: -14px; position: relative; z-index: 5;
    background: var(--surface); box-shadow: 0 -10px 30px -14px rgba(0, 0, 0, .28); padding: 0 16px 16px;
    animation: sheetIn .28s cubic-bezier(.22, .8, .25, 1);
  }
  .ed.panel-open .ed-panel { display: block; }
  .ed.has-sel:not(.panel-open):not(.editing) .ed-props { display: block; max-height: 40dvh; }
  .ed.panel-open .ed-bottom, .ed.has-sel .ed-bottom { display: none; }
  .ed.panel-open .ed-canvas-wrap, .ed.has-sel .ed-canvas-wrap { padding-bottom: 24px; }
  .ed-sheet-head { position: sticky; top: 0; z-index: 2; background: var(--surface); align-items: center; gap: 6px; margin: 0 -16px 12px; padding: 14px 12px 10px 16px; border-bottom: 1px solid var(--border); }
  .ed-sheet-head::before { content: ''; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border-strong); }
  .ed-sheet-head b { font-size: 15px; }
  .ed-sheet-head .spacer { flex: 1; }
  .ed-panel h3 { display: none; }
  .ed-props h4:nth-child(2) { margin-top: 0; }
  .tpl-btn { padding: 14px; }
  .prop-row > label { width: 96px; }
  .prop-row .select, .prop-row input[type=range] { flex: 1; min-width: 0; }
  .icon-row .btn { width: 42px; height: 40px; }
  .color-grid { gap: 8px; }
  .num { height: 38px; } .num button { width: 36px; }
  input[type=range] { height: 28px; }
  .table .hide-sm { display: none; }
}
@media (max-width: 600px) {
  .toolbar .search { min-width: 100%; max-width: none; order: -1; }
  .input-icon kbd { display: none; }
  .stats { gap: 8px; }
  .stat { padding: 10px 12px; gap: 10px; }
  .stat .ico { width: 30px; height: 30px; }
  .stat .v { font-size: 17px; }
  .stat .l { font-size: 12px; line-height: 1.3; }
  .page-head h1 { font-size: 21px; }
  .modal-body > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* =====================================================================
   v3 · Rollen, API-Schlüssel, Grok-Aufträge, Vergleich, Kampagnen, Benachrichtigungen
   ===================================================================== */
:root {
  --gk-1: #6D5BFF; --gk-2: #B65CFF; --gk-3: #FF7AB6;
  --gk-grad: linear-gradient(120deg, var(--gk-1), var(--gk-2) 55%, var(--gk-3));
  --gk-soft: color-mix(in srgb, var(--gk-1) 10%, var(--surface));
  --st-scheduled: #3B5BFD; --st-ready: #B65CFF; --st-published: #12805C; --st-failed: #C2410C; --st-draft: #8C8C85;
}
[data-theme='dark'] {
  --gk-1: #8F80FF; --gk-2: #C58BFF; --gk-3: #FF9CC8;
  --gk-soft: color-mix(in srgb, var(--gk-1) 16%, var(--surface));
  --st-scheduled: #8EA2FF; --st-ready: #C58BFF; --st-published: #34D399; --st-failed: #FB923C; --st-draft: #7C7C77;
}
.st-draft { --s: var(--st-draft); } .st-scheduled { --s: var(--st-scheduled); } .st-ready, .st-publishing { --s: var(--st-ready); }
.st-published { --s: var(--st-published); } .st-failed { --s: var(--st-failed); }

/* ---------- small primitives ---------- */
.hint { font-size: 12px; color: var(--text-3); }
.tip.warn { background: var(--warn-bg); color: var(--warn); }
.tip.bad { background: var(--down-bg); color: var(--down); }
.tip.ok { background: var(--up-bg); color: var(--up); }
.tip.ok a, .tip.bad a { color: inherit; text-decoration: underline; font-weight: 600; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); transition: background .2s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s var(--ease); }
.switch input:checked + i { background: var(--text); box-shadow: none; }
.switch input:checked + i::after { transform: translateX(16px); background: var(--bg); }
.switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch input:disabled + i { opacity: .45; }
.chip-btn { border: 1px solid var(--border-strong); background: var(--surface); height: 30px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip-btn:hover { color: var(--text); border-color: var(--text-3); }
.chip-btn:active { transform: scale(.96); }
.input.pulse { animation: pulseRing .6s var(--ease); }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--focus) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.empty-mini { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); }
.empty-mini .ic { color: var(--text-3); margin-bottom: 4px; }
.empty-mini span { font-size: 13px; color: var(--text-3); max-width: 360px; margin-bottom: 8px; }

/* ---------- notification bell ---------- */
.brand-row { padding-right: 2px; }
.brand-row .brand { padding-bottom: 0; }
.sidebar .brand-row { margin-bottom: 18px; }
.bell { position: relative; }
.bell-n { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--down); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--bg); font-variant-numeric: tabular-nums; }
.bell.ring .ic { animation: bellRing .9s var(--ease); transform-origin: 50% 10%; }
.bell.ring .bell-n { animation: pop .4s var(--ease) .2s; }
@keyframes bellRing { 0%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.pop.ntf-pop { width: 380px; padding: 0; max-height: 520px; }
.ntf-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 10px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.ntf-head b { font-size: 14.5px; }
.ntf-list { padding: 6px; }
.ntf-item { display: flex; gap: 12px; width: 100%; padding: 10px; border: 0; background: none; text-align: left; border-radius: 10px; cursor: pointer; position: relative; color: var(--text); }
.ntf-item:hover { background: var(--surface-2); }
.ntf-item.unread::after { content: ''; position: absolute; right: 10px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--info); }
.ntf-item.unread .ntf-txt b { font-weight: 700; }
.ntf-ic { position: relative; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); flex: none; overflow: visible; display: grid; place-items: center; }
.ntf-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.ntf-ic i { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); box-shadow: 0 0 0 2px var(--surface); }
.ntf-ic img + i { }
.ntf-ic:not(:has(img)) i { position: static; width: 40px; height: 40px; border-radius: 10px; box-shadow: none; }
.k-ok .ntf-ic i { background: var(--up); color: #fff; }
.k-bad .ntf-ic i { background: var(--down); color: #fff; }
.k-gk .ntf-ic i { background: var(--gk-grad); color: #fff; }
.ntf-txt { display: flex; flex-direction: column; min-width: 0; padding-right: 14px; }
.ntf-txt b { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.ntf-txt span { font-size: 12.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ntf-txt small { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.ntf-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; color: var(--text-3); font-size: 13px; }
.toast.ntf-toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 10px 10px 10px 12px; gap: 12px; width: 380px; max-width: calc(100vw - 24px); animation: ntfIn .45s cubic-bezier(.2,1.2,.3,1); }
.toast.ntf-toast .ntf-txt span { -webkit-line-clamp: 1; }
.toast.ntf-toast .btn { flex: none; margin-left: auto; }
.toast.ntf-toast.k-ok { box-shadow: var(--shadow-3), inset 3px 0 0 var(--up); }
.toast.ntf-toast.k-gk { box-shadow: var(--shadow-3), inset 3px 0 0 var(--gk-2); }
.toast.ntf-toast.k-bad { box-shadow: var(--shadow-3), inset 3px 0 0 var(--down); }
@keyframes ntfIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.toast.fly-toast a { color: inherit; text-decoration: underline; font-weight: 700; margin-left: 6px; white-space: nowrap; }

/* ---------- admin: roles matrix ---------- */
.perm-card { overflow: hidden; }
.perm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.perm-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.perm-table th { padding: 14px 10px 12px; text-align: center; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; position: sticky; left: 0; background: inherit; z-index: 1; }
.perm-table th:first-child { background: var(--surface-2); }
.perm-table tbody tr { background: var(--surface); }
.perm-table td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--border); vertical-align: middle; }
.perm-table tbody tr:last-child td { border-bottom: 0; background: var(--surface-2); }
.perm-table tbody tr:hover { background: var(--surface-2); }
.perm-table td:first-child { padding-left: 18px; min-width: 220px; max-width: 320px; }
.perm-table td:first-child b { display: block; font-size: 13.5px; }
.perm-table td:first-child span { display: block; font-size: 12px; color: var(--text-3); line-height: 1.4; margin-top: 1px; }
.perm-fixed { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--up-bg); color: var(--up); }
.perm-no { color: var(--text-3); }
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.role-legend > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; line-height: 1.45; }

/* ---------- admin: API keys / webhook ---------- */
.key-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.key-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.key-row + .key-row { border-top: 1px solid var(--border); }
.key-row:hover { background: var(--surface-2); }
.key-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; }
.key-dot.on { background: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 20%, transparent); }
.key-reveal { display: flex; flex-direction: column; gap: 10px; }
.key-reveal pre { margin: 0; font-size: 13px; padding: 14px; user-select: all; background: var(--surface-2); }

/* ============================ GROK ============================ */
.gk-tabbtn { position: relative; }
.gk-tabbtn.on { border-image: var(--gk-grad) 1; }
.gk-live { width: 8px; height: 8px; border-radius: 50%; background: var(--gk-2); box-shadow: 0 0 0 0 var(--gk-2); animation: gkPulse 1.4s infinite; display: inline-block; }
@keyframes gkPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gk-2) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* composer in grok mode */
.composer.is-grok { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gk-grad) border-box; border: 1.5px solid transparent; box-shadow: 0 8px 24px -14px color-mix(in srgb, var(--gk-2) 70%, transparent); }
.composer.is-grok:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gk-2) 16%, transparent), 0 8px 24px -14px var(--gk-2); }
.composer { position: relative; }
.gk-chip { display: inline-flex; align-items: center; gap: 5px; margin: 9px 0 0 10px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--gk-grad); color: #fff; font-size: 11.5px; font-weight: 700; animation: pop .35s var(--ease); }
.gk-mention { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-3); padding: 5px; animation: popIn .14s var(--ease); }
.gk-mention button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--gk-soft); cursor: pointer; text-align: left; }
.gk-mention button > .ic { width: 30px; height: 30px; padding: 7px; border-radius: 8px; background: var(--gk-grad); color: #fff; }
.gk-mention span { display: flex; flex-direction: column; }
.gk-mention small { color: var(--text-3); font-size: 11.5px; }
.kind-sw .gk-kind.on { background: var(--gk-grad); color: #fff; }
.kind-sw .gk-kind:not(.on) .ic { color: var(--gk-2); }
.btn.gk-send { background: var(--gk-grad); color: #fff; border: 0; height: 32px; padding: 0 13px; font-size: 13px; background-size: 160% 100%; transition: background-position .4s, transform .1s; box-shadow: 0 6px 16px -8px var(--gk-2); }
.btn.gk-send:hover { background-position: 100% 0; background-color: transparent; }
.composer-opts { padding: 0 8px 8px; flex-wrap: wrap; gap: 6px; }
.gk-count button.on { background: var(--gk-soft); color: var(--gk-1); }

/* intro */
.gk-intro { text-align: center; padding: 18px 6px 8px; display: flex; flex-direction: column; align-items: center; }
.gk-intro h3 { margin: 14px 0 4px; font-size: 16px; letter-spacing: -.01em; }
.gk-intro p { margin: 0 0 16px; color: var(--text-2); font-size: 13px; max-width: 320px; }
.gk-orb { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--gk-grad); background-size: 200% 200%; animation: gkFlow 6s ease infinite; box-shadow: 0 14px 30px -12px var(--gk-2); }
@keyframes gkFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.gk-sugg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.gk-sugg button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; height: 30px; padding: 0 12px; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; transition: all .15s; }
.gk-sugg button:hover { border-color: var(--gk-2); color: var(--text); background: var(--gk-soft); }
.gk-sugg.compact { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 14px; padding: 2px; }
.gk-sugg.compact::-webkit-scrollbar { display: none; }
.gk-sugg.compact button { flex: none; }

/* tasks */
.gk-list { display: flex; flex-direction: column; gap: 12px; }
.gk-task { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); animation: modalIn .3s var(--ease); position: relative; overflow: hidden; }
.gk-task.st-queued, .gk-task.st-working { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gk-grad) border-box; border: 1.5px solid transparent; }
.gk-task.st-working::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--gk-2) 8%, transparent) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 2.2s linear infinite; pointer-events: none; }
.gk-task.st-canceled { opacity: .6; }
.gk-task header { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gk-task header .faint { font-size: 11.5px; }
.gk-pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 650; background: var(--surface-2); color: var(--text-2); }
.gk-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1s infinite; }
.gk-pill.st-queued, .gk-pill.st-working { background: var(--gk-soft); color: var(--gk-1); }
.gk-pill.st-done { background: var(--up-bg); color: var(--up); }
.gk-pill.st-failed { background: var(--down-bg); color: var(--down); }
@keyframes blink { 50% { opacity: .3; } }
.gk-instr { margin: 8px 0 10px; font-size: 13px; }
.gk-instr .faint { display: block; font-size: 11.5px; margin-bottom: 2px; }
.gk-instr q { display: block; quotes: none; color: var(--text); padding: 8px 10px; border-radius: 10px; background: var(--surface-2); line-height: 1.45; }
.gk-progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.gk-progress i { display: block; height: 100%; border-radius: inherit; background: var(--gk-grad); background-size: 200% 100%; animation: gkFlow 2s linear infinite; transition: width .8s var(--ease); }
.gk-pnote { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; font-size: 12.5px; color: var(--text-2); }
.gk-dots { display: inline-flex; gap: 3px; }
.gk-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gk-2); animation: dot 1.2s infinite ease-in-out; }
.gk-dots i:nth-child(2) { animation-delay: .15s; } .gk-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%,80%,100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
.gk-ghosts, .gk-vars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gk-ghost { border-radius: 10px; position: relative; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.gk-ghost::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--gk-1) 30%, transparent), color-mix(in srgb, var(--gk-3) 30%, transparent), transparent 60%); animation: spin 2.6s linear infinite; filter: blur(14px); }
.gk-ghost::after { content: ''; position: absolute; inset: 2px; border-radius: 8px; background: color-mix(in srgb, var(--surface-2) 82%, transparent); backdrop-filter: blur(6px); }
.gk-spark { position: relative; z-index: 1; color: var(--gk-2); animation: sparkle 1.8s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sparkle { 0%,100% { transform: scale(.85) rotate(0); opacity: .6; } 50% { transform: scale(1.15) rotate(18deg); opacity: 1; } }
.gk-err { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; background: var(--down-bg); color: var(--down); font-size: 12.5px; margin-bottom: 8px; }
.gk-answer { padding: 10px; border-radius: 10px; background: var(--gk-soft); font-size: 13px; white-space: pre-wrap; }
.gk-var { position: relative; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: transform .2s var(--ease), box-shadow .2s; }
.gk-var img { width: 100%; height: 100%; object-fit: cover; }
.gk-var:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(0,0,0,.4); }
.gk-var.discarded { opacity: .4; filter: grayscale(.8); }
.gk-var.applied { box-shadow: 0 0 0 2px var(--up); }
.gk-var.fresh { animation: varIn .9s cubic-bezier(.2,1.1,.3,1) both; }
.gk-var.fresh::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.55) 45%, transparent 60%); background-size: 250% 100%; animation: sheen 1.2s .35s ease-out both; pointer-events: none; }
@keyframes varIn { 0% { opacity: 0; transform: scale(.7) rotate(-3deg); filter: blur(8px) saturate(2); } 60% { opacity: 1; filter: blur(0); } 100% { transform: none; } }
@keyframes sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.gk-var .gk-n { position: absolute; top: 5px; right: 5px; }
.gk-tag { position: absolute; left: 5px; top: 5px; display: inline-flex; align-items: center; gap: 3px; height: 19px; padding: 0 6px; border-radius: 6px; background: var(--gk-grad); color: #fff; font-size: 10.5px; font-weight: 700; }
.gk-tag.ok { background: var(--up); }
.gk-tag.big { position: static; height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.gk-score { position: absolute; left: 5px; bottom: 5px; display: flex; gap: 3px; }
.gk-score b { display: inline-flex; align-items: center; gap: 2px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 10.5px; background: rgba(17,17,17,.72); color: #fff; }
.gk-score b.u .ic { color: #6EE7B7; } .gk-score b.d .ic { color: #FDBA74; }
.gk-open { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; background: rgba(10,10,10,.45); color: #fff; font-size: 12px; font-weight: 650; opacity: 0; transition: opacity .2s; }
.gk-var:hover .gk-open, .gk-var:focus-visible .gk-open { opacity: 1; }
@media (hover: none) { .gk-open { display: none; } }

/* busy veil over the image while grok works */
.vs-frame.gk-busy::before { content: ''; position: absolute; inset: -2px; z-index: 2; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--gk-a, 0deg), var(--gk-1), var(--gk-2), var(--gk-3), var(--gk-1)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: gkSpinA 2.4s linear infinite; pointer-events: none; }
@property --gk-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes gkSpinA { to { --gk-a: 360deg; } }
.gk-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(115deg, transparent 25%, color-mix(in srgb, var(--gk-2) 22%, transparent) 45%, color-mix(in srgb, var(--gk-3) 18%, transparent) 55%, transparent 75%); background-size: 260% 100%; animation: veil 2.6s ease-in-out infinite; display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.gk-veil span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(17,17,17,.72); color: #fff; font-size: 12px; font-weight: 650; backdrop-filter: blur(8px); animation: floaty 2.4s ease-in-out infinite; }
@keyframes veil { 0% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
@keyframes floaty { 50% { transform: translateY(-3px); } }

/* ============================ COMPARE OVERLAY ============================ */
.cmp { position: fixed; inset: 0; z-index: 85; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px) saturate(1.2); display: flex; flex-direction: column; opacity: 0; transition: opacity .22s; }
.cmp.in { opacity: 1; }
.cmp.in .cmp-stage { animation: cmpIn .45s cubic-bezier(.2,1,.3,1); }
@keyframes cmpIn { from { transform: scale(.94); opacity: 0; } }
.cmp-top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; }
.cmp-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cmp-title b { font-size: 14.5px; }
.cmp-title > span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: pan-y; }
.cmp-track { display: flex; height: 100%; will-change: transform; }
.cmp-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 8px 72px; min-width: 0; }
.cmp-ph { width: 40%; height: 60%; border-radius: 12px; background: var(--surface-2); }
.cmp-pair { display: flex; gap: 20px; height: 100%; width: 100%; align-items: center; justify-content: center; }
.cmp-frame { position: relative; margin: 0; aspect-ratio: var(--r); max-height: 100%; max-width: calc(50% - 10px); height: 100%; border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-3); }
.cmp-frame img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.cmp-frame.is-new { box-shadow: 0 0 0 2px transparent, var(--shadow-3); animation: newGlow 1.2s ease-out; }
.cmp-frame.is-new::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--gk-grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
@keyframes newGlow { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gk-2) 70%, transparent), var(--shadow-3); } to { box-shadow: 0 0 0 26px transparent, var(--shadow-3); } }
.cmp-lbl { position: absolute; left: 10px; top: 10px; z-index: 2; height: 24px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; background: rgba(17,17,17,.7); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(8px); }
.cmp-lbl.gk { background: var(--gk-grad); }
.cmp-lbl.r { left: auto; right: 10px; background: var(--gk-grad); }
.cmp-ba { max-width: 100%; cursor: ew-resize; touch-action: none; }
.cmp-ba .ba-a { position: absolute; inset: 0; }
.cmp-ba .ba-b { position: absolute; inset: 0; }
.ba-handle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.4); z-index: 3; pointer-events: none; }
.ba-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #111; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-3); }
.cmp-sub { display: flex; gap: 6px; justify-content: center; padding: 6px 12px 0; overflow-x: auto; }
.cmp-sub button { width: 46px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .55; background: var(--surface-2); flex: none; transition: all .15s; }
.cmp-sub button img { width: 100%; height: 100%; object-fit: cover; }
.cmp-sub button.on { opacity: 1; border-color: var(--text); }
.cmp-foot { padding: 12px 16px calc(env(safe-area-inset-bottom) + 14px); display: flex; flex-direction: column; gap: 10px; max-width: 980px; width: 100%; margin: 0 auto; }
.cmp-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); padding: 9px 12px; border-radius: 10px; background: var(--gk-soft); }
.cmp-note .ic { color: var(--gk-1); margin-top: 2px; }
.cmp-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-apply { min-width: 150px; justify-content: center; }
.cmp-apply.busy { pointer-events: none; opacity: .8; }
.cmp-apply.busy .ic { animation: spin .8s linear infinite; }
.cmp-frame.applied { animation: applied .6s var(--ease); }
@keyframes applied { 40% { transform: scale(1.03); } }
.cmp-burst { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.cmp-burst span { width: 64px; height: 64px; border-radius: 50%; background: var(--up); color: #fff; display: grid; place-items: center; animation: burstCk .6s cubic-bezier(.2,1.4,.3,1) both; box-shadow: 0 10px 30px -6px var(--up); }
.cmp-burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--gk-grad); animation: burstDot .7s ease-out both; }
.cmp-burst i:nth-child(3n) { background: var(--up); } .cmp-burst i:nth-child(3n+1) { background: var(--gk-3); }
@keyframes burstCk { from { transform: scale(0); } }
@keyframes burstDot { 0% { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; } 100% { transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(.3); opacity: 0; } }

/* ============================ CAMPAIGNS ============================ */
.cmp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--text)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--text)) 18%, transparent); vertical-align: middle; }
.cmp-dot.lg { width: 14px; height: 14px; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cmp-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; box-shadow: var(--shadow-1); }
.cmp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2), 0 18px 30px -20px color-mix(in srgb, var(--c) 60%, transparent); border-color: var(--border-strong); }
.cmp-covers { height: 150px; position: relative; background: color-mix(in srgb, var(--c) 10%, var(--surface-2)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cmp-covers img { position: absolute; width: 92px; height: 115px; object-fit: cover; border-radius: 8px; box-shadow: 0 8px 18px -8px rgba(0,0,0,.45); border: 2px solid var(--surface); left: calc(50% - 46px + (var(--i) - 1.5) * 44px); transform: rotate(calc((var(--i) - 1.5) * 5deg)) translateY(calc(var(--i) * 2px)); transition: transform .3s var(--ease); }
.cmp-card:hover .cmp-covers img { transform: rotate(calc((var(--i) - 1.5) * 8deg)) translateY(-4px) translateX(calc((var(--i) - 1.5) * 6px)); }
.cmp-ph-cover { color: color-mix(in srgb, var(--c) 70%, var(--text-3)); }
.cmp-card-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.cmp-card-b b { font-size: 15px; }
.cmp-dates { font-size: 12.5px; }
.cmp-bar { height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin: 4px 0 2px; }
.cmp-bar i { display: block; height: 100%; background: var(--c); border-radius: inherit; transition: width .6s var(--ease); }
.cmp-counts { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cmp-counts span { display: inline-flex; align-items: center; gap: 4px; }
.cmp-counts .hl { color: var(--st-ready); font-weight: 650; } .cmp-counts .ok { color: var(--up); } .cmp-counts .bad { color: var(--down); font-weight: 650; }
.cmp-next { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 7px; padding: 4px 8px; align-self: flex-start; margin-top: 2px; }
.cmp-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; transition: all .15s; }
.cmp-pick:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, var(--surface)); transform: translateX(2px); }

/* calendar */
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.cal-head h3 { margin: 0 6px; font-size: 15.5px; text-transform: capitalize; letter-spacing: -.01em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { padding: 8px 10px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 108px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .cal-n { color: var(--text-3); }
.cal-n { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-n { background: var(--text); color: var(--bg); }
.cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-it { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; height: 26px; padding: 0 6px 0 2px; border: 0; border-radius: 6px; cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--s) 12%, var(--surface)); box-shadow: inset 2px 0 0 var(--c); transition: transform .12s; }
.cal-it:hover { transform: translateX(2px); }
.cal-it img { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; flex: none; }
.cal-it span { flex: 1; text-align: left; font-variant-numeric: tabular-nums; }
.cal-it .ic { color: var(--s); flex: none; }
.cal-it.st-published { opacity: .75; }
.cal-more { font-size: 11px; color: var(--text-3); padding-left: 4px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 14px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--border); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--s); }

/* board */
.board-page { max-width: none; }
.board-head { align-items: center; }
.board-head h1 { font-size: 22px; }
.board-actions { flex-wrap: wrap; }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.col { background: var(--surface-2); border-radius: var(--radius-l); padding: 10px; display: flex; flex-direction: column; min-height: 320px; transition: background .2s, box-shadow .2s, transform .2s; scroll-snap-align: start; --k: var(--st-draft); }
.col-scheduled { --k: var(--st-scheduled); } .col-ready { --k: var(--st-ready); } .col-published { --k: var(--st-published); }
.col header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; font-size: 13.5px; }
.col-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--k); background: color-mix(in srgb, var(--k) 14%, var(--surface)); }
.col-n { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--text-3); background: var(--surface); border-radius: 999px; min-width: 22px; height: 20px; display: grid; place-items: center; padding: 0 6px; font-variant-numeric: tabular-nums; }
.col-hint { margin: 2px 4px 10px; font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.col-list { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.col-drop { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 90px; border: 2px dashed color-mix(in srgb, var(--k) 45%, var(--border-strong)); border-radius: 12px; color: var(--k); font-size: 12.5px; font-weight: 600; text-align: center; padding: 10px; transition: all .2s; }
.col-list:not(:has(.icard)) .col-drop { display: flex; opacity: .55; }
body.dragging .col-drop { display: flex; opacity: .7; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }
.col.over { background: color-mix(in srgb, var(--k) 12%, var(--surface-2)); box-shadow: inset 0 0 0 2px var(--k); transform: translateY(-2px); }
.col.over .col-drop { opacity: 1; background: color-mix(in srgb, var(--k) 10%, transparent); transform: scale(1.02); border-style: solid; }
.icard { background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1), inset 0 0 0 1px var(--border); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, opacity .2s; position: relative; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.icard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); z-index: 2; }
.icard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--border-strong); }
.ic-media { position: relative; width: 100%; aspect-ratio: var(--r); max-height: 220px; background: var(--surface-2); overflow: hidden; }
.ic-media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ic-kind { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(17,17,17,.68); color: #fff; backdrop-filter: blur(6px); }
.ic-count { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(17,17,17,.68); color: #fff; font-size: 11px; font-weight: 650; backdrop-filter: blur(6px); }
.ic-grip { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.9); color: #111; opacity: 0; transition: opacity .2s; cursor: grab; }
.icard:hover .ic-grip { opacity: 1; }
@media (hover: none) { .ic-grip { opacity: .9; } }
.ic-b { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.ic-t { display: flex; gap: 5px; font-size: 13px; min-width: 0; }
.ic-when { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ic-when.none { color: var(--text-3); font-weight: 500; }
.ic-pill { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.ic-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ic-pill.hl { background: color-mix(in srgb, var(--st-ready) 14%, var(--surface)); color: var(--st-ready); }
.ic-pill.hl i { animation: gkPulse 1.4s infinite; }
.ic-pill.busy { background: var(--gk-soft); color: var(--gk-1); }
.ic-pill.busy i { animation: blink .8s infinite; }
.ic-pill.bad { background: var(--down-bg); color: var(--down); }
.ic-cap { font-size: 12px; color: var(--text-3); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ic-go { margin-top: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 0; border-radius: 9px; background: var(--text); color: var(--bg); font-weight: 650; font-size: 12.5px; cursor: pointer; transition: transform .12s, box-shadow .2s; }
.ic-go:hover { box-shadow: 0 8px 18px -8px var(--st-ready); background: var(--gk-grad); color: #fff; }
.ic-go:hover .ic { animation: rocket .6s ease-in-out infinite alternate; }
@keyframes rocket { to { transform: translate(2px, -2px); } }
.ic-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--up); }
.ic-link:hover { text-decoration: underline; }
.icard.st-published .ic-media img { filter: saturate(.85); }
.icard.st-failed { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--down); }
.ic-origin { opacity: .3; transform: scale(.96); filter: grayscale(.5); }
.ic-ghost { position: fixed; z-index: 200; pointer-events: none; margin: 0; box-shadow: 0 30px 60px -15px rgba(0,0,0,.45), 0 0 0 2px var(--c); transition: none; transform-origin: 50% 30%; will-change: transform; }
.icard.landed { animation: landed .8s cubic-bezier(.2,1.3,.3,1); }
@keyframes landed { 0% { transform: scale(.85); box-shadow: 0 0 0 0 var(--c); } 50% { transform: scale(1.03); box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 30%, transparent); } 100% { transform: none; } }

/* ready flow */
.ready-sum { display: flex; gap: 16px; align-items: flex-start; }
.ready-thumb { position: relative; width: 110px; flex: none; aspect-ratio: var(--r); border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-2); }
.ready-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ready-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; font-size: 13px; }
.ready-list > div { display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; word-break: break-word; }
.ready-list > div > span:first-child { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); margin-top: -3px; }
.ready-list .hl > span:first-child { background: color-mix(in srgb, var(--st-ready) 14%, var(--surface)); color: var(--st-ready); }
.ready-list .warn { color: var(--warn); }
.ready-list .warn > span:first-child { background: var(--warn-bg); color: var(--warn); }
.btn.launch { background: var(--gk-grad); border: 0; color: #fff; overflow: hidden; position: relative; }
.btn.launch:hover { opacity: 1; filter: brightness(1.05); }
.btn.launch.fly .ic { animation: launch .65s cubic-bezier(.6,0,.4,1) forwards; }
.btn.launch.fly::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: sheen .6s ease-out; background-size: 200% 100%; }
@keyframes launch { 30% { transform: translate(-3px, 3px); } 100% { transform: translate(60px, -60px) scale(.6); opacity: 0; } }

/* item editor */
.ie { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.ie-prev { position: sticky; top: 0; }
.ie-phone { border-radius: 26px; background: var(--surface); box-shadow: 0 0 0 7px #111, 0 22px 50px -18px rgba(0,0,0,.55); overflow: hidden; margin: 8px; color: #111; background: #fff; font-size: 12.5px; }
[data-theme='dark'] .ie-phone { background: #000; color: #f5f5f5; box-shadow: 0 0 0 7px #2a2a2c, 0 22px 50px -18px rgba(0,0,0,.8); }
.ie-phone.story, .ie-phone.reel { aspect-ratio: 9 / 16; background: #000; color: #fff; }
.iep-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px; }
.iep-head .ig-av { width: 26px; height: 26px; }
.iep-head small { display: block; font-size: 10.5px; opacity: .7; margin-left: auto; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iep-media { position: relative; overflow: hidden; background: #111; touch-action: pan-y; }
.iep-track { display: flex; height: 100%; will-change: transform; }
.iep-track > div { flex: 0 0 100%; height: 100%; }
.iep-track img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; }
.iep-n { position: absolute; top: 8px; right: 8px; height: 20px; padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; }
.iep-acts { display: flex; gap: 12px; padding: 9px 10px 4px; }
.iep-cap, .iep-cmt { padding: 2px 10px 6px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow: auto; }
.iep-cmt { opacity: .75; padding-bottom: 12px; }
.iep-story { position: relative; height: 100%; }
.iep-story .iep-media { position: absolute; inset: 0; }
.iep-bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; gap: 3px; }
.iep-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.35); transition: background .3s; }
.iep-bars i.on { background: #fff; }
.iep-sticker { position: absolute; z-index: 2; left: 50%; top: 58%; transform: translateX(-50%) rotate(-3deg); background: #fff; color: #111; font-weight: 800; padding: 7px 12px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.3); max-width: 80%; text-align: center; animation: pop .4s var(--ease); }
.iep-link { position: absolute; z-index: 2; left: 50%; bottom: 52px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; background: #fff; color: #3B5BFD; font-weight: 700; padding: 6px 11px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; }
.iep-tags { position: absolute; z-index: 2; left: 12px; bottom: 16px; right: 12px; color: #fff; font-weight: 700; font-size: 12px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ie-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.kind-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kind-pick label { cursor: pointer; }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick span { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border-radius: 12px; border: 1.5px solid var(--border); font-size: 12.5px; color: var(--text-2); transition: all .15s; }
.kind-pick label:hover span { border-color: var(--text-3); }
.kind-pick input:checked + span { border-color: var(--text); color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent); }
.kind-pick input:focus-visible + span { outline: 2px solid var(--focus); }
.kind-pick input:disabled + span { opacity: .6; cursor: default; }
.when-chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* post picker */
.pick-filters { align-self: flex-start; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 52vh; overflow: auto; padding: 2px; margin: 0 -2px; }
.pick { position: relative; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; aspect-ratio: var(--r); max-height: 220px; box-shadow: inset 0 0 0 1px var(--border); transition: transform .15s var(--ease); }
.pick img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .25s var(--ease); }
.pick:active { transform: scale(.97); }
.pick-ck { position: absolute; left: 7px; top: 7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.85); color: transparent; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.25); transition: all .2s var(--ease); z-index: 2; }
.pick.on { box-shadow: 0 0 0 3px var(--text); }
.pick.on img { transform: scale(.94); border-radius: 6px; }
.pick.on .pick-ck { background: var(--text); color: var(--bg); box-shadow: none; animation: pop .3s var(--ease); }
.pick .ic-count { top: 7px; right: 7px; }
.pick-in { position: absolute; left: 7px; bottom: 34px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--info); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.pick-t { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; font-size: 11.5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* fly into nav */
.fly-card { position: fixed; z-index: 300; pointer-events: none; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 40px -10px rgba(0,0,0,.45); }
.fly-card img { width: 100%; height: 100%; object-fit: cover; }
.nav a.nav-pop { animation: navPop .6s cubic-bezier(.2,1.5,.3,1); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--border-strong); }
@keyframes navPop { 40% { transform: scale(1.08); } }
#menu-btn.nav-pop { animation: navPop .6s cubic-bezier(.2,1.5,.3,1); }

/* ---------- responsive for new features ---------- */
@media (max-width: 1080px) {
  .ie { grid-template-columns: 240px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 900px) {
  .board { display: flex; gap: 12px; margin: 0 -16px; padding: 0 16px 16px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .col { flex: 0 0 82%; min-height: 60dvh; }
  body.dragging .board { scroll-snap-type: none; }
  .board-head { gap: 10px; }
  .board-head h1 { font-size: 19px; }
  .board-actions { width: 100%; }
  .board-actions .btn.primary span { display: inline; }
  .cmp-slide { padding: 4px 10px; }
  .cmp-pair { flex-direction: column; gap: 10px; }
  .cmp-frame { max-width: 100%; height: auto; max-height: calc(50% - 5px); width: auto; flex: 1 1 0; }
  .cmp-ba { max-height: 100%; height: auto; width: 100%; flex: none; }
  .cmp .viewer-arrow { display: none; }
  .cmp-top .seg span { display: none; }
  .cmp-actions .btn span { display: none; }
  .cmp-actions .cmp-apply { flex: 1; min-width: 0; }
  .cmp-actions .rate button { height: 44px; padding: 0 14px; border-radius: 22px; }
  .gk-ghosts, .gk-vars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ie { grid-template-columns: 1fr; }
  .ie-prev { position: static; max-width: 260px; margin: 0 auto; width: 100%; }
  .cal-day { min-height: 74px; padding: 4px 3px; }
  .cal-it { height: 22px; padding: 0 3px 0 2px; justify-content: center; }
  .cal-it span, .cal-it .ic { display: none; }
  .cal-it img { width: 100%; height: 18px; }
  .cal-wd { padding: 6px 4px; text-align: center; font-size: 10px; }
  .cal-n { margin: 0 auto; }
  .pop.ntf-pop { width: auto; }
  .toasts { left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px); align-items: stretch; }
  .toast { max-width: none; }
  .toast.ntf-toast { width: auto; }
}
@media (max-width: 600px) {
  .cmp-grid { grid-template-columns: 1fr; }
  .ready-sum { flex-direction: column; align-items: center; }
  .ready-thumb { width: 130px; }
  .ready-list { width: 100%; }
  .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 58dvh; }
  .pick-t { display: none; }
  .pick-in { bottom: 6px; left: 6px; }
  .key-row { flex-wrap: wrap; }
  .key-row .btn { margin-left: auto; }
  .perm-table td:first-child { min-width: 170px; }
  .when-chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .when-chips .chip-btn { flex: none; }
  .overlay:has(.modal.wide) { padding: 0; align-items: end; }
  .modal.wide .modal-foot { position: sticky; bottom: 0; background: var(--surface); padding-top: 12px; padding-bottom: calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid var(--border); flex-wrap: wrap; }
  .modal.wide { max-width: none; border-radius: 20px 20px 0 0; max-height: 94dvh; animation: sheetIn .3s cubic-bezier(.22,.8,.25,1); }
}
@media (prefers-reduced-motion: reduce) {
  .gk-ghost::before, .gk-veil, .vs-frame.gk-busy::before, .gk-orb, .gk-progress i, .gk-task.st-working::before { animation: none !important; }
}
/* side actions + composer fit */
.side-acts { flex-wrap: wrap; }
.side-acts .btn { flex: 0 1 auto; min-width: 0; }
.composer-bar { flex-wrap: nowrap; min-width: 0; }
.composer-bar .kind-sw { min-width: 0; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; }
.composer-bar .kind-sw::-webkit-scrollbar { display: none; }
.kind-sw button { white-space: nowrap; flex: none; }
.composer.is-grok .kind-sw button:not(.on) span { display: none; }
.composer.is-grok .kind-sw button.on span { display: inline; }
.btn.gk-send { flex: none; white-space: nowrap; }
@media (max-width: 1280px) { .kind-sw button:not(.on) span { display: none; } }
@media (max-width: 900px) {
  .cmp-actions { flex-wrap: nowrap; gap: 6px; }
  .cmp-actions .spacer { display: none; }
  .cmp-actions .rate { flex: none; }
  .cmp-actions .rate button { padding: 0 11px; }
  .cmp-actions .btn { flex: none; padding: 0 10px; }
  .cmp-actions .cmp-apply { flex: 1 1 auto; min-width: 0; padding: 0 12px; }
  .cmp-actions .gk-tag.big { margin-left: auto; }
}
@media (max-width: 600px) {
  .modal-foot { flex-wrap: wrap; }
  .modal-foot > .btn.primary { flex: 1 1 auto; justify-content: center; }
  .key-row .avatar { display: none; }
}
.input-reveal { position: relative; display: flex; }
.input-reveal .input { padding-right: 42px; font-family: var(--mono); font-size: 13px; }
.input-reveal [data-wh-eye] { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.input-reveal [data-wh-eye].on { color: var(--text); background: var(--surface-2); }
.wh-saved { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--up); margin-top: 2px; }
.wh-saved code { font-family: var(--mono); font-size: 12px; color: var(--text-2); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
/* live updates */
.pc.live-in, .li.live-in { animation: liveIn .7s cubic-bezier(.2,1.1,.3,1) both; animation-delay: var(--d, 0ms); }
.pc.live-in::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 2px var(--info); animation: liveRing 2.4s ease-out forwards; animation-delay: var(--d, 0ms); }
.pc { position: relative; }
@keyframes liveIn { from { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(4px); } }
@keyframes liveRing { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.live-hint { position: fixed; z-index: 70; top: 16px; left: 50%; transform: translate(-50%, -80px); display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 650; font-size: 13px; box-shadow: var(--shadow-3); cursor: pointer; transition: transform .45s cubic-bezier(.2,1.3,.3,1), opacity .3s; opacity: 0; }
.live-hint.in { transform: translate(-50%, 0); opacity: 1; }
.live-hint.out { transform: translate(-50%, -80px); opacity: 0; }
@media (min-width: 901px) { .live-hint { left: calc(50% + var(--sidebar) / 2); } }
@media (max-width: 900px) { .live-hint { top: calc(env(safe-area-inset-top) + 64px); } }

/* ============================ delete / trash / selection ============================ */
.pc-menu { pointer-events: auto; width: 26px; height: 24px; border-radius: 7px; border: 0; background: rgba(17,17,17,.55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; backdrop-filter: blur(6px); }
.pc:hover .pc-menu, .pc:focus-within .pc-menu { opacity: 1; }
.pc-menu + .pc-sel { margin-left: 4px; }
.pc-top .pc-menu { margin-left: auto; }
@media (hover: none) { .pc-menu { opacity: .95; } .grid.selecting .pc-menu { display: none; } }
.grid.selecting .pc-menu { opacity: 0; pointer-events: none; }
.grid.selecting .pc { cursor: pointer; }
.grid.selecting .pc:not(.selected) .pc-media img { filter: saturate(.85) brightness(.92); }
.pc.selected { box-shadow: 0 0 0 2.5px var(--text), var(--shadow-2); transform: scale(.985); }
.pc { transition: transform .18s var(--ease), box-shadow .18s; }
.pc.selected .pc-sel { animation: pop .28s var(--ease); }
/* list view selection */
.li-thumb { position: relative; }
.li-sel { position: absolute; left: 4px; top: 4px; z-index: 2; opacity: 0; }
.li:hover .li-sel, .list.selecting .li-sel, .li.selected .li-sel { opacity: 1; }
.li.selected { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--text); }
.li.selected .li-sel { background: #fff; color: #111; }
#sel-mode.on { background: var(--text); color: var(--bg); border-color: var(--text); }
/* selbar delete */
.selbar .sel-del { color: #fff; background: var(--down) !important; border-color: var(--down) !important; }
.selbar .sel-del:hover { filter: brightness(1.08); }
.selbar { flex-wrap: nowrap; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
.selbar::-webkit-scrollbar { display: none; }
.selbar b { white-space: nowrap; }
.selbar .btn { flex: none; }
/* delete animation */
.pc.del-out, .li.del-out { animation: delOut .38s var(--ease) forwards; animation-delay: var(--d, 0ms); pointer-events: none; }
@keyframes delOut { to { opacity: 0; transform: scale(.82) translateY(10px); filter: blur(3px) grayscale(1); } }
/* confirm dialog */
.del-preview { display: flex; justify-content: center; align-items: center; height: 120px; position: relative; margin: 2px 0 4px; }
.del-preview img { width: 76px; height: 100px; object-fit: cover; border-radius: 9px; border: 2px solid var(--surface); box-shadow: 0 10px 22px -10px rgba(0,0,0,.5); margin: 0 -18px; transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 6deg)) translateY(calc(var(--i) * 1px)); animation: delPrev .4s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes delPrev { from { opacity: 0; transform: translateY(16px) scale(.9); } }
.del-more { position: absolute; right: calc(50% - 110px); bottom: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.del-title { margin: 0; text-align: center; font-weight: 650; }
.btn.danger-solid { background: var(--down); border-color: var(--down); color: #fff; }
.btn.danger-solid:hover { opacity: 1; filter: brightness(1.08); }
/* undo toast */
.toast.undo-toast { position: relative; overflow: hidden; padding-right: 8px; }
.undo-btn { margin-left: 6px; border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); font-weight: 700; height: 30px; padding: 0 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.undo-btn:hover { background: color-mix(in srgb, var(--bg) 28%, transparent); }
.undo-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: color-mix(in srgb, var(--bg) 55%, transparent); transform-origin: left; animation: undoBar linear forwards; }
@keyframes undoBar { to { transform: scaleX(0); } }
/* trash dialog */
.trash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; max-height: 56vh; overflow: auto; padding: 3px; margin: -3px; }
.trash-it { display: flex; flex-direction: column; gap: 6px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--text); }
.trash-img { position: relative; display: block; aspect-ratio: var(--r); max-height: 220px; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s, transform .15s; }
.trash-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.55); transition: filter .2s; }
.trash-it:hover .trash-img img, .trash-it.on .trash-img img { filter: none; }
.trash-it.on .trash-img { box-shadow: 0 0 0 3px var(--text); transform: scale(.97); }
.trash-it.on .pick-ck { background: var(--text); color: var(--bg); box-shadow: none; }
.trash-img .ic-count { top: 7px; right: 7px; }
.trash-t { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trash-m { font-size: 11.5px; color: var(--text-3); line-height: 1.35; }
.trash-m .warn { color: var(--down); font-weight: 600; }
.trash-foot .btn.danger:not(:disabled) { border-color: var(--down); }
@media (max-width: 600px) {
  .trash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 60dvh; }
  .trash-m { display: none; }
  #sel-mode span { display: none; }
  #sel-mode { width: 36px; padding: 0; justify-content: center; }
  .selbar { left: 8px; right: 8px; transform: none; bottom: calc(env(safe-area-inset-bottom) + 10px); padding: 6px 6px 6px 12px; gap: 6px; animation: none; }
  .selbar .btn span { display: none; }
  .selbar .btn { width: 36px; padding: 0; justify-content: center; }
  .selbar .sel-del { width: auto; padding: 0 12px; }
  .selbar .sel-del span { display: inline; }
}
@media (max-width: 600px) {
  .selbar .sel-all span { display: none; }
  .trash-foot { gap: 6px !important; }
  .trash-foot .btn { flex: 1 1 auto; justify-content: center; }
  .trash-foot [data-n], .trash-foot .spacer { display: none; }
}
@media (max-width: 600px) {
  .selbar b { order: 0; font-size: 13px; }
  .selbar .sel-del { order: 1; }
  .selbar [data-a=clear] { order: 2; }
  .selbar > *:not(b):not(.sel-del):not([data-a=clear]) { order: 3; }
}

/* ============================ tags ============================ */
.tag-chip { --tc: var(--text-3); display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--tc) 80%, var(--text)); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tc) 25%, transparent); white-space: nowrap; cursor: pointer; transition: background .15s; }
.tag-chip:hover { background: color-mix(in srgb, var(--tc) 20%, var(--surface)); }
.tag-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }
.tag-chip.sm { height: 20px; padding: 0 7px; font-size: 11px; }
.tag-chip.more { color: var(--text-3); cursor: default; }
.tag-chip button { border: 0; background: none; padding: 0; margin-right: -3px; color: inherit; opacity: .6; cursor: pointer; display: grid; place-items: center; }
.tag-chip button:hover { opacity: 1; }
.tag-list { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.pc-tags { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; margin-top: 6px; mask-image: linear-gradient(90deg, #000 85%, transparent); }
/* editor */
.tag-ed { display: flex; flex-direction: column; gap: 12px; }
.tg-row, .tg-free { --tc: var(--text-3); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 12px; background: var(--surface); }
.tg-row { border-left: 3px solid var(--tc); }
.tg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.tg-head .faint { font-size: 12px; font-variant-numeric: tabular-nums; }
.tg-all { border: 0; background: none; color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.tg-all:hover { background: var(--surface-2); color: var(--text); }
.tg-vals { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tg-v { --tc: var(--text-3); display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 550; cursor: pointer; transition: all .15s var(--ease); user-select: none; }
.tg-row .tg-v, .tg-admin .tg-v { --tc: inherit; }
.tg-v:hover { border-color: var(--tc, var(--text-3)); color: var(--text); }
.tg-v:active { transform: scale(.95); }
.tg-v.on { background: var(--tc); border-color: var(--tc); color: #fff; box-shadow: 0 4px 12px -6px var(--tc); }
.tg-row .tg-v.on, .tg-admin .tg-v.on { background: var(--tc); border-color: var(--tc); }
.tg-row { --tc: inherit; }
.tg-v.on::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.tg-v.static { cursor: default; padding-right: 6px; }
.tg-v.static::before { display: none; }
.tg-v.static button { border: 0; background: rgba(255,255,255,.22); color: #fff; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.tg-v.rm.on { background: var(--down-bg); border-color: var(--down); color: var(--down); text-decoration: line-through; box-shadow: none; }
.tg-v.rm.on::before { background: var(--down); }
.tg-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 38px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); cursor: text; }
.tg-box:focus-within { border-color: var(--text-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 15%, transparent); }
.tg-input { flex: 1; min-width: 140px; border: 0; outline: 0; background: none; height: 28px; padding: 0 6px; font-size: 13.5px; color: var(--text); }
.tg-admin .tg-input { border: 1px dashed var(--border-strong); border-radius: 999px; height: 32px; padding: 0 12px; flex: 0 1 200px; min-width: 160px; }
.tg-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tg-sugg:empty { display: none; }
.tg-sugg button { border: 1px dashed var(--border-strong); background: none; color: var(--text-2); height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; cursor: pointer; }
.tg-sugg button:hover { border-style: solid; color: var(--text); background: var(--surface-2); }
.tg-existing { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-admin { border-left: 4px solid var(--tc); }
.tg-templates { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tg-templates .chip { --tc: var(--text-3); }
.tg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); display: inline-block; }
@media (max-width: 600px) {
  .tg-v { height: 34px; padding: 0 11px; }
  .tg-row, .tg-free { padding: 10px; }
}

/* ===================================================================== v4 – text sets (mit / ohne Text) */
/* sharper previews: no extra resampling blur in the grid */
.pc-track img, .vs-frame img, .ig-cell img, .strip-item img, .vs-all-item img, .li-thumb img { image-rendering: auto; backface-visibility: hidden; transform: translateZ(0); }
.pc-cell { position: relative; flex: none; width: 100%; height: 100%; }
.pc-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pc-media.r-1-1 .pc-cell img, .pc-media.r-1-91-1 .pc-cell img, .pc-media.r-9-16 .pc-cell img { object-fit: contain; background: var(--surface-3); }
/* crossfade pair: .v-t (with text) above .v-b (without) */
.pc-cell .v-b, .tt-pair .v-b { opacity: 0; transition: opacity .38s cubic-bezier(.4,0,.2,1) var(--tt-d, 0ms); }
.pc-cell .v-t, .tt-pair .v-t { transition: opacity .38s cubic-bezier(.4,0,.2,1) var(--tt-d, 0ms), filter .38s; }
.pc.show-base .pc-cell .v-b { opacity: 1; }
.pc.show-base .pc-cell:has(.v-b) .v-t { opacity: 0; }
.tt-pair { position: relative; display: block; }
.tt-pair > img { display: block; }
.tt-pair > .v-b { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer.show-base .tt-pair:has(.v-b) > .v-t { opacity: 0; }
.viewer.show-base .tt-pair > .v-b { opacity: 1; }
.ig-cell.tt-pair, .strip-item .tt-pair { height: 100%; }
.strip-item .tt-pair img { width: 100%; height: 100%; object-fit: cover; }
.vs-all-item .tt-pair img { width: 100%; height: 100%; object-fit: cover; }
.vs-frame.tt-pair > .v-b { object-fit: contain; }
.ig-sf .fg.tt-pair { width: 100%; }
.ig-sf .fg.tt-pair img { width: 100%; object-fit: contain; }
.ig-sf .fg.tt-pair .v-b { height: 100%; }

/* card pill toggle (Mit / Ohne) */
.pc-tt { pointer-events: auto; cursor: pointer; border: 0; gap: 4px; position: relative; overflow: hidden; padding-right: 8px; }
.pc-tt .tt-a, .pc-tt .tt-b { display: inline-flex; align-items: center; gap: 4px; transition: transform .3s var(--ease), opacity .3s; }
.pc-tt .tt-b { position: absolute; inset: 0; justify-content: center; transform: translateY(110%); opacity: 0; }
.pc.show-base .pc-tt .tt-a { transform: translateY(-110%); opacity: 0; }
.pc.show-base .pc-tt .tt-b { transform: none; opacity: 1; }
.pc.show-base .pc-tt { background: rgba(231,220,198,.92); color: #0A0A0A; }
.pc-tt:hover { background: rgba(17,17,17,.75); }
.li-thumb .set-n { position: absolute; left: 3px; bottom: 3px; padding: 2px 4px; }

/* segmented switch with sliding thumb */
.tt-seg { position: relative; isolation: isolate; }
.tt-seg button { position: relative; z-index: 1; background: none !important; box-shadow: none !important; }
.tt-seg button.on { color: var(--text); }
.tt-seg .seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 4px); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-1); transition: transform .32s cubic-bezier(.3,1.3,.5,1); }
.tt-seg[data-m=base] .seg-thumb { transform: translateX(calc(100% + 2px)); }
.tt-seg button { flex: 1; justify-content: center; }
.viewer .vt-tt { margin-right: 6px; }
@media (max-width: 899px) { .tt-seg button span { display: none; } .tt-seg button { padding: 0 10px; } }

/* set CTA */
.set-cta { border-style: dashed; }

/* manage set dialog */
.set-bulk { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px dashed var(--border-strong); border-radius: 12px; cursor: pointer; margin-bottom: 14px; transition: background .15s, border-color .15s; }
.set-bulk:hover, .set-bulk.over { background: var(--surface-2); border-color: var(--text-2); }
.set-list { display: grid; gap: 10px; max-height: min(60vh, 640px); overflow: auto; padding: 2px; }
.set-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: 10px; }
.set-row .set-n { font: 600 12px/1 var(--mono, ui-monospace, monospace); color: var(--text-3); text-align: center; }
.set-arrow { color: var(--text-3); display: grid; place-items: center; }
.set-fig { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); max-height: 220px; width: 100%; }
.set-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-fig figcaption { position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(10,10,10,.65); color: #fff; display: inline-flex; gap: 4px; align-items: center; backdrop-filter: blur(6px); }
.set-drop { cursor: pointer; border: 1.5px dashed var(--border-strong); display: grid; place-items: center; transition: border-color .15s, background .15s; }
.set-drop.has { border-style: solid; border-color: transparent; }
.set-drop.new { box-shadow: 0 0 0 2px #E7DCC6; }
.set-drop:hover, .set-drop.over { border-color: var(--text-2); background: var(--surface-3); }
.set-empty { display: grid; justify-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; text-align: center; padding: 10px; }
.set-rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(10,10,10,.7); color: #fff; display: grid; place-items: center; cursor: pointer; }
@media (max-width: 600px) { .set-row { grid-template-columns: 18px 1fr 1fr; } .set-arrow { display: none; } .set-fig { max-height: 260px; } }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* pair dialog */
.pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.pair-col { display: grid; gap: 10px; min-width: 0; }
.pair-lbl { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.pair-stack { position: relative; width: 70%; margin: 6px auto 10px; }
.pair-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-2); transform: translate(calc(var(--i) * 10px), calc(var(--i) * -8px)) rotate(calc(var(--i) * 3deg)); z-index: calc(3 - var(--i)); transition: transform .3s var(--ease); }
.pair-meta { font-size: 13px; }
.pair-swap { border-radius: 50%; width: 42px; height: 42px; }
.pair-swap:hover .ic { transform: rotate(180deg); transition: transform .35s var(--ease); }
@media (max-width: 600px) { .pair { grid-template-columns: 1fr; } .pair-swap { justify-self: center; transform: rotate(90deg); } .pair-stack { width: 46%; } }

/* upload: pairing assistant */
.up-pair { display: grid; gap: 8px; }
.up-pair-row { display: grid; grid-template-columns: 22px 1fr 1fr; gap: 8px; align-items: center; }
.up-pair-row .set-fig { max-height: 150px; }
.up-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.up-mode button { text-align: left; padding: 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; display: grid; gap: 4px; }
.up-mode button b { display: inline-flex; gap: 6px; align-items: center; }
.up-mode button.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.up-mode button span { font-size: 12px; color: var(--text-2); }
@media (max-width: 600px) { .up-mode { grid-template-columns: 1fr; } }

/* ===================================================================== v4 – editor brand / plates / views */
.ed-view { margin-right: 4px; }
.ed-view button { height: 30px; padding: 0 10px; }
.ed.view-clean .ed-canvas-box { box-shadow: 0 0 0 2px #E7DCC6, var(--shadow-3); }
.ed.view-orig .ed-canvas-box { box-shadow: 0 0 0 2px var(--info, #3B5BFD), var(--shadow-3); }
.ed-stage { position: relative; }
.ed-viewbadge { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; pointer-events: none; padding: 5px 12px; border-radius: 999px; font: 600 12px/1.2 var(--font); background: #0A0A0A; color: #E7DCC6; opacity: 0; transition: opacity .2s; }
.ed.view-clean .ed-viewbadge, .ed.view-orig .ed-viewbadge { opacity: .92; }
.ed.view-clean .ed-viewbadge::after { content: 'Ohne Text – so sieht das Grundbild aus'; }
.ed.view-orig .ed-viewbadge::after { content: 'Original aus der Bibliothek (nur ansehen)'; }
html[lang=en] .ed.view-clean .ed-viewbadge::after { content: 'Without text – the clean image'; }
html[lang=en] .ed.view-orig .ed-viewbadge::after { content: 'Original from the library (view only)'; }
.hl-bar { position: absolute; z-index: 5; left: 50%; bottom: 84px; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 9px 16px; background: #0A0A0A; color: #E7DCC6; font: 600 13px/1 var(--font); display: inline-flex; gap: 6px; align-items: center; box-shadow: var(--shadow-3); cursor: pointer; animation: popIn .18s var(--ease); }
@keyframes popIn { from { transform: translate(-50%, 6px); opacity: 0 } }

.brand-box { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: linear-gradient(180deg, rgba(231,220,198,.10), transparent 70%); margin-bottom: 14px; }
.brand-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.brand-head .badge { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; }
.brand-tpl { display: grid; gap: 3px; background: #0A0A0A; color: #fff; border-color: #222; }
.brand-tpl:hover { background: #161616; border-color: #444; }
.brand-tpl small { color: rgba(231,220,198,.7); font-size: 11px; }
.lay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lay-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 6px; cursor: pointer; display: grid; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-2); text-align: left; transition: border-color .15s, transform .15s; }
.lay-btn:hover { border-color: var(--text-3); transform: translateY(-1px); }
.lay-prev { position: relative; aspect-ratio: 4 / 5; border-radius: 7px; overflow: hidden; background: linear-gradient(160deg, #3b3a36, #121212 70%); display: block; }
.lay-prev b { position: absolute; left: 10%; color: #fff; font: 700 13px/1 Manrope, sans-serif; z-index: 1; }
.lay-prev b em { font-family: Lora, serif; font-style: italic; font-weight: 400; color: #E7DCC6; }
.lay-prev s { position: absolute; left: 10%; width: 28%; height: 3px; border-radius: 2px; background: #E7DCC6; z-index: 1; }
.lay-prev .pl { position: absolute; left: 6%; right: 6%; border-radius: 6px; }
.lay-bottom_glass b { bottom: 18%; } .lay-bottom_glass s { bottom: 30%; } .lay-bottom_glass .pl { bottom: 10%; height: 28%; background: rgba(10,10,10,.45); backdrop-filter: blur(4px); }
.lay-center_big b { top: 44%; left: 0; right: 0; text-align: center; font-size: 16px; } .lay-center_big .pl { display: none; }
.lay-top_label b { top: 20%; } .lay-top_label s { top: 12%; } .lay-top_label .pl { top: 6%; height: 26%; background: rgba(255,255,255,.12); }
.lay-card_champagne b { top: 46%; left: 0; right: 0; text-align: center; color: #0A0A0A; } .lay-card_champagne b em { color: #0A0A0A; } .lay-card_champagne s { top: 38%; left: 36%; background: #0A0A0A; } .lay-card_champagne .pl { top: 32%; height: 30%; background: #E7DCC6; }
.more-styles { margin-top: 6px; } .more-styles summary, .more-colors summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 6px 0; }
.more-colors { margin-top: 6px; }

.prop-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-top: 12px; background: var(--surface-2); }
.prop-card-h { display: flex; gap: 7px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }
.prop-card-h .faint { margin-left: auto; font-size: 11px; }
.hl-words { display: flex; flex-wrap: wrap; gap: 5px; }
.hl-words button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; color: var(--text); transition: all .15s; }
.hl-words button:hover { border-color: var(--text-3); }
.hl-words button.on { background: #0A0A0A; color: #E7DCC6; border-color: #0A0A0A; font-family: Lora, serif; font-style: italic; }
.hl-words .hl-none { color: var(--text-2); display: inline-flex; gap: 4px; align-items: center; }
.plate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.plate-grid button { border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 5px; cursor: pointer; display: grid; gap: 4px; font-size: 11px; color: var(--text-2); }
.plate-grid button.on { border-color: var(--text); color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.pv { display: block; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #8a7f6d, #2a2723 60%, #5c5448); position: relative; overflow: hidden; }
.pv::after { content: ''; position: absolute; inset: 7px 9px; border-radius: 4px; }
.pv-milk_dark::after { background: rgba(10,10,10,.45); backdrop-filter: blur(3px); }
.pv-milk_light::after { background: rgba(255,255,255,.28); backdrop-filter: blur(3px); }
.pv-frost::after { background: rgba(255,255,255,.1); backdrop-filter: blur(5px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.pv-champagne::after { background: #E7DCC6; }
.pv-night::after { background: rgba(10,10,10,.85); }
.pv-none::after { border: 1.5px dashed rgba(255,255,255,.5); }
.brand-colors { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.brand-colors .bc { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; font-size: 12px; }
.brand-colors .bc i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(127,127,127,.4); }
.brand-colors .bc.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.save-opt { align-items: flex-start !important; padding-top: 9px !important; padding-bottom: 9px !important; gap: 10px !important; }
.save-opt small { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 400; margin-top: 2px; white-space: normal; line-height: 1.35; }
.save-opt kbd { font-size: 10.5px; }
@media (max-width: 899px) { .ed-view button span { display: none; } .ed-view button { padding: 0 9px; } .hl-bar { bottom: 120px; } }

/* admin brand */
.brand-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bsw { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 6px 6px 6px 8px; }
.bsw .input { width: 120px; }
.brand-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.brand-font { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.bf-prev { font-size: 22px; padding: 10px 12px; border-radius: 8px; background: #0A0A0A; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-row { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; cursor: pointer; }
.pop:has(.save-opt) { max-width: 380px; }
@media (max-width: 899px) {
  .pc-tt { padding: 0 6px; min-width: 26px; justify-content: center; }
  .pc-tt .tt-a, .pc-tt .tt-b { font-size: 0; gap: 0; }
  .pc-tt .tt-a .ic, .pc-tt .tt-b .ic { width: 14px; height: 14px; }
}

/* ================================================================ v5 · picker, empty slots, pinned images, tidy props */
/* toast with action (undo) */
.toast .toast-act { margin-left: 6px; border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); color: inherit; font: inherit; font-weight: 700; height: 26px; padding: 0 10px; border-radius: 7px; cursor: pointer; }
.toast .toast-act:hover { background: color-mix(in srgb, var(--bg) 30%, transparent); }

/* ---- properties panel: calmer type, no ugly wrapping */
.ed-props { font-size: 13px; }
.ed-props h4 { font-size: 10.5px; letter-spacing: .09em; margin: 20px 0 10px; color: var(--text-3); }
.ed-props .btn.sm { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ed-props .btn.block { justify-content: center; }
.ed-props .btn-group button { white-space: nowrap; }
.prop-row > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.prop-row input[type=range] { flex: 1; min-width: 0; }
.prop-note { font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.prop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 2px; }
.prop-btns .btn { justify-content: center; gap: 6px; min-width: 0; padding: 0 8px; }
.prop-btns .btn span { overflow: hidden; text-overflow: ellipsis; }
.prop-btns .btn:only-child { grid-column: 1 / -1; }
.prop-seg { flex: 1; min-width: 0; display: flex; }
.prop-seg button { height: 28px !important; padding: 0 8px !important; font-size: 12.5px !important; gap: 5px !important; min-width: 0; }
.prop-seg button em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) { .tt-seg.prop-seg button em { display: inline; } .ipick-foot .tt-seg button span { display: inline; } }

/* pin card */
.pin-card { margin-bottom: 10px; }
.pin-toggle { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 11px; padding: 10px 12px; cursor: pointer; color: var(--text); transition: border-color .15s, background .15s; }
.pin-toggle:hover { background: var(--surface-2); }
.pin-toggle .ic { flex: none; margin-top: 1px; }
.pin-toggle span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pin-toggle b { font-size: 13px; font-weight: 650; }
.pin-toggle small { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.pin-card.on .pin-toggle { border-color: color-mix(in srgb, var(--up) 45%, var(--border)); background: color-mix(in srgb, var(--up) 7%, var(--surface)); }
.pin-card.on .pin-toggle .ic { color: var(--up); }

/* slide background card (nothing selected) */
.bg-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 11px; padding: 8px; background: var(--surface-2); }
.bg-card img { width: 46px; height: 58px; object-fit: cover; border-radius: 7px; flex: none; }
.bg-card-b { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bg-card-b b { font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.bg-card-b .btn { padding: 0 8px; }

/* layers: pinned */
.layer .la button.on { color: var(--up); }
.layer .la:has(button.on) { opacity: 1; }

/* library panel in editor */
.media-grid button img { image-rendering: auto; }
.media-grid button .lbl2 { position: absolute; right: 4px; top: 4px; height: 20px; padding: 0 5px; }

/* ---- empty slot on the canvas */
.ed-cuts i.empty { background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.018) 14px 28px); }
.slot-cta { pointer-events: auto; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px; text-align: center; color: #E7DCC6; cursor: pointer; }
.slot-cta > b { font-size: clamp(12px, 1.6vw, 15px); font-weight: 650; color: #F3EEE3; max-width: 260px; line-height: 1.35; }
.slot-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: rgba(231,220,198,.08); border: 1px dashed rgba(231,220,198,.35); color: #E7DCC6; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.slot-cta:hover .slot-icon { transform: scale(1.08) rotate(-3deg); }
.slot-acts { display: flex; flex-direction: column; gap: 7px; width: min(220px, 86%); }
.slot-acts button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 38px; border-radius: 11px; border: 1px solid rgba(231,220,198,.22); background: rgba(255,255,255,.06); color: #F3EEE3; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); transition: background .15s, transform .15s, border-color .15s; }
.slot-acts button:hover { background: rgba(255,255,255,.12); border-color: rgba(231,220,198,.4); }
.slot-acts button:active { transform: scale(.97); }
.slot-acts button.gk { border: 0; background: var(--gk-grad); background-size: 200% 200%; animation: gkFlow 6s ease infinite; color: #fff; box-shadow: 0 10px 26px -12px var(--gk-2); }
.slot-job { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.slot-job b { font-size: 14px; color: #fff; }
.slot-job small, .slot-ready small { font-size: 11.5px; opacity: .7; max-width: 220px; }
.slot-job .gk-orb { width: 48px; height: 48px; }
.slot-ready { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; color: #fff; background: var(--gk-grad); padding: 12px 18px; border-radius: 14px; cursor: pointer; font: inherit; box-shadow: 0 14px 30px -12px var(--gk-2); animation: slotPop .5s cubic-bezier(.2,1.4,.4,1); }
.slot-ready b { font-size: 13.5px; }
@keyframes slotPop { from { transform: scale(.85); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---- page strip: delete + empty */
.ed-page-w { position: relative; flex: none; }
.ed-page-x { position: absolute; top: -5px; right: -5px; z-index: 2; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--surface); background: var(--text); color: var(--bg); display: grid; place-items: center; cursor: pointer; padding: 0; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s, background .15s; }
.ed-page-w:hover .ed-page-x, .ed-page-w:has(.ed-page.on) .ed-page-x { opacity: 1; transform: none; }
.ed-page-x:hover { background: var(--down); color: #fff; }
@media (hover: none) { .ed-page-x { opacity: 1; transform: none; width: 22px; height: 22px; } }
.ed-page.empty { background: #0A0A0A; border-style: dashed; border-color: rgba(231,220,198,.3); display: grid; place-items: center; color: #E7DCC6; }
.ed-page.empty.on { border-style: solid; border-color: #E7DCC6; }
.ed-page .ep-ic { display: grid; place-items: center; opacity: .75; }
.ed-page img { image-rendering: auto; }

/* ---- image picker modal */
.ipick-modal { max-width: 940px !important; height: min(820px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden !important; }
.ipick-modal .modal-body { flex: 1; min-height: 0; overflow: hidden; padding-bottom: 0; }
.ipick { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.slot-cta, .slot-cta * { font-style: normal; }
.ipick-tile { flex: none; }
.ipick > [data-pbody] { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.ipick-tabs { align-self: flex-start; }
.ipick-tabs button { position: relative; }
.ipick-tabs .ipick-gk.on { background: var(--gk-grad); color: #fff; }
.ipick-tabs .ipick-gk:not(.on) .ic { color: var(--gk-2); }
.ipick-tabs .dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gk-3); box-shadow: 0 0 0 2px var(--surface-3); }
.ipick-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ipick-filters .grow { flex: 1 1 220px; }
.ipick-filters .select { width: auto; max-width: 190px; }
.ipick-toggles { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chk-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none; transition: all .15s; }
.chk-chip input { display: none; }
.chk-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ipick-scroll { flex: 1; min-height: 0; overflow: auto; margin: 0 -22px; padding: 2px 22px 16px; overscroll-behavior: contain; }
.ipick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ipick-tile { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, transform .15s; }
.ipick-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.ipick-tile:hover img { transform: scale(1.035); }
.ipick-tile:active { transform: scale(.98); }
.ipick-tile .lbl { position: absolute; left: 6px; bottom: 6px; }
.ipick-tile .pc-pill.clean, .gk-ref .pc-pill.clean { position: absolute; right: 6px; top: 6px; height: 20px; padding: 0 5px; }
.ipick-check { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s cubic-bezier(.3,1.5,.5,1); }
.ipick-tile.on { outline-color: var(--text); }
.ipick-tile.on .ipick-check, .gk-ref.on .ipick-check { opacity: 1; transform: none; }
.ipick-tile.on img { filter: brightness(.88); }
.ipick-more { display: grid; place-items: center; padding: 18px 0; }
.ipick-more.hidden, .hidden { display: none !important; }
.ipick-foot { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; }
.ipick-modal .modal-foot { padding-top: 12px; border-top: 1px solid var(--border); }
.ipick-sel { width: 36px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.ipick-sel-t { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; max-width: 260px; }
.ipick-foot .tt-seg button { height: 30px; font-size: 12.5px; padding: 0 10px; }
.ipick-drop { flex: 1; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--border-strong); border-radius: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.ipick-drop:hover, .ipick-drop.over { border-color: var(--text); background: var(--surface-2); }
.ipick-drop.busy { opacity: .6; pointer-events: none; }
.ipick-drop .ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-3); }
/* grok tab */
.gk-form { display: flex; flex-direction: column; gap: 6px; }
.gk-form .textarea { font-size: 14.5px; }
.gk-ideas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.gk-ideas .chip { height: 28px; font-size: 12.5px; }
.gk-refs { display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px 6px; }
.gk-ref { position: relative; flex: none; width: 74px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; opacity: .45; transition: opacity .15s, outline-color .15s; }
.gk-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gk-ref.on { opacity: 1; outline-color: var(--gk-2); }
.gk-ref .ipick-check { background: var(--gk-2); color: #fff; width: 18px; height: 18px; left: 4px; top: 4px; }
.gk-row { align-items: center; gap: 10px; margin-top: 10px; }
.gk-go { border: 0; color: #fff; background: var(--gk-grad); background-size: 200% 200%; animation: gkFlow 6s ease infinite; height: 40px; padding: 0 18px; font-weight: 700; box-shadow: 0 12px 26px -14px var(--gk-2); }
.gk-go:hover { filter: brightness(1.06); }
.ipick-jobs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.gk-job { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--gk-soft); display: flex; flex-direction: column; gap: 10px; }
.gk-job.run { border-color: color-mix(in srgb, var(--gk-2) 40%, var(--border)); }
.gk-job-h { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.gk-job-h b { flex: 1; min-width: 0; font-weight: 600; }
.gk-job-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.gk-v { position: relative; padding: 0; border: 0; border-radius: 9px; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.gk-v img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.gk-v:hover img { transform: scale(1.04); }
.gk-v span { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: rgba(10,10,10,.72); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.gk-v.used span { background: var(--up); }
@media (max-width: 899px) {
  .ipick-modal { height: calc(100vh - 20px); max-width: 100% !important; }
  .ipick-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .ipick-filters .select { flex: 1 1 40%; max-width: none; }
  .ipick-sel-t { display: none; }
  .ipick-tabs { align-self: stretch; }
  .ipick-tabs button { flex: 1; justify-content: center; padding: 0 6px; }
  .slot-acts button { height: 34px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .slot-acts button.gk, .gk-go { animation: none; } }

/* admin brand: grok setup + free font input */
.brand-grok { border: 1px solid color-mix(in srgb, var(--gk-2) 35%, var(--border)); background: var(--gk-soft); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.brand-grok-h { display: flex; gap: 12px; align-items: flex-start; }
.brand-grok-h .gk-orb { width: 40px; height: 40px; border-radius: 13px; flex: none; }
.brand-grok-h b { font-size: 14.5px; }
.brand-grok-h p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.brand-grok .row { gap: 8px; }
.brand-grok .input { flex: 1; }
.brand-grok-st { font-size: 12.5px; display: flex; gap: 8px; align-items: center; color: var(--text-2); }

.prop-ver { margin-bottom: 10px; }
.prop-ver .prop-seg { width: 100%; }
.prop-btns { grid-template-columns: 1fr; }
.ed-props .prop-row > label { width: 92px; font-size: 12px; }
.ipick-jobs { margin-top: 16px; }
.ipick-foot .gk-go { height: 36px; }

/* ================================================================ v6 · polish */
/* canvas slide labels are <i> elements – never italic */
.ed-cuts i { font-style: normal; }
.ed-cuts i > span { font-style: normal; letter-spacing: .02em; }

/* animated Grok bot while painting */
.slot-cta.busy { cursor: default; }
.slot-job { gap: 12px; }
.gk-bot { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.gk-face { position: relative; z-index: 2; width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: var(--gk-grad); background-size: 200% 200%; animation: gkFlow 4s ease infinite, gkBob 2.4s ease-in-out infinite; box-shadow: 0 16px 34px -12px var(--gk-2), inset 0 1px 0 rgba(255,255,255,.35); }
.gk-face .ic { animation: gkBlink 3.6s infinite; }
.gk-ring { position: absolute; inset: 6px; border-radius: 26px; border: 1.5px solid color-mix(in srgb, var(--gk-2) 60%, transparent); animation: gkPulse 2.4s ease-out infinite; }
.gk-ring.r2 { animation-delay: 1.2s; }
.gk-spark { position: absolute; z-index: 3; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px var(--gk-3); animation: gkOrbit 3s linear infinite; }
.gk-spark.s2 { animation-delay: -1s; width: 5px; height: 5px; background: var(--gk-3); }
.gk-spark.s3 { animation-delay: -2s; width: 4px; height: 4px; }
.gk-steps { position: relative; height: 20px; overflow: hidden; display: block; min-width: 220px; }
.gk-steps span { position: absolute; inset: 0; text-align: center; opacity: 0; transform: translateY(100%); animation: gkStep 12s infinite; white-space: nowrap; }
.gk-steps span:nth-child(2) { animation-delay: -9s; } .gk-steps span:nth-child(3) { animation-delay: -6s; } .gk-steps span:nth-child(4) { animation-delay: -3s; }
.slot-job small { font-style: italic; max-width: 240px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gk-bar { display: block; width: 160px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 2px; }
.gk-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--gk-grad); animation: gkBar 1.6s ease-in-out infinite; }
@keyframes gkBob { 0%,100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-5px) rotate(-3deg) } }
@keyframes gkBlink { 0%,92%,100% { transform: scaleY(1) } 95% { transform: scaleY(.15) } }
@keyframes gkPulse { from { transform: scale(.85); opacity: .9 } to { transform: scale(1.45); opacity: 0 } }
@keyframes gkOrbit { from { transform: rotate(0) translateX(44px) rotate(0) } to { transform: rotate(360deg) translateX(44px) rotate(-360deg) } }
@keyframes gkStep { 0% { opacity: 0; transform: translateY(100%) } 2%,23% { opacity: 1; transform: none } 25%,100% { opacity: 0; transform: translateY(-100%) } }
@keyframes gkBar { 0% { transform: translateX(-100%) } 100% { transform: translateX(260%) } }
@media (prefers-reduced-motion: reduce) { .gk-face, .gk-face .ic, .gk-ring, .gk-spark, .gk-bar i { animation: none; } .gk-steps span { animation: none; } .gk-steps span:last-child { opacity: 1; transform: none; } }

/* props: background card never overflows */
.ed-props { overflow-x: hidden; }
.bg-card { align-items: flex-start; }
.bg-card-b { flex: 1; }
.bg-card-b .row { flex-wrap: wrap; }
.bg-card-b .btn { flex: 1 1 auto; justify-content: center; }

/* suggestion chips: wrap instead of hidden horizontal scroll */
.gk-sugg.compact { flex-wrap: wrap; overflow: visible; }

/* library card: clear text / no-text switch */
.pc-ttsw { position: relative; flex: 0 1 auto; min-width: 0; display: inline-flex; padding: 2px; border: 0; border-radius: 999px; background: rgba(10,10,10,.62); backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px); cursor: pointer; box-shadow: 0 4px 14px -4px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.12); }
.pc-ttsw span { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; color: rgba(255,255,255,.7); font-size: 11px; font-weight: 700; transition: color .25s; white-space: nowrap; }
.pc-ttsw em { font-style: normal; }
.pc-ttsw .tt-th { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; width: var(--w1, 50%); border-radius: 999px; background: #fff; transition: transform .32s cubic-bezier(.3,1.3,.5,1), width .32s, background .25s; }
.pc-ttsw .tt-on { color: #0A0A0A; }
.pc.show-base .pc-ttsw .tt-on { color: rgba(255,255,255,.7); }
.pc.show-base .pc-ttsw .tt-off { color: #0A0A0A; }
.pc.show-base .pc-ttsw .tt-th { background: #E7DCC6; }
.pc-ttsw:hover span { color: #fff; }
.pc-ttsw:hover .tt-on, .pc.show-base .pc-ttsw:hover .tt-off { color: #0A0A0A; }
.pc-ttsw:active { transform: scale(.96); }
@media (max-width: 899px) { .pc-ttsw em { display: none; } .pc-ttsw span { padding: 0 7px; } }

/* editor: studio nav button instead of vanishing navigation */
.ed-home { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s; }
.ed-home:hover { background: var(--surface-3); border-color: var(--border-strong); }
.ed-home .ed-home-c { color: var(--text-3); }
.ed-back { margin-left: -4px; }
@media (max-width: 900px) { .ed-home { height: 34px; padding: 0 6px; } .ed-home .ed-home-c { display: none; } }
.pc-ttsw { display: inline-grid; grid-template-columns: 1fr 1fr; }
.pc-ttsw span { justify-content: center; }
.pc-ttsw .tt-th { width: calc(50% - 2px); }
.pc.show-base .pc-ttsw .tt-th { transform: translateX(100%); }

/* ================================================================ v7 · example images + style library */
/* empty slot on a LIGHT slide: dark ink */
.ed-cuts i.empty.light { background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,.025) 14px 28px); }
.ed-cuts i.light .slot-cta { color: #3a3630; }
.ed-cuts i.light .slot-cta > b { color: #1a1814; }
.ed-cuts i.light .slot-icon { background: rgba(10,10,10,.05); border-color: rgba(10,10,10,.25); color: #3a3630; }
.ed-cuts i.light .slot-acts button:not(.gk) { background: #fff; color: #1a1814; border-color: rgba(10,10,10,.16); box-shadow: 0 6px 18px -10px rgba(0,0,0,.35); backdrop-filter: none; }
.ed-cuts i.light .slot-acts button:not(.gk):hover { background: #f4f1ea; border-color: rgba(10,10,10,.3); }
.ed-cuts i.light .slot-job b { color: #1a1814; }
.ed-cuts i.light .slot-job small { color: #3a3630; opacity: .8; }
.ed-cuts i.light .gk-bar { background: rgba(0,0,0,.08); }

/* attach button + tray */
.ref-add { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px; border: 1px dashed var(--border-strong); background: none; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; flex: none; }
.ref-add:hover { color: var(--text); border-color: var(--text-3); background: var(--surface-2); }
.ref-add.on { border-style: solid; color: var(--text); background: var(--surface-2); }
.composer .ref-add span { display: none; }
@media (min-width: 1200px) { .composer .ref-add span { display: inline; } }
.ref-tray { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 10px 0; }
.ref-chip { position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); animation: popIn .2s var(--ease); }
.ref-chip img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.ref-chip.busy img { opacity: .45; filter: blur(1px); }
.ref-chip .spin { position: absolute; left: 50%; top: 50%; margin: -7px; color: var(--text); }
.ref-chip button { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(10,10,10,.75); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ref-hint { font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.composer.ref-over, .gk-wishbox.ref-over { outline: 2px dashed var(--gk-2); outline-offset: 2px; background: var(--gk-soft); }
.ref-tip { font-size: 11.5px; color: var(--text-3); display: flex; gap: 6px; align-items: center; margin-top: -4px; }
/* thumbs in notes / tasks */
.ref-thumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.ref-thumb { width: 54px; height: 54px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ref-thumb:hover img { transform: scale(1.06); }
.ref-lbl { font-size: 11px; color: var(--text-3); display: inline-flex; gap: 4px; align-items: center; }
.gk-instr .ref-thumbs { margin-top: 8px; }
/* picker wish box */
.gk-wishbox { border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.gk-wishbox:focus-within { border-color: var(--gk-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gk-2) 16%, transparent); }
.gk-wishbox .textarea { border: 0; box-shadow: none !important; background: none; resize: vertical; }
.gk-wishbar { display: flex; gap: 10px; align-items: center; padding: 0 10px 10px; font-size: 12px; }
.gk-wishbar .ref-add span { display: inline; }

/* "Merken" chip on Grok images */
.gk-learn { position: absolute; z-index: 3; right: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(10,10,10,.68); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; backdrop-filter: blur(8px); cursor: pointer; opacity: 0; transform: translateY(-3px); transition: all .18s var(--ease); }
.gk-learn em { font-style: normal; }
.gk-var:hover .gk-learn, .gk-v:hover .gk-learn, .gk-learn.on, .gk-learn:focus-visible { opacity: 1; transform: none; }
.gk-learn:hover { background: var(--gk-grad); }
.gk-learn.on { background: var(--gk-grad); box-shadow: 0 4px 14px -6px var(--gk-2); }
@media (hover: none) { .gk-learn { opacity: 1; transform: none; } }
.gk-v .gk-learn { left: auto; right: 6px; bottom: auto; top: 6px; width: auto; height: 22px; }
.cmp-learn.on { background: var(--gk-grad); color: #fff; border-color: transparent; }

/* learn dialog */
.learn { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 20px; align-items: start; min-width: 0; }
.learn-b { min-width: 0; }
.learn-img { width: 100%; border-radius: 12px; object-fit: cover; aspect-ratio: 4/5; background: var(--surface-2); box-shadow: var(--shadow-2); }
.learn-likes { display: flex; flex-wrap: wrap; gap: 6px; }
.learn-likes .chip.on { background: var(--gk-grad); border-color: transparent; color: #fff; }
.learn-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.learn-opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s, background .15s; }
.learn-opt span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.learn-opt b { font-size: 13px; }
.learn-opt small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learn-opt.on { border-color: var(--gk-2); background: var(--gk-soft); }
.learn-opt.on .ic { color: var(--gk-2); }
@media (max-width: 640px) { .learn { grid-template-columns: 1fr; } .learn-img { max-height: 240px; aspect-ratio: auto; } .learn-scope { grid-template-columns: 1fr; } }

/* admin style library */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.style-it { position: relative; margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.style-it img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.style-it figcaption { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.style-it .style-likes { color: var(--text-2); }
.style-it em { color: var(--text-3); font-size: 11.5px; }
.style-it [data-sdel] { position: absolute; top: 6px; right: 6px; background: rgba(10,10,10,.6); color: #fff; }

.modal:has(.learn) { max-width: 680px; }
.modal:has(.learn) .modal-foot { align-items: center; }
/* review composer: narrow card – show icons only, keep everything visible */
.review-side .composer-bar, aside.card .composer-bar { flex-wrap: wrap; }
aside.card .composer .kind-sw button span { display: none; }
aside.card .composer .kind-sw button.on span { display: inline; }
aside.card .composer .ref-add span { display: inline; }
aside.card .ref-tip { margin: 0; padding: 0 10px 8px; }
/* editor media panel: two clear jobs */
.media-step { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.media-step > b { font-size: 13.5px; }
.media-step > p { margin: -4px 0 2px; font-size: 12.5px; line-height: 1.45; }
.media-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.media-acts .gk-go { grid-column: 1 / -1; height: 36px; }
.media-acts .btn { justify-content: center; }
.media-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-acts .btn { min-width: 0; padding: 0 8px; overflow: hidden; }
.media-step .bg-card { padding: 6px; }
.media-step .bg-card img { width: 38px; height: 48px; }

/* card bottom bar: Mit/Ohne-Text switch left, like/dislike right – one flex row, never overlapping */
.pc-media { container-type: inline-size; container-name: pcm; }
.pc-bar { position: absolute; z-index: 3; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; pointer-events: none; }
.pc-bar > * { pointer-events: auto; }
.pc-bar .pc-quick { margin-left: auto; }
.pc-media:has(.pc-dots) .pc-bar { bottom: 20px; }
.pc-dots { bottom: 7px; }
@container pcm (max-width: 290px) { .pc-ttsw em { display: none; } .pc-ttsw span { padding: 0 7px; } }
@container pcm (max-width: 150px) { .pc-quick button { width: 28px; height: 28px; } .pc-quick { gap: 4px; } }

/* campaign overview card: whole card is a link, ⋯ menu on top */
.cmp-card { position: relative; }
.cmp-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cmp-link:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.cmp-more { position: absolute; z-index: 2; top: 8px; right: 8px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--border); opacity: .0; transition: opacity .15s, background .15s; }
.cmp-card:hover .cmp-more, .cmp-more:focus-visible, .cmp-more[data-pop-anchor] { opacity: 1; }
.cmp-more:hover { background: var(--surface-2); }
@media (hover: none), (max-width: 899px) { .cmp-more { opacity: 1; } }
.cmp-arch-badge { position: absolute; z-index: 2; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.cmp-card.archived { opacity: .72; }
.cmp-card.archived .cmp-covers { filter: grayscale(.7); }
.cmp-arch { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.cmp-arch > .btn { align-self: flex-start; color: var(--text-2); }
.cmp-del ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cmp-del li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text-2); }
.cmp-del li svg { flex: none; margin-top: 2px; color: var(--up); }
.cmp-del li.bad svg { color: var(--down); }

/* image picker footer on phones: row 1 = hint or selection, row 2 = Mit/Ohne Text + Verwenden */
@media (max-width: 599px) {
  .ipick-foot { flex-wrap: wrap; row-gap: 10px; column-gap: 10px; }
  .ipick-foot > .spacer { display: none; }
  .ipick-foot > .faint:first-child { flex: 1 0 100%; font-size: 12.5px !important; }
  .ipick-foot .ipick-sel, .ipick-foot .ipick-sel-t { display: none; }
  .ipick-foot .tt-seg { flex: 1 1 0; min-width: 0; }
  .ipick-foot .tt-seg button { flex: 1; padding: 0 6px; white-space: nowrap; }
  .ipick-foot [data-use] { flex: none; }
}

/* ================================================================ realtime collaboration (editor) */
.ed-status { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.co-bar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.co-bar:empty { display: none; }
.co-peers { display: flex; align-items: center; }
.co-peer { border: 0; padding: 0; background: none; cursor: pointer; margin-left: -6px; border-radius: 50%; transition: transform .15s var(--ease); }
.co-peer:first-child { margin-left: 0; }
.co-peer:hover { transform: translateY(-2px); z-index: 2; }
.co-peer.following .co-av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.co-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 750; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--surface); animation: coPop .35s cubic-bezier(.3,1.5,.5,1); }
@keyframes coPop { from { transform: scale(.4); opacity: 0 } to { transform: none; opacity: 1 } }
.co-more { margin-left: 4px; font-size: 12px; color: var(--text-3); font-weight: 650; }
.co-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.co-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.co-state.live i { background: #30A46C; box-shadow: 0 0 0 0 rgba(48,164,108,.55); animation: coPulse 2.2s infinite; }
.co-state.wait i { background: #FFB224; }
.co-state.off i { background: #E5484D; }
.co-state.off { color: #E5484D; }
@keyframes coPulse { 0% { box-shadow: 0 0 0 0 rgba(48,164,108,.5) } 70% { box-shadow: 0 0 0 7px rgba(48,164,108,0) } 100% { box-shadow: 0 0 0 0 rgba(48,164,108,0) } }
@media (max-width: 1180px) { .co-state span { display: none; } .ed-status { max-width: 160px; } }
@media (max-width: 899px) { .co-av { width: 26px; height: 26px; font-size: 10.5px; } .co-peers .co-peer:nth-child(n+4) { display: none; } .ed-status { display: none; } }

.co-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.co-sel { position: absolute; border: 2px solid var(--c); border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 22px -6px var(--c); transition: left .09s linear, top .09s linear, width .09s linear, height .09s linear; }
.co-sel.typing { border-style: dashed; animation: coType 1.2s ease-in-out infinite; }
@keyframes coType { 50% { box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 30px -2px var(--c) } }
.co-tag { position: absolute; left: -2px; top: -22px; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px 5px 5px 0; white-space: nowrap; line-height: 16px; }
.co-tag em { font-style: normal; font-weight: 500; opacity: .9; }
.co-cursor { position: absolute; left: 0; top: 0; transition: transform .08s linear, opacity .4s; will-change: transform; }
.co-cursor svg { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.co-cursor span { position: absolute; left: 14px; top: 15px; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 0 6px 6px 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.co-cursor.idle { opacity: .25; }
@media (hover: none) { .co-cursor { display: none; } }
.co-dots { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; }
.co-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px var(--surface); }
.ed-page { position: relative; }
.co-follow { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--surface); border: 2px solid var(--c); box-shadow: var(--shadow-2); font-size: 13px; font-weight: 600; }
.co-follow .co-av { width: 24px; height: 24px; font-size: 10px; box-shadow: none; }
.co-follow button { border: 0; background: var(--surface-2); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; color: var(--text-2); font-size: 15px; line-height: 1; }

/* library / viewer: somebody is editing this set */
.pc-live { position: absolute; z-index: 3; top: 44px; left: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: rgba(10,10,10,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 11.5px; font-weight: 650; max-width: calc(100% - 16px); }
.pc-live .co-av { width: 20px; height: 20px; font-size: 9px; box-shadow: 0 0 0 1.5px rgba(10,10,10,.7); animation: none; }
.pc-live .co-av + .co-av { margin-left: -9px; }
.pc-live span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #30A46C; margin-left: 5px; animation: coPulse 2.2s infinite; flex: none; order: -1; }
.v-live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 10px; background: color-mix(in srgb, #30A46C 12%, var(--surface-2)); font-size: 13px; }
.v-live .co-av { width: 22px; height: 22px; font-size: 9.5px; animation: none; }
.v-live .co-av + .co-av { margin-left: -9px; }

/* ================================================================ review threads (comments · @mentions · approvals · suggestions) */
.ed-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--border); }
.ed-side .ed-props { flex: 1; min-height: 0; border-left: 0; }
.ed-side-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--border); flex: none; }
.ed-side-tabs.hidden { display: none; }
.ed-side-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; background: none; color: var(--text-3); font-size: 12.5px; font-weight: 650; border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.ed-side-tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.ed-side-tabs i { font-style: normal; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; font-size: 11px; display: none; place-items: center; background: var(--surface-3); color: var(--text-2); }
.ed-side-tabs i.on { display: inline-grid; }
.ed-side-tabs i.mine { background: #F76B15; color: #fff; }
.ed-threads { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ed-threads.hidden, .ed-props.hidden { display: none !important; }

.th-panel { font-size: 13px; overflow: auto; overscroll-behavior: contain; }
.th-head { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.th-sum { min-height: 22px; display: flex; align-items: center; font-size: 12.5px; }
.th-filter { width: 100%; }
.th-filter button { flex: 1; font-size: 12px; }
.th-filter i { font-style: normal; opacity: .6; margin-left: 2px; }
.th-filter i.hl { opacity: 1; background: #F76B15; color: #fff; border-radius: 8px; padding: 0 5px; }
.th-new { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.th-anchor { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); min-width: 0; }
.th-anchor span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-mode { width: 100%; }
.th-mode button { flex: 1; font-size: 12px; gap: 4px; }
.th-new-bar { display: flex; align-items: center; gap: 6px; }
.th-kbd { font-size: 11px; }
.gk-mini { color: #8E4EC6; }
.mbox { position: relative; }
.mbox textarea, .th-sug-in { width: 100%; resize: vertical; min-height: 54px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); padding: 8px 10px; font: inherit; font-size: 13px; line-height: 1.45; outline: none; }
.mbox textarea:focus, .th-sug-in:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent); }
.th-sug-in { border-color: color-mix(in srgb, #30A46C 50%, var(--border)); background: color-mix(in srgb, #30A46C 6%, var(--surface)); }
.mbox-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-3); padding: 4px; max-height: 240px; overflow: auto; }
.mbox-list.hidden { display: none; }
.mbox-opt { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--text); }
.mbox-opt.on, .mbox-opt:hover { background: var(--surface-2); }
.mbox-opt span { display: flex; flex-direction: column; line-height: 1.2; }
.mbox-opt small { color: var(--text-3); font-size: 11px; }
.th-av { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c, #3E63DD); color: #fff; font-size: 10px; font-weight: 750; }
.th-av.xs { width: 18px; height: 18px; font-size: 8px; }
.th-av.bot { background: linear-gradient(135deg, #8E4EC6, #3E63DD); }
.th-at { color: #3E63DD; font-weight: 650; }
[data-theme=dark] .th-at, .dark .th-at { color: #8DA4EF; }

.th-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.th-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 10px; color: var(--text-3); text-align: center; font-size: 12.5px; }
.th-card { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px 11px; cursor: pointer; color: var(--text); transition: border-color .15s, background .15s, transform .15s var(--ease); border-left: 3px solid var(--sc, var(--border)); }
.th-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.th-card-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; min-width: 0; }
.th-card-top .th-av { width: 22px; height: 22px; font-size: 9px; }
.th-slide { font-size: 11px; color: var(--text-3); font-weight: 600; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
.th-quote { font-size: 12px; color: var(--text-2); font-style: italic; border-left: 2px solid var(--border-strong); padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-snip { font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-card-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); }
.th-card-foot span { display: inline-flex; align-items: center; gap: 3px; }
.th-wait .th-av + .th-av { margin-left: -6px; }
.th-st { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.st-waiting { --sc: #FFB224; } .th-st.st-waiting { background: color-mix(in srgb, #FFB224 18%, transparent); color: #AD5700; }
.st-changes { --sc: #E5484D; } .th-st.st-changes { background: color-mix(in srgb, #E5484D 15%, transparent); color: #CD2B31; }
.st-approved { --sc: #30A46C; } .th-st.st-approved { background: color-mix(in srgb, #30A46C 15%, transparent); color: #18794E; }
.st-suggestion { --sc: #8E4EC6; } .th-st.st-suggestion { background: color-mix(in srgb, #8E4EC6 15%, transparent); color: #793AAF; }
.st-resolved { --sc: var(--border); } .th-card.st-resolved { opacity: .7; }
.st-open { --sc: #3E63DD; }

.th-dhead { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.th-anchorq { display: flex; gap: 8px; align-items: flex-start; margin: 10px 12px 0; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; text-align: left; cursor: pointer; font-style: italic; }
.th-anchorq svg { flex: none; margin-top: 2px; }
.th-warn { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #FFB224 14%, var(--surface)); color: #AD5700; font-size: 12px; }
.th-warn span { flex: 1; }
.th-reqs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; }
.th-req { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--surface-2); font-size: 11.5px; border: 1px solid var(--border); }
.th-req.st-approved { border-color: color-mix(in srgb, #30A46C 50%, transparent); color: #18794E; }
.th-req.st-changes { border-color: color-mix(in srgb, #E5484D 50%, transparent); color: #CD2B31; }
.th-req.st-pending { color: #AD5700; }
.th-msgs { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.th-msg { display: flex; gap: 9px; }
.th-mh { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }
.th-mh .faint { font-size: 11px; }
.th-x { margin-left: auto; border: 0; background: none; color: var(--text-3); cursor: pointer; opacity: 0; padding: 2px; border-radius: 4px; }
.th-msg:hover .th-x { opacity: 1; }
.th-mb { margin-top: 3px; line-height: 1.5; font-size: 13px; word-break: break-word; }
.th-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }
.th-tag.ok { background: color-mix(in srgb, #30A46C 15%, transparent); color: #18794E; }
.th-tag.bad { background: color-mix(in srgb, #E5484D 15%, transparent); color: #CD2B31; }
.th-tag.sug { background: color-mix(in srgb, #8E4EC6 15%, transparent); color: #793AAF; }
.th-msg.bot .th-mb { color: var(--text-2); }
.th-sug { margin-top: 6px; border: 1px solid color-mix(in srgb, #8E4EC6 35%, var(--border)); border-radius: 10px; overflow: hidden; }
.th-sug-diff { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.4; }
.th-sug-diff s { color: var(--text-3); text-decoration-color: #E5484D; }
.th-sug-diff ins { text-decoration: none; background: color-mix(in srgb, #30A46C 16%, transparent); color: var(--text); padding: 1px 4px; border-radius: 4px; font-weight: 600; }
.th-sug-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; background: var(--surface-2); border-top: 1px solid var(--border); }
.th-sug-acts .btn, .th-new-bar .btn { padding-left: 8px; padding-right: 8px; white-space: nowrap; flex: none; }
.th-new-bar { flex-wrap: wrap; row-gap: 6px; }
.th-msg > .grow { min-width: 0; flex: 1; }
.th-sug { max-width: 100%; }
.ed-side { min-width: 0; overflow: hidden; }
.th-sug-acts [data-prev].on { background: var(--surface-3); }
.th-sug-res { padding: 6px 10px; font-size: 11.5px; color: var(--text-3); background: var(--surface-2); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 5px; }
.th-sug.st-rejected .th-sug-diff ins { background: none; text-decoration: line-through; color: var(--text-3); font-weight: 400; }
.th-sys { font-size: 11.5px; color: var(--text-3); text-align: center; display: flex; align-items: center; justify-content: center; gap: 5px; }
.th-decide { display: flex; align-items: center; gap: 6px; margin: 0 12px 10px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, #FFB224 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, #FFB224 35%, transparent); }
.th-decide span { flex: 1; font-size: 12.5px; font-weight: 650; }
.btn.ok { background: #30A46C; border-color: #30A46C; color: #fff; }
.btn.ok:hover { background: #2B9A66; }
.th-reply { padding: 10px 12px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: 0; background: var(--surface); }

/* markers on the canvas */
.th-marks { position: absolute; inset: 0; pointer-events: none; }
.th-mark { pointer-events: auto; position: absolute; transform: translate(-40%, -60%); display: inline-flex; align-items: center; gap: 3px; height: 24px; min-width: 24px; padding: 0 6px; border-radius: 12px 12px 12px 3px; border: 2px solid #fff; background: var(--sc, #3E63DD); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.35); cursor: pointer; font-size: 11px; font-weight: 750; transition: transform .15s var(--ease); }
.th-mark:hover, .th-mark.on { transform: translate(-40%, -60%) scale(1.15); }
.th-mark.st-waiting { --sc: #F59E0B; } .th-mark.st-changes { --sc: #E5484D; } .th-mark.st-approved { --sc: #30A46C; } .th-mark.st-suggestion { --sc: #8E4EC6; }
.th-focus { position: absolute; border: 2px dashed #3E63DD; border-radius: 6px; box-shadow: 0 0 0 4000px rgba(0,0,0,.12); pointer-events: none; animation: thFocus .35s var(--ease); }
@keyframes thFocus { from { opacity: 0; transform: scale(1.04) } }

/* summary pills (library cards, board, viewer) */
.rv-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.rv-pill.wait { background: color-mix(in srgb, #FFB224 18%, transparent); color: #AD5700; }
.rv-pill.bad { background: color-mix(in srgb, #E5484D 15%, transparent); color: #CD2B31; }
.rv-pill.ok { background: color-mix(in srgb, #30A46C 15%, transparent); color: #18794E; }
.pc-rv { position: absolute; z-index: 3; right: 8px; top: 44px; }
.pc-rv .rv-pill { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(10,10,10,.72); color: #fff; }
.pc-rv .rv-pill.wait svg { color: #FFB224; } .pc-rv .rv-pill.bad svg { color: #FF6369; } .pc-rv .rv-pill.ok svg { color: #3DD68C; }
.ic-rv { margin-top: 6px; }

@media (max-width: 899px) {
  .ed-side { order: 2; border: 0; display: contents; }
  .ed-side-tabs { position: fixed; z-index: 57; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 64px); padding: 0; border: 0; background: none; }
  .ed-side-tabs button[data-stab=props] { display: none; }
  .ed-side-tabs button[data-stab=threads] { width: 44px; height: 44px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--border); flex: none; }
  .ed-side-tabs button[data-stab=threads] span { display: none; }
  .ed-side-tabs button[data-stab=threads] i { position: absolute; top: -4px; right: -4px; }
  .ed-side-tabs button[data-stab=threads].on { background: var(--text); color: var(--bg); }
  .ed.side-threads .ed-threads { display: flex !important; order: 2; flex: none; max-height: 62dvh; border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; margin-top: -14px; position: relative; z-index: 5; background: var(--surface); box-shadow: 0 -10px 30px -14px rgba(0,0,0,.28); animation: sheetIn .28s cubic-bezier(.22,.8,.25,1); }
  .ed.side-threads .ed-props { display: none !important; }
  .ed.side-threads .ed-bottom { display: none; }
  .ed.side-threads .ed-side-tabs { bottom: calc(62dvh + 10px); }
}

/* viewer: comments tab */
.viewer-side .side-threads { padding: 0; display: flex; flex-direction: column; }
.viewer-side .side-threads .th-panel { flex: 1; min-height: 0; }
.viewer-side .th-head { top: 0; }
.viewer-side .tabs button [data-vth-n]:empty { display: none; }
@media (max-width: 899px) { .viewer-side .side-threads .th-panel { overflow: visible; } .viewer-side .tabs .v-tab-lbl { display: none; } }
.ready-rv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.ready-rv span:not(.rv-pill) { flex: 1; min-width: 120px; font-weight: 600; }
.ready-rv.warn { background: color-mix(in srgb, #FFB224 10%, var(--surface)); border-color: color-mix(in srgb, #FFB224 35%, transparent); }
.ready-rv.bad { background: color-mix(in srgb, #E5484D 8%, var(--surface)); border-color: color-mix(in srgb, #E5484D 35%, transparent); color: #CD2B31; }
.ready-rv.ok { background: color-mix(in srgb, #30A46C 8%, var(--surface)); border-color: color-mix(in srgb, #30A46C 30%, transparent); }
.ic-rv .rv-pill { font-size: 11px; }
.ntf-rv { margin: 6px 8px 2px; border: 1px solid color-mix(in srgb, #FFB224 40%, var(--border)); background: color-mix(in srgb, #FFB224 8%, var(--surface)); border-radius: 12px; padding: 6px; }
.ntf-rv-h { display: flex; align-items: center; gap: 6px; padding: 2px 6px 6px; font-size: 12.5px; color: #AD5700; }
.ntf-rv-i { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 12.5px; }
.ntf-rv-i:hover { background: var(--surface-2); }
.ntf-rv-i .grow { min-width: 0; display: flex; flex-direction: column; }
.ntf-rv-i small { color: var(--text-3); font-size: 11px; }
.viewer-side .tabs { padding: 0 8px; gap: 0; overflow-x: auto; scrollbar-width: none; }
.viewer-side .tabs::-webkit-scrollbar { display: none; }
.viewer-side .tabs button { padding: 11px 7px; margin: 0 1px; font-size: 13.5px; white-space: nowrap; flex: none; gap: 5px; }

@media (min-width: 900px) and (max-width: 1499px) { .viewer-side .tabs .v-tab-lbl { display: none; } }
@media (max-width: 899px) { .ed.side-threads .th-dhead, .ed.side-threads .th-head { padding-right: 62px; } }

/* ================================================================ feedback inbox */
.ib-list { display: flex; flex-direction: column; gap: 10px; }
.ib-card { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: border-color .15s, box-shadow .15s, opacity .26s, transform .26s var(--ease); }
.ib-card.sel { border-color: var(--border-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 6%, transparent); }
.ib-card.busy { opacity: .6; pointer-events: none; }
.ib-card.out-ok { opacity: 0; transform: translateX(40px); }
.ib-card.out-bad { opacity: 0; transform: translateX(-40px); }
.ib-media { position: relative; flex: none; width: 118px; aspect-ratio: var(--r, .8); border-radius: 10px; overflow: hidden; background: var(--surface-3); align-self: flex-start; }
.ib-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ib-media .th-slide { position: absolute; left: 6px; bottom: 6px; background: rgba(10,10,10,.72); color: #fff; }
.ib-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ib-top { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.ib-text { font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; border-left: 3px solid #FFB224; padding: 2px 0 2px 10px; word-break: break-word; }
.ib-text.slide { font-size: 13.5px; font-weight: 500; color: var(--text-2); border-left-color: var(--border-strong); display: flex; align-items: center; gap: 6px; }
.ib-ask { font-size: 13px; color: var(--text-2); line-height: 1.45; background: var(--surface-2); border-radius: 10px; padding: 7px 10px; }
.ib-meta { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.ib-meta:empty { display: none; }
.ib-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.ib-reqs { display: flex; flex-wrap: wrap; gap: 4px; }
.ib-chg { border-top: 1px dashed var(--border); padding-top: 8px; }
.ib-keys { font-size: 12px; text-align: center; margin-top: 18px; }
@media (max-width: 640px) {
  .ib-card { padding: 10px; gap: 10px; }
  .ib-media { width: 76px; }
  .ib-text { font-size: 14.5px; }
  .ib-acts .btn { flex: 1; justify-content: center; }
  .ib-acts .spacer { display: none; }
}
.ib-ago { font-size: 12px; white-space: nowrap; }
.ib-top b { white-space: nowrap; }
.ib-meta .truncate { min-width: 0; }
@media (max-width: 640px) { .ib-asks { display: none; } .ib-acts [data-open] { flex: 0 0 auto; } }

/* beginner-friendly composer */
.th-explain { font-size: 12px; line-height: 1.45; color: var(--text-2); }
.th-tip { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; line-height: 1.4; color: var(--text-3); }
.th-tip svg { flex: none; margin-top: 1px; }
.th-lbl { font-size: 11.5px; font-weight: 650; color: var(--text-2); margin-bottom: -4px; }
.th-who { display: flex; flex-direction: column; gap: 8px; }
.th-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.th-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 4px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.th-chip:hover { border-color: var(--border-strong); }
.th-chip.on { background: color-mix(in srgb, #3E63DD 16%, var(--surface)); border-color: #3E63DD; }
.th-mode.three button { padding-left: 4px; padding-right: 4px; }
.th-mode button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-review { margin-top: 8px; width: 100%; justify-content: center; }
.th-mode, .th-filter { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
.th-mode button, .th-filter button { min-width: 0; padding: 5px 4px; white-space: normal; line-height: 1.2; text-align: center; justify-content: center; flex-wrap: wrap; row-gap: 2px; font-size: 11.5px; height: auto; min-height: 30px; }
.th-mode button span { white-space: normal; overflow: visible; }
.seg.th-mode button span { display: inline !important; }
.cmp-sum { font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.cmp-sum .hl { color: #8E4EC6; } .cmp-sum .bad { color: #E5484D; }
/* note kinds: always show the label (icons alone are unclear) */
.kind-sw button span, aside.card .composer .kind-sw button span { display: inline !important; }
.composer-bar .kind-sw { flex-wrap: wrap; }
/* library: on phones show the main filters first, the rest behind "Mehr Filter" */
.f-toggle { display: none; }
@media (max-width: 899px) {
  #lib-filters .f-more { display: none; }
  #lib-filters.show-all .f-more { display: block; }
  .f-toggle { display: inline-flex; }
}
/* password: show/hide eye + forgot hint */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 42px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--text-3); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover, .pw-eye.on { color: var(--text); background: var(--surface-2); }
.forgot { font-size: 13px; color: var(--text-2); text-align: center; }
.forgot summary { cursor: pointer; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.forgot summary::-webkit-details-marker { display: none; }
.forgot p { margin: 8px 0 0; line-height: 1.5; text-align: left; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }
/* comments panel: never wider than its column */
.ed-side, .ed-threads, .th-panel { min-width: 0; max-width: 100%; }
.th-panel { overflow-x: hidden; }
.th-dhead { gap: 4px; padding: 8px; flex-wrap: nowrap; min-width: 0; }
.th-dhead .th-st, .th-dhead .th-slide { white-space: nowrap; flex: none; }
.th-dhead .th-resolve { flex: none; padding: 0 8px; white-space: nowrap; }
.th-anchorq, .th-msgs, .th-reply, .th-warn, .th-reqs, .th-decide { min-width: 0; max-width: 100%; box-sizing: border-box; }
.th-anchorq span { min-width: 0; overflow-wrap: anywhere; }
.th-mb, .th-quote, .th-snip { overflow-wrap: anywhere; }
.ed-side-tabs { min-width: 0; overflow: hidden; }
.ed-side-tabs button { min-width: 0; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-side-tabs button span { overflow: hidden; text-overflow: ellipsis; }
.th-reply .th-new-bar .btn, .th-new .th-new-bar .btn { flex: 0 1 auto; min-width: 0; }
/* narrow side column (laptops): compact tabs + stacked warning */
@media (min-width: 900px) and (max-width: 1280px) {
  .ed-side-tabs button { font-size: 12px; gap: 4px; }
  .ed-side-tabs button .ic { display: none; }
}
.th-warn { flex-wrap: wrap; }
.th-warn span { flex: 1 1 140px; min-width: 0; }
.th-warn .btn { flex: 1 0 auto; justify-content: center; }

/* version lock (Freigabe zum Posten) */
.tip.lock { background: var(--up-bg); color: var(--up); }
.ic-pill.warn { background: var(--warn-bg); color: var(--warn); }

/* installable app + push */
.pwa-banner { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: 0 12px 40px rgba(0,0,0,.22), 0 0 0 1px var(--border); transform: translateY(140%); transition: transform .3s var(--ease); }
.pwa-banner.in { transform: none; }
.pwa-banner img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.pwa-banner b { display: block; font-size: 14px; }
.pwa-banner span { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.35; }
.pwa-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.pwa-row.ok { background: var(--up-bg); }
.pwa-row b { display: block; font-size: 14px; }
.pwa-row span { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.pwa-row .grow { min-width: 180px; }
.pwa-cats { display: grid; gap: 4px; }
.pwa-cat { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pwa-cat:last-child { border-bottom: 0; }
.pwa-cat b { display: block; font-size: 13.5px; font-weight: 600; }
.pwa-cat span.grow > span { display: block; font-size: 12px; color: var(--text-3); }
.pwa-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.pwa-devs summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.pwa-dev { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.pwa-dev em { color: var(--up); font-style: normal; font-weight: 600; }
.pwa-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.45; }
.pwa-key { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 5px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); vertical-align: middle; font-weight: 700; }
/* app mode: respect notch / home indicator */
@media (display-mode: standalone) {
  .mobile-bar { padding-top: env(safe-area-inset-top); }
  .sidebar { padding-top: max(14px, env(safe-area-inset-top)); }
  #view { padding-bottom: env(safe-area-inset-bottom); }
}
.ntf-push { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-decoration: none; }
.ntf-push b { display: block; font-size: 13px; }
.ntf-push small { display: block; font-size: 12px; color: var(--text-3); }

/* ============ beginner feedback box (review + viewer) ============ */
.composer.fbc { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-radius: 16px; }
.fbc-head { display: flex; align-items: baseline; gap: 8px; }
.fbc-head b { font-size: 16px; letter-spacing: -.01em; }
.fbc-head span { font-size: 12.5px; color: var(--text-3); margin-left: auto; }
.fbc-step { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: -4px; }
.fbc-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fbc-kind { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 58px; padding: 9px 11px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.fbc-kind:hover { border-color: var(--text-3); }
.fbc-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.fbc-kt { min-width: 0; display: flex; flex-direction: column; }
.fbc-kt b { font-size: 14px; font-weight: 650; line-height: 1.2; }
.fbc-kt small { font-size: 12px; color: var(--text-3); line-height: 1.3; margin-top: 2px; }
.fbc-kind.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; background: var(--surface-2); }
.fbc-kind.on .fbc-ic { background: var(--text); color: var(--bg); }
.fbc-kind.k-recommendation.on .fbc-ic { background: var(--warn); color: #fff; }
.fbc-kind.k-todo.on .fbc-ic { background: var(--info, #3E63DD); color: #fff; }
.fbc-kind.k-grok .fbc-ic { color: var(--gk-2); background: var(--gk-soft); }
.fbc-kind.k-grok.on { border-color: var(--gk-2); box-shadow: 0 0 0 1px var(--gk-2) inset; background: var(--gk-soft); }
.fbc-kind.k-grok.on .fbc-ic { background: var(--gk-grad); color: #fff; }
.composer.fbc textarea.fbc-text { font-size: 16px; line-height: 1.5; min-height: 96px; max-height: 260px; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--bg); resize: none; }
.composer.fbc textarea.fbc-text:focus { border-color: var(--text-3); }
.composer.fbc.is-grok textarea.fbc-text:focus { border-color: var(--gk-2); }
.composer.fbc:focus-within { box-shadow: none; }
.fbc-opts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.fbc-opt { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.fbc-seg button { height: 30px; font-size: 13px; padding: 0 12px; }
.fbc-seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.fbc-gkonly { display: none; }
.composer.fbc.is-grok .fbc-gkonly { display: inline-flex; }
.fbc-foot { display: flex; gap: 8px; align-items: stretch; }
.fbc-attach { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px dashed var(--border-strong); background: none; color: var(--text-2); font-size: 14px; font-weight: 600; cursor: pointer; flex: none; }
.fbc-attach:hover, .fbc-attach.on { border-style: solid; color: var(--text); background: var(--surface-2); }
.fbc-send.btn { flex: 1; height: 46px; font-size: 15px; border-radius: 12px; justify-content: center; gap: 8px; }
.fbc-send.btn.gk-send { height: 46px; font-size: 15px; }
.fbc-tip { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.fbc-tip .ic { margin-top: 2px; }
.fbc .ref-tray { padding: 0; }
.fbc .gk-chip { display: none; }
.fbc-ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--up-bg); color: var(--up); font-size: 14px; font-weight: 600; animation: pop .3s var(--ease); transition: opacity .4s; }
.fbc-ok.out { opacity: 0; }
.fbc .gk-mention { position: static; }
/* narrow side panels: kinds stay readable */
aside.card .composer.fbc .kind-sw, .viewer-side .composer.fbc .kind-sw { display: none; }
@media (max-width: 380px) { .fbc-kt small { display: none; } .fbc-kind { min-height: 48px; } }
/* viewer side: the box sits in the footer – keep it compact but large enough */
.viewer-side .side-foot:has(.fbc) { padding: 12px; max-height: 62vh; overflow: auto; }
.viewer-side .composer.fbc { border: 0; padding: 4px 2px; background: none; }
.viewer-side .composer.fbc.is-grok { border: 0; box-shadow: none; background: none; }
/* review page: bigger rating buttons for touch */
@media (hover: none) { .rate.lg button { height: 54px; font-size: 16px; flex: 1; justify-content: center; } .rate.lg { width: 100%; display: flex; gap: 10px; } }

/* iOS: inputs below 16px make Safari zoom in (and never zoom back) */
@media (hover: none) and (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea, .input, .select, .textarea, .input.sm, .select.sm, [contenteditable] { font-size: 16px !important; }
}
/* fbc: narrow phones → icon on top, never clip labels */
@media (max-width: 520px) {
  .fbc-kind { flex-direction: column; align-items: flex-start; gap: 6px; min-height: 0; padding: 10px; }
  .fbc-ic { width: 28px; height: 28px; border-radius: 8px; }
  .fbc-kt b { font-size: 14.5px; }
}
.fbc-kt b, .fbc-kt small { overflow-wrap: break-word; hyphens: auto; }
/* desktop viewer side: compact one-row type picker so notes stay visible */
@media (min-width: 900px) {
  .viewer-side .fbc-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .viewer-side .fbc-kind { flex-direction: column; align-items: center; text-align: center; gap: 4px; min-height: 0; padding: 8px 4px; }
  .viewer-side .fbc-kt small { display: none; }
  .viewer-side .fbc-kt b { font-size: 12.5px; }
  .viewer-side .fbc-ic { width: 28px; height: 28px; }
  .viewer-side .fbc-tip { display: none; }
  .viewer-side .composer.fbc textarea.fbc-text { min-height: 72px; }
  .viewer-side .fbc-step { display: none; }
  .viewer-side .side-foot:has(.fbc) { max-height: 55vh; }
}
/* keyboard open (touch): extra room + footer not sticky so the text box can slide above the keyboard */
@media (hover: none) {
  body.kb-open #view { padding-bottom: 55vh; }
  body.kb-open .viewer-side { padding-bottom: 55vh; }
  body.kb-open .viewer-side .side-foot { position: static; max-height: none; overflow: visible; }
  body.kb-open .pwa-banner { display: none; }
}

/* ================= Video-Studio ================= */
.vst-tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.vst-tpl { position: relative; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 18px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 150px; transition: transform .15s var(--ease), box-shadow .15s, border-color .15s; color: var(--text); }
.vst-tpl:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.vst-tpl b { font-size: 15px; }
.vst-tpl .faint { font-size: 12.5px; line-height: 1.4; }
.vst-tpl-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #0A0A0A; color: #E7DCC6; margin-bottom: 6px; }
.vst-tpl-fmt { margin-top: auto; font-size: 11.5px; font-family: var(--mono); color: var(--text-3); }
.vst-tpl:disabled { opacity: .5; }
.vst-mini { position: absolute; inset: 0; display: flex; align-items: center; padding: 14%; font-size: 17px; line-height: 1.1; letter-spacing: -.02em; }
@media (max-width: 900px) { .vst-tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.vst { display: flex; flex-direction: column; min-height: 100%; }
.vst-top { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.vst-title { max-width: 360px; font-weight: 600; border-color: transparent; background: transparent; }
.vst-title:hover, .vst-title:focus { border-color: var(--border-strong); background: var(--surface); }
.vst-save { font-size: 12.5px; }
.vst-body { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0; flex: 1; min-height: 0; }
.vst-stage { padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--surface-2); min-width: 0; }
.vst-player-wrap { width: 100%; max-width: min(460px, calc((100vh - 260px) * 0.8)); border-radius: 14px; overflow: hidden; background: #0A0A0A; box-shadow: var(--shadow-3); }
.vst-player-wrap[data-fmt="9:16"] { max-width: min(380px, calc((100vh - 260px) * 0.5625)); }
.vst-player-wrap[data-fmt="1:1"] { max-width: min(500px, calc(100vh - 260px)); }
.vst-timeline { width: 100%; max-width: 640px; }
.vst-strip { position: relative; display: flex; gap: 3px; height: 38px; }
.vst-chunk { min-width: 28px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; padding: 0 4px; overflow: hidden; }
.vst-chunk.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.vst-head { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--focus); border-radius: 2px; pointer-events: none; transition: left .1s linear; }
.vst-tl-meta { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; }
.vst-render { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.vst-make-sub { font-size: 12.5px; text-align: center; margin: 0; }
.vst-job { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.vst-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.vst-bar i { display: block; height: 100%; background: var(--gk-grad); transition: width .4s; }
.vst-done { text-decoration: none; }
.vst-side { border-left: 1px solid var(--border); background: var(--surface); padding: 16px; overflow: auto; max-height: calc(100vh - 62px); position: sticky; top: 62px; }
.vst-tabs { width: 100%; margin-bottom: 14px; }
.vst-tabs button { flex: 1; justify-content: center; }
.vst-scenes { display: flex; flex-direction: column; gap: 8px; }
.vst-sc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.vst-sc.open { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.vst-sc-h { display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; }
.vst-sc-h .grow { min-width: 0; display: flex; flex-direction: column; }
.vst-sc-h b { font-size: 14px; }
.vst-peek { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vst-sc-n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.vst-sc.open .vst-sc-n { background: var(--text); color: var(--bg); }
.vst-sc-b { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.vst-f .textarea { min-height: 64px; resize: vertical; font-size: 16px; }
.vst-sc-b .input { font-size: 16px; }
.vst-hl-btn { height: 26px; font-size: 12px; }
.vst-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vst-row3 { display: grid; grid-template-columns: 70px 1fr 70px; gap: 8px; }
.vst-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.vst-rowi { display: flex; gap: 6px; align-items: center; }
.vst-rowi .input { flex: 1; min-width: 0; }
.vst-num { font-family: var(--mono); font-size: 12px; color: var(--text-3); width: 22px; }
.vst-drop { display: flex; align-items: center; justify-content: center; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); min-height: 120px; cursor: pointer; overflow: hidden; background: var(--surface-2); }
.vst-drop > span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; font-size: 13px; }
.vst-drop img, .vst-drop video { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.vst-drop.busy { opacity: .6; pointer-events: none; }
.vst-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vst-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; gap: 6px; align-items: center; list-style: none; }
.vst-more[open] summary { margin-bottom: 10px; }
.vst-more .field { margin-bottom: 10px; }
.vst-sc-act { display: flex; gap: 4px; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; }
.danger-text { color: var(--down) !important; }
.vst-add { margin-top: 12px; height: 46px; border-style: dashed; }
.vst-hint { font-size: 12.5px; display: flex; gap: 6px; margin-top: 12px; }
.vst-addpop { display: flex; flex-direction: column; min-width: 260px; }
.vst-addpop .pop-item { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
.vst-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 18px 0 8px; }
.vst-style .field { margin-bottom: 10px; }
.vst-brandbar { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--surface-2); }
.vst-sample { margin-top: 10px; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; }
.vst-sample .lbl { font-size: 10.5px; letter-spacing: .18em; }
.vst-fmt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vst-fmtb { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--text); }
.vst-fmtb .faint { font-size: 11px; }
.vst-fmtb i { display: block; border: 1.5px solid currentColor; border-radius: 4px; height: 30px; }
.vst-fmtb i.r-4-5 { width: 24px; } .vst-fmtb i.r-9-16 { width: 17px; } .vst-fmtb i.r-1-1 { width: 30px; }
.vst-fmtb.on, .vst-look.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.vst-looks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vst-look { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.vst-look .faint { font-size: 11.5px; }
.vst-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.vst-swb { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--c); cursor: pointer; position: relative; display: grid; place-items: center; }
.vst-swb.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.vst-swb.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); color: #fff; overflow: hidden; }
.vst-swb.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.vst-style .check { display: flex; margin-bottom: 8px; font-size: 13.5px; }
.vst-grok .textarea { font-size: 16px; }
.vst-gt { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); margin-top: 6px; flex: none; }
.status-dot.st-done { background: var(--up); } .status-dot.st-working { background: var(--gk-2); } .status-dot.st-failed { background: var(--down); }
@media (max-width: 960px) {
  .vst-body { grid-template-columns: 1fr; }
  .vst-side { border-left: 0; border-top: 1px solid var(--border); max-height: none; position: static; }
  .vst-stage { padding: 14px; }
  .vst-player-wrap { max-width: min(340px, 82vw); }
  .vst-player-wrap[data-fmt="9:16"] { max-width: min(260px, 66vw); }
  .vst-top { padding: 10px 12px; }
}
/* video in cards / viewer */
.pc-media video.pc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(10,10,10,.55); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; pointer-events: none; }
.slide-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.pc-media video.pc-video { pointer-events: none; z-index: 1; }
.vst-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--text); color: var(--bg); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-3); cursor: pointer; }
body.kb-open .vst-fab { display: none; }
.vst-fab[hidden] { display: none; }

/* ===== Video-Studio v2 ===== */
.vst-hero { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; margin-bottom:18px; }
.vst-hero-card { display:flex; flex-direction:column; gap:6px; text-align:left; padding:18px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); cursor:pointer; transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.vst-hero-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-2); }
.vst-hero-card.ai { background:var(--gk-soft); border-color:var(--gk-2); }
.vst-hero-card b { font-size:16px; } .vst-hero-card small { color:var(--text-2); }
@media (max-width:640px){ .vst-tabs button span { display:none; } }
.vst-trim { position:relative; height:56px; border-radius:8px; background:var(--surface-2) center/cover; overflow:hidden; touch-action:none; user-select:none; margin:10px 0 6px; }
.vst-dim { position:absolute; top:0; bottom:0; background:rgba(0,0,0,.55); pointer-events:none; }
.vst-dim.l { left:0; } .vst-dim.r { right:0; }
.vst-sel { position:absolute; top:0; bottom:0; border:2px solid var(--gk-2); border-radius:6px; pointer-events:none; }
.vst-hdl { position:absolute; top:0; bottom:0; width:16px; margin-left:-8px; background:var(--gk-2); border-radius:4px; cursor:ew-resize; touch-action:none; }
.vst-hdl::after { content:''; position:absolute; left:6px; top:35%; bottom:35%; width:4px; border-left:1px solid #fff; border-right:1px solid #fff; }
.vst-trim-meta { display:flex; justify-content:space-between; font-size:12px; color:var(--text-3); }
.vst-clip { display:flex; flex-direction:column; gap:10px; }
.vst-clip-act { display:flex; flex-wrap:wrap; gap:8px; }
.vst-track { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); margin-bottom:10px; flex-wrap:wrap; }
.vst-lines { display:flex; flex-direction:column; gap:6px; max-height:46vh; overflow:auto; }
.vst-line { display:flex; gap:6px; align-items:flex-start; flex-wrap:wrap; padding:6px; border-radius:8px; background:var(--surface-2); }
.vst-lt { font-size:11px; color:var(--text-3); min-width:42px; cursor:pointer; padding-top:6px; }
.vst-word { width:auto; min-width:2ch; max-width:16ch; padding:3px 6px; border:1px solid var(--border); border-radius:6px; background:var(--surface); color:var(--text); font:inherit; font-size:13px; field-sizing:content; }
.vst-hook { display:block; width:100%; text-align:left; padding:10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); cursor:pointer; margin-bottom:6px; }
.vst-hook:hover { border-color:var(--gk-2); }
.vst-big-check { display:flex; align-items:center; gap:10px; font-weight:600; padding:8px 0; }
.mu-tabs { display:flex; gap:6px; margin-bottom:12px; }
.mu-list { display:flex; flex-direction:column; gap:6px; max-height:50vh; overflow:auto; }
.mu-row { display:flex; flex-direction:column; gap:6px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.mu-track { display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.mu-track:hover { border-color:var(--gk-2); }
.mu-track b { display:block; }
#mu-list { display:flex; flex-direction:column; gap:6px; max-height:46vh; overflow:auto; }
.mu-play { width:34px; height:34px; border-radius:50%; border:1px solid var(--border); background:var(--surface-2); color:var(--text); display:grid; place-items:center; cursor:pointer; flex:none; }
.mu-play.on { background:var(--gk-2); color:#fff; }
.mu-st { font-size:12px; } .mu-st.ok { color:var(--up); } .mu-st.bad { color:var(--down); }
.mu-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px; max-height:50vh; overflow:auto; }
.mu-clip { position:relative; border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--surface-2); cursor:pointer; padding:0; text-align:left; color:var(--text); }
.mu-clip:hover { border-color:var(--gk-2); }
.mu-clip img, .mu-ph { display:grid; place-items:center; width:100%; aspect-ratio:9/16; object-fit:cover; background:var(--surface-3); color:var(--text-3); }
.mu-clip .pc-pill { position:absolute; top:6px; right:6px; }
.mu-clip:disabled { opacity:.6; cursor:wait; }
.mu-name { font-size:12px; padding:4px 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vo-box { display:flex; flex-direction:column; align-items:center; gap:14px; padding:12px 0; }
.vo-time { font-size:28px; font-variant-numeric:tabular-nums; font-weight:700; }
.vo-level { width:100%; height:8px; border-radius:4px; background:var(--surface-2); overflow:hidden; }
.vo-level i { display:block; height:100%; width:0; background:var(--gk-grad); transition:width .08s linear; }
.vo-rec { width:72px; height:72px; border-radius:50%; border:4px solid var(--border-strong); background:#e5484d; cursor:pointer; }
.vo-rec.on { border-radius:18px; animation:vo-pulse 1.2s infinite; }
@keyframes vo-pulse { 50% { box-shadow:0 0 0 10px rgba(229,72,77,.2); } }
.spin { display:inline-block; width:16px; height:16px; border:2px solid var(--border-strong); border-top-color:var(--gk-2); border-radius:50%; animation:spin .8s linear infinite; vertical-align:middle; }
@keyframes spin { to { transform:rotate(360deg); } }
.vst-tabs { overflow:hidden; }
.vst-tabs button { min-width:0; padding-left:4px; padding-right:4px; gap:5px; font-size:13px; white-space:nowrap; }
.vst-tabs button span { overflow:hidden; text-overflow:ellipsis; }
.vst-tabs button:not(.on) span { display:none; }
.vst-tabs button.on { flex:2.2; }
.vst-side { overflow-x:hidden; min-width:0; }
.vst-hero-card > div { display:flex; flex-direction:column; gap:4px; }
.vst-hero-card > div b { line-height:1.25; }
.vst-hero-card > div .faint { font-size:13.5px; line-height:1.45; color:var(--text-2); }
.vst-hero-card .vst-tpl-ic { margin-bottom:8px; }
@media (max-width:640px){ .vst-hero { gap:10px; } .vst-hero-card { padding:14px 16px; flex-direction:row; align-items:center; gap:14px; } .vst-hero-card .vst-tpl-ic { margin:0; flex:none; } }

/* ===== Video-Studio: transitions ===== */
.vst-tr { display:flex; align-items:center; gap:8px; width:100%; margin:-2px 0; padding:2px 0; background:none; border:0; cursor:pointer; color:var(--text-2); }
.vst-tr-line { flex:1; height:1px; background:var(--border); }
.vst-tr-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 10px 4px 8px; border:1px solid var(--border); border-radius:999px; background:var(--surface); font-size:12px; line-height:1; transition:border-color .15s var(--ease), box-shadow .15s var(--ease); }
.vst-tr-chip b { font-weight:600; color:var(--text); }
.vst-tr-chip em { font-style:normal; font-size:10.5px; padding:2px 5px; border-radius:6px; background:var(--surface-2); color:var(--text-3); text-transform:uppercase; letter-spacing:.04em; }
.vst-tr:hover .vst-tr-chip { border-color:var(--gk-2); box-shadow:var(--shadow-2); }
.vst-trpop { width:min(340px, calc(100vw - 32px)); }
.vst-trgrid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.vst-trb { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 4px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); cursor:pointer; font-size:12px; text-align:center; }
.vst-trb b { font-weight:600; line-height:1.15; }
.vst-trb .faint { font-size:10.5px; line-height:1.1; }
.vst-trb:hover { border-color:var(--border-strong); }
.vst-trb.on { border-color:var(--gk-2); box-shadow:0 0 0 1px var(--gk-2) inset; }
/* mini animated demo: two "shots" (A champagne, B dark grey) */
.vst-trdemo { position:relative; width:52px; height:34px; border-radius:6px; overflow:hidden; background:#111; }
.vst-trdemo i { position:absolute; inset:0; }
.vst-trdemo i:first-child { background:linear-gradient(135deg,#E7DCC6,#b9a78a); }
.vst-trdemo i:last-child { background:linear-gradient(135deg,#5b6170,#2a2d35); }
@keyframes trA { 0%,35% { opacity:1; transform:none; filter:none } 65%,100% { opacity:0 } }
@keyframes trB { 0%,35% { opacity:0 } 65%,100% { opacity:1; transform:none; filter:none } }
.tr-fade i:first-child { animation:trA 2.4s infinite alternate ease-in-out }
.tr-fade i:last-child, .tr-auto i:last-child { animation:trB 2.4s infinite alternate ease-in-out }
.tr-auto i:first-child { animation:trA 2.4s infinite alternate ease-in-out }
@keyframes trCutB { 0%,49% { opacity:0 } 50%,100% { opacity:1 } }
.tr-cut i:last-child { animation:trCutB 2.4s infinite alternate steps(1) }
@keyframes trDipA { 0%,25% { opacity:1 } 50%,100% { opacity:0 } }
@keyframes trDipB { 0%,50% { opacity:0 } 75%,100% { opacity:1 } }
.tr-dip i:first-child { animation:trDipA 2.4s infinite alternate } .tr-dip i:last-child { animation:trDipB 2.4s infinite alternate }
@keyframes trBlurA { 0%,30% { filter:blur(0); opacity:1 } 70%,100% { filter:blur(6px); opacity:0 } }
@keyframes trBlurB { 0%,30% { filter:blur(6px); opacity:0 } 70%,100% { filter:blur(0); opacity:1 } }
.tr-blur i:first-child { animation:trBlurA 2.4s infinite alternate } .tr-blur i:last-child { animation:trBlurB 2.4s infinite alternate }
@keyframes trZoomA { 0%,30% { transform:scale(1); opacity:1 } 60%,100% { transform:scale(1.6); opacity:0 } }
@keyframes trZoomB { 0%,45% { transform:scale(.8); opacity:0 } 75%,100% { transform:scale(1); opacity:1 } }
.tr-zoom i:first-child { animation:trZoomA 2.4s infinite alternate cubic-bezier(.7,0,.3,1) } .tr-zoom i:last-child { animation:trZoomB 2.4s infinite alternate cubic-bezier(.7,0,.3,1) }
@keyframes trSlideA { 0%,30% { transform:translateX(0) } 70%,100% { transform:translateX(-30%) } }
@keyframes trSlideB { 0%,30% { transform:translateX(100%) } 70%,100% { transform:translateX(0) } }
.tr-slide i:first-child { animation:trSlideA 2.4s infinite alternate cubic-bezier(.7,0,.3,1) } .tr-slide i:last-child { animation:trSlideB 2.4s infinite alternate cubic-bezier(.7,0,.3,1) }
@keyframes trWhipA { 0%,40% { transform:translateX(0); filter:blur(0) } 60%,100% { transform:translateX(-100%); filter:blur(4px) } }
@keyframes trWhipB { 0%,40% { transform:translateX(100%); filter:blur(4px) } 60%,100% { transform:translateX(0); filter:blur(0) } }
.tr-whip i:first-child { animation:trWhipA 2.4s infinite alternate cubic-bezier(.8,0,.2,1) } .tr-whip i:last-child { animation:trWhipB 2.4s infinite alternate cubic-bezier(.8,0,.2,1) }
@keyframes trWipeB { 0%,30% { clip-path:inset(0 0 0 100%) } 70%,100% { clip-path:inset(0 0 0 0) } }
.tr-wipe i:last-child { animation:trWipeB 2.4s infinite alternate cubic-bezier(.7,0,.3,1) }
@keyframes trFlashB { 0%,40% { opacity:0 } 50%,100% { opacity:1 } }
@keyframes trFlashW { 0%,38% { opacity:0 } 48% { opacity:1 } 70%,100% { opacity:0 } }
.tr-flash i:first-child { animation:none }
.tr-flash i:last-child { animation:trFlashB 2.4s infinite alternate }
.tr-flash::after { content:''; position:absolute; inset:0; background:#fff; opacity:0; animation:trFlashW 2.4s infinite alternate }
@media (prefers-reduced-motion: reduce) { .vst-trdemo i { animation:none !important } }
/* markers on the timeline strip */
.vst-trmarks { position:relative; height:0; }
.vst-trm { position:absolute; top:-30px; transform:translateX(-50%); width:22px; height:22px; display:grid; place-items:center; border-radius:50%; border:1px solid var(--border-strong); background:var(--surface); color:var(--text); cursor:pointer; box-shadow:var(--shadow-2); z-index:3; padding:0; }
.vst-trm svg { width:12px; height:12px; }
.vst-trm.cut { width:16px; height:16px; top:-27px; opacity:.8; }
.vst-trm:hover { border-color:var(--gk-2); opacity:1; }

/* ===== Onboarding funnel (/start) ===== */
.ob { max-width: 760px; margin: 0 auto; padding: 22px 20px 120px; }
.ob-top { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.ob-brandline { display:flex; align-items:center; gap:8px; flex:1; min-width:0; flex-wrap:wrap; }
.ob-brandline b { font-size:15px; }
.ob-brandline .faint { font-size:13px; }
.ob-progress { display:flex; align-items:center; gap:4px; margin-bottom:22px; overflow-x:auto; scrollbar-width:none; }
.ob-progress::-webkit-scrollbar { display:none; }
.ob-dot { display:flex; align-items:center; gap:6px; background:none; border:0; padding:4px 2px; cursor:pointer; color:var(--text-3); font-size:12.5px; font-weight:600; white-space:nowrap; flex:none; }
.ob-dot i { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font-style:normal; font-size:11.5px; border:1.5px solid var(--border-strong); background:var(--surface); transition:all .2s var(--ease); }
.ob-dot.on { color:var(--text); }
.ob-dot.on i { border-color:transparent; background:var(--gk-grad); color:#fff; box-shadow:0 0 0 4px var(--gk-soft); }
.ob-dot.done i { background:var(--text); border-color:var(--text); color:var(--bg); }
.ob-line { flex:1; min-width:10px; height:1.5px; background:var(--border); }
.ob-card { background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:30px; box-shadow:var(--shadow-2); animation:obIn .35s var(--ease); }
@keyframes obIn { from { opacity:0; transform:translateY(8px) } to { opacity:1; transform:none } }
.ob-head { margin-bottom:22px; }
.ob-kicker { display:inline-block; font:600 11px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; color:var(--gk-1); margin-bottom:10px; }
.ob-head h1 { font-size:28px; line-height:1.15; letter-spacing:-.03em; margin:0 0 8px; font-weight:700; }
.ob-head p { margin:0; color:var(--text-2); font-size:15px; line-height:1.5; max-width:560px; }
.ob-h5 { font-size:13px; font-weight:650; margin:18px 0 10px; color:var(--text); }
.ob-hint { font-size:12.5px; margin:8px 2px 0; }
.ob-urlrow { display:flex; align-items:center; gap:8px; background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:6px 6px 6px 14px; transition:border-color .15s, box-shadow .15s; }
.ob-urlrow:focus-within { border-color:var(--gk-2); box-shadow:0 0 0 4px var(--gk-soft); }
.ob-urlrow .input { border:0; background:transparent; box-shadow:none; flex:1; min-width:0; padding-left:0; font-size:16px; }
.ob-urlrow .input:focus { box-shadow:none; }
.ob-urlrow.sm { padding:2px 6px 2px 12px; border-radius:10px; }
.ob-urlpre { color:var(--text-3); display:flex; font-weight:600; }
.ob-scan-anim { display:flex; align-items:center; gap:6px; padding:28px 0 8px; justify-content:center; color:var(--text-2); font-size:13.5px; }
.ob-scan-anim i { width:8px; height:8px; border-radius:50%; background:var(--gk-2); animation:obDot 1s infinite ease-in-out; }
.ob-scan-anim i:nth-child(2) { animation-delay:.15s } .ob-scan-anim i:nth-child(3) { animation-delay:.3s; margin-right:8px }
@keyframes obDot { 0%,80%,100% { transform:scale(.5); opacity:.4 } 40% { transform:scale(1); opacity:1 } }
.ob-kit { display:grid; grid-template-columns: 1.05fr 1fr; gap:18px; margin-top:20px; animation:obIn .4s var(--ease); }
.ob-kit-prev { aspect-ratio:4/5; border-radius:16px; padding:26px; display:flex; flex-direction:column; justify-content:flex-end; gap:10px; box-shadow:var(--shadow-3); overflow:hidden; position:relative; }
.ob-kit-prev::before { content:''; position:absolute; inset:0; background:radial-gradient(90% 60% at 80% 10%, rgba(255,255,255,.10), transparent 60%); pointer-events:none; }
.ob-kit-lbl { font-size:11px; letter-spacing:.16em; }
.ob-kit-h { font-size:30px; line-height:1.05; font-weight:700; letter-spacing:-.02em; }
.ob-kit-h em { font-style:italic; font-weight:400; }
.ob-kit-b { font-size:13px; opacity:.8; line-height:1.4; }
.ob-kit-info { display:flex; flex-direction:column; gap:14px; justify-content:center; }
.ob-kit-row { display:flex; flex-direction:column; gap:5px; font-size:13.5px; }
.ob-kit-row > b { font-size:11.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-3); font-weight:650; }
.ob-sw { display:flex; flex-wrap:wrap; gap:8px; }
.ob-sw span { display:inline-flex; align-items:center; gap:6px; font:500 11.5px var(--mono); color:var(--text-2); }
.ob-sw i { width:26px; height:26px; border-radius:8px; background:var(--c); box-shadow:inset 0 0 0 1px rgba(0,0,0,.12); }
.ob-chips { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:8px; }
.ob-chip { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:10px; align-items:center; text-align:left; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); cursor:pointer; transition:all .15s var(--ease); }
.ob-chip svg { grid-row:span 2; color:var(--text-3); }
.ob-chip b { font-size:14px; font-weight:650; }
.ob-chip span { font-size:12px; color:var(--text-3); grid-column:2; }
.ob-chip:not(:has(svg)) b, .ob-chip:not(:has(svg)) span { grid-column:1 / span 2; }
.ob-chip:hover { border-color:var(--border-strong); }
.ob-chip.on { border-color:var(--gk-2); background:var(--gk-soft); box-shadow:0 0 0 1px var(--gk-2) inset; }
.ob-chip.on svg { color:var(--gk-1); }
.ob-fmts { display:flex; gap:8px; margin-bottom:18px; }
.ob-fmt { flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px 8px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); cursor:pointer; font-size:13px; }
.ob-fmt i { display:block; height:32px; border:2px solid currentColor; border-radius:5px; opacity:.55; }
.ob-fmt i.r-feed { width:26px; } .ob-fmt i.r-reel, .ob-fmt i.r-story { width:19px; } .ob-fmt i.r-story { border-style:dashed; }
.ob-fmt.on { border-color:var(--gk-2); background:var(--gk-soft); box-shadow:0 0 0 1px var(--gk-2) inset; }
.ob-fmt.on i { opacity:1; color:var(--gk-1); }
.ob-drop { border:1.5px dashed var(--border-strong); border-radius:16px; padding:16px; transition:all .15s; }
.ob-drop.over { border-color:var(--gk-2); background:var(--gk-soft); }
.ob-drop > p { margin:10px 2px 0; font-size:12.5px; }
.ob-thumbs { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; }
.ob-th { position:relative; margin:0; aspect-ratio:4/5; border-radius:10px; overflow:hidden; background:var(--surface-3); }
.ob-th img { width:100%; height:100%; object-fit:cover; display:block; }
.ob-th-x { position:absolute; top:6px; right:6px; width:24px; height:24px; border-radius:50%; border:0; background:rgba(0,0,0,.6); color:#fff; display:grid; place-items:center; cursor:pointer; }
.ob-add { aspect-ratio:4/5; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); color:var(--text-2); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; cursor:pointer; font-size:12.5px; font-weight:600; }
.ob-add:hover { border-color:var(--gk-2); color:var(--text); }
#ob-analyze { margin-top:14px; }
.ob-stylecard { margin-top:16px; display:grid; grid-template-columns:repeat(2,1fr); gap:14px; padding:18px; border-radius:14px; background:var(--surface-2); animation:obIn .35s var(--ease); }
.ob-stylecard .ob-dd { grid-column:1 / -1; }
.ob-dd { display:grid; grid-template-columns:1fr 1fr; gap:10px; font-size:12.5px; }
.ob-dd > div { display:flex; flex-direction:column; gap:5px; }
.ob-dd .ok { color:var(--up); } .ob-dd .no { color:var(--down); }
.ob-caps { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.ob-cap { border:1px solid var(--border); border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:8px; background:var(--surface); transition:all .15s; }
.ob-cap p { margin:0; font-size:13.5px; line-height:1.5; flex:1; }
.ob-cap-s { font:600 10.5px var(--mono); letter-spacing:.1em; text-transform:uppercase; color:var(--text-3); }
.ob-cap-act { display:flex; gap:6px; }
.ob-cap.like { border-color:var(--up); box-shadow:0 0 0 1px var(--up) inset; }
.ob-cap.dislike { opacity:.5; }
.ob-opts { display:flex; flex-direction:column; gap:10px; }
.ob-opt { display:flex; align-items:center; gap:14px; text-align:left; padding:16px 18px; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); cursor:pointer; position:relative; }
.ob-opt > div { display:flex; flex-direction:column; gap:3px; flex:1; }
.ob-opt b { font-size:15px; } .ob-opt span { font-size:13px; color:var(--text-2); }
.ob-opt em { font-style:normal; font-size:11px; font-weight:650; padding:3px 8px; border-radius:999px; background:var(--gk-soft); color:var(--gk-1); }
.ob-radio { width:20px; height:20px; border-radius:50%; border:2px solid var(--border-strong); flex:none; transition:all .15s; }
.ob-opt.on { border-color:var(--gk-2); box-shadow:0 0 0 1px var(--gk-2) inset; }
.ob-opt.on .ob-radio { border:6px solid var(--gk-1); }
.ob-sum { list-style:none; margin:0 0 18px; padding:0; display:flex; flex-direction:column; border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.ob-sum li { display:grid; grid-template-columns:22px 110px 1fr; gap:10px; align-items:center; padding:12px 16px; font-size:13.5px; border-top:1px solid var(--border); }
.ob-sum li:first-child { border-top:0; }
.ob-sum li span { color:var(--text-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ob-sum .ok { color:var(--up); }
.ob-what { display:flex; gap:12px; padding:16px; border-radius:14px; background:var(--gk-soft); color:var(--text); }
.ob-what > svg { color:var(--gk-1); flex:none; margin-top:2px; }
.ob-what div { display:flex; flex-direction:column; gap:4px; font-size:13.5px; } .ob-what span { color:var(--text-2); line-height:1.5; }
.ob-making { text-align:center; padding:30px 0 10px; }
.ob-making h2 { font-size:20px; margin:22px 0 14px; }
.ob-making ul { list-style:none; padding:0; margin:0 auto; display:inline-flex; flex-direction:column; gap:8px; text-align:left; }
.ob-making li { opacity:0; animation:obTick .5s var(--ease) forwards; font-size:14px; color:var(--text-2); display:flex; gap:8px; align-items:center; }
.ob-making li svg { color:var(--up); }
@keyframes obTick { to { opacity:1 } }
.ob-orbit { position:relative; width:84px; height:84px; margin:0 auto; display:grid; place-items:center; color:var(--gk-1); }
.ob-orbit i { position:absolute; inset:0; border-radius:50%; border:2px solid transparent; border-top-color:var(--gk-1); animation:spin 1.6s linear infinite; }
.ob-orbit i:nth-child(2) { inset:10px; border-top-color:var(--gk-2); animation-duration:2.2s; animation-direction:reverse; }
.ob-orbit i:nth-child(3) { inset:20px; border-top-color:var(--gk-3); animation-duration:1.2s; }
.ob-foot { position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; align-items:center; gap:8px; padding:12px max(20px, calc((100vw - 760px) / 2 + 20px)); padding-bottom:calc(12px + env(safe-area-inset-bottom)); background:color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); border-top:1px solid var(--border); }
@media (min-width: 901px) { .ob-foot { left:var(--sidebar); padding-left:max(20px, calc((100vw - var(--sidebar) - 760px) / 2 + 20px)); padding-right:max(20px, calc((100vw - var(--sidebar) - 760px) / 2 + 20px)); } }
.ob-banner { display:flex; align-items:center; gap:14px; padding:16px 18px; margin-bottom:18px; border-radius:16px; background:var(--gk-soft); border:1px solid color-mix(in srgb, var(--gk-2) 35%, transparent); }
.ob-banner > svg { color:var(--gk-1); flex:none; }
.ob-banner .grow { display:flex; flex-direction:column; gap:3px; } .ob-banner .grow span { font-size:13px; color:var(--text-2); }
.ob-empty { text-align:center; padding:60px 20px; display:flex; flex-direction:column; align-items:center; gap:10px; }
.ob-empty > svg { color:var(--gk-1); }
@media (max-width: 720px) {
  .ob { padding:14px 14px 110px; }
  .ob-card { padding:20px 18px; border-radius:16px; }
  .ob-head h1 { font-size:23px; }
  .ob-head p { font-size:14px; }
  .ob-dot span { display:none; }
  .ob-dot.on span { display:inline; }
  .ob-brandline .faint { display:none; }
  .ob-kit { grid-template-columns:1fr; }
  .ob-kit-prev { aspect-ratio:auto; min-height:230px; }
  .ob-caps, .ob-stylecard, .ob-dd { grid-template-columns:1fr; }
  .ob-urlrow .btn.lg { padding:0 14px; }
  .ob-sum li { grid-template-columns:22px 1fr; }
  .ob-sum li span { grid-column:2; white-space:normal; }
  .ob-banner { flex-wrap:wrap; }
  .ob-foot #ob-skip { display:none; }
}

/* ===== Playbook page ===== */
.pb { max-width: 1040px; }
.pb-hero { display:flex; gap:14px; align-items:center; padding:18px 20px; border-radius:16px; background:var(--gk-grad); color:#fff; margin-bottom:22px; box-shadow:var(--shadow-3); animation:obIn .4s var(--ease); }
.pb-hero div { display:flex; flex-direction:column; gap:2px; } .pb-hero span { opacity:.9; font-size:13.5px; }
.pb-connect { margin-bottom:22px; border-color:color-mix(in srgb, var(--gk-2) 40%, var(--border)); }
.pb-connect h3 { margin:0 0 4px; } .pb-connect p { margin:0; font-size:13.5px; }
.pb-ic { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--gk-grad); color:#fff; flex:none; }
.pb-status { font-size:12px; font-weight:600; padding:5px 10px; border-radius:999px; background:var(--surface-2); color:var(--text-3); display:inline-flex; gap:5px; align-items:center; white-space:nowrap; }
.pb-status.ok { background:color-mix(in srgb, var(--up) 14%, var(--surface)); color:var(--up); }
.pb-tabs { margin:16px 0 4px; max-width:100%; overflow-x:auto; }
.pb-tabs button.on { background:var(--surface); color:var(--text); box-shadow:var(--shadow-1, 0 1px 2px rgba(0,0,0,.08)); }
.pb-steps { margin:10px 0 0; padding:0; list-style:none; counter-reset:s; display:flex; flex-direction:column; gap:14px; }
.pb-steps li { counter-increment:s; display:flex; flex-direction:column; gap:8px; padding-left:40px; position:relative; font-size:13.5px; }
.pb-steps li::before { content:counter(s); position:absolute; left:0; top:-2px; width:26px; height:26px; border-radius:50%; background:var(--text); color:var(--bg); display:grid; place-items:center; font-size:12.5px; font-weight:700; }
.pb-steps li.pb-last::before { content:'✓'; background:var(--up); color:#fff; }
.pb-steps li p { margin:0; font-size:12.5px; }
.pb-field { display:flex; align-items:center; gap:8px; padding:6px 6px 6px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); }
.pb-field > span { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-3); font-weight:650; flex:none; }
.pb-field code { flex:1; min-width:0; font:12.5px var(--mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
.pb-field code.wrap { white-space:normal; font-family:inherit; font-size:13px; line-height:1.45; }
.pb-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.pb-grid h3, .pb .card h3 { display:flex; align-items:center; gap:8px; margin:0 0 10px; font-size:15px; }
.pb-grid p { margin:0 0 10px; font-size:14px; line-height:1.55; }
.pb-tags { display:flex; flex-wrap:wrap; gap:6px; }
.pb-list { margin:0; padding-left:18px; display:flex; flex-direction:column; gap:6px; font-size:13.5px; line-height:1.5; }
.pb-h2 { display:flex; align-items:center; gap:8px; font-size:17px; margin:30px 0 12px; }
.pb-agents { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; }
.pb-agent { border:1px solid var(--border); border-radius:16px; padding:16px; background:var(--surface); display:flex; flex-direction:column; gap:10px; }
.pb-agent header { display:flex; gap:10px; align-items:center; }
.pb-agent header div { display:flex; flex-direction:column; } .pb-agent header .faint { font-size:12px; }
.pb-agent p { margin:0; font-size:13px; color:var(--text-2); line-height:1.5; }
.pb-agent ul { margin:0; padding-left:16px; font-size:12.5px; display:flex; flex-direction:column; gap:4px; }
.pb-handoff { font-size:12px; color:var(--text-3); display:flex; gap:6px; align-items:flex-start; border-top:1px solid var(--border); padding-top:8px; margin-top:auto; }
.pb-av { width:38px; height:38px; border-radius:12px; display:grid; place-items:center; color:#fff; flex:none; background:#555; }
.pb-av.a-orchestrator { background:var(--gk-grad); } .pb-av.a-content { background:#E0864A; } .pb-av.a-video { background:#3E7BE0; } .pb-av.a-review { background:#2E9E6E; } .pb-av.a-publisher { background:#222; }
.pb-routines { display:flex; flex-direction:column; gap:8px; }
.pb-rt { display:flex; gap:14px; padding:14px 16px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.pb-when { flex:none; min-width:84px; font:650 12.5px var(--mono); padding:6px 10px; border-radius:8px; background:var(--surface-2); height:fit-content; text-align:center; }
.pb-rt ol { margin:6px 0 0; padding-left:18px; font-size:13px; color:var(--text-2); display:flex; flex-direction:column; gap:3px; }
.pb-pillar { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; font-size:13.5px; }
.pb-pillar .faint { font-size:12px; line-height:1.45; }
.pb-quote { margin:12px 0 0; padding:12px 14px; border-left:3px solid var(--gk-2); background:var(--surface-2); border-radius:0 10px 10px 0; font-size:13.5px; line-height:1.55; }
.pb-md { margin-top:22px; } .pb-md summary { cursor:pointer; font-size:13px; color:var(--text-2); display:flex; gap:6px; align-items:center; }
.pb-md pre { max-height:420px; overflow:auto; }
@media (max-width: 760px) {
  .pb-grid { grid-template-columns:1fr; }
  .pb-connect > .row { flex-wrap:wrap; }
  .pb-rt { flex-direction:column; gap:8px; }
  .pb-when { align-self:flex-start; }
  .pb-field { flex-wrap:wrap; } .pb-field code { flex-basis:100%; order:3; white-space:normal; word-break:break-all; }
}
.pb .page-head .grow { min-width: min(100%, 260px); }
@media (max-width: 720px) { .pb .page-head .grow { flex-basis: 100%; } .pb .page-head > .btn { flex: 1; justify-content: center; } }
.ob-card .field + .field { margin-top: 16px; }
/* OAuth consent + connected assistants */
.oa-logos { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.oa-app { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #7c5cff, #ff6fb1); color: #fff; box-shadow: var(--shadow-1); }
.oa-app.studio { background: var(--text); color: var(--bg); --logo-dot: var(--bg); }
.oa-dots { display: flex; gap: 5px; } .oa-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong, #ccc); animation: oaDot 1.2s infinite; } .oa-dots i:nth-child(2) { animation-delay: .2s } .oa-dots i:nth-child(3) { animation-delay: .4s }
@keyframes oaDot { 0%, 100% { opacity: .3 } 50% { opacity: 1 } }
.oa-host { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: var(--radius-s); padding: 8px 10px; margin-top: -6px; }
.oa-can { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.oa-can li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; } .oa-can li svg { flex: none; margin-top: 2px; }
.oa-can .ok svg { color: var(--up, #1a7f4b); } .oa-can .no svg { color: var(--down); }
.oa-done { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--up-bg, #e6f6ee); color: var(--up, #1a7f4b); }
.pb-login { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; margin: 8px 0 2px; color: var(--text); } .pb-login svg { flex: none; margin-top: 2px; color: #7c5cff; }
.pb-conns { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; }
.pb-conns h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.pb-conns p { margin: 0; font-size: 13px; }
.pb-conns ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pb-conns li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-s); }
.pb-conns li small { display: block; margin-top: 2px; font-size: 12px; }
.pb-cav { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.auth-box #oa-no { margin-top: -8px; }
/* iromai brand */
.brand-tile { display: inline-grid; place-items: center; border-radius: 26%; background: var(--text); color: var(--bg); --mark-v: #9B82FF; flex: none; }
.brand-tile .ic { color: var(--bg); }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; font-weight: 650; font-size: 17px; letter-spacing: -.035em; }
.brand-name small { font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--text-3); margin-top: 2px; }
.mobile-bar .brand-name { font-size: 18px; }
.auth-art .brand-tile { background: var(--bg); color: var(--text); --mark-v: #7C5CFF; }
.auth-art .brand-tile .ic { color: var(--text); }
.auth-art .brand-name { font-size: 22px; color: var(--bg); }
.grad-text { background: linear-gradient(90deg, #9B82FF, #FF5FA8 55%, #FFB25B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.oa-app.studio { background: var(--text); color: var(--bg); --mark-v: #9B82FF; }
.oa-app.studio .ic { color: var(--bg); }
.ed-home .ic { --mark-v: #7C5CFF; }

/* ---------- workspace switcher */
.ws-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; margin: 0 0 12px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; text-align: left; color: var(--text); }
.ws-btn:hover { background: var(--surface-2); }
.ws-btn b { display: block; font-size: 13px; font-weight: 600; }
.ws-btn small { display: block; font-size: 11.5px; line-height: 1.2; }
.ws-tile { flex: none; display: inline-grid; place-items: center; border-radius: 7px; font-weight: 700; font-size: 12.5px; color: #fff; background: hsl(var(--h, 260) 62% 52%); }
.pop-item .ws-tile { font-size: 11px; border-radius: 6px; }
.ws-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12.5px; color: var(--text-3); }

/* ---------- platform console */
.plat-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.plat-tools .search { flex: 1; min-width: 220px; max-width: 420px; }
.plat-table tr.is-off td { opacity: .6; }
.plat-table td { vertical-align: middle; }
.badge.plan-internal { background: var(--surface-2); }
.badge.plan-pro, .badge.plan-agency { background: #7C5CFF1f; color: #6a4be6; border-color: #7C5CFF55; }
.badge.plan-starter { background: #FF5FA81a; color: #c2387a; border-color: #FF5FA855; }
@media (max-width: 760px) { .plat .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- onboarding v2: rules + AI team */
.ob-2col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
.ob-card textarea.textarea[rows="1"] { min-height: 42px; resize: vertical; }
.ob-chips.sm { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-chips.sm .ob-chip { min-width: 0; flex: 0 0 auto; padding: 6px 10px !important; }
.ob-chips.sm .ob-chip { padding: 8px 6px; text-align: center; justify-content: center; }
.ob-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ob-ag { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); position: relative; }
.ob-ag.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.ob-ag.fixed { cursor: default; opacity: .9; }
.ob-ag input { margin-top: 3px; accent-color: var(--text); }
.ob-ag b { display: block; font-size: 13.5px; }
.ob-ag span { display: block; font-size: 12px; color: var(--text-2); }
.ob-ag em { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 10.5px; color: var(--text-3); }
.ob-sched { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-items: end; }
.ob-sched .field { margin: 0; }
.ob-wins { display: flex; flex-direction: column; gap: 8px; }
.ob-win { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.ob-win b { width: 70px; font-size: 13px; }
.ob-win .input.sm { width: auto; min-width: 0; }
.ob-win input[type=number] { width: 64px; }
.ob-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.ob-toggle input { margin-top: 3px; accent-color: var(--text); }
.ob-toggle b { display: block; font-size: 13.5px; }
.ob-toggle span { display: block; font-size: 12px; color: var(--text-2); }
.pb-missing { margin-bottom: 14px; border-color: #f5c46a; background: #fff8e8; }
[data-theme=dark] .pb-missing { background: #2b2412; border-color: #6b5521; }
.pb-ic.warn { color: #b7791f; }
.pb-setup { margin-bottom: 14px; }
.pb-setup.ok { border-color: #9ad5b0; }
.pb-setup.old { border-color: #f5c46a; }
.pb-warn { color: #b7791f; font-size: 13px; margin: 4px 0; }
.pb-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; font-size: 13px; }
.pb-setup-grid b { display: block; font-size: 12px; color: var(--text-2); }
.pb-q { margin-top: 10px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pb-q ul { margin: 4px 0 0 18px; padding: 0; }
.pb-cron { display: block; font-size: 11px; margin-top: 4px; color: var(--text-3); background: none; padding: 0; }
.pb-instr { margin: 10px 0 14px; }
.pb-instr pre { white-space: pre-wrap; font-size: 12px; max-height: 280px; overflow: auto; }
@media (max-width: 640px) { .ob-2col, .pb-setup-grid { grid-template-columns: 1fr; } }
