:root {
  /* White mode: hell, JP Grün als Akzent */
  --bg: #f5f7f6; --panel: #ffffff; --panel-2: #f1f4f2; --line: #e3e8e5; --line-2: #d3dbd6;
  --text: #0f1713; --muted: #646e69; --faint: #9aa39e;
  --accent: #10a04f; --accent-2: #e5f7eb; --accent-ink: #fff;
  --good: #10a04f; --good-bg: #e5f7eb; --warn: #c27c0e; --warn-bg: #fff4e0; --bad: #d64545; --bad-bg: #fdecec;
  --violet: #7c4dff; --teal: #0f9d8a; --slate: #5b6475; --ig: #ff4f8b; --tiktok: #25f4ee;
  --logo: linear-gradient(135deg, #10a04f, #25c6d0); --logo-ink: #fff; --frame: #10a04f;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 8px rgba(16,24,40,.04);
  --side: 236px; color-scheme: light;
}
/* JP mode: dunkel mit Mint, der ursprüngliche JP Farm Stil (Standard) */
:root[data-theme="jp"] { --bg:#0b0d12; --panel:#12151c; --panel-2:#181c25; --line:#232836; --line-2:#2f3546; --text:#e9ecf3; --muted:#8b93a7; --faint:#5f6678; --accent:#7cf29c; --accent-2:#17291f; --accent-ink:#0b2814; --good:#7cf29c; --good-bg:#14281b; --warn:#ffb547; --warn-bg:#2b2112; --bad:#ff5c6c; --bad-bg:#2d161a; --violet:#a78bfa; --teal:#25f4ee; --slate:#8b93a7; --shadow:none; --logo:linear-gradient(135deg,#7cf29c,#25f4ee); --logo-ink:#0b2814; --frame:#7cf29c; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --bg:#0b0d12; --panel:#12151c; --panel-2:#181c25; --line:#232836; --line-2:#2f3546; --text:#e9ecf3; --muted:#8b93a7; --faint:#5f6678; --accent:#7cf29c; --accent-2:#17291f; --accent-ink:#0b2814; --good:#7cf29c; --good-bg:#14281b; --warn:#ffb547; --warn-bg:#2b2112; --bad:#ff5c6c; --bad-bg:#2d161a; --violet:#a78bfa; --teal:#25f4ee; --slate:#8b93a7; --shadow:none; --logo:linear-gradient(135deg,#7cf29c,#25f4ee); --logo-ink:#0b2814; --frame:#7cf29c; color-scheme: dark; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line-2); background: var(--panel); border-radius: 10px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .12s, border-color .12s; }
button:hover { background: var(--panel-2); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
button.primary:hover { filter: brightness(1.06); }
button.danger { color: var(--bad); }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: var(--panel-2); }
button.sm { padding: 4px 9px; font-size: 13px; border-radius: 8px; }
button.icon { padding: 6px; width: 32px; height: 32px; justify-content: center; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
textarea { resize: vertical; min-height: 70px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
label.field .hint { font-size: 12px; color: var(--faint); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; } .gap-s { gap: 6px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px 10px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 12px; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--logo-ink); background: var(--logo); }
.brand b { font-size: 15px; }
.search-btn { width: 100%; justify-content: space-between; color: var(--muted); background: var(--panel-2); border-color: transparent; margin-bottom: 8px; }
.kbd { font-size: 11px; border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; color: var(--faint); background: var(--panel); }
.nav { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
.nav-group { margin-top: 6px; }
.nav-title { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 6px 10px 4px; text-transform: none; letter-spacing: .01em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; color: var(--text); font-size: 13.5px; }
.nav a:hover { background: var(--panel-2); }
.nav a.active { background: var(--accent-2); color: var(--accent); font-weight: 500; }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--faint); }
.nav a .dot-badge { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.nav svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; cursor: pointer; }
.me:hover { background: var(--panel-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: #4c5bd4; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.bell { position: relative; }
.bell .pip { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
main.page { padding: 26px 36px 60px; max-width: 1360px; width: 100%; min-width: 0; margin: 0 auto; }
.view { min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); margin-top: 2px; }

/* Cards & tiles */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-body { padding: 16px 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { padding: 14px 16px; }
.tile .label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); background: var(--panel-2); border-radius: 7px; padding: 2px 8px; }
.tile .value { font-size: 26px; font-weight: 650; margin: 10px 0 4px; letter-spacing: -.02em; }
.tile .value small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tile .foot { display: flex; gap: 6px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1000px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Pills, badges */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid transparent; white-space: nowrap; }
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); background: var(--good-bg); } .pill.warn { color: var(--warn); background: var(--warn-bg); } .pill.bad { color: var(--bad); background: var(--bad-bg); } .pill.accent { color: var(--accent); background: var(--accent-2); }
.pill.violet { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); } .pill.teal { color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); } .pill.slate { color: var(--slate); background: color-mix(in srgb, var(--slate) 12%, transparent); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); }

/* Tabs & segmented */
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: none; background: none; border-radius: 0; padding: 8px 0; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.tabs .n { color: var(--faint); font-size: 12px; margin-left: 4px; }
.seg { display: inline-flex; background: var(--panel-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; padding: 4px 11px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.seg button.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--panel-2); }
table.t tr.sel td { background: var(--accent-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Phone frames */
.phones-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.phone-card { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.phone-card .frame-wrap { background: var(--panel-2); border-radius: 14px; padding: 12px; display: grid; place-items: center; }
.frame { position: relative; width: 100%; max-width: 140px; aspect-ratio: 390/844; border-radius: 20px; overflow: hidden; background: #000; border: 2px solid var(--frame); box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.frame.off { border-color: var(--line-2); }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame .msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #9aa0b0; font-size: 12px; padding: 10px; background: #0c0e13; }
.frame .tag { position: absolute; left: 6px; bottom: 6px; right: 6px; font-size: 11px; color: #fff; text-shadow: 0 1px 3px #000; }
.phone-card .name { font-weight: 500; font-size: 13.5px; }

/* Device page */
.device-grid { display: grid; grid-template-columns: 300px clamp(220px, calc((100vh - 170px) * 0.462), 400px) 364px; grid-template-areas: "controls phone tools"; gap: 22px; justify-content: center; align-items: start; }
.dg-controls { grid-area: controls; } .dg-phone { grid-area: phone; } .dg-tools { grid-area: tools; }
/* Mittelgroß: Handy links groß, Steuerung und Werkzeuge rechts untereinander */
@media (max-width: 1320px) { .device-grid { grid-template-columns: clamp(220px, calc((100vh - 170px) * 0.462), 400px) minmax(300px, 400px); grid-template-areas: "phone controls" "phone tools"; grid-template-rows: minmax(0, max-content) minmax(0, 1fr); } }
/* Groß und mittel: alles passt in den Bildschirm. Das Handy wird so hoch wie Platz ist, die Seiten scrollen für sich. */
@media (min-width: 861px) {
  .device-grid { height: calc(100vh - 128px); min-height: 440px; align-items: stretch; }
  .device-grid > * { min-height: 0; }
  .dg-controls { overflow-y: auto; }
  .dg-tools { overflow-y: auto; padding-right: 44px; }
  .dg-tools .side-tabs { right: -42px; }
  .dg-phone { display: flex; flex-direction: column; align-items: center; }
  .dg-phone .live { flex: 1 1 auto; height: 100%; width: auto; max-width: 100%; min-height: 0; }
  body:has(.device-grid) main.page { padding-bottom: 12px; }
}
/* Schmal: Handy zuerst, darunter alles andere */
@media (max-width: 860px) { .device-grid { grid-template-columns: minmax(0, 420px); grid-template-areas: "phone" "controls" "tools"; } .side-tabs { position: static; flex-direction: row; margin-bottom: 10px; } }
.panel-glass { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 14px; box-shadow: var(--shadow); }
.btn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sq { min-width: 0; text-align: center; line-height: 1.2; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); cursor: pointer; border: none; background: none; padding: 0; }
.sq .box { width: 100%; aspect-ratio: 1.1; border-radius: 12px; background: var(--panel-2); display: grid; place-items: center; border: 1px solid var(--line); }
.sq:hover .box { border-color: var(--line-2); background: var(--panel); }
.sq svg { width: 18px; height: 18px; color: var(--text); }
.dpad { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 44px); gap: 6px; justify-content: center; margin: 6px 0 10px; }
.dpad button { justify-content: center; border-radius: 11px; background: var(--panel-2); }
.dpad .c { background: var(--panel); }
.live { position: relative; width: 100%; aspect-ratio: 390/844; border-radius: 38px; overflow: hidden; background: #000; border: 3px solid #2a2f3c; touch-action: none; user-select: none; }
.live img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: crosshair; -webkit-user-drag: none; }
.live .ovl { position: absolute; inset: 0; display: grid; place-items: center; color: #aab; background: rgba(0,0,0,.65); text-align: center; padding: 20px; }
.status-line { display: flex; justify-content: center; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.side-tabs { display: flex; flex-direction: column; gap: 4px; position: absolute; right: -40px; top: 10px; }
.side-tabs button { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 10px; }
.side-tabs button.active { background: var(--accent-2); color: var(--accent); border-color: var(--accent); }
.mini-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.mini-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--panel-2); border-radius: 10px; font-size: 13px; }

/* MultiView */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--mv, 170px), 1fr)); gap: 12px; }
.mv-cell .frame { max-width: none; border-radius: 22px; cursor: pointer; }
.mv-cell.master .frame { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.m-card { overflow: hidden; }
.m-card .thumb { aspect-ratio: 3/4; background: #0c0e13; display: grid; place-items: center; overflow: hidden; position: relative; }
.m-card .thumb img, .m-card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.m-card .thumb input { position: absolute; top: 8px; left: 8px; }
.m-card .body { padding: 9px 11px; font-size: 12.5px; }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 34px; text-align: center; color: var(--muted); }
.dropzone.over { border-color: var(--accent); background: var(--accent-2); }
.folders { display: flex; gap: 6px; flex-wrap: wrap; }
.folder { padding: 5px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.folder.active { background: var(--accent-2); border-color: var(--accent); color: var(--accent); }
.meter { height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; } .meter > div { height: 100%; background: var(--accent); }

/* Automations builder */
.builder { display: grid; grid-template-columns: 230px 1fr 330px; grid-template-areas: "pal flow set"; gap: 14px; align-items: start; }
.b-pal { grid-area: pal; position: sticky; top: 16px; } .b-flow { grid-area: flow; min-width: 0; } .b-set { grid-area: set; }
/* Mittelgroß: Bausteine links, Ablauf und Einstellungen rechts untereinander */
@media (max-width: 1250px) { .builder { grid-template-columns: 210px minmax(0, 1fr); grid-template-areas: "pal flow" "pal set"; } .b-set { max-height: none !important; } }
/* Schmal: Ablauf zuerst, darunter Bausteine und Einstellungen */
@media (max-width: 760px) { .builder { grid-template-columns: 1fr; grid-template-areas: "flow" "pal" "set"; } .b-pal { position: static; max-height: 280px; } }
.palette { max-height: 70vh; overflow-y: auto; padding: 10px; }
.palette h5 { margin: 10px 4px 4px; font-size: 11px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.palette button { width: 100%; justify-content: flex-start; border-color: transparent; background: transparent; padding: 6px 8px; font-size: 13px; }
.palette button:hover { background: var(--panel-2); }
.palette button .ai { margin-left: auto; font-size: 10px; }
.flow { padding: 16px; min-height: 420px; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 16px 16px; border-radius: var(--radius); }
.step { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin: 0 auto 8px; max-width: 520px; cursor: pointer; position: relative; box-shadow: var(--shadow); }
.step.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.step.err { border-color: var(--bad); }
.step .g { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.step .t { font-weight: 600; }
.step .s { color: var(--muted); font-size: 12.5px; }
.step .tools { position: absolute; right: 8px; top: 8px; display: none; gap: 2px; }
.step:hover .tools { display: flex; }
.step .tools button { padding: 2px 6px; font-size: 12px; }
.block { border-left: 2px solid var(--accent-2); margin: 6px 0 4px 18px; padding-left: 12px; }
.block .add-in { font-size: 12px; }
.connector { width: 2px; height: 10px; background: var(--line-2); margin: -4px auto 4px; }
.problems { border: 1px solid var(--bad); background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.problems ul { margin: 4px 0 0; padding-left: 18px; }
.log { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--panel-2); border-radius: 10px; padding: 10px; max-height: 300px; overflow: auto; white-space: pre-wrap; }

/* Analytics */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; height: 100%; }
.bars .b span { display: block; border-radius: 3px 3px 0 0; }
.heat { display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 3px; font-size: 11px; color: var(--muted); }
.heat .c { aspect-ratio: 1.4; border-radius: 4px; background: var(--panel-2); }
.spark { width: 100%; height: 34px; }

/* Modals, toast, palette */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(15,18,25,.35); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px); }
.modal-card { background: var(--panel); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); border: 1px solid var(--line); }
.modal-card.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 10px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; background: var(--text); color: var(--panel); padding: 10px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast.bad { background: var(--bad); color: #fff; }
.palette-modal .modal-card { width: min(560px, 100%); }
.palette-modal input { border: none; box-shadow: none; font-size: 15px; padding: 14px 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
.palette-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.palette-list .it { padding: 8px 12px; border-radius: 9px; cursor: pointer; display: flex; justify-content: space-between; }
.palette-list .it.on, .palette-list .it:hover { background: var(--accent-2); }
.palette-list .grp { font-size: 11px; color: var(--faint); padding: 8px 12px 2px; text-transform: uppercase; letter-spacing: .06em; }
.pop { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.14); min-width: 200px; padding: 5px; }
.pop .mi { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pop .mi:hover { background: var(--panel-2); }
.pop .mi.danger { color: var(--bad); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty b { color: var(--text); display: block; margin-bottom: 4px; }
.bulkbar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.14); padding: 8px 10px; display: flex; gap: 8px; align-items: center; z-index: 40; }
.check-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; max-height: 280px; overflow-y: auto; }
.check-list label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.check-list label:last-child { border-bottom: none; }
.perm { display: flex; gap: 10px; padding: 8px 2px; }
.perm b { font-weight: 500; }
.role-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; background: linear-gradient(180deg, var(--panel) 40%, color-mix(in srgb, var(--rc, #7c4dff) 22%, var(--panel))); }
.role-card .ic { width: 32px; height: 32px; border-radius: 50%; background: var(--rc, #7c4dff); color: #fff; display: grid; place-items: center; font-weight: 700; }
.stage-cols { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.stage-col { background: var(--panel-2); border-radius: 14px; padding: 10px; min-height: 200px; }
.stage-col h4 { margin: 2px 4px 10px; font-size: 13px; display: flex; justify-content: space-between; }
.acc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; margin-bottom: 8px; cursor: pointer; }
.acc-card .hint { font-size: 12px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.help-article h2 { font-size: 18px; } .help-article li { margin: 4px 0; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 45; left: 0; transform: translateX(-100%); transition: transform .2s; width: 260px; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  main.page { padding: 16px; }
  .mobile-bar { display: flex !important; }
  .phones-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 20px; }
}
.mobile-bar { display: none; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 30; }

* { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
@media (max-width: 900px) and (min-width: 761px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.side-foot { display: flex; align-items: center; gap: 4px; margin-top: 8px; } .side-foot .me { margin-top: 0; min-width: 0; }
@media (min-width: 761px) { .bulkbar { left: calc(50% + var(--side) / 2); max-width: calc(100vw - var(--side) - 32px); } }
input:disabled, select:disabled, textarea:disabled { background: var(--panel-2); color: var(--muted); cursor: not-allowed; }
table.t th, table.t td.num { white-space: nowrap; } table.t td .row { flex-wrap: nowrap; white-space: nowrap; }
.m-card .thumb { cursor: zoom-in; }
.m-card .vbadge { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.preview-box { background: #000; border-radius: 12px; overflow: hidden; display: grid; place-items: center; max-height: 68vh; }
.preview-box video, .preview-box img { max-width: 100%; max-height: 68vh; display: block; }
.tap-dot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 45%, transparent); border: 2px solid var(--accent); pointer-events: none; animation: tapdot .45s ease-out forwards; }
@keyframes tapdot { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.swipe-line { position: absolute; height: 4px; border-radius: 2px; background: var(--accent); transform-origin: 0 50%; pointer-events: none; animation: tapdot .5s ease-out forwards; }
/* Mittelgroß: rechte Seite scrollt als Ganzes, das Handy bleibt links stehen. */
@media (min-width: 861px) and (max-width: 1320px) {
  .device-grid { overflow-y: auto; grid-template-rows: auto auto; align-items: start; overscroll-behavior: contain; }
  .dg-controls, .dg-tools { overflow: visible; }
  .dg-controls { margin-right: 44px; }
  .dg-phone { position: sticky; top: 0; height: calc(100vh - 128px); min-height: 440px; grid-row: 1 / span 2; }
}
