/* ============================================================
   IdeenBoard – Design-System
   Stil: klassisches Comicheft
   Tinten-Outlines, Halbton-Raster, Panel-Rahmen, Sprechblasen
   Keine Emojis – alle Symbole sind gezeichnete SVG-Icons.
   ============================================================ */

/* ------------------------------------------------------------
   Schriften – lokal eingebunden.
   Dadurch funktioniert die App auch in Schulnetzen ohne Zugriff
   auf Google Fonts, und von den Schülergeräten geht keine
   Anfrage an einen externen Anbieter (Datenschutz).
   ------------------------------------------------------------ */

@font-face {
  font-family: 'Bangers';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/bangers-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bangers';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/bangers-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Lilita One';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/lilita-one-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/lilita-one-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/nunito-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/nunito-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/nunito-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/nunito-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('fonts/nunito-latin-ext-800-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('fonts/nunito-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Tinte & Papier */
  --ink:        #17141d;
  --ink-2:      #443c55;
  --paper:      #f6eddd;
  --paper-2:    #fffaf1;
  --halftone:   rgba(23, 20, 29, 0.10);

  /* Druckfarben */
  --red:        #e2464b;   --red-pale:    #ffe3e1;   --red-deep:    #a51f24;
  --blue:       #3667d6;   --blue-pale:   #dee9ff;   --blue-deep:   #1c3d8f;
  --green:      #37a05a;   --green-pale:  #dcf4e1;   --green-deep:  #1d6837;
  --yellow:     #f0b429;   --yellow-pale: #fff1cb;   --yellow-deep: #9a6b06;
  --violet:     #7a5bd4;   --violet-pale: #e9e1ff;   --violet-deep: #4a2f9c;

  /* Linien & Schatten */
  --line:       3px;
  --line-thin:  2.5px;
  --r:          8px;
  --r-lg:       12px;
  --sh:         5px 5px 0 var(--ink);
  --sh-sm:      3px 3px 0 var(--ink);
  --sh-lg:      9px 9px 0 var(--ink);

  /* Schrift */
  --f-pow:  'Bangers', 'Impact', 'Haettenschweiler', sans-serif;
  --f-head: 'Lilita One', 'Trebuchet MS', system-ui, sans-serif;
  --f-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--f-body);
  font-weight: 700;
  color: var(--ink);
  background-color: var(--paper);
  /* Halbton-Punktraster wie im Comicdruck */
  background-image:
    radial-gradient(var(--halftone) 1.4px, transparent 1.5px),
    radial-gradient(rgba(23, 20, 29, 0.045) 1.4px, transparent 1.5px);
  background-size: 9px 9px, 9px 9px;
  background-position: 0 0, 4.5px 4.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--f-head); font-weight: 400; margin: 0; line-height: 1.15; }

/* ============================================================
   Icons
   ============================================================ */

.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.18em;
}
.ico--lg { width: 1.5em; height: 1.5em; }

/* ============================================================
   Panels (Comic-Rahmen)
   ============================================================ */

.panel {
  position: relative;
  background: var(--paper-2);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 22px;
}

/* Doppelte Rahmenlinie – typisch für Comicpanels */
.panel--framed::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  opacity: 0.28;
  pointer-events: none;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  font-family: var(--f-head);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.4px;
  color: var(--ink);
  background: var(--paper-2);
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  padding: 9px 16px;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1.25;
  transition: transform 0.07s ease, box-shadow 0.07s ease, background 0.15s ease;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

.btn:disabled, .btn[aria-disabled='true'] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--sh-sm);
}

.btn--red    { background: var(--red);    color: #fff; }
.btn--blue   { background: var(--blue);   color: #fff; }
.btn--green  { background: var(--green);  color: #fff; }
.btn--yellow { background: var(--yellow); }
.btn--violet { background: var(--violet); color: #fff; }
.btn--ink    { background: var(--ink);    color: var(--paper-2); }

.btn--big {
  font-size: 1.3rem;
  padding: 14px 26px;
  border-radius: var(--r-lg);
  border-width: var(--line);
  box-shadow: var(--sh);
}
.btn--sm {
  font-size: 0.85rem;
  padding: 6px 11px;
  box-shadow: 2px 2px 0 var(--ink);
}

/* Quadratischer Icon-Button */
.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--line-thin) solid var(--ink);
  border-radius: 7px;
  background: var(--paper-2);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.07s ease, box-shadow 0.07s ease;
}
.btn-icon:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn-icon:active { transform: translate(2px, 2px); box-shadow: none; }
.btn-icon .ico { width: 18px; height: 18px; }

/* ============================================================
   Chips / Badges
   ============================================================ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-head);
  font-size: 0.92rem;
  background: var(--paper-2);
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  padding: 5px 13px;
  white-space: nowrap;
}
.chip .ico { width: 16px; height: 16px; }

/* ============================================================
   Logo
   ============================================================ */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-pow);
  letter-spacing: 1.6px;
  background: var(--yellow);
  color: var(--ink);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  padding: 4px 14px 2px;
  transform: rotate(-1.6deg);
  white-space: nowrap;
}
.logo .ico { stroke-width: 2.6; }

/* ============================================================
   Starburst (Comic-Explosion)
   ============================================================ */

.burst {
  clip-path: polygon(
    50% 0%, 57% 11%, 67% 4%, 69% 17%, 81% 13%, 78% 26%, 91% 27%,
    83% 38%, 96% 45%, 85% 52%, 95% 62%, 83% 65%, 89% 76%, 76% 75%,
    78% 88%, 67% 81%, 64% 94%, 55% 85%, 50% 100%, 45% 85%, 36% 94%,
    33% 81%, 22% 88%, 24% 75%, 11% 76%, 17% 65%, 5% 62%, 15% 52%,
    4% 45%, 17% 38%, 9% 27%, 22% 26%, 19% 13%, 31% 17%, 33% 4%, 43% 11%
  );
}

/* Kleines "NEU"-Abzeichen auf frisch eingetroffenen Karten */
.new-flag {
  position: absolute;
  top: -19px; right: -17px;
  width: 66px; height: 66px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-pow);
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  color: #fff;
  z-index: 4;
  pointer-events: none;
  animation: flagIn 0.4s cubic-bezier(0.2, 1.7, 0.4, 1);
}
@keyframes flagIn {
  from { transform: scale(0) rotate(-40deg); }
  to   { transform: scale(1) rotate(-12deg); }
}
.new-flag { transform: rotate(-12deg); }

/* ============================================================
   Kärtchen
   ============================================================ */

.card {
  --cat: var(--yellow);
  --cat-pale: var(--yellow-pale);
  position: relative;
  background: var(--cat-pale);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.card--red    { --cat: var(--red);    --cat-pale: var(--red-pale); }
.card--blue   { --cat: var(--blue);   --cat-pale: var(--blue-pale); }
.card--green  { --cat: var(--green);  --cat-pale: var(--green-pale); }
.card--yellow { --cat: var(--yellow); --cat-pale: var(--yellow-pale); }

/* Farbstreifen als Kategorie-Kennung */
.card-strip {
  height: 12px;
  background: var(--cat);
  border-bottom: var(--line) solid var(--ink);
  border-radius: 5px 5px 0 0;
  position: relative;
  overflow: hidden;
}
/* Halbton-Verlauf im Streifen */
.card-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23, 20, 29, 0.35) 1.2px, transparent 1.3px);
  background-size: 6px 6px;
  opacity: 0.5;
}

.card-body { padding: 13px 15px 15px; position: relative; z-index: 1; }

/* Halbton-Schattierung in der Ecke */
.card::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 92px; height: 92px;
  background-image: radial-gradient(var(--cat) 1.6px, transparent 1.7px);
  background-size: 7px 7px;
  opacity: 0.5;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(315deg, #000 5%, transparent 65%);
  mask-image: linear-gradient(315deg, #000 5%, transparent 65%);
  border-bottom-right-radius: 5px;
}

/* Cluster-Aufkleber auf der Karte */
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-head);
  font-size: 0.74rem;
  letter-spacing: 0.3px;
  background: var(--violet);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 8px;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.card-tag .ico { width: 12px; height: 12px; stroke-width: 2.6; }

/* Auswahl */
.card.is-selectable { cursor: pointer; }
.card.is-selectable:hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.card.is-selected {
  box-shadow: 0 0 0 4px var(--violet), 6px 6px 0 var(--ink);
  transform: rotate(-1.2deg);
}
.card-check {
  position: absolute;
  top: 20px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  border: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  animation: popIn 0.22s cubic-bezier(0.2, 1.7, 0.4, 1);
}
.card-check .ico { width: 15px; height: 15px; stroke-width: 3.2; }

/* Sprechblasen-Variante (Vorschau & Präsentation) */
.card--bubble { overflow: visible; border-radius: 16px; }
.card--bubble .card-strip { border-radius: 13px 13px 0 0; }
.card--bubble::before,
.card--bubble .bubble-tail {
  content: '';
  position: absolute;
  left: 34px;
  width: 0; height: 0;
  border-left: 11px solid transparent;
  border-right: 15px solid transparent;
}
.card--bubble::before { bottom: -22px; border-top: 22px solid var(--ink); }
.card--bubble .bubble-tail { bottom: -15px; border-top: 18px solid var(--cat-pale); z-index: 2; }

/* ============================================================
   Formulare
   ============================================================ */

.input, .textarea {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper-2);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: inset 3px 3px 0 rgba(23, 20, 29, 0.07);
  padding: 12px 14px;
  width: 100%;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-2); opacity: 0.55; font-weight: 600; }
.input:focus, .textarea:focus { border-color: var(--blue); box-shadow: inset 3px 3px 0 rgba(54, 103, 214, 0.16); }
.textarea { resize: vertical; min-height: 130px; line-height: 1.5; }

/* ============================================================
   Modal
   ============================================================ */

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 20, 29, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal {
  background: var(--paper-2);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 26px;
  width: min(470px, 100%);
  max-height: 90vh;
  overflow: auto;
  animation: popIn 0.26s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.modal h2 { font-size: 1.5rem; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ============================================================
   Hilfsklassen & Animationen
   ============================================================ */

.hidden { display: none !important; }
.spacer { flex: 1; }

.pop-in { animation: popIn 0.32s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes popIn {
  from { transform: scale(0.55) rotate(-4deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.shake { animation: shake 0.36s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px) rotate(-1deg); }
  50% { transform: translateX(6px) rotate(1deg); }
  80% { transform: translateX(-3px); }
}

/* ============================================================
   Punktzahl aus der Abstimmung
   ============================================================ */

.card-votes {
  position: absolute;
  top: -13px; right: -11px;
  min-width: 34px; height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head);
  font-size: 1.05rem;
  z-index: 4;
}

/* ============================================================
   Leitfrage und Farblegende
   ============================================================ */

.prompt-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--paper-2);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 12px 18px;
  margin-bottom: 20px;
}
.prompt-bar .prompt-text {
  font-family: var(--f-head);
  font-size: 1.3rem;
  flex: 1;
  min-width: 220px;
  line-height: 1.3;
}

.label-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-head);
  font-size: 0.88rem;
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  padding: 4px 12px 4px 6px;
}
.label-chip .swatch-dot {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 2.2px solid var(--ink);
  flex: none;
}
.swatch-dot--red    { background: var(--red); }
.swatch-dot--blue   { background: var(--blue); }
.swatch-dot--green  { background: var(--green); }
.swatch-dot--yellow { background: var(--yellow); }

/* ============================================================
   Countdown
   ============================================================ */

.timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-head);
  font-size: 1.15rem;
  background: var(--green);
  color: #fff;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 5px 14px;
  font-variant-numeric: tabular-nums;
}
.timer-chip.is-soon { background: var(--yellow); color: var(--ink); }
.timer-chip.is-urgent { background: var(--red); color: #fff; animation: pulse 1s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

/* ============================================================
   Pinnwand – frei anordnen
   ============================================================ */

.free-board {
  position: relative;
  width: 100%;
  height: calc(100svh - 190px);
  min-height: 460px;
  background: rgba(255, 250, 241, 0.5);
  border: var(--line) dashed rgba(23, 20, 29, 0.35);
  border-radius: var(--r-lg);
  overflow: hidden;
  touch-action: none;
}

.free-board .card {
  position: absolute;
  width: 230px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow 0.12s ease;
}
.free-board .card.is-dragging {
  cursor: grabbing;
  z-index: 50;
  box-shadow: 11px 13px 0 rgba(23, 20, 29, 0.4);
  transform: rotate(-2deg) scale(1.03);
  transition: none;
}
.free-board .card.is-selected { transform: rotate(-1.2deg); }

.free-hint {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-head);
  font-size: 1.15rem;
  opacity: 0.45;
  text-align: center;
  pointer-events: none;
}

/* ============================================================
   Abstimmung auf dem Handy
   ============================================================ */

.vote-head {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(540px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--violet);
  color: #fff;
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 12px 16px;
  font-family: var(--f-head);
}
.vote-head .left { font-size: 1.5rem; }

.vote-list { display: flex; flex-direction: column; gap: 16px; width: 100%; }

.vote-row { display: flex; align-items: stretch; gap: 10px; }
.vote-row .card { flex: 1; }
.vote-btns { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.vote-btns .btn-icon { width: 44px; height: 40px; }
.vote-mine {
  font-family: var(--f-head);
  font-size: 1.1rem;
  text-align: center;
  min-height: 22px;
}

/* ============================================================
   Farbwahl im Umfärben-Dialog
   ============================================================ */

.color-choice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.color-choice button {
  aspect-ratio: 1 / 1;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  cursor: pointer;
  font-family: var(--f-head);
  font-size: 0.85rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  color: var(--ink);
}
.color-choice button:active { transform: translate(2px, 2px); box-shadow: none; }
.cc-red    { background: var(--red);    color: #fff !important; }
.cc-blue   { background: var(--blue);   color: #fff !important; }
.cc-green  { background: var(--green);  color: #fff !important; }
.cc-yellow { background: var(--yellow); }

/* ============================================================
   Einrichtungsdialog
   ============================================================ */

.setup-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.setup-row .swatch-dot { width: 22px; height: 22px; }
.setup-row .input { font-size: 0.98rem; padding: 9px 12px; }
.field-label {
  font-family: var(--f-head);
  font-size: 1rem;
  display: block;
  margin: 16px 0 7px;
}
.field-label:first-child { margin-top: 0; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg .btn { flex: 1; min-width: 68px; }

/* ============================================================
   Nachträglich bearbeitete Beiträge
   ============================================================ */

.card.is-selectable { user-select: none; -webkit-user-select: none; }

.card-edited {
  position: absolute;
  right: 9px; bottom: 7px;
  z-index: 2;
  opacity: 0.4;
  pointer-events: none;
}
.card-edited .ico { width: 15px; height: 15px; stroke-width: 2.6; }

.color-choice button.is-picked {
  box-shadow: 0 0 0 4px var(--violet), var(--sh-sm);
  transform: rotate(-2deg) scale(1.05);
}

/* ============================================================
   Vorlagen
   ============================================================ */

.tpl-list { display: flex; flex-direction: column; gap: 10px; max-height: 44vh; overflow: auto; padding: 2px; }

.tpl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-2);
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 10px 12px;
}
.tpl-row .tpl-info { flex: 1; min-width: 0; }
.tpl-row .tpl-name {
  font-family: var(--f-head);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.tpl-row .tpl-meta { font-size: 0.82rem; opacity: 0.6; margin-top: 2px; }

.tpl-empty {
  text-align: center;
  font-family: var(--f-head);
  opacity: 0.5;
  padding: 20px 0;
}

.modal-section {
  border-top: 2.5px dashed rgba(23, 20, 29, 0.25);
  margin-top: 20px;
  padding-top: 18px;
}
.modal-section h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}
.check-row input { width: 20px; height: 20px; accent-color: var(--violet); cursor: pointer; }

.modal--wide { width: min(600px, 100%); }

/* ============================================================
   Persönliche Kennung für Vorlagen
   ============================================================ */

.key-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--violet-pale);
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 9px 13px;
}
.key-bar .key-value {
  font-family: var(--f-head);
  font-size: 1.05rem;
  letter-spacing: 2px;
  overflow-wrap: anywhere;
}

.key-big {
  font-family: var(--f-pow);
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  letter-spacing: 4px;
  text-align: center;
  background: var(--yellow);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 16px 12px 12px;
  overflow-wrap: anywhere;
  user-select: all;
}
