/* ============================================================
   Die Pinnwand — Grunddesign
   Warme, physische Kork-Ästhetik statt digital-steriler Optik.
   ============================================================ */

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/caveat-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/caveat-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+0304, U+0308;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/caveat-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/caveat-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+0304, U+0308;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/sourceserif4-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/sourceserif4-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+0304, U+0308;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/sourceserif4-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/sourceserif4-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+0304, U+0308;
}

:root {
  --cork-1: #b98450;
  --cork-2: #a3703f;
  --cork-3: #8a5a3a;
  --wood-dark: #4a3221;
  --ink: #2b1f16;
  --paper: #fffdf8;
  --paper-dim: #f4ede1;
  --accent: #d9552c;
  --accent-ink: #fff6ee;
  --shadow-color: 0deg 0% 0%;

  --font-display: 'Caveat', 'Segoe Script', cursive;
  --font-body: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --note-yellow: #f5d76e;
  --note-rosa: #f3aebd;
  --note-mint: #a3d9c5;
  --note-blau: #9ec6e0;
  --note-lila: #c6aee0;
  --note-pfirsich: #f3c19c;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--wood-dark);
  -webkit-tap-highlight-color: transparent;
}

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

/* ---------- Kopfzeile ---------- */

.masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: max(14px, env(safe-area-inset-top)) 20px 20px;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20,13,8,0.55) 0%, rgba(20,13,8,0.28) 55%, transparent 100%);
}

.masthead__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  color: #fff8ee;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
  letter-spacing: 0.5px;
}

.masthead__subtitle {
  margin: 2px 0 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,248,238,0.75);
}

/* ---------- Pinnwand-Fläche ---------- */

.board-viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.board-viewport.is-panning {
  cursor: grabbing;
}

.board-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 2600px;
  height: 2600px;
  transform-origin: 0 0;
  will-change: transform;
}

.board-texture {
  position: absolute;
  inset: 0;
  background-color: var(--cork-2);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.05) 0, transparent 3%),
    radial-gradient(circle at 65% 10%, rgba(0,0,0,0.08) 0, transparent 2.4%),
    radial-gradient(circle at 40% 60%, rgba(255,255,255,0.04) 0, transparent 2%),
    radial-gradient(circle at 85% 75%, rgba(0,0,0,0.09) 0, transparent 3%),
    radial-gradient(circle at 25% 85%, rgba(255,255,255,0.05) 0, transparent 2.6%),
    radial-gradient(circle at 90% 35%, rgba(0,0,0,0.07) 0, transparent 2%),
    radial-gradient(circle at 5% 55%, rgba(0,0,0,0.06) 0, transparent 2.2%),
    linear-gradient(135deg, var(--cork-1) 0%, var(--cork-2) 45%, var(--cork-3) 100%);
  background-size: 140px 140px, 160px 160px, 120px 120px, 180px 180px, 130px 130px, 150px 150px, 110px 110px, 100% 100%;
  box-shadow: inset 0 0 180px rgba(0,0,0,0.35);
}

.board-empty {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 2rem;
  color: rgba(255,248,238,0.85);
  text-align: center;
  width: 80%;
  pointer-events: none;
}

.notes-layer {
  position: absolute;
  inset: 0;
}

/* ---------- Notiz-Karten ---------- */

.note-card {
  position: absolute;
  width: 190px;
  padding: 22px 18px 18px;
  background: var(--card-color, var(--note-yellow));
  box-shadow:
    0 1px 2px hsl(var(--shadow-color) / 0.15),
    0 8px 16px hsl(var(--shadow-color) / 0.28),
    0 2px 4px hsl(var(--shadow-color) / 0.2);
  cursor: default;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: pin-drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  outline: none;
  /* Karten sind rein visuell — Pan/Zoom-Gesten der Pinnwand müssen auch
     funktionieren, wenn sie über einer Karte beginnen. */
  touch-action: none;
}

.note-card:hover,
.note-card:focus-visible {
  transform: rotate(var(--rot, 0deg)) scale(1.06) translateY(-3px);
  box-shadow:
    0 2px 4px hsl(var(--shadow-color) / 0.18),
    0 16px 28px hsl(var(--shadow-color) / 0.32),
    0 4px 8px hsl(var(--shadow-color) / 0.22);
  z-index: 5;
}

.note-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@keyframes pin-drop {
  0% { opacity: 0; transform: rotate(var(--rot,0deg)) translateY(-40px) scale(0.85); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: rotate(var(--rot,0deg)) translateY(0) scale(1); }
}

.note-card__text {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.28;
  color: var(--ink);
  word-break: break-word;
  white-space: pre-wrap;
}

.note-card__name {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(43,31,22,0.55);
  text-align: right;
}

.note-card__name:empty {
  display: none;
}

.note-card__pin {
  display: none;
}

/* Nur Polaroids haben eine sichtbare Pinnnadel — Post-its liegen "flach"
   und werden rein durch Form/Schatten als angepinnt gelesen. */
.note-card--polaroid .note-card__pin {
  display: block;
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4f4f4, #b8b8b8 65%, #8a8a8a 100%);
  box-shadow: 0 3px 5px rgba(0,0,0,0.4);
  z-index: 3;
}

.note-card__tape {
  display: none;
}

/* Post-it Variante */
.note-card--postit {
  border-radius: 2px 10px 2px 10px / 10px 2px 10px 2px;
  clip-path: polygon(0% 0%, 100% 0%, 100% 96%, 92% 100%, 0% 100%);
}

/* Polaroid Variante */
.note-card--polaroid {
  background: var(--paper);
  padding: 14px 14px 40px;
  border-radius: 3px;
}

.note-card--polaroid .note-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1px;
  background: var(--card-color, var(--note-yellow));
  overflow: hidden;
  margin-bottom: 12px;
}

.note-card__photo .char-face {
  display: block;
  width: 100%;
  height: 100%;
}

.note-card--polaroid .note-card__text {
  font-size: 1.15rem;
  text-align: center;
}

.note-card--polaroid .note-card__name {
  text-align: center;
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
}

/* ---------- Zoom-Steuerung ---------- */

/* Eine kompakte horizontale Werkzeugleiste statt gestapelter Einzelkreise:
   links der Refresh-Button eigenständig, rechts die drei Zoom-Aktionen als
   eine zusammenhängende Pille — visuell klar vom großen Plus-FAB getrennt,
   auch wenn beide unten rechts sitzen. */
.board-toolbar {
  position: fixed;
  right: calc(20px + 60px + 14px);
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
}

.board-toolbar__zoom {
  display: flex;
  align-items: center;
  background: rgba(255,253,248,0.94);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  padding: 3px;
  gap: 1px;
}

.board-toolbar__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--wood-dark);
  font-size: 1.15rem;
  font-family: var(--font-ui);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.board-toolbar__zoom .board-toolbar__btn:hover {
  background: rgba(43,31,22,0.08);
}

.board-toolbar__zoom .board-toolbar__btn:active {
  transform: scale(0.9);
}

.board-toolbar__btn--reset {
  color: rgba(43,31,22,0.55);
}

.board-toolbar__btn--refresh {
  background: rgba(255,253,248,0.94);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.board-toolbar__btn--refresh:hover {
  background: #fff;
  transform: scale(1.06);
}

.board-toolbar__btn--refresh:active {
  transform: scale(0.92);
}

#refreshBoard.is-loading svg {
  animation: spin 0.6s linear infinite;
  transform-origin: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Floating Action Button ---------- */

.fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 30;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 20px rgba(217, 85, 44, 0.55), 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.fab:hover {
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 8px 26px rgba(217, 85, 44, 0.65), 0 3px 8px rgba(0,0,0,0.35);
}

.fab:active {
  transform: scale(0.95) rotate(90deg);
}

.fab__icon {
  font-size: 2rem;
  font-weight: 300;
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */

.legal-footer {
  position: fixed;
  left: 16px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: rgba(255,248,238,0.65);
  display: flex;
  gap: 6px;
  align-items: center;
}

.legal-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-footer a:hover {
  color: #fff;
}

.my-notes-btn {
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.my-notes-btn:hover {
  color: #fff;
}

/* ---------- Bestätigungs-Overlay (Meine Nachrichten löschen) ---------- */

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-overlay[hidden] {
  display: none;
}

.confirm-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 13, 8, 0.6);
}

.confirm-card {
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: 100%;
  background: var(--paper);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  font-family: var(--font-ui);
}

.confirm-card h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--ink);
}

.confirm-card p {
  font-size: 0.9rem;
  color: rgba(43,31,22,0.75);
  line-height: 1.5;
}

.confirm-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.confirm-cancel-btn,
.confirm-danger-btn {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.confirm-cancel-btn {
  border: 1px solid var(--paper-dim);
  background: transparent;
  color: var(--ink);
}

.confirm-cancel-btn:hover {
  background: var(--paper-dim);
}

.confirm-danger-btn {
  border: none;
  background: #b3261e;
  color: #fff;
}

.confirm-danger-btn:hover {
  background: #8f1e17;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  z-index: 60;
  background: var(--ink);
  color: #fff8ee;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Create Overlay / Modal
   ============================================================ */

.create-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.create-overlay[hidden] {
  display: none;
}

.create-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 13, 8, 0.55);
  backdrop-filter: blur(3px);
  animation: fade-in 0.25s ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.create-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding: 10px 24px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  animation: sheet-up 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (min-width: 640px) {
  .create-overlay {
    align-items: center;
  }
  .create-panel {
    border-radius: 22px;
    max-height: 88vh;
    animation: modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @keyframes modal-in {
    from { transform: translateY(16px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
  }
}

.create-panel__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--paper-dim);
  margin: 10px auto 6px;
}

@media (min-width: 640px) {
  .create-panel__handle { display: none; }
}

.create-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
}

.create-panel__header h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin: 0;
  color: var(--ink);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--paper-dim);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: #e8ddc9;
}

.create-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-group {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group legend,
.field-group > label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(43,31,22,0.6);
  padding: 0;
}

.optional-tag {
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
  opacity: 0.7;
}

.type-picker {
  display: flex;
  gap: 12px;
}

.char-preview-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fade-in 0.25s ease both;
}

.field-group-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(43,31,22,0.6);
}

.char-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--paper-dim);
  border-radius: 14px;
  padding: 16px;
}

.char-preview__frame {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.char-preview__frame svg {
  display: block;
  width: 100%;
  height: 100%;
}

.char-reroll-btn {
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.char-reroll-btn:hover {
  background: var(--ink);
  color: #fff;
}

.char-reroll-btn:active {
  transform: scale(0.96);
}

.char-reroll-btn.is-spinning span {
  display: inline-block;
  animation: dice-spin 0.4s ease;
}

@keyframes dice-spin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  to { transform: rotate(360deg) scale(1); }
}

.type-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 2px solid var(--paper-dim);
  background: #fff;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.type-option.is-selected {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.type-option__preview {
  width: 46px;
  height: 46px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

.type-option__preview--postit {
  background: var(--note-yellow);
  transform: rotate(-4deg);
  border-radius: 1px 6px 1px 6px / 6px 1px 6px 1px;
}

.type-option__preview--polaroid {
  background: #fff;
  border: 1px solid #eee;
  padding: 3px 3px 9px;
  transform: rotate(3deg);
}

.type-option__preview--polaroid::before {
  content: '';
  display: block;
  width: 100%;
  height: 60%;
  background: var(--note-rosa);
}

.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch.is-selected {
  border-color: var(--ink);
  transform: scale(1.12);
}

textarea,
input[type="text"] {
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--paper-dim);
  background: #fff;
  color: var(--ink);
  resize: none;
  transition: border-color 0.15s ease;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.char-counter {
  align-self: flex-end;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(43,31,22,0.5);
}

.form-hint {
  margin: 0;
  min-height: 1.2em;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: #b3261e;
}

.privacy-note {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(43,31,22,0.6);
  background: var(--paper-dim);
  padding: 10px 14px;
  border-radius: 10px;
}

.privacy-note a {
  color: inherit;
  font-weight: 600;
}

.submit-btn {
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  padding: 15px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 6px 16px rgba(217, 85, 44, 0.4);
}

.submit-btn:hover {
  background: #c2481f;
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Honeypot: für Menschen komplett unsichtbar, aber im DOM für Bots vorhanden */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---------- Reduced Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .note-card,
  .create-overlay__backdrop,
  .create-panel,
  .fab,
  .board-toolbar__btn {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 420px) {
  .note-card {
    width: 165px;
    padding: 18px 14px 14px;
  }
  .note-card__text {
    font-size: 1.2rem;
  }
  .masthead__title {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  /* Auf sehr schmalen Screens rutscht die Toolbar über den FAB statt
     daneben, damit nichts abgeschnitten wird. */
  .board-toolbar {
    right: 14px;
    bottom: calc(90px + env(safe-area-inset-bottom));
    height: auto;
  }
}
