/* KUKANILEA Webtools — Emoji-Mixer. Eigenständige Subdomain, eigenes Mini-Design-System
   (Brand-Grundwerte aus sites/kukanilea-pdf/styles.css übernommen, eigene Akzentfarbe:
   Amber statt Petrol-Blau — volle Unabhängigkeit der Subdomain, s. WEBTOOLS.md Thema 2 §5). */

:root {
  --cream: #ffffff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #475569;
  --ink-4: #5a6678;
  --line: #e6ebf1;
  --line-2: #cbd5e1;
  --white: #ffffff;
  --paper: #f4f6f9;
  --accent: #c2410c;
  --accent-2: #9a3412;
  --accent-soft: #fde3d2;
  --accent-tint: #fef4ec;
  --green: #18553a;
  --green-soft: #e4f1e9;
  --warn-ink: #97491a;
  --warn-soft: #fde9d4;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 0 rgba(15,23,42,.04), 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 1px 0 rgba(15,23,42,.04), 0 12px 28px -16px rgba(15,23,42,.16);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 880px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wide { max-width: 1080px; }

a { color: var(--accent); }

/* ── Header ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.brand-sub { font-size: 11px; color: var(--ink-4); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.brand-sub.tool-suite { color: var(--accent); }

.header-actions a.text-link { font-size: 14px; font-weight: 600; text-decoration: none; }

/* ── Hero ── */
.tool-hero { padding: 44px 0 8px; }
.tool-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); margin-bottom: 10px;
}
.tool-hero h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
.tool-hero p.lede { font-size: 17px; color: var(--ink-3); max-width: 60ch; margin: 0 0 0; }

.privacy-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 22px 0 0;
  padding: 14px 16px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  font-size: 14px; color: var(--accent-2);
}
.privacy-note svg { flex: none; margin-top: 2px; }

/* ── Tool card ── */
.tool-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 28px 0 40px;
}

/* Slot-Auswahl */
.slot-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 24px; }
.slot {
  width: 96px; height: 96px;
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  background: var(--paper);
  position: relative;
}
.slot.is-filled { border-style: solid; border-color: var(--accent-soft); background: var(--accent-tint); }
.slot .slot-label {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-4); background: var(--white); padding: 0 6px; border-radius: 4px;
}
.slot-sep { font-size: 22px; color: var(--ink-4); }
.slot-clear {
  border: 0; background: none; color: var(--ink-4); cursor: pointer;
  font-size: 13px; text-decoration: underline; padding: 4px 8px;
}

/* Suchfeld */
.search-row { margin-bottom: 14px; }
.search-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--paper);
}
.search-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* Kategorien */
.category-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.category-tab {
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--ink-3);
  font-size: 12.5px; font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.category-tab.is-active { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* Palette */
.emoji-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.emoji-btn {
  width: 100%; aspect-ratio: 1;
  border: 1px solid transparent;
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.emoji-btn:hover { border-color: var(--accent-soft); background: var(--accent-tint); }
.emoji-btn img { width: 100%; height: 100%; }
.emoji-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-4); font-size: 13px; padding: 20px; }

.tool-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-primary:disabled { background: var(--line-2); color: var(--ink-4); cursor: not-allowed; }
.btn-ghost { background: var(--white); color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.tool-status { font-size: 14px; color: var(--ink-3); }
.tool-status[data-state="error"] { color: var(--warn-ink); }
.tool-status[data-state="done"] { color: var(--green); font-weight: 600; }

.result-panel {
  margin-top: 20px;
  padding: 18px;
  background: var(--green-soft);
  border: 1px solid #bfe0cd;
  border-radius: var(--radius);
  display: none;
  text-align: center;
}
.result-panel.is-visible { display: block; }
.result-panel h3 { margin: 0 0 10px; font-size: 15px; color: var(--green); }
.result-panel canvas { border-radius: var(--radius-sm); background: var(--white); box-shadow: var(--shadow-sm); }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: 40px; }
.ft-row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-4); }
.ft-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ft-links a { color: var(--ink-4); text-decoration: none; }
.ft-links a:hover { color: var(--accent); }

@media (max-width: 520px) {
  .tool-card { padding: 20px; }
  .slot { width: 76px; height: 76px; font-size: 34px; }
}
