/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-light: #888;
    --accent: #2c2c2c;
    --accent-dark: #111;
    --card-bg: #f8f8f8;
    --border: #e0e0e0;
    --radius: 10px;
    --shadow: 0 1px 12px rgba(0,0,0,0.05);
}

html, body {
    height: 100%;
    font-family: 'Jost', -apple-system, sans-serif;
    font-weight: 300;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Quiz Nav */
.quiz-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.quiz-nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}
.quiz-nav-crack {
    flex-shrink: 0;
}
.quiz-nav-crack svg {
    width: 4px;
    height: 32px;
    display: block;
}
.quiz-nav-logo-img {
    width: 120px;
    height: auto;
}
.quiz-nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}
.quiz-nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.quiz-nav-links a:hover {
    color: var(--text);
}

h1, h2, h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* === Layout === */
#app {
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-top: 70px;
}

.step {
    display: none;
    min-height: 100vh;
    padding: 40px 20px 30px;
}
.step.active { display: flex; align-items: flex-start; justify-content: center; }

.step-content {
    width: 100%;
    max-width: 560px;
}

/* Results page uses full width */
.results-content {
    max-width: 860px !important;
}

.step-header {
    text-align: center;
    margin-bottom: 28px;
}
.step-num {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}
.step-header h2 {
    font-size: 28px;
    margin: 8px 0 6px;
}
.hint {
    font-size: 14px;
    color: var(--text-light);
}

/* === Step 0: Registration === */
.logo {
    text-align: center;
    margin-bottom: 6px;
}
.logo-img {
    width: 280px;
    height: auto;
}
.quiz-hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 12px;
}
.subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 36px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    font-weight: 300;
    background: var(--card-bg);
    transition: border-color 0.2s;
    outline: none;
}
.form input:focus {
    border-color: var(--accent);
}
.form input.input-error {
    border-color: #e25555;
    background: #fef6f6;
}
.form input.input-error:focus {
    border-color: #e25555;
}
.error-msg {
    display: block;
    font-size: 12px;
    color: #e25555;
    margin-top: -8px;
    padding-left: 4px;
}

/* Step-by-step registration */
.reg-field {
    display: none;
    flex-direction: column;
    gap: 14px;
    animation: fadeInUp 0.35s ease;
}
.reg-field.active {
    display: flex;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.field-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: -8px;
    line-height: 1.4;
}

/* Phone input with +7 prefix */
.phone-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    overflow: hidden;
    transition: border-color 0.2s;
}
.phone-input-wrap:focus-within {
    border-color: var(--accent);
}
.phone-input-wrap.input-error {
    border-color: #e25555;
    background: #fef6f6;
}
.phone-prefix {
    padding: 14px 0 14px 16px;
    font-size: 15px;
    color: var(--text);
    font-weight: 400;
    flex-shrink: 0;
}
.phone-input-wrap input {
    border: none !important;
    background: transparent !important;
    padding-left: 4px !important;
    flex: 1;
}
.phone-input-wrap input:focus {
    border: none !important;
}

/* Gender slider */
.gender-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: 1px;
}
.gender-slider-wrap {
    padding: 0 4px;
    margin-bottom: 8px;
}
.gender-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #7BA7C9, #C9B8A0, #D4A0B0);
    outline: none;
}
.gender-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.gender-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
    padding: 0 2px;
}
.gender-scale-labels span {
    width: 20px;
    text-align: center;
}
.gender-value {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-dark);
    margin-top: 4px;
}
.gender-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    width: 100%;
    margin-top: 10px;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled {
    background: var(--border);
    color: var(--text-light);
    cursor: default;
}
.btn-link {
    background: none;
    color: var(--text-light);
    font-size: 13px;
    text-decoration: underline;
    padding: 8px;
    width: auto;
    margin: 8px auto 0;
    display: block;
}

/* === Step 1: Favorites / Search === */
.search-box {
    position: relative;
    margin-bottom: 16px;
}
.search-box input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    font-weight: 300;
    background: var(--card-bg);
    outline: none;
}
.search-box input:focus { border-color: var(--accent); }
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    display: none;
}
.search-clear:hover { color: #333; }
.search-box input:not(:placeholder-shown) ~ .search-clear { display: block; }

.search-wrap {
    position: relative;
    margin-bottom: 16px;
}
.search-wrap .search-box {
    margin-bottom: 0;
}
.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    max-height: 340px;
    overflow-y: auto;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
}
.search-item:hover { background: #f5f5f5; }
.search-item.selected { background: #eaf5ea; }
.search-item .brand { color: var(--text-light); font-size: 13px; }
.search-check { color: var(--accent); font-size: 20px; font-weight: 700; margin-left: auto; }
.search-item-info { flex: 1; }
.search-item-name { font-size: 15px; }
.search-thumb {
    width: 70px;
    height: 90px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Chips — selected perfumes */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 20px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--accent);
}
.chips-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    width: 100%;
    margin-bottom: 4px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    animation: chipIn 0.2s ease;
}
.chip .remove {
    cursor: pointer;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1;
}
.chip .remove:hover { color: #e44; }

@keyframes chipIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* === Brand catalog === */
.catalog-section {
    margin-bottom: 20px;
}
.catalog-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}
.brand-search-box {
    margin-bottom: 10px;
}
.brand-search-box input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    outline: none;
}
.brand-search-box input:focus {
    border-color: var(--accent);
}
.brand-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    max-height: 200px;
    overflow-y: auto;
    padding: 2px;
}
.brand-btn {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.brand-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.brand-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.brand-btn .brand-count {
    font-size: 11px;
    opacity: 0.6;
    margin-left: 3px;
}
.brand-perfumes {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    display: none;
}
.brand-perfumes .perfume-row {
    background: #ffffff;
}
.brand-perfumes.show { display: block; }
.perfume-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
    font-size: 14px;
    min-height: 80px;
}
.perfume-row:last-child { border-bottom: none; }
.perfume-row:hover { background: #fafafa; }
.perfume-row.selected { background: rgba(44,44,44,0.04); }
.perfume-row .check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: transparent;
    transition: all 0.2s;
}
.perfume-row.selected .check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.perfume-thumb {
    width: 60px;
    height: 80px;
    object-fit: contain;
    border-radius: 0;
    flex-shrink: 0;
    background: transparent;
    mix-blend-mode: multiply;
}

.source-note {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    margin-top: 10px;
}
.source-note a {
    color: var(--accent-dark);
    text-decoration: none;
}

/* === Step 2: Rosette Duel === */
.rosette-fullscreen {
    padding: 0 !important;
    max-width: 100% !important;
}
.rosette-fullscreen .step-header {
    padding: 16px 20px 0;
}
.rosette-progress {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px 12px;
}
.rosette-progress .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.3s;
}
.rosette-progress .dot.done {
    background: var(--accent);
}
.rosette-progress .dot.active {
    background: var(--accent);
    transform: scale(1.3);
}
.rosette-duel {
    display: flex;
    flex-direction: row;
    gap: 0;
    height: 260px;
    max-height: 40vh;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 20px;
}
.rosette-cta {
    text-align: center;
    margin: 20px 20px 0;
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 1px;
}
.duel-option {
    flex: 1;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, opacity 0.2s;
    overflow: hidden;
}
.duel-option:hover {
    opacity: 0.85;
}
.duel-option:active {
    transform: scale(0.97);
}
.duel-palette {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
.duel-palette .color-stripe {
    flex: 1;
    min-width: 100%;
    transition: flex 0.3s;
}
.duel-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 2px;
    background: var(--bg);
    flex-shrink: 0;
    writing-mode: vertical-lr;
}
/* flash on pick */
@keyframes duelPick {
    0% { opacity: 1; }
    30% { opacity: 0.6; }
    100% { opacity: 1; }
}
.duel-option.picked {
    animation: duelPick 0.4s ease;
}

/* === Accord Duel === */
.accord-duel {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 80vw;
    max-width: 80vw;
    margin-left: calc(-40vw + 50%);
    height: calc(40vw - 4px);
}
.accord-duel-option {
    flex: 1;
    min-width: 0;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}
.accord-duel-option:hover {
    opacity: 0.85;
}
.accord-duel-option:active {
    transform: scale(0.97);
}
.accord-duel-option.picked {
    animation: duelPick 0.4s ease;
}
.duel-accord-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.accord-duel .duel-vs {
    display: flex;
    align-items: center;
    padding: 0 4px;
    font-size: 13px;
    color: var(--text-light);
    flex-shrink: 0;
}
.duel-progress {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}
.duel-progress .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}
.duel-progress .dot.done {
    background: var(--accent);
}
.duel-progress .dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* === Step 3: Swipe === */
.swipe-container {
    position: relative;
    width: 100%;
    height: 380px;
    margin-bottom: 20px;
    perspective: 800px;
}
.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    cursor: grab;
    transition: transform 0.1s ease-out;
    user-select: none;
    -webkit-user-select: none;
}
.swipe-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.swipe-label {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 20px 16px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 1px;
}

.swipe-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 72px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 10;
}
.swipe-overlay.like { right: 20px; color: #4ecdc4; }
.swipe-overlay.dislike { left: 20px; color: #ff6b6b; }

.swipe-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}
.btn-swipe {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--card-bg);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-dislike:hover { border-color: #ff6b6b; color: #ff6b6b; background: #fff5f5; }
.btn-like:hover { border-color: #4ecdc4; color: #4ecdc4; background: #f0fffe; }
.swipe-counter {
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* === Step 4: Results (matches home.html design) === */

/* Results tabs */
.res-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.res-tab {
    flex: 1;
    padding: 16px 20px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 3px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
    text-align: center;
}
.res-tab.active {
    color: var(--text);
    border-bottom-color: var(--text);
}
.res-tab:hover { color: var(--text); }
.res-tab-pane { display: none; }
.res-tab-pane.active { display: block; }

/* Section spacing */
.res-section {
    margin-bottom: 48px;
}

/* Section headings — Bebas Neue, centered, like home.html .section-title */
.res-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 24px;
    color: var(--text);
}
.res-heading--rec {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 1px;
    text-transform: none;
    margin-bottom: 28px;
}
.res-section--rec {
    margin-bottom: 64px;
}
.res-rec-sub {
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    max-width: 500px;
    margin: -16px auto 28px;
}

/* === Emotion portrait — about-grid layout (mirrors home.html .about-grid) === */
.res-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 48px;
    padding: 0;
}
.res-about-text h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 16px;
}
.res-about-text p {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
    white-space: pre-line;
}

/* Tags — monochrome */
.res-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.res-tag {
    display: inline-block;
    padding: 5px 14px;
    font-size: 12px;
    letter-spacing: 0.5px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    background: #fff;
}

/* Accord visual block (right side, like about-visual) */
.res-about-visual {
    border-radius: 8px;
    background: linear-gradient(160deg, #f5f5f5 0%, #eaeaea 50%, #ddd 100%);
    padding: 32px 24px;
    min-height: 320px;
    display: flex;
    align-items: center;
}
.res-accords-full {
    width: 100%;
}

/* Character section — text block */
.res-character {
    margin-bottom: 48px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.res-character-text {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
}
.res-character-traits {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 3px;
    color: var(--text);
}

/* Clean card — for tab 2 */
.res-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 28px 24px;
}
.res-card--wide {
    flex: 1;
    min-width: 0;
}
.res-card-text {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    white-space: pre-line;
    margin-bottom: 14px;
}

/* Accord bars — clean */
.res-accords {
    max-width: 500px;
    margin: 0 auto;
}
.res-accords--compact {
    max-width: 280px;
}
.accord-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px;
}
.accord-bar-name {
    width: 100px;
    text-align: right;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--text-light);
    flex-shrink: 0;
}
.accord-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    overflow: hidden;
}
.accord-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* === FERRUM BOX — white card === */
.res-box-card {
    display: flex;
    gap: 32px;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
/* Carousel */
.res-box-carousel {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.res-box-slides {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}
.res-box-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.res-box-slide.active {
    opacity: 1;
}
.res-box-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.res-box-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.2s;
}
.res-box-dot.active {
    background: var(--text);
}
.res-box-info {
    flex: 1;
}
.res-box-name {
    font-family: 'Jost', sans-serif;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0;
    margin-bottom: 12px;
    text-transform: none;
}
.res-box-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #888;
    margin-bottom: 12px;
}
.res-box-desc:last-of-type {
    margin-bottom: 48px;
}
.res-box-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 1px;
}
.res-box-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.res-box-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    font-family: inherit;
    font-weight: 400;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    user-select: none;
}
.res-box-btn:hover { background: #f0f0f0; }
.res-box-btn:active { background: #e5e5e5; }
.res-box-val {
    min-width: 28px;
    text-align: center;
    font-size: 15px;
    font-weight: 400;
}

/* Recommendation grid — 5 cards like home.html .collection-grid / .fragrance-card */
.res-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.rec-card {
    position: relative;
    text-align: center;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.rec-add-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    font-size: 18px;
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    color: #1a1a1a;
    z-index: 2;
}
.rec-add-btn:hover { background: #fff; }
.rec-add-btn.added {
    background: #1a1a1a;
    color: #fff;
}
.rec-bulk-add {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}
.rec-bulk-btn {
    padding: 12px 28px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}
.rec-bulk-btn:hover:not(:disabled) { background: #333; }
.rec-bulk-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.rec-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff;
    display: block;
}
.rec-info {
    padding: 10px 8px;
    text-align: center;
}
.rec-name {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.rec-brand {
    font-size: 10px;
    color: var(--text-light);
    margin-bottom: 6px;
}
.rec-match {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--text);
}
.rec-tags {
    font-size: 9px;
    color: var(--text-light);
    margin-top: 4px;
}


/* More combinations grid */
.res-more-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.more-card {
    text-align: center;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}
.more-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.more-card.selected {
    outline: 3px solid var(--accent);
}
.more-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s;
}
.more-card.selected .more-card-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.more-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff;
    display: block;
}
.more-card-info {
    padding: 8px;
}
.more-card-name {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.more-card-brand {
    font-size: 9px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.more-card-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--text);
}

/* Custom set bar */
.custom-set-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    z-index: 10;
}
.custom-set-bar span {
    font-size: 14px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .res-more-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pair block — find your match (light, matches site style) */
.res-pair-block {
    margin: 0 0 32px;
}
.res-pair-inner {
    display: flex;
    gap: 32px;
    align-items: center;
}
.res-pair-visual {
    flex: 0 0 45%;
    border-radius: 8px;
    overflow: hidden;
}
.res-pair-visual img {
    width: 100%;
    display: block;
    border-radius: 8px;
}
.res-pair-content {
    flex: 1;
}
.res-pair-title {
    font-family: 'Jost', sans-serif;
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 14px;
    color: var(--text);
}
.res-pair-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #888;
    margin-bottom: 10px;
}
.res-pair-form {
    display: flex;
    gap: 8px;
    margin: 20px 0 16px;
}
.res-pair-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.res-pair-form input:focus {
    border-color: var(--accent);
}
.res-pair-btn {
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.res-pair-btn:hover {
    background: var(--accent-dark);
}
.res-pair-pricing {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .res-pair-inner { flex-direction: column; }
    .res-pair-visual { flex: none; width: 100%; }
}

/* Dark block — universal dark CTA (discovery set, pair offer) */
.res-dark-block {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 40px 32px;
    margin: 0 0 32px;
    color: #fff;
}
.res-dark-inner {
    display: flex;
    gap: 32px;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}
.res-dark-img {
    flex: 0 0 220px;
}
.res-dark-img img {
    width: 100%;
    border-radius: 8px;
}
.res-dark-info {
    flex: 1;
}
.res-dark-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 4px;
    margin-bottom: 10px;
    color: #fff;
}
.res-dark-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: 20px;
}
.res-dark-bottom {
    display: flex;
    align-items: center;
    gap: 16px;
}
.res-dark-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    letter-spacing: 1px;
}
.res-dark-btn {
    background: #fff;
    color: #1a1a1a;
    border: none;
    padding: 12px 32px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 3px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.res-dark-btn:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

/* Pricing cards inside dark block */
.res-pricing {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}
.res-price-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 20px 28px;
    min-width: 180px;
}
.res-price-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}
.res-price-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.res-price-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* Complementary block */
.res-comp-block {
    margin-bottom: 20px;
}
.res-comp-char {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
    text-align: center;
}
.res-comp-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* Mobile responsive — results */
@media (max-width: 768px) {
    .res-portrait {
        grid-template-columns: 1fr;
    }
    .res-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    .res-dark-inner {
        flex-direction: column !important;
        text-align: center;
    }
    .res-dark-img {
        flex: none;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    .res-dark-bottom {
        justify-content: center;
        flex-wrap: wrap;
    }
    .res-pricing {
        flex-direction: column;
        align-items: center;
    }
    .res-comp-row {
        flex-direction: column;
    }
    .res-heading {
        font-size: 28px;
    }
    .res-about-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .res-box-card {
        flex-direction: column;
    }
    .res-box-carousel {
        flex: none;
        width: 100%;
    }
    .res-box-info {
        padding: 0 20px 20px;
    }
    .accord-duel {
        flex-direction: column;
        width: 80vw;
        max-width: 80vw;
        height: auto;
        margin-left: calc(-40vw + 50%);
    }
    .accord-duel-option {
        width: 100%;
        aspect-ratio: 1 / 1;
    }
}


/* === Floating cart + drawer === */
.quiz-float-cart {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 200;
    width: 128px;
    height: 128px;
    background: transparent;
    color: var(--text);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.quiz-float-cart.visible { display: flex; }
.quiz-float-cart:hover { transform: scale(1.08); }
.quiz-cart-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -10%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e25555;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quiz-cart-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
    display: none; opacity: 0;
    transition: opacity 0.3s;
}
.quiz-cart-overlay.open { display: block; opacity: 1; }
.quiz-cart-drawer {
    position: fixed; top: 0; right: 0;
    width: 400px; max-width: 90vw; height: 100vh;
    background: #fff; z-index: 301;
    display: flex; flex-direction: column;
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.35s ease, visibility 0.35s;
}
.quiz-cart-drawer.open { transform: translateX(0); visibility: visible; }
.qcd-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px; border-bottom: 1px solid var(--border);
}
.qcd-header h3 { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 2px; }
.qcd-close {
    width: 36px; height: 36px; border: none; background: none;
    cursor: pointer; font-size: 24px; color: var(--text-light);
    display: flex; align-items: center; justify-content: center;
}
.qcd-close:hover { color: var(--text); }
.qcd-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.qcd-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0; border-bottom: 1px solid #f0f0f0; gap: 12px;
}
.qcd-item-info { flex: 1; min-width: 0; }
.qcd-item-name { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.qcd-perfumes { margin-top: 4px; }
.qcd-perfume { font-size: 12px; color: var(--text-light); line-height: 1.6; }
.qcd-item-qty { font-size: 13px; color: var(--text-light); }
.qcd-item-price { font-family: 'Bebas Neue', sans-serif; font-size: 18px; }
.qcd-empty { text-align: center; padding: 40px 0; color: var(--text-light); font-size: 14px; }
.qcd-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.qcd-total {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; font-size: 15px;
}
.qcd-total span:last-child { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 1px; }
.qcd-checkout {
    width: 100%; padding: 14px; background: var(--accent); color: #fff; border: none;
    font-family: 'Bebas Neue', sans-serif; font-size: 16px; letter-spacing: 3px;
    border-radius: 4px; cursor: pointer; transition: background 0.2s;
}
.qcd-checkout:hover { background: var(--accent-dark); }

@media (max-width: 480px) {
    .quiz-float-cart { bottom: 20px; right: 20px; width: 100px; height: 100px; }
}

/* === Loading === */
.loading {
    position: fixed;
    inset: 0;
    background: rgba(250,248,245,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.loading.hidden { display: none; }
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p {
    font-size: 14px;
    color: var(--text-light);
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 16px 20px;
    font-size: 11px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}
.footer-brand {
    display: inline-flex;
    align-items: center;
}
.footer-logo-img {
    width: 100px;
    height: auto;
}
.footer-sep {
    margin: 0 8px;
    color: var(--border);
}
.footer a {
    color: var(--text-light);
    text-decoration: none;
}
.footer a:hover {
    color: var(--text);
}

/* === Mobile responsive === */
@media (max-width: 480px) {
    .quiz-nav { padding: 12px 16px; }
    .quiz-nav-links { display: none; }
    .step-content {
        max-width: 100%;
    }
    .profile-row {
        flex-direction: column;
    }
    .accord-chart {
        min-width: 0;
    }
    .rec-grid {
        grid-template-columns: 1fr;
    }
}
