:root {
    color-scheme: dark;
    --bg: #070b12;
    --saffron: #ff9a3c;
    --line: #31445f;
    --text: #e7eef8;
    --muted: #9fb4cc;
    --font: "Nirmala UI", Bahnschrift, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow: hidden;
    overscroll-behavior: none;
}
.studio {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 153, 51, .2), transparent 42%),
        radial-gradient(circle at 82% 92%, rgba(19, 136, 70, .18), transparent 46%),
        var(--bg);
}
.phone {
    width: min(100vw, calc(100vh * 9 / 16));
    height: min(100vh, calc(100vw * 16 / 9));
    width: min(100vw, calc(100dvh * 9 / 16));
    height: min(100dvh, calc(100vw * 16 / 9));
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: #070b14;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
    touch-action: none;
    user-select: none;
}
.stage { position: relative; flex: 1; min-height: 0; background: #070b14; }
.bg, .grid, .glow { position: absolute; inset: 0; pointer-events: none; }
.bg {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 153, 51, .22), transparent 42%),
        radial-gradient(circle at 80% 90%, rgba(19, 136, 70, .2), transparent 46%),
        #070b14;
}
.grid {
    background-image:
        linear-gradient(rgba(126, 182, 255, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126, 182, 255, .16) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: .35;
}
.photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    opacity: 0;
    transition: opacity .28s ease;
    z-index: 1;
}
.glow { z-index: 2; box-shadow: inset 0 0 80px rgba(0, 0, 0, .45); }
.segments {
    position: absolute;
    z-index: 4;
    top: 10px;
    left: 14px;
    right: 14px;
    display: flex;
    gap: 4px;
    pointer-events: none;
}
.segments span {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .22);
    overflow: hidden;
}
.segments b {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff9a3c, #fff, #138808);
}
.stage-copy {
    position: absolute;
    z-index: 3;
    left: 16px;
    right: 16px;
    bottom: 28px;
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
    pointer-events: none;
}
.stage-kicker {
    margin: 0;
    color: var(--saffron);
    letter-spacing: .14em;
    font-size: var(--high-setup-size, 12px);
    font-weight: 750;
}
.stage-headline {
    margin: 0;
    max-width: 100%;
    font-size: var(--flash-size, 34px);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -.02em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 16px #000;
}
.stage-headline.flash { animation: pulse 1.8s ease-in-out infinite; }
.stage-voice {
    margin: 0;
    color: #d5deea;
    font-size: var(--modified-size, 13px);
    letter-spacing: .04em;
    text-shadow: 0 1px 8px #000;
}
.bar {
    position: absolute;
    z-index: 4;
    left: 18px;
    right: 18px;
    bottom: 12px;
    height: 6px;
    background: #1c2838;
    border-radius: 99px;
    overflow: hidden;
    pointer-events: none;
}
.bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff9a3c, #fff, #138808);
}
.gesture { position: absolute; inset: 0; z-index: 2; }
.dock {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px;
    background: #0a101a;
    border-top: 1px solid #243246;
}
.chip, .select-chip, .check-chip {
    border: 1px solid #243246;
    border-radius: 8px;
    background: #121b29;
    color: var(--text);
    padding: 7px 9px;
    font: inherit;
    font-size: 12px;
}
.chip-strong { background: #3a2412; border-color: #8a5a28; color: #ffd7ad; font-weight: 700; }
.select-chip select {
    margin-left: 4px;
    background: transparent;
    color: var(--text);
    border: 0;
    padding: 0;
}
.counter { color: var(--muted); font-size: 12px; letter-spacing: .08em; padding: 0 4px; }
.empty {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    color: var(--muted);
}
.phone.is-idle .dock { display: none; }
.noscript { padding: 24px; text-align: center; }
[hidden] { display: none !important; }

body.embed { background: #070b14; }
body.embed .studio { min-height: 100%; height: 100%; background: #070b14; }
body.embed .phone {
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
body.embed .dock { display: none; }

@media (max-width: 700px), (max-aspect-ratio: 10 / 16) {
    .studio { background: #070b14; }
    .phone {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: none;
        max-height: none;
        border: 0;
        border-radius: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .stage-headline.flash, .photo { animation: none; transition: none; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}
