/* Clip Studio – dunkles, ruhiges Design nach Apple-Prinzipien:
   Systemschrift, durchscheinende Leisten, sofortiges Feedback beim Drücken, ruhige Federkurven. */
:root {
  --bg: #000;
  --surface: rgba(28, 28, 30, 0.92);
  --surface-solid: #1c1c1e;
  --surface-2: #2c2c2e;
  --fill: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.16);
  --separator: rgba(84, 84, 88, 0.55);
  --label: #fff;
  --label-2: rgba(235, 235, 245, 0.62);
  --label-3: rgba(235, 235, 245, 0.32);
  --blue: #0a84ff;
  --pink: #ff375f;
  --red: #ff453a;
  --green: #30d158;
  --claude: #d97757;
  --twitch: #bf94ff;
  --kick: #53fc18;
  --radius: 14px;
  --radius-lg: 20px;
  /* kritisch gedämpft: schnell, ohne Nachschwingen */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --topbar: 56px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font: 100%/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.005em;
}
a { color: var(--blue); text-decoration: none; }
.muted { color: var(--label-2); font-weight: 400; }
.hint { color: var(--label-2); font-size: 0.8rem; margin: 0; line-height: 1.4; }

/* ---------- Bedienelemente ---------- */
button, .btn {
  font: inherit; font-size: 0.94rem; font-weight: 600; border: 0; border-radius: 12px; padding: 10px 16px;
  cursor: pointer; color: var(--label); background: var(--fill); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: transform 120ms var(--ease), background-color 150ms, opacity 150ms;
}
button:active:not(:disabled), .btn:active { transform: scale(0.97); transition-duration: 60ms; }
button.primary { background: var(--blue); color: #fff; }
button.primary:hover:not(:disabled) { background: #339cff; }
button.secondary:hover:not(:disabled), .btn:hover { background: rgba(118, 118, 128, 0.32); }
button.claude { background: var(--claude); color: #fff; }
button.large { padding: 13px 18px; font-size: 1rem; border-radius: 14px; }
button.link { background: none; padding: 6px 0; color: var(--blue); font-weight: 500; }
button.link.danger { color: var(--red); }
button:disabled { opacity: 0.38; cursor: default; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: var(--fill); font-size: 0.95rem; }

input, select, textarea {
  font: inherit; font-size: 0.95rem; color: var(--label); background: var(--fill-2);
  border: 1px solid transparent; border-radius: 11px; padding: 10px 12px; min-width: 0; width: 100%;
  transition: border-color 150ms, background-color 150ms;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); background: var(--fill); }
input:disabled { color: var(--label-2); }
textarea { resize: vertical; }
select { appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--label-2) 50%), linear-gradient(135deg, var(--label-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--label-2); }
.input-label input, .input-label select { font-weight: 500; }

/* ---------- Marke ---------- */
.brand-mark { width: 52px; height: 52px; border-radius: 14px; display: inline-block;
  background: conic-gradient(from 210deg, #0a84ff, #bf5af2, #ff375f, #ff9f0a, #0a84ff);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 30%, #000 31%); mask: radial-gradient(circle at 50% 50%, transparent 30%, #000 31%); }
.brand-mark.small { width: 22px; height: 22px; border-radius: 7px; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(10, 132, 255, 0.16), transparent 60%), var(--bg); }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--separator); border-radius: 24px; padding: 36px 28px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: rise 420ms var(--ease) both; }
.login-card .brand-mark { margin: 0 auto 4px; }
.login-card h1 { margin: 0; font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.022em; }
.login-card .sub { margin: -8px 0 6px; color: var(--label-2); font-size: 0.95rem; }
.login-card .input-label { text-align: left; }
.login-card .legal { margin: 2px 0 0; font-size: 0.78rem; color: var(--label-3); }
.login-card .legal a { color: var(--label-2); }
.form-error { color: var(--red); font-size: 0.85rem; min-height: 1.2em; margin: -4px 0; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.shake { animation: shake 320ms var(--ease); }

/* ---------- Kopfleiste ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(0, 0, 0, 0.62); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--label); font-weight: 700; letter-spacing: -0.015em; font-size: 1.02rem; }
.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; background: var(--fill-2); border-radius: 10px; padding: 2px; }
.segmented a { position: relative; z-index: 1; color: var(--label); font-size: 0.85rem; font-weight: 600; padding: 6px 18px; text-align: center; border-radius: 8px; transition: opacity 150ms; }
.segmented a:not(.active) { opacity: 0.7; }
.segmented a:active { opacity: 0.5; }
.seg-indicator { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(33.333% - 1.33px); border-radius: 8px;
  background: #636366; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); transition: transform 320ms var(--ease), opacity 200ms; }
.segmented[data-pos="1"] .seg-indicator { transform: translateX(100%); }
.segmented[data-pos="2"] .seg-indicator { transform: translateX(200%); }
.segmented[data-pos="-1"] .seg-indicator { opacity: 0; }
.account { justify-self: end; position: relative; display: flex; align-items: center; gap: 10px; }
/* Tunnel-Schalter: macht die Seite unter clips.marcey.net erreichbar */
.tunnel-btn { gap: 8px; padding: 6px 12px; border-radius: 99px; font-size: 0.8rem; background: var(--fill-2); color: var(--label-2); }
.tunnel-btn .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); }
.tunnel-btn.on { background: rgba(48, 209, 88, 0.14); color: var(--green); }
.tunnel-btn.on .tdot { background: var(--green); box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.25); }
.tunnel-btn.wait { background: rgba(255, 214, 10, 0.12); color: #ffd60a; }
.tunnel-btn.wait .tdot { background: #ffd60a; animation: blink 1s ease-in-out infinite; }
.tunnel-btn.err { background: rgba(255, 69, 58, 0.14); color: #ffb3ad; }
.tunnel-btn.err .tdot { background: var(--red); }
@keyframes blink { 50% { opacity: 0.3; } }
@media (max-width: 600px) { .tunnel-btn #tunnelLabel { display: none; } }
.avatar-btn { padding: 2px; border-radius: 50%; background: transparent; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #5e5ce6, #bf5af2) center / cover; color: #fff; font-weight: 700; font-size: 0.85rem; overflow: hidden; }
.avatar.large { width: 44px; height: 44px; font-size: 1.05rem; }
.avatar.xlarge { width: 88px; height: 88px; font-size: 2rem; }

/* Menü wächst aus dem Profilbild heraus */
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 6px;
  background: rgba(44, 44, 46, 0.86); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border: 0.5px solid rgba(255, 255, 255, 0.12); border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  transform-origin: top right; opacity: 0; transform: scale(0.92) translateY(-6px); pointer-events: none;
  transition: opacity 180ms var(--ease), transform 260ms var(--ease); }
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-head { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; border-bottom: 0.5px solid var(--separator); margin-bottom: 6px; }
.menu-name { font-weight: 650; letter-spacing: -0.01em; }
.menu-mail { color: var(--label-2); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; justify-content: flex-start; padding: 9px 10px;
  border-radius: 10px; background: none; color: var(--label); font-size: 0.92rem; font-weight: 500; }
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, 0.08); }
.menu .ico { width: 18px; text-align: center; color: var(--label-2); }

/* ---------- Seiten ---------- */
.page-inner { max-width: 1180px; margin: 0 auto; padding: 32px 16px 80px; }
.page-inner.narrow { max-width: 640px; }
.page-title { font-size: 2rem; line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 6px; }
.page-sub { color: var(--label-2); margin: 0 0 24px; }
.section-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--label-2); font-weight: 600; margin: 28px 4px 10px; }
.streamer-layout > div > .section-title { margin-top: 0; }
.surface { background: var(--surface-solid); border-radius: var(--radius-lg); padding: 16px; }
.group { display: flex; flex-direction: column; gap: 14px; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actions .primary { margin-left: auto; }
.streamer-layout { display: grid; grid-template-columns: 450px 1fr; gap: 28px; align-items: start; margin-top: 22px; }
@media (max-width: 880px) { .streamer-layout { grid-template-columns: 1fr; } }
.add-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.add-form select { width: auto; }
.add-form button { grid-column: 1 / -1; }
.streamer { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-top: 0.5px solid var(--separator); }
.streamer .name { flex: 1; min-width: 90px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streamer button.primary { padding: 7px 12px; font-size: 0.85rem; border-radius: 10px; }
.badge { font-size: 0.66rem; font-weight: 700; padding: 3px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.03em; }
.badge.twitch { background: rgba(145, 70, 255, 0.22); color: var(--twitch); }
.badge.kick { background: rgba(83, 252, 24, 0.14); color: var(--kick); }
.empty { color: var(--label-2); text-align: center; padding: 28px 12px; }
.empty b { color: var(--label); display: block; font-size: 1.05rem; margin-bottom: 4px; }

/* Clip-Kacheln */
.grid-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-solid); aspect-ratio: 9 / 16;
  cursor: pointer; transition: transform 160ms var(--ease); }
.tile:active { transform: scale(0.98); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .shade { position: absolute; inset: auto 0 0; padding: 40px 10px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); }
.tile .t { font-weight: 650; font-size: 0.86rem; line-height: 1.25; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .s { color: var(--label-2); font-size: 0.74rem; margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.tile .state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 16px; text-align: center; color: var(--label-2); font-size: 0.8rem; background: rgba(0, 0, 0, 0.55); }
.tile .state.err { color: var(--red); background: var(--surface-solid); }
.tile .heart { position: absolute; top: 8px; right: 8px; color: var(--pink); font-size: 1rem; text-shadow: 0 1px 4px #000; }
.tile .del { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 150ms; }
.tile:hover .del, .tile .state.err ~ .del { opacity: 1; }
.spinner { width: 28px; height: 28px; border: 2.5px solid rgba(255, 255, 255, 0.18); border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Profil */
.profile-row { display: flex; gap: 18px; align-items: center; }
@media (max-width: 520px) { .profile-row { flex-direction: column; align-items: stretch; } .avatar-edit { align-self: center; } }
.avatar-edit { position: relative; padding: 0; border-radius: 50%; background: none; flex: none; }
.avatar-edit-label { position: absolute; inset: auto 0 0; padding: 4px 0 8px; font-size: 0.7rem; background: rgba(0, 0, 0, 0.55);
  border-radius: 0 0 44px 44px; opacity: 0; transition: opacity 150ms; }
.avatar-edit:hover .avatar-edit-label, .avatar-edit:focus-visible .avatar-edit-label { opacity: 1; }
.profile-fields { flex: 1; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Feed (TikTok-Stil) ---------- */
.feed-view { position: relative; }
.feed { height: calc(100dvh - var(--topbar)); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center;
  gap: 18px; padding: 14px 16px; position: relative; }
.stage { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 18px; overflow: hidden; background: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.stage video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.stage .info { position: absolute; inset: auto 0 0; padding: 60px 16px 18px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  pointer-events: none; }
.stage .info .who { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; }
.stage .info .ttl { margin-top: 4px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.86); line-height: 1.35; }
.stage .info .meta { margin-top: 4px; font-size: 0.75rem; color: var(--label-2); }
.stage .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.15); }
.stage .progress i { display: block; height: 100%; width: 0; background: #fff; }
.stage .paused { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; color: rgba(255, 255, 255, 0.85);
  pointer-events: none; opacity: 0; transition: opacity 160ms; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); }
.stage.is-paused .paused { opacity: 1; }
.burst { position: absolute; font-size: 6rem; color: var(--pink); pointer-events: none; transform: translate(-50%, -50%);
  animation: burst 700ms var(--ease) forwards; text-shadow: 0 6px 30px rgba(255, 55, 95, 0.5); }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  45% { transform: translate(-50%, -50%) scale(0.95); } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1); } }
.rail { display: flex; flex-direction: column; gap: 18px; align-self: flex-end; padding-bottom: 24px; }
.rail button, .rail a { flex-direction: column; gap: 4px; width: 54px; padding: 0; background: none; color: var(--label); font-size: 0.7rem; font-weight: 600; }
.rail .circle { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem;
  background: rgba(118, 118, 128, 0.3); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: transform 200ms var(--ease), color 150ms; }
.rail .liked .circle { color: var(--pink); }
.rail .liked .circle { animation: pop 380ms var(--ease); }
@keyframes pop { 40% { transform: scale(1.22); } }
@media (max-width: 600px) {
  .slide { padding: 0; gap: 0; }
  .stage { border-radius: 0; height: 100%; width: 100%; aspect-ratio: auto; }
  .rail { position: absolute; right: 10px; bottom: 90px; padding: 0; }
  .stage .info { padding-right: 76px; }
}
/* Lautstärke: Symbol = stumm an/aus, Regler fährt beim Drüberfahren aus */
.volume { position: absolute; top: 14px; left: 16px; z-index: 5; display: flex; align-items: center; height: 40px; padding: 0 4px 0 0;
  border-radius: 99px; background: rgba(118, 118, 128, 0.3); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.vol-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: none; }
.vol-btn svg { width: 20px; height: 20px; }
.volume input[type=range] { width: 0; opacity: 0; padding: 0; margin: 0; background: none; accent-color: #fff; cursor: pointer;
  transition: width 260ms var(--ease), opacity 180ms var(--ease), margin 260ms var(--ease); }
.volume:hover input[type=range], .volume:focus-within input[type=range], .volume.dragging input[type=range] { width: 110px; opacity: 1; margin: 0 10px 0 2px; }
@media (hover: none) { .volume input[type=range] { width: 96px; opacity: 1; margin: 0 10px 0 2px; } }
.feed-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; }
.feed-empty .big { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.feed-empty p { color: var(--label-2); margin: 0 0 18px; }
.feed-empty a.btn { background: var(--blue); color: #fff; }
.working { position: absolute; top: 14px; right: 16px; z-index: 5; display: flex; align-items: center; gap: 8px; font-size: 0.8rem;
  padding: 7px 12px 7px 9px; border-radius: 99px; background: rgba(118, 118, 128, 0.3); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--label); }
.working .spinner { width: 14px; height: 14px; border-width: 2px; }

/* ---------- Editor (Sheet) ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, 0.6); animation: fade 200ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--surface-solid); border: 0.5px solid rgba(255, 255, 255, 0.1); border-radius: 22px; width: min(1100px, 100%);
  max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: sheet-in 380ms var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 0.5px solid var(--separator); }
.sheet-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-tools { display: flex; gap: 8px; }
.icon-btn.like[aria-pressed="true"] { color: var(--pink); }
.sheet-body { display: grid; grid-template-columns: minmax(240px, 330px) 1fr; gap: 22px; padding: 18px 20px 20px; overflow: auto; }
@media (max-width: 760px) { .sheet-body { grid-template-columns: 1fr; } .modal { padding: 0; } .sheet { border-radius: 0; max-height: 100dvh; height: 100dvh; } }
.preview { display: flex; flex-direction: column; gap: 10px; }
.video-box { position: relative; }
.video-box video { width: 100%; aspect-ratio: 9 / 16; max-height: 66vh; background: #000; border-radius: 14px; display: block; }
.busy { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.78); border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: var(--label-2); font-size: 0.82rem; text-align: center; padding: 20px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel .input-label input { font-size: 1rem; font-weight: 600; color: var(--label); }
.field { display: flex; flex-direction: column; gap: 9px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.8rem; color: var(--label-2); font-weight: 600; }
.size { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.size input { width: 120px; padding: 0; accent-color: var(--blue); background: none; }
.speakers { display: flex; flex-wrap: wrap; gap: 8px; }
.spk { display: flex; align-items: center; gap: 6px; background: var(--fill-2); border: 1px solid transparent; border-radius: 99px; padding: 4px 5px 4px 4px;
  transition: border-color 150ms, box-shadow 150ms; }
.spk.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25); }
.spk input[type=color] { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.spk input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.spk input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, 0.5); border-radius: 50%; }
.spk input[type=text] { width: 96px; padding: 3px 6px; font-size: 0.82rem; background: transparent; }
.spk button { padding: 4px 10px; font-size: 0.76rem; border-radius: 99px; }
.spk.active button { background: var(--blue); }
.words { background: #000; border-radius: 14px; padding: 12px; max-height: 38vh; overflow: auto; line-height: 2.15; font-weight: 700; font-size: 0.95rem; }
.w { padding: 3px 5px; border-radius: 7px; cursor: text; outline: none; text-shadow: 0 1px 2px #000; transition: background-color 120ms; }
.w:hover { background: rgba(255, 255, 255, 0.08); }
.w:focus { background: rgba(255, 255, 255, 0.14); box-shadow: 0 0 0 1.5px var(--blue); }
.w.now { background: rgba(10, 132, 255, 0.4); }
.w.cut { opacity: 0.3; text-decoration: line-through; }
.w.empty { display: inline-block; min-width: 18px; border: 1px dashed var(--red); }
.words.painting .w { cursor: crosshair; }
.ai { background: rgba(217, 119, 87, 0.08); border: 0.5px solid rgba(217, 119, 87, 0.35); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.ai-msg { font-size: 0.84rem; background: rgba(0, 0, 0, 0.35); border-radius: 10px; padding: 9px 11px; }

/* ---------- Profil-Reiter, Uploads, Verbindungen ---------- */
.page-inner.medium { max-width: 860px; }
button.small, .btn.small { padding: 7px 12px; font-size: 0.84rem; border-radius: 10px; }
.btn.primary { background: var(--blue); color: #fff; }
.profile-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.profile-head .page-title { margin: 0; }
.tabs { display: flex; gap: 4px; background: var(--fill-2); padding: 3px; border-radius: 11px; }
.tabs a { color: var(--label-2); font-size: 0.86rem; font-weight: 600; padding: 6px 14px; border-radius: 8px; transition: background-color 150ms, color 150ms; }
.tabs a:hover { color: var(--label); }
.tabs a.active { background: #636366; color: var(--label); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.subview { animation: fade 220ms var(--ease); }
.check { display: flex; align-items: center; gap: 9px; font-size: 0.88rem; color: var(--label); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }

/* Plattform-Zeichen */
.pf { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; flex: none; color: #fff; font-size: 0.6rem; line-height: 1; }
.pf.large { width: 40px; height: 40px; border-radius: 11px; font-size: 1.15rem; }
.pf.youtube { background: #ff0033; }
.pf.youtube::before { content: "▶"; margin-left: 1px; }
.pf.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.pf.instagram::before { content: "◎"; font-weight: 700; }
.pf.tiktok { background: #111; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.pf.tiktok::before { content: "♪"; text-shadow: -1px -1px 0 #25f4ee, 1px 1px 0 #fe2c55; font-weight: 700; }

/* Filter + Liste */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; font-size: 0.84rem; font-weight: 600; background: var(--fill-2); color: var(--label-2); gap: 7px; }
.chip.active { background: var(--label); color: #000; }
.toolbar-right { display: flex; gap: 8px; align-items: center; }
.toolbar-right select { width: auto; padding: 7px 30px 7px 12px; font-size: 0.84rem; border-radius: 10px; }
.up-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--label-2); }
.up-stats span { display: inline-flex; align-items: center; gap: 5px; }
.up-stats b { color: var(--label); font-weight: 650; font-variant-numeric: tabular-nums; }
.up-stats .na { opacity: 0.45; }
.up-stats .sorted b { color: var(--blue); }
.upload-list { display: flex; flex-direction: column; background: var(--surface-solid); border-radius: var(--radius-lg); overflow: hidden; }
.up-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-top: 0.5px solid var(--separator); }
.up-row:first-child { border-top: 0; }
.up-thumb { position: relative; width: 54px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: #111; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-thumb .pf { position: absolute; left: 4px; bottom: 4px; }
.up-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.up-title { font-weight: 650; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-sub { color: var(--label-2); font-size: 0.78rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.up-err { color: #ffb3ad; font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-actions { display: flex; gap: 6px; align-items: center; }
.up-actions a.btn, .up-actions button { padding: 6px 11px; font-size: 0.8rem; border-radius: 9px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--fill-2); color: var(--label-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--green); background: rgba(48, 209, 88, 0.14); }
.pill.processing, .pill.uploading, .pill.queued { color: #ffd60a; background: rgba(255, 214, 10, 0.12); }
.pill.inbox { color: #64d2ff; background: rgba(100, 210, 255, 0.14); }
.pill.failed { color: var(--red); background: rgba(255, 69, 58, 0.14); }
.pill.removed, .pill.deleted { color: var(--label-3); }
.bar { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; width: 140px; }
.bar i { display: block; height: 100%; background: var(--blue); transition: width 300ms var(--ease); }
@media (max-width: 600px) { .up-row { grid-template-columns: 46px 1fr; } .up-thumb { width: 46px; } .up-actions { grid-column: 1 / -1; justify-content: flex-end; } }

/* Verbindungen */
.platform-list { display: flex; flex-direction: column; gap: 12px; }
.pcard { background: var(--surface-solid); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pcard-top { display: flex; align-items: center; gap: 14px; }
.pcard-name { font-weight: 700; letter-spacing: -0.01em; }
.pcard-state { color: var(--label-2); font-size: 0.82rem; display: flex; align-items: center; gap: 6px; }
.pcard-state.on { color: var(--green); }
.pcard-stats { display: flex; gap: 14px; margin-top: 4px; font-size: 0.8rem; color: var(--label-2); }
.pcard-stats b { color: var(--label); font-weight: 650; }
.pcard-top .grow { flex: 1; min-width: 0; }
.pcard .limits { margin: 0; font-size: 0.78rem; color: var(--label-2); line-height: 1.45; }
.pcard details { margin: 0; }
.pcard summary { font-size: 0.84rem; color: var(--blue); }
.setup { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.setup ol { margin: 0; padding-left: 20px; color: var(--label-2); font-size: 0.82rem; line-height: 1.6; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem; }
.sim-note { font-size: 0.8rem; color: #ffd60a; background: rgba(255, 214, 10, 0.1); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }

/* Upload-Dialog */
.upload-sheet { width: min(860px, 100%); }
.upload-body { grid-template-columns: 220px 1fr; }
@media (max-width: 760px) { .upload-body { grid-template-columns: 1fr; } .up-preview { max-height: 260px; justify-self: center; } }
.up-preview { width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; object-fit: cover; }
.targets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .targets { grid-template-columns: 1fr; } }
.target { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 14px; text-align: left;
  background: var(--fill-2); border: 1.5px solid transparent; font-weight: 600; font-size: 0.86rem; white-space: normal; }
.target small { color: var(--label-2); font-weight: 500; font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.target[aria-pressed="true"] { border-color: var(--blue); background: rgba(10, 132, 255, 0.12); }
.target[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 10px; right: 12px; color: var(--blue); font-weight: 800; }
.target.off { opacity: 0.55; }
.target.off small { color: var(--blue); }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.options .check { grid-column: 1 / -1; }
.preview-caption { white-space: pre-wrap; font-size: 0.8rem; color: var(--label-2); background: #000; border-radius: 12px; padding: 10px 12px; max-height: 120px; overflow: auto; }
.preview-caption:empty { display: none; }

/* Mac-Worker-Status */
.studio-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.studio-head .page-title { margin: 0; }
.worker-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; padding: 6px 12px;
  border-radius: 99px; background: rgba(48, 209, 88, 0.14); color: var(--green); }
.worker-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.worker-pill.off { background: rgba(255, 214, 10, 0.12); color: #ffd60a; }

/* Viralen Clip erstellen */
.viral-btn { margin-left: auto; padding: 10px 18px; border-radius: 99px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #bf5af2, #ff375f 55%, #ff9f0a); box-shadow: 0 6px 20px rgba(255, 55, 95, 0.3); }
.viral-btn:hover:not(:disabled) { filter: brightness(1.08); }
.viral-btn .spark { display: inline-block; transition: transform 400ms var(--ease); }
.viral-btn:hover .spark { transform: rotate(72deg) scale(1.15); }
.viral-btn.busy .spark, .viral-fab.busy { animation: spin 1s linear infinite; }
.viral-fab { position: absolute; right: 18px; bottom: 22px; z-index: 6; width: 52px; height: 52px; padding: 0; border-radius: 50%;
  font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, #bf5af2, #ff375f 55%, #ff9f0a);
  box-shadow: 0 8px 24px rgba(255, 55, 95, 0.35); }
@media (max-width: 600px) { .viral-fab { top: 64px; right: 16px; bottom: auto; width: 40px; height: 40px; font-size: 1rem; } }

/* Anzahl + Erstellen */
.create-group { display: inline-flex; align-items: center; gap: 6px; }
.viral-group { margin-left: auto; }
.viral-group .viral-btn { margin-left: 0; }
select.count { width: auto; padding: 6px 24px 6px 10px; font-size: 0.82rem; font-weight: 600; border-radius: 10px;
  background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; }
.spinner.small { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; }
.cancel-btn { margin-top: 4px; padding: 6px 14px; font-size: 0.8rem; border-radius: 99px; background: rgba(255, 255, 255, 0.14); color: var(--label); }
.cancel-btn:hover { background: rgba(255, 69, 58, 0.3); }
.tile .state { gap: 10px; }
.streamer { flex-wrap: wrap; }

/* Speicher */
.disk { margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.disk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.disk-head b { font-size: 1.5rem; letter-spacing: -0.02em; }
.disk-bar { height: 12px; border-radius: 6px; background: var(--fill); overflow: hidden; display: flex; }
.disk-bar i { display: block; height: 100%; transition: width 400ms var(--ease); }
.disk-bar .other, .sw.other { background: #636366; }
.disk-bar .app, .sw.app { background: linear-gradient(90deg, #bf5af2, #ff375f); }
.sw.free { background: var(--fill); }
.disk-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--label-2); }
.disk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.size-col { text-align: right; min-width: 74px; }
.size-col b { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.size-col span { font-size: 0.72rem; color: var(--label-2); }
.st-badges { display: inline-flex; gap: 4px; align-items: center; }
.st-badges .heart { color: var(--pink); }
.up-row.removing { opacity: 0; transform: translateX(20px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.storage-row { grid-template-columns: 54px 1fr auto auto; }
@media (max-width: 600px) { .storage-row { grid-template-columns: 46px 1fr auto; } .storage-row .up-actions { grid-column: 1 / -1; } }

/* Auswahl läuft */
.pick-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; padding: 6px 12px;
  border-radius: 99px; background: rgba(191, 90, 242, 0.16); color: #e0b3ff; }
.pick-pill .spinner { width: 14px; height: 14px; border-width: 2px; }
.feed-view .pick-pill { position: absolute; top: 60px; right: 16px; z-index: 5; }

/* Automatik */
.auto-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.auto-form select { width: auto; }
.auto-form .auto-text { font-weight: 600; }
.auto-form button { margin-left: auto; }
.auto-row { grid-template-columns: 44px 1fr auto; }
.auto-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem;
  background: linear-gradient(135deg, #bf5af2, #ff375f 55%, #ff9f0a); }
.auto-icon.streamer { background: rgba(145, 70, 255, 0.25); color: var(--twitch); font-weight: 800; font-size: 1rem; }
.auto-row.paused { opacity: 0.6; }
.auto-result { font-size: 0.78rem; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.on { color: var(--green); background: rgba(48, 209, 88, 0.14); }
.pill.off { color: var(--label-3); }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; gap: 4px; }
.switch { appearance: none; width: 46px; height: 28px; flex: none; border-radius: 99px; background: var(--fill); position: relative;
  cursor: pointer; transition: background-color 200ms var(--ease); padding: 0; border: 0; }
.switch::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, 0.3); transition: transform 260ms var(--ease); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(18px); }
.inline-num { width: 64px; display: inline-block; padding: 3px 6px; margin: 0 2px; text-align: center; }

.awake { display: flex; gap: 14px; align-items: flex-start; }
.awake .dot-big { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--label-3); }
.awake .dot-big.on { background: var(--green); box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.2); }
.awake .dot-big.warn { background: #ffd60a; }
.awake b { display: block; margin-bottom: 2px; }
.awake code { font-size: 0.8rem; background: var(--fill-2); padding: 1px 6px; border-radius: 6px; }

.left-col { display: flex; flex-direction: column; gap: 14px; }
.link-card .copy-row input { font-family: inherit; font-size: 0.9rem; }
.link-card { display: flex; flex-direction: column; gap: 12px; }
.wish-label textarea { font-size: 0.88rem; }

/* Hinweis unten */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(44, 44, 46, 0.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 0.5px solid rgba(255, 255, 255, 0.12);
  padding: 10px 16px; border-radius: 99px; font-size: 0.88rem; font-weight: 500; transition: opacity 200ms var(--ease), transform 300ms var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { color: #ffb3ad; }

/* ---------- Barrierefreiheit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 120ms !important; }
  .menu, .toast, .seg-indicator { transform: none !important; }
  .burst { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .menu, .toast { background: #2c2c2e; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --label-2: rgba(235, 235, 245, 0.85); --separator: #8e8e93; }
  .surface, .sheet, .menu { border: 1px solid #8e8e93; }
}
