:root {
  /* JP Stil: hell mit JP-Blau und Rosa wie die JP-Webseiten (Standard) */
  --bg: #faf9fc; --panel: #ffffff; --panel-2: #f3f6fb; --line: #e9e7ee; --line-2: #dcdbe6;
  --text: #191b20; --muted: #5c5f6b; --faint: #767987;
  --accent: #4f9be6; --accent-2: #eaf3fd; --accent-ink: #ffffff;
  --good: #1f9d55; --good-bg: #e8f7ee; --warn: #c27c0e; --warn-bg: #fff4e0; --bad: #d64545; --bad-bg: #fdecec;
  --violet: #8a5fae; --teal: #4f9be6; --slate: #5c5f6b; --ig: #ff4f8b; --tiktok: #25f4ee; --pink: #ffaacf; --soft-blue: #a8d3f9;
  --logo: linear-gradient(135deg, #4f9be6, #ffaacf); --logo-ink: #ffffff; --frame: #4f9be6;
  --shadow: 0 1px 2px rgba(25,27,32,.04), 0 6px 20px rgba(79,155,230,.08);
  color-scheme: light;
  --radius: 14px; --side: 236px;
}
/* Dunkel: gleiche Farben, dunkler Hintergrund */
:root[data-theme="dark"] { --bg:#0f1218; --panel:#161a22; --panel-2:#1c212b; --line:#262c38; --line-2:#323a49; --text:#eef1f6; --muted:#9aa3b5; --faint:#6b7385; --accent:#7db8f2; --accent-2:#1a2a3d; --accent-ink:#0b1620; --good:#46c17f; --good-bg:#14281d; --warn:#e2a23b; --warn-bg:#2a2112; --bad:#ff6b6b; --bad-bg:#2c1717; --violet:#c9a6ff; --teal:#7db8f2; --slate:#9aa3b5; --logo:linear-gradient(135deg,#7db8f2,#ffaacf); --logo-ink:#0b1620; --frame:#7db8f2; --shadow:none; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --bg:#0f1218; --panel:#161a22; --panel-2:#1c212b; --line:#262c38; --line-2:#323a49; --text:#eef1f6; --muted:#9aa3b5; --faint:#6b7385; --accent:#7db8f2; --accent-2:#1a2a3d; --accent-ink:#0b1620; --good:#46c17f; --good-bg:#14281d; --warn:#e2a23b; --warn-bg:#2a2112; --bad:#ff6b6b; --bad-bg:#2c1717; --violet:#c9a6ff; --teal:#7db8f2; --slate:#9aa3b5; --logo:linear-gradient(135deg,#7db8f2,#ffaacf); --logo-ink:#0b1620; --frame:#7db8f2; --shadow:none; 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; }
@media (hover: hover) { 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; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; 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); }
/* Rollen-Farben (Team): JP-Blau, Pink, Orange; im Dunklen hellere Schrift */
.pill.blue { color: #2f7fd0; background: color-mix(in srgb, #4f9be6 14%, transparent); } .pill.pink { color: #d2397f; background: color-mix(in srgb, #ff6fa8 14%, transparent); } .pill.orange { color: #c2620a; background: color-mix(in srgb, #f08c2e 14%, transparent); }
:root[data-theme="dark"] .pill.blue { color: #7db8f2; background: color-mix(in srgb, #7db8f2 14%, transparent); } :root[data-theme="dark"] .pill.pink { color: #ffaacf; background: color-mix(in srgb, #ffaacf 14%, transparent); } :root[data-theme="dark"] .pill.orange { color: #f5a961; background: color-mix(in srgb, #f5a961 14%, transparent); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .pill.blue { color: #7db8f2; background: color-mix(in srgb, #7db8f2 14%, transparent); } :root[data-theme="auto"] .pill.pink { color: #ffaacf; background: color-mix(in srgb, #ffaacf 14%, transparent); } :root[data-theme="auto"] .pill.orange { color: #f5a961; background: color-mix(in srgb, #f5a961 14%, 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; min-height: 26px; }
.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 th.num { text-align: right; }
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(min(var(--mv, 170px), 100%), var(--mv, 170px))); 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); max-height: calc(100dvh - 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; }
.empty b.inline, .empty strong { display: inline; margin: 0; color: var(--text); }
.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; }
  :where(.mobile-bar) { display: flex !important; }   /* :where: in JP Remote eingebettet gewinnt das Ausblenden aus boot.js */
  .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: max-content max-content; align-content: start; align-items: start; overscroll-behavior: contain; }
  .dg-controls, .dg-tools { overflow: visible; min-height: auto !important; }
  .dg-controls { margin-right: 44px; }
  .dg-phone { position: sticky; top: 0; height: calc(100vh - 128px); min-height: 440px; grid-row: 1 / span 2; }
}

/* Handy-Breite: nichts darf die Seite seitlich verschieben. Leisten scrollen in sich, Kopfzeilen brechen um. */
@media (max-width: 640px) {
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head > * { min-width: 0; max-width: 100%; }
  .seg, .tabs, .side-tabs { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .row.wrap, .card-head .row { flex-wrap: wrap; }
  .table-wrap, .heatmap { max-width: 100%; overflow-x: auto; }
  main, .main { overflow-x: hidden; }
}

/* Beschriftungen auf Live-Bildern: immer lesbar, egal was das Handy gerade zeigt. */
.frame .tag { background: rgba(15, 18, 24, .62); color: #fff; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.frame-wrap > button.icon { background: rgba(255, 255, 255, .9); color: #191b20; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }

/* iCloud-Konto auf der Handy-Seite (links unter Public IP) */
.ic-card { padding: 4px 10px; }
.ic-row { display: flex; align-items: center; gap: 6px; min-height: 24px; font-size: 13px; }
.ic-row .ic-k { width: 72px; flex: none; color: var(--muted); }
.ic-row .ic-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-row button.icon.sm { width: 24px; height: 22px; min-height: 0; padding: 0; }

/* ---------- Handy-Seite im Konsolen-Stil (wie AliRemote, mit JP-Blau) ---------- */
:root { --stage: #e3e7ee; --glass: #eef1f6; --tile: rgba(209, 218, 232, .62); --tile-hover: rgba(196, 209, 229, .9); --cap: #ffffff; --section: #6b7180; }
:root[data-theme="dark"] { --stage: #0c0f14; --glass: #161a22; --tile: rgba(255, 255, 255, .06); --tile-hover: rgba(255, 255, 255, .11); --cap: #232936; --section: #8a93a6; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --stage: #0c0f14; --glass: #161a22; --tile: rgba(255, 255, 255, .06); --tile-hover: rgba(255, 255, 255, .11); --cap: #232936; --section: #8a93a6; } }
body:has(.device-grid) .main, body:has(.device-grid) main.page { background: var(--stage); }
body:has(.device-grid) main.page { max-width: none; }
.dev-top button { height: 44px; padding: 0 18px; border-radius: 999px; background: color-mix(in srgb, var(--cap) 88%, transparent); border: 1px solid rgba(13, 13, 13, .09); font-weight: 500; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 10px rgba(15, 30, 60, .04); }
.dev-top button:hover { border-color: var(--accent); }
.dev-top #b-refresh { width: 44px; padding: 0; justify-content: center; }
.device-grid .panel-glass { background: var(--glass); border: none; border-radius: 32px; padding: 22px 18px 18px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85), 0 19px 43px rgba(15, 30, 60, .04), 0 78px 78px rgba(15, 30, 60, .04); }
:root[data-theme="dark"] .device-grid .panel-glass { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 50px rgba(0, 0, 0, .35); }
.cap { display: inline-flex; align-items: center; gap: 6px; background: var(--cap); color: var(--text); border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(15, 30, 60, .06); }
.device-grid .small.faint[style*="letter-spacing"] { font-size: 10.5px; font-weight: 600; letter-spacing: .09em !important; color: var(--section); }
.device-grid .sq { font-size: 10.5px; gap: 7px; color: var(--section); }
.device-grid .sq .box { aspect-ratio: auto; height: 58px; border: none; border-radius: 14px; background: var(--tile); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); transition: background .12s, transform .08s; }
.device-grid .sq:hover .box { background: var(--tile-hover); }
.device-grid .sq:active .box { transform: scale(.96); }
.device-grid .sq svg { width: 22px; height: 22px; stroke-width: 1.5; }
.device-grid .dpad { grid-template-columns: repeat(3, 50px); grid-template-rows: repeat(3, 48px); gap: 8px; }
.device-grid .dpad button { border: none; border-radius: 14px; background: var(--tile); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.device-grid .dpad button:hover { background: var(--tile-hover); }
.device-grid .dpad .c { background: var(--cap); box-shadow: 0 2px 8px rgba(15, 30, 60, .08); }
.device-grid .row > button.grow[data-act^="volume"] { border: none; border-radius: 14px; background: var(--tile); height: 40px; }
.device-grid .live { border: none; border-radius: 46px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 30px 60px rgba(15, 30, 60, .16); }
.device-grid textarea, .device-grid #ipbox, .device-grid .ic-card { background: var(--cap); border: none; border-radius: 18px; }
.device-grid textarea:focus { box-shadow: 0 0 0 3px var(--accent-2); }
.device-grid .panel-glass button.sm:not(.primary) { background: var(--tile); border: none; border-radius: 12px; }
.device-grid .panel-glass button.sm:not(.primary):hover { background: var(--tile-hover); }
.device-grid .side-tabs { background: color-mix(in srgb, var(--cap) 85%, transparent); border-radius: 999px; padding: 6px 4px; gap: 2px; box-shadow: 0 4px 14px rgba(15, 30, 60, .08); }
.device-grid .side-tabs button { border: none; background: transparent; border-radius: 999px; }
.device-grid .side-tabs button.active { background: var(--accent-2); color: var(--accent); }
.device-grid .status-line { margin-top: 12px; }
.device-grid .panel-glass .row.wrap { flex-wrap: nowrap; }
.device-grid .panel-glass .row.wrap button.sm { padding: 6px 10px; white-space: nowrap; }
/* Handy-Seite: Dateien in die Galerie */
.drop-gallery { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line-2)); border-radius: 18px; background: var(--cap, var(--panel)); cursor: pointer; text-align: center; color: var(--text); transition: background .12s, border-color .12s; }
.drop-gallery svg { color: var(--accent); }
.drop-gallery:hover, .drop-gallery.over { border-color: var(--accent); background: var(--accent-2); }
.c-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; background: var(--cap, var(--panel)); font-size: 13px; }
.c-th { width: 36px; height: 36px; flex: none; border-radius: 10px; overflow: hidden; background: var(--tile, var(--panel-2)); display: grid; place-items: center; color: var(--muted); }
.c-th img { width: 100%; height: 100%; object-fit: cover; }
.gbar { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--cap, var(--panel)); box-shadow: 0 4px 14px rgba(15, 30, 60, .08); }
.live.drop-on::after { content: 'Drop to put into the gallery'; position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 55%, transparent); color: #fff; font-weight: 600; font-size: 15px; border-radius: inherit; }
/* Content-Ansicht ordentlich: Karten nie gequetscht, Liste scrollt in ihrem Kasten */
.dg-tools > * { flex-shrink: 0; }
.drop-gallery { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; text-align: left; }
.drop-gallery .dg-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-2); }
.drop-gallery .dg-tx { display: flex; flex-direction: column; line-height: 1.3; }
/* Der Seiten-Bereich (Notizen, Content, Apps …) füllt den freien Platz der Spalte; lange Listen scrollen darin */
.dg-tools > .panel-glass:has(#panel) { flex: 1 1 auto; min-height: 250px; display: flex; flex-direction: column; }
.dg-tools #panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.device-grid #clist { flex: 1 1 auto; min-height: 60px; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }

/* Auswahl-Leiste auf dem Handy: ganz sichtbar, bricht um */
@media (max-width: 760px) { .bulkbar { left: 12px !important; right: 12px; transform: none !important; flex-wrap: wrap; justify-content: center; max-width: none !important; } }

/* QA Runde 1: Handy-Seite */
.dg-tools #panel > .panel-inner { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.device-grid .panel-glass .row.wrap { gap: 5px; }
.device-grid .panel-glass .row.wrap button.sm { padding: 6px 8px; font-size: 12.5px; }
.ic-card, .ic-card .small, #icloud .muted { overflow-wrap: anywhere; }
@media (min-width: 861px) { .dg-tools { padding-bottom: 24px; } }   /* Schatten unten nicht abschneiden */
@media (max-width: 860px) { .device-grid .side-tabs { position: static; flex-direction: row; margin-bottom: 10px; width: max-content; max-width: 100%; } .device-grid { padding: 0 2px; } }

/* QA Runde 2: Rahmen, Login, Team, Analytics, Instagram, API */
.side-backdrop { display: none; }
@media (max-width: 760px) {
  .side-backdrop.on { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(15, 18, 25, .38); backdrop-filter: blur(1px); }
  .mobile-bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
}
.mini-item .grow { min-width: 0; overflow-wrap: anywhere; }
.mini-item > .faint.small { flex: none; white-space: nowrap; }
#farm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
a.btn { font: inherit; color: inherit; text-decoration: none; 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; }
a.btn:hover { background: var(--panel-2); }
.palette-list .it { scroll-margin: 6px; }
.modal-card > .modal-foot { position: sticky; bottom: 0; background: var(--panel); padding-top: 12px; z-index: 1; }
.heat-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  .page-head .row, .card-head > .row { flex-wrap: wrap; max-width: 100%; }
  .card-head > * { min-width: 0; max-width: 100%; }
  .seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .seg button { flex: none; }
  .heat { min-width: 560px; }
  .page-head input#q { width: 100% !important; }
}

/* QA Runde 1 (Lead): laufende Knöpfe pulsieren, Builder-Palette */
.device-grid .sq.busy .box { animation: jp-busy 1s ease-in-out infinite; }
@keyframes jp-busy { 50% { opacity: .55; transform: scale(.97); } }
.palette button { display: flex; align-items: center; gap: 6px; }
.palette .ai { flex: none; margin-left: auto; }

/* Tablet-Breite (≤1000px): Tabellen, Heatmap und Chips scrollen in sich statt die Seite zu verbreitern */
@media (max-width: 1000px) {
  .table-wrap, .heatmap, .card-body:has(> .heatmap) { max-width: 100%; overflow-x: auto; }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .chips { flex-wrap: wrap; }
  .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main.page { overflow-x: hidden; }
}

/* Runde 2: lange Ordner-Chips, Vorschau-Fuß auf dem Handy, MultiView bei Tablet-Breite */
.chips .chip, .folder-chips button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .modal .modal-foot, .modal-card .foot { flex-wrap: wrap; } }
.mv-wrap .mv-grid { grid-template-columns: repeat(auto-fill, minmax(min(var(--mv, 170px), 100%), var(--mv, 170px))) !important; min-width: 0; }
@media (max-width: 1000px) { .mv-wrap #masterbox { order: -1; } }
/* Runde 2: Auswahl-Leiste bricht um, Übersicht auf dem Handy */
.bulkbar { flex-wrap: wrap; }
@media (max-width: 860px) { .bulkbar { left: 12px !important; right: 12px; transform: none !important; justify-content: center; max-width: none !important; } }
@media (max-width: 640px) { .tile, .tile * { min-width: 0; overflow-wrap: anywhere; } .tile .pill, .card-head .pill { white-space: normal; } .card-head { flex-wrap: wrap; } }
/* Builder-Palette: AI-Kennzeichen nicht abschneiden */
.b-pal button { display: flex; align-items: center; gap: 6px; min-width: 0; }
.b-pal button .ai { flex: none; margin-left: auto; font-size: 10px; padding: 1px 6px; }
.b-pal { overflow-x: hidden; }

/* Runde 3 (UI): Label/Slot-Chip, Übersicht-Usage, Konten auf dem Handy, Aufgaben-Layout, Tab-Leisten, Tablet-Seitenleiste */
.chip.slot-chip { display: inline-block; vertical-align: 1px; font-size: 11px; line-height: 16px; padding: 0 6px; margin-left: 4px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--accent-2); color: var(--accent); border-color: transparent; font-weight: 500; }
.phone-card .small .chip.slot-chip { margin-left: 0; max-width: 100%; }
.usage-body > div { min-width: 0; }
.usage-body .row.between { flex-wrap: wrap; gap: 2px 10px; }
.usage-body .table-wrap { max-width: 100%; overflow-x: auto; }
.acc-move { display: none; }
button.icon.acc-move { width: 26px; height: 26px; padding: 0; margin: -4px -6px -4px 0; }
@media (max-width: 760px), (pointer: coarse) { .acc-move { display: inline-flex; } }
@media (max-width: 760px) {
  .stage-cols { grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .stage-col { min-height: 0; }
  .stage-col h4 { position: sticky; top: 52px; z-index: 2; background: var(--panel-2); margin: -10px -10px 8px; padding: 12px 14px 8px; border-radius: 14px 14px 0 0; }
}
.task-grid { grid-template-areas: "form phones" "go phones"; grid-template-rows: auto 1fr; }
.task-grid > .tg-form { grid-area: form; min-width: 0; }
.task-grid > .tg-phones { grid-area: phones; min-width: 0; }
.task-grid > .tg-go { grid-area: go; align-self: start; }
@media (max-width: 1000px) { .task-grid { grid-template-areas: "form" "phones" "go"; grid-template-rows: auto; } }
@media (max-width: 760px) {
  .tabs, .seg { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; max-width: 100%; }
  .tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
  .tabs button, .seg button { flex: none; white-space: nowrap; }
}
/* Fade rechts nur, wenn die Leiste wirklich überläuft und noch nicht am Ende ist (scroll-getriebene Animation). */
@supports (animation-timeline: scroll(self inline)) {
  @keyframes jp-tabfade { from, 96% { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); } to { -webkit-mask-image: none; mask-image: none; } }
  @media (max-width: 760px) { .tabs, .seg { animation: jp-tabfade linear both; animation-timeline: scroll(self inline); } }
}
@supports not (animation-timeline: scroll(self inline)) {
  @media (max-width: 760px) { .tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); } }
}
@media (min-width: 761px) and (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 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); }
  :where(.mobile-bar) { display: flex !important; }   /* :where: in JP Remote eingebettet gewinnt das Ausblenden aus boot.js */
  .mobile-bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .side-backdrop.on { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(15, 18, 25, .38); backdrop-filter: blur(1px); }
  .bulkbar { left: 50%; max-width: calc(100vw - 32px); }
}
@media (max-width: 640px) { .usage-body table.t { width: 100%; } .usage-body table.t td { padding-left: 4px; padding-right: 4px; } .usage-body table.t td:first-child { white-space: nowrap; padding-left: 0; } .usage-body table.t td:last-child { padding-right: 0; } }
.chip.slot-chip { vertical-align: 2px; }

/* r4 QA (agent 61): Schublade, Tastatur, Touch, lange Namen */
.side-close { display: none; }
@media (max-width: 1024px) {
  .side .brand .side-close { display: inline-flex; margin-left: auto; }
  .side .brand b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.side-open { overflow: hidden; }
}
@media (pointer: coarse) { .search-btn .kbd { display: none; } }
.pop .mi .mi-check { display: inline-block; width: 14px; margin-left: 8px; text-align: right; color: var(--accent); font-weight: 700; }
.pop .mi:focus-visible, .me:focus-visible, .phone-card:focus-visible, .palette-list .it:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pop .mi:focus { background: var(--panel-2); outline: none; }
.me:focus-visible { outline-offset: 0; }
.member-cell { min-width: 0; max-width: 280px; overflow-wrap: anywhere; }
.rc-members, .role-card b { overflow-wrap: anywhere; }
.pill.wrap-pill { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.log.code { white-space: pre; overflow-x: auto; }
/* Meldungen nie über Knöpfen: durchklickbar, nur Knöpfe in der Meldung reagieren */
.toast { pointer-events: none; }
.toast button, .toast a { pointer-events: auto; }
/* Glocke: lange Fehlertexte (z. B. xcrun-Ausgabe) nur zwei Zeilen, der volle Text steht im Tooltip */
.bell-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* Übersicht auf dem Handy: bricht ein Pill doch einmal um, sieht es wie ein Schild aus, nicht wie eine Blase */
@media (max-width: 640px) { .tile .foot .pill { border-radius: 8px; } }

/* Safari: Vorsilben (Pruefung 27.10.2026) */
.modal { -webkit-backdrop-filter: blur(2px); }
.side-backdrop.on { -webkit-backdrop-filter: blur(1px); }
.live { -webkit-user-select: none; }
