/* =========================================================================
   NinoDrive – „Sakura“-Design
   Hintergrundbild + fallende Kirschblüten + Milchglas. Pink wie Ninos Haar,
   Lavendel wie ihre Augen, schwarz wie ihre Schmetterlingsschleifen.
   ========================================================================= */

/* ---- Schriften (liegen auf dem eigenen Server – keine Verbindung zu Google) ---- */

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/m-plus-rounded-1c-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Mochiy Pop One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/mochiy-pop-one-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font: "M PLUS Rounded 1c", "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-display: "Mochiy Pop One", "M PLUS Rounded 1c", system-ui, sans-serif;

  --pink: #e24c8a;
  --pink-strong: #c9387a;
  --pink-ink: #b0266a;
  --pink-grad: linear-gradient(135deg, #f58bb6 0%, #e24c8a 55%, #c9387a 100%);
  --pink-soft: rgba(255, 160, 200, 0.42);
  --pink-softer: rgba(255, 205, 226, 0.45);
  --lav: #8a72d6;
  --lav-grad: linear-gradient(135deg, #f7a8c8 0%, #c9a8f0 100%);
  --ribbon: #1d1a22;

  --text: #3b2140;
  --text-2: #6c5272;
  --text-3: #9d86a3;
  --on-scene: #3b2140;
  --on-scene-shadow: 0 1px 12px rgba(255, 255, 255, 0.8);

  --glass: rgba(255, 255, 255, 0.44);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-soft: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-line: rgba(150, 80, 120, 0.14);
  --blur: blur(10px) saturate(1.4);
  --surface: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.62);
  --surface-3: rgba(255, 225, 238, 0.7);
  --border: rgba(160, 90, 130, 0.16);
  --border-strong: rgba(160, 90, 130, 0.3);
  --overlay: rgba(70, 25, 60, 0.28);

  --danger: #d0304a;
  --danger-soft: rgba(255, 215, 222, 0.8);
  --success: #1f845a;
  --warning: #b86e00;

  --shadow-sm: 0 2px 8px rgba(140, 50, 100, 0.08);
  --shadow: 0 10px 30px rgba(140, 50, 100, 0.16);
  --shadow-lg: 0 24px 60px rgba(110, 30, 80, 0.28);
  --focus: 0 0 0 3px rgba(226, 76, 138, 0.35);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;

  --scene-tint: linear-gradient(180deg, rgba(255, 244, 250, 0.16) 0%, rgba(255, 240, 248, 0.04) 45%, rgba(248, 236, 252, 0.22) 100%);

  /* Diagramm-Farben (farbenblind-geprüft) */
  --c-image: #d9467f;
  --c-video: #2f7fd0;
  --c-audio: #e3a21a;
  --c-document: #5b3aa8;
  --c-other: #1f9d74;
  --c-trash: #a397a8;

  /* Dateityp-Symbole */
  --ic-folder: #e24c8a;
  --ic-image: #d9467f;
  --ic-video: #d0304a;
  --ic-audio: #8a4fd0;
  --ic-pdf: #c7303f;
  --ic-doc: #2f7fd0;
  --ic-sheet: #1f845a;
  --ic-slides: #d98a0a;
  --ic-archive: #8a6a52;
  --ic-code: #3c3346;
  --ic-text: #6c5272;
  --ic-file: #8e8195;

  /* Hintergrund-Motive */
  --preset-sakura:
    radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.95) 0 3px, transparent 30px),
    radial-gradient(circle at 74% 16%, rgba(255, 255, 255, 0.85) 0 4px, transparent 38px),
    radial-gradient(circle at 88% 64%, rgba(255, 228, 240, 0.95) 0 5px, transparent 46px),
    radial-gradient(circle at 36% 80%, rgba(255, 255, 255, 0.8) 0 3px, transparent 34px),
    radial-gradient(circle at 56% 40%, rgba(255, 206, 228, 0.8) 0 6px, transparent 70px),
    radial-gradient(circle at 6% 58%, rgba(255, 255, 255, 0.7) 0 4px, transparent 40px),
    radial-gradient(1000px 700px at 12% 6%, #ffdcec 0%, transparent 62%),
    radial-gradient(900px 650px at 92% 12%, #e8d8ff 0%, transparent 60%),
    radial-gradient(1000px 760px at 72% 104%, #ffbcd6 0%, transparent 62%),
    radial-gradient(760px 640px at -4% 100%, #d8c2f6 0%, transparent 60%),
    linear-gradient(160deg, #fff2f8 0%, #fbe0ee 45%, #ece0fb 100%);
  --preset-lavendel:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.9) 0 3px, transparent 32px),
    radial-gradient(circle at 80% 22%, rgba(255, 255, 255, 0.8) 0 5px, transparent 44px),
    radial-gradient(circle at 64% 76%, rgba(240, 225, 255, 0.9) 0 4px, transparent 40px),
    radial-gradient(1000px 700px at 85% 0%, #e2d2ff 0%, transparent 60%),
    radial-gradient(900px 700px at 0% 30%, #f6d9f0 0%, transparent 60%),
    radial-gradient(900px 700px at 60% 110%, #c9b3f5 0%, transparent 60%),
    linear-gradient(170deg, #f8f2ff 0%, #ece0ff 50%, #dccbfa 100%);
  --preset-abendrot:
    radial-gradient(circle at 26% 36%, rgba(255, 245, 230, 0.9) 0 4px, transparent 40px),
    radial-gradient(circle at 78% 30%, rgba(255, 235, 240, 0.8) 0 5px, transparent 48px),
    radial-gradient(1100px 600px at 50% -10%, #ffd9bf 0%, transparent 60%),
    radial-gradient(900px 700px at 100% 50%, #ffabc6 0%, transparent 60%),
    radial-gradient(900px 700px at 0% 90%, #c49be8 0%, transparent 62%),
    linear-gradient(175deg, #ffe9da 0%, #ffc2d4 45%, #c7a4ec 100%);
  --preset-nacht:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.9) 0 1.5px, transparent 3px),
    radial-gradient(circle at 34% 8%, rgba(255, 255, 255, 0.8) 0 1px, transparent 3px),
    radial-gradient(circle at 58% 22%, rgba(255, 220, 240, 0.9) 0 1.5px, transparent 3px),
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.8) 0 1px, transparent 3px),
    radial-gradient(circle at 92% 38%, rgba(255, 255, 255, 0.7) 0 1.5px, transparent 3px),
    radial-gradient(circle at 24% 44%, rgba(255, 255, 255, 0.6) 0 1px, transparent 3px),
    radial-gradient(900px 600px at 80% 90%, rgba(226, 76, 138, 0.45) 0%, transparent 60%),
    radial-gradient(800px 600px at 10% 80%, rgba(138, 114, 214, 0.35) 0%, transparent 60%),
    linear-gradient(165deg, #2c1836 0%, #1c1124 55%, #110a16 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --pink: #f47aab;
    --pink-strong: #ff96c0;
    --pink-ink: #ffa8cb;
    --pink-soft: rgba(244, 122, 171, 0.3);
    --pink-softer: rgba(244, 122, 171, 0.16);
    --text: #f8ebf3;
    --text-2: #d5bfd0;
    --text-3: #9f8a9d;
    --on-scene: #fff;
    --on-scene-shadow: 0 2px 16px rgba(20, 5, 20, 0.7);
    --glass: rgba(34, 20, 40, 0.55);
    --glass-strong: rgba(40, 25, 46, 0.92);
    --glass-soft: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-line: rgba(255, 255, 255, 0.08);
    --surface: #2a1c30;
    --surface-2: rgba(255, 255, 255, 0.08);
    --surface-3: rgba(255, 255, 255, 0.13);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);
    --overlay: rgba(8, 3, 10, 0.55);
    --danger: #ff6b81;
    --danger-soft: rgba(255, 107, 129, 0.16);
    --success: #4cc48e;
    --warning: #f0a93b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --scene-tint: linear-gradient(180deg, rgba(18, 8, 22, 0.52) 0%, rgba(18, 8, 22, 0.6) 100%);
    --c-image: #e0528e;
    --c-video: #4f97e6;
    --c-audio: #b87c0c;
    --c-document: #9a7ae8;
    --c-other: #1f9d74;
    --c-trash: #75687a;
    --ic-folder: #f47aab;
    --ic-image: #f07aa9;
    --ic-video: #ff6b81;
    --ic-audio: #b48cf0;
    --ic-pdf: #ff6b6b;
    --ic-doc: #6fb3ee;
    --ic-sheet: #4cc48e;
    --ic-slides: #f0a93b;
    --ic-archive: #c4a080;
    --ic-code: #d9cfe0;
    --ic-text: #d5bfd0;
    --ic-file: #a594a8;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --pink: #f47aab;
  --pink-strong: #ff96c0;
  --pink-ink: #ffa8cb;
  --pink-soft: rgba(244, 122, 171, 0.3);
  --pink-softer: rgba(244, 122, 171, 0.16);
  --text: #f8ebf3;
  --text-2: #d5bfd0;
  --text-3: #9f8a9d;
  --on-scene: #fff;
  --on-scene-shadow: 0 2px 16px rgba(20, 5, 20, 0.7);
  --glass: rgba(34, 20, 40, 0.55);
  --glass-strong: rgba(40, 25, 46, 0.92);
  --glass-soft: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-line: rgba(255, 255, 255, 0.08);
  --surface: #2a1c30;
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-3: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --overlay: rgba(8, 3, 10, 0.55);
  --danger: #ff6b81;
  --danger-soft: rgba(255, 107, 129, 0.16);
  --success: #4cc48e;
  --warning: #f0a93b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --scene-tint: linear-gradient(180deg, rgba(18, 8, 22, 0.52) 0%, rgba(18, 8, 22, 0.6) 100%);
  --c-image: #e0528e;
  --c-video: #4f97e6;
  --c-audio: #b87c0c;
  --c-document: #9a7ae8;
  --c-other: #1f9d74;
  --c-trash: #75687a;
  --ic-folder: #f47aab;
  --ic-image: #f07aa9;
  --ic-video: #ff6b81;
  --ic-audio: #b48cf0;
  --ic-pdf: #ff6b6b;
  --ic-doc: #6fb3ee;
  --ic-sheet: #4cc48e;
  --ic-slides: #f0a93b;
  --ic-archive: #c4a080;
  --ic-code: #d9cfe0;
  --ic-text: #d5bfd0;
  --ic-file: #a594a8;
}

/* Auf Fotos und dem Nacht-Motiv steht Text direkt auf dem Bild immer hell */
:root[data-scene="image"],
:root[data-scene="nacht"] {
  --on-scene: #fff;
  --on-scene-shadow: 0 1px 3px rgba(40, 10, 30, 0.6), 0 2px 18px rgba(40, 10, 30, 0.6);
}

/* ---- Grundlagen -------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: #fbe3ef;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--pink-ink);
}

::selection {
  background: rgba(255, 150, 195, 0.45);
}

svg.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-2);
}

.tiny {
  font-size: 12px;
}

.glass,
.sidebar,
.main,
.details,
.menu,
.modal,
.upload-panel,
.search-drop,
.auth-panel,
.public-card,
.brand-pill,
.top-actions {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* ---- Szene: Hintergrund & Kirschblüten -------------------------------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scene-img {
  position: absolute;
  inset: 0;
  background-color: #fbe3ef;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 0.4s;
}

.preset-sakura {
  background: var(--preset-sakura);
}

.preset-lavendel {
  background: var(--preset-lavendel);
}

.preset-abendrot {
  background: var(--preset-abendrot);
}

.preset-nacht {
  background: var(--preset-nacht);
}

.scene-tint {
  position: absolute;
  inset: 0;
  background: var(--scene-tint);
}

.petals {
  position: absolute;
  inset: 0;
}

.petal {
  position: absolute;
  top: -40px;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 0.78);
  border-radius: 100% 0 100% 0;
  background: radial-gradient(circle at 30% 30%, #fff 0 12%, #ffd0e1 40%, #f68db4 100%);
  opacity: var(--o);
  filter: drop-shadow(0 2px 3px rgba(200, 70, 130, 0.25));
  animation: petal-fall var(--d) linear var(--delay) infinite;
  will-change: transform;
}

@keyframes petal-fall {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(var(--r)) rotateX(0deg);
  }
  25% {
    transform: translate3d(var(--sway), 25vh, 0) rotate(calc(var(--r) + 80deg)) rotateX(55deg);
  }
  50% {
    transform: translate3d(calc(var(--sway) * -0.6), 55vh, 0) rotate(calc(var(--r) + 170deg)) rotateX(0deg);
  }
  75% {
    transform: translate3d(var(--sway), 82vh, 0) rotate(calc(var(--r) + 260deg)) rotateX(55deg);
  }
  100% {
    transform: translate3d(calc(var(--sway) * 0.3), 110vh, 0) rotate(calc(var(--r) + 360deg)) rotateX(0deg);
  }
}

/* Die Seiteninhalte liegen über der Szene (Menüs, Dialoge & Co. haben eigene z-Werte) */
.app,
.auth,
.public-wrap {
  position: relative;
  z-index: 1;
}

/* ---- Logo -------------------------------------------------------------- */

/* Logo: pinker Ordner mit „N“ – auch als Deko überall in der App */
.brand-mark {
  display: block;
  flex: none;
  filter: drop-shadow(0 4px 10px rgba(200, 60, 130, 0.35));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex: none;
}

.brand .brand-mark {
  width: 36px;
  height: 36px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.08);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--text);
  white-space: nowrap;
}

.brand-name b {
  color: var(--pink);
  font-weight: 400;
}

.brand-pill {
  padding: 6px 18px 6px 7px;
  border-radius: 999px;
  height: 50px;
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s, filter 0.15s;
}

.btn:hover {
  background: var(--surface);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.nav-item:focus-visible,
.item:focus-visible,
.chip:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn.primary {
  background: var(--pink-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(226, 76, 138, 0.35);
}

.btn.primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(226, 76, 138, 0.45);
}

.btn.danger {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--pink-ink);
}

.btn.ghost:hover {
  background: var(--pink-softer);
}

.btn.small {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  flex: none;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.icon-btn.active {
  background: var(--pink-soft);
  color: var(--pink-ink);
}

.icon-btn.small {
  width: 32px;
  height: 32px;
}

.icon-btn.small svg.i {
  width: 18px;
  height: 18px;
}

.seg {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  flex: none;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.seg button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.seg button + button {
  border-left: 1px solid var(--glass-line);
}

.seg button.active {
  background: var(--pink-soft);
  color: var(--pink-ink);
}

.seg svg.i {
  width: 18px;
  height: 18px;
}

/* ---- Formulare --------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field > span,
.field > label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.input,
.select,
textarea.input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: var(--glass-strong);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

textarea.input {
  height: auto;
  min-height: 90px;
  padding: 10px 14px;
  resize: vertical;
}

.input:focus,
.select:focus {
  border-color: var(--pink);
  box-shadow: var(--focus);
  background: var(--surface);
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  font-size: 12.5px;
  font-weight: 700;
}

.field-hint:empty {
  display: none;
}

.field-hint svg.i {
  width: 15px;
  height: 15px;
  flex: none;
}

.field-hint.ok {
  color: var(--success);
}

.field-hint.err {
  color: var(--danger);
}

.field-hint.checking {
  color: var(--text-2);
}

.field-hint .hint-fix {
  border: 0;
  padding: 0;
  background: none;
  color: var(--pink-ink);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row .input {
  flex: 1;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch .track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  transition: background 0.2s;
  flex: none;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.switch input:checked + .track {
  background: var(--pink-grad);
}

.switch input:checked + .track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .track {
  box-shadow: var(--focus);
}

/* ---- Avatare ----------------------------------------------------------- */

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex: none;
  text-transform: uppercase;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
  user-select: none;
  object-fit: cover;
}

img.avatar {
  background: var(--surface-3);
}

.avatar.lg {
  width: 76px;
  height: 76px;
  font-size: 28px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(140, 50, 100, 0.25);
}

.avatar.xl {
  width: 112px;
  height: 112px;
  font-size: 40px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 12px 28px rgba(140, 50, 100, 0.28);
}

.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 11px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}

.avatar-btn {
  border: 0;
  padding: 3px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: grid;
}

.avatar-btn:hover {
  background: var(--pink-soft);
}

/* ---- App-Layout -------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) auto;
  grid-template-rows: 76px minmax(0, 1fr);
  grid-template-areas:
    "top top top"
    "side main details";
  height: 100vh;
  height: 100dvh;
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
}

.topbar .brand {
  width: 240px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 4px;
  border-radius: 999px;
}

.only-mobile {
  display: none !important;
}

.topbar > .icon-btn {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  color: var(--text);
}

/* Suche – weiß wie bei Chrome */
.search {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 680px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: 0 6px 22px rgba(140, 50, 100, 0.16);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: box-shadow 0.2s, background 0.2s;
}

.search-box:focus-within {
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(140, 50, 100, 0.25), var(--focus);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
}

.search-box input::placeholder {
  color: var(--text-3);
}

.search-drop {
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  border-radius: 22px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 60;
}

.search-drop .sd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  cursor: pointer;
}

.search-drop .sd-item:hover,
.search-drop .sd-item.active {
  background: var(--pink-softer);
}

.search-drop .sd-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-drop .sd-empty {
  padding: 14px;
  color: var(--text-2);
  text-align: center;
}

/* Seitenleiste */
.sidebar {
  grid-area: side;
  display: flex;
  flex-direction: column;
  margin: 0 12px 16px 16px;
  padding: 16px 12px;
  border-radius: var(--radius-xl);
  overflow-y: auto;
  min-height: 0;
}

.new-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  height: 54px;
  padding: 0 26px 0 12px;
  margin: 0 0 16px 2px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 22px rgba(140, 50, 100, 0.18);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s, background 0.2s;
}

.new-btn:hover {
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(140, 50, 100, 0.26);
  transform: translateY(-1px);
}

.new-btn .plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pink-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(226, 76, 138, 0.4);
}

.new-btn .plus svg.i {
  width: 20px;
  height: 20px;
  stroke-width: 2.6;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface-2);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 150, 195, 0.55), rgba(205, 175, 245, 0.4));
  color: var(--pink-ink);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.nav-item.drop-target {
  background: var(--pink-soft);
  box-shadow: inset 0 0 0 2px var(--pink);
}

.nav-sep {
  height: 1px;
  background: var(--glass-line);
  margin: 10px 12px;
}

.storage-meter {
  padding: 10px 16px 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  border-radius: 16px;
}

.storage-meter:hover {
  background: var(--surface-2);
}

.meter {
  height: 7px;
  border-radius: 999px;
  background: rgba(160, 90, 130, 0.14);
  overflow: hidden;
  margin: 8px 0 6px;
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lav-grad);
  transition: width 0.5s ease;
}

.meter.warn > span {
  background: var(--warning);
}

.meter.full > span {
  background: var(--danger);
}

/* „Nino sagt“ – wechselnde Sprüche */
.nino-card {
  margin: auto 2px 0;
  padding: 14px;
  border-radius: 20px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  font-size: 12.5px;
  color: var(--text-2);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
  min-height: 92px;
  transition: background 0.2s;
}

.nino-card:hover {
  background: var(--surface-2);
}

.nino-card .brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  margin-top: 2px;
  animation: flutter 3.2s ease-in-out infinite;
}

.nino-card .nc-body {
  flex: 1;
  min-width: 0;
}

.nino-card b {
  color: var(--text);
}

.nino-card .nc-text {
  display: block;
  font-style: italic;
  transition: opacity 0.25s, transform 0.25s;
}

.nino-card .nc-text.out {
  opacity: 0;
  transform: translateY(4px);
}

.nino-card .nc-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.nino-card .nc-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.nino-card .nc-dots i.on {
  background: var(--pink);
  width: 14px;
  border-radius: 3px;
}

/* Hauptbereich */
.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0 16px 16px 0;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.main-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 6px 24px;
  min-height: 66px;
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumb:hover {
  background: var(--surface-2);
  color: var(--text);
}

.crumb.current {
  max-width: 460px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
}

.crumb.drop-target {
  background: var(--pink-soft);
  box-shadow: inset 0 0 0 2px var(--pink);
}

.crumb-sep {
  color: var(--text-3);
  display: inline-grid;
}

.crumb-sep svg.i {
  width: 18px;
  height: 18px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 48px;
  padding: 4px 24px 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-soft);
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.chip:hover {
  background: var(--surface-2);
}

.chip.active {
  background: var(--pink-soft);
  border-color: var(--pink);
  color: var(--pink-ink);
  font-weight: 700;
}

.chip svg.i {
  width: 16px;
  height: 16px;
}

.selbar {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 46px;
  padding: 0 8px 0 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 175, 210, 0.45), rgba(210, 185, 250, 0.35));
  border: 1px solid var(--glass-border);
  animation: pop-in 0.18s ease-out;
}

.selbar .count {
  font-weight: 800;
  margin: 0 10px 0 4px;
  white-space: nowrap;
}

.sort-btn {
  margin-left: auto;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 40px;
  position: relative;
  outline: none;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-2);
  margin: 12px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Rasteransicht ----------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.item {
  position: relative;
  user-select: none;
  cursor: default;
  outline: none;
}

.folder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 4px 0 16px;
  border-radius: 18px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  transition: background 0.12s, box-shadow 0.12s, transform 0.12s;
}

.folder-card:hover {
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.file-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  padding: 4px 4px 10px;
  transition: background 0.12s, box-shadow 0.12s, transform 0.12s;
}

.file-card:hover {
  background: var(--surface-2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.file-card .fc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 0 0 12px;
}

.file-card .thumb {
  height: 150px;
  margin: 0 6px;
  border-radius: 14px;
  background: var(--glass-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.file-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-card .thumb .big-icon svg.i {
  width: 64px;
  height: 64px;
  stroke-width: 1.5;
}

.file-card .fc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 0 12px;
  font-size: 12px;
  color: var(--text-2);
  min-width: 0;
}

.file-card .fc-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.item .badges {
  display: inline-flex;
  gap: 2px;
  color: var(--text-3);
  flex: none;
}

.item .badges svg.i {
  width: 15px;
  height: 15px;
}

.item .badges .star {
  color: var(--pink);
  fill: var(--pink);
}

.item.selected.folder-card,
.item.selected.file-card {
  background: linear-gradient(135deg, rgba(255, 170, 205, 0.55), rgba(215, 190, 250, 0.45));
  box-shadow: inset 0 0 0 2px var(--pink);
}

.item.drop-target.folder-card,
.item.drop-target.row {
  background: var(--pink-soft);
  box-shadow: inset 0 0 0 2px var(--pink), 0 6px 18px rgba(226, 76, 138, 0.3);
}

.more-btn {
  opacity: 0.75;
}

.item:hover .more-btn,
.item.selected .more-btn {
  opacity: 1;
}

/* Dateityp-Symbole */
.ficon {
  display: inline-grid;
  place-items: center;
  flex: none;
}

.ficon svg.i {
  width: 22px;
  height: 22px;
}

.ficon.folder svg {
  width: 24px;
  height: 24px;
}

.ficon .folder-shape {
  stroke: none;
}

.ficon-wrap {
  position: relative;
  display: inline-grid;
}

.ficon-wrap .shared-dot {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--text-2);
}

.ficon-wrap .shared-dot svg.i {
  width: 10px;
  height: 10px;
  stroke-width: 2.6;
}

/* ---- Listenansicht ----------------------------------------------------- */

.list {
  display: flex;
  flex-direction: column;
}

.list-head,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px 110px 44px;
  align-items: center;
  gap: 12px;
  padding: 0 8px 0 12px;
}

.list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.list-head button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  justify-self: start;
}

.list-head button:hover {
  background: var(--surface-2);
}

.list-head svg.i {
  width: 14px;
  height: 14px;
}

.row {
  height: 52px;
  border-bottom: 1px solid var(--glass-line);
  border-radius: 12px;
  transition: background 0.1s;
}

.row:hover {
  background: var(--surface-2);
}

.item.selected.row {
  background: linear-gradient(90deg, rgba(255, 170, 205, 0.55), rgba(215, 190, 250, 0.4));
  border-bottom-color: transparent;
}

.row .cell-name {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.row .cell {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row .cell > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Leere Zustände ---------------------------------------------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
  min-height: 60%;
}

.empty .brand-mark {
  width: 118px;
  height: 118px;
  animation: flutter 3.2s ease-in-out infinite;
  filter: drop-shadow(0 14px 22px rgba(226, 76, 138, 0.35));
}

.empty h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--text);
  margin: 22px 0 8px;
}

.empty p {
  margin: 0 0 20px;
  max-width: 440px;
}

.empty .bubble {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 18px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--pink-ink);
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

@keyframes flutter {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-8px) rotate(3deg);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.loading {
  display: grid;
  place-items: center;
  padding: 80px 0;
}

.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 4px solid var(--pink-softer);
  border-top-color: var(--pink);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Detailbereich ----------------------------------------------------- */

.details {
  grid-area: details;
  width: 340px;
  margin: 0 16px 16px 0;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.details-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 12px 8px 20px;
}

.details-head .name {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--glass-line);
}

.tab {
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.tab.active {
  color: var(--pink-ink);
  border-bottom-color: var(--pink);
}

.details-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.details-preview {
  height: 170px;
  border-radius: 18px;
  background: var(--glass-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 18px;
}

.details-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.details-preview .ficon svg,
.details-preview .ficon svg.i {
  width: 72px;
  height: 72px;
}

.details-preview .ficon svg.i {
  stroke-width: 1.5;
}

.kv {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
}

.kv dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}

.kv dd {
  margin: 0;
  word-break: break-word;
}

.access-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 6px 0 12px;
  flex-wrap: wrap;
}

.act {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-line);
}

.act:last-child {
  border-bottom: 0;
}

.act .when {
  font-size: 12px;
  color: var(--text-3);
}

.details-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  color: var(--text-2);
  padding: 40px 10px;
}

.details-empty .brand-mark {
  width: 76px;
  height: 76px;
  animation: flutter 3.2s ease-in-out infinite;
}

/* ---- Menüs ------------------------------------------------------------- */

.menu {
  position: fixed;
  z-index: 200;
  min-width: 240px;
  max-width: 320px;
  padding: 8px;
  border-radius: 20px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.12s ease-out;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--pink-softer);
  outline: none;
}

.menu-item svg.i {
  color: var(--text-2);
}

.menu-item .kbd {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
}

.menu-item.danger,
.menu-item.danger svg.i {
  color: var(--danger);
}

.menu-sep {
  height: 1px;
  margin: 6px 8px;
  background: var(--glass-line);
}

.menu-colors {
  display: flex;
  gap: 8px;
  padding: 8px 14px 10px 48px;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
  padding: 0;
}

.swatch.active,
.swatch:hover {
  box-shadow: 0 0 0 2px var(--text);
}

.menu-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 20px 12px;
  text-align: center;
}

.menu-user .who {
  font-weight: 800;
  font-size: 16px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}

.role-badge.admin {
  background: var(--ribbon);
  color: #fff;
}

.role-badge.owner {
  background: var(--pink-grad);
  color: #fff;
}

:root[data-theme="dark"] .role-badge.admin {
  background: rgba(255, 255, 255, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .role-badge.admin {
    background: rgba(255, 255, 255, 0.16);
  }
}

.role-badge svg.i {
  width: 12px;
  height: 12px;
}

/* ---- Dialoge ----------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: fade-in 0.15s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.18s ease-out;
  overflow: hidden;
}

.modal.wide {
  width: min(660px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 16px 6px 26px;
}

.modal-head h3 {
  flex: 1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-body {
  padding: 12px 26px 8px;
  overflow-y: auto;
}

.modal-body p {
  margin-top: 0;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 26px 22px;
}

.modal-foot .left {
  margin-right: auto;
}

.nino-hint {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 185, 215, 0.45), rgba(215, 195, 250, 0.35));
  color: var(--pink-ink);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}

.nino-hint .brand-mark {
  width: 24px;
  height: 24px;
  flex: none;
}

.settings-section {
  padding: 16px 0 6px;
  border-top: 1px solid var(--glass-line);
}

.settings-section:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.settings-section > h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
}

.profile-pic {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.profile-pic .pp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Hintergrund-Auswahl */
.bg-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.bg-tile {
  position: relative;
  height: 76px;
  border-radius: 16px;
  border: 2px solid var(--glass-border);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, border-color 0.12s;
}

.bg-tile:hover {
  transform: translateY(-2px);
}

.bg-tile.active {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(226, 76, 138, 0.3);
}

.bg-tile .bg-label {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #3b2140;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bg-tile.upload {
  display: grid;
  place-items: center;
  background: var(--glass-soft);
  color: var(--pink-ink);
  border-style: dashed;
  border-color: var(--border-strong);
}

.bg-tile.upload svg.i {
  width: 26px;
  height: 26px;
  margin-bottom: 18px;
}

/* Freigeben */
.people {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 16px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.person .pinfo {
  flex: 1;
  min-width: 0;
}

.person .pname {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person .psub {
  font-size: 12px;
  color: var(--text-2);
}

.person .select {
  width: auto;
  height: 34px;
  padding: 0 8px;
}

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 50px;
  z-index: 5;
  border-radius: 16px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  padding: 6px;
}

.suggest .person {
  padding: 6px 8px;
  border-radius: 12px;
  cursor: pointer;
}

.suggest .person:hover,
.suggest .person.active {
  background: var(--pink-softer);
}

.link-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.link-box .lb-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  flex: none;
}

.link-box.on .lb-icon {
  background: rgba(31, 132, 90, 0.18);
  color: var(--success);
}

.subhead {
  font-weight: 800;
  margin: 14px 0 6px;
  font-size: 14px;
}

/* Verschieben */
.picker {
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass-soft);
}

.picker-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--glass-line);
  font-weight: 800;
  min-height: 48px;
}

.picker-head .ph-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 6px;
}

.picker-list {
  height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 4px 0 12px;
  border-radius: 12px;
  cursor: pointer;
}

.picker-row:hover {
  background: var(--surface-2);
}

.picker-row.active {
  background: var(--pink-soft);
}

.picker-row.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.picker-row .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Vorschau ---------------------------------------------------------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  background: rgba(30, 12, 26, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  animation: fade-in 0.15s ease-out;
}

.viewer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 12px 0 16px;
  flex: none;
}

.viewer-bar .icon-btn {
  color: #f3e3ec;
}

.viewer-bar .icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.viewer-bar .vname {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px 72px 24px;
  position: relative;
}

.viewer-stage img,
.viewer-stage video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.viewer-stage iframe {
  width: min(1000px, 100%);
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.viewer-stage audio {
  width: min(520px, 100%);
}

.viewer-text {
  width: min(900px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  overflow: hidden;
}

:root:not([data-theme="dark"]) .viewer-text {
  background: #fff;
}

.viewer-text pre,
.viewer-text textarea {
  flex: 1;
  margin: 0;
  padding: 20px 24px;
  overflow: auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text);
}

.viewer-text .vt-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
}

.viewer-text .vt-bar .grow {
  flex: 1;
}

.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.viewer-nav:hover {
  background: var(--pink);
}

.viewer-nav.prev {
  left: 12px;
}

.viewer-nav.next {
  right: 12px;
}

.no-preview {
  text-align: center;
  padding: 36px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  max-width: 420px;
}

.no-preview .brand-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  animation: flutter 3.2s ease-in-out infinite;
}

.no-preview p {
  color: #f0dbe6;
}

/* ---- Upload-Panel ------------------------------------------------------ */

.upload-panel {
  position: fixed;
  right: 24px;
  bottom: 16px;
  z-index: 120;
  width: 380px;
  max-width: calc(100vw - 32px);
  border-radius: 22px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop-in 0.2s ease-out;
}

.up-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 20px;
  background: var(--pink-grad);
  color: #fff;
  font-weight: 800;
}

.up-head .t {
  flex: 1;
}

.up-head .icon-btn {
  color: #fff;
}

.up-head .icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.up-list {
  max-height: 280px;
  overflow-y: auto;
}

.up-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid var(--glass-line);
}

.up-row .up-main {
  flex: 1;
  min-width: 0;
}

.up-row .up-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.up-row .up-sub {
  font-size: 12px;
  color: var(--text-2);
}

.up-row .up-sub.err {
  color: var(--danger);
}

.up-row .meter {
  margin: 6px 0 0;
  height: 4px;
}

.up-state {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
}

.up-state.done {
  color: var(--success);
}

.up-state.error {
  color: var(--danger);
}

/* ---- Toasts ------------------------------------------------------------ */

.toasts {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: min(520px, calc(100vw - 48px));
  padding: 12px 10px 12px 16px;
  border-radius: 18px;
  background: rgba(44, 20, 42, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast .brand-mark {
  width: 24px;
  height: 24px;
  flex: none;
}

.toast .msg {
  flex: 1;
}

.toast .msg small {
  display: block;
  opacity: 0.78;
  font-style: italic;
}

.toast.error {
  background: rgba(200, 40, 70, 0.92);
}

.toast .toast-action {
  border: 0;
  background: transparent;
  color: #ffb0cf;
  font-weight: 800;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}

.toast .toast-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.toast .icon-btn {
  color: #fff;
}

.toast .icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.toast.out {
  animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---- Drag & Drop ------------------------------------------------------- */

.drop-overlay {
  position: absolute;
  inset: 8px;
  z-index: 30;
  border-radius: 24px;
  border: 3px dashed var(--pink);
  background: rgba(255, 220, 235, 0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  font-weight: 800;
  font-size: 18px;
  color: #b0266a;
}

.drop-overlay .brand-mark {
  width: 96px;
  height: 96px;
  animation: flutter 1.6s ease-in-out infinite;
}

.drag-ghost {
  position: fixed;
  top: -100px;
  left: -100px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--pink-grad);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-lg);
}

/* ---- Speicher-Ansicht -------------------------------------------------- */

.storage-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  margin: 4px 0 20px;
}

.storage-hero .big {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.storage-hero .big small {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-2);
}

.stack-bar {
  display: flex;
  gap: 2px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(160, 90, 130, 0.14);
}

.stack-bar > span {
  height: 100%;
  min-width: 3px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}

.legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.legend .val {
  color: var(--text-2);
}

/* ---- Anmeldung --------------------------------------------------------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: 48px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 36px clamp(20px, 6vw, 90px);
}

.auth-art {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  color: var(--on-scene);
  text-shadow: var(--on-scene-shadow);
}

.auth-art .brand {
  align-self: flex-start;
  padding: 6px 20px 6px 7px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  text-shadow: none;
}

.auth-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.12;
  margin: 0 0 16px;
}

.auth-hero p {
  font-size: 17px;
  max-width: 480px;
  margin: 0;
  font-weight: 500;
}

.speech {
  display: inline-block;
  margin-top: 26px;
  padding: 14px 20px;
  border-radius: 22px 22px 22px 6px;
  background: rgba(44, 20, 42, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 500;
  max-width: 440px;
  min-height: 52px;
  box-shadow: 0 12px 32px rgba(60, 10, 40, 0.3);
  text-shadow: none;
  transition: opacity 0.25s;
}

.speech.out {
  opacity: 0;
}

.speech b {
  color: #ffb3cf;
}

.auth-foot {
  font-size: 13px;
  font-weight: 700;
}

.auth-panel {
  position: relative;
  border-radius: 30px;
  padding: 38px 36px 32px;
  background: color-mix(in srgb, var(--glass-strong) 80%, transparent);
}

.auth-card {
  width: 100%;
}

.auth-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 6px;
}

.auth-card .lead {
  color: var(--text-2);
  margin: 0 0 24px;
}

.auth-card .btn.primary {
  width: 100%;
  height: 48px;
  font-size: 15px;
  margin-top: 6px;
}

.auth-card code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-3);
}

.reg-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-3);
  font-size: 12px;
  color: var(--text-2);
}

.reg-note svg.i {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: var(--pink);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: var(--text-2);
}

.auth-switch button:not(.btn) {
  border: 0;
  background: none;
  color: var(--pink-ink);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.auth-switch a:not(.btn) {
  color: var(--pink-ink);
  font-weight: 800;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 14px;
  font-size: 13px;
  color: var(--text-2);
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.auth-switch .register-btn {
  width: 100%;
  height: 48px;
  font-size: 15px;
  color: var(--pink-ink);
  border: 1.5px solid var(--pink);
}

.form-error {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
  margin-bottom: 16px;
}

.auth-top {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* Admin-Eingang: dunkler Schleier wie Ninos Schleifen */
.admin-gate .scene-tint {
  background: linear-gradient(160deg, rgba(40, 20, 44, 0.72) 0%, rgba(24, 12, 28, 0.62) 55%, rgba(14, 8, 18, 0.78) 100%);
}

.admin-gate .auth-art {
  --on-scene: #fff;
  --on-scene-shadow: 0 2px 16px rgba(20, 5, 20, 0.6);
}

.gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(241, 115, 165, 0.22);
  border: 1px solid rgba(255, 170, 205, 0.5);
  color: #ffd0e2;
  font-weight: 800;
  font-size: 13px;
  text-shadow: none;
}

.gate-badge svg.i {
  width: 16px;
  height: 16px;
}

.code-input {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 20px;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
}

.add-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ---- Öffentliche Freigabe --------------------------------------------- */

.public-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 16px;
}

.public-top .brand {
  padding: 6px 18px 6px 7px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
}

.public-card {
  flex: 1;
  border-radius: var(--radius-xl);
  padding: 20px 24px 30px;
  display: flex;
  flex-direction: column;
}

.public-file {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 20px 0;
}

.public-file .pv {
  width: 100%;
  display: grid;
  place-items: center;
}

.public-file .pv img,
.public-file .pv video {
  max-width: 100%;
  max-height: 65vh;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.public-file .pv iframe {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.public-file .pv pre {
  width: 100%;
  max-height: 65vh;
  overflow: auto;
  text-align: left;
  padding: 18px;
  border-radius: 16px;
  background: var(--glass-strong);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}

/* ---- Admin ------------------------------------------------------------- */

.admin .app {
  grid-template-columns: 272px minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "side main";
}

.admin .main {
  overflow-y: auto;
}

.admin-page {
  padding: 8px 28px 40px;
}

.admin-page h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  margin: 16px 0 4px;
}

.admin-page .page-lead {
  color: var(--text-2);
  margin: 0 0 22px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.tile {
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.tile .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.tile .label svg.i {
  width: 16px;
  height: 16px;
  color: var(--pink);
}

.tile .value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.tile .sub {
  font-size: 12.5px;
  color: var(--text-2);
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.panel {
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 18px 20px;
  background: var(--glass-soft);
  min-width: 0;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel h3 .spacer {
  flex: 1;
}

.hbar-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.hbar-row .who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hbar-row .who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hbar {
  height: 12px;
  border-radius: 0 4px 4px 0;
  background: var(--c-image);
  min-width: 3px;
}

.hbar-row .num {
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cols {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
  padding-top: 10px;
  border-bottom: 1px solid var(--border-strong);
}

.cols .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  position: relative;
  cursor: default;
}

.cols .col .bar {
  width: 100%;
  max-width: 26px;
  border-radius: 4px 4px 0 0;
  background: var(--c-image);
  min-height: 2px;
}

.cols .col:hover .bar {
  background: var(--pink-strong);
}

.cols .col .tip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(44, 20, 42, 0.9);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 2;
}

.cols .col:hover .tip,
.cols .col:focus .tip {
  opacity: 1;
}

.col-labels {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.col-labels span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
}

.table-wrap {
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  overflow: auto;
  background: var(--glass-soft);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-2);
  padding: 12px 14px;
  background: var(--glass-soft);
  border-bottom: 1px solid var(--glass-line);
  white-space: nowrap;
}

table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-line);
  vertical-align: middle;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover td {
  background: var(--pink-softer);
}

table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.user-cell .u-name {
  font-weight: 800;
}

.user-cell .u-sub {
  font-size: 12px;
  color: var(--text-2);
}

.usage {
  min-width: 150px;
}

.usage .meter {
  margin: 0 0 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.status-pill.off {
  color: var(--text-2);
}

.status-pill.off::before {
  background: var(--text-3);
}

.row-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-actions .input {
  max-width: 320px;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}

.setting {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass-soft);
}

.setting.stack {
  flex-direction: column;
  align-items: stretch;
}

.setting .s-text {
  flex: 1;
  min-width: 0;
}

.setting .s-title {
  font-weight: 800;
}

.setting .s-desc {
  font-size: 13px;
  color: var(--text-2);
}

.setting .s-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.setting .s-ctrl .input {
  width: 110px;
}

.act-list .act {
  align-items: center;
}

.act-list .act .what {
  flex: 1;
  min-width: 0;
}

.act-list .act .what b {
  font-weight: 800;
}

/* ---- Admin-Ansicht & Verwarnungen ------------------------------------- */

.admin-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  padding: 8px 10px 8px 12px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(44, 20, 42, 0.86), rgba(90, 32, 70, 0.8));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
}

.admin-banner .ab-text {
  flex: 1;
  min-width: 180px;
}

.admin-banner b {
  color: #ffb3cf;
}

.admin-banner .btn:not(.danger) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: none;
}

.admin-banner .btn:not(.danger):hover {
  background: rgba(255, 255, 255, 0.24);
}

.sev-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sev-badge svg.i {
  width: 13px;
  height: 13px;
}

.sev-hint {
  --sev: #2f7fd0;
}

.sev-warning {
  --sev: #c77700;
}

.sev-final {
  --sev: #d0304a;
}

.sev-badge.sev-hint,
.sev-badge.sev-warning,
.sev-badge.sev-final {
  color: var(--sev);
  background: color-mix(in srgb, var(--sev) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sev) 35%, transparent);
}

.warn-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 1px 8px 1px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #c77700;
  background: rgba(227, 162, 26, 0.16);
  vertical-align: middle;
}

.warn-badge.unread {
  color: #d0304a;
  background: rgba(208, 48, 74, 0.14);
}

.warn-badge svg.i {
  width: 13px;
  height: 13px;
}

.warn-msg {
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.warn-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.warn-card {
  border-radius: 18px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--sev) 8%, var(--glass-strong));
  border: 1px solid color-mix(in srgb, var(--sev) 35%, transparent);
  border-left: 5px solid var(--sev);
}

.warn-card .wc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--sev);
  margin-bottom: 8px;
}

.warn-card .wc-head b {
  font-size: 15px;
}

.warn-card .wc-head span {
  color: var(--text);
  font-weight: 700;
}

.warn-card .wc-msg {
  white-space: pre-line;
  line-height: 1.55;
}

.warn-card .wc-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-2);
}

.warn-notice .modal-head h3 {
  color: #d0304a;
}

.drive-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.drive-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.drive-card .dc-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drive-card .u-name {
  font-weight: 800;
  font-size: 15px;
}

.drive-card .u-sub {
  font-size: 12px;
  color: var(--text-2);
}

.drive-card .dc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

/* ---- E-Mail-Bestätigung ------------------------------------------------ */

.verify-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 8px;
}

.verify-modal .code-input {
  height: 58px;
  font-size: 28px;
  letter-spacing: 10px;
}

.verified-mark {
  display: inline-grid;
  vertical-align: -3px;
  color: var(--success);
}

.verified-mark svg.i {
  width: 14px;
  height: 14px;
}

.unverified-mark {
  display: inline-block;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--warning);
  background: rgba(227, 162, 26, 0.16);
}

.setting-row {
  padding: 4px 0 10px;
}

.setting-row .switch {
  align-items: flex-start;
}

.smtp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0 14px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-line);
}

.smtp-grid .smtp-note,
.smtp-grid .smtp-actions {
  grid-column: 1 / -1;
}

.smtp-grid .smtp-note svg.i {
  flex: none;
}

.smtp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Sicherheit: 2FA, Geräte, Link-Schutz, Admin-Seite ------------------ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.danger-text {
  color: var(--danger) !important;
}

.pw-meter.strong {
  color: var(--success);
}

.otp-input {
  height: 58px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
}

.otp-input.recovery,
.otp-input.small {
  height: 48px;
  font-size: 20px;
  letter-spacing: 3px;
}

.twofa-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.twofa-links button:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.twofa-links svg.i {
  width: 15px;
  height: 15px;
}

.twofa-steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.twofa-steps li::marker {
  color: var(--pink);
  font-weight: 800;
}

.qr-wrap {
  display: grid;
  place-items: center;
  margin: 12px auto 8px;
  padding: 12px;
  width: max-content;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px dashed var(--pink-soft);
}

.qr-wrap img {
  display: block;
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}

.secret-manual summary {
  cursor: pointer;
  color: var(--pink-ink);
  font-weight: 700;
  font-size: 13px;
}

.secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
}

.secret-row code {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-3);
  font-size: 15px;
  letter-spacing: 1px;
  word-break: break-all;
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 2px dashed var(--pink-soft);
}

.recovery-grid code {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 4px;
  border-radius: 10px;
  background: var(--glass-strong);
}

.recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.twofa-hero {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--pink-grad);
  color: #fff;
}

.twofa-hero svg.i {
  width: 32px;
  height: 32px;
}

.twofa-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 18px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.twofa-card .tf-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
}

.twofa-card.on .tf-icon {
  background: rgba(31, 132, 90, 0.18);
  color: var(--success);
}

.twofa-card .tf-title {
  font-weight: 800;
}

.twofa-card.on .tf-title {
  color: var(--success);
}

.tf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.warn-hint {
  margin: 10px 0 0;
  color: var(--warning);
  background: rgba(227, 162, 26, 0.16);
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.session-row.current {
  border-color: var(--pink-soft);
  background: linear-gradient(90deg, rgba(255, 185, 215, 0.3), rgba(215, 195, 250, 0.22));
}

.session-row .s-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--pink-ink);
}

.session-row .s-info {
  flex: 1;
  min-width: 0;
}

.session-row .s-name {
  font-weight: 800;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.now-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--pink-grad);
}

/* Link-Schutz im Freigabe-Dialog */
.link-protect {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 18px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.lp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.lp-row + .lp-row {
  border-top: 1px solid var(--glass-line);
  padding-top: 6px;
}

.lp-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-3);
}

.lp-icon svg.i {
  width: 16px;
  height: 16px;
}

.lp-icon.on {
  background: rgba(31, 132, 90, 0.18);
  color: var(--success);
}

.lp-icon.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.lp-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lp-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lp-select {
  width: auto;
  max-width: 150px;
}

/* Öffentliche Seite: Passwort-Tür */
.link-gate {
  max-width: 380px;
  margin: 10px auto;
  text-align: center;
}

.link-gate .lg-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--pink-grad);
  color: #fff;
  box-shadow: var(--shadow);
}

.link-gate .lg-icon svg.i {
  width: 32px;
  height: 32px;
}

.link-gate form {
  text-align: left;
  margin: 16px 0;
}

.link-gate .bubble {
  margin-top: 8px;
}

.link-until {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.link-until svg.i {
  width: 14px;
  height: 14px;
}

/* Admin: Abzeichen in der Benutzerliste */
.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 1px;
}

.sec-badge svg.i {
  width: 12px;
  height: 12px;
}

.sec-badge.on {
  color: var(--success);
  background: rgba(31, 132, 90, 0.14);
}

.sec-badge.locked {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Admin: Seite „Sicherheit“ */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.sec-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top-width: 4px;
}

.sec-card.good {
  border-top-color: rgba(31, 132, 90, 0.55);
}

.sec-card.warn {
  border-top-color: rgba(227, 162, 26, 0.75);
}

.sec-card h3 {
  margin-bottom: 2px;
}

.sec-card p {
  margin: 0;
}

.sec-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.sec-status svg.i {
  flex: none;
  width: 20px;
  height: 20px;
}

.sec-card.good .sec-status svg.i {
  color: var(--success);
}

.sec-card.warn .sec-status svg.i {
  color: var(--warning);
}

.sec-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sec-progress .hbar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.sec-progress .hbar {
  height: 100%;
  transition: width 0.4s ease;
}

.sec-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sec-stats > div {
  flex: 1;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.sec-stats b {
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--pink-ink);
}

.sec-stats span {
  font-size: 12px;
  color: var(--text-2);
}

.sec-switch.disabled {
  opacity: 0.55;
}

.key-warning {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  background: rgba(227, 162, 26, 0.14);
  border: 1px solid rgba(227, 162, 26, 0.35);
}

.key-warning > svg.i {
  flex: none;
  color: var(--warning);
  margin-top: 2px;
}

.key-warning code {
  word-break: break-all;
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--glass-soft);
  font-size: 13px;
}

.backup-row svg.i {
  width: 16px;
  height: 16px;
  color: var(--pink-ink);
}

.backup-row .b-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-row .b-reason {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-2);
}

.locked-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.locked-row + .locked-row {
  border-top: 1px solid var(--glass-line);
}

@media (max-width: 560px) {
  .recovery-grid {
    grid-template-columns: 1fr;
  }

  .lp-row {
    flex-wrap: wrap;
  }

  .lp-select {
    max-width: none;
    flex: 1 0 100%;
  }

  .session-row {
    flex-wrap: wrap;
  }

  .session-row .s-info {
    flex-basis: calc(100% - 52px);
  }

  .session-row .btn {
    margin-left: 50px;
  }

  .sec-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Konto löschen ------------------------------------------------------ */

.danger-zone {
  margin-top: 8px;
}

.danger-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--danger);
}

.danger-title svg.i {
  width: 18px;
  height: 18px;
}

.danger-box {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--danger-soft);
  border: 1px solid rgba(208, 48, 74, 0.3);
  font-size: 14px;
}

.danger-box > svg.i {
  flex: none;
  margin-top: 2px;
  color: var(--danger);
}

.danger-box ul {
  margin: 6px 0 8px;
  padding-left: 18px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  font-size: 14px;
  cursor: pointer;
}

.check-row input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--pink);
}

.check-row a {
  color: var(--pink-ink);
  font-weight: 700;
}

#termsField {
  margin: 2px 0 14px;
  font-size: 13px;
}

.twofa-modal .check-row input {
  accent-color: var(--danger);
}

.farewell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-weight: 700;
}

/* ---- Rechtliches: Fußzeile, Rechtsseiten, Cookie-Hinweis ---------------- */

.legal-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
}

.legal-links a,
.legal-links button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--pink-ink);
  cursor: pointer;
  text-decoration: none;
}

.legal-links a:hover,
.legal-links button:hover {
  text-decoration: underline;
}

.legal-fan {
  max-width: 420px;
  font-size: 11px;
  color: var(--text-3);
}

/* Kurze Variante unten in der Seitenleiste */
.legal-foot.side {
  margin: 12px 4px 0;
  font-size: 11px;
}

.legal-foot.side .legal-links {
  gap: 2px 10px;
}

/* Unter der öffentlichen Seite (Freigaben, Rechtsseiten) */
.public-wrap > .legal-foot {
  padding: 14px 0 6px;
}

.legal-page {
  padding: 26px 34px 34px;
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.6;
}

.legal h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  color: var(--pink-ink);
}

.legal h2 {
  margin: 26px 0 8px;
  font-size: 17px;
  font-weight: 800;
}

.legal p,
.legal ul {
  margin: 0 0 10px;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 4px;
}

.legal a {
  color: var(--pink-ink);
  font-weight: 700;
}

.legal-lead {
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 185, 215, 0.4), rgba(215, 195, 250, 0.3));
  font-weight: 500;
}

.legal-missing {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--warning);
  background: rgba(227, 162, 26, 0.16);
}

.legal-stand {
  margin-top: 26px !important;
  font-size: 13px;
  color: var(--text-3);
}

.legal-table td:first-child {
  white-space: nowrap;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 400;
  width: min(540px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  font-size: 14px;
  animation: cookie-in 0.35s ease-out;
}

.cookie-banner p {
  margin: 6px 0 0;
}

.cookie-banner .cb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.cookie-banner .cb-icon {
  font-size: 22px;
}

.cookie-banner .cb-quote {
  font-size: 12.5px;
  font-style: italic;
  color: var(--pink-ink);
}

.cookie-banner .cb-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@keyframes cookie-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    animation: none;
  }
}

@media (max-width: 560px) {
  .legal-page {
    padding: 18px 16px 26px;
  }

  /* Kopfzeile der öffentlichen Seiten passt aufs Handy */
  .public-top {
    gap: 8px;
  }

  .public-top .brand {
    min-width: 0;
    padding-right: 12px;
  }

  .public-top .brand-name {
    font-size: 17px;
  }

  .public-top .btn.small {
    flex: none;
    padding: 0 10px;
    white-space: nowrap;
  }

  .legal h1 {
    font-size: 24px;
  }

  .cookie-banner {
    bottom: 12px;
  }
}

/* ---- Passwort vergessen, mehr Speicher, E-Mails --------------------------- */

.forgot-link {
  margin: -6px 0 12px;
  text-align: right;
  font-size: 13px;
}

.forgot-link button,
.forgot-link a {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--pink-ink);
  cursor: pointer;
}

.forgot-link .muted {
  font-weight: 500;
}

.farewell.info {
  color: var(--pink-ink);
}

.forgot-modal h2 {
  display: none;
}

.more-storage {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 185, 215, 0.35), rgba(215, 195, 250, 0.28));
}

.more-storage > svg.i {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--pink-ink);
}

.more-storage .ms-text {
  flex: 1;
  min-width: 180px;
}

.bulk-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.bulk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}

.bulk-row .br-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bulk-row .br-name .tiny {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-row .br-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  font-weight: 700;
}

.br-warn {
  font-size: 11px;
  font-weight: 800;
  color: var(--warning);
}

.bulk-row .br-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.bulk-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--pink);
}

.compose-grid {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 0 14px;
}

.compose-grid .span2 {
  grid-column: 1 / -1;
}

.compose-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bc-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.bc-image img {
  max-width: 220px;
  max-height: 140px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.bc-image-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mail-preview {
  margin-top: 16px;
}

.mp-head {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.mail-frame {
  display: block;
  width: 100%;
  height: 620px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: #fdf1f7;
}

.bc-list,
.tpl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bc-row,
.tpl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
}

.bc-row .bc-main,
.tpl-row .tpl-text {
  flex: 1;
  min-width: 0;
}

.bc-row .bc-main b {
  overflow-wrap: anywhere;
}

.bc-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.bc-pill {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--surface-3);
}

.bc-pill.ok {
  color: var(--success);
  background: rgba(31, 132, 90, 0.14);
}

.bc-pill.run {
  color: var(--pink-ink);
  background: var(--pink-softer);
}

.bc-pill.bad {
  color: var(--danger);
  background: var(--danger-soft);
}

.tpl-modal .modal {
  max-width: 1100px;
}

.tpl-editor {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  gap: 18px;
  align-items: start;
}

.tpl-preview .mail-frame {
  height: 560px;
}

.var-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--text-2);
}

.var-chip {
  padding: 2px 9px;
  border: 1px solid var(--pink-soft);
  border-radius: 999px;
  background: var(--pink-softer);
  font: inherit;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--pink-ink);
  cursor: pointer;
}

@media (max-width: 760px) {
  .compose-grid,
  .tpl-editor {
    grid-template-columns: 1fr;
  }

  .bc-row {
    flex-wrap: wrap;
  }

  .bc-stats {
    align-items: flex-start;
    text-align: left;
  }

  .bulk-row {
    flex-wrap: wrap;
  }

  .mail-frame,
  .tpl-preview .mail-frame {
    height: 480px;
  }
}

/* ---- Responsiv --------------------------------------------------------- */

.scrim {
  display: none;
}

.fab-mobile {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  background: var(--pink-grad);
  color: #fff;
  box-shadow: 0 12px 28px rgba(226, 76, 138, 0.45);
  place-items: center;
  cursor: pointer;
}

.fab-mobile svg.i {
  width: 26px;
  height: 26px;
  stroke-width: 2.5;
}

@media (max-width: 1100px) {
  .details {
    position: fixed;
    top: 84px;
    right: 8px;
    bottom: 8px;
    z-index: 90;
    margin: 0;
    background: var(--glass-strong);
    box-shadow: var(--shadow-lg);
    width: min(360px, calc(100vw - 16px));
  }
}

@media (max-width: 860px) {
  .app,
  .admin .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 68px minmax(0, 1fr);
    grid-template-areas:
      "top"
      "main";
  }

  .only-mobile {
    display: inline-grid !important;
  }

  .topbar {
    gap: 8px;
    padding: 0 8px;
  }

  .topbar .brand {
    width: auto;
  }

  .brand-pill {
    padding: 4px;
    height: 44px;
  }

  .topbar .brand-name {
    display: none;
  }

  .search-box {
    height: 44px;
  }

  .top-actions #themeBtn,
  .topbar #adminBadge {
    display: none;
  }

  /* „Zur Ablage“ nur als Symbol */
  .top-actions #toDrive {
    font-size: 0;
    gap: 0;
    width: 40px;
    padding: 0;
  }

  .sidebar {
    position: fixed;
    top: 8px;
    left: 8px;
    bottom: 8px;
    width: 284px;
    margin: 0;
    z-index: 100;
    background: var(--glass-strong);
    box-shadow: var(--shadow-lg);
    transform: translateX(-110%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: none;
  }

  .scrim.show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 95;
    background: var(--overlay);
  }

  .main {
    margin: 0 8px 8px;
    border-radius: 24px;
  }

  .main-head {
    padding: 12px 8px 4px 12px;
  }

  .crumb {
    font-size: 17px;
    max-width: 180px;
  }

  .crumb.current {
    font-size: 18px;
  }

  .toolbar,
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .file-card .thumb {
    height: 110px;
  }

  .list-head,
  .row {
    grid-template-columns: minmax(0, 1fr) 90px 40px;
  }

  .list-head .c-owner,
  .row .c-owner,
  .list-head .c-size,
  .row .c-size {
    display: none;
  }

  .fab-mobile {
    display: grid !important;
  }

  .auth {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 20px 16px 30px;
  }

  .auth-art {
    gap: 14px;
  }

  .auth-hero h1 {
    font-size: 28px;
    margin-bottom: 0;
  }

  .auth-hero p,
  .auth-foot {
    display: none;
  }

  .speech {
    margin-top: 14px;
    font-size: 13px;
  }

  .auth-panel {
    padding: 28px 22px 24px;
  }

  .viewer-stage {
    padding: 8px 8px 16px;
  }

  .viewer-nav {
    display: none;
  }

  .upload-panel {
    right: 16px;
  }

  .toasts {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: 0;
  }

  .admin-page {
    padding: 4px 14px 30px;
  }

  .setting {
    flex-direction: column;
    align-items: flex-start;
  }

  .hbar-row {
    grid-template-columns: minmax(0, 100px) minmax(0, 1fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .petals {
    display: none;
  }
}
