/* ============================================================
   Sif · Der royale Flecht-Salon — Stylesheet
   Royale Aquarell-Ästhetik: Cremepapier, Mauve, Gold, Rosen.
   Vanilla CSS, keine externen Fonts, keine Build-Tools.
   ============================================================ */

:root {
  --paper:        #faf2e3;
  --paper-card:   #fdf9ef;
  --paper-deep:   #f0e3c9;
  --ink:          #46313c;
  --ink-soft:     #6f5763;
  --ink-faint:    #9a8690;
  --wine:         #7c3a4e;
  --wine-deep:    #5d2a3a;
  --wine-light:   #9c5468;
  --rose:         #d7a3b0;
  --rose-pale:    #f0d8dc;
  --gold:         #bf9f48;
  --gold-light:   #e3ce92;
  --line:         rgba(124, 58, 78, .16);
  --line-gold:    rgba(191, 159, 72, .42);
  --shadow:       0 14px 38px -18px rgba(93, 42, 58, .42);
  --shadow-soft:  0 6px 20px -12px rgba(93, 42, 58, .38);

  --serif:  'Cormorant Garamond', 'Hoefler Text', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans:   'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background:
    radial-gradient(1100px 540px at 78% -8%, rgba(215, 163, 176, .30), transparent 62%),
    radial-gradient(900px 520px at 8% 102%, rgba(191, 159, 72, .18), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.62;
  font-size: 17px;
}

a { color: var(--wine); text-underline-offset: 2px; }

/* ---------- App-Shell ---------- */
.app {
  max-width: 940px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  background: linear-gradient(180deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: var(--paper);
  box-shadow: 0 2px 0 var(--gold), 0 8px 22px -14px rgba(93, 42, 58, .8);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer;
  color: inherit; font-family: var(--serif);
}
.brand-crown { color: var(--gold-light); display: flex; }
.brand-name { font-size: 1.34rem; font-weight: 600; letter-spacing: .3px; }
.brand-name small { font-size: .72rem; font-weight: 500; opacity: .78; letter-spacing: .4px; }
.spacer { flex: 1; }
.demo-badge {
  font-family: var(--sans); font-size: .62rem; font-weight: 700;
  letter-spacing: 1.4px; padding: 4px 9px; border-radius: 999px;
  background: rgba(250, 242, 227, .16); color: var(--gold-light);
  border: 1px solid rgba(227, 206, 146, .5);
}
.reset-btn {
  font-family: var(--sans); font-size: .76rem; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: rgba(250, 242, 227, .12); color: var(--paper);
  border: 1px solid rgba(250, 242, 227, .26);
  transition: background .15s;
}
.reset-btn:hover { background: rgba(250, 242, 227, .24); }

/* ---------- Demo-Banner ---------- */
.demo-banner {
  font-family: var(--sans); font-size: .81rem;
  text-align: center; padding: 9px 22px;
  background: var(--rose-pale); color: var(--wine-deep);
  border-bottom: 1px solid var(--line);
}
.demo-banner a { color: var(--wine); font-weight: 600; }

/* ---------- Main ---------- */
.main { flex: 1; padding: 30px 22px 46px; }
.view { animation: fade .32s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Ribbon-Banner ---------- */
.ribbon {
  display: block;
  width: max-content;
  max-width: 92%;
  margin: 0 auto 18px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: .4px;
  color: var(--paper);
  text-align: center;
  padding: 7px 38px;
  background: linear-gradient(175deg, var(--wine-light), var(--wine) 55%, var(--wine-deep));
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 50%, 100% 100%, 0 100%, 18px 50%);
  box-shadow: inset 0 0 0 1px rgba(227, 206, 146, .55), var(--shadow-soft);
  position: relative;
}
.ribbon-lg { font-size: 1.78rem; padding: 9px 50px; margin-bottom: 8px; }

/* ---------- Hero ---------- */
.hero-inner { text-align: center; padding: 6px 0 4px; }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--wine-deep);
  margin: 18px 0 12px;
}
.hearts { color: var(--rose); font-style: normal; }
.hero-sub {
  max-width: 620px; margin: 0 auto 8px;
  font-size: 1.12rem; color: var(--ink-soft);
}
.hero-sub em { color: var(--wine); font-style: italic; }

/* dekorativer Zopf */
.braid-deco { width: 240px; height: 54px; margin: 22px auto 6px; }
.braid-deco svg { width: 100%; height: 100%; overflow: visible; }
.braid-strand {
  fill: none; stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 440; stroke-dashoffset: 440;
  animation: braid-draw 2.6s ease forwards;
}
.braid-strand.s1 { stroke: var(--wine);       animation-delay: .1s; }
.braid-strand.s2 { stroke: var(--rose);       animation-delay: .35s; }
.braid-strand.s3 { stroke: var(--gold-light); animation-delay: .6s; }
@keyframes braid-draw { to { stroke-dashoffset: 0; } }

/* Hero-Modes */
.hero-modes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin: 30px 0 20px;
}
.mode-card {
  background: var(--paper-card);
  border: 1px solid var(--line-gold);
  border-radius: var(--r-lg);
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mode-card::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid var(--line-gold); border-radius: 13px;
  pointer-events: none;
}
.mode-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mode-ic { font-size: 2.1rem; line-height: 1; margin-bottom: 8px; }
.mode-title {
  font-size: 1.3rem; font-weight: 600; color: var(--wine-deep);
  margin-bottom: 6px;
}
.mode-sub { font-size: .95rem; color: var(--ink-soft); margin-bottom: 16px; }
.mode-cta {
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  letter-spacing: .3px; cursor: pointer;
  padding: 9px 18px; border-radius: 999px;
  background: var(--wine); color: var(--paper);
  border: 1px solid var(--wine-deep);
  transition: background .15s, transform .12s;
}
.mode-cta:hover { background: var(--wine-deep); transform: scale(1.03); }
.mode-cta span { margin-left: 4px; }

/* Hero-Chips */
.hero-chips {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin: 8px 0 22px;
}
.chip {
  display: flex; align-items: center; gap: 12px;
  text-align: left; cursor: pointer;
  padding: 13px 16px; border-radius: var(--r-md);
  background: rgba(253, 249, 239, .7);
  border: 1px dashed var(--line-gold);
  transition: background .15s, border-color .15s;
}
.chip:hover { background: var(--paper-card); border-color: var(--wine-light); }
.chip-ic { font-size: 1.5rem; }
.chip-text { display: flex; flex-direction: column; }
.chip-text strong { font-size: 1rem; color: var(--wine-deep); }
.chip-text small { font-family: var(--sans); font-size: .76rem; color: var(--ink-soft); }

.hero-foot {
  font-family: var(--sans); font-size: .73rem;
  color: var(--ink-faint); margin-top: 14px;
}

/* ---------- Toolbar (Sub-Views) ---------- */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.back-btn {
  font-family: var(--sans); font-size: .82rem; font-weight: 600;
  cursor: pointer; padding: 8px 14px; border-radius: 999px;
  background: var(--paper-card); color: var(--wine);
  border: 1px solid var(--line-gold);
  transition: background .15s;
}
.back-btn:hover { background: var(--rose-pale); }
.toolbar-meta {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--ink-faint);
}
.view-intro {
  text-align: center; max-width: 600px; margin: 0 auto 24px;
  color: var(--ink-soft); font-size: 1.03rem;
}

/* ---------- Stationen-Grid ---------- */
.station-grid { display: flex; flex-direction: column; gap: 16px; }
.station-card {
  display: grid; grid-template-columns: 132px 1fr;
  gap: 0; cursor: pointer;
  background: var(--paper-card);
  border: 1px solid var(--line-gold);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.station-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.station-card-img {
  width: 132px; height: 100%; min-height: 150px;
  object-fit: cover; object-position: top center;
  border-right: 1px solid var(--line-gold);
}
.station-card-body { padding: 18px 20px; display: flex; flex-direction: column; }
.station-num {
  font-family: var(--sans); font-size: .68rem; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold);
}
.station-card-title {
  font-size: 1.32rem; font-weight: 600; color: var(--wine-deep);
  margin: 2px 0 5px;
}
.station-card-desc { font-size: .95rem; color: var(--ink-soft); flex: 1; }
.station-card-foot {
  font-family: var(--sans); font-size: .76rem; font-weight: 600;
  color: var(--wine); margin-top: 10px;
  display: flex; align-items: center; gap: 6px;
}
.pill-count {
  background: var(--rose-pale); color: var(--wine-deep);
  padding: 2px 9px; border-radius: 999px; font-size: .72rem;
}

/* ---------- Station-Detail ---------- */
.sd-head { text-align: center; margin-bottom: 18px; }
.sd-title {
  font-size: 2rem; font-weight: 600; color: var(--wine-deep);
  margin: 4px 0;
}
.sd-sub { color: var(--ink-soft); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.poster-frame {
  margin: 0 auto 22px; max-width: 460px;
  border: 1px solid var(--line-gold); border-radius: var(--r-md);
  padding: 8px; background: var(--paper-card);
  box-shadow: var(--shadow-soft); cursor: zoom-in;
}
.poster-frame img { width: 100%; display: block; border-radius: 6px; }
.poster-cap {
  font-family: var(--sans); font-size: .72rem; text-align: center;
  color: var(--ink-faint); margin-top: 6px;
}

/* ---------- Frisuren-Grid ---------- */
.frisur-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.frisur-card {
  cursor: pointer; background: var(--paper-card);
  border: 1px solid var(--line-gold); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.frisur-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.frisur-card-img { width: 100%; aspect-ratio: 1 / 1.41; object-fit: cover; object-position: top; }
.frisur-card-body { padding: 11px 13px 13px; }
.frisur-card-name {
  font-size: 1.08rem; font-weight: 600; color: var(--wine-deep);
  line-height: 1.2;
}
.frisur-card-diff {
  font-family: var(--sans); font-size: .68rem; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  margin-top: 4px; display: inline-block;
}
.diff-leicht  { color: #5a8a4a; }
.diff-mittel  { color: var(--gold); }
.diff-schwer  { color: var(--wine-light); }

/* ---------- Frisur-Detail ---------- */
.fd-head { text-align: center; margin-bottom: 14px; }
.fd-title { font-size: 2.1rem; font-weight: 600; color: var(--wine-deep); }
.fd-sub { color: var(--ink-soft); font-size: 1.06rem; font-style: italic; }
.fd-diff-row {
  display: flex; justify-content: center; gap: 14px;
  margin: 8px 0 18px; font-family: var(--sans); font-size: .76rem;
}
.fd-diff-row .tag {
  background: var(--rose-pale); color: var(--wine-deep);
  padding: 3px 11px; border-radius: 999px; font-weight: 600;
}

/* Tab-Umschalter Poster / Trainer */
.fd-tabs {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 18px;
}
.fd-tab {
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  cursor: pointer; padding: 8px 20px; border-radius: 999px;
  background: transparent; color: var(--wine);
  border: 1px solid var(--line-gold);
  transition: background .15s, color .15s;
}
.fd-tab.active { background: var(--wine); color: var(--paper); border-color: var(--wine-deep); }

/* Trainer */
.trainer {
  background: var(--paper-card);
  border: 1px solid var(--line-gold); border-radius: var(--r-lg);
  padding: 22px 22px 18px; box-shadow: var(--shadow-soft);
  position: relative;
}
.trainer::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid var(--line-gold); border-radius: 13px;
  pointer-events: none;
}
.trainer-stage { text-align: center; min-height: 330px; }
.trainer-step-num {
  width: 52px; height: 52px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--wine); color: var(--gold-light);
  font-size: 1.6rem; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(227, 206, 146, .5);
}
.trainer-step-text {
  font-size: 1.32rem; color: var(--ink); max-width: 440px;
  margin: 0 auto 14px; min-height: 2.4em;
}
.trainer-mnemo {
  font-family: var(--sans); font-size: .82rem;
  background: var(--rose-pale); color: var(--wine-deep);
  display: inline-block; padding: 6px 14px; border-radius: 999px;
}

/* SVG-Zopf-Diagramm — wächst Schritt für Schritt */
.strand-svg {
  width: 100%; max-width: 250px; height: 212px;
  margin: 2px auto 6px; display: block; overflow: visible;
}
.braid-leaf {
  stroke: rgba(93, 42, 58, .3); stroke-width: 1;
  animation: leaf-pop .42s ease both;
}
@keyframes leaf-pop { from { opacity: 0; } to { opacity: 1; } }
.braid-loose { fill: none; stroke-width: 7; stroke-linecap: round; }
.braid-feed {
  fill: none; stroke: var(--wine-deep); stroke-width: 3;
  stroke-linecap: round; stroke-dasharray: 5 4; marker-end: url(#ah);
}

.trainer-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px;
}
.trainer-dots { display: flex; gap: 7px; }
.trainer-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line-gold); cursor: pointer;
  border: 0; padding: 0; transition: background .15s, transform .15s;
}
.trainer-dot.active { background: var(--wine); transform: scale(1.3); }
.trainer-dot.done { background: var(--rose); }
.tnav-btn {
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  cursor: pointer; padding: 9px 18px; border-radius: 999px;
  background: var(--wine); color: var(--paper); border: 1px solid var(--wine-deep);
  transition: background .15s, opacity .15s;
}
.tnav-btn.ghost { background: transparent; color: var(--wine); }
.tnav-btn:disabled { opacity: .32; cursor: default; }

/* Wichtig + Profi-Tipp */
.fd-tips {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin: 20px 0 14px;
}
.tip-box {
  background: rgba(240, 216, 220, .42);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 13px; text-align: center;
}
.tip-box .tip-ic { font-size: 1.3rem; }
.tip-box p { font-family: var(--sans); font-size: .8rem; color: var(--wine-deep); margin-top: 3px; }
.profi-tip {
  position: relative;
  background: linear-gradient(175deg, var(--wine-light), var(--wine));
  color: var(--paper); border-radius: var(--r-md);
  padding: 14px 20px; text-align: center; margin-top: 6px;
  box-shadow: inset 0 0 0 1px rgba(227, 206, 146, .5);
}
.profi-tip .pt-label {
  font-family: var(--sans); font-size: .68rem; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold-light); display: block; margin-bottom: 2px;
}
.profi-tip p { font-size: 1.04rem; font-style: italic; }

.fd-ask {
  display: block; margin: 18px auto 0;
  font-family: var(--sans); font-size: .84rem; font-weight: 700;
  cursor: pointer; padding: 11px 22px; border-radius: 999px;
  background: var(--paper-card); color: var(--wine);
  border: 1px solid var(--wine-light);
  transition: background .15s;
}
.fd-ask:hover { background: var(--rose-pale); }

/* ---------- Section-Heading (♥ Divider) ---------- */
.heart-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0 16px; color: var(--rose);
}
.heart-divider::before, .heart-divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
}
.heart-divider span {
  font-family: var(--serif); font-size: 1.25rem; font-style: italic;
  color: var(--wine-deep);
}

/* ---------- Style-Finder ---------- */
.finder-card {
  background: var(--paper-card);
  border: 1px solid var(--line-gold); border-radius: var(--r-lg);
  padding: 26px 24px; box-shadow: var(--shadow-soft);
  max-width: 560px; margin: 0 auto;
}
.finder-progress {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--gold); text-align: center; margin-bottom: 8px;
}
.finder-q {
  font-size: 1.5rem; font-weight: 600; color: var(--wine-deep);
  text-align: center; margin-bottom: 20px;
}
.finder-opts { display: flex; flex-direction: column; gap: 10px; }
.finder-opt {
  display: flex; align-items: center; gap: 13px;
  cursor: pointer; text-align: left;
  padding: 14px 17px; border-radius: var(--r-md);
  background: var(--paper); border: 1px solid var(--line-gold);
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink);
  transition: background .14s, border-color .14s, transform .12s;
}
.finder-opt:hover {
  background: var(--rose-pale); border-color: var(--wine-light);
  transform: translateX(3px);
}
.finder-opt .opt-ic { font-size: 1.5rem; }
.finder-bar {
  height: 6px; border-radius: 999px; background: var(--paper-deep);
  margin-bottom: 18px; overflow: hidden;
}
.finder-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--wine)); transition: width .35s ease; }

.finder-result { text-align: center; }
.finder-result .ribbon { margin-bottom: 16px; }
.finder-result-img {
  width: 230px; border-radius: var(--r-md);
  border: 1px solid var(--line-gold); padding: 6px;
  background: var(--paper); margin: 0 auto 14px; display: block;
  cursor: zoom-in; box-shadow: var(--shadow-soft);
}
.finder-result-why {
  font-size: 1.05rem; color: var(--ink-soft);
  max-width: 440px; margin: 0 auto 18px;
}
.finder-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Finish-Bar ---------- */
.finish-flow {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 8px;
}
.flow-step {
  flex: 1; min-width: 110px;
  background: var(--paper-card); border: 1px solid var(--line-gold);
  border-radius: var(--r-sm); padding: 12px 8px; text-align: center;
}
.flow-step .fs-num {
  font-family: var(--sans); font-size: .66rem; font-weight: 700;
  color: var(--gold); letter-spacing: 1px;
}
.flow-step .fs-ic { font-size: 1.6rem; }
.flow-step .fs-name { font-size: .98rem; font-weight: 600; color: var(--wine-deep); }

.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.product-item {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 14px; text-align: center;
}
.product-item .pi-ic { font-size: 1.7rem; }
.product-item .pi-name { font-size: 1.05rem; font-weight: 600; color: var(--wine-deep); margin: 3px 0; }
.product-item .pi-desc { font-family: var(--sans); font-size: .78rem; color: var(--ink-soft); }

.sos-item {
  border: 1px solid var(--line-gold); border-radius: var(--r-sm);
  margin-bottom: 8px; overflow: hidden; background: var(--paper-card);
}
.sos-q {
  width: 100%; text-align: left; cursor: pointer;
  font-family: var(--serif); font-size: 1.08rem; font-weight: 600;
  color: var(--wine-deep); padding: 13px 16px;
  background: none; border: 0;
  display: flex; justify-content: space-between; align-items: center;
}
.sos-q .sos-toggle { color: var(--rose); font-size: 1.3rem; transition: transform .2s; }
.sos-item.open .sos-q .sos-toggle { transform: rotate(45deg); }
.sos-a {
  padding: 0 16px; max-height: 0; overflow: hidden;
  transition: max-height .25s ease, padding .25s ease;
  font-size: 1rem; color: var(--ink-soft);
}
.sos-item.open .sos-a { max-height: 200px; padding: 0 16px 14px; }

/* ---------- Chat ---------- */
.chat-intro { text-align: center; padding: 14px 0 8px; }
.chat-intro-crown { font-size: 2.4rem; }
.chat-intro h2 { font-size: 1.7rem; color: var(--wine-deep); font-weight: 600; }
.chat-intro p { color: var(--ink-soft); margin: 6px auto 16px; max-width: 480px; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.sug-chip {
  font-family: var(--sans); font-size: .82rem;
  cursor: pointer; padding: 9px 15px; border-radius: 999px;
  background: var(--paper-card); color: var(--wine);
  border: 1px solid var(--line-gold);
  transition: background .14s;
}
.sug-chip:hover { background: var(--rose-pale); }

.chat-box {
  display: flex; flex-direction: column; gap: 14px;
  padding: 8px 0 12px;
}
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: .68rem; font-weight: 700;
}
.msg-bot .msg-avatar { background: var(--wine); color: var(--gold-light); }
.msg-user .msg-avatar { background: var(--rose-pale); color: var(--wine-deep); }
.msg-content {
  background: var(--paper-card); border: 1px solid var(--line-gold);
  border-radius: var(--r-md); padding: 11px 15px;
  font-size: 1.02rem;
}
.msg-user .msg-content { background: var(--rose-pale); border-color: var(--rose); }
.msg-content p { margin: 0 0 8px; }
.msg-content p:last-child { margin-bottom: 0; }
.msg-content ul, .msg-content ol { margin: 6px 0 8px 20px; }
.msg-content li { margin-bottom: 3px; }
.msg-content h3, .msg-content h4 {
  font-size: 1.1rem; color: var(--wine-deep); margin: 8px 0 4px;
}
.msg-content strong { color: var(--wine-deep); }
.msg-content table {
  border-collapse: collapse; width: 100%; margin: 8px 0; font-size: .92rem;
}
.msg-content th, .msg-content td {
  border: 1px solid var(--line-gold); padding: 5px 9px; text-align: left;
}
.msg-content th { background: var(--rose-pale); color: var(--wine-deep); }
.msg-content blockquote {
  border-left: 3px solid var(--rose); padding-left: 12px;
  color: var(--ink-soft); font-style: italic; margin: 8px 0;
}
.msg-content code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--paper-deep); padding: 1px 5px; border-radius: 4px; font-size: .88em;
}

.typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--rose);
  animation: bounce 1s infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }

/* Frisur-Vorschlagskarte im Chat */
.chat-suggest-card {
  display: flex; gap: 12px; align-items: center;
  margin-top: 10px; cursor: pointer;
  background: var(--paper-card); border: 1px solid var(--wine-light);
  border-radius: var(--r-md); padding: 10px 12px;
  transition: background .14s;
}
.chat-suggest-card:hover { background: var(--rose-pale); }
.chat-suggest-card img { width: 56px; border-radius: 6px; }
.chat-suggest-card .csc-name { font-size: 1.06rem; font-weight: 600; color: var(--wine-deep); }
.chat-suggest-card .csc-go { font-family: var(--sans); font-size: .74rem; color: var(--wine); }

/* ---------- Composer ---------- */
.composer {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 0 4px; position: sticky; bottom: 0;
  background: linear-gradient(180deg, transparent, var(--paper) 36%);
}
#composer {
  flex: 1; resize: none; font-family: var(--serif); font-size: 1.02rem;
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-gold); background: var(--paper-card);
  color: var(--ink); max-height: 130px; line-height: 1.5;
}
#composer:focus { outline: 2px solid var(--rose); outline-offset: 1px; }
.btn-primary {
  font-family: var(--sans); font-size: .86rem; font-weight: 700;
  cursor: pointer; padding: 12px 22px; border-radius: var(--r-md);
  background: var(--wine); color: var(--paper);
  border: 1px solid var(--wine-deep);
  transition: background .15s;
}
.btn-primary:hover { background: var(--wine-deep); }
.btn-primary:disabled { opacity: .5; cursor: default; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(70, 49, 60, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
}
.lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  background: rgba(250, 242, 227, .15); color: var(--paper);
  border: 1px solid rgba(250, 242, 227, .4); font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.footer {
  font-family: var(--sans); font-size: .74rem;
  text-align: center; padding: 18px 22px 24px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}
.footer .hearts { margin-right: 4px; }
.footer a { color: var(--wine); }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 95; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  font-family: var(--sans); font-size: .84rem;
  padding: 11px 18px; border-radius: 999px;
  background: var(--wine-deep); color: var(--paper);
  box-shadow: var(--shadow);
  animation: fade .25s ease;
}
.toast.error { background: #8a2f3a; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .main { padding: 22px 15px 40px; }
  .hero-modes { grid-template-columns: 1fr; }
  .hero-chips { grid-template-columns: 1fr; }
  .frisur-grid { grid-template-columns: repeat(2, 1fr); }
  .fd-tips { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .ribbon { font-size: 1.26rem; padding: 6px 28px; }
  .ribbon-lg { font-size: 1.4rem; }
  .station-card { grid-template-columns: 104px 1fr; }
  .station-card-img { width: 104px; }
  .brand-name small { display: none; }
  .msg { max-width: 95%; }
}
@media (max-width: 440px) {
  .frisur-grid { grid-template-columns: 1fr; }
  .finish-flow { flex-direction: column; }
}

/* ============================================================
   FLECHT-STUDIO 3D (LAB)
   ============================================================ */
.lab-tag {
  font-family: var(--sans); font-size: .56rem; font-weight: 800;
  letter-spacing: 1.4px; vertical-align: middle;
  padding: 2px 6px; border-radius: 999px;
  background: var(--gold); color: var(--wine-deep);
  margin-left: 5px;
}
.toolbar-meta .lab-tag { background: var(--gold-light); }

.chip-lab {
  border-style: solid;
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(227,206,146,.28), rgba(253,249,239,.7));
}
.chip-lab:hover { background: linear-gradient(135deg, rgba(227,206,146,.42), var(--paper-card)); }

/* 3D-Bühne */
.lab-stage {
  position: relative;
  max-width: 440px;
  margin: 0 auto 16px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-gold);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 80% at 50% 12%, rgba(240,216,220,.55), transparent 70%),
    var(--paper-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.lab-stage::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid var(--line-gold); border-radius: 13px;
  pointer-events: none; z-index: 2;
}
#lab-canvas {
  width: 100%; height: 100%; display: block;
  touch-action: none;   /* OrbitControls-Gesten statt Seiten-Scroll */
}
.lab-loading {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center;
  font-family: var(--sans); font-size: .86rem; color: var(--ink-soft);
  text-align: center; padding: 24px;
}
.lab-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line-gold);
  border-top-color: var(--wine);
  animation: lab-spin .8s linear infinite;
}
@keyframes lab-spin { to { transform: rotate(360deg); } }

/* Steuerung */
.lab-controls {
  max-width: 440px; margin: 0 auto;
  background: var(--paper-card);
  border: 1px solid var(--line-gold); border-radius: var(--r-lg);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-soft);
}
.lab-ctl { margin-bottom: 16px; }
.lab-ctl:last-of-type { margin-bottom: 8px; }
.lab-ctl-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px;
}
.lab-play {
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  cursor: pointer; padding: 6px 14px; border-radius: 999px;
  background: var(--wine); color: var(--paper);
  border: 1px solid var(--wine-deep);
  text-transform: none; letter-spacing: 0;
  transition: background .15s;
}
.lab-play:hover { background: var(--wine-deep); }

.lab-select {
  width: 100%;
  font-family: var(--serif); font-size: 1.04rem;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-gold);
  cursor: pointer;
}
.lab-select:focus { outline: 2px solid var(--rose); outline-offset: 1px; }

.lab-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: var(--paper-deep);
  accent-color: var(--wine);
  cursor: pointer;
}
.lab-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--wine); border: 2px solid var(--gold-light);
  box-shadow: var(--shadow-soft);
}
.lab-range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--wine); border: 2px solid var(--gold-light);
}

.lab-swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.lab-swatch {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--sw); cursor: pointer;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line-gold);
  transition: transform .12s;
}
.lab-swatch:hover { transform: scale(1.12); }
.lab-swatch.active {
  box-shadow: 0 0 0 2px var(--wine), 0 0 0 4px var(--gold-light);
  transform: scale(1.12);
}

.lab-ctl-sliders { display: flex; gap: 18px; }
.lab-slider { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.lab-slider span {
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; color: var(--ink-faint);
}
.lab-foot {
  font-family: var(--sans); font-size: .72rem;
  color: var(--ink-faint); text-align: center;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .lab-stage { max-width: 100%; aspect-ratio: 4 / 5; }
  .lab-ctl-sliders { flex-direction: column; gap: 14px; }
}
