@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #282828;
  --bg-deep: #222222;
  --panel: #303030;
  --panel-2: #353535;
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #ece8e3;
  --muted: #b9b2aa;
  --faint: #8b857e;
  --teal: #003a40;
  --teal-2: #06464d;
  --gold: #d3b574;
  --brown: #5b4130;
  --brown-2: #6e4f3a;
  --link: #8fb6d9;
  --danger: #e07a6b;
  --radius: 14px;
  --radius-lg: 26px;
  --track: 0.14em;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

/* ---------- Kopfzeile ---------- */
.topbar {
  background: linear-gradient(180deg, #06363c, var(--teal));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; background: none; border: 0; padding: 0; }
.logo {
  width: 40px; height: 40px; border-radius: 50%;
  background: #1f2b2d; display: grid; place-items: center; color: #e9e6e2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.logo svg.i { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.brand-text b { font-weight: 600; letter-spacing: 0.2em; font-size: 14px; color: #a9c9e6; }
.brand-text small { letter-spacing: 0.2em; font-size: 10.5px; color: #8fb0c9; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-btn {
  background: none; border: 1px solid transparent; border-radius: 999px; padding: 8px 16px;
  font-size: 12px; letter-spacing: var(--track); text-transform: uppercase; color: #cfe0e6; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-btn:hover { background: rgba(255,255,255,.06); }
.nav-btn.active { border-color: rgba(255,255,255,.18); color: #fff; }
.icon-btn { padding: 8px; }

/* ---------- Allgemein ---------- */
main { flex: 1; padding: 26px 0 40px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(91, 65, 48, 0.55); border: 1px solid rgba(211, 181, 116, 0.32);
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #eadbc6;
}
.badge svg.i { width: 14px; height: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 26px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.025); border: 1px solid var(--line);
  font-weight: 600; font-size: 15px; color: var(--text);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.25); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.small { padding: 8px 16px; font-size: 13px; gap: 8px; }
.btn.tiny { padding: 6px 12px; font-size: 12px; gap: 6px; }
.btn.primary { background: linear-gradient(180deg, #7a5a40, var(--brown)); border-color: rgba(211,181,116,.45); color: #fff6ea; }
.btn.primary:hover { background: linear-gradient(180deg, #876447, #664836); }
.btn.danger:hover { border-color: var(--danger); color: #ffd8d1; }
.btn.fav.on { color: #ffb3a7; border-color: rgba(255,140,120,.5); }
.btn.fav.on svg.i { fill: currentColor; }
.link { color: var(--link); text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Start ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 76px 32px 74px; text-align: center;
  background:
    radial-gradient(420px 320px at 4% 0%, rgba(122, 82, 46, .55), transparent 70%),
    radial-gradient(380px 300px at 100% 100%, rgba(52, 92, 104, .45), transparent 70%),
    linear-gradient(160deg, #2f2c29 0%, #2b2b2b 50%, #2a2d2e 100%);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255,255,255,.035);
  box-shadow: 0 0 0 60px rgba(255,255,255,.012), 0 0 0 130px rgba(255,255,255,.01);
}
.hero::before { width: 360px; height: 360px; left: -120px; top: -150px; }
.hero::after { width: 420px; height: 420px; right: -140px; bottom: -200px; }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 600; margin: 26px 0 18px; letter-spacing: 0.01em; }
.hero p.lead { max-width: 560px; margin: 0 auto 38px; font-size: 18px; color: #dcd6cf; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { padding: 15px 30px; font-size: 16px; }
.hero .hint { margin-top: 22px; font-size: 12.5px; color: var(--faint); }
.hero.dragover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(211,181,116,.25) inset; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 24px; text-align: left; cursor: pointer; transition: background .15s, border-color .15s;
}
.feature:hover { background: var(--panel-2); border-color: rgba(255,255,255,.2); }
.ic-circle {
  width: 48px; height: 48px; border-radius: 50%; background: var(--brown);
  display: grid; place-items: center; color: #f4e7d6; margin-bottom: 16px;
}
.ic-circle svg.i { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: var(--track); }
.feature p { margin: 0; font-size: 14px; color: #d4cec7; }

/* ---------- Arbeitsbereich ---------- */
.work-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.work-head h2 { margin: 0; font-size: 28px; font-weight: 600; }
.work-head .sub { font-size: 13px; color: var(--muted); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.work-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.photo-panel { position: sticky; top: 92px; }
.photo-panel img { width: 100%; border-radius: 16px; background: #222; }
.photo-panel .actions { display: flex; gap: 8px; margin-top: 12px; }
.analysis { margin-top: 16px; }
.analysis .eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--gold); }
.analysis dt { font-size: 11.5px; letter-spacing: var(--track); text-transform: uppercase; color: var(--faint); margin-top: 10px; }
.analysis dd { margin: 2px 0 0; font-size: 14px; color: #e2ddd7; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.section-head + .looks { margin-bottom: 30px; }
.chips { display: flex; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 14px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer;
}
.chip.on { background: rgba(211,181,116,.14); border-color: rgba(211,181,116,.45); color: #f1e3c8; }

.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.look {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.look-img { position: relative; aspect-ratio: var(--ar, 2/3); background: #262626; cursor: zoom-in; }
.look-img img { width: 100%; height: 100%; object-fit: cover; }
.look-img .fav-dot {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(20,20,20,.55); border: 1px solid rgba(255,255,255,.18); color: #fff;
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px);
}
.look-img .fav-dot.on { color: #ff9c8c; }
.look-img .fav-dot.on svg.i { fill: currentColor; }
.look-img .compare-hint {
  position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; background: rgba(20,20,20,.6); border: 1px solid rgba(255,255,255,.15);
  display: inline-flex; gap: 6px; align-items: center; opacity: 0; transition: opacity .15s;
}
.look-img:hover .compare-hint { opacity: 1; }
.state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 20px; text-align: center; color: var(--muted); font-size: 13px; cursor: default;
}
.state.loading {
  background: linear-gradient(110deg, #2a2a2a 30%, #343130 45%, #2a2a2a 60%);
  background-size: 220% 100%; animation: shimmer 1.6s linear infinite;
}
.state.error { color: #f0b4a9; }
@keyframes shimmer { to { background-position: -220% 0; } }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--gold); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.look-body { padding: 14px 16px 6px; flex: 1; }
.look-body h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: .08em; }
.look-body h4 { margin: 12px 0 2px; font-size: 11px; letter-spacing: var(--track); text-transform: uppercase; color: var(--gold); font-weight: 600; }
.look-body p { margin: 0; font-size: 13.5px; color: #d6d0c9; }
.look-actions { display: flex; gap: 8px; padding: 12px 16px 16px; flex-wrap: wrap; }
.skel-line { height: 12px; border-radius: 6px; background: #3a3a3a; margin: 8px 0; }
.skel-line.w60 { width: 60%; } .skel-line.w80 { width: 80%; } .skel-line.w40 { width: 40%; }

.catalog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
}
.cat .tag { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.cat h4 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .05em; }
.cat p { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); flex: 1; }
.cat .btn { align-self: flex-start; }
.cat.done { border-color: rgba(211,181,116,.35); }

/* ---------- Galerie ---------- */
.g-session { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; }
.g-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.g-head img { width: 64px; height: 86px; object-fit: cover; border-radius: 10px; }
.g-head .meta { flex: 1; min-width: 200px; }
.g-head .meta b { display: block; font-weight: 600; }
.g-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.g-look { position: relative; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #262626; border: 1px solid var(--line-soft); }
.g-look img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.g-look span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11.5px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.g-look .fav-dot { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(20,20,20,.55); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); cursor: pointer; color: #fff; }
.g-look .fav-dot svg.i { width: 15px; height: 15px; }
.g-look .fav-dot.on { color: #ff9c8c; }
.g-look .fav-dot.on svg.i { fill: currentColor; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-lg); }

/* ---------- Fußzeile ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-deep); padding: 34px 0 38px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 24px; align-items: start; }
.footer .f-brand { display: flex; align-items: center; gap: 14px; font-weight: 600; letter-spacing: 0.2em; font-size: 14px; }
.footer h5 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.2em; font-weight: 600; }
.footer .row { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 6px 0; color: #d9d3cc; }
.footer .row svg.i { width: 16px; height: 16px; }

/* ---------- Dialoge ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(10,10,10,.72); backdrop-filter: blur(3px); }
.dialog { background: #2e2e2e; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; max-width: min(640px, 100%); width: 100%; max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.dialog.wide { max-width: min(1100px, 100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-head h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .06em; }
.x-btn { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 50%; }
.x-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field .row { display: flex; gap: 8px; }
.input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #252525; outline: none; }
.input:focus { border-color: rgba(211,181,116,.6); }
.help { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.note { font-size: 12.5px; color: var(--muted); background: rgba(91,65,48,.25); border: 1px solid rgba(211,181,116,.2); border-radius: 12px; padding: 10px 12px; margin: 6px 0 16px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.cam-wrap { position: relative; border-radius: 18px; overflow: hidden; background: #111; aspect-ratio: 4/3; }
.cam-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-frame { position: absolute; top: 4%; bottom: 4%; left: 50%; transform: translateX(-50%); aspect-ratio: 2/3; border: 2px dashed rgba(255,255,255,.35); border-radius: 18px; pointer-events: none; }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; font-weight: 700; color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.6); pointer-events: none; }
.cam-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }

.cmp-stage { display: flex; justify-content: center; }
.cmp { position: relative; border-radius: 18px; overflow: hidden; user-select: none; touch-action: none; cursor: ew-resize; background: #111; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp .before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 12px rgba(0,0,0,.5); }
.cmp-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #222; display: grid; place-items: center; box-shadow: 0 4px 18px rgba(0,0,0,.4); }
.cmp-tag { position: absolute; top: 14px; padding: 5px 12px; border-radius: 999px; font-size: 11px; letter-spacing: .16em; font-weight: 600; background: rgba(20,20,20,.65); border: 1px solid rgba(255,255,255,.2); }
.cmp-tag.l { left: 14px; } .cmp-tag.r { right: 14px; }
.cmp-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.cmp-info p { margin: 0; color: var(--muted); font-size: 14px; max-width: 700px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; max-width: 440px; }
.toast { background: #3a3330; border: 1px solid rgba(255,255,255,.14); border-left: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; box-shadow: 0 14px 40px rgba(0,0,0,.4); animation: pop .2s ease-out; }
.toast.err { border-left-color: var(--danger); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.login-head { display: flex; align-items: center; gap: 12px; }
#m-login { background: radial-gradient(500px 400px at 10% 0%, rgba(122,82,46,.35), transparent 70%), #1d1d1d; }

@media (max-width: 1100px) {
  .work-grid { grid-template-columns: 250px 1fr; }
  .catalog { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .photo-panel { position: static; }
  .looks { grid-template-columns: repeat(2, 1fr); }
  .catalog { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  main { padding-top: 16px; }
  .topbar-inner { height: 60px; }
  .brand-text small { display: none; }
  .nav { gap: 0; }
  .nav-btn { padding: 8px 9px; font-size: 11px; letter-spacing: .08em; }
  #nav-home { display: none; }
  .hero { padding: 44px 18px 40px; border-radius: 20px; }
  .hero p.lead { font-size: 16px; margin-bottom: 26px; }
  .hero-actions .btn { width: 100%; }
  .features { grid-template-columns: 1fr; gap: 10px; }
  .feature { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; padding: 16px; }
  .feature .ic-circle { grid-row: span 2; margin: 0; }
  .looks, .catalog { grid-template-columns: 1fr; }
  .work-head h2 { font-size: 22px; }
  .head-actions .btn.small { padding: 7px 12px; font-size: 12px; }
  .photo-panel img { max-height: 55vh; object-fit: contain; }
  .dialog { padding: 16px; border-radius: 18px; }
  .field .row { flex-wrap: wrap; }
  .modal { padding: 10px; }
}
