/* Insta Zoom by Appduo. Gleiche Bauweise wie Songwunsch: dunkel, große Schrift, Pillen-Buttons. */

@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Instrument Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
}

:root {
    --bg: #0f0f10;
    --card: #1b1b1d;
    --card-2: #252528;
    --line: #303034;
    --text: #ffffff;
    --muted: #b4b4ba;
    --pink: #ff7aa8;
    --ok: #3ddc97;
    --warn: #f0b35e;
    --danger: #ff7b7b;
    --ig: linear-gradient(120deg, #feda75 0%, #fa7e1e 22%, #d62976 52%, #962fbf 78%, #4f5bd5 100%);
    --btn: linear-gradient(120deg, #d62976 0%, #a32ab8 100%);
    --radius: 24px;
    --radius-sm: 14px;
    --tap: 48px;
    --gutter: 16px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --font: "Instrument Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
    margin: 0;
    min-height: 100vh;
    font: 400 1.0625rem/1.55 var(--font);
    color: var(--text);
    background:
        radial-gradient(60rem 36rem at 110% -10%, rgba(214, 41, 118, .22), transparent 60%),
        radial-gradient(48rem 30rem at -20% 8%, rgba(150, 47, 191, .18), transparent 60%),
        var(--bg);
    background-repeat: no-repeat;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--pink); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font: 600 .92em/1 var(--font); color: var(--text); background: var(--card-2); padding: .15em .45em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 8px; }
.sprite { position: absolute; }
svg use { pointer-events: none; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 0; }

.wrap {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.skip {
    position: absolute; left: 12px; top: -60px; z-index: 10;
    background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Kopf */
.top { display: flex; align-items: center; padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { color: inherit; }
.brand img { border-radius: 9px; }
.brand-name { font: 800 1.15rem/1 var(--display); letter-spacing: -.02em; }
.brand-by { font-size: .875rem; color: var(--muted); }

/* Bühne */
.hero { padding-top: clamp(28px, 7vw, 64px); }
.hero h1 { font-size: clamp(2.6rem, 11vw, 4.9rem); line-height: .95; letter-spacing: -.04em; max-width: 12ch; }
.grad {
    color: var(--pink);
    background: var(--ig);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: .06em; /* Unterlängen nicht abschneiden */
}
.lead { margin: 18px 0 0; color: var(--muted); font-size: clamp(1.05rem, 3.6vw, 1.2rem); max-width: 36ch; }

/* Suche */
.search { margin-top: 26px; }
.search-label { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 8px 4px; }
.search-row { display: grid; gap: 10px; }
.field { position: relative; }
.field input {
    width: 100%;
    height: 62px;
    padding: 0 52px 0 52px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--card);
    font-size: 1.0625rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: #85858c; }
.field input:hover { border-color: #46464c; }
.field input:focus { outline: none; border-color: #d62976; box-shadow: 0 0 0 4px rgba(214, 41, 118, .28); background: #1f1f22; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-icon { position: absolute; left: 19px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--muted); }
.field-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: var(--tap); height: var(--tap); border: 0; border-radius: 999px; background: transparent; color: var(--muted);
    display: grid; place-items: center;
}
.field-clear:hover { color: var(--text); background: var(--card-2); }
.field-clear svg { width: 20px; height: 20px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand img, .sprite { stroke: none; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 700; font-size: 1.0625rem; text-decoration: none; white-space: nowrap;
    transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { color: inherit; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--btn); color: #fff; box-shadow: 0 10px 30px -10px rgba(214, 41, 118, .7); }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 36px -10px rgba(214, 41, 118, .9); }
.btn-ghost { background: var(--card-2); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #55555c; }
.btn-search { height: 62px; }
.btn-busy { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.is-loading .btn-busy { display: inline-block; }
.is-loading .btn-search { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }

.search-hint { margin: 10px 4px 0; font-size: .9rem; color: var(--muted); }
.search-error { margin: 10px 4px 0; font-size: .95rem; font-weight: 600; color: var(--danger); }

@media (min-width: 620px) {
    .search-row { grid-template-columns: 1fr auto; }
    .btn-search { padding-inline: 30px; }
}

/* Ergebnis */
.result { margin-top: 22px; scroll-margin-top: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

.result-idle { display: flex; align-items: center; gap: 18px; padding: 18px 20px; color: var(--muted); font-size: .95rem; }
.result-idle p { margin: 0; }
.idle-art { flex: none; display: flex; align-items: center; gap: 6px; color: #6b6b72; }
.idle-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px dashed currentColor; }
.idle-arrow { width: 18px; height: 18px; }
.idle-square { width: 40px; height: 40px; border-radius: 8px; border: 2px dashed currentColor; background: rgba(255, 255, 255, .02); }

.result-card { position: relative; padding: 12px; animation: rise .45s var(--ease) both; }
.result-card::before {
    content: ""; position: absolute; inset: 10% 6% -4%; z-index: -1;
    background: var(--ig); filter: blur(60px); opacity: .28; border-radius: 40px;
}
.frame {
    position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0;
    border-radius: 16px; overflow: hidden; background: #0a0a0b; cursor: zoom-in;
}
.frame img { width: 100%; height: 100%; object-fit: contain; }
.frame-badge {
    position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px; background: rgba(15, 15, 16, .72); backdrop-filter: blur(8px);
    font-size: .875rem; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s;
}
.frame-badge svg { width: 18px; height: 18px; }
.frame:hover .frame-badge, .frame:focus-visible .frame-badge { opacity: 1; transform: none; }
@media (hover: none) { .frame-badge { opacity: 1; transform: none; } }

.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 6px 4px; }
.who { min-width: 0; }
.who-handle { display: block; font: 800 1.5rem/1.1 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.who-name { display: block; color: var(--muted); font-size: .95rem; margin-top: 4px; overflow-wrap: anywhere; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
    background: var(--card-2); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; white-space: nowrap;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.chip[data-q="mid"]::before { background: var(--warn); }
.chip[data-q="low"]::before { background: var(--danger); }
.quality-note { margin: 10px 6px 0; font-size: .9rem; color: var(--muted); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 0 4px; }
.actions .btn { min-width: 0; padding-inline: 14px; }
.ig-link { display: inline-flex; align-items: center; gap: 6px; margin: 12px 6px 4px; font-size: .9rem; color: var(--muted); }
.ig-link svg { width: 16px; height: 16px; }

/* Laden */
.result-loading { padding: 12px; }
.skeleton {
    aspect-ratio: 1; border-radius: 16px;
    background: linear-gradient(100deg, #18181a 30%, #232327 50%, #18181a 70%) 0 0 / 250% 100%;
    animation: shimmer 1.3s linear infinite;
}
.result-loading p { margin: 14px 6px 4px; color: var(--muted); font-size: .95rem; }
@keyframes shimmer { to { background-position: -250% 0; } }

/* Fehler */
.result-error { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 20px; animation: rise .35s var(--ease) both; }
.result-error > svg { grid-row: span 3; width: 40px; height: 40px; padding: 8px; border-radius: 50%; color: var(--danger); background: rgba(255, 123, 123, .12); }
.result-error h2 { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.2; margin-top: 6px; }
.result-error p { margin: 4px 0 0; color: var(--muted); }
.result-error .btn { justify-self: start; margin-top: 14px; min-height: 48px; font-size: 1rem; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Inhalte unter dem Tool */
.section { padding-top: clamp(56px, 12vw, 96px); }
.section h2 { font-size: clamp(1.9rem, 7vw, 2.8rem); max-width: 18ch; }
.h-small { font-size: 1.4rem !important; }

.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { padding: 20px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.steps .num {
    grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--btn); font: 800 1.1rem/1 var(--display);
}
.steps h3 { font-size: 1.2rem; letter-spacing: -.015em; line-height: 1.25; align-self: center; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 720px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
    .steps li { grid-template-columns: 1fr; }
    .steps .num { grid-row: auto; margin-bottom: 10px; }
}

.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.faq details[open] { border-color: #45454b; }
.faq summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 20px; font-weight: 600; font-size: 1.05rem; border-radius: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; flex: none; width: 12px; height: 12px; margin-right: 4px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: translateY(-3px) rotate(45deg); transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--muted); }
.note { margin: 20px 4px 0; font-size: .9rem; color: var(--muted); }

.promo { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 20px; text-decoration: none; transition: border-color .2s; }
.promo:hover { color: inherit; border-color: #55555c; }
.promo strong { display: block; font: 800 1.2rem/1.2 var(--display); }
.promo span span { display: block; margin-top: 4px; color: var(--muted); }
.promo svg { flex: none; width: 22px; height: 22px; color: var(--muted); }

/* Fuß */
.foot {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
    margin-top: clamp(56px, 12vw, 96px); padding-top: 24px; padding-bottom: max(32px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem;
}
.foot p { margin: 0; }
.foot-brand a { color: var(--text); font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { display: inline-block; padding: 8px 0; }

/* Vollbild */
.viewer {
    width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: #050505; color: var(--text); overflow: hidden;
}
.viewer::backdrop { background: rgba(0, 0, 0, .9); }
.viewer[open] { display: flex; flex-direction: column; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.viewer-bar {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    background: linear-gradient(#050505, rgba(5, 5, 5, .6));
}
.viewer-title { font: 700 1.05rem/1.2 var(--display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-tools { display: flex; align-items: center; gap: 4px; }
.viewer-level { min-width: 4.2em; text-align: center; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.icon-btn {
    display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 999px;
    border: 0; background: transparent; color: var(--text);
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.icon-btn svg { width: 22px; height: 22px; }
.viewer-stage { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.viewer-stage.is-zoomed { cursor: grab; }
.viewer-stage.is-dragging { cursor: grabbing; }
.viewer-stage img { max-width: 100%; max-height: 100%; transform-origin: 50% 50%; will-change: transform; -webkit-user-drag: none; }
.viewer-hint { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: .875rem; color: var(--muted); pointer-events: none; transition: opacity .3s; }
.viewer-stage.is-zoomed ~ .viewer-hint { opacity: 0; }
@media (max-width: 420px) { .viewer-level { display: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .skeleton { animation: none; background: #1d1d20; }
}

/* Rechtliche Seiten */
.legal { padding-top: 32px; }
.legal h1 { font-size: clamp(2.2rem, 9vw, 3.4rem); }
.legal h2 { font-size: 1.35rem; letter-spacing: -.015em; line-height: 1.25; margin-top: 36px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 1.2em; }
.back { display: inline-block; margin-top: 8px; color: var(--muted); }
