:root {
  color-scheme: light dark;
  --page-bg: #ffffff;
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.72);
  --line: rgba(127, 127, 127, 0.25);
  --line-strong: rgba(127, 127, 127, 0.35);
  --surface: rgba(127, 127, 127, 0.06);
  --surface-hover: rgba(127, 127, 127, 0.10);
  --surface-active: rgba(127, 127, 127, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page-bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
}

body {
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 12px 20px 24px;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  text-align: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.brand-link img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 100%;
  opacity: 0.95;
}

.hero-copy {
  max-width: 700px;
}

h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.2px;
}

h2 {
  font-size: 18px;
  margin: 0;
}

.card-head p,
.status {
  color: var(--muted);
}

.card-head p {
  margin: 4px 0 0;
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
}

.auth-card {
  max-width: 680px;
  margin: 0 auto;
}

.card-head {
  margin-bottom: 10px;
}

.card-head.compact {
  margin-bottom: 6px;
}

.action-row {
  display: flex;
  justify-content: flex-end;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

input,
textarea,
button {
  width: 100%;
  font: inherit;
  border-radius: 10px;
}

input,
textarea {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--text);
  padding: 12px;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(17, 17, 17, 0.5);
}

input:focus,
textarea:focus,
button:focus,
.toolbar-btn:focus {
  outline: none;
  border-color: rgba(127, 127, 127, 0.55);
  box-shadow: 0 0 0 2px rgba(127, 127, 127, 0.12);
}

.button-row {
  margin-top: 10px;
}

.button-row.tight {
  margin-top: 10px;
}

button {
  border: 1px solid var(--line-strong);
  padding: 10px;
  background: var(--surface-hover);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--surface-active);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button.secondary {
  width: auto;
  min-width: 130px;
  background: var(--surface);
}

button:disabled {
  cursor: default;
  opacity: 0.7;
}

.status {
  margin-top: 8px;
  font-size: 13px;
}

.reply {
  min-height: 80px;
  white-space: pre-wrap;
}

.hidden {
  display: none;
}

.center {
  text-align: center;
}

.auth-choice {
  display: grid;
  gap: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.toolbar-card {
  padding: 12px 16px;
}

/* >>> FIX HIER <<< */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  margin-bottom: 0;
}

.toolbar-btn:hover {
  background: var(--surface-active);
}

.secondary-btn {
  background: var(--surface);
}

.small-btn {
  min-width: 110px;
  padding: 9px 12px;
}

.upload-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.upload-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(127, 127, 127, 0.04);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.upload-meta {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .shell {
    padding: 10px 14px 20px;
  }

  .brand-link img {
    height: 38px;
  }

  h1 {
    font-size: 15px;
  }

  .card {
    padding: 14px;
  }

  .toolbar {
    justify-content: space-between;
    gap: 8px;
  }

  .toolbar-btn,
  .small-btn,
  button.secondary {
    min-width: 0;
  }
}