/* ShopKings OS – Designsystem (Apple-inspiriert) */
@font-face { font-family: Montserrat; src: url(../fonts/montserrat-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Montserrat; src: url(../fonts/montserrat-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: Montserrat; src: url(../fonts/montserrat-latin-900-normal.woff2) format('woff2'); font-weight: 900; font-display: swap; }

/* ============================================================ Tokens */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f5f5f7; --bg2: #ececf0; --surface: #ffffff; --surface2: #f2f2f5; --surface3: #e8e8ed;
  --text: #1d1d1f; --text2: #6e6e73; --text3: #a1a1a6;
  --line: rgba(0, 0, 0, .08); --line2: rgba(0, 0, 0, .14);
  --accent: #ff2d55; --accent-soft: rgba(255, 45, 85, .1); --accent-text: #e11d48;
  --blue: #0a84ff; --green: #30d158; --orange: #ff9f0a; --purple: #bf5af2; --teal: #40c8e0; --yellow: #ffd60a; --indigo: #5e5ce6;
  --grad: linear-gradient(135deg, #ff2d55 0%, #ff6a3d 55%, #ffb340 100%);
  --glass: rgba(255, 255, 255, .72); --glass-line: rgba(0, 0, 0, .06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .02);
  --shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .07);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .1), 0 30px 80px rgba(0, 0, 0, .14);
  --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-xl: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --is-dark: 1; } }
:root[data-theme=dark], .dark-scope {
  --bg: #000000; --bg2: #0b0b0d; --surface: #1c1c1e; --surface2: #2c2c2e; --surface3: #3a3a3c;
  --text: #f5f5f7; --text2: #98989d; --text3: #636366;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .16);
  --accent-soft: rgba(255, 55, 95, .16); --accent-text: #ff6482;
  --glass: rgba(28, 28, 30, .72); --glass-line: rgba(255, 255, 255, .08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #000000; --bg2: #0b0b0d; --surface: #1c1c1e; --surface2: #2c2c2e; --surface3: #3a3a3c;
    --text: #f5f5f7; --text2: #98989d; --text3: #636366;
    --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .16);
    --accent-soft: rgba(255, 55, 95, .16); --accent-text: #ff6482;
    --glass: rgba(28, 28, 30, .72); --glass-line: rgba(255, 255, 255, .08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .35);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ============================================================ Basis */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.47 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--blue); text-decoration: none; }
::selection { background: var(--accent-soft); }
.ico { flex: 0 0 auto; display: block; }
.muted { color: var(--text2); }
.small { font-size: 13px; }
.boot { display: grid; place-items: center; height: 100vh; }
.boot::after { content: ''; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand { font-weight: 700; letter-spacing: -.02em; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; font-size: 18px; box-shadow: 0 4px 12px rgba(255, 45, 85, .35); flex: 0 0 auto; }

/* ============================================================ Buttons & Eingaben */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: var(--surface2); color: var(--text);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight: 590; font-size: 14px; white-space: nowrap; transition: transform .18s var(--ease), background .18s, opacity .18s, box-shadow .18s; }
.btn:hover { background: var(--surface3); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(255, 45, 85, .3); }
.btn.primary:hover { background: #ff1a47; }
.btn.grad { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(255, 45, 85, .32); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface2); }
.btn.danger { color: #ff3b30; }
.btn.danger:hover { background: rgba(255, 59, 48, .12); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.icon { padding: 8px; border-radius: 50%; min-width: 36px; height: 36px; }
.btn.icon.sm { min-width: 30px; height: 30px; padding: 6px; }
.btn.big { padding: 13px 24px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.on { background: var(--accent-soft); color: var(--accent-text); }

input[type=text], input[type=password], input[type=number], input[type=email], input[type=date], select, textarea {
  width: 100%; background: var(--surface2); border: 1px solid transparent; border-radius: 12px; padding: 10px 13px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
textarea { resize: vertical; min-height: 64px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input[type=color] { width: 42px; height: 36px; border: 0; border-radius: 10px; background: none; padding: 0; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 1px solid var(--line2); border-radius: 10px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; }
label.field { display: block; margin: 12px 0; }
label.field > span, .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 9px; margin: 10px 0; cursor: pointer; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row > .auto { flex: 0 0 auto; }
.hint { font-size: 13px; color: var(--text2); background: var(--surface2); padding: 11px 13px; border-radius: 12px; margin: 10px 0; line-height: 1.5; }
.hint.warn { background: rgba(255, 159, 10, .14); color: #c27400; }
:root[data-theme=dark] .hint.warn, .dark-scope .hint.warn { color: #ffb340; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.chip { font-size: 12.5px; padding: 6px 11px; border-radius: 999px; background: var(--surface2); cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.chip:hover { background: var(--accent-soft); color: var(--accent-text); }
.chip:active { transform: scale(.95); }
.chip.emoji { font-size: 17px; padding: 4px 9px; }
.err { color: #ff3b30; font-weight: 500; min-height: 22px; margin-top: 8px; font-size: 14px; }
kbd { background: var(--surface2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; font-size: 12px; font-family: inherit; }

/* Schalter (iOS) */
.sw { position: relative; width: 46px; height: 28px; flex: 0 0 auto; cursor: pointer; display: inline-block; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface3); transition: background .25s var(--ease); pointer-events: none; }
.sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s var(--spring); }
.sw input:checked + i { background: var(--green); }
.sw input:checked + i::after { transform: translateX(18px); }
.sw input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }
.sw-ph { width: 46px; flex: 0 0 auto; }

/* Segmented Control */
.segmented { display: inline-flex; background: var(--surface2); border-radius: 11px; padding: 3px; gap: 2px; position: relative; }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 590; font-size: 13px; color: var(--text2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 .5px var(--line); }

/* ============================================================ App-Rahmen */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-right: 1px solid var(--glass-line); z-index: 30; }
.side .head { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); }
.side .head .brand { font-size: 16px; line-height: 1.15; }
.side .head small { display: block; color: var(--text2); font-size: 11.5px; font-weight: 500; }
.side .sec { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; padding: 14px 12px 6px; }
.nav-i { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: 14.5px; transition: background .15s, transform .15s var(--ease); position: relative; }
.nav-i:hover { background: var(--surface2); }
.nav-i:active { transform: scale(.98); }
.nav-i .ni { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.nav-i.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-i .badge { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--text2); background: var(--surface2); border-radius: 999px; padding: 2px 7px; }
.side .spacer { flex: 1; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; }
.side .me:hover { background: var(--surface2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; text-transform: uppercase; font-size: 14px; flex: 0 0 auto; }
.side .me b { font-size: 14px; text-transform: capitalize; }
.side .me small { display: block; color: var(--text2); font-size: 12px; }
.main { min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 34px 36px 90px; animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.ptitle { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.ptitle h1 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.ptitle .sub { color: var(--text2); font-size: 15px; margin-top: 6px; }
.ptitle .acts { display: flex; gap: 8px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 40px 0 14px; display: flex; align-items: center; gap: 10px; }
h2 .more { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--blue); }
h2:first-child { margin-top: 0; }

/* Mobile Tabbar */
.tabbar { display: none; }
.mtop { display: none; }

/* ============================================================ Karten & Bausteine */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm), 0 0 0 .5px var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.stagger > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.empty { padding: 36px 20px; text-align: center; color: var(--text2); background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 0 0 .5px var(--line); }
.empty .ico { margin: 0 auto 10px; color: var(--text3); }

/* Home */
.hero { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.hero-main { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px; color: #fff; background: var(--grad); min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; box-shadow: 0 16px 40px rgba(255, 45, 85, .28); transition: transform .35s var(--spring), box-shadow .3s; }
.hero-main:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 22px 50px rgba(255, 45, 85, .36); }
.hero-main:active { transform: scale(.985); }
.hero-main::before { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; right: -70px; top: -90px; background: rgba(255, 255, 255, .16); }
.hero-main::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: 60px; bottom: -110px; background: rgba(255, 255, 255, .1); }
.hero-main h3 { font-size: 24px; margin: 0; letter-spacing: -.02em; position: relative; z-index: 1; }
.hero-main p { margin: 6px 0 0; opacity: .9; position: relative; z-index: 1; max-width: 300px; }
.hero-main .go { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .22); backdrop-filter: blur(10px); padding: 9px 16px; border-radius: 999px; font-weight: 600; align-self: flex-start; }
.qa { border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; min-height: 190px; transition: transform .35s var(--spring), box-shadow .3s; }
.qa:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.qa:active { transform: scale(.98); }
.qa .qi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.qa h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.qa p { margin: 4px 0 0; color: var(--text2); font-size: 13.5px; }
.qa .thumb { width: 100%; height: 72px; border-radius: 12px; background: var(--surface2) center/cover no-repeat; margin-bottom: 10px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.stat { padding: 18px 20px; }
.stat .k { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: 13px; font-weight: 500; }
.stat .k .ico { color: var(--c, var(--accent)); }
.stat .v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 15px; color: var(--text2); font-weight: 600; margin-left: 3px; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.app-tile { padding: 20px; display: flex; gap: 16px; align-items: flex-start; cursor: pointer; transition: transform .35s var(--spring), box-shadow .3s; position: relative; }
.app-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.app-tile:active { transform: scale(.98); }
.app-tile .ai { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .25), 0 6px 16px rgba(0, 0, 0, .12); }
.app-tile h3 { margin: 2px 0 3px; font-size: 16.5px; letter-spacing: -.01em; }
.app-tile p { margin: 0; font-size: 13px; color: var(--text2); line-height: 1.45; }
.app-tile .soon { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface2); color: var(--text2); }
.scroller { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: 0 0 auto; }

/* Projekte */
.proj { width: 100%; cursor: pointer; position: relative; transition: transform .35s var(--spring); }
.scroller .proj { width: 168px; }
.proj:hover { transform: translateY(-4px); }
.proj:active { transform: scale(.97); }
.proj .th { aspect-ratio: 9/16; border-radius: var(--r); background: var(--surface2) center/cover no-repeat; box-shadow: var(--shadow-sm), 0 0 0 .5px var(--line); display: grid; place-items: center; color: var(--text3); overflow: hidden; transition: box-shadow .3s; }
.proj:hover .th { box-shadow: var(--shadow); }
.proj .meta { padding: 9px 2px 0; }
.proj .meta b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj .meta span { font-size: 12.5px; color: var(--text2); }
.proj .pacts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: .2s var(--ease); }
.proj:hover .pacts { opacity: 1; transform: none; }
.proj .pacts .btn { background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (hover: none) { .proj .pacts { opacity: 1; transform: none; } }
.pgrid { display: grid; gap: 20px 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* Vorlagen */
.tpl { padding: 0; cursor: pointer; text-align: left; border: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--spring), box-shadow .3s; color: var(--text); }
.tpl:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tpl:active { transform: scale(.98); }
.tpl .prev { height: 150px; display: grid; place-items: center; background: linear-gradient(160deg, var(--surface2), var(--bg2)); }
.tpl .body { padding: 14px 16px 16px; }
.tpl h3 { margin: 0 0 4px; font-size: 15.5px; letter-spacing: -.01em; }
.tpl p { margin: 0; color: var(--text2); font-size: 13px; line-height: 1.45; }
.phone { width: 62px; height: 112px; border-radius: 12px; border: 3px solid var(--text); overflow: hidden; display: grid; position: relative; background: #000; box-shadow: var(--shadow); transition: transform .4s var(--spring); }
.tpl:hover .phone { transform: rotate(-4deg) scale(1.06); }
.phone i { display: block; }
.phone .pip { position: absolute; width: 22px; height: 22px; border-radius: 50%; top: 9px; right: 6px; border: 2px solid #fff; }

/* Mediathek */
.drop { border: 2px dashed var(--line2); border-radius: var(--r-lg); padding: 30px 20px; text-align: center; background: var(--surface); transition: border-color .2s, background .2s, transform .3s var(--spring); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.drop .di { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 12px; }
.drop p { margin: 0 0 14px; }
.drop p b { display: block; font-size: 16px; margin-bottom: 2px; }
.uploads { margin-top: 12px; display: grid; gap: 8px; }
.up { display: flex; gap: 12px; align-items: center; font-size: 13px; background: var(--surface); padding: 10px 14px; border-radius: 12px; box-shadow: 0 0 0 .5px var(--line); animation: rise .35s var(--ease) both; }
.up .bar { flex: 1; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.up .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s var(--ease); border-radius: 3px; }
.mgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mitem { position: relative; cursor: pointer; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 .5px var(--line); transition: transform .3s var(--spring), box-shadow .3s; }
.mitem:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mitem .th { aspect-ratio: 9/16; background: var(--surface2) center/cover no-repeat; display: grid; place-items: center; font-size: 30px; }
.mitem .info { padding: 8px 10px 4px; font-size: 12.5px; }
.mitem .info b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.mitem .info .muted { font-size: 12px; }
.mitem .dur { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); color: #fff; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.mitem.sel { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.mitem.sel::after { content: attr(data-n); position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; animation: pop .3s var(--spring); }
@keyframes pop { from { transform: scale(0); } }
.mitem .acts { display: flex; gap: 2px; padding: 2px 6px 8px; }
.mitem .acts .btn { flex: 1; padding: 6px; background: transparent; color: var(--text2); }
.mitem .acts .btn:hover { background: var(--surface2); color: var(--text); }
.mitem .acts .btn.danger:hover { color: #ff3b30; }

/* Listen (iOS-Einstellungen) */
.list { background: var(--surface); border-radius: var(--r); box-shadow: 0 0 0 .5px var(--line); overflow: hidden; margin-bottom: 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; position: relative; }
.li + .li::before { content: ''; position: absolute; top: 0; left: 56px; right: 0; height: .5px; background: var(--line2); }
.li.noicon + .li::before, .li.noicon::before { left: 16px; }
.li .lii { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.li .lt { flex: 1; min-width: 0; }
.li .lt b { font-weight: 500; display: block; }
.li .lt small { color: var(--text2); font-size: 12.5px; }
.li input[type=text], .li input[type=password], .li select { max-width: 260px; }
.li.click { cursor: pointer; transition: background .15s; }
.li.click:hover { background: var(--surface2); }
.lhead { font-size: 13px; color: var(--text2); padding: 22px 16px 7px; font-weight: 500; }
.lfoot { font-size: 12.5px; color: var(--text2); padding: 4px 16px 0; }
.settings { max-width: 680px; }

/* Bald verfügbar */
.soon-page { max-width: 640px; margin: 30px auto; text-align: center; }
.soon-page .big-ic { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; color: #fff; margin: 0 auto 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.soon-page h1 { font-size: 32px; margin: 0 0 8px; letter-spacing: -.025em; }
.soon-page .features { text-align: left; margin-top: 26px; }
.soon-page .features .li .ico { color: var(--accent); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }

/* ============================================================ Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.auth::before, .auth::after { content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: blob 18s ease-in-out infinite alternate; }
.auth::before { width: 520px; height: 520px; background: #ff2d55; top: -160px; left: -120px; }
.auth::after { width: 460px; height: 460px; background: #ff9f0a; bottom: -160px; right: -100px; animation-delay: -6s; }
@keyframes blob { to { transform: translate(60px, 40px) scale(1.15); } }
.auth .card { width: min(400px, 100%); padding: 36px 32px 30px; position: relative; z-index: 1; background: var(--glass); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-lg), 0 0 0 .5px var(--glass-line); animation: rise .6s var(--ease) both; }
.auth .logo { width: 64px; height: 64px; border-radius: 18px; font-size: 32px; margin: 0 auto 18px; }
.auth h1 { margin: 0 0 6px; font-size: 26px; text-align: center; letter-spacing: -.02em; }
.auth .sub { text-align: center; color: var(--text2); margin: 0 0 22px; }

/* ============================================================ Modal, Alert, Toast */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .25s var(--ease); }
.modal-bg.out { animation: fadeOut .2s var(--ease) forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal { background: var(--surface); color: var(--text); border-radius: var(--r-xl); width: min(860px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: sheetIn .45s var(--spring); }
.modal-bg.out .modal { animation: sheetOut .2s var(--ease) forwards; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal.narrow { width: min(460px, 100%); }
.modal header { padding: 18px 20px 12px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.modal .mb { padding: 4px 20px 18px; overflow-y: auto; }
.modal footer { padding: 14px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.modal h4 { font-size: 13px; color: var(--text2); font-weight: 600; margin: 18px 0 10px; }
.alert { text-align: center; width: min(320px, 100%) !important; }
.alert header { justify-content: center; padding-bottom: 4px; }
.alert header .btn { display: none; }
.alert .mb { color: var(--text2); font-size: 14px; }
.alert footer { padding: 0; gap: 0; border-top: .5px solid var(--line2); flex-wrap: nowrap; }
.alert footer .btn { flex: 1; border-radius: 0; background: transparent; box-shadow: none; padding: 14px; font-size: 16px; color: var(--blue); }
.alert footer .btn + .btn { border-left: .5px solid var(--line2); }
.alert footer .btn.primary { color: #ff3b30; font-weight: 600; }
.alert footer .btn:hover { background: var(--surface2); }
.progress { height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; margin: 16px 0 8px; }
.progress i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .3s var(--ease); border-radius: 4px; }
.result video { width: 100%; max-height: 52vh; background: #000; border-radius: var(--r); }
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--glass); color: var(--text); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); padding: 11px 18px 11px 14px; border-radius: 999px; box-shadow: var(--shadow-lg), 0 0 0 .5px var(--glass-line); font-weight: 500; font-size: 14px; animation: toastIn .5s var(--spring); max-width: min(560px, 92vw); pointer-events: auto; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .ti { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--text3); flex: 0 0 auto; }
.toast.ok .ti { background: var(--green); }
.toast.err .ti { background: #ff3b30; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-24px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px) scale(.95); } }

/* ============================================================ Editor (immer dunkel, wie Profi-Software) */
.editor { --bg: #0e0e10; --surface: #1c1c1e; --surface2: #2a2a2d; --surface3: #3a3a3c; --text: #f5f5f7; --text2: #98989d; --text3: #636366;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14); --accent-soft: rgba(255, 55, 95, .18); --accent-text: #ff6482; --glass: rgba(28, 28, 30, .75); --glass-line: rgba(255, 255, 255, .08);
  color-scheme: dark; color: var(--text); background: var(--bg);
  display: grid; grid-template-columns: 330px 1fr 370px; grid-template-rows: 56px 1fr; height: 100vh; overflow: hidden; animation: fade .35s var(--ease); }
.ed-top { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; padding: 0 12px; background: var(--glass); backdrop-filter: blur(24px); border-bottom: 1px solid var(--line); }
.ed-top .name { max-width: 320px; font-weight: 650; font-size: 15px; background: transparent; border-color: transparent; }
.ed-top .name:hover { background: var(--surface2); }
.save-state { font-size: 12.5px; color: var(--text2); display: inline-flex; align-items: center; gap: 6px; }
.save-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.save-state.dirty::before { background: var(--orange); }
.col { overflow-y: auto; overflow-x: hidden; height: calc(100vh - 56px); scrollbar-width: thin; scrollbar-color: var(--surface3) transparent; }
.col.left { padding: 14px; background: var(--bg); border-right: 1px solid var(--line); transition: background .2s; }
.col.right { background: var(--bg); border-left: 1px solid var(--line); }
.col.center { display: flex; flex-direction: column; align-items: center; padding: 16px; gap: 10px; background: radial-gradient(ellipse at 50% 20%, #1e1e24, #0a0a0c 70%); }
.col.left.over { box-shadow: inset 0 0 0 3px var(--accent); background: rgba(255, 45, 85, .06); }
.stage { position: relative; height: calc(100vh - 56px - 160px); aspect-ratio: 9/16; max-width: 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); background: #000; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage-hint { font-size: 12px; color: var(--text2); }
.controls { display: flex; gap: 12px; align-items: center; justify-content: center; width: min(560px, 100%); }
.controls .time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text2); min-width: 110px; }
.playbtn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: #000; font-size: 16px; cursor: pointer; font-weight: 900; flex: 0 0 auto; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); transition: transform .25s var(--spring); }
.playbtn:hover { transform: scale(1.06); }
.playbtn:active { transform: scale(.94); }
.timebar { position: relative; width: min(600px, 100%); background: var(--surface); border-radius: 14px; padding: 8px; cursor: pointer; user-select: none; box-shadow: 0 0 0 1px var(--line); }
.tb-inner { position: relative; }
.timebar .lane { position: relative; height: 24px; margin: 2px 0; overflow: hidden; }
.timebar .blk { position: absolute; top: 0; bottom: 0; border-radius: 7px; font-size: 10.5px; font-weight: 700; color: #000; padding: 0 7px; overflow: hidden; white-space: nowrap; line-height: 24px; border: 1px solid rgba(0, 0, 0, .3); transition: filter .15s; }
.timebar .blk:hover { filter: brightness(1.1); }
.timebar .blk.sel { box-shadow: inset 0 0 0 2px #fff; z-index: 2; }
.timebar .lane.el { height: 16px; margin: 3px 0 0; }
.timebar .eblk { position: absolute; top: 0; bottom: 0; border-radius: 5px; font-size: 10px; font-weight: 600; color: var(--text); padding: 0 6px; overflow: hidden; white-space: nowrap; line-height: 16px; background: var(--surface3); cursor: pointer; }
.timebar .eblk.sel { background: rgba(10, 132, 255, .5); box-shadow: inset 0 0 0 1px var(--blue); }
.timebar .ph { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .8); pointer-events: none; z-index: 3; border-radius: 1px; }
.timebar .ph::before { content: ''; position: absolute; top: -4px; left: -5px; width: 12px; height: 8px; border-radius: 3px; background: #fff; }

.stepn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.seg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.seg-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.addrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.addrow .btn { border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--c, var(--line2)); background: var(--surface); }
.segtools { display: flex; gap: 6px; margin-bottom: 12px; }
.segtools .btn { flex: 1; border-radius: 10px; }
.seg { background: var(--surface); border-radius: 14px; margin-bottom: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s, transform .2s var(--ease); animation: rise .35s var(--ease) both; }
.seg.sel { box-shadow: 0 0 0 2px var(--accent); }
.seg .sh { display: flex; gap: 10px; align-items: center; padding: 8px; cursor: pointer; }
.seg .st { width: 36px; height: 60px; border-radius: 8px; background: var(--surface2) center/cover; flex: 0 0 auto; position: relative; }
.seg .num { position: absolute; bottom: 3px; left: 3px; font-size: 10px; background: rgba(0, 0, 0, .7); border-radius: 5px; padding: 0 5px; font-weight: 700; color: #fff; }
.seg .sm { flex: 1; min-width: 0; }
.seg .sm b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg .sm span { font-size: 12px; color: var(--text2); }
.seg .sm i { color: var(--orange); font-style: normal; }
.trk { font-size: 12px; font-weight: 800; border-radius: 8px; width: 28px; height: 28px; color: #000; border: 0; cursor: pointer; flex: 0 0 auto; transition: transform .2s var(--spring); }
.trk:active { transform: scale(.88); }
.seg .sb { padding: 2px 12px 12px; animation: fade .25s var(--ease); }
.seg .sb .vals { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text2); font-variant-numeric: tabular-nums; }
.seg .tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.seg .tools .btn { flex: 0 0 auto; }
.updown { display: flex; flex-direction: column; gap: 2px; }
.updown button { padding: 0 6px; font-size: 9px; line-height: 15px; border-radius: 5px; background: var(--surface2); border: 0; cursor: pointer; color: var(--text2); }
.updown button:hover { color: var(--text); }
.updown button:disabled { opacity: .25; cursor: default; }
.seg-role { display: flex; gap: 6px; margin: 8px 0 2px; }
.seg-role button { flex: 1; padding: 8px 6px; border-radius: 10px; border: 0; background: var(--surface2); cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: .2s; }
.seg-role button.on { color: var(--text); box-shadow: inset 0 0 0 2px var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface2)); }
.seg-role.big button { padding: 12px; text-align: left; white-space: normal; }
.seg-role.big b { display: block; font-size: 14px; color: var(--text); }
.seg-role.big small { font-weight: 500; }
.trim label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text2); margin: 4px 0; }
.trim label input { flex: 1; }
details.more { margin: 10px 0; border-radius: 12px; padding: 0 12px; background: var(--surface2); }
details.more > summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--text2); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '›'; display: inline-block; margin-right: 6px; transition: transform .2s; font-weight: 700; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more[open] { padding-bottom: 10px; }
.field span small { font-weight: 500; color: var(--text3); }

.rtabs { padding: 10px 12px; position: sticky; top: 0; background: var(--glass); backdrop-filter: blur(20px); z-index: 2; border-bottom: 1px solid var(--line); display: flex; }
.rtabs .segmented { width: 100%; }
.rtabs .segmented button { flex: 1; }
.rbody { padding: 4px 14px 40px; }
.rbody h4 { margin: 22px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); font-weight: 600; }
.el-head { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 12px; }
.el-head b { display: block; font-size: 15px; }
.accs { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.acc { background: var(--surface); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; min-width: 0; }
.acc.open { box-shadow: 0 0 0 2px var(--accent); }
.acc.off .acc-ic, .acc.off .acc-t { opacity: .4; }
.acc-h { display: flex; align-items: center; gap: 11px; padding: 10px 12px; cursor: pointer; user-select: none; border-radius: 14px; transition: background .15s; }
.acc-h:hover { background: var(--surface2); }
.acc-ic { font-size: 18px; width: 24px; text-align: center; flex: 0 0 auto; }
.acc-t { flex: 1; min-width: 0; }
.acc-t b { display: block; font-size: 14px; font-weight: 600; }
.acc-t small { display: block; color: var(--text2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--text3); transition: transform .25s var(--ease); }
.acc.open .chev { transform: rotate(90deg); }
.acc-b { padding: 2px 12px 12px; animation: fade .25s var(--ease); }
.addtext { width: 100%; margin-top: 10px; border-radius: 14px; padding: 12px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line2); }
.addtext:hover { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); }
.quick { margin-top: 10px; }
.trange { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 10px 0 4px; }
.trange > label > span { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.tin { display: flex; gap: 4px; }
.tin input { min-width: 0; }
.tin input:disabled { opacity: .4; }
.check.small { font-size: 13px; margin: 4px 0 8px; }
.pthumb { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex: 0 0 auto !important; }
.persona { background: var(--surface); border-radius: 14px; padding: 10px 12px; margin: 8px 0; box-shadow: 0 0 0 1px var(--line); }
.layouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.layouts button { background: var(--surface); border: 0; border-radius: 12px; padding: 10px 4px; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--text2); display: flex; flex-direction: column; align-items: center; gap: 7px; box-shadow: 0 0 0 1px var(--line); transition: .2s; }
.layouts button:hover { color: var(--text); }
.layouts button.on { box-shadow: 0 0 0 2px var(--accent); color: var(--text); }
.mini { width: 26px; height: 44px; border: 2px solid currentColor; border-radius: 6px; position: relative; overflow: hidden; }
.mini i { position: absolute; background: currentColor; opacity: .55; }
.chunk { display: flex; gap: 6px; align-items: center; margin: 5px 0; }
.chunk .btn { min-width: 52px; font-variant-numeric: tabular-nums; }
.chunk input { padding: 7px 9px; font-size: 13px; }
.help { padding-left: 20px; line-height: 1.6; }
.help li { margin-bottom: 8px; }
.keys { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.keys td { padding: 6px 4px; border-bottom: .5px solid var(--line2); }

/* ============================================================ Responsive */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-main { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .editor { grid-template-columns: 300px 1fr; grid-template-rows: auto; height: auto; overflow: visible; }
  .col { height: auto; }
  .col.right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .stage { height: 70vh; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mtop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-bottom: .5px solid var(--glass-line); }
  .mtop .brand { font-size: 16px; flex: 1; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-top: .5px solid var(--glass-line); padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--text3); padding: 4px 0; transition: transform .2s var(--spring), color .2s; }
  .tabbar a:active { transform: scale(.9); }
  .tabbar a.on { color: var(--accent); }
  .page { padding: 20px 16px 110px; }
  .ptitle h1 { font-size: 30px; }
  .hero { grid-template-columns: 1fr; }
  .qa { min-height: auto; flex-direction: row; align-items: center; gap: 14px; justify-content: flex-start; }
  .qa .thumb { display: none; }
  .stats { gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 24px; }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .mgrid { grid-template-columns: repeat(2, 1fr); }
  .li input[type=text], .li input[type=password], .li select { max-width: 55%; }
  .modal-bg { place-items: end center; padding: 0; }
  .modal { border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; width: 100% !important; padding-bottom: env(safe-area-inset-bottom); animation: sheetUp .45s var(--spring); }
  .modal.alert { border-radius: var(--r-xl); margin-bottom: 30vh; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
}
@media (max-width: 720px) {
  .editor { grid-template-columns: 1fr; }
  .col.center { order: -1; }
  .ed-top { order: -2; flex-wrap: wrap; height: auto; padding: 8px 10px; }
  .stage { height: auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Feinschliff */
.side .me { color: var(--text); }
.app-tile .soon { position: static; display: inline-block; margin-top: 8px; }
.rtabs .segmented button { padding: 7px 6px; white-space: nowrap; font-size: 12.5px; }
.phone .bar { position: absolute; left: 8px; right: 8px; top: 22px; height: 12px; border-radius: 4px; background: #fff; }
.phone .bar2 { position: absolute; left: 8px; width: 34px; bottom: 16px; height: 10px; border-radius: 4px; background: #ffd60a; }

/* ============================================================ Handy-Optimierung */
/* Datei-Auswahl: unsichtbar, aber für iOS weiterhin antippbar */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.drop label.btn { position: relative; }
/* Upload-Zeilen mit Status */
.up .upn { flex: 0 1 46%; min-width: 0; display: flex; flex-direction: column; }
.up .upn b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up .ups { color: var(--text2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up.fail { box-shadow: 0 0 0 1px rgba(255, 59, 48, .5); }
.up.fail .ups { color: #ff3b30; white-space: normal; }
.up.ok .bar i { background: var(--green); }
.up .pct { min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.drop p span { display: block; }

/* Korrekte Bildschirmhöhe auf dem iPhone (Adressleiste ein/aus) */
@supports (height: 100dvh) {
  .side { height: 100dvh; }
  .editor { height: 100dvh; }
  .col { height: calc(100dvh - 56px); }
  .stage { height: calc(100dvh - 56px - 160px); }
}

/* Touch-Geräte: keine „hängenbleibenden“ Hover-Effekte, Eingaben ohne Auto-Zoom */
@media (hover: none) {
  .hero-main:hover, .qa:hover, .app-tile:hover, .proj:hover, .tpl:hover, .mitem:hover, .playbtn:hover { transform: none; }
  .tpl:hover .phone { transform: none; }
  .btn:hover { background: var(--surface2); }
  .btn.primary:hover { background: var(--accent); }
}
@media (max-width: 820px), (pointer: coarse) {
  input[type=text], input[type=password], input[type=number], input[type=email], input[type=date], select, textarea { font-size: 16px; }
}
@media (max-width: 820px) {
  /* leichtere Effekte = flüssiges Scrollen */
  .auth::before, .auth::after { animation: none; filter: blur(50px); }
  .stagger > * { animation-duration: .35s; animation-delay: calc(var(--i, 0) * 25ms); }
  .hero-main { box-shadow: 0 10px 24px rgba(255, 45, 85, .22); }
  .card, .proj .th, .mitem { box-shadow: 0 0 0 .5px var(--line); }
  .page { animation-duration: .3s; }
  .ptitle { margin-bottom: 18px; }
  h2 { margin-top: 30px; }
  .apps { grid-template-columns: 1fr; gap: 10px; }
  .app-tile { padding: 14px 16px; }
  .app-tile .ai { width: 46px; height: 46px; border-radius: 13px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tpl .prev { height: 110px; }
  .tpl .body { padding: 10px 12px 12px; }
  .tpl h3 { font-size: 14px; }
  .tpl p { display: none; }
  .phone { width: 46px; height: 82px; border-width: 2px; border-radius: 9px; }
  .ptitle .acts { width: 100%; }
  .segmented { max-width: 100%; overflow-x: auto; }
  /* Editor am Handy */
  .editor { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .ed-top { position: sticky; top: 0; z-index: 20; flex-wrap: wrap; gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .ed-top .name { order: 10; flex: 1 1 100%; max-width: none; }
  .ed-top #guides { display: none; }
  .col { height: auto !important; overflow: visible; }
  .col.center { order: -1; padding: 12px 10px; }
  .stage { height: auto !important; width: min(100%, 62vh * 9 / 16); border-radius: 16px; }
  .stage-hint { display: none; }
  .col.left, .col.right { border: 0; }
  .rtabs { top: 0; }
}

/* ============================================================ Editor Profi-Werkzeuge */
.grip { color: var(--text3); padding: 6px 3px; cursor: grab; touch-action: none; display: grid; place-items: center; border-radius: 6px; }
.grip:hover { color: var(--text); background: var(--surface2); }
.seg.dragging { position: relative; z-index: 5; box-shadow: 0 0 0 2px var(--accent), 0 16px 40px rgba(0, 0, 0, .5); opacity: .95; transition: none; cursor: grabbing; }
.seg.drop-before { box-shadow: 0 -3px 0 0 var(--blue), 0 0 0 1px var(--line); }
.seg.drop-after { box-shadow: 0 3px 0 0 var(--blue), 0 0 0 1px var(--line); }
.speeds { display: flex; gap: 4px; margin: 2px 0 6px; }
.speeds button { flex: 1; border: 0; border-radius: 8px; padding: 6px 0; background: var(--surface2); color: var(--text2); font-weight: 600; font-size: 12px; cursor: pointer; transition: .15s; }
.speeds button.on { background: var(--accent); color: #fff; }
.timebar .blk { padding: 0 10px; }
.timebar .blk .tr-l, .timebar .blk .tr-r { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; touch-action: none; }
.timebar .blk .tr-l { left: 0; border-radius: 7px 0 0 7px; }
.timebar .blk .tr-r { right: 0; border-radius: 0 7px 7px 0; }
.timebar .blk .tr-l::after, .timebar .blk .tr-r::after { content: ''; position: absolute; top: 6px; bottom: 6px; left: 3px; width: 2px; border-radius: 1px; background: rgba(0, 0, 0, .35); }
.timebar .blk:hover .tr-l, .timebar .blk:hover .tr-r, .timebar .blk.sel .tr-l, .timebar .blk.sel .tr-r { background: rgba(255, 255, 255, .35); }

/* Verschmelzungs-Stile */
.seams, .looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seams button, .looks button { border: 0; background: var(--surface); border-radius: 12px; padding: 8px 6px 9px; cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--text2); display: flex; flex-direction: column; align-items: center; gap: 7px; box-shadow: 0 0 0 1px var(--line); transition: .2s; }
.seams button:hover, .looks button:hover { color: var(--text); }
.seams button.on, .looks button.on { box-shadow: 0 0 0 2px var(--accent); color: var(--text); }
.sp { width: 100%; height: 46px; border-radius: 8px; background: linear-gradient(180deg, #ff5f7e 0 50%, #3ad6e6 50% 100%); position: relative; overflow: hidden; }
.sp.h { background: linear-gradient(90deg, #ff5f7e 0 50%, #3ad6e6 50% 100%); }
.sp-line::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% - 2px); height: 4px; background: #fff; }
.sp-line.h::after { left: calc(50% - 2px); right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
.sp-soft { background: linear-gradient(180deg, #ff5f7e 0 25%, #3ad6e6 75% 100%); }
.sp-soft.h { background: linear-gradient(90deg, #ff5f7e 0 25%, #3ad6e6 75% 100%); }
.sp-pixel { background: linear-gradient(180deg, #ff5f7e 0 30%, #3ad6e6 70% 100%); }
.sp-pixel::after { content: ''; position: absolute; left: 0; right: 0; top: 30%; height: 40%; background: conic-gradient(#ff5f7e 25%, #3ad6e6 0 50%, #9f9fb5 0 75%, #ff8fa5 0) 0 0 / 10px 10px; opacity: .85; }
.sp-pixel.h { background: linear-gradient(90deg, #ff5f7e 0 30%, #3ad6e6 70% 100%); }
.sp-pixel.h::after { top: 0; bottom: 0; left: 30%; width: 40%; height: auto; }
.sp-motion { background: linear-gradient(180deg, #ff5f7e 0 20%, #c58aa8 45%, #8ab8c8 55%, #3ad6e6 80% 100%); filter: blur(.4px); }
.sp-motion.h { background: linear-gradient(90deg, #ff5f7e 0 20%, #c58aa8 45%, #8ab8c8 55%, #3ad6e6 80% 100%); }
.sp-cinematic { background: linear-gradient(180deg, #ff5f7e 0 15%, #ffc9a8 50%, #3ad6e6 85% 100%); }
.sp-cinematic.h { background: linear-gradient(90deg, #ff5f7e 0 15%, #ffc9a8 50%, #3ad6e6 85% 100%); }
/* Look-Vorschauen */
.lk { width: 100%; height: 46px; border-radius: 8px; background: linear-gradient(135deg, #f4a261, #2a9d8f 60%, #264653); }
.lk-vivid { filter: saturate(1.6) contrast(1.1); }
.lk-cinematic { filter: contrast(1.2) saturate(.8) sepia(.15); box-shadow: inset 0 0 18px rgba(0, 0, 0, .7); }
.lk-warm { filter: sepia(.35) saturate(1.2); }
.lk-cool { filter: hue-rotate(15deg) saturate(.9) brightness(1.05); }
.lk-dreamy { filter: brightness(1.15) contrast(.9) blur(.6px); }
.lk-vintage { filter: sepia(.6) contrast(.9); box-shadow: inset 0 0 16px rgba(0, 0, 0, .55); }
.lk-bw { filter: grayscale(1) contrast(1.2); }
.rbody h4 { display: flex; align-items: center; justify-content: space-between; }
.exopts .li { padding: 12px 0; }
.exopts .li + .li::before { left: 0; }
.exopts .segmented { flex: 0 0 auto; }
@media (max-width: 820px) { .exopts .li { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* ============================================================ Editor v3: Werkzeugleiste · Einstellungen · Vorschau · Zeitleiste */
.editor { grid-template-columns: 76px 360px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto; }
.editor .ed-top { grid-column: 1 / -1; grid-row: 1; }
.rail { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; }
.rail button { border: 0; background: transparent; color: var(--text2); border-radius: 12px; padding: 9px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, transform .2s var(--spring); line-height: 1.15; text-align: center; }
.rail button:hover { background: var(--surface); color: var(--text); }
.rail button:active { transform: scale(.94); }
.rail button.on { background: var(--accent-soft); color: var(--accent-text); }
.col.inspector { grid-column: 2; grid-row: 2; height: auto; padding: 16px 16px 40px; background: #121214; border-right: 1px solid var(--line); overflow-y: auto; }
.editor .col.center { grid-column: 3; grid-row: 2; height: auto; min-height: 0; justify-content: center; padding: 14px; }
.editor .stage { height: calc(100dvh - 56px - 196px); max-height: 100%; }
.insp-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 2px 0 14px; }
.insp-title h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.insp-head { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 10px; }
.empty-tip { text-align: center; background: var(--surface); border-radius: 16px; padding: 22px 16px; box-shadow: 0 0 0 1px var(--line); }
.empty-tip .et-ic { width: 52px; height: 52px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 10px; }
.empty-tip b { font-size: 16px; }
.empty-tip p { color: var(--text2); font-size: 13px; margin: 6px 0 14px; }
.add-btn { position: relative; overflow: hidden; background: var(--surface2); }
.add-btn i { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.col.inspector .seg .sb { animation: none; }
.col.inspector .accs { gap: 8px; }

/* Zeitleiste */
.tl-wrap { grid-column: 1 / -1; grid-row: 3; background: #101012; border-top: 1px solid var(--line); padding: 8px 14px 12px; }
.tl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.tl-play { display: flex; align-items: center; gap: 10px; }
.tl-play .playbtn { width: 40px; height: 40px; font-size: 14px; }
.tl-play .time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text2); min-width: 104px; }
.tl-add, .tl-tools { display: flex; gap: 6px; }
.tl-tools { margin-left: auto; }
.tl-wrap .timebar { width: 100%; max-width: none; padding: 8px 10px; }
.timebar .lane { height: 46px; margin: 3px 0; }
.timebar .blk { color: #fff; line-height: 46px; border: 0; box-shadow: inset 0 -4px 0 var(--c), inset 0 0 0 1px rgba(255, 255, 255, .08); text-shadow: 0 1px 3px rgba(0, 0, 0, .9); font-size: 11px; background-color: #2a2a2d; }
.timebar .blk::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55)); border-radius: inherit; pointer-events: none; }
.timebar .blk.sel { box-shadow: inset 0 -4px 0 var(--c), inset 0 0 0 2px #fff; }
.timebar .lane.el { height: 18px; }
.timebar .eblk { line-height: 18px; }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 76px 320px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
  .col.inspector, .editor .col.center { height: auto; }
}
@media (max-width: 820px) {
  .editor { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .editor .col.center { order: 1; }
  .tl-wrap { order: 2; padding: 8px 10px; }
  .rail { order: 3; flex-direction: row; position: sticky; top: 0; z-index: 15; overflow-x: auto; border: 0; border-bottom: 1px solid var(--line); padding: 6px; background: var(--glass); backdrop-filter: blur(20px); }
  .rail button { flex: 0 0 auto; min-width: 70px; }
  .col.inspector { order: 4; border: 0; padding-bottom: 80px; }
  .tl-tools { margin-left: 0; width: 100%; overflow-x: auto; }
  .tl-play .time { min-width: 0; }
  .editor .stage { height: auto !important; width: min(100%, calc(56vh * 9 / 16)); }
}
.col.inspector.over { box-shadow: inset 0 0 0 3px var(--accent); background: rgba(255, 45, 85, .06); }
@media (max-width: 820px) {
  .editor .ed-top { flex-wrap: nowrap; gap: 4px; padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
  .editor .ed-top .name { order: 0; flex: 1 1 auto; min-width: 0; font-size: 15px; padding: 8px 6px; }
  .editor .ed-top > div[style*="flex:1"], .editor .ed-top #help, .editor .ed-top #redo { display: none; }
  .editor .ed-top .save-state { font-size: 0; gap: 0; }
  .editor .ed-top #exp { padding: 8px 12px; font-size: 13px; }
  .tl-head { gap: 8px; }
  .tl-add .btn { flex: 1; }
}

/* Stil-Vorschau in den Einstellungen */
.stylepv { position: relative; height: 210px; border-radius: var(--r); overflow: hidden; margin-bottom: 10px; background: linear-gradient(160deg, #3a3a44, #121216); display: grid; place-items: center; font-family: Montserrat, Arial, sans-serif; box-shadow: 0 0 0 .5px var(--line); }
.stylepv > span { position: absolute; }
.pv-hook { top: 18px; background: #fff; color: #111; font-weight: 900; font-size: 18px; padding: 6px 14px; border-radius: 10px; box-shadow: inset 0 -4px 0 var(--pv1); transform: rotate(-2deg); }
.pv-sub { top: 74px; color: #fff; font-weight: 900; font-size: 22px; letter-spacing: .01em; text-shadow: 0 0 4px #000, 0 2px 0 #000, 2px 0 0 #000, -2px 0 0 #000, 0 -2px 0 #000; }
.pv-sub b { color: var(--pv2); }
.pv-card { bottom: 18px; left: 18px; background: #fff; border-radius: 12px; padding: 8px 14px; display: flex; align-items: center; gap: 10px; }
.pv-price { color: var(--pv1); font-weight: 900; font-size: 22px; }
.pv-badge { background: var(--pv2); color: #111; font-weight: 900; font-size: 13px; border-radius: 999px; padding: 3px 8px; }
.pv-cta { bottom: 82px; left: 18px; background: var(--pv2); color: #111; font-weight: 900; font-size: 14px; border-radius: 999px; padding: 6px 12px; }

/* ============================================================ Finanzen */
:root { --inc: #2a78d6; --exp: #eb6834; }
:root[data-theme=dark] { --inc: #3987e5; --exp: #d95926; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --inc: #3987e5; --exp: #d95926; } }
a.stat { color: inherit; transition: transform .3s var(--spring), box-shadow .3s; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat .v.neg { color: #ff3b30; }
.stat .hint-s { font-size: 12px; color: var(--text2); margin-top: 2px; }
.fin-acts { align-items: center; flex-wrap: wrap; }
.fyear { width: auto; padding-right: 34px; font-weight: 600; }
.fin-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 16px; }
.fin-card { padding: 18px 20px; margin-top: 16px; }
.fin-grid .fin-card { margin-top: 0; }
.fin-card h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.fin-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--text2); font-weight: 600; }
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fc-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fc-tools input { width: 190px; padding: 7px 12px; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12.5px; color: var(--text2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .ctip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-wrap { position: relative; }
.fchart { width: 100%; height: auto; display: block; overflow: visible; }
.fchart .cg { stroke: var(--line); stroke-width: 1; }
.fchart .cb { stroke: var(--line2); stroke-width: 1; }
.fchart .ct { fill: var(--text2); font-size: 11px; font-family: var(--font); }
.fchart .bi { fill: var(--inc); }
.fchart .be { fill: var(--exp); }
.fchart .chit { fill: transparent; }
.fchart .cm.hover .chit { fill: var(--surface2); }
.fchart .cm { cursor: pointer; }
.ctip { position: absolute; top: -8px; width: 170px; background: var(--surface); color: var(--text); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-lg), 0 0 0 .5px var(--line); font-size: 12.5px; display: grid; gap: 4px; pointer-events: none; z-index: 5; }
.ctip span { display: flex; align-items: center; gap: 6px; }
.ctip span b { margin-left: auto; font-variant-numeric: tabular-nums; }
.ftable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ftable th, .ftable td { padding: 8px 6px; border-bottom: .5px solid var(--line2); text-align: left; }
.ftable th { color: var(--text2); font-weight: 600; font-size: 12px; }
.ftable td:not(:first-child), .ftable th:not(:first-child) { text-align: right; }
.ftable tr.sum td { font-weight: 700; border-top: 1.5px solid var(--text); border-bottom: 0; }
.ftable.eur tr.grp td { font-weight: 650; padding-top: 12px; }
.ftable.eur tr.sub td { color: var(--text2); padding-left: 16px; font-size: 13px; }
.krow { margin: 4px 0 16px; }
.krow .kt { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.krow small { color: var(--text2); font-size: 12px; display: block; margin-top: 6px; }
.kbar { height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.kbar i { display: block; height: 100%; border-radius: 4px; transition: width .6s var(--ease); }
.kbar i.ok { background: #30d158; } .kbar i.warn { background: #ff9f0a; } .kbar i.over { background: #ff3b30; }
.spill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.spill.ok { background: rgba(48, 209, 88, .14); color: #1f9d45; } .spill.warn { background: rgba(255, 159, 10, .16); color: #c27400; } .spill.over { background: rgba(255, 59, 48, .14); color: #d70015; }
.flist { display: grid; }
.frow { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.frow + .frow { border-top: .5px solid var(--line); }
.frow:hover { background: var(--surface2); }
.fic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.fic.income { background: var(--inc); } .fic.expense { background: var(--exp); }
.ft { flex: 1; min-width: 0; }
.ft b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft small { color: var(--text2); font-size: 12.5px; }
.gwg { color: #c27400; font-weight: 600; }
.nobeleg { font-size: 11px; color: var(--text3); white-space: nowrap; }
.fa { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fa.income { color: var(--text); } .fa.expense { color: var(--text2); }
.fempty { display: grid; justify-items: center; gap: 4px; padding: 30px 10px; color: var(--text2); text-align: center; }
.fempty .ico { color: var(--text3); margin-bottom: 6px; }
.fempty b { color: var(--text); }
.tax-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.tax-hints .th { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text2); margin-bottom: 12px; line-height: 1.45; }
.tax-hints .th .ico { flex: 0 0 auto; margin-top: 1px; color: var(--blue); }
.tax-hints .th b { color: var(--text); }
.fin-disclaimer { display: flex; gap: 6px; align-items: flex-start; margin-top: 14px; }
.fin-disclaimer .ico { flex: 0 0 auto; margin-top: 2px; }
/* Buchungs-Formular */
.fform .ftype { width: 100%; margin-bottom: 4px; }
.fform .ftype button { flex: 1; }
.famount { position: relative; }
.famount input { font-size: 28px !important; font-weight: 700; padding: 12px 40px 12px 14px; font-variant-numeric: tabular-nums; }
.famount em { position: absolute; right: 16px; bottom: 15px; font-style: normal; font-size: 22px; font-weight: 600; color: var(--text2); }
.freceipt { margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.rup { position: relative; }
.rprev { display: flex; align-items: center; gap: 10px; background: var(--surface2); border-radius: 12px; padding: 8px; width: 100%; }
.rprev img, .rprev .rpdf { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: var(--surface3); flex: 0 0 auto; }
.rprev .rn { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .fin-grid, .tax-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .fin-acts { width: 100%; }
  .fin-acts .btn.primary, .fin-acts [data-new] { flex: 1; }
  .fc-tools, .fc-tools input { width: 100%; }
  .fc-tools .segmented { width: 100%; } .fc-tools .segmented button { flex: 1; }
  .fin-card { padding: 16px 14px; }
  .stat .v { font-size: 20px; }
}
.ctip[hidden] { display: none; }

/* ============================================================ Etappe 4: KI-Skripte */
.pill.off { background: var(--surface2); color: var(--text2); }
.pill .ico { display: inline-block; vertical-align: -2px; }
.segmented.wide { display: flex; width: 100%; }
.segmented.wide button { flex: 1; }
.ai-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 16px; align-items: start; }
.ai-form { padding: 18px 20px; position: sticky; top: 20px; }
.ai-form .field:first-child { margin-top: 0; }
.ai-out { display: grid; gap: 14px; }
.ai-card { padding: 16px 18px; }
.ai-empty { padding: 50px 20px; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--text2); }
.ai-empty .ico { color: var(--purple); margin-bottom: 6px; }
.ai-empty b { color: var(--text); font-size: 16px; }
.hooks { display: grid; gap: 6px; }
.hooks button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: var(--surface2); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 14px; color: var(--text); transition: .15s; }
.hooks button:hover { background: var(--surface3); }
.hooks button.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 600; }
.hooks .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text3); flex: 0 0 auto; }
.hooks button.on .radio { border: 5px solid var(--accent); }
.lines { display: grid; gap: 6px; margin-bottom: 8px; }
.line { display: flex; gap: 6px; align-items: center; }
.line input { padding: 8px 10px; }
.role { width: 30px; height: 30px; border-radius: 9px; border: 0; font-weight: 800; color: #fff; flex: 0 0 auto; cursor: pointer; display: inline-grid; place-items: center; font-size: 13px; }
.role.rA { background: #ff2d55; } .role.rB { background: #0fb5c2; }
.caption { margin: 0 0 6px; font-size: 14px; }
.tags { margin: 0; color: var(--blue); font-size: 13.5px; }
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lbl-row { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.lbl-row .lbl { margin: 0; }

/* ============================================================ Content-Planer */
.pboard { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.pcol { background: var(--bg2); border-radius: var(--r-lg); padding: 10px; min-height: 200px; transition: background .2s, box-shadow .2s; }
.pcol.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.pch { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; padding: 4px 6px 10px; }
.pch i { width: 9px; height: 9px; border-radius: 50%; }
.pch span { margin-left: auto; font-size: 12px; color: var(--text2); background: var(--surface); border-radius: 999px; padding: 1px 8px; }
.pcards { display: grid; gap: 8px; }
.pcard { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-sm), 0 0 0 .5px var(--line); cursor: pointer; display: grid; gap: 4px; transition: transform .25s var(--spring), box-shadow .2s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard.dragging { opacity: .5; }
.pcard b { font-size: 14px; font-weight: 600; }
.pmeta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip-d { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; background: var(--surface2); color: var(--text2); border-radius: 999px; padding: 2px 8px; }
.chip-d.late { background: rgba(255, 59, 48, .12); color: #d70015; }
.pdrop { border: 1.5px dashed var(--line2); border-radius: 12px; padding: 18px 10px; text-align: center; color: var(--text3); font-size: 12.5px; }
.padd { width: 100%; margin-top: 8px; }
.pcal { padding: 16px 18px; }
.cgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cwd { font-size: 11.5px; font-weight: 600; color: var(--text2); text-align: center; padding: 4px 0; }
.cday { min-height: 92px; background: var(--surface2); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: background .15s; min-width: 0; }
.cday:hover { background: var(--surface3); }
.cday.empty { background: transparent; cursor: default; }
.cday.today .dn { background: var(--accent); color: #fff; }
.dn { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cev { border: 0; text-align: left; font-size: 11px; font-weight: 600; color: var(--text); background: var(--surface); border-left: 3px solid var(--c); border-radius: 5px; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.iform .st4 { margin: 4px 0 8px; }
.iform .st4 button { font-size: 12px; padding: 7px 4px; }

/* Übersicht: geplant */
.upnext { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.upi { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 0; text-align: left; cursor: pointer; color: var(--text); transition: transform .3s var(--spring); }
.upi:hover { transform: translateY(-2px); }
.upd { width: 46px; height: 50px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; align-content: center; font-size: 11px; font-weight: 600; flex: 0 0 auto; line-height: 1.1; }
.upd b { font-size: 19px; }
.upt { min-width: 0; display: grid; gap: 2px; }
.upt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.upt small { color: var(--text2); display: flex; align-items: center; gap: 6px; }
.upt small i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.small-empty { padding: 18px; font-size: 14px; }

/* Skript im Editor */
.script-card { margin-top: 14px; background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: 0 0 0 1px var(--line); }
.sc-head { display: flex; align-items: center; justify-content: space-between; }
.sc-head b { display: inline-flex; align-items: center; gap: 6px; }
.script-card p { margin: 4px 0 8px; }
.sc-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sc-lines li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px; border-radius: 9px; }
.sc-lines li .role { width: 24px; height: 24px; font-size: 11px; border-radius: 7px; cursor: default; }
.sc-lines .sct { flex: 1; min-width: 0; }
.sc-lines li.done { color: var(--text2); }
.sc-lines li.done .sct { text-decoration: line-through; text-decoration-color: var(--text3); }
.sc-lines li.done .ico { color: var(--green); }
.sc-lines li.next { background: var(--accent-soft); }
.sc-lines .nx { font-size: 11px; font-weight: 700; color: var(--accent-text); white-space: nowrap; }

/* ============================================================ Team */
.team-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.goal { padding: 18px 20px; display: grid; gap: 8px; }
.gk { display: flex; align-items: center; gap: 8px; color: var(--text2); font-weight: 500; font-size: 13.5px; }
.gv { font-size: 30px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.gv small { font-size: 16px; color: var(--text2); font-weight: 600; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.member { padding: 16px 18px; }
.member.me { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow-sm); }
.mh { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mh .avatar { width: 40px; height: 40px; font-size: 17px; }
.mh b { text-transform: capitalize; font-size: 16px; display: block; }
.mh small { color: var(--accent-text); font-weight: 600; font-size: 12px; }
.mstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.mstats b { display: grid; place-items: center; font-size: 16px; font-variant-numeric: tabular-nums; min-height: 22px; }
.mstats span { font-size: 11px; color: var(--text2); }
.tshare-new { border: 2px dashed var(--line2); background: transparent; box-shadow: none; aspect-ratio: 9/16; max-height: 300px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--text2); cursor: pointer; font-size: 13px; }
.tshare-new:hover { border-color: var(--accent); color: var(--accent-text); }
.ttpl .tacts { display: flex; gap: 6px; margin-top: 8px; }
.ttpl .tacts .btn.primary { flex: 1; }
@media (max-width: 1100px) { .ai-grid { grid-template-columns: 1fr; } .ai-form { position: static; } .pboard { grid-template-columns: repeat(2, minmax(0, 1fr)); } .upnext { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .pboard { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 10px; }
  .pcol { flex: 0 0 82%; scroll-snap-align: start; }
  .cday { min-height: 58px; padding: 3px; }
  .cev { font-size: 0; height: 6px; padding: 0; border-left: 0; background: var(--c); border-radius: 3px; }
  .team-goals { grid-template-columns: 1fr; }
  .ai-actions .btn { flex: 1; }
}
.segmented.wide button { white-space: nowrap; padding: 7px 4px; }
.flist { grid-template-columns: minmax(0, 1fr); } .frow { min-width: 0; }

/* ============================================================ Feinschliff (Rundgang) */
/* Planer-Spalten im Dunkelmodus sichtbar machen */
:root[data-theme=dark] .pcol { background: #151517; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .pcol { background: #151517; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); } }
:root[data-theme=dark] .pcol.over, .pcol.over { background: var(--accent-soft); }
/* lange Knöpfe im Editor dürfen umbrechen */
#asdef { width: 100%; white-space: normal; text-align: center; line-height: 1.3; }
@media (max-width: 820px) {
  /* Einstellungen: Umschalter in eigene Zeile, damit die Beschriftung nicht abgeschnitten wird */
  .li:has(.segmented) { flex-wrap: wrap; }
  .li:has(.segmented) .segmented { width: 100%; }
  .li:has(.segmented) .segmented button { flex: 1; }
  /* Editor: Werkzeugleiste klebt UNTER der Kopfzeile statt dahinter */
  .rail { top: calc(max(8px, env(safe-area-inset-top)) + 49px); }
}

/* ============================================================ Editor v4: einfacher */
/* Wer spricht? – Name statt A/B */
.trk { width: auto; max-width: 110px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
/* Split-Modus wählen */
.modepick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.modepick button { border: 0; text-align: left; background: var(--surface); border-radius: 14px; padding: 12px; cursor: pointer; color: var(--text2); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s, background .2s; }
.modepick button b { display: block; color: var(--text); font-size: 13.5px; margin-bottom: 3px; }
.modepick button small { font-size: 11.5px; line-height: 1.35; display: block; }
.modepick button.on { box-shadow: 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.half-head { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; margin: 14px 0 8px; }
.half-head i { width: 10px; height: 10px; border-radius: 50%; }
.half-head .muted { margin-left: auto; font-weight: 500; }
.add-btn.wide { width: 100%; padding: 12px; border-radius: 12px; }
/* Trimmer mit Filmstreifen */
.trimmer { position: relative; height: 64px; border-radius: 12px; background: var(--surface2); margin: 4px 0 6px; touch-action: none; user-select: none; }
.tstrip { position: absolute; inset: 0; border-radius: 12px; background: var(--surface3) left center / auto 100% repeat-x; }
.tshade { position: absolute; top: 0; bottom: 0; background: rgba(0, 0, 0, .62); }
.tshade.tl { left: 0; border-radius: 12px 0 0 12px; }
.tshade.tr { right: 0; border-radius: 0 12px 12px 0; }
.tsel { position: absolute; top: -2px; bottom: -2px; border: 3px solid #ffd60a; border-left-width: 0; border-right-width: 0; border-radius: 8px; pointer-events: none; }
.thd { position: absolute; top: -3px; bottom: -3px; width: 18px; background: #ffd60a; pointer-events: auto; cursor: ew-resize; display: grid; place-items: center; touch-action: none; }
.thd::after { content: ''; width: 3px; height: 22px; border-radius: 2px; background: rgba(0, 0, 0, .45); }
.thd.l { left: -14px; border-radius: 8px 0 0 8px; }
.thd.r { right: -14px; border-radius: 0 8px 8px 0; }
.thd.drag { filter: brightness(1.1); transform: scaleY(1.05); }
.trimmer { margin-left: 14px; margin-right: 14px; }
/* „Mehr Optionen“ */
details.more.adv { background: transparent; box-shadow: inset 0 0 0 1px var(--line); margin-top: 12px; }
details.more.adv > summary { color: var(--text2); }
/* Profi-Schalter in der Werkzeugleiste */
.pro-toggle { margin-top: auto !important; }
.pt-sw { width: 30px; height: 18px; border-radius: 999px; background: var(--surface3); position: relative; display: block; transition: background .2s; }
.pt-sw i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); }
.pro-toggle.on .pt-sw { background: var(--green); }
.pro-toggle.on .pt-sw i { transform: translateX(12px); }
.rail .pro-toggle.on { background: transparent; color: var(--text); }
/* Zeitleiste: Clip ziehen */
.timebar .blk { cursor: grab; touch-action: pan-y; }
.timebar .blk.dragging { z-index: 5; opacity: .9; box-shadow: 0 8px 24px rgba(0, 0, 0, .6), inset 0 0 0 2px #fff; cursor: grabbing; }
.timebar .blk.drop-l { box-shadow: inset 4px 0 0 #0a84ff; }
.timebar .blk.drop-r { box-shadow: inset -4px 0 0 #0a84ff; }
/* Handy: Vorschau bleibt oben stehen, darunter wird bearbeitet */
@media (max-width: 820px) {
  .editor { --stageH: 36vh; }
  .editor .col.center { position: sticky; top: calc(max(8px, env(safe-area-inset-top)) + 49px); z-index: 12; background: #0a0a0c; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .editor .stage { height: var(--stageH) !important; width: auto !important; aspect-ratio: 9/16; border-radius: 12px; }
  .rail { top: calc(max(8px, env(safe-area-inset-top)) + 49px + var(--stageH) + 17px); }
  .modepick { grid-template-columns: 1fr; }
  .trk { max-width: 90px; }
}
@media (max-width: 820px) {
  .editor .ed-top, .editor .rail { background: #0e0e10; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.optbar { display: flex; align-items: center; gap: 12px; background: rgba(255, 159, 10, .12); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px rgba(255, 159, 10, .35); }
.optbar > .ico { color: #ff9f0a; flex: 0 0 auto; }
.optbar div { flex: 1; min-width: 0; }
.optbar b { display: block; font-size: 13.5px; }
.optbar span { font-size: 12.5px; color: var(--text2); }
.optbar .btn { flex: 0 0 auto; }
@media (max-width: 820px) { .optbar { flex-wrap: wrap; } .optbar .btn { width: 100%; } }
.stage::after { content: ''; position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; opacity: 0; transition: opacity .2s .25s; pointer-events: none; animation: spin .8s linear infinite; }
.stage.buffering::after { opacity: 1; }

/* ============================================================ Editor v5: Profi-Layout (Medien · Player · Eigenschaften · Zeitleiste) */
.editor { grid-template-columns: 60px 320px minmax(0, 1fr) 340px; grid-template-rows: 52px minmax(0, 1fr) 252px; height: 100dvh; overflow: hidden; background: #0b0b0d; }
.editor .ed-top { height: 52px; background: #111113; backdrop-filter: none; }
.editor .col { height: auto; min-height: 0; }
.editor .rail { grid-column: 1; grid-row: 2; padding: 8px 6px; gap: 2px; background: #0b0b0d; }
.editor .rail button { font-size: 10px; padding: 8px 0 6px; border-radius: 10px; }
.editor .rail button.on { background: rgba(255, 255, 255, .08); color: #fff; }
.editor .rail button.on .ico { color: var(--accent-text); }
.editor .col.inspector { grid-column: 2; grid-row: 2; background: #121214; padding: 14px 14px 40px; }
.editor .col.center { grid-column: 3; grid-row: 2; padding: 12px 12px 6px; gap: 8px; justify-content: center; background: radial-gradient(ellipse at 50% 30%, #18181d, #0b0b0d 72%); }
.editor .col.props { grid-column: 4; grid-row: 2; background: #121214; border-left: 1px solid var(--line); padding: 14px 14px 40px; overflow-y: auto; }
.editor .stage { height: calc(100dvh - 52px - 252px - 74px); max-height: 100%; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .07); }
.editor .stage-hint { display: none; }

/* Transport unter dem Player */
.transport { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: min(100%, 460px); }
.transport .time { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.transport .time.dim { color: var(--text3); text-align: right; }
.tp-mid { display: flex; align-items: center; gap: 2px; }
.tp-mid .playbtn { width: 42px; height: 42px; margin: 0 6px; box-shadow: none; }
.tp-mid .btn.icon { width: 34px; height: 34px; color: var(--text2); }
.tp-mid .btn.icon:hover { color: #fff; }
.tp-mid #guides.on { color: var(--accent-text); background: var(--accent-soft); }

/* Zeitleiste */
.editor .tl-wrap { grid-column: 1 / -1; grid-row: 3; display: flex; flex-direction: column; min-height: 0; padding: 0; background: #0f0f11; border-top: 1px solid var(--line); }
.tl-bar { display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 44px; flex: none; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tl-bar::-webkit-scrollbar { display: none; }
.tl-bar .btn { white-space: nowrap; flex: none; }
.tl-bar .btn.ghost { background: transparent; color: var(--text2); }
.tl-bar .btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .07); color: #fff; }
.tl-bar .btn:disabled { opacity: .35; }
.tl-edit { display: flex; gap: 2px; }
.tl-edit .btn { gap: 6px; }
.tl-sep { width: 1px; height: 22px; background: var(--line2); flex: none; margin: 0 4px; }
.editor .tl-tools { margin-left: 4px; display: flex; gap: 4px; }
.editor .tl-tools .btn { background: transparent; color: var(--text2); }
.editor .tl-tools .btn.on { color: var(--accent-text); background: var(--accent-soft); }
.tl-zoom { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: none; }
.tl-zoom input { width: 110px; }
.tl-zoom .btn { width: 28px; height: 28px; font-size: 17px; padding: 0; }
.tl-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); overflow-y: auto; scrollbar-width: thin; }
.tl-labels { border-right: 1px solid var(--line); background: #0f0f11; padding-top: 0; }
.tl-labels .ll { display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 11px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; }
.tl-labels .ll.ruler-sp { height: 26px; }
.tl-labels .ll.vid { height: 58px; margin: 8px 0; }
.tl-labels .ll.vid i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.tl-labels .ll.el { height: 22px; margin: 4px 0; color: var(--text3); }
.tl-scroll { overflow-x: auto; overflow-y: hidden; padding: 0 16px 0 12px; scrollbar-width: thin; scrollbar-color: var(--surface3) transparent; }
.editor .tl-wrap .timebar { width: auto; max-width: none; padding: 0 0 6px; background: none; box-shadow: none; border-radius: 0; }
.timebar .tb-inner { position: relative; min-height: 100%; }
.timebar .ruler { position: relative; height: 26px; border-bottom: 1px solid var(--line); cursor: pointer;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px var(--minor)); background-size: 100% 5px; background-position: left bottom; background-repeat: no-repeat; }
.timebar .ruler span { position: absolute; top: 0; bottom: 0; padding: 4px 0 0 4px; font-size: 10px; font-weight: 600; color: var(--text3); border-left: 1px solid rgba(255, 255, 255, .28); font-variant-numeric: tabular-nums; pointer-events: none; }
.editor .timebar .lane { overflow: visible; }
.editor .timebar .lane.vid { height: 58px; margin: 8px 0; }
.editor .timebar .blk { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #26262a; line-height: normal; color: #fff; cursor: grab;
  box-shadow: inset 0 -3px 0 var(--c), inset 0 0 0 1px rgba(255, 255, 255, .1); transition: filter .15s, box-shadow .15s; }
.editor .timebar .blk::before { display: none; }
.editor .timebar .blk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .35)); pointer-events: none; z-index: 1; }
.editor .timebar .blk canvas.fs { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.editor .timebar .blk .bt { position: absolute; left: 8px; right: 8px; top: 5px; z-index: 2; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); pointer-events: none; }
.editor .timebar .blk .bt i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.editor .timebar .blk .bt em { font-style: normal; font-size: 10px; font-weight: 800; color: #000; background: var(--c); border-radius: 4px; padding: 0 5px; text-shadow: none; flex: none; }
.editor .timebar .blk .bd { position: absolute; right: 6px; bottom: 7px; z-index: 2; font-size: 10px; font-weight: 700; background: rgba(0, 0, 0, .62); border-radius: 5px; padding: 1px 5px; pointer-events: none; font-variant-numeric: tabular-nums; }
.editor .timebar .blk .btr { position: absolute; left: -1px; top: 50%; transform: translateY(-50%); z-index: 3; width: 16px; height: 16px; border-radius: 5px; background: #fff; color: #000; font-size: 10px; display: grid; place-items: center; pointer-events: none; }
.editor .timebar .blk.tiny .bt, .editor .timebar .blk.tiny .bd { display: none; }
.editor .timebar .blk:hover { filter: brightness(1.12); }
.editor .timebar .blk.sel { box-shadow: inset 0 -3px 0 var(--c), inset 0 0 0 2px #fff; z-index: 3; filter: none; }
.editor .timebar .blk .tr-l, .editor .timebar .blk .tr-r { width: 12px; z-index: 4; }
.editor .timebar .blk.sel .tr-l, .editor .timebar .blk.sel .tr-r { background: #fff; }
.editor .timebar .blk.sel .tr-l::after, .editor .timebar .blk.sel .tr-r::after { left: 5px; top: 18px; bottom: 18px; background: #111; }
.editor .timebar .blk.dragging { opacity: .85; z-index: 6; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 0 0 2px #fff; cursor: grabbing; }
.editor .timebar .lane.el { height: 22px; margin: 4px 0; }
.editor .timebar .eblk { line-height: 22px; border-radius: 6px; font-size: 10.5px; background: rgba(191, 90, 242, .28); box-shadow: inset 3px 0 0 #bf5af2; color: #f0dcff; }
.editor .timebar .eblk.sel { background: rgba(191, 90, 242, .55); box-shadow: inset 3px 0 0 #bf5af2, inset 0 0 0 1px #e3b6ff; }
.editor .timebar .ph { top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .6); border-radius: 0; }
.editor .timebar .ph::before { display: none; }
.editor .timebar .ph i { position: absolute; top: 2px; left: -6px; width: 14px; height: 16px; background: #fff; border-radius: 4px 4px 7px 7px; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.tl-empty { display: flex; align-items: center; justify-content: center; gap: 12px; height: 130px; color: var(--text3); text-align: left; font-size: 12.5px; }
.tl-empty b { display: block; color: var(--text2); font-size: 13.5px; margin-bottom: 2px; }
.editor .tl-wrap.over { box-shadow: inset 0 0 0 2px var(--accent); background: rgba(255, 45, 85, .05); }
.editor.playing .timebar .blk:hover { filter: none; }

/* Medien-Bibliothek */
.upc { display: flex; flex-direction: column; gap: 6px; }
.upc .drop { width: 100%; justify-content: center; gap: 7px; padding: 10px; border-radius: 11px; }
.upc .drop.over { outline: 2px dashed #fff; }
.upc .uploads:empty { display: none; }
.upc .up { padding: 8px 10px; }
.bin-filter { display: flex; width: 100%; margin: 12px 0; }
.bin-filter button { flex: 1; padding: 6px 2px; font-size: 12px; }
.bin { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px 10px; }
.bitem { min-width: 0; cursor: grab; }
.bth { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; background: #222226 center / cover no-repeat; display: grid; place-items: center; color: var(--text3); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .2s var(--spring); }
.bitem:hover .bth { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45); }
.bitem.peek .bth { box-shadow: inset 0 0 0 2px var(--accent); }
.bth .dur { position: absolute; right: 6px; top: 6px; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .66); padding: 1px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.bth .usedb { position: absolute; left: 6px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #000; display: grid; place-items: center; }
.badd { position: absolute; left: 5px; right: 5px; bottom: 5px; display: flex; gap: 4px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .2s var(--spring); }
.bitem:hover .badd, .bitem.peek .badd { opacity: 1; transform: none; }
.badd button { flex: 1; min-width: 0; border: 0; border-radius: 7px; padding: 5px 3px; background: var(--c); color: #000; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.badd button:active { transform: scale(.95); }
.bitem .bn { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bin-tip { margin-top: 16px; }
@media (hover: none) { .badd { opacity: 1; transform: none; } }

/* Eigenschaften (rechts) */
.editor .col.props .insp-head { margin: 0 0 12px; }
.editor .col.props .seg.sel { box-shadow: none; background: transparent; padding: 0; }
.editor .col.props .seg.sel > .sh { background: var(--surface); border-radius: 12px; padding: 8px; }

/* Mittelgroße Bildschirme: Eigenschaften ersetzen die linke Spalte, solange ein Clip gewählt ist */
@media (max-width: 1180px) and (min-width: 821px) {
  .editor { grid-template-columns: 60px 300px minmax(0, 1fr); }
  .editor .col.props { grid-column: 2; display: none; border-left: 0; border-right: 1px solid var(--line); }
  .editor.has-sel .col.props { display: block; }
  .editor.has-sel .col.inspector { display: none; }
  .tl-edit .btn span { display: none; }
}

/* Handy: Player oben, Zeitleiste, Einstellungen, Werkzeuge unten */
@media (max-width: 820px) {
  .editor { display: flex; flex-direction: column; height: auto; min-height: 100dvh; overflow: visible; }
  .editor .col { height: auto; overflow: visible; }
  .editor { --stageH: 38vh; }
  .editor .col.center { order: 1; padding: 8px 8px 2px; gap: 4px; background: #0b0b0d; border-bottom: 0; }
  .editor .stage { height: var(--stageH) !important; width: auto !important; border-radius: 12px; }
  .transport { width: 100%; }
  .editor .tl-wrap { order: 2; }
  .tl-body { grid-template-columns: minmax(0, 1fr); }
  .editor .tl-wrap .timebar { padding-bottom: 4px; }
  .editor .timebar .lane.vid { height: 52px; margin: 6px 0; }
  .transport .tp-mid .btn.icon { width: 32px; height: 32px; }
  .tl-labels { display: none; }
  .tl-scroll { padding: 0 10px; }
  .tl-zoom input { display: none; }
  .tl-edit .btn span { display: none; }
  .editor .col.props { order: 3; display: none; border: 0; padding: 14px 14px 24px; }
  .editor.has-sel .col.props { display: block; }
  .editor.has-sel .col.inspector { display: none; }
  .editor .col.inspector { order: 4; border: 0; padding: 14px 14px 24px; }
  .editor .rail { order: 5; position: sticky; bottom: 0; top: auto; z-index: 15; flex-direction: row; justify-content: space-around; overflow-x: auto; border: 0; border-top: 1px solid var(--line);
    padding: 4px 4px max(4px, env(safe-area-inset-bottom)); background: rgba(14, 14, 16, .92); backdrop-filter: blur(20px); }
  .editor .rail button { min-width: 58px; flex: 1 0 auto; }
  .bin { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
