* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --brand-900: #0f2a43;
    --brand-800: #183a5a;
    --brand-700: #21527a;
    --surface-0: #ffffff;
    --surface-100: #f8fafc;
    --surface-200: #eef3f8;
    --border-soft: #d7e1ec;
    --text-strong: #122033;
    --text-muted: #4f6276;
    --focus-ring: rgba(33, 82, 122, 0.22);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 5% -10%, #dbe7f4 0%, transparent 38%),
        radial-gradient(circle at 100% 0%, #e8edf5 0%, transparent 32%),
        linear-gradient(180deg, #f2f6fb 0%, #e7edf4 100%);
    color: var(--text-strong);
    min-height: 100vh;
    padding: 24px;
}

.page-shell {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
}

.left-toolbar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    transition: padding 0.2s ease, font-size 0.2s ease;
}

.header-nav {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
    max-width: none;
    overflow-x: visible;
}

.header-nav,
.top-links,
.access-session-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-nav .tools-dropdown {
    position: relative;
}

.header-nav .tools-menu-panel {
    text-align: left;
}

.header-nav .tool-link,
.header-nav .top-link,
.header-nav .tools-menu-btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.header-nav .access-session-wrap {
    margin-left: 0;
    flex-wrap: nowrap;
}

body.home-page header .header-nav {
    justify-content: center;
}

.tools-dropdown {
    position: relative;
}

.tools-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 280px;
    display: grid;
    gap: 6px;
    background: var(--surface-0);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(9, 21, 36, 0.14);
    padding: 10px;
    z-index: 60;
}

.tools-menu-panel.hidden {
    display: none;
}

.tools-menu-panel .tool-link {
    width: 100%;
}

body.landing-page .left-toolbar.compact {
    padding: 8px 10px;
    gap: 6px;
}

body.landing-page .left-toolbar.compact .tool-link {
    padding: 6px 10px;
    font-size: 0.9rem;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .page-shell {
    max-width: 1240px;
    padding-left: 70px;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar {
    position: fixed;
    left: 10px;
    top: 84px;
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 3px;
    z-index: 50;
    max-height: calc(100vh - 100px);
    overflow: visible;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .tools-dropdown {
    width: auto;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .tool-link,
:is(body.landing-page, body.ui-manager-page).menu-docked-left .tools-menu-btn {
    width: 40px;
    min-height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    letter-spacing: 0;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > a.tool-link[href="index.html"],
:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > .tools-dropdown > .tools-menu-btn {
    position: relative;
    overflow: hidden;
    text-indent: -9999px;
    white-space: nowrap;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > a.tool-link[href="index.html"]::before,
:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > .tools-dropdown > .tools-menu-btn::before {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    line-height: 1;
    color: #1f2937;
    text-indent: 0;
    white-space: normal;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > a.tool-link.active[href="index.html"]::before,
:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > .tools-dropdown > .tools-menu-btn.active::before {
    color: #ffffff;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > a.tool-link[href="index.html"]::before {
    content: '⌂';
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > .tools-dropdown > .tools-menu-btn::before {
    content: '☰';
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .tools-menu-panel {
    position: absolute;
    left: calc(100% + 10px);
    top: 0;
    margin-top: 0;
    min-width: 260px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .tools-menu-panel .tool-link {
    writing-mode: initial;
    transform: none;
    width: 100%;
    min-height: auto;
    padding: 8px 12px;
    display: block;
    letter-spacing: normal;
    font-size: 0.9rem;
}
:is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar > .tools-dropdown > .tools-menu-btn::before {
    content: '☰';
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .tools-menu-panel {
    position: absolute;
    left: calc(100% + 10px);
    top: 0;
    margin-top: 0;
    min-width: 260px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .tools-menu-panel .tool-link {
    writing-mode: initial;
    transform: none;
    width: 100%;
    min-height: auto;
    padding: 8px 12px;
    display: block;
    letter-spacing: normal;
    font-size: 0.9rem;
}

.tool-link:hover {
    border-color: #7f97b3;
    background: #edf4fb;
}

.tool-link,
.top-link,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    line-height: 1.2;
}

.tool-link {
    text-decoration: none;
    color: var(--text-strong);
    border: 1px solid var(--border-soft);
    background: var(--surface-100);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tool-link.active {
    background: linear-gradient(120deg, var(--brand-800) 0%, var(--brand-700) 100%);
    border-color: transparent;
    color: #ffffff;
}

.access-session-wrap {
    margin-left: 0;
}

.access-session-label {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
}

:is(body.landing-page, body.ui-manager-page).menu-docked-left .access-session-wrap {
    display: none;
}

.auth-card {
    max-width: 720px;
}

.container {
    max-width: 100%;
    width: 100%;
    background: var(--surface-0);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(12, 22, 35, 0.12);
}

header {
    background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
    color: #ffffff;
    padding: 30px 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

header h1 {
    font-size: 2.05rem;
    letter-spacing: 0.01em;
    margin-bottom: 0;
    text-align: center;
}

header p {
    margin-top: 0;
    color: rgba(232, 241, 250, 0.95);
    max-width: 860px;
}

.deploy-version-badge {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(214, 231, 247, 0.45);
    background: rgba(8, 24, 40, 0.28);
    color: rgba(236, 244, 252, 0.95);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.top-links {
    margin-top: 0;
}

.tools-menu {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tools-menu-title {
    font-weight: 700;
    margin-right: 4px;
}

.top-link {
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(216, 231, 246, 0.48);
    background: rgba(7, 20, 35, 0.18);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.top-link:hover {
    background: rgba(8, 24, 40, 0.34);
    border-color: rgba(223, 237, 250, 0.72);
    transform: translateY(-1px);
}

.tools-menu-panel .tool-link {
    border-radius: 10px;
    padding: 10px 12px;
    border-color: transparent;
    background: transparent;
    justify-content: flex-start;
    font-weight: 600;
}

.tools-menu-panel .tool-link:hover,
.tools-menu-panel .tool-link.active {
    border-color: var(--border-soft);
    background: #eef4fb;
    color: #10233a;
}

.tools-menu-btn[aria-expanded='true'] {
    background: rgba(8, 24, 40, 0.34);
    border-color: rgba(223, 237, 250, 0.72);
}

.tool-link:focus-visible,
.top-link:focus-visible,
.btn:focus-visible,
.tools-menu-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.quiz-wrapper {
    padding: 24px;
}

.model-row {
    margin-bottom: 14px;
}

.model-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.model-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 0.95rem;
}

.input-helper {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.image-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #fafafa;
    margin-bottom: 18px;
}

.image-card h2 {
    margin-bottom: 6px;
    color: #111827;
}

.image-subtitle {
    color: #4b5563;
    margin-bottom: 12px;
}

.image-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.image-input {
    flex: 1;
    min-width: 240px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
}

.image-source-select {
    min-width: 220px;
    flex: 0 0 240px;
}

.image-progress-section {
    margin-top: 12px;
}

.image-progress-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 8px;
}

.image-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
}

.image-progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #5927a8 0%, #8b4de5 100%);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.image-result {
    margin-top: 14px;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

.image-results-container {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.image-result-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.stage-one-summary {
    border-color: #c4b5fd;
    background: #f5f3ff;
}

.stage-one-summary h3 {
    margin-bottom: 6px;
    color: #4c1d95;
}

.stage-one-subtitle {
    color: #5b4b85;
    margin-bottom: 8px;
}

.image-preview-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.image-preview-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.image-preview-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.image-preview {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
}

.image-result h3 {
    margin-bottom: 8px;
}

.image-info-list {
    margin-left: 18px;
    display: grid;
    gap: 6px;
}

.progress-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4b5563;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    margin-bottom: 24px;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #5927a8 0%, #8b4de5 100%);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.quiz-card,
.result-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
}

.quiz-card h2,
.result-card h2 {
    margin-bottom: 16px;
    color: #111827;
}

.options-container {
    display: grid;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.option-item:hover {
    border-color: #7c3aed;
    background: #f7f2ff;
}

.option-item input {
    accent-color: #7c3aed;
}

.actions {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    gap: 10px;
}

.profile-role-actions {
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
}

.profile-role-actions .role-select {
    min-width: 170px;
    margin-bottom: 0;
}

.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-image {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 8px;
}

.btn {
    border: 1px solid transparent;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.primary {
    background: linear-gradient(135deg, #5927a8 0%, #8b4de5 100%);
    color: #fff;
}

.btn.secondary {
    background: #e5e7eb;
    color: #111827;
}

.result-main {
    margin-bottom: 16px;
}

.result-main h3 {
    margin-bottom: 8px;
}

.match-score {
    margin-top: 10px;
    font-weight: 700;
    color: #4c1d95;
}

.result-meta {
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.95rem;
}

.why-list,
.alternatives-list {
    margin: 8px 0 16px 20px;
}

.why-list li,
.alternatives-list li {
    margin-bottom: 6px;
}

.status-message {
    margin-top: 14px;
    min-height: 20px;
    font-weight: 600;
}

.status-message.info {
    color: #1d4ed8;
}

.status-message.success {
    color: #15803d;
}

.status-message.warning {
    color: #b45309;
}

.status-message.error {
    color: #b91c1c;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.hidden {
    display: none !important;
}

body.image-tool .progress-row,
body.image-tool .progress-bar,
body.image-tool #quizCard,
body.image-tool #resultCard {
    display: none !important;
}

.results-count {
    font-weight: 600;
    color: #4b5563;
}

.saved-results-grid {
    display: grid;
    gap: 14px;
}

.ui-manager-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    background: #fafafa;
    margin-bottom: 14px;
}

.ui-manager-card h2 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 1.08rem;
}

.ui-manager-toggle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ui-manager-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ui-manager-row.is-dragging {
    opacity: 0.6;
}

.ui-manager-handle {
    width: 28px;
    height: 42px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #6b7280;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
}

.ui-manager-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px 12px;
    font-weight: 600;
    color: #374151;
    flex: 1;
}

.ui-manager-toggle input {
    accent-color: #7c3aed;
}

.perfumes-modules {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.perfumes-module {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    background: #fafafa;
}

.perfumes-module-header {
    margin-bottom: 10px;
}

.perfumes-module-header h3 {
    font-size: 1rem;
    color: #1f2937;
}

.perfumes-module-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.perfumes-stat-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perfumes-stat-label {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
}

.perfumes-stat-card strong {
    color: #111827;
    font-size: 1.2rem;
}

.perfumes-note-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.perfumes-note-chip {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 10px;
}

.perfumes-note-chip-empty {
    color: #6b7280;
}

.landing-hero-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f5ff 0%, #ffffff 100%);
    margin-bottom: 18px;
}

.landing-hero-card h2 {
    margin-bottom: 8px;
    color: #1f2937;
}

.landing-hero-card p {
    color: #4b5563;
    margin-bottom: 14px;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.landing-vibes {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.landing-vibes-title {
    font-weight: 700;
    color: #374151;
    margin-right: 4px;
}

.landing-vibe-chip {
    text-decoration: none;
    border: 1px solid #d1d5db;
    color: #374151;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.86rem;
    font-weight: 600;
}

.landing-vibe-chip:hover {
    border-color: #7c3aed;
    color: #5b21b6;
    background: #f5f3ff;
}

.landing-modules-toolbar h3 {
    font-size: 1.05rem;
    color: #1f2937;
}

.landing-modules {
    display: grid;
    gap: 14px;
}

.landing-module {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
}

.landing-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
}

.landing-module-header h3 {
    color: #1f2937;
    font-size: 1.04rem;
}

.landing-module-link {
    text-decoration: none;
    font-weight: 700;
    color: #5b21b6;
    font-size: 0.9rem;
}

.landing-module-link:hover {
    text-decoration: underline;
}

.trust-strip-module {
    background: linear-gradient(135deg, #f8f5ff 0%, #ffffff 100%);
}

.trust-strip-module h3 {
    margin-bottom: 10px;
    color: #1f2937;
}

.trust-strip-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trust-chip {
    border: 1px solid #ddd6fe;
    background: #f5f3ff;
    color: #4c1d95;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 6px 10px;
}

.landing-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.landing-guide-card {
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    padding: 12px;
    color: inherit;
}

.landing-guide-card:hover {
    border-color: #7c3aed;
    background: #f7f2ff;
}

.landing-guide-card h4 {
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 0.96rem;
}

.landing-guide-card p {
    color: #4b5563;
    font-size: 0.88rem;
    line-height: 1.35;
}

.landing-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.landing-carousel {
    position: relative;
}

.landing-carousel-btn {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    padding: 0;
    font-size: 0;
    color: transparent;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.14);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.landing-carousel-btn::before {
    content: '';
    width: 10px;
    height: 10px;
    display: inline-block;
    border-right: 2px solid #374151;
    border-bottom: 2px solid #374151;
}

.landing-carousel-btn-prev::before {
    transform: rotate(135deg);
    margin-left: 3px;
}

.landing-carousel-btn-next::before {
    transform: rotate(-45deg);
    margin-right: 3px;
}

.landing-carousel-btn:hover {
    border-color: #c4b5fd;
    box-shadow: 0 10px 24px rgba(109, 40, 217, 0.2);
}

.landing-carousel-btn:active {
    transform: translateY(-50%) scale(0.97);
}

.landing-carousel-btn-prev {
    left: 10px;
}

.landing-carousel-btn-next {
    right: 10px;
}

.landing-carousel-viewport {
    overflow: hidden;
    border-radius: 12px;
    touch-action: pan-y;
    user-select: none;
}

.landing-carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease;
}

.landing-carousel-slide {
    min-width: 100%;
    flex: 0 0 100%;
}

.landing-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.landing-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: #d1d5db;
    cursor: pointer;
}

.landing-carousel-dot.active {
    background: #6d28d9;
}

.landing-carousel-module {
    margin-left: -24px;
    margin-right: -24px;
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding-left: 24px;
    padding-right: 24px;
}

.landing-product-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.landing-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.landing-product-link:hover .landing-product-card {
    border-color: #c4b5fd;
    box-shadow: 0 8px 24px rgba(91, 45, 144, 0.14);
}

.landing-product-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.landing-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 600;
}

.landing-product-body {
    padding: 10px;
    display: grid;
    gap: 5px;
}

.landing-product-body h4 {
    color: #111827;
    font-size: 0.98rem;
}

.landing-product-brand {
    color: #6b7280;
    font-size: 0.88rem;
    font-weight: 600;
}

.landing-product-meta {
    color: #5b21b6;
    font-size: 0.82rem;
    font-weight: 600;
}

.landing-product-description {
    color: #374151;
    font-size: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.landing-empty {
    color: #6b7280;
    font-weight: 600;
}

.saved-result-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #fafafa;
}

.saved-result-section.focused-perfume {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.saved-result-section h2 {
    font-size: 1.15rem;
    margin-bottom: 4px;
    color: #111827;
}

.saved-result-subtitle {
    color: #4b5563;
    margin-bottom: 12px;
}

.saved-result-preview-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.saved-result-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.saved-placeholder {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    background: #ffffff;
}

.notes-chart-section {
    margin-top: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.notes-chart-section h4 {
    margin-bottom: 10px;
    color: #374151;
}

.notes-chart-empty {
    color: #6b7280;
    font-size: 0.95rem;
}

.notes-bar-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.notes-bar-label {
    font-weight: 600;
    color: #374151;
    text-transform: capitalize;
}

.notes-bar-track {
    width: 100%;
    height: 20px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.notes-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #5927a8 0%, #8b4de5 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    white-space: nowrap;
}

.note-blocks-section {
    margin-top: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.note-blocks-section h4 {
    margin-bottom: 10px;
    color: #374151;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.note-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
}

.note-image {
    width: 100%;
    max-width: 110px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
}

.note-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    text-transform: capitalize;
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .page-shell {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .left-toolbar {
        position: static;
    }

    .quiz-wrapper {
        padding: 16px;
    }

    .actions {
        flex-direction: column;
    }

    .result-actions {
        flex-direction: column;
    }

    .image-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .image-preview-wrap {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }

    .results-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .saved-result-preview-wrap {
        grid-template-columns: 1fr;
    }

    .landing-carousel-module {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .landing-carousel-btn {
        width: 100%;
        border-radius: 10px;
        position: static;
        transform: none;
        margin-top: 8px;
    }

    .landing-carousel-btn:active {
        transform: scale(0.98);
    }

    .landing-carousel-btn-prev,
    .landing-carousel-btn-next {
        left: auto;
        right: auto;
    }

    .notes-bar-row {
        grid-template-columns: 1fr;
    }

    header {
        padding: 22px 16px 18px;
        text-align: left;
        align-items: flex-start;
    }

    header h1 {
        font-size: 1.45rem;
    }

    header p {
        font-size: 0.95rem;
    }

    .header-nav,
    .top-links {
        width: 100%;
        justify-content: flex-start;
    }

    .tools-menu-panel {
        min-width: 220px;
        max-width: min(90vw, 300px);
    }

    .tools-menu {
        flex-direction: column;
    }
}

@media (max-width: 1099px) {
    :is(body.landing-page, body.ui-manager-page).menu-docked-left .page-shell {
        padding-left: 0;
    }

    :is(body.landing-page, body.ui-manager-page).menu-docked-left .left-toolbar {
        position: sticky;
        left: auto;
        top: 10px;
        width: auto;
        max-height: none;
        overflow: visible;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 12px 14px;
    }

    :is(body.landing-page, body.ui-manager-page).menu-docked-left .tools-menu-panel {
        position: absolute;
        margin-top: 0;
        min-width: 250px;
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
    }
}
