:root {
    --primary: #e84393;
    --secondary: #6c5ce7;
    --gradient: linear-gradient(135deg, #e84393, #6c5ce7);
    --gradient-soft: linear-gradient(135deg, #fff5f9, #f4f0ff);
    --gray: #636e72;
    --dark: #2d3436;
    --shadow: 0 18px 50px rgba(45, 52, 54, .08);
    --shadow-sm: 0 8px 24px rgba(45, 52, 54, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    color: var(--dark);
    background: #f7f5fb;
}
a { color: inherit; }
.wrap { width: min(980px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    background: #fff;
    border-bottom: 1px solid rgba(45,52,54,.06);
}
.brand { font-weight: 800; text-decoration: none; }
.langs { display: flex; gap: 6px; }
.langs a {
    text-decoration: none;
    font-size: .78rem;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 999px;
    color: var(--gray);
}
.langs a.is-on { background: var(--gradient); color: #fff; }
.hero {
    background: linear-gradient(120deg, #11998e, #38ef7d);
    color: #fff;
    text-align: center;
    padding: 54px 16px 46px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero p { margin: 0 auto; max-width: 640px; color: rgba(255,255,255,.92); }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
}
.btn-primary-custom { background: var(--gradient); color: #fff; }
.btn-sm { font-size: .9rem; }

.nose-page { padding: 28px 0 70px; }
.nose-chat { max-width: 760px; margin: 0 auto; }
.nose-privacy { color: var(--gray); font-size: .8rem; margin: 0; padding: 0 18px 14px; }
.nose-chat {
    background: #fff;
    border: 1px solid rgba(45,52,54,.08);
    border-radius: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 640px;
    overflow: hidden;
}
.nose-chat-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(45,52,54,.06);
}
.nose-chat-head strong { display: block; }
.nose-chat-head small { color: var(--gray); }
.nose-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; color: #fff;
    background: var(--gradient);
}
.nose-log {
    flex: 1;
    overflow-y: auto;
    padding: 22px 18px 8px;
    background: linear-gradient(180deg, rgba(255,245,249,.7), rgba(255,255,255,.4));
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 68vh;
}
.nose-msg { display: flex; }
.nose-msg.user { justify-content: flex-end; }
.nose-bubble {
    max-width: min(78%, 460px);
    padding: 12px 14px;
    border-radius: 18px;
    line-height: 1.55;
    white-space: pre-wrap;
}
.nose-msg.bot .nose-bubble {
    background: #fff;
    border: 1px solid rgba(45,52,54,.06);
    border-bottom-left-radius: 6px;
}
.nose-msg.user .nose-bubble {
    background: var(--gradient);
    color: #fff;
    border-bottom-right-radius: 6px;
}
.nose-sent-photo {
    width: 148px; height: 148px; object-fit: cover;
    border-radius: 18px; border-bottom-right-radius: 6px;
}
.nose-choices, .nose-photo-actions, .nose-preview-actions, .nose-report-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.nose-choice {
    border: 1px solid rgba(232,67,147,.35);
    background: #fff;
    color: var(--dark);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
}
.nose-choice.is-solid { background: var(--gradient); color: #fff; border-color: transparent; }
.nose-hint { color: #c0392b; font-size: .85rem; margin: 8px 0 0; }
.nose-compose { padding: 14px 18px 8px; border-top: 1px solid rgba(45,52,54,.06); }
.nose-textbar { display: flex; gap: 8px; }
.nose-textbar input {
    flex: 1; border: 1px solid rgba(45,52,54,.12); border-radius: 999px;
    padding: 12px 16px; font: inherit; outline: none;
}
.nose-textbar button {
    border: 0; border-radius: 999px; padding: 0 18px;
    background: var(--gradient); color: #fff; font-weight: 700; cursor: pointer;
}
.nose-preview { display: flex; gap: 12px; align-items: center; }
.nose-preview img { width: 84px; height: 84px; object-fit: cover; border-radius: 16px; }
.nose-typing { display: flex; gap: 5px; align-items: center; min-width: 58px; }
.nose-typing i {
    width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: block;
    animation: noseDot 1s infinite ease-in-out;
}
.nose-typing i:nth-child(2) { animation-delay: .15s; }
.nose-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes noseDot {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}
.nose-report {
    background: #fff; border-radius: 22px; padding: 20px;
    border: 1px solid rgba(232,67,147,.16); box-shadow: var(--shadow-sm);
}
.nose-report-badge {
    display: inline-block; background: var(--gradient); color: #fff;
    border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 700; margin-bottom: 12px;
}
.nose-report-summary { font-weight: 600; }
.nose-obs { padding-top: 10px; }
.nose-obs p, .nose-report-note, .nose-report-next { margin: 4px 0 0; }
.nose-report-note, .nose-disclaimer { color: var(--gray); }
.nose-disclaimer { margin-top: 14px; font-size: .82rem; }
.nose-restart {
    margin-top: 12px; border: 0; background: transparent;
    color: var(--secondary); font-weight: 600; padding: 0; cursor: pointer;
}
.wizard-page { padding: 36px 16px 72px; }
.wizard { width: min(560px, 100%); margin: 0 auto; }
.wizard-kicker {
    margin: 0 0 14px;
    text-align: center;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--secondary);
}
.wizard-dots { display: flex; gap: 8px; margin: 0 0 18px; }
.wizard-dots i {
    display: block; height: 6px; flex: 1; border-radius: 99px; background: #e4e1ee;
}
.wizard-dots i.is-on { background: var(--gradient); }
.wizard-dots i.is-done { background: #1eae5a; }
.wizard-card, .face-stage {
    background: #fff;
    border-radius: 28px;
    padding: 28px 24px 22px;
    box-shadow: var(--shadow);
}
.wizard-card.is-off, .face-stage, .wizard-result { display: none; }
.face-stage.is-on, .wizard-result.is-on { display: block; }
.wizard-count {
    margin: 0 0 8px;
    color: var(--gray);
    font-size: .82rem;
    font-weight: 700;
}
.wizard-card h1, .face-stage h1 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 4vw, 2.15rem);
    line-height: 1.25;
}
.wizard-help { margin: 0 0 18px; color: var(--gray); line-height: 1.5; }
.wizard-help:empty { display: none; }
.wizard-input {
    width: 100%;
    border: 1px solid rgba(45,52,54,.14);
    border-radius: 16px;
    padding: 16px 18px;
    font: inherit;
    font-size: 1.05rem;
    background: #fff;
}
select.wizard-input { background: #fff; }
.wizard-input:focus { outline: 2px solid rgba(108,92,231,.35); border-color: transparent; }
.wizard-actions { display: flex; gap: 10px; }
.wizard-choice, .wizard-next, .wizard-back {
    font: inherit; cursor: pointer;
}
.wizard-choice {
    flex: 1;
    min-height: 72px;
    border-radius: 18px;
    border: 1px solid rgba(108,92,231,.28);
    background: #fff;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.02rem;
}
.wizard-choice.is-solid {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}
.wizard-next {
    width: 100%;
    margin-top: 14px;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    background: var(--gradient);
    color: #fff;
    font-weight: 800;
}
.wizard-back {
    display: inline-block;
    margin-top: 14px;
    border: 0;
    background: transparent;
    color: var(--gray);
    font-weight: 700;
    padding: 0;
}
.wizard-error { color: #c0392b; margin: 12px 0 0; min-height: 0; }
.wizard-error:empty { display: none; }
.wizard-reply { margin: 0 0 16px; line-height: 1.6; }
.wizard-congrats { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.35; }
.wizard-privacy { color: var(--gray); font-size: .8rem; text-align: center; margin: 14px 8px 0; }
#noseWebsite { position: absolute; left: -10000px; width: 1px; height: 1px; }
.face-stage { padding: 28px 20px 22px; }
.face-stage .wizard-actions { justify-content: center; margin-top: 14px; }
.face-stage .wizard-actions:empty { display: none; }
.face-ring { position: relative; width: 250px; height: 320px; margin: 0 auto; }
.face-arc {
    position: absolute; inset: 0; border: 9px solid #e6ebef; pointer-events: none;
    border-radius: 46% 46% 42% 42%; transition: border-color .15s linear;
}
.face-arc.is-left { clip-path: inset(10% 50% 8% 0); }
.face-arc.is-right { clip-path: inset(10% 0 8% 50%); }
.face-arc.is-front { clip-path: inset(0 24% 78% 24%); }
.face-hole {
    position: absolute; inset: 16px; overflow: hidden; background: #1b1c1e;
    border-radius: 46% 46% 42% 42%;
}
.face-hole video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.face-guide { text-align: center; font-weight: 700; margin: 14px 0 0; }
.face-pills { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.face-pills span {
    min-width: 76px; text-align: center; border-radius: 999px; padding: 7px 10px;
    font-size: .8rem; font-weight: 700; color: #636e72;
    background: linear-gradient(90deg, #1eae5a var(--p, 0%), #f1f2f6 var(--p, 0%));
}
.face-pills span.is-on { color: #fff; }
.nose-congrats { margin-top: 8px; }
.nose-choices { display: flex; flex-wrap: wrap; gap: 8px; }
[dir="rtl"] .nose-msg.user { justify-content: flex-start; }
[dir="rtl"] .nose-msg.bot { justify-content: flex-end; }
@media (max-width: 700px) {
    .nose-chat { min-height: 560px; }
    .topbar { align-items: flex-start; flex-direction: column; }
}
