/* ==========================================================================
   MOPED.FIT — "Pit Lane"
   Mattschwarz, Knochenweiß, ein Signal-Orange. Harte Kanten, feine Linien,
   schmale Versalien, Monospace für Daten. Eine Datei für die ganze Oberfläche.
   ========================================================================== */

@font-face {
  font-family: 'Archivo Var';
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Mono Var';
  src: url('/fonts/mono.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0b0b0a;
  --ink-2: #111110;
  --panel: #151514;
  --panel-2: #1b1b19;
  --line: rgba(236, 232, 223, 0.1);
  --line-2: rgba(236, 232, 223, 0.18);
  --line-3: rgba(236, 232, 223, 0.32);
  --bone: #ece8df;
  --bone-2: #c9c4b9;
  --dim: #8f8a80;
  --faint: #5f5b54;
  --signal: #ff4d00;
  --signal-2: #ff6a2b;
  --signal-soft: rgba(255, 77, 0, 0.12);
  --ok: #9ccf6b;
  --danger: #ff5a4a;
  --r: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --sidebar: 248px;
  --pad: clamp(18px, 3vw, 44px);
  --sans: 'Archivo Var', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Mono Var', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-family: var(--sans);
  font-size: 15px;
  font-stretch: 100%;
  color: var(--bone);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Grundlagen -------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scrollbar-color: #2a2926 var(--ink);
}
body {
  margin: 0;
  min-height: 100dvh;
  line-height: 1.5;
  background: var(--ink);
  overflow-x: hidden;
}
::selection {
  background: var(--signal);
  color: #000;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: #2a2926;
  border: 2px solid var(--ink);
}
h1,
h2,
h3,
h4 {
  font-family: var(--sans);
  font-stretch: 72%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.95;
  margin: 0 0 0.4em;
  color: var(--bone);
}
h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}
h2 {
  font-size: 1.35rem;
}
h3 {
  font-size: 1.05rem;
}
p {
  margin: 0 0 0.8em;
  color: var(--bone-2);
}
a {
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s, color 0.2s;
}
img,
video,
canvas {
  max-width: 100%;
}
small {
  font-size: 0.78rem;
}
strong {
  font-weight: 650;
}
.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 450;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.muted {
  color: var(--dim);
}
.small {
  font-size: 0.82rem;
}
.hidden,
[hidden] {
  display: none !important;
}
.icon {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vertical-align: middle;
}

/* ---------- Buttons ------------------------------------------------------ */
button,
.detail-actions a,
.album-link a,
.album-gallery footer a {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  font-stretch: 88%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0 1.1em;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
/* Füllung wischt von links herein */
button::before,
.detail-actions a::before,
.album-link a::before,
.album-gallery footer a::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bone);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
button:focus:not(:focus-visible) {
  outline: none;
}
.primary,
button.primary {
  color: #fff;
  background: var(--signal);
  border-color: var(--signal);
}
.primary::before {
  background: var(--bone);
}
.ghost,
button.ghost {
  border-color: transparent;
  color: var(--bone-2);
}
.ghost::before {
  background: var(--panel-2);
}
.danger,
button.danger {
  color: var(--danger);
}
button.danger::before {
  background: var(--danger);
}
button.link {
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--bone-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
button.link::before {
  display: none;
}
.icon-btn {
  padding: 0;
  width: 40px;
  min-width: 40px;
  height: 40px;
}
.full {
  width: 100%;
}
.ripple {
  display: none;
}

/* ---------- Formulare ---------------------------------------------------- */
input,
select,
textarea {
  font: inherit;
  font-size: 0.92rem;
  color: var(--bone);
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0.65em 0.85em;
  min-height: 42px;
  width: 100%;
  transition: border-color 0.2s, background-color 0.2s;
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--signal);
  background: #0e0e0d;
  box-shadow: inset 3px 0 0 var(--signal);
}
textarea {
  resize: vertical;
  min-height: 90px;
}
select {
  appearance: none;
  padding-right: 2.4em;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8a80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8em center;
  background-size: 14px;
}
select option {
  background: var(--panel);
  color: var(--bone);
}
input[type='checkbox'],
input[type='radio'] {
  width: 17px;
  height: 17px;
  min-height: 0;
  padding: 0;
  accent-color: var(--signal);
  cursor: pointer;
  box-shadow: none;
}
input[type='range'] {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--signal);
  box-shadow: none;
}
input[type='file'] {
  padding: 0.5em;
  cursor: pointer;
}
input[type='file']::file-selector-button {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0.5em 0.9em;
  margin-right: 0.8em;
  cursor: pointer;
}
label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
label input,
label select,
label textarea {
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.form {
  display: grid;
  gap: 16px;
}
.form label {
  display: grid;
  gap: 7px;
}
.form > p {
  margin: 0;
  font-size: 0.88rem;
}
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.error {
  color: var(--danger);
  font-size: 0.84rem;
  margin: 0;
}
.error:not(:empty) {
  padding: 10px 12px;
  border-left: 2px solid var(--danger);
  background: rgba(255, 90, 74, 0.08);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin: 0;
  display: grid;
  gap: 14px;
}
legend {
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
progress {
  appearance: none;
  width: 100%;
  height: 3px;
  border: 0;
  background: var(--line);
}
progress::-webkit-progress-bar {
  background: var(--line);
}
progress::-webkit-progress-value {
  background: var(--signal);
  transition: width 0.4s var(--ease);
}
progress::-moz-progress-bar {
  background: var(--signal);
}
details summary {
  cursor: pointer;
  color: var(--bone-2);
}
blockquote {
  margin: 0 0 8px;
  padding: 6px 12px;
  border-left: 2px solid var(--signal);
  color: var(--dim);
  font-size: 0.82rem;
}

/* alte Ambient-Elemente sicher ausblenden */
.ambient-scene,
.cursor-glow,
.mouse-trail {
  display: none !important;
}

/* ---------- Laden -------------------------------------------------------- */
.loading {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  font-stretch: 70%;
  font-weight: 850;
  font-size: 2.4rem;
  text-transform: uppercase;
}
.loading::after {
  content: '';
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--signal) 0 40%, transparent 40%);
  background-size: 200% 100%;
  animation: loadbar 1s linear infinite;
}
.loading span {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 450;
  letter-spacing: 0.08em;
  color: var(--dim);
}
@keyframes loadbar {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* ---------- Marke -------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 14px;
  height: 14px;
  background: var(--signal);
  transform: skewX(-14deg);
  transition: transform 0.5s var(--ease);
}
.brand-word {
  font-stretch: 68%;
  font-weight: 850;
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--bone);
}
.brand-domain {
  color: var(--signal);
}

/* ---------- Hintergrund (Video / Rauch) --------------------------------- */
.backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #070707;
}
.backdrop-video,
.backdrop-smoke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.backdrop-video {
  filter: grayscale(0.35) contrast(1.12) brightness(0.62);
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s var(--ease), transform 6s var(--ease);
}
.backdrop.is-playing .backdrop-video {
  opacity: 1;
  transform: scale(1);
}
.backdrop-smoke {
  filter: blur(6px);
  opacity: 0.95;
}
.backdrop::after {
  /* Vignette + Verlauf nach unten für Lesbarkeit */
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 11, 10, 0.8) 0%, rgba(11, 11, 10, 0.4) 45%, rgba(11, 11, 10, 0.1) 100%),
    linear-gradient(0deg, rgba(11, 11, 10, 0.95) 0%, transparent 45%);
  pointer-events: none;
}
.backdrop-grain {
  position: absolute;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, -2%); }
  100% { transform: translate(3%, 1%); }
}

/* ---------- Text-Enthüllung --------------------------------------------- */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}
.line > span {
  display: inline-block;
  transform: translateY(105%);
  animation: line-up 1s var(--ease) forwards;
}
.line:nth-child(2) > span {
  animation-delay: 0.08s;
}
.line:nth-child(3) > span {
  animation-delay: 0.16s;
}
.line.accent > span {
  color: var(--signal);
}
@keyframes line-up {
  to {
    transform: none;
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes wipe {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ---------- Anmeldung ---------------------------------------------------- */
.auth-page {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 470px);
  isolation: isolate;
}
.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
}
.auth-art {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: var(--pad);
  min-height: 100dvh;
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  animation: fade 1s var(--ease) both;
}
.auth-title {
  font-size: clamp(3.4rem, 10vw, 9.5rem);
  font-stretch: 62%;
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: auto 0 0;
}
.auth-bikes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  color: var(--bone-2);
  animation: fade 1.2s var(--ease) 0.5s both;
}
.auth-bikes b {
  color: var(--signal);
  font-weight: 600;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  padding: var(--pad);
  background: rgba(11, 11, 10, 0.86);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(2px);
}
.auth-form {
  width: 100%;
  animation: fade-up 0.8s var(--ease) 0.25s both;
}
.auth-step {
  display: block;
  margin-bottom: 18px;
  color: var(--signal);
}
.auth-form h2 {
  font-size: 2.6rem;
  font-stretch: 66%;
  margin-bottom: 10px;
}
.auth-form > p {
  color: var(--dim);
  margin-bottom: 28px;
  font-size: 0.92rem;
}
.auth-form .primary {
  min-height: 50px;
  margin-top: 6px;
  justify-content: space-between;
  font-size: 0.82rem;
}
.auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 22px;
  font-size: 0.86rem;
  color: var(--dim);
}
.auth-switch br {
  display: none;
}
.auth-switch button {
  min-height: 34px;
  padding: 0 0.6em;
  color: var(--bone);
}
.auth-form .request-invite-button {
  width: 100%;
  margin-top: 16px;
  border: 1px dashed var(--line-3);
  color: var(--bone-2);
}
.line-note {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.5;
}
.line-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

/* ---------- Shell -------------------------------------------------------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 0 14px;
  background: var(--ink);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
  scrollbar-width: none;
  counter-reset: nav;
}
.sidebar::-webkit-scrollbar {
  display: none;
}
.appbar,
.subbar {
  display: contents;
}
.sidebar .brand {
  order: 0;
  padding: 0 22px 26px;
}
.primary-nav {
  order: 1;
}
.scope-nav {
  order: 2;
}
.admin-nav {
  order: 3;
}
.identity {
  order: 9;
  margin-top: auto;
}
.nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.primary-nav::before,
.scope-nav::before,
.admin-nav > span {
  display: block;
  padding: 14px 22px 8px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.primary-nav::before {
  content: 'Medien';
}
.scope-nav::before {
  content: 'Zugriff';
}
.nav button {
  counter-increment: nav;
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 0 22px;
  gap: 12px;
  border: 0;
  border-radius: 0;
  font-size: 0.84rem;
  font-stretch: 85%;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--dim);
  text-align: left;
}
.nav button::before {
  background: var(--panel);
}
.nav button .icon {
  display: none;
}
.nav button::after {
  content: counter(nav, decimal-leading-zero);
  order: -1;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 450;
  letter-spacing: 0.04em;
  color: var(--faint);
  width: 18px;
  transition: color 0.3s;
}
.nav button.active::after {
  color: var(--signal);
}
.nav button.active {
  color: var(--bone);
  background: var(--panel);
  box-shadow: inset 2px 0 0 var(--signal);
}
.admin-nav .heizung-link > span {
  margin-left: auto;
  color: var(--faint);
  transition: transform 0.3s var(--ease), color 0.2s;
}
.identity {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 10px 0 14px;
  border-top: 1px solid var(--line);
}
.account {
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  border: 0;
  padding: 6px 8px;
  min-height: 50px;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-stretch: 100%;
}
.account::before {
  background: var(--panel);
}
.account > span {
  display: grid;
  min-width: 0;
  text-align: left;
}
.account strong {
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account small {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 450;
}
.avatar,
.profile-avatar,
.comment-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--panel-2);
}
.account .avatar {
  width: 34px;
  height: 34px;
}
.nav-scrim {
  display: none;
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 var(--pad);
  background: rgba(11, 11, 10, 0.94);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.breadcrumb::before {
  content: 'Moped.fit /';
}
.breadcrumb strong {
  color: var(--bone);
  font-weight: 500;
}
.mobile-menu,
.mobile-wordmark {
  display: none;
}
.content {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 40px) var(--pad) 70px;
}
.content > * {
  animation: fade-up 0.6s var(--ease) both;
}
.content > *:nth-child(2) { animation-delay: 0.06s; }
.content > *:nth-child(3) { animation-delay: 0.12s; }
.content > *:nth-child(n + 4) { animation-delay: 0.18s; }
.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px var(--pad) 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.storage {
  display: grid;
  gap: 7px;
  width: min(300px, 100%);
}
.storage .row {
  display: flex;
  justify-content: space-between;
  color: var(--bone-2);
}
.storage .row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.storage .icon {
  width: 14px;
}
.audit-notice {
  display: flex;
  align-items: center;
  gap: 8px;
}
.audit-notice .icon {
  width: 14px;
}

/* ---------- Seitenköpfe & Bausteine ------------------------------------- */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.page-heading h1 {
  margin: 0;
  font-stretch: 64%;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.88;
}
.page-heading p {
  margin: 10px 0 0;
  color: var(--dim);
}
.page-heading .primary {
  min-height: 44px;
}
.eyebrow,
.discord-eyebrow,
.drive-head small {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 450;
  letter-spacing: 0.04em;
  color: var(--bone-2);
  vertical-align: middle;
  text-transform: uppercase;
}
.pill.success {
  color: var(--ok);
  border-color: rgba(156, 207, 107, 0.4);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
}
.panel h2 {
  margin-bottom: 18px;
}
.inset-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 2px solid var(--signal);
  background: var(--signal-soft);
  font-size: 0.84rem;
  color: var(--bone-2);
}
.secret {
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 18px;
  background: #000;
  border: 1px dashed var(--signal);
  overflow-wrap: anywhere;
  user-select: all;
  margin: 12px 0 18px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* ---------- Startseite --------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  margin: calc(-1 * clamp(22px, 3vw, 40px)) calc(-1 * var(--pad)) 0;
  min-height: min(78vh, 760px);
  display: flex;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  animation: none !important;
}
.hero-media {
  z-index: -1;
}
.hero-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  gap: 18px;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--bone-2);
  animation: fade 1s var(--ease) both;
}
.hero-title {
  margin: auto 0 0;
  font-size: clamp(3.6rem, 10.5vw, 10rem);
  font-stretch: 62%;
  font-weight: 900;
  line-height: 0.84;
  overflow-wrap: anywhere;
}
.hero-sub {
  max-width: 42ch;
  font-size: 1.02rem;
  color: var(--bone-2);
  margin: 4px 0 0;
  animation: fade-up 0.9s var(--ease) 0.35s both;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  animation: fade-up 0.9s var(--ease) 0.45s both;
}
.hero-actions button {
  min-height: 48px;
  padding: 0 1.4em;
}
.hero-actions .ghost {
  border: 1px solid var(--line-3);
  color: var(--bone);
}
.hero-actions .ghost .icon {
  transition: transform 0.35s var(--ease);
}
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  color: var(--bone-2);
  animation: fade 1.2s var(--ease) 0.6s both;
}
.hero-foot b {
  color: var(--signal);
  font-weight: 600;
}
.hero-admin {
  margin-left: auto;
  color: var(--dim);
}
.hero-admin button.link {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 450;
  letter-spacing: 0.06em;
}
.spec {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
}
.spec-label {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stats span {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  padding: 22px 22px 20px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.stats span:last-child {
  border-right: 0;
}
.stats strong {
  font-family: var(--sans);
  font-stretch: 66%;
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: 0;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 calc(-1 * var(--pad)) 44px;
  border-bottom: 1px solid var(--line);
}
.home-shortcuts button {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 14px;
  min-height: 112px;
  padding: 20px var(--pad) 20px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}
.home-shortcuts button:first-child {
  padding-left: var(--pad);
}
.home-shortcuts button:last-child {
  border-right: 0;
}
.home-shortcuts button::before {
  background: var(--signal);
}
.shortcut-text {
  flex: 1;
  display: grid;
  gap: 4px;
  margin-top: auto;
}
.home-shortcuts strong {
  font-stretch: 66%;
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  text-transform: uppercase;
}
.home-shortcuts small {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 450;
}
.home-shortcuts .icon {
  align-self: flex-end;
  transition: transform 0.35s var(--ease);
}

/* ---------- Bibliothek --------------------------------------------------- */
.library-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.library-top h2 {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.6rem;
  font-stretch: 66%;
}
.library-top h2 .mono {
  color: var(--signal);
}
.library-top > .small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.library-top .icon {
  width: 13px;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar select {
  width: auto;
  min-width: 170px;
}
.search {
  flex: 1;
  min-width: min(100%, 240px);
  position: relative;
  display: flex;
  align-items: center;
}
.search .icon {
  position: absolute;
  left: 13px;
  color: var(--dim);
  pointer-events: none;
}
.search input {
  padding-left: 40px;
  min-height: 44px;
}
.search:focus-within .icon {
  color: var(--signal);
}
.toolbar > select {
  min-height: 44px;
}
.view-toggle {
  display: flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.view-toggle button {
  border: 0;
  width: 44px;
  min-height: 42px;
  padding: 0;
  color: var(--dim);
  border-radius: 0;
}
.view-toggle button + button {
  border-left: 1px solid var(--line-2);
}
.view-toggle button.active {
  color: var(--ink);
  background: var(--bone);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.file-card {
  position: relative;
  background: var(--ink);
  min-width: 0;
  animation: fade-up 0.5s var(--ease) both;
  transition: background-color 0.3s;
}
.grid > :nth-child(1) { animation-delay: 0.02s; }
.grid > :nth-child(2) { animation-delay: 0.05s; }
.grid > :nth-child(3) { animation-delay: 0.08s; }
.grid > :nth-child(4) { animation-delay: 0.11s; }
.grid > :nth-child(5) { animation-delay: 0.14s; }
.grid > :nth-child(6) { animation-delay: 0.17s; }
.grid > :nth-child(7) { animation-delay: 0.2s; }
.grid > :nth-child(8) { animation-delay: 0.23s; }
.grid > :nth-child(n + 9) { animation-delay: 0.26s; }
.preview {
  all: unset;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  background: #0f0f0e;
  color: var(--faint);
}
.preview:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
}
.preview > .icon {
  width: 38px;
  height: 38px;
  stroke-width: 1.2;
  transition: color 0.3s, transform 0.5s var(--ease);
}
.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) brightness(0.92);
  transition: transform 1s var(--ease), filter 0.6s var(--ease);
}
.preview::after {
  /* orangefarbene Linie wischt beim Hover unten durch */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.badge,
.duration,
.uploader-avatar {
  position: absolute;
  z-index: 2;
}
.badge {
  top: 10px;
  left: 10px;
  padding: 3px 7px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(11, 11, 10, 0.78);
}
.duration {
  right: 10px;
  bottom: 10px;
  padding: 3px 7px;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  font-variant-numeric: tabular-nums;
}
.uploader-avatar {
  top: 9px;
  right: 9px;
}
.uploader-avatar .avatar {
  width: 24px;
  height: 24px;
  display: block;
}
.file-info {
  padding: 12px 14px 10px;
}
.file-info h3 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-stretch: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}
.file-info footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--dim);
}
.file-info footer > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.file-info footer .icon {
  width: 13px;
  height: 13px;
}
.favorite {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  color: var(--faint);
}
.favorite::before {
  display: none;
}
.favorite.active {
  color: var(--signal);
}
.favorite.active .icon {
  fill: currentColor;
  animation: stamp 0.35s var(--ease);
}
@keyframes stamp {
  0% {
    transform: scale(1.6) rotate(-12deg);
    opacity: 0;
  }
}
.list-view {
  display: grid;
  border-top: 1px solid var(--line);
}
.list-view .file-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.list-view .preview {
  aspect-ratio: 4 / 3;
}
.list-view .preview > .icon {
  width: 22px;
  height: 22px;
}
.list-view .badge,
.list-view .uploader-avatar,
.list-view .duration {
  display: none;
}
.list-view .file-info {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
}
.list-view .file-info h3 {
  margin: 0;
}
.list-view .file-info footer {
  border: 0;
  margin: 0;
  padding: 0;
}
.list-view > :nth-child(n) {
  animation-delay: 0s;
}
.skeleton {
  aspect-ratio: 4 / 4.3;
  background: linear-gradient(90deg, var(--ink) 30%, var(--ink-2) 50%, var(--ink) 70%);
  background-size: 300% 100%;
  animation: skeleton 1.3s linear infinite;
}
@keyframes skeleton {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
.empty {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 48px 32px;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(236, 232, 223, 0.025) 14px 15px);
}
.empty-icon {
  color: var(--signal);
  margin-bottom: 12px;
}
.empty-icon .icon {
  width: 30px;
  height: 30px;
}
.empty h3 {
  font-size: 2rem;
  font-stretch: 66%;
}
.empty p {
  color: var(--dim);
}
.empty .primary {
  margin-top: 10px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
}

/* ---------- Dialoge ------------------------------------------------------ */
dialog {
  color: var(--bone);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0;
  width: min(940px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  overflow: auto;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
dialog[open] {
  opacity: 1;
  transform: none;
}
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: translateY(14px);
  }
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s, overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
dialog[open]::backdrop {
  background: rgba(0, 0, 0, 0.78);
}
@starting-style {
  dialog[open]::backdrop {
    background: rgba(0, 0, 0, 0);
  }
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.modal-head h2 {
  margin: 0;
  font-size: 1.3rem;
  font-stretch: 70%;
}
.modal-head [data-close] {
  border-color: transparent;
}
.modal-head [data-close] .icon {
  transition: transform 0.4s var(--ease);
}
.modal-body {
  padding: 22px 24px 24px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 24px;
}
.media-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  background: #000;
  border: 1px solid var(--line);
  color: var(--faint);
  overflow: hidden;
}
.media-stage > .icon {
  width: 56px;
  height: 56px;
}
.media-stage img,
.media-stage video {
  display: block;
  width: 100%;
  max-height: 64dvh;
  object-fit: contain;
  animation: fade 0.5s var(--ease);
}
.media-stage img {
  cursor: zoom-in;
  transition: transform 0.5s var(--ease);
}
.media-stage img.zoom {
  transform: scale(1.8);
  cursor: zoom-out;
}
.media-stage audio {
  width: calc(100% - 40px);
}
.media-stage:fullscreen img {
  max-height: 100dvh;
}
.media-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.media-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.media-controls select {
  width: auto;
  min-height: 36px;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
}
.details h3 {
  font-size: 2rem;
  font-stretch: 66%;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.description {
  color: var(--dim);
  font-size: 0.9rem;
  white-space: pre-wrap;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 16px;
}
.chips span {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bone-2);
}
.definition {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}
.definition dt,
.definition dd {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.definition dt {
  padding-right: 18px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  align-items: center;
}
.definition dd {
  text-align: right;
  overflow-wrap: anywhere;
}
.detail-actions {
  display: grid;
  gap: 6px;
}
.detail-actions > a,
.detail-actions > button {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
}
.video-quality {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.video-quality label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.video-quality select {
  flex: 1;
  min-width: 0;
}
.video-quality p {
  margin: 0;
}
.user-picker {
  display: grid;
  gap: 2px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.form .user-option,
.user-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bone-2);
  transition: background-color 0.2s;
}
.user-option:has(:checked) {
  background: var(--signal-soft);
  color: var(--bone);
}
.user-option .avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--panel-2);
}
.crop-canvas {
  width: 100%;
  background: #000;
  touch-action: none;
  cursor: crosshair;
}
.crop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.edit-preview {
  width: 100%;
  background: #000;
}

/* ---------- Upload ------------------------------------------------------- */
#upload-modal {
  width: min(720px, calc(100vw - 32px));
}
.dropzone {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 40px 20px;
  border: 1px dashed var(--line-3);
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(236, 232, 223, 0.025) 14px 15px);
  transition: border-color 0.25s, background-color 0.25s;
}
.dropzone > .icon {
  width: 30px;
  height: 30px;
  color: var(--signal);
  margin-bottom: 8px;
}
.dropzone h3 {
  margin: 0;
  font-size: 1.6rem;
  font-stretch: 66%;
}
.dropzone p {
  font-size: 0.84rem;
  color: var(--dim);
}
.dropzone.drag {
  border-color: var(--signal);
  background-color: var(--signal-soft);
}
.upload-items {
  display: grid;
  border-top: 1px solid var(--line);
}
.upload-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--line);
  animation: fade-up 0.4s var(--ease) both;
}
.upload-item > img,
.upload-item > .icon {
  width: 46px;
  height: 46px;
  object-fit: cover;
}
.upload-item > .icon {
  padding: 12px;
  background: var(--panel-2);
  color: var(--dim);
}
.upload-item input {
  min-height: 32px;
  padding: 0.3em 0.5em;
  background: transparent;
  border-color: transparent;
  font-weight: 600;
}
.upload-item small {
  display: block;
  padding-left: 0.5em;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--dim);
}
.upload-item progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  width: auto;
  height: 2px;
}
.upload-item.done small {
  color: var(--ok);
}
#corner-widgets {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
#corner-widgets > * {
  pointer-events: auto;
}
#upload-mini {
  display: grid;
  gap: 6px;
  width: 300px;
  padding: 12px 14px;
  text-align: left;
  justify-content: stretch;
  text-transform: none;
  letter-spacing: 0;
  background: var(--panel);
  border: 1px solid var(--line-2);
  animation: fade-up 0.4s var(--ease) both;
}
#upload-mini .row b {
  font-family: var(--mono);
  color: var(--signal);
}
.upload-mini-name {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#upload-mini small {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--dim);
}

/* ---------- Toasts ------------------------------------------------------- */
#toasts {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1000;
  display: grid;
  gap: 6px;
  width: min(400px, calc(100vw - 28px));
  pointer-events: none;
}
.toast {
  position: relative;
  padding: 12px 16px 12px 18px;
  font-size: 0.86rem;
  color: var(--bone);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--ok);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.5s var(--ease) both, toast-out 0.35s var(--ease-in) 5.6s forwards;
  pointer-events: auto;
  overflow: hidden;
}
.toast::after {
  /* Restzeit-Balken */
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--line-2);
  transform-origin: left;
  animation: countdown 5.6s linear forwards;
}
.toast.bad {
  border-left-color: var(--danger);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(24px);
  }
}
@keyframes countdown {
  to {
    transform: scaleX(0);
  }
}

/* ---------- Tabellen ----------------------------------------------------- */
.table-wrap {
  padding: 0;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 450;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr {
  transition: background-color 0.2s;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  color: var(--dim);
  font-size: 0.74rem;
  margin-top: 2px;
}
td select {
  width: auto;
  min-height: 34px;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
}
td .actions button {
  min-height: 32px;
  padding: 0 0.8em;
  font-size: 0.7rem;
}

/* ---------- Profil ------------------------------------------------------- */
.content > .columns {
  align-items: start;
  gap: 20px;
}
.avatar-editor {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.avatar-editor-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.avatar-editor-row p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--dim);
}
.profile-avatar {
  width: 84px;
  height: 84px;
  box-shadow: 0 0 0 1px var(--line-3), 0 0 0 5px var(--ink), 0 0 0 6px var(--signal);
}
.avatar-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Einladungs-Anfragen ----------------------------------------- */
.invite-requests,
.content > section:has(.request-list) {
  margin-bottom: 28px;
}
.request-list {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.request-row small {
  display: block;
  color: var(--dim);
  margin-top: 2px;
}
.request-row strong {
  overflow-wrap: anywhere;
}
.request-check {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.request-result {
  margin-top: 16px;
}
.request-result:not(:empty) {
  padding: 12px 14px;
  border-left: 2px solid var(--signal);
  background: var(--signal-soft);
  animation: fade-up 0.4s var(--ease);
}

/* ---------- Kommentare --------------------------------------------------- */
.social-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}
.reaction {
  min-height: 34px;
  padding: 0 0.7em;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.reaction span {
  font-size: 1rem;
}
.reaction.selected {
  border-color: var(--signal);
  background: var(--signal-soft);
}
.comment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.comment-heading h3 {
  margin: 0;
  font-size: 1.3rem;
}
.social-status {
  font-size: 0.82rem;
  color: var(--dim);
}
.comment-list {
  display: grid;
  margin: 10px 0 16px;
  border-top: 1px solid var(--line);
}
.comment {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  animation: fade-up 0.4s var(--ease) both;
}
.comment-byline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  margin-bottom: 6px;
}
.comment-byline time {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--faint);
}
.comment-avatar {
  width: 24px;
  height: 24px;
}
.comment-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}
.comment-gif,
.gif-preview img {
  max-width: 240px;
  max-height: 220px;
  margin-top: 8px;
  display: block;
}
.comment-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.comment-actions button {
  min-height: 28px;
  padding: 0 0.6em;
  font-size: 0.66rem;
}
.comment-emojis {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.comment-emojis button {
  min-height: 34px;
  width: 36px;
  padding: 0;
  font-size: 1.05rem;
}
.reply-target {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-left: 2px solid var(--signal);
  background: var(--signal-soft);
  font-size: 0.84rem;
}
.comment-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin: 0;
}
.comment-form .primary {
  justify-self: start;
}

/* ---------- Mitgliederchat ----------------------------------------------- */
#community-chat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.chat-toggle {
  justify-content: flex-start;
  gap: 12px;
  width: 280px;
  min-height: 56px;
  padding: 8px 14px 8px 8px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  background: var(--panel);
  border: 1px solid var(--line-2);
  animation: fade-up 0.6s var(--ease) 0.4s both;
}
.chat-toggle > span:nth-child(2) {
  flex: 1;
  display: grid;
  min-width: 0;
}
.chat-toggle strong {
  font-stretch: 80%;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat-toggle small {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--dim);
  font-weight: 450;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-online::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  background: var(--ok);
  vertical-align: 1px;
  animation: blink 2s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.chat-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--signal);
  color: #fff;
  font-size: 1.05rem;
}
.chat-chevron {
  color: var(--dim);
  transition: transform 0.4s var(--ease);
}
#community-chat.expanded .chat-chevron {
  transform: rotate(180deg);
}
.chat-unread {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #fff;
  background: var(--signal);
}
.chat-panel {
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  height: min(520px, calc(100dvh - 140px));
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform-origin: bottom right;
  animation: chat-open 0.45s var(--ease) both;
}
@keyframes chat-open {
  from {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}
.chat-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 10px 12px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-panel > header strong {
  display: block;
  font-stretch: 70%;
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
}
.chat-panel > header small {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--dim);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-message {
  align-self: flex-start;
  max-width: 85%;
  padding: 8px 12px;
  background: var(--panel-2);
  border-left: 2px solid var(--line-3);
  animation: fade-up 0.3s var(--ease) both;
}
.chat-message.own {
  align-self: flex-end;
  border-left: 0;
  border-right: 2px solid var(--signal);
  background: #201712;
}
.chat-message > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.74rem;
}
.chat-message time {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 0.6rem;
}
.chat-message p {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--bone);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--dim);
  font-size: 0.86rem;
}
.chat-new {
  align-self: center;
  margin: -44px 0 8px;
  min-height: 30px;
  font-size: 0.66rem;
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
  z-index: 2;
}
.chat-compose {
  padding: 10px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.chat-compose textarea {
  min-height: 46px;
  resize: none;
}
.chat-compose > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--faint);
}
.chat-compose button[type='submit'] {
  min-height: 32px;
  color: #fff;
  background: var(--signal);
  border-color: var(--signal);
}
.chat-error {
  margin: 0;
  font-size: 0.78rem;
  color: var(--danger);
}
.chat-error:empty {
  display: none;
}
.sr-chat {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
body:has(.sidebar.open) #corner-widgets {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Alben -------------------------------------------------------- */
.album-total {
  font-family: var(--mono);
  font-size: 0.4em;
  color: var(--signal);
  vertical-align: top;
  margin-left: 6px;
}
.album-create,
.album-link {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}
.album-create input,
.album-link input {
  flex: 1;
  min-width: 200px;
  min-height: 44px;
}
.album-create .primary {
  min-height: 44px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin: 0 0 30px;
}
.album-card {
  position: relative;
  background: var(--ink);
  min-width: 0;
  animation: fade-up 0.5s var(--ease) both;
  transition: background-color 0.3s;
}
.album-grid > :nth-child(2) { animation-delay: 0.05s; }
.album-grid > :nth-child(3) { animation-delay: 0.1s; }
.album-grid > :nth-child(n + 4) { animation-delay: 0.15s; }
.album-cover {
  all: unset;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  cursor: pointer;
  overflow: hidden;
  background: #0f0f0e;
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) brightness(0.9);
  transition: transform 1s var(--ease), filter 0.6s;
}
.album-cover-empty {
  font-size: 2rem;
  color: var(--faint);
}
.album-count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 7px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.75);
}
.album-open-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  color: #fff;
  background: var(--signal);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.45s var(--ease);
}
.album-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 4px;
}
.album-name {
  all: unset;
  cursor: pointer;
  font-stretch: 68%;
  font-weight: 800;
  font-size: 1.45rem;
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.album-status {
  flex: none;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 2px 6px;
  border: 1px solid var(--line-2);
}
.album-card-actions {
  display: flex;
  gap: 2px;
  padding: 6px 8px 10px;
}
.album-card-actions button {
  border-color: transparent;
  min-height: 30px;
  padding: 0 0.6em;
  font-size: 0.64rem;
  color: var(--dim);
}
.album-card-actions .danger {
  margin-left: auto;
  color: var(--danger);
}
.album-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: start;
  padding: 48px 32px;
  background: var(--ink);
}
.album-empty > span {
  font-size: 2rem;
  color: var(--signal);
}
.album-empty p {
  color: var(--dim);
}
[data-back] {
  margin-bottom: 18px;
}
.album-heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.album-sharing {
  padding: 18px 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.album-sharing label {
  display: grid;
  gap: 8px;
}
.album-sharing select {
  max-width: 520px;
}
.album-sharing .album-link {
  margin: 14px 0 6px;
}
.album-sharing p {
  margin: 0;
  font-size: 0.82rem;
}
.album-photo {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  min-width: 0;
  padding: 0;
  text-align: left;
  color: var(--bone);
  border: 0;
  border-radius: 0;
  animation: fade-up 0.5s var(--ease) both;
}
.album-photo::before {
  display: none;
}
button.album-photo {
  display: block;
  width: 100%;
  text-transform: none;
  letter-spacing: 0;
}
.album-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  filter: grayscale(0.2);
  transition: transform 0.9s var(--ease), filter 0.5s;
}
.album-photo a {
  display: block;
  overflow: hidden;
}
.album-photo div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  font-size: 0.82rem;
}
.album-photo div span,
button.album-photo > span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
button.album-photo > span {
  padding: 10px 12px;
  font-size: 0.82rem;
}
.album-photo [data-remove] {
  min-height: 28px;
  width: 28px;
  padding: 0;
  flex: none;
}
.album-action-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 24px;
}
.album-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.album-gallery {
  width: min(1240px, 96vw);
  max-width: 96vw;
  max-height: 96dvh;
  padding: 12px;
  background: #000;
}
.album-gallery header,
.album-gallery footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--bone-2);
}
.album-gallery footer {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.album-gallery header button {
  width: 40px;
  padding: 0;
  font-size: 1.3rem;
}
.gallery-stage {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
}
.gallery-stage img {
  width: 100%;
  height: 74dvh;
  object-fit: contain;
  min-width: 0;
  animation: fade 0.4s var(--ease);
}
.gallery-stage button {
  font-size: 1.6rem;
  min-height: 48px;
  width: 48px;
  padding: 0;
}
.shared-album {
  max-width: 1400px;
  margin: auto;
  padding: 32px clamp(16px, 4vw, 48px);
}
.shared-album > a {
  display: inline-block;
  margin-bottom: 28px;
  font-stretch: 68%;
  font-weight: 850;
  font-size: 1.4rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
}
.shared-album .album-grid,
.shared-album #album-photos {
  gap: 1px;
}

/* ---------- Ablage ------------------------------------------------------- */
.drive {
  max-width: 1320px;
}
.drive [hidden] {
  display: none !important;
}
.drive-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.drive-head h1 {
  margin: 0;
  font-stretch: 64%;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.88;
}
.drive-head p {
  margin: 10px 0 0;
  color: var(--dim);
}
.drive-head > div:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.drive-head button {
  min-height: 44px;
}
.drive-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}
.drive-path button {
  border-color: transparent;
  min-height: 30px;
  padding: 0 0.6em;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 450;
  color: var(--dim);
  overflow-wrap: anywhere;
}
.drive-path button:last-child {
  color: var(--bone);
  border-color: var(--line-2);
}
.drive-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.drive-search,
.drive-options,
.drive-options > label,
.drive-options > div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.drive-search {
  flex: 1;
  max-width: 460px;
  min-width: 0;
  padding: 2px 2px 2px 12px;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  transition: border-color 0.2s;
}
.drive-search:focus-within {
  border-color: var(--signal);
}
.drive-search > .icon {
  color: var(--dim);
}
.drive-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  min-height: 36px;
  padding: 0.4em;
  box-shadow: none !important;
}
.drive-search button {
  min-height: 36px;
}
.drive-options > label {
  font-size: 0.64rem;
}
.drive-options select {
  width: auto;
  min-height: 38px;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
}
.drive-options button {
  min-height: 38px;
  min-width: 38px;
  padding: 0 0.7em;
}
.drive-options > div {
  gap: 0;
  border: 1px solid var(--line-2);
  margin-left: 4px;
}
.drive-options > div button {
  border: 0;
  min-height: 36px;
  color: var(--dim);
  border-radius: 0;
}
.drive-options > div button + button {
  border-left: 1px solid var(--line-2);
}
.drive-options button[aria-pressed='true'] {
  color: var(--ink);
  background: var(--bone);
}
.drive-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}
.drive-bar strong {
  font-weight: 500;
}
.drive-bar button {
  min-height: 32px;
  animation: fade-up 0.3s var(--ease);
}
.drive-group {
  margin-bottom: 26px;
}
.drive-group h2 {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 450;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin: 6px 0 8px;
}
.drive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.drive-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 4px 10px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s;
  animation: fade-up 0.4s var(--ease) both;
}
.drive-list li:has(:checked) {
  background: var(--signal-soft);
}
.drive-list li > input {
  flex: none;
}
.drive-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  text-align: left;
  border: 0;
  padding: 4px;
  min-height: 50px;
  text-transform: none;
  letter-spacing: 0;
  font-stretch: 100%;
}
.drive-item::before {
  display: none;
}
.drive-item > span:last-child {
  min-width: 0;
  display: grid;
}
.drive-item strong,
.drive-item small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.drive-item strong {
  font-size: 0.9rem;
}
.drive-item small {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--dim);
  font-weight: 450;
}
.drive-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--dim);
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.drive-icon.folder {
  color: var(--signal);
}
.drive-list button[data-edit],
.drive-list button[data-move] {
  border-color: transparent;
  min-height: 30px;
  padding: 0 0.7em;
  font-size: 0.64rem;
  color: var(--dim);
}
.drive-list.drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.drive-grid li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px;
  padding: 8px;
  background: var(--ink);
  border: 0;
  min-width: 0;
}
.drive-grid li > input {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
}
.drive-grid .drive-item {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0;
}
.drive-grid .drive-item > span:last-child {
  padding: 0 4px;
}
.drive-grid .drive-icon {
  width: 100%;
  height: 120px;
}
.drive-grid .drive-icon.folder {
  height: 70px;
}
.drive-grid .drive-icon > .icon {
  width: 26px;
  height: 26px;
}
.drive-grid .drive-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.drive-grid [data-move] {
  justify-self: end;
  grid-column: 2;
}
.drive-grid [data-edit] {
  justify-self: start;
  grid-column: 1;
}
.drive .drive-target {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
  background: var(--signal-soft) !important;
}
.drive-empty {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 48px 32px;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(236, 232, 223, 0.025) 14px 15px);
}
.drive-empty > .icon {
  width: 30px;
  height: 30px;
  color: var(--signal);
}
.drive-empty p {
  color: var(--dim);
}
.drive-dialog select {
  max-width: 100%;
}

/* ---------- Discord ------------------------------------------------------ */
.discord-dashboard {
  display: grid;
  gap: 20px;
}
.discord-dashboard .page-heading {
  margin-bottom: 0;
}
.discord-dashboard .panel {
  min-width: 0;
}
.discord-dashboard h2 {
  font-size: 1.4rem;
  margin: 0 0 16px;
}
.discord-dashboard h3 {
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.discord-dashboard label {
  display: grid;
  gap: 8px;
}
.discord-now {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px;
  border-left: 3px solid var(--signal);
}
.discord-art {
  width: 120px;
  height: 120px;
  flex: none;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: #000;
  border: 1px solid var(--line-2);
}
.discord-art > span {
  font-stretch: 62%;
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--bone);
}
.discord-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}
.discord-bars i {
  width: 4px;
  height: 4px;
  background: var(--signal);
}
.is-playing .discord-bars i {
  animation: eq 0.7s ease-in-out infinite alternate;
}
.discord-bars i:nth-child(2) { animation-delay: -0.2s; }
.discord-bars i:nth-child(3) { animation-delay: -0.5s; }
.discord-bars i:nth-child(4) { animation-delay: -0.1s; }
.discord-bars i:nth-child(5) { animation-delay: -0.35s; }
@keyframes eq {
  to {
    height: 20px;
  }
}
.discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.discord-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--faint);
}
.is-playing .discord-badge::before {
  background: var(--ok);
  animation: blink 2s steps(2) infinite;
}
.discord-dashboard:has(.discord-error:not([hidden])) .discord-badge::before {
  background: var(--danger);
}
.discord-now-copy {
  flex: 1;
  min-width: 0;
}
.discord-now-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
}
.discord-now-copy p {
  color: var(--dim);
  font-size: 0.86rem;
}
.discord-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.discord-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}
.discord-metrics span {
  display: flex;
  flex-direction: column-reverse;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.discord-metrics span:last-child {
  border-right: 0;
}
.discord-metrics strong {
  font-family: var(--sans);
  font-stretch: 66%;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--bone);
}
.discord-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}
.discord-stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.discord-request form {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.discord-request form button {
  justify-self: start;
}
.discord-request details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.discord-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.discord-queue {
  margin: 0;
  padding-left: 26px;
  max-height: 300px;
  overflow: auto;
}
.discord-queue li {
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.discord-queue li::marker {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--signal);
}
.discord-queue small,
.discord-audit small {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--dim);
  margin-top: 2px;
}
.discord-automix {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.86rem;
}
.discord-dashboard [data-volume-form] {
  display: grid;
  gap: 12px;
}
.discord-dashboard output {
  font-family: var(--mono);
  color: var(--signal);
}
.discord-protection > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 0.86rem;
}
.discord-protection strong {
  margin-left: 8px;
}
.discord-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.discord-rooms article {
  padding: 14px;
  background: var(--panel);
}
.discord-rooms p {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--dim);
  overflow-wrap: anywhere;
}
.discord-audit {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 350px;
  overflow: auto;
}
.discord-audit li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}
.discord-audit time {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--faint);
}
.discord-error {
  margin: 0;
  padding: 12px 14px;
  border-left: 2px solid var(--danger);
  background: rgba(255, 90, 74, 0.08);
  color: #ffc9c2;
}

.grid > *,
.album-grid > *,
.drive-list.drive-grid > li,
.discord-rooms > * {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.grid > .empty,
.album-grid > .album-empty {
  grid-column: 1 / -1;
}

/* ---------- Scroll-Einblendung ------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Hover nur auf Geräten mit Maus – verhindert „hängende“ Zustände auf Touch */
@media (hover: hover) {
  a:hover {
    color: #fff;
    text-decoration-color: var(--signal);
  }
  button:hover:not(:disabled),
  .detail-actions a:hover,
  .album-link a:hover,
  .album-gallery footer a:hover {
    color: var(--ink);
    border-color: var(--bone);
  }
  button:hover:not(:disabled)::before,
  .detail-actions a:hover::before,
  .album-link a:hover::before,
  .album-gallery footer a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
  }
  .primary:hover:not(:disabled) {
    color: var(--ink);
  }
  .ghost:hover:not(:disabled) {
    color: var(--bone);
    border-color: transparent;
  }
  button.danger:hover:not(:disabled) {
    color: #000;
    border-color: var(--danger);
  }
  button.link:hover:not(:disabled) {
    color: var(--signal);
  }
  input:hover,
  select:hover,
  textarea:hover {
    border-color: var(--line-3);
  }
  .brand:hover .brand-mark {
    transform: skewX(-14deg) translateX(3px);
  }
  .nav button:hover:not(:disabled) {
    color: var(--bone);
    border: 0;
  }
  .nav button.active::after,
  .nav button:hover::after {
    color: var(--signal);
  }
  .admin-nav .heizung-link:hover > span {
    transform: translate(2px, -2px);
    color: var(--signal);
  }
  .account:hover:not(:disabled) {
    color: var(--bone);
  }
  .hero-actions .ghost:hover .icon {
    transform: translateX(4px);
  }
  .home-shortcuts button:hover:not(:disabled) {
    color: #000;
  }
  .home-shortcuts button:hover .mono,
  .home-shortcuts button:hover small {
    color: rgba(0, 0, 0, 0.6);
  }
  .home-shortcuts button:hover .icon {
    transform: translateX(5px);
  }
  .file-card:hover {
    background: var(--ink-2);
  }
  .file-card:hover .preview > .icon {
    color: var(--signal);
    transform: scale(1.08);
  }
  .file-card:hover .preview img {
    transform: scale(1.05);
    filter: none;
  }
  .file-card:hover .preview::after {
    transform: scaleX(1);
  }
  .favorite:hover:not(:disabled) {
    color: var(--signal);
  }
  .modal-head [data-close]:hover .icon {
    transform: rotate(90deg);
  }
  .user-option:hover {
    background: var(--panel-2);
  }
  .upload-item input:hover {
    border-color: var(--line-2);
  }
  #upload-mini:hover:not(:disabled) {
    color: var(--ink);
  }
  tbody tr:hover {
    background: var(--ink-2);
  }
  .chat-toggle:hover:not(:disabled) {
    color: var(--ink);
  }
  .chat-toggle:hover small,
  .chat-toggle:hover .chat-chevron {
    color: rgba(0, 0, 0, 0.6);
  }
  .album-card:hover {
    background: var(--ink-2);
  }
  .album-card:hover .album-cover img {
    transform: scale(1.05);
    filter: none;
  }
  .album-card:hover .album-open-hint {
    clip-path: inset(0 0 0 0);
  }
  .album-name:hover {
    color: var(--signal);
  }
  button.album-photo:hover:not(:disabled) {
    color: var(--bone);
  }
  .album-photo:hover img {
    transform: scale(1.05);
    filter: none;
  }
  .drive-list li:hover {
    background: var(--ink-2);
  }
  .drive-item:hover:not(:disabled) {
    color: var(--bone);
  }
  .drive-grid li:hover .drive-icon img {
    transform: scale(1.06);
  }
}

/* ---------- Responsiv ---------------------------------------------------- */
@media (min-width: 561px) {
  .workspace-footer {
    padding-right: max(var(--pad), 320px);
  }
}
@media (max-width: 1100px) {
  .home-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-shortcuts button:nth-child(2) {
    border-right: 0;
  }
  .home-shortcuts button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .home-shortcuts button:nth-child(3) {
    padding-left: var(--pad);
  }
  .auth-page {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-art {
    min-height: 62vh;
  }
  .auth-form-wrap {
    border-left: 0;
    border-top: 1px solid var(--line);
    justify-content: center;
  }
  .auth-form {
    max-width: 460px;
  }
}
@media (max-width: 960px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(290px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.5s var(--ease);
    z-index: 80;
  }
  .sidebar.open {
    transform: none;
    box-shadow: 40px 0 80px rgba(0, 0, 0, 0.6);
  }
  .sidebar.open .nav button {
    animation: fade-up 0.45s var(--ease) both;
  }
  .sidebar.open .nav button:nth-child(2) { animation-delay: 0.03s; }
  .sidebar.open .nav button:nth-child(3) { animation-delay: 0.06s; }
  .sidebar.open .nav button:nth-child(4) { animation-delay: 0.09s; }
  .sidebar.open .nav button:nth-child(n + 5) { animation-delay: 0.12s; }
  .nav-scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.7);
    animation: fade 0.3s var(--ease);
  }
  .nav-scrim::before {
    display: none;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .mobile-wordmark {
    display: block;
    font-stretch: 68%;
    font-weight: 850;
    font-size: 1.15rem;
    text-transform: uppercase;
  }
  .breadcrumb::before {
    display: none;
  }
  .topbar {
    padding: 0 12px 0 6px;
  }
  .detail-layout,
  .discord-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .spec {
    grid-template-columns: 1fr;
  }
  .spec-label {
    padding: 12px 0 0;
    border-right: 0;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats span {
    padding: 14px 16px 14px 0;
  }
  .stats span:nth-child(2) {
    border-right: 0;
  }
  .stats span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stats span:nth-child(odd) {
    padding-right: 16px;
  }
  .stats span:nth-child(even) {
    padding-left: 16px;
  }
  .columns,
  .crop-grid {
    grid-template-columns: 1fr 1fr;
  }
  .content > .columns {
    grid-template-columns: 1fr;
  }
  .list-view .file-info {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .list-view .file-info footer {
    display: none;
  }
  .modal-body {
    padding: 18px;
  }
  dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }
  .discord-now {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px;
  }
  .discord-art {
    width: 80px;
    height: 80px;
  }
  .discord-art > span {
    font-size: 1.8rem;
  }
  .discord-audit li {
    flex-direction: column;
    gap: 4px;
  }
  .workspace-footer {
    padding-bottom: 96px;
  }
  .drive-search {
    flex-basis: 100%;
    max-width: none;
  }
  .drive-options {
    flex-wrap: wrap;
  }
}
@media (max-width: 560px) {
  :root {
    font-size: 14.5px;
  }
  .hero {
    min-height: 82svh;
  }
  .hero-title {
    font-size: clamp(3.4rem, 19vw, 6rem);
  }
  .hero-actions button {
    flex: 1;
  }
  .hero-admin {
    margin-left: 0;
    flex-basis: 100%;
  }
  .auth-art {
    min-height: 54vh;
  }
  .auth-title {
    font-size: clamp(2.6rem, 14.5vw, 5.5rem);
  }
  .auth-top .mono {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .file-info {
    padding: 9px 10px 8px;
  }
  .file-info footer > span {
    font-size: 0;
    gap: 0;
  }
  .meta span:last-child {
    display: none;
  }
  .home-shortcuts button {
    min-height: 96px;
    padding: 16px 14px;
  }
  .home-shortcuts button:nth-child(odd) {
    padding-left: var(--pad);
  }
  .home-shortcuts strong {
    font-size: 1.5rem;
  }
  .home-shortcuts .icon {
    display: none;
  }
  .stats strong {
    font-size: 2rem;
  }
  .toolbar > select {
    flex: 1;
  }
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .album-card-actions {
    flex-wrap: wrap;
  }
  .album-link > * {
    width: 100%;
  }
  .page-heading > button,
  .page-heading > div:last-child:not(:first-child) {
    width: 100%;
  }
  .discord-metrics strong {
    font-size: 1.6rem;
  }
  #corner-widgets {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
  #upload-mini {
    width: calc(100vw - 20px);
  }
  .chat-toggle {
    width: auto;
    min-height: 48px;
    padding: 5px 10px 5px 5px;
  }
  .chat-toggle small {
    display: none;
  }
  .chat-symbol {
    width: 36px;
    height: 36px;
  }
  .chat-panel {
    width: calc(100vw - 20px);
    height: min(70dvh, 560px);
  }
  .gallery-stage {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 2px;
  }
  .gallery-stage button {
    width: 34px;
    min-height: 34px;
    font-size: 1.3rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .line > span {
    transform: none;
  }
  .backdrop-grain {
    animation: none;
  }
}
