@import url('fonts.css');   /* lokale Schriften, siehe tools/fetch_fonts.php */
/* =============================================================
   English Stars · Cozy Crochet Design System
   ============================================================= */

:root {
  --cozy-bg:        #f3ebde;
  --cozy-surface:   #fdf9f1;
  --cozy-surface-2: #f8f0df;
  --cozy-ink:       #3a2f24;
  --cozy-muted:     #786a58;
  --cozy-primary:   #6ba78c;
  --cozy-primary-d: #56907a;
  --cozy-on-primary:#ffffff;
  --cozy-secondary: #d9824a;
  --cozy-secondary-d:#b46834;
  --cozy-on-secondary:#ffffff;
  --cozy-accent:    #f4d35e;
  --cozy-accent-d:  #d6b340;
  --cozy-stitch:    #c5b495;
  --cozy-stitch-d:  #a09076;
  --cozy-shadow:    #d4c5a4;
  --cozy-ring:      #e4d6b8;
  --cozy-error:     #c0573b;
}

/* ---- Reset minimal ---- */
.cozy *,
.cozy *::before,
.cozy *::after { box-sizing: border-box; }

/* ============================================================
   COZY ICON IMAGES (Emoji-Replacements)
   ============================================================ */
.cozy-icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.25em;
  object-fit: contain;
}
.cozy-icon.lg { width: 1.6em; height: 1.6em; vertical-align: -0.35em; }
.cozy-icon.xl { width: 2.4em; height: 2.4em; vertical-align: -0.5em; }
.cozy-icon.huge { width: 4em; height: 4em; vertical-align: middle; }

/* Bigger in special contexts (Modul-/Vokabel-/Badge-Plätze) */
.module-emoji .cozy-icon,
.feature-card .emoji .cozy-icon,
.step .emoji .cozy-icon,
.game-card .emoji .cozy-icon,
.why-card .emoji .cozy-icon { width: 1.1em; height: 1.1em; vertical-align: middle; }
.cozy-vocab .img .cozy-icon,
.vocab .img .cozy-icon { width: 0.95em; height: 0.95em; vertical-align: middle; }
.challenge-emoji .cozy-icon,
.flying-vocab-emoji .cozy-icon,
.daily-card-icon .cozy-icon,
.word-day-emoji .cozy-icon { width: 1em; height: 1em; vertical-align: middle; }
.stat-item .stat-emoji .cozy-icon,
.cozy-stat .cozy-icon { width: 1.2em; height: 1.2em; vertical-align: -0.2em; }
.cozy-topbar .brand .cozy-icon { display: none; } /* Topbar bleibt mit echtem Logo */

.cozy {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--cozy-ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.cozy body,
body.cozy {
  background: var(--cozy-bg);
  margin: 0;
}

.cozy h1, .cozy h2, .cozy h3, .cozy h4,
.cozy-head {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

/* ============================================================
   WELLEN-TRENNER (nur als HR)
   ============================================================ */
.cozy hr.cozy-wave,
hr.cozy-wave {
  border: none;
  height: 14px;
  margin: 40px auto;
  max-width: 1080px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10' preserveAspectRatio='none'><path d='M0 5 Q 10 0 20 5 T 40 5' stroke='%23c5b495' stroke-width='1.8' fill='none' stroke-dasharray='4 3' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 40px 14px;
  background-position: center;
}
hr.cozy-wave.solid {
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 12' preserveAspectRatio='none'><path d='M0 6 Q 15 0 30 6 T 60 6' stroke='%236ba78c' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
  background-size: 60px 18px;
}
hr.cozy-wave.scallop {
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'><path d='M0 6 A6 6 0 0 0 12 6 A6 6 0 0 0 24 6' fill='none' stroke='%23d9824a' stroke-width='2' stroke-linecap='round'/></svg>");
  background-size: 24px 18px;
}
hr.cozy-wave.scallop-fill {
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'><circle cx='11' cy='11' r='8' fill='%23f4d35e' stroke='%23d6b340' stroke-width='1.5'/></svg>");
  background-size: 22px 22px;
}
hr.cozy-wave.zigzag {
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18' preserveAspectRatio='none'><polyline points='0,12 5,4 10,12 15,4 20,12' fill='none' stroke='%236ba78c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 20px 18px;
}
hr.cozy-wave.dots {
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 14'><circle cx='10' cy='7' r='2.5' fill='%23c5b495'/></svg>");
  background-repeat: repeat-x;
  background-size: 20px 14px;
}
hr.cozy-wave.stitched {
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 20' preserveAspectRatio='none'><path d='M0 14 Q 15 4 30 14 T 60 14 L60 20 L0 20 Z' fill='%23d9824a'/><path d='M0 12 Q 15 2 30 12 T 60 12' stroke='%23ffffff' stroke-width='1.6' fill='none' stroke-dasharray='3 3'/></svg>");
  background-repeat: repeat-x;
  background-size: 60px 22px;
}
/* Ornamental dashed border element to use inside sections */
.cozy-dashed-divider {
  border-top: 2.5px dashed var(--cozy-stitch);
  margin: 24px 0;
}

/* ============================================================
   TOPBAR mit Scroll-Logo
   ============================================================ */
.cozy-topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 249, 241, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px dashed var(--cozy-stitch);
}
.cozy-topbar .inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px;
  gap: 16px;
}
.cozy-topbar .brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 20px;
  color: var(--cozy-ink); text-decoration: none;
}
.cozy-topbar .brand img {
  width: 42px; height: 42px; border-radius: 50%;
  opacity: 0;
  transform: translateY(-6px) scale(0.7);
  transition: opacity .35s ease, transform .35s ease;
}
.cozy-topbar .brand .name {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .35s ease, transform .35s ease;
}
.cozy-topbar.scrolled .brand img,
.cozy-topbar.scrolled .brand .name {
  opacity: 1;
  transform: none;
}
.cozy-topbar nav {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.cozy-topbar nav a {
  padding: 8px 16px; border-radius: 999px;
  text-decoration: none; color: var(--cozy-ink);
  font-weight: 600; font-size: 14px;
}
.cozy-topbar nav a.active { background: var(--cozy-primary); color: #fff; }
.cozy-topbar nav a:hover:not(.active) { background: var(--cozy-surface-2); }

/* ============================================================
   HERO
   ============================================================ */
.cozy-hero {
  padding: 48px 0 24px;
  background: radial-gradient(ellipse at 30% 0%, #fffaf0 0%, var(--cozy-bg) 70%);
}
.cozy-hero .grid {
  max-width: 1140px; margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
}
.cozy-hero .eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--cozy-primary-d);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cozy-hero h1 {
  font-size: 44px; margin: 0 0 16px; letter-spacing: -1px;
}
.cozy-hero h1 em { font-style: normal; color: var(--cozy-primary-d); }
.cozy-hero .lead {
  font-size: 18px; color: var(--cozy-muted);
  max-width: 480px; margin: 0 0 26px;
}
.cozy-hero-img { display: grid; place-items: center; }
.cozy-hero-img img {
  width: 100%; max-width: 360px; height: auto;
  filter: drop-shadow(0 12px 24px rgba(140, 110, 70, 0.25));
  animation: cozyFloat 4s ease-in-out infinite;
}
@keyframes cozyFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-10px) rotate(1deg); }
}

/* ============================================================
   WRAP & SECTION
   ============================================================ */
.cozy-wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.cozy-section { padding: 24px 0; }
.cozy-section-head {
  margin-bottom: 36px;
  max-width: 720px;
  padding-bottom: 22px;
  border-bottom: 2.5px dashed var(--cozy-stitch);
}
.cozy-section-head .eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--cozy-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cozy-section-head h2 { font-size: 34px; margin: 0 0 10px; letter-spacing: -0.5px; }
.cozy-section-head p { color: var(--cozy-muted); font-size: 17px; margin: 0; line-height: 1.5; }

/* ============================================================
   CARDS
   ============================================================ */
.cozy-card-grid { display: grid; gap: 22px; }
.cozy-card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cozy-card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cozy-card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cozy-card {
  background: var(--cozy-surface);
  border-radius: 24px;
  overflow: hidden;
  border: 2.5px dashed var(--cozy-stitch);
  box-shadow: 0 6px 0 var(--cozy-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.cozy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 var(--cozy-shadow);
}
.cozy-card-img {
  aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--cozy-surface-2);
  border-bottom: 2.5px dashed var(--cozy-stitch);
}
.cozy-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cozy-card-body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cozy-card-body h3 { font-size: 22px; margin: 8px 0 6px; letter-spacing: -0.3px; }
.cozy-card-body p { color: var(--cozy-muted); font-size: 14px; margin: 0; flex: 1; line-height: 1.5; }
.cozy-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px;
}
.cozy-card-meta { color: var(--cozy-muted); font-size: 13px; font-weight: 600; }

/* ============================================================
   VOCAB CARD
   ============================================================ */
.cozy-vocab {
  background: var(--cozy-surface);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  border: 2.5px dashed var(--cozy-stitch);
  box-shadow: 0 4px 0 var(--cozy-shadow);
  transition: transform .15s;
}
.cozy-vocab:hover { transform: translateY(-2px); }
.cozy-vocab .img {
  aspect-ratio: 1;
  background: var(--cozy-accent);
  border-radius: 14px;
  display: grid; place-items: center; font-size: 48px;
}
.cozy-vocab .word { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 22px; margin-top: 12px; }
.cozy-vocab .meaning { color: var(--cozy-muted); font-size: 13px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.cozy-btn {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  border: none;
  background: var(--cozy-primary);
  color: var(--cozy-on-primary);
  cursor: pointer; font-size: 15px;
  box-shadow: 0 4px 0 var(--cozy-primary-d);
  transition: transform .1s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.cozy-btn:hover { transform: translateY(-1px); }
.cozy-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cozy-primary-d); }
.cozy-btn.secondary {
  background: var(--cozy-secondary); color: var(--cozy-on-secondary);
  box-shadow: 0 4px 0 var(--cozy-secondary-d);
}
.cozy-btn.secondary:active { box-shadow: 0 1px 0 var(--cozy-secondary-d); }
.cozy-btn.ghost {
  background: transparent; color: var(--cozy-ink);
  box-shadow: inset 0 0 0 2px var(--cozy-stitch);
}
.cozy-btn.ghost:hover { background: var(--cozy-surface); }
.cozy-btn.sm { padding: 9px 16px; font-size: 13px; box-shadow: 0 3px 0 var(--cozy-primary-d); }
.cozy-btn.lg { padding: 16px 30px; font-size: 17px; }
.cozy-btn.block { display: block; width: 100%; }
.cozy-btn.icon { width: 48px; height: 48px; padding: 0; display: inline-grid; place-items: center; font-size: 18px; }

/* ============================================================
   TAGS / PILLS
   ============================================================ */
.cozy-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--cozy-surface-2);
  color: var(--cozy-ink);
  font-size: 12px; font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--cozy-ring);
}
.cozy-tag.solid { background: var(--cozy-primary); color: #fff; box-shadow: none; }
.cozy-tag.sun { background: var(--cozy-accent); color: var(--cozy-ink); box-shadow: none; }
.cozy-tag.terra { background: var(--cozy-secondary); color: #fff; box-shadow: none; }

/* ============================================================
   INPUTS / FIELDS
   ============================================================ */
.cozy-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cozy-field label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--cozy-muted);
}
.cozy-input,
.cozy-select,
.cozy-textarea {
  display: block; width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--cozy-surface);
  border: none;
  font: inherit; font-size: 16px;
  color: var(--cozy-ink);
  box-shadow: inset 0 0 0 1.5px var(--cozy-ring);
  outline: none;
}
.cozy-input:focus,
.cozy-select:focus,
.cozy-textarea:focus { box-shadow: inset 0 0 0 2px var(--cozy-primary); }
.cozy-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23786a58' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

/* ============================================================
   TOAST / ALERT
   ============================================================ */
.cozy-toast {
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--cozy-accent);
  color: var(--cozy-ink);
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 0 var(--cozy-accent-d);
}
.cozy-toast.error {
  background: #fde2dc; color: var(--cozy-error);
  box-shadow: 0 4px 0 #e8b9af;
}
.cozy-toast.success {
  background: #d9ecdb; color: #2b6c3a;
  box-shadow: 0 4px 0 #b3d4b7;
}

/* ============================================================
   BADGES
   ============================================================ */
.cozy-badge {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--cozy-primary); color: #fff;
  display: grid; place-items: center;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 30px;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,0.22), 0 6px 0 var(--cozy-primary-d);
  text-align: center;
}
.cozy-badge.gold { background: var(--cozy-accent); color: var(--cozy-ink); box-shadow: inset 0 0 0 5px rgba(255,255,255,0.4), 0 6px 0 var(--cozy-accent-d); }
.cozy-badge.terra { background: var(--cozy-secondary); color: #fff; box-shadow: inset 0 0 0 5px rgba(255,255,255,0.22), 0 6px 0 var(--cozy-secondary-d); }
.cozy-badge small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1px; margin-top: 2px; }

/* ============================================================
   PROGRESS
   ============================================================ */
.cozy-progress {
  height: 22px; border-radius: 999px;
  background: var(--cozy-surface);
  box-shadow: inset 0 0 0 1.5px var(--cozy-ring);
  overflow: hidden; position: relative;
}
.cozy-progress .fill {
  height: 100%;
  background: var(--cozy-primary);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.18) 0 8px, transparent 8px 16px);
  border-radius: 999px 0 0 999px;
}
.cozy-progress .label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--cozy-ink); }

/* ============================================================
   MASCOT DIALOG
   ============================================================ */
.cozy-dialog {
  display: flex; align-items: flex-end; gap: 18px;
  background: var(--cozy-surface);
  padding: 28px 30px;
  border-radius: 24px;
  border: 2.5px dashed var(--cozy-stitch);
  box-shadow: 0 5px 0 var(--cozy-shadow);
}
.cozy-mascot {
  width: 88px; height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cozy-accent);
  box-shadow: 0 4px 0 var(--cozy-shadow);
  flex-shrink: 0;
}
.cozy-mascot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cozy-bubble {
  position: relative;
  padding: 16px 20px;
  background: var(--cozy-bg);
  border-radius: 18px;
  font-weight: 600;
  color: var(--cozy-ink);
  flex: 1;
  box-shadow: inset 0 0 0 1.5px var(--cozy-ring);
}
.cozy-bubble::after {
  content: ""; position: absolute;
  bottom: -8px; left: 24px;
  width: 16px; height: 16px;
  background: var(--cozy-bg);
  box-shadow: inset 0 0 0 1.5px var(--cozy-ring);
  transform: rotate(45deg);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ============================================================
   FOOTER
   ============================================================ */
.cozy-footer {
  text-align: center;
  padding: 48px 24px 32px;
  color: var(--cozy-muted);
  font-size: 14px;
}
.cozy-footer .stars { font-size: 24px; margin-bottom: 8px; }

/* ============================================================
   STATS / KPI BOX
   ============================================================ */
.cozy-stat {
  background: var(--cozy-surface);
  border-radius: 20px;
  padding: 22px 24px;
  border: 2.5px dashed var(--cozy-stitch);
  box-shadow: 0 4px 0 var(--cozy-shadow);
}
.cozy-stat .value {
  font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: 32px; color: var(--cozy-primary-d);
  line-height: 1;
}
.cozy-stat .label {
  font-size: 13px; color: var(--cozy-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 6px;
}

/* ============================================================
   AUTH CARD (Login / Register)
   ============================================================ */
.cozy-auth-page {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 25%, #ffeac2 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, #d8eadd 0%, transparent 50%),
    var(--cozy-bg);
}
.cozy-auth-card {
  width: 100%; max-width: 460px;
  background: var(--cozy-surface);
  border-radius: 32px;
  padding: 40px 36px 32px;
  border: 2.5px dashed var(--cozy-stitch);
  box-shadow: 0 10px 0 var(--cozy-shadow);
  text-align: center;
}
.cozy-auth-logo {
  width: 130px; height: 130px;
  margin: -80px auto 6px;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(140,110,70,0.25));
  animation: cozyFloat 4s ease-in-out infinite;
}
.cozy-auth-card h1 {
  font-family: 'Fredoka',sans-serif; font-weight: 600;
  font-size: 26px; margin: 4px 0 4px;
}
.cozy-auth-card .tagline {
  color: var(--cozy-muted); font-size: 15px; margin: 0 0 22px;
}

.cozy-role-toggle {
  display: flex; gap: 10px; margin-bottom: 22px;
}
.cozy-role-btn {
  flex: 1;
  padding: 12px 12px;
  border-radius: 14px;
  border: none;
  background: var(--cozy-surface-2);
  color: var(--cozy-ink);
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: inset 0 0 0 1.5px var(--cozy-ring);
  transition: transform .12s;
}
.cozy-role-btn .emoji { font-size: 22px; }
.cozy-role-btn:hover { transform: translateY(-1px); }
.cozy-role-btn.active {
  background: var(--cozy-primary); color: #fff;
  box-shadow: inset 0 0 0 0 transparent, 0 4px 0 var(--cozy-primary-d);
  transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .cozy-hero h1 { font-size: 34px; }
  .cozy-hero .grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .cozy-hero .lead { margin-left: auto; margin-right: auto; }
  .cozy-card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .cozy-card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cozy-card-grid.cols-3, .cozy-card-grid.cols-4 { grid-template-columns: 1fr; }
  .cozy-topbar nav { display: none; }
  .cozy-hero h1 { font-size: 28px; }
}
