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

:root {
    color-scheme: light;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    --font-display: Georgia, "Times New Roman", "Noto Serif SC", serif;
    --bg: #f6efe3;
    --bg-deep: #0c0c0b;
    --surface: rgba(255, 250, 240, 0.92);
    --surface-solid: #fff8ec;
    --surface-muted: #efe2ce;
    --ink: #1b1712;
    --muted: #6f6356;
    --line: rgba(117, 82, 36, 0.28);
    --line-strong: rgba(199, 155, 85, 0.62);
    --gold: #c79b55;
    --ruby: #8f1717;
    --emerald: #0f4c3a;
    --cobalt: #112f59;
    --shadow: 0 24px 60px rgba(27, 23, 18, 0.16);
    --soft-shadow: 0 12px 30px rgba(27, 23, 18, 0.09);
    --radius: 8px;
    --hero-image: url("/资源/visuals/luxury-atlas-hero.webp");
    --focus-ring: rgba(199, 155, 85, 0.24);
    --focus-ring-inner: rgba(255, 250, 240, 0.9);
    --scrollbar-track: rgba(117, 82, 36, 0.12);
    --scrollbar-thumb: rgba(117, 82, 36, 0.42);
    --scrollbar-thumb-hover: rgba(117, 82, 36, 0.58);
}

:root[data-theme="theme-black-salon"] {
    color-scheme: dark;
    --bg: #0b0808;
    --bg-deep: #050404;
    --surface: rgba(20, 16, 16, 0.9);
    --surface-solid: #141010;
    --surface-muted: #211717;
    --ink: #f7ebdc;
    --muted: #c8b8a6;
    --line: rgba(209, 166, 94, 0.32);
    --line-strong: rgba(209, 166, 94, 0.68);
    --gold: #d1a65e;
    --ruby: #b22b2b;
    --emerald: #1f6d55;
    --cobalt: #223b63;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    --radius: 6px;
    --focus-ring: rgba(209, 166, 94, 0.28);
    --focus-ring-inner: rgba(20, 16, 16, 0.9);
    --scrollbar-track: rgba(255, 248, 232, 0.06);
    --scrollbar-thumb: rgba(209, 166, 94, 0.42);
    --scrollbar-thumb-hover: rgba(209, 166, 94, 0.62);
}

:root[data-theme="theme-silk-gift"] {
    --bg: #fff3df;
    --bg-deep: #190f0b;
    --surface: rgba(255, 248, 232, 0.94);
    --surface-solid: #fff7e8;
    --surface-muted: #f3ddbd;
    --ink: #23160f;
    --muted: #7b5c44;
    --line: rgba(175, 91, 42, 0.28);
    --line-strong: rgba(194, 119, 52, 0.7);
    --gold: #c27734;
    --ruby: #b12b24;
    --emerald: #0f5a45;
    --cobalt: #12315d;
    --radius: 8px;
    --focus-ring: rgba(177, 43, 36, 0.22);
    --focus-ring-inner: rgba(255, 247, 232, 0.9);
    --scrollbar-track: rgba(177, 43, 36, 0.09);
    --scrollbar-thumb: rgba(194, 119, 52, 0.45);
    --scrollbar-thumb-hover: rgba(177, 43, 36, 0.58);
}

:root[data-theme="theme-modern-atelier"] {
    --bg: #eee9df;
    --bg-deep: #111214;
    --surface: rgba(250, 247, 240, 0.9);
    --surface-solid: #fbf8f0;
    --surface-muted: #e4ded2;
    --ink: #151719;
    --muted: #62605c;
    --line: rgba(35, 35, 35, 0.18);
    --line-strong: rgba(150, 117, 69, 0.54);
    --gold: #b58a4a;
    --ruby: #7d1f24;
    --emerald: #255345;
    --cobalt: #1f4268;
    --radius: 2px;
    --focus-ring: rgba(35, 35, 35, 0.14);
    --focus-ring-inner: rgba(251, 248, 240, 0.92);
    --scrollbar-track: rgba(35, 35, 35, 0.08);
    --scrollbar-thumb: rgba(35, 35, 35, 0.28);
    --scrollbar-thumb-hover: rgba(35, 35, 35, 0.42);
}

:root[data-theme="theme-classic-atlas"] {
    --bg: #f4ead8;
    --bg-deep: #091224;
    --surface: rgba(255, 250, 239, 0.94);
    --surface-solid: #fff9ec;
    --surface-muted: #e9dcc8;
    --ink: #1f1b16;
    --muted: #6e6257;
    --line: rgba(29, 63, 104, 0.2);
    --line-strong: rgba(29, 63, 104, 0.52);
    --gold: #b8904c;
    --ruby: #8b2420;
    --emerald: #145642;
    --cobalt: #123b69;
    --radius: 4px;
    --focus-ring: rgba(18, 59, 105, 0.18);
    --focus-ring-inner: rgba(255, 249, 236, 0.94);
    --scrollbar-track: rgba(18, 59, 105, 0.08);
    --scrollbar-thumb: rgba(18, 59, 105, 0.36);
    --scrollbar-thumb-hover: rgba(18, 59, 105, 0.52);
}

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.5;
    background:
        radial-gradient(circle at 12% 8%, rgba(199, 155, 85, 0.16), transparent 24rem),
        linear-gradient(135deg, var(--bg) 0%, var(--surface-muted) 100%);
}

body[data-theme="theme-black-salon"] {
    background:
        linear-gradient(90deg, rgba(209, 166, 94, 0.08) 0 1px, transparent 1px 96px),
        linear-gradient(180deg, #080505 0%, #120c0c 52%, #070505 100%);
}

body[data-theme="theme-silk-gift"] {
    background:
        repeating-linear-gradient(135deg, rgba(177, 43, 36, 0.05) 0 1px, transparent 1px 20px),
        linear-gradient(135deg, #fff3df 0%, #f6dfb8 48%, #fff7e8 100%);
}

body[data-theme="theme-modern-atelier"] {
    background:
        linear-gradient(90deg, rgba(17, 18, 20, 0.05) 0 1px, transparent 1px 88px),
        linear-gradient(135deg, #f2eee5 0%, #ded8cc 100%);
}

body[data-theme="theme-classic-atlas"] {
    background:
        linear-gradient(90deg, rgba(18, 59, 105, 0.06) 0 1px, transparent 1px 72px),
        linear-gradient(180deg, #f6ead6 0%, #dfe7ed 100%);
}

button,
input,
select {
    font: inherit;
}

select {
    color-scheme: light;
}

button,
a,
select,
input {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 2px var(--focus-ring-inner),
        0 0 0 5px var(--focus-ring);
}

.nav-menu,
.main-container,
.mobile-tool-drawer-panel,
.mobile-tool-drawer-list,
.mobile-settings-panel,
.mobile-settings-options {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.nav-menu::-webkit-scrollbar,
.main-container::-webkit-scrollbar,
.mobile-tool-drawer-panel::-webkit-scrollbar,
.mobile-tool-drawer-list::-webkit-scrollbar,
.mobile-settings-panel::-webkit-scrollbar,
.mobile-settings-options::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.nav-menu::-webkit-scrollbar-track,
.main-container::-webkit-scrollbar-track,
.mobile-tool-drawer-panel::-webkit-scrollbar-track,
.mobile-tool-drawer-list::-webkit-scrollbar-track,
.mobile-settings-panel::-webkit-scrollbar-track,
.mobile-settings-options::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

.nav-menu::-webkit-scrollbar-thumb,
.main-container::-webkit-scrollbar-thumb,
.mobile-tool-drawer-panel::-webkit-scrollbar-thumb,
.mobile-tool-drawer-list::-webkit-scrollbar-thumb,
.mobile-settings-panel::-webkit-scrollbar-thumb,
.mobile-settings-options::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    background-clip: padding-box;
    border: 2px solid transparent;
    border-radius: 999px;
}

.nav-menu::-webkit-scrollbar-thumb:hover,
.main-container::-webkit-scrollbar-thumb:hover,
.mobile-tool-drawer-panel::-webkit-scrollbar-thumb:hover,
.mobile-tool-drawer-list::-webkit-scrollbar-thumb:hover,
.mobile-settings-panel::-webkit-scrollbar-thumb:hover,
.mobile-settings-options::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.mobile-bottom-nav {
    display: none;
}

.mobile-tool-drawer {
    display: none;
}

.mobile-settings-sheet {
    display: none;
}

.sidebar {
    width: 286px;
    height: 100vh;
    position: fixed;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(255, 250, 240, 0.82)),
        var(--surface-solid);
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 30px rgba(27, 23, 18, 0.08);
    backdrop-filter: blur(18px);
}

[data-theme="theme-black-salon"] .sidebar {
    background: linear-gradient(180deg, rgba(20, 16, 16, 0.98), rgba(15, 10, 10, 0.94));
}

.logo-container {
    min-height: 90px;
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.logo {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0;
}

.logo::after {
    content: "TOOLBOX";
    display: block;
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.sidebar-controls {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.language-toggle,
.theme-picker select {
    min-height: 40px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.language-toggle {
    cursor: pointer;
    font-weight: 800;
}

.theme-picker {
    display: grid;
    gap: 0.25rem;
}

.theme-picker span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.theme-picker select {
    width: 100%;
    padding: 0 0.65rem;
}

.theme-picker select option,
.mobile-settings-theme select option {
    color: var(--ink);
    background: var(--surface-solid);
}

.nav-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-group-title {
    padding: 0 1.25rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: 0.15rem 0.75rem;
}

.nav-link {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    min-height: 58px;
    padding: 0.75rem;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-item.active .nav-link {
    background: rgba(199, 155, 85, 0.12);
    border-color: var(--line);
    transform: translateX(2px);
}

.nav-icon,
.home-tool-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--surface-solid);
    background: var(--cobalt);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-weight: 800;
}

.nav-icon-ruby {
    background: var(--ruby);
}

.nav-icon-emerald {
    background: var(--emerald);
}

.nav-icon-cobalt {
    background: var(--cobalt);
}

.nav-link-body {
    min-width: 0;
}

.nav-link-body span,
.nav-link-body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link-body span {
    font-weight: 800;
}

.nav-link-body small {
    color: var(--muted);
    font-size: 0.78rem;
}

.status-badge,
.home-tool-status {
    padding: 0.22rem 0.45rem;
    color: var(--emerald);
    background: rgba(15, 76, 58, 0.12);
    border: 1px solid rgba(15, 76, 58, 0.18);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

.main-container {
    flex: 1;
    min-width: 0;
    margin-left: 286px;
    padding: 1.35rem;
}

.tool-content[hidden] {
    display: none !important;
}

.tool-content {
    animation: fadeIn 0.28s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
    gap: 1.5rem;
    min-height: min(620px, calc(100vh - 2.7rem));
    overflow: hidden;
    padding: clamp(1.4rem, 4vw, 4rem);
    color: #211811;
    background:
        linear-gradient(90deg, rgba(255, 249, 236, 0.94) 0%, rgba(255, 249, 236, 0.76) 42%, rgba(9, 18, 36, 0.16) 100%),
        var(--hero-image) center / cover no-repeat;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-hero > * {
    position: relative;
    z-index: 1;
}

[data-theme="theme-black-salon"] .home-hero {
    color: #f7ebdc;
    background:
        linear-gradient(90deg, rgba(8, 6, 6, 0.9) 0%, rgba(12, 8, 8, 0.74) 42%, rgba(9, 18, 36, 0.16) 100%),
        var(--hero-image) center / cover no-repeat;
}

[data-theme="theme-silk-gift"] .home-hero {
    background:
        linear-gradient(90deg, rgba(255, 244, 220, 0.95) 0%, rgba(255, 239, 207, 0.74) 46%, rgba(177, 43, 36, 0.08) 100%),
        var(--hero-image) 62% center / cover no-repeat;
    border-color: rgba(194, 119, 52, 0.72);
    box-shadow: inset 0 0 0 4px rgba(255, 248, 232, 0.68), 0 28px 70px rgba(141, 64, 30, 0.18);
}

[data-theme="theme-silk-gift"] .home-hero::before {
    content: "";
    position: absolute;
    inset: 0.8rem;
    border: 1px solid rgba(177, 43, 36, 0.24);
    pointer-events: none;
}

[data-theme="theme-modern-atelier"] .home-hero {
    color: #151719;
    background:
        linear-gradient(135deg, rgba(251, 248, 240, 0.96), rgba(232, 226, 214, 0.88)),
        var(--hero-image) right center / cover no-repeat;
    border-color: rgba(35, 35, 35, 0.22);
    box-shadow: 0 18px 45px rgba(17, 18, 20, 0.12);
}

[data-theme="theme-classic-atlas"] .home-hero {
    background:
        linear-gradient(90deg, rgba(255, 249, 236, 0.95) 0%, rgba(255, 249, 236, 0.78) 42%, rgba(18, 59, 105, 0.14) 100%),
        var(--hero-image) center / cover no-repeat;
    border-color: rgba(18, 59, 105, 0.45);
}

[data-theme="theme-classic-atlas"] .home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 23%, rgba(18, 59, 105, 0.08) 23% 23.35%, transparent 23.35% 100%),
        linear-gradient(0deg, transparent 0 52%, rgba(18, 59, 105, 0.06) 52% 52.25%, transparent 52.25% 100%);
    pointer-events: none;
}

.home-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    min-width: 0;
}

.home-eyebrow,
.tool-eyebrow,
.love-eyebrow,
.tool-insight-eyebrow {
    color: var(--ruby);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-title {
    max-width: 720px;
    margin: 0.75rem 0 1rem;
    font-family: var(--font-display);
    font-size: clamp(2.35rem, 6.4vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.home-subtitle {
    max-width: 640px;
    color: currentColor;
    font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.home-hero-actions,
.tool-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.primary-action,
.secondary-action,
.download-btn,
.reset-btn,
.love-primary-btn,
.love-secondary-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-action,
.download-btn,
.love-primary-btn {
    color: #fff8ec;
    background: var(--ruby);
    box-shadow: 0 12px 28px rgba(143, 23, 23, 0.22);
}

.secondary-action,
.reset-btn,
.love-secondary-btn {
    color: var(--ink);
    background: var(--surface);
}

.primary-action:hover,
.secondary-action:hover,
.download-btn:hover,
.reset-btn:hover,
.love-primary-btn:hover,
.love-secondary-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--soft-shadow);
}

.download-btn:disabled,
.reset-btn:disabled,
.love-primary-btn:disabled,
.love-secondary-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-btn:disabled:hover,
.reset-btn:disabled:hover,
.love-primary-btn:disabled:hover,
.love-secondary-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 640px;
    margin-top: 2rem;
}

.home-stats span,
.hero-panel-header,
.hero-mini-tool,
.home-tool-card,
.scenario-card,
.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.home-stats span {
    min-height: 86px;
    padding: 0.85rem;
}

.home-stats strong,
.home-stats small {
    display: block;
}

.home-stats strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.home-stats small {
    color: var(--muted);
    font-weight: 800;
}

.home-hero-panel {
    align-self: end;
    display: grid;
    gap: 0.8rem;
}

.hero-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
}

.hero-panel-tools {
    display: grid;
    gap: 0.75rem;
}

.hero-mini-tool {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    min-height: 88px;
    padding: 1rem;
    color: var(--ink);
    text-decoration: none;
}

.hero-mini-tool strong,
.hero-mini-tool small {
    display: block;
}

.hero-mini-tool small {
    color: var(--muted);
    font-size: 0.88rem;
}

.home-scenarios,
.home-featured,
.home-overview {
    max-width: 1220px;
    margin: 1.25rem auto 0;
}

.section-heading,
.home-overview-top {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading p,
.home-overview-top p {
    color: var(--muted);
    font-weight: 700;
}

.section-heading h3,
.home-overview-top h3 {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.featured-tool-grid,
.home-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.home-tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.home-scenario-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.home-scenario-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.8rem;
    min-height: 156px;
    padding: 1rem;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.home-scenario-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--surface-solid);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-weight: 800;
}

.home-scenario-card strong,
.home-scenario-card small,
.home-scenario-card em {
    display: block;
}

.home-scenario-card strong {
    font-family: var(--font-display);
    font-size: 1.08rem;
    line-height: 1.15;
}

.home-scenario-card small {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.home-scenario-card em {
    margin-top: 0.85rem;
    color: var(--ruby);
    font-size: 0.86rem;
    font-style: normal;
    font-weight: 900;
}

.home-tool-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 1rem;
    min-height: 178px;
    padding: 1rem;
    color: var(--ink);
    text-decoration: none;
}

.home-tool-card.is-featured {
    min-height: 210px;
    background:
        linear-gradient(135deg, rgba(199, 155, 85, 0.14), transparent 44%),
        var(--surface);
}

[data-theme="theme-black-salon"] .home-stats span,
[data-theme="theme-black-salon"] .hero-panel-header,
[data-theme="theme-black-salon"] .hero-mini-tool,
[data-theme="theme-black-salon"] .home-scenario-card,
[data-theme="theme-black-salon"] .home-tool-card,
[data-theme="theme-black-salon"] .content-area {
    background:
        linear-gradient(145deg, rgba(209, 166, 94, 0.08), transparent 38%),
        rgba(18, 12, 12, 0.88);
    border-color: rgba(209, 166, 94, 0.34);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

[data-theme="theme-black-salon"] .home-tool-card.is-featured {
    background:
        linear-gradient(135deg, rgba(178, 43, 43, 0.18), transparent 42%),
        rgba(18, 12, 12, 0.9);
}

[data-theme="theme-black-salon"] .hero-mini-tool {
    min-height: 104px;
}

[data-theme="theme-silk-gift"] .home-stats span,
[data-theme="theme-silk-gift"] .hero-panel-header,
[data-theme="theme-silk-gift"] .hero-mini-tool,
[data-theme="theme-silk-gift"] .home-scenario-card,
[data-theme="theme-silk-gift"] .home-tool-card,
[data-theme="theme-silk-gift"] .content-area {
    background:
        linear-gradient(135deg, rgba(255, 247, 232, 0.98), rgba(255, 238, 204, 0.84)),
        var(--surface);
    border-color: rgba(194, 119, 52, 0.42);
    box-shadow: 0 16px 36px rgba(141, 64, 30, 0.12);
}

[data-theme="theme-silk-gift"] .home-scenario-card,
[data-theme="theme-silk-gift"] .home-tool-card {
    border-style: double;
    border-width: 3px;
}

[data-theme="theme-silk-gift"] .home-tool-meta,
[data-theme="theme-silk-gift"] .home-eyebrow,
[data-theme="theme-silk-gift"] .tool-eyebrow,
[data-theme="theme-silk-gift"] .love-eyebrow {
    color: #b12b24;
}

[data-theme="theme-modern-atelier"] .home-title,
[data-theme="theme-modern-atelier"] .page-title,
[data-theme="theme-modern-atelier"] .section-heading h3,
[data-theme="theme-modern-atelier"] .home-overview-top h3,
[data-theme="theme-modern-atelier"] .home-tool-title {
    font-family: var(--font-sans);
    font-weight: 900;
}

[data-theme="theme-modern-atelier"] .home-stats span,
[data-theme="theme-modern-atelier"] .hero-panel-header,
[data-theme="theme-modern-atelier"] .hero-mini-tool,
[data-theme="theme-modern-atelier"] .home-scenario-card,
[data-theme="theme-modern-atelier"] .home-tool-card,
[data-theme="theme-modern-atelier"] .content-area {
    background: rgba(251, 248, 240, 0.82);
    border-color: rgba(35, 35, 35, 0.16);
    box-shadow: none;
}

[data-theme="theme-modern-atelier"] .home-tool-card.is-featured {
    min-height: 188px;
    background:
        linear-gradient(90deg, rgba(17, 18, 20, 0.06), transparent 40%),
        rgba(251, 248, 240, 0.88);
}

[data-theme="theme-modern-atelier"] .primary-action,
[data-theme="theme-modern-atelier"] .download-btn,
[data-theme="theme-modern-atelier"] .love-primary-btn {
    background: #151719;
    box-shadow: none;
}

[data-theme="theme-classic-atlas"] .home-stats span,
[data-theme="theme-classic-atlas"] .hero-panel-header,
[data-theme="theme-classic-atlas"] .hero-mini-tool,
[data-theme="theme-classic-atlas"] .home-scenario-card,
[data-theme="theme-classic-atlas"] .home-tool-card,
[data-theme="theme-classic-atlas"] .content-area {
    background:
        linear-gradient(135deg, rgba(255, 250, 239, 0.96), rgba(232, 220, 200, 0.88)),
        var(--surface);
    border-color: rgba(18, 59, 105, 0.28);
}

[data-theme="theme-classic-atlas"] .home-stats span,
[data-theme="theme-classic-atlas"] .home-scenario-card,
[data-theme="theme-classic-atlas"] .home-tool-card {
    border-left: 4px solid var(--cobalt);
}

[data-theme="theme-classic-atlas"] .category-chip.is-active {
    background: var(--cobalt);
    border-color: var(--cobalt);
}

.home-tool-meta,
.home-tool-description,
.home-tool-action {
    display: block;
}

.home-tool-meta {
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
}

.home-tool-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.home-tool-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.15;
}

.home-tool-description {
    color: var(--muted);
}

.home-tool-action {
    margin-top: 1rem;
    color: var(--ruby);
    font-weight: 900;
}

.tool-directory-controls {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

#toolSearchInput {
    width: 100%;
    min-height: 48px;
    padding: 0 1rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.category-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-chip {
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.category-chip.is-active {
    color: #fff8ec;
    background: var(--cobalt);
    border-color: var(--cobalt);
}

.empty-state {
    padding: 1.25rem;
}

.main-header {
    max-width: 960px;
    margin: 0 auto 1rem;
    text-align: center;
}

.page-title {
    margin: 0.35rem 0 0.5rem;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1;
}

.page-subtitle {
    color: var(--muted);
    font-size: 1.05rem;
}

.content-area {
    max-width: 1180px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .home-hero-panel {
        align-self: stretch;
    }

    .home-scenario-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 248px;
    }

    .main-container {
        margin-left: 248px;
    }

    .featured-tool-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        display: block;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: max(0.65rem, env(safe-area-inset-left));
        right: max(0.65rem, env(safe-area-inset-right));
        bottom: max(0.65rem, env(safe-area-inset-bottom));
        z-index: 95;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.14rem;
        min-height: 74px;
        padding: 0.42rem 0.32rem;
        background: rgba(8, 9, 13, 0.92);
        border: 1px solid rgba(199, 155, 85, 0.34);
        border-radius: 18px;
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-link {
        min-width: 0;
        display: grid;
        place-items: center;
        gap: 0.18rem;
        padding: 0.16rem 0.04rem;
        color: rgba(248, 234, 213, 0.62);
        background: transparent;
        text-decoration: none;
        border: 1px solid transparent;
        border-radius: 14px;
        cursor: pointer;
        font-weight: 900;
    }

    .mobile-bottom-icon {
        width: 31px;
        height: 31px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.12);
    }

    .mobile-bottom-icon svg {
        width: 18.5px;
        height: 18.5px;
        display: block;
        overflow: visible;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-icon-home,
    .mobile-bottom-icon-tools {
        color: rgba(248, 234, 213, 0.84);
        background: rgba(248, 234, 213, 0.08);
        border: 1px solid rgba(199, 155, 85, 0.2);
    }

    .mobile-bottom-link small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: keep-all;
        font-size: 0.68rem;
        line-height: 1;
        letter-spacing: 0;
    }

    .mobile-bottom-link.is-active {
        color: #fff6de;
        background: rgba(255, 248, 232, 0.075);
        border-color: rgba(199, 155, 85, 0.32);
    }

    .mobile-bottom-link.is-active .mobile-bottom-icon {
        background: rgba(199, 155, 85, 0.16);
        box-shadow:
            inset 0 0 0 1px rgba(255, 248, 232, 0.2),
            0 8px 18px rgba(0, 0, 0, 0.18);
    }

    @media (max-width: 370px) {
        .mobile-bottom-nav {
            left: max(0.5rem, env(safe-area-inset-left));
            right: max(0.5rem, env(safe-area-inset-right));
            gap: 0.12rem;
            padding-inline: 0.28rem;
        }

        .mobile-bottom-icon {
            width: 28px;
            height: 28px;
        }

        .mobile-bottom-icon svg {
            width: 17px;
            height: 17px;
        }

        .mobile-bottom-link small {
            font-size: 0.62rem;
        }
    }

    body.is-tetris-immersive .mobile-bottom-nav {
        display: none;
    }

    body.is-mobile-tool-drawer-open,
    body.is-mobile-settings-open {
        overflow: hidden;
    }

    .mobile-tool-drawer:not([hidden]),
    .mobile-settings-sheet:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 1400;
        display: block;
    }

    .mobile-tool-drawer-backdrop,
    .mobile-settings-backdrop {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(3, 5, 10, 0.58);
        border: 0;
        cursor: pointer;
        backdrop-filter: blur(12px);
    }

    .mobile-tool-drawer-panel,
    .mobile-settings-panel {
        position: absolute;
        left: max(0.7rem, env(safe-area-inset-left));
        right: max(0.7rem, env(safe-area-inset-right));
        bottom: max(0.7rem, env(safe-area-inset-bottom));
        max-height: min(78svh, 680px);
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr) auto;
        gap: 0.75rem;
        overflow: hidden;
        padding: 0.75rem;
        color: #fff6de;
        background:
            linear-gradient(180deg, rgba(8, 9, 13, 0.94), rgba(39, 12, 16, 0.96)),
            var(--atlas-bg-image, none) center top / 44rem auto no-repeat;
        border: 1px solid rgba(199, 155, 85, 0.42);
        border-radius: 8px;
        box-shadow: 0 32px 90px rgba(0, 0, 0, 0.46);
    }

    .mobile-settings-panel {
        grid-template-rows: auto auto minmax(0, 1fr);
        max-height: min(70svh, 560px);
    }

    .mobile-tool-drawer-handle {
        width: 42px;
        height: 4px;
        justify-self: center;
        background: rgba(248, 234, 213, 0.34);
        border-radius: 999px;
    }

    .mobile-tool-drawer-header,
    .mobile-settings-header {
        display: flex;
        align-items: start;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .mobile-tool-drawer-header p,
    .mobile-settings-header p {
        margin: 0 0 0.18rem;
        color: rgba(248, 234, 213, 0.62);
        font-size: 0.78rem;
        font-weight: 900;
    }

    .mobile-tool-drawer-header h3,
    .mobile-settings-header h3 {
        margin: 0;
        color: #fff6de;
        font-family: var(--font-display);
        font-size: clamp(1.6rem, 8vw, 2.3rem);
        line-height: 1;
    }

    .mobile-tool-drawer-close {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        color: #f5d9a8;
        background: rgba(255, 248, 232, 0.07);
        border: 1px solid rgba(199, 155, 85, 0.34);
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.35rem;
        line-height: 1;
    }

    .mobile-tool-drawer-search {
        min-height: 48px;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        padding: 0 0.75rem;
        background: rgba(255, 248, 232, 0.08);
        border: 1px solid rgba(199, 155, 85, 0.28);
        border-radius: 8px;
    }

    .mobile-tool-drawer-search span {
        color: #f5d9a8;
        font-weight: 900;
    }

    .mobile-tool-drawer-search input {
        min-width: 0;
        color: #fff6de;
        background: transparent;
        border: 0;
        outline: 0;
        font-weight: 800;
    }

    .mobile-tool-drawer-search input::placeholder {
        color: rgba(248, 234, 213, 0.48);
    }

    .mobile-tool-drawer-categories {
        display: flex;
        gap: 0.45rem;
        overflow-x: auto;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
    }

    .mobile-tool-drawer-categories::-webkit-scrollbar {
        display: none;
    }

    .mobile-tool-drawer-chip {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 0.72rem;
        color: rgba(248, 234, 213, 0.68);
        background: rgba(255, 248, 232, 0.055);
        border: 1px solid rgba(199, 155, 85, 0.2);
        border-radius: 999px;
        cursor: pointer;
        font-size: 0.82rem;
        font-weight: 900;
    }

    .mobile-tool-drawer-chip.is-active {
        color: #1b0f0f;
        background: #f1c978;
        border-color: #f1c978;
    }

    .mobile-tool-drawer-list {
        min-height: 0;
        display: grid;
        align-content: start;
        gap: 0.65rem;
        overflow-y: auto;
        padding-right: 0.1rem;
    }

    .mobile-tool-drawer-item {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 38px;
        align-items: center;
        gap: 0.45rem;
        padding: 0.5rem;
        color: #fff6de;
        background: rgba(255, 248, 232, 0.07);
        border: 1px solid rgba(199, 155, 85, 0.22);
        border-radius: 8px;
    }

    .mobile-tool-drawer-main {
        min-width: 0;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0.28rem;
        color: inherit;
        text-align: left;
        background: transparent;
        border: 0;
        cursor: pointer;
    }

    .mobile-tool-drawer-icon {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        font-size: 1rem;
    }

    .mobile-tool-drawer-body {
        min-width: 0;
        display: grid;
        gap: 0.14rem;
    }

    .mobile-tool-drawer-meta {
        color: rgba(248, 234, 213, 0.52);
        font-size: 0.72rem;
        font-weight: 900;
    }

    .mobile-tool-drawer-body strong,
    .mobile-tool-drawer-body small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-tool-drawer-body strong {
        font-size: 0.98rem;
    }

    .mobile-tool-drawer-body small {
        color: rgba(248, 234, 213, 0.62);
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .mobile-tool-drawer-item em {
        color: #f5d9a8;
        font-size: 0.72rem;
        font-style: normal;
        font-weight: 900;
        white-space: nowrap;
    }

    .mobile-tool-favorite-toggle {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        color: rgba(248, 234, 213, 0.78);
        background: rgba(255, 248, 232, 0.06);
        border: 1px solid rgba(199, 155, 85, 0.24);
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.05rem;
        line-height: 1;
    }

    .mobile-tool-favorite-toggle svg {
        width: 18px;
        height: 18px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-tool-favorite-toggle.is-saved {
        color: #1b0f0f;
        background: #f1c978;
        border-color: #f1c978;
    }

    .mobile-tool-favorite-toggle.is-saved svg {
        fill: currentColor;
        stroke-width: 1.7;
    }

    .mobile-tool-drawer-empty {
        display: grid;
        gap: 0.2rem;
        padding: 1rem;
        color: rgba(248, 234, 213, 0.72);
        text-align: center;
        background: rgba(255, 248, 232, 0.06);
        border: 1px dashed rgba(199, 155, 85, 0.24);
        border-radius: 8px;
    }

    .mobile-tool-drawer-empty[hidden] {
        display: none;
    }

    .mobile-tool-drawer-note {
        margin: 0;
        padding: 0.68rem 0.75rem;
        color: rgba(248, 234, 213, 0.62);
        background: rgba(255, 248, 232, 0.055);
        border: 1px solid rgba(199, 155, 85, 0.18);
        border-radius: 8px;
        font-size: 0.72rem;
        font-weight: 800;
        line-height: 1.45;
    }

    .mobile-tool-drawer-note[hidden] {
        display: none;
    }

    .mobile-settings-options {
        min-height: 0;
        display: grid;
        gap: 0.65rem;
        overflow-y: auto;
    }

    .mobile-settings-option,
    .mobile-settings-note {
        display: grid;
        gap: 0.2rem;
        min-width: 0;
        padding: 0.85rem;
        color: #fff6de;
        text-align: left;
        background: rgba(255, 248, 232, 0.07);
        border: 1px solid rgba(199, 155, 85, 0.22);
        border-radius: 8px;
    }

    .mobile-settings-option {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        cursor: pointer;
    }

    .mobile-settings-option span {
        min-width: 0;
        display: grid;
        gap: 0.12rem;
    }

    .mobile-settings-option strong,
    .mobile-settings-note strong {
        color: #fff6de;
        font-size: 0.96rem;
    }

    .mobile-settings-option small,
    .mobile-settings-note p {
        margin: 0;
        color: rgba(248, 234, 213, 0.64);
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .mobile-settings-option em {
        min-width: 42px;
        min-height: 36px;
        display: grid;
        place-items: center;
        color: #1b0f0f;
        background: #f1c978;
        border-radius: 8px;
        font-style: normal;
        font-weight: 950;
    }

    .mobile-settings-theme select {
        min-width: 0;
        max-width: 145px;
        height: 38px;
        color: #fff6de;
        background: rgba(255, 248, 232, 0.08);
        border: 1px solid rgba(199, 155, 85, 0.3);
        border-radius: 8px;
        outline: 0;
        font-weight: 850;
    }

    .sidebar {
        width: 100%;
        height: 72px;
        min-height: 72px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        overflow: visible;
        top: 0;
        left: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .logo-container {
        display: contents;
    }

    .logo {
        grid-column: 1;
        margin-left: 0.8rem;
        font-size: 1.34rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    .logo::after {
        font-size: 0.5rem;
        letter-spacing: 0.16em;
    }

    .menu-toggle {
        grid-column: 3;
        justify-self: end;
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        margin-right: 0.7rem;
    }

    .sidebar-controls {
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
        gap: 0.45rem;
        min-width: 0;
        padding: 0.45rem 0.5rem;
        border-bottom: 0;
    }

    .language-toggle,
    .theme-picker select {
        min-height: 40px;
    }

    .theme-picker {
        min-width: 0;
        gap: 0.1rem;
    }

    .theme-picker span {
        font-size: 0.66rem;
        line-height: 1;
    }

    .theme-picker select {
        min-width: 0;
        padding: 0 0.45rem;
    }

    .nav-menu {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        display: none;
        width: 100%;
        max-height: calc(100svh - 72px);
        padding-top: 0.75rem;
        padding-bottom: 1rem;
        background: var(--surface-solid);
        border-top: 1px solid var(--line);
        box-shadow: 0 18px 40px rgba(27, 23, 18, 0.16);
    }

    .nav-menu.active {
        display: block;
    }

    .sidebar-footer {
        display: none;
    }

    .main-container {
        margin-left: 0;
        padding: 0.65rem;
        padding-top: 96px;
        padding-bottom: calc(5.8rem + env(safe-area-inset-bottom));
    }

    .home-hero {
        gap: 0.85rem;
        min-height: auto;
        padding: 1rem;
        background:
            linear-gradient(180deg, rgba(255, 249, 236, 0.95) 0%, rgba(255, 249, 236, 0.82) 48%, rgba(9, 18, 36, 0.08) 100%),
            var(--hero-image) center top / cover no-repeat;
    }

    [data-theme="theme-black-salon"] .home-hero {
        background:
            linear-gradient(180deg, rgba(8, 6, 6, 0.92) 0%, rgba(12, 8, 8, 0.78) 50%, rgba(9, 18, 36, 0.14) 100%),
            var(--hero-image) center top / cover no-repeat;
    }

    .home-eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }

    .home-title {
        margin: 0.45rem 0 0.6rem;
        font-size: clamp(2rem, 10.4vw, 2.85rem);
        line-height: 1.02;
    }

    .home-subtitle {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .home-hero-actions {
        gap: 0.55rem;
        margin-top: 0.9rem;
    }

    .home-hero-actions .primary-action,
    .home-hero-actions .secondary-action {
        min-height: 42px;
        padding: 0.62rem 0.75rem;
        font-size: 0.92rem;
    }

    .home-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        margin-top: 0.9rem;
    }

    .home-stats span {
        min-height: 58px;
        padding: 0.5rem;
    }

    .home-stats strong {
        font-size: 1.02rem;
    }

    .home-stats small {
        font-size: 0.66rem;
        line-height: 1.18;
    }

    .home-hero-panel {
        gap: 0.55rem;
    }

    .hero-panel-header {
        padding: 0.65rem;
    }

    .hero-panel-tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .hero-mini-tool {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 0.5rem;
        min-height: 72px;
        padding: 0.65rem;
    }

    .hero-mini-tool .nav-icon {
        width: 30px;
        height: 30px;
    }

    .hero-mini-tool strong {
        font-size: 0.88rem;
        line-height: 1.15;
    }

    .hero-mini-tool small {
        display: -webkit-box;
        overflow: hidden;
        font-size: 0.72rem;
        line-height: 1.25;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .home-scenarios,
    .home-featured,
    .home-overview {
        margin-top: 1rem;
    }

    .home-scenario-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(230px, 78vw);
        grid-template-columns: none;
        gap: 0.75rem;
        overflow-x: auto;
        padding: 0.1rem 0.05rem 0.45rem;
        scroll-snap-type: x proximity;
    }

    .home-scenario-card {
        min-height: 142px;
        scroll-snap-align: start;
    }

    .section-heading,
    .home-overview-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-tool-card {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 158px;
    }
}

@media (max-width: 420px) {
    .sidebar {
        height: 68px;
        min-height: 68px;
        grid-template-columns: 92px minmax(0, 1fr) 40px;
    }

    .logo {
        margin-left: 0.55rem;
        font-size: 1.1rem;
    }

    .logo::after {
        font-size: 0.46rem;
        letter-spacing: 0.12em;
    }

    .sidebar-controls {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 0.35rem;
        padding: 0.4rem;
    }

    .language-toggle,
    .theme-picker select {
        min-height: 38px;
    }

    .theme-picker span {
        display: none;
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
        margin-right: 0.45rem;
    }

    .nav-menu {
        top: 68px;
        max-height: calc(100svh - 68px);
    }

    .main-container {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
        padding-top: 92px;
    }

    .home-hero-actions,
    .tool-button-row {
        display: grid;
    }

    .home-tool-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .home-tool-icon {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 768px) {
    [data-theme="theme-silk-gift"] .home-hero {
        background:
            linear-gradient(180deg, rgba(255, 244, 220, 0.97) 0%, rgba(255, 239, 207, 0.84) 48%, rgba(177, 43, 36, 0.08) 100%),
            var(--hero-image) 58% top / cover no-repeat;
    }

    [data-theme="theme-modern-atelier"] .home-hero {
        background:
            linear-gradient(180deg, rgba(251, 248, 240, 0.97), rgba(226, 220, 208, 0.9)),
            var(--hero-image) right top / cover no-repeat;
    }

    [data-theme="theme-classic-atlas"] .home-hero {
        background:
            linear-gradient(180deg, rgba(255, 249, 236, 0.96) 0%, rgba(255, 249, 236, 0.82) 50%, rgba(18, 59, 105, 0.14) 100%),
            var(--hero-image) center top / cover no-repeat;
    }

    [data-theme="theme-black-salon"] .hero-mini-tool {
        min-height: 78px;
    }
}

/* Reference fidelity layer: default 05 / 03 system direction */
:root {
    --atlas-bg-image: url("/资源/visuals/ui-atlas-reference-bg.png");
    --atlas-cream: #fbf1df;
    --atlas-paper: #fffaf0;
    --atlas-ink: #241913;
    --atlas-burgundy: #7d1718;
    --atlas-burgundy-deep: #4d0d10;
    --atlas-navy: #071224;
    --atlas-green: #0e4d3e;
    --atlas-gold: #c79b55;
    --atlas-gold-soft: rgba(199, 155, 85, 0.22);
}

:root[data-theme="theme-luxury-atlas"] {
    --focus-ring: rgba(231, 194, 128, 0.24);
    --focus-ring-inner: rgba(255, 247, 220, 0.86);
    --scrollbar-track: rgba(255, 247, 220, 0.075);
    --scrollbar-thumb: rgba(199, 155, 85, 0.48);
    --scrollbar-thumb-hover: rgba(231, 194, 128, 0.68);
}

body[data-theme="theme-luxury-atlas"] {
    background:
        radial-gradient(circle at 96% 0%, rgba(125, 23, 24, 0.24), transparent 24rem),
        linear-gradient(90deg, #07080b 0, #07080b 286px, #efe2cd 286px, #fbf1df 100%);
}

[data-theme="theme-luxury-atlas"] .sidebar {
    color: #f8ead5;
    background:
        radial-gradient(circle at 12% 12%, rgba(199, 155, 85, 0.16), transparent 9rem),
        linear-gradient(180deg, #08090d 0%, #0b111d 54%, #09090d 100%);
    border-right-color: rgba(199, 155, 85, 0.32);
    box-shadow: 14px 0 44px rgba(6, 8, 14, 0.34);
}

[data-theme="theme-luxury-atlas"] .logo,
[data-theme="theme-luxury-atlas"] .nav-link {
    color: #f8ead5;
}

[data-theme="theme-luxury-atlas"] .logo::after,
[data-theme="theme-luxury-atlas"] .nav-group-title,
[data-theme="theme-luxury-atlas"] .sidebar-footer,
[data-theme="theme-luxury-atlas"] .nav-link-body small,
[data-theme="theme-luxury-atlas"] .theme-picker span {
    color: rgba(248, 234, 213, 0.64);
}

[data-theme="theme-luxury-atlas"] .language-toggle,
[data-theme="theme-luxury-atlas"] .theme-picker select {
    color-scheme: dark;
    color: #f8ead5;
    background: rgba(255, 248, 232, 0.06);
    border-color: rgba(199, 155, 85, 0.34);
}

[data-theme="theme-luxury-atlas"] .theme-picker select option,
[data-theme="theme-luxury-atlas"] .mobile-settings-theme select option,
[data-theme="theme-black-salon"] .theme-picker select option,
[data-theme="theme-black-salon"] .mobile-settings-theme select option {
    color: #f8ead5;
    background: #0b111d;
}

[data-theme="theme-luxury-atlas"] .mobile-settings-theme select,
[data-theme="theme-black-salon"] .theme-picker select,
[data-theme="theme-black-salon"] .mobile-settings-theme select {
    color-scheme: dark;
}

[data-theme="theme-luxury-atlas"] .nav-link:hover,
[data-theme="theme-luxury-atlas"] .nav-item.active .nav-link {
    background:
        linear-gradient(90deg, rgba(199, 155, 85, 0.14), rgba(255, 247, 220, 0.065));
    border-color: rgba(199, 155, 85, 0.34);
    box-shadow:
        inset 0 0 0 1px rgba(255, 247, 220, 0.055),
        0 10px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="theme-luxury-atlas"] .main-container {
    padding: clamp(0.85rem, 1.8vw, 1.5rem);
}

[data-theme="theme-luxury-atlas"] .home-content {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 2.7rem);
    padding: clamp(0.55rem, 1.5vw, 1rem);
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.88), rgba(251, 241, 223, 0.96)),
        var(--atlas-bg-image) right top / min(66vw, 900px) auto no-repeat;
    border: 1px solid rgba(199, 155, 85, 0.46);
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(27, 17, 10, 0.2);
}

[data-theme="theme-luxury-atlas"] .home-content::before,
[data-theme="theme-luxury-atlas"] .home-content::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

[data-theme="theme-luxury-atlas"] .home-content::before {
    inset: 0.7rem;
    border: 1px solid rgba(199, 155, 85, 0.36);
    border-radius: 6px;
}

[data-theme="theme-luxury-atlas"] .home-content::after {
    right: clamp(0.8rem, 3vw, 3rem);
    top: clamp(0.8rem, 2vw, 2rem);
    width: min(18vw, 170px);
    aspect-ratio: 1;
    background:
        radial-gradient(circle, transparent 50%, rgba(199, 155, 85, 0.48) 51% 52%, transparent 53%),
        conic-gradient(from 22deg, transparent 0 8deg, rgba(7, 18, 36, 0.24) 8deg 10deg, transparent 10deg 18deg);
    opacity: 0.7;
}

[data-theme="theme-luxury-atlas"] .home-hero,
[data-theme="theme-luxury-atlas"] .home-scenarios,
[data-theme="theme-luxury-atlas"] .home-featured,
[data-theme="theme-luxury-atlas"] .home-overview {
    position: relative;
    z-index: 1;
}

[data-theme="theme-luxury-atlas"] .home-hero {
    grid-template-columns: minmax(0, 0.96fr) minmax(300px, 0.48fr);
    min-height: min(560px, calc(100vh - 4rem));
    padding: clamp(1.25rem, 4vw, 4.4rem) clamp(1rem, 4vw, 4.2rem);
    color: var(--atlas-ink);
    background:
        linear-gradient(90deg, rgba(255, 250, 240, 0.98) 0%, rgba(255, 250, 240, 0.9) 46%, rgba(251, 241, 223, 0.26) 100%),
        var(--atlas-bg-image) right center / min(64vw, 880px) auto no-repeat;
    border: 0;
    box-shadow: none;
}

[data-theme="theme-luxury-atlas"] .home-eyebrow {
    color: var(--atlas-burgundy);
}

[data-theme="theme-luxury-atlas"] .home-title {
    max-width: 620px;
    color: #241913;
    font-size: clamp(3rem, 7.8vw, 6.6rem);
    text-transform: uppercase;
}

[data-theme="theme-luxury-atlas"] .home-subtitle {
    max-width: 530px;
    color: #614c3b;
}

[data-theme="theme-luxury-atlas"] .home-hero-panel {
    align-self: center;
    padding: 0.8rem;
    background: rgba(9, 10, 14, 0.88);
    border: 1px solid rgba(199, 155, 85, 0.36);
    border-radius: 8px;
    box-shadow: 0 30px 70px rgba(7, 8, 12, 0.28);
}

[data-theme="theme-luxury-atlas"] .hero-panel-header,
[data-theme="theme-luxury-atlas"] .hero-mini-tool {
    color: #f8ead5;
    background: rgba(255, 248, 232, 0.05);
    border-color: rgba(199, 155, 85, 0.28);
    box-shadow: none;
}

[data-theme="theme-luxury-atlas"] .hero-mini-tool {
    min-height: 98px;
    grid-template-columns: 44px minmax(0, 1fr);
}

[data-theme="theme-luxury-atlas"] .hero-mini-tool small {
    color: rgba(248, 234, 213, 0.68);
}

[data-theme="theme-luxury-atlas"] .home-stats {
    max-width: 560px;
}

[data-theme="theme-luxury-atlas"] .home-stats span {
    min-height: 74px;
    background: rgba(255, 250, 240, 0.78);
    box-shadow: 0 12px 28px rgba(70, 47, 22, 0.1);
}

[data-theme="theme-luxury-atlas"] .home-scenarios,
[data-theme="theme-luxury-atlas"] .home-featured,
[data-theme="theme-luxury-atlas"] .home-overview {
    max-width: none;
    margin: 1rem clamp(0.2rem, 2vw, 2.2rem) 0;
}

[data-theme="theme-luxury-atlas"] .section-heading,
[data-theme="theme-luxury-atlas"] .home-overview-top {
    padding: 0 0.25rem;
    border-top: 1px solid rgba(199, 155, 85, 0.28);
    padding-top: 0.85rem;
}

[data-theme="theme-luxury-atlas"] .home-scenario-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-theme="theme-luxury-atlas"] .featured-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-theme="theme-luxury-atlas"] .home-tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

[data-theme="theme-luxury-atlas"] .home-scenario-card,
[data-theme="theme-luxury-atlas"] .home-tool-card,
[data-theme="theme-luxury-atlas"] .category-chip,
[data-theme="theme-luxury-atlas"] #toolSearchInput,
[data-theme="theme-luxury-atlas"] .empty-state {
    background: rgba(255, 250, 240, 0.84);
    border-color: rgba(199, 155, 85, 0.34);
    box-shadow: 0 16px 34px rgba(70, 47, 22, 0.11);
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
    min-height: 230px;
    background:
        linear-gradient(135deg, rgba(125, 23, 24, 0.12), transparent 42%),
        rgba(255, 250, 240, 0.88);
}

[data-theme="theme-luxury-atlas"] .home-scenario-card:nth-child(3n + 1),
[data-theme="theme-luxury-atlas"] .home-tool-card:nth-child(3n + 1) {
    background:
        linear-gradient(160deg, rgba(125, 23, 24, 0.12), transparent 48%),
        rgba(255, 250, 240, 0.9);
}

[data-theme="theme-luxury-atlas"] .home-scenario-card:nth-child(3n + 2),
[data-theme="theme-luxury-atlas"] .home-tool-card:nth-child(3n + 2) {
    background:
        linear-gradient(160deg, rgba(14, 77, 62, 0.12), transparent 48%),
        rgba(255, 250, 240, 0.9);
}

[data-theme="theme-luxury-atlas"] .home-scenario-card:nth-child(3n),
[data-theme="theme-luxury-atlas"] .home-tool-card:nth-child(3n) {
    background:
        linear-gradient(160deg, rgba(7, 18, 36, 0.13), transparent 48%),
        rgba(255, 250, 240, 0.9);
}

[data-theme="theme-luxury-atlas"] .main-header {
    position: relative;
    max-width: 1180px;
    margin-bottom: 0.6rem;
    padding: clamp(1rem, 3vw, 2.4rem);
    color: var(--atlas-ink);
    background:
        linear-gradient(90deg, rgba(255, 250, 240, 0.96), rgba(255, 250, 240, 0.72)),
        var(--atlas-bg-image) right center / min(52vw, 760px) auto no-repeat;
    border: 1px solid rgba(199, 155, 85, 0.38);
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(70, 47, 22, 0.1);
}

[data-theme="theme-luxury-atlas"] .content-area {
    border-color: rgba(199, 155, 85, 0.4);
}

@media (max-width: 1100px) {
    [data-theme="theme-luxury-atlas"] .home-scenario-grid,
    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body[data-theme="theme-luxury-atlas"] {
        background:
            linear-gradient(180deg, #090a0f 0 68px, #fbf1df 68px 100%);
    }

    [data-theme="theme-luxury-atlas"] .sidebar {
        background: linear-gradient(90deg, #08090d 0%, #0b111d 100%);
    }

    [data-theme="theme-luxury-atlas"] .main-container {
        padding-top: 92px;
        padding-left: 0.6rem;
        padding-right: 0.6rem;
        padding-bottom: 0.8rem;
    }

    [data-theme="theme-luxury-atlas"] .home-content {
        padding: 0.45rem;
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(251, 241, 223, 0.96)),
            var(--atlas-bg-image) center top / 58rem auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-content::before {
        inset: 0.4rem;
    }

    [data-theme="theme-luxury-atlas"] .home-content::after {
        width: 92px;
        opacity: 0.48;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        grid-template-columns: 1fr;
        padding: 1.1rem;
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 250, 240, 0.86)),
            var(--atlas-bg-image) center top / 48rem auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        font-size: clamp(2.25rem, 12vw, 3.2rem);
        text-transform: none;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel {
        padding: 0.5rem;
    }

    [data-theme="theme-luxury-atlas"] .hero-panel-tools {
        grid-template-columns: 1fr;
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios,
    [data-theme="theme-luxury-atlas"] .home-featured,
    [data-theme="theme-luxury-atlas"] .home-overview {
        margin-left: 0.55rem;
        margin-right: 0.55rem;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-grid {
        grid-template-columns: none;
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    [data-theme="theme-luxury-atlas"] .main-container {
        padding-top: 88px;
    }
}

/* Stage 2: make the selected default direction behave like a composed first-screen dashboard. */
.home-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.home-search-shell {
    min-width: 0;
    flex: 1;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0 0.9rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.home-search-shell input {
    width: 100%;
    min-width: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
}

.home-search-feedback {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.55rem;
    max-width: 1220px;
    margin: 0.75rem auto 0;
    padding: 0.72rem;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(199, 155, 85, 0.14), transparent 42%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--soft-shadow);
}

.home-search-feedback[hidden] {
    display: none;
}

.home-search-feedback-main,
.home-search-result-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.home-search-feedback-main {
    justify-content: space-between;
}

.home-search-feedback-main strong {
    font-family: var(--font-display);
    font-size: 1rem;
}

.home-search-feedback-main button,
.home-search-result {
    appearance: none;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.36rem 0.66rem;
    color: var(--ink);
    background: rgba(255, 248, 232, 0.68);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
}

.home-search-feedback-main button {
    color: #fff8ec;
    background: var(--ruby);
    border-color: rgba(125, 23, 24, 0.36);
}

.home-search-result span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.home-search-feedback p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.home-top-actions {
    display: flex;
    gap: 0.55rem;
}

.home-icon-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--surface-solid);
    background: var(--ruby);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    cursor: pointer;
    font-weight: 900;
}

.home-icon-button:nth-child(2) {
    background: var(--emerald);
}

@media (min-width: 981px) {
    body[data-theme="theme-luxury-atlas"] {
        background:
            radial-gradient(circle at 86% 0%, rgba(125, 23, 24, 0.2), transparent 24rem),
            linear-gradient(90deg, #07080b 0, #07080b 252px, #efe2cd 252px, #fbf1df 100%);
    }

    [data-theme="theme-luxury-atlas"] .sidebar {
        width: 252px;
    }

    [data-theme="theme-luxury-atlas"] .main-container {
        margin-left: 252px;
        padding: 1.05rem;
    }

    [data-theme="theme-luxury-atlas"] .logo-container {
        min-height: 116px;
        align-items: end;
        padding: 1.35rem 1.55rem 1.2rem;
    }

    [data-theme="theme-luxury-atlas"] .logo {
        color: #f5d9a8;
        font-size: 2rem;
    }

    [data-theme="theme-luxury-atlas"] .sidebar-controls {
        margin: 0.85rem 1rem;
        padding: 0.85rem;
        background: rgba(255, 248, 232, 0.035);
        border: 1px solid rgba(199, 155, 85, 0.2);
        border-radius: 8px;
    }

    [data-theme="theme-luxury-atlas"] .nav-item {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .nav-link {
        min-height: 62px;
    }

    [data-theme="theme-luxury-atlas"] .home-content {
        height: calc(100vh - 2.1rem);
        min-height: 760px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
        grid-template-rows: 54px minmax(390px, 56vh) minmax(190px, 1fr);
        gap: 0.9rem;
        padding: 1rem;
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.86), rgba(251, 241, 223, 0.94)),
            var(--atlas-bg-image) right top / min(72vw, 960px) auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-topbar {
        grid-column: 1 / -1;
        grid-row: 1;
        width: min(100%, 760px);
        margin-left: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-search-shell {
        min-height: 44px;
        color: rgba(36, 25, 19, 0.54);
        background: rgba(255, 250, 240, 0.72);
        border-color: rgba(199, 155, 85, 0.34);
        box-shadow: 0 12px 28px rgba(70, 47, 22, 0.07);
    }

    [data-theme="theme-luxury-atlas"] .home-icon-button {
        color: #f8ead5;
        box-shadow: 0 14px 28px rgba(70, 47, 22, 0.12);
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        grid-column: 1 / -1;
        grid-row: 2;
        min-height: 0;
        height: 100%;
        grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.45fr);
        align-items: center;
        padding: clamp(1.2rem, 3.6vw, 3.6rem);
        background:
            linear-gradient(90deg, rgba(255, 250, 240, 0.98) 0%, rgba(255, 250, 240, 0.92) 44%, rgba(251, 241, 223, 0.18) 100%),
            var(--atlas-bg-image) right center / min(62vw, 840px) auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-copy {
        justify-content: center;
    }

    [data-theme="theme-luxury-atlas"] .home-eyebrow {
        position: relative;
        padding-left: 2.1rem;
        color: #3a2018;
        font-size: 1rem;
        letter-spacing: 0.06em;
    }

    [data-theme="theme-luxury-atlas"] .home-eyebrow::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.55em;
        width: 1.3rem;
        height: 1px;
        background: var(--atlas-gold);
        box-shadow: 0 -5px 0 rgba(199, 155, 85, 0.5), 0 5px 0 rgba(199, 155, 85, 0.5);
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 560px;
        margin-top: 0.85rem;
        margin-bottom: 1.15rem;
        font-size: clamp(4rem, 6.4vw, 6.2rem);
        line-height: 0.98;
        text-transform: none;
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 520px;
        color: #5e4938;
        font-size: 1.08rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions {
        margin-top: 1.35rem;
    }

    [data-theme="theme-luxury-atlas"] .primary-action,
    [data-theme="theme-luxury-atlas"] .secondary-action {
        min-height: 46px;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        border-radius: 999px;
    }

    [data-theme="theme-luxury-atlas"] .primary-action {
        color: #f8ead5;
        background: #08090d;
        border-color: rgba(199, 155, 85, 0.48);
        box-shadow: 0 16px 30px rgba(6, 8, 14, 0.18);
    }

    [data-theme="theme-luxury-atlas"] .secondary-action {
        color: #2e2016;
        background: rgba(255, 250, 240, 0.74);
    }

    [data-theme="theme-luxury-atlas"] .home-stats {
        max-width: 520px;
        gap: 0.65rem;
        margin-top: 1.35rem;
    }

    [data-theme="theme-luxury-atlas"] .home-stats span {
        min-height: 62px;
        padding: 0.7rem 0.85rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel {
        justify-self: end;
        align-self: center;
        width: min(100%, 360px);
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios,
    [data-theme="theme-luxury-atlas"] .home-overview {
        min-height: 0;
        margin: 0;
        overflow: hidden;
        background: rgba(255, 250, 240, 0.68);
        border: 1px solid rgba(199, 155, 85, 0.3);
        border-radius: 8px;
        box-shadow: 0 16px 34px rgba(70, 47, 22, 0.09);
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios {
        grid-column: 1;
        grid-row: 3;
        padding: 0.8rem;
    }

    [data-theme="theme-luxury-atlas"] .home-overview {
        grid-column: 2;
        grid-row: 3;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        padding: 0.8rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .section-heading,
    [data-theme="theme-luxury-atlas"] .home-overview-top {
        min-height: 0;
        margin-bottom: 0.55rem;
        padding-top: 0;
        border-top: 0;
    }

    [data-theme="theme-luxury-atlas"] .section-heading h3,
    [data-theme="theme-luxury-atlas"] .home-overview-top h3 {
        font-size: clamp(1.35rem, 2vw, 1.8rem);
    }

    [data-theme="theme-luxury-atlas"] .section-heading p,
    [data-theme="theme-luxury-atlas"] .home-overview-top p {
        font-size: 0.84rem;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-grid {
        max-height: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        overflow: auto;
        padding-right: 0.1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-card {
        min-height: 0;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 0.6rem;
        padding: 0.7rem;
        box-shadow: none;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-icon {
        width: 36px;
        height: 36px;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-card strong {
        font-size: 0.98rem;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-card small {
        margin-top: 0.25rem;
        font-size: 0.78rem;
        line-height: 1.38;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-card em {
        margin-top: 0.35rem;
        font-size: 0.76rem;
    }

    [data-theme="theme-luxury-atlas"] .tool-directory-controls {
        gap: 0.45rem;
        margin-bottom: 0.55rem;
    }

    [data-theme="theme-luxury-atlas"] .tool-directory-controls #toolSearchInput {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .category-filter-list {
        gap: 0.35rem;
        overflow-x: auto;
        padding-bottom: 0.05rem;
    }

    [data-theme="theme-luxury-atlas"] .category-chip {
        min-height: 32px;
        padding: 0.42rem 0.7rem;
        box-shadow: none;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        overflow: auto;
        padding-right: 0.1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card {
        min-height: 0;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 0.62rem;
        padding: 0.58rem 0.68rem;
        box-shadow: none;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-icon {
        width: 34px;
        height: 34px;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-body {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 0.5rem;
        align-items: center;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-meta {
        grid-column: 1;
        font-size: 0.68rem;
        line-height: 1;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-title-row {
        grid-column: 1;
        display: block;
        min-width: 0;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-title {
        display: block;
        overflow: hidden;
        font-size: 0.98rem;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-description {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-action {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin-top: 0;
        align-self: center;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-status {
        display: none;
    }
}

@media (min-width: 981px) and (max-height: 850px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        min-height: 700px;
        grid-template-rows: 50px minmax(330px, 50vh) minmax(168px, 1fr);
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        font-size: clamp(3.6rem, 6vw, 5.6rem);
    }

}

/* Stage 9: bring the default home closer to the split 03/05 references. */
[data-theme="theme-luxury-atlas"] .home-content {
    display: flex;
    flex-direction: column;
}

[data-theme="theme-luxury-atlas"] .home-topbar {
    order: 1;
}

[data-theme="theme-luxury-atlas"] .home-hero {
    order: 2;
}

[data-theme="theme-luxury-atlas"] .home-featured {
    order: 3;
}

[data-theme="theme-luxury-atlas"] .home-scenarios {
    order: 4;
}

[data-theme="theme-luxury-atlas"] .home-overview {
    order: 5;
}

[data-theme="theme-luxury-atlas"] .home-stats,
[data-theme="theme-luxury-atlas"] .home-hero-panel,
[data-theme="theme-luxury-atlas"] .home-hero .secondary-action {
    display: none;
}

.home-tool-card {
    position: relative;
    overflow: hidden;
}

.home-tool-card-main {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    min-width: 0;
    min-height: 100%;
    display: grid;
    grid-template-columns: inherit;
    grid-template-rows: inherit;
    align-content: inherit;
    align-items: inherit;
    gap: inherit;
    color: inherit;
    text-decoration: none;
}

.home-tool-favorite-toggle,
.tool-favorite-action {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.36rem;
    min-height: 36px;
    color: rgba(245, 217, 168, 0.94);
    background: rgba(12, 8, 10, 0.44);
    border: 1px solid rgba(245, 217, 168, 0.32);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
    line-height: 1;
}

.home-tool-favorite-toggle {
    position: absolute;
    right: 0.72rem;
    bottom: 0.72rem;
    z-index: 6;
    padding: 0 0.62rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.home-tool-favorite-toggle svg,
.tool-favorite-action svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-tool-favorite-toggle em,
.tool-favorite-action strong {
    font-size: 0.74rem;
    font-style: normal;
}

.home-tool-favorite-toggle.is-saved,
.tool-favorite-action.is-saved {
    color: #1b0f0f;
    background: #f1c978;
    border-color: #f1c978;
}

.home-tool-favorite-toggle.is-saved svg,
.tool-favorite-action.is-saved svg {
    fill: currentColor;
    stroke-width: 1.7;
}

.tool-favorite-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.tool-favorite-toolbar small {
    max-width: 48rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.45;
}

.tool-favorite-action {
    padding: 0.5rem 0.78rem;
    color: var(--ink);
    background: rgba(255, 248, 232, 0.8);
    border-color: var(--line);
}

.tetris-tool .tool-favorite-action {
    color: #f8fbff;
    background: rgba(10, 16, 28, 0.74);
    border-color: rgba(95, 194, 255, 0.32);
}

.tetris-tool .tool-favorite-action.is-saved {
    color: #08111c;
    background: #8bd8ff;
    border-color: #8bd8ff;
}

.tetris-tool .tool-favorite-toolbar small {
    color: rgba(248, 251, 255, 0.64);
}

@media (max-width: 768px) {
    .home-search-feedback {
        margin-top: 0.55rem;
        padding: 0.58rem;
        border-radius: 9px;
    }

    .home-search-feedback-main {
        align-items: flex-start;
    }

    .home-search-feedback-main strong {
        max-width: 19rem;
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .home-search-result-list {
        gap: 0.36rem;
    }

    .home-search-result {
        min-height: 32px;
        padding-inline: 0.52rem;
        font-size: 0.78rem;
    }

    .home-tool-favorite-toggle {
        right: 0.46rem;
        bottom: 0.46rem;
        min-height: 30px;
        padding: 0 0.48rem;
    }

    .home-tool-favorite-toggle em {
        font-size: 0.66rem;
    }

    .home-tool-favorite-toggle svg {
        width: 15px;
        height: 15px;
    }

    .home-tool-card:not(.is-featured) .home-tool-favorite-toggle {
        width: 30px;
        padding: 0;
    }

    .home-tool-card:not(.is-featured) .home-tool-favorite-toggle em {
        display: none;
    }

    .tool-favorite-toolbar {
        gap: 0.42rem;
        margin-top: 0.68rem;
    }

    .tool-favorite-toolbar small {
        flex-basis: 100%;
        font-size: 0.7rem;
    }
}

.home-tool-visual {
    display: none;
}

.home-tool-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-tool-number {
    position: absolute;
    top: 0.75rem;
    right: 0.8rem;
    color: rgba(199, 155, 85, 0.8);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
    min-height: 216px;
    grid-template-columns: minmax(0, 0.95fr) minmax(128px, 0.72fr);
    grid-template-rows: auto 1fr;
    align-content: end;
    align-items: end;
    padding: 1.1rem;
    color: #fff4dc;
    border: 1px solid rgba(231, 194, 128, 0.62);
    box-shadow: inset 0 0 0 1px rgba(255, 244, 214, 0.16), 0 18px 36px rgba(70, 47, 22, 0.16);
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::before {
    content: "";
    position: absolute;
    inset: 0.55rem;
    border: 1px solid rgba(255, 244, 214, 0.34);
    pointer-events: none;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::after {
    content: "";
    position: absolute;
    right: -3rem;
    bottom: -3rem;
    width: 11rem;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 244, 214, 0.2);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 244, 214, 0.08) 0 30%, transparent 31%),
        repeating-conic-gradient(from 18deg, rgba(255, 244, 214, 0.2) 0 5deg, transparent 5deg 18deg);
    opacity: 0.72;
    pointer-events: none;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-icon {
    position: absolute;
    z-index: 3;
    top: 1rem;
    left: 1rem;
    width: 46px;
    height: 46px;
    color: #fff4dc;
    background: rgba(255, 244, 214, 0.12);
    border-color: rgba(255, 244, 214, 0.36);
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-body {
    position: relative;
    z-index: 2;
    display: block;
    grid-column: 1;
    grid-row: 1 / -1;
    grid-template-columns: none;
    grid-template-rows: none;
    align-self: end;
    min-width: 0;
    padding-top: 3.4rem;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-meta,
[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title-row,
[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description,
[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action,
[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-status {
    grid-column: auto;
    grid-row: auto;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1 / -1;
    display: block;
    align-self: end;
    height: 164px;
    min-height: 0;
    margin: -0.25rem -0.25rem -0.25rem 0;
    border-radius: 7px;
    overflow: hidden;
    opacity: 0.92;
    mix-blend-mode: screen;
    box-shadow: inset 0 0 0 1px rgba(255, 244, 214, 0.18);
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(21, 9, 7, 0.36), rgba(21, 9, 7, 0.02) 44%, rgba(21, 9, 7, 0.1));
    pointer-events: none;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-meta,
[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-status,
[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
    color: rgba(255, 244, 214, 0.78);
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
    display: block;
    overflow: visible;
    color: #fff8e8;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.1vw, 1.8rem);
    line-height: 1.08;
    text-overflow: clip;
    white-space: normal;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
    display: inline-flex;
    width: fit-content;
    margin-top: 1rem;
    padding: 0.5rem 0.85rem;
    color: #fff8e8;
    border: 1px solid rgba(255, 244, 214, 0.38);
    border-radius: 999px;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured.home-tool-accent-ruby {
    background:
        linear-gradient(135deg, rgba(255, 244, 214, 0.08), transparent 46%),
        linear-gradient(155deg, #8c1718 0%, #4b1112 100%);
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured.home-tool-accent-emerald {
    background:
        linear-gradient(135deg, rgba(255, 244, 214, 0.08), transparent 46%),
        linear-gradient(155deg, #0c5946 0%, #062b26 100%);
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured.home-tool-accent-cobalt {
    background:
        linear-gradient(135deg, rgba(255, 244, 214, 0.08), transparent 46%),
        linear-gradient(155deg, #092449 0%, #071123 100%);
}

@media (min-width: 981px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        height: auto;
        min-height: calc(100vh - 2.1rem);
        overflow: visible;
        gap: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: clamp(360px, 46vh, 520px);
        height: auto;
        background:
            linear-gradient(90deg, rgba(255, 250, 240, 0.98) 0%, rgba(255, 250, 240, 0.9) 48%, rgba(251, 241, 223, 0.18) 100%),
            var(--atlas-bg-image) right center / min(62vw, 840px) auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        display: block;
        min-height: 0;
        margin: 0 clamp(0.2rem, 2vw, 2.2rem);
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios,
    [data-theme="theme-luxury-atlas"] .home-overview {
        margin: 0 clamp(0.2rem, 2vw, 2.2rem);
        overflow: visible;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        overflow: visible;
    }

    [data-theme="theme-luxury-atlas"] .home-overview {
        display: block;
    }

    [data-theme="theme-luxury-atlas"] .tool-directory-controls #toolSearchInput {
        display: block;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        overflow: visible;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-description,
    [data-theme="theme-luxury-atlas"] .home-tool-status {
        display: inline-flex;
    }
}

@media (max-width: 768px) {
    [data-theme="theme-luxury-atlas"] .home-hero {
        min-height: clamp(280px, 40svh, 300px);
        padding: 1.15rem 1.15rem 1.25rem;
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 250, 240, 0.82)),
            var(--atlas-bg-image) 58% top / 36rem auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        font-size: clamp(2.3rem, 11vw, 3rem);
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions {
        margin-top: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        margin-top: 0.85rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        grid-template-columns: minmax(0, 1fr) minmax(112px, 0.58fr);
        min-height: 158px;
        padding: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-icon {
        width: 40px;
        height: 40px;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        display: inline-flex;
        margin-top: 0.75rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        height: 126px;
        min-height: 0;
        margin: -0.3rem -0.3rem -0.3rem 0;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        font-size: 1.35rem;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-grid {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scroll-snap-type: x proximity;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-card {
        min-width: min(78vw, 260px);
        scroll-snap-align: start;
    }
}

@media (min-width: 769px) and (max-width: 980px) {
    body[data-theme="theme-luxury-atlas"] {
        background:
            linear-gradient(180deg, #090a0f 0 76px, #fbf1df 76px 100%);
    }

    .app-container {
        display: block;
    }

    .sidebar,
    [data-theme="theme-luxury-atlas"] .sidebar {
        width: 100%;
        height: 76px;
        min-height: 76px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        overflow: visible;
        top: 0;
        left: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    [data-theme="theme-luxury-atlas"] .sidebar {
        background: linear-gradient(90deg, #08090d 0%, #0b111d 100%);
    }

    .logo-container,
    [data-theme="theme-luxury-atlas"] .logo-container {
        display: contents;
        min-height: 0;
        padding: 0;
    }

    .logo,
    [data-theme="theme-luxury-atlas"] .logo {
        grid-column: 1;
        margin-left: 1rem;
        color: #f5d9a8;
        font-size: 1.45rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    .logo::after {
        font-size: 0.5rem;
    }

    .menu-toggle {
        grid-column: 3;
        justify-self: end;
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        margin-right: 0.9rem;
    }

    .sidebar-controls,
    [data-theme="theme-luxury-atlas"] .sidebar-controls {
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
        gap: 0.55rem;
        min-width: 0;
        margin: 0;
        padding: 0.55rem 0.7rem;
        border: 0;
        background: transparent;
    }

    .nav-menu {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        display: none;
        width: 100%;
        max-height: calc(100svh - 76px);
        padding-top: 0.75rem;
        padding-bottom: 1rem;
        background: var(--surface-solid);
        border-top: 1px solid var(--line);
        box-shadow: 0 18px 40px rgba(27, 23, 18, 0.16);
    }

    [data-theme="theme-luxury-atlas"] .nav-menu {
        background: #090a0f;
        border-color: rgba(199, 155, 85, 0.28);
    }

    .nav-menu.active {
        display: block;
    }

    .sidebar-footer {
        display: none;
    }

    .main-container,
    [data-theme="theme-luxury-atlas"] .main-container {
        margin-left: 0;
        padding: 0.8rem;
        padding-top: 100px;
    }

    [data-theme="theme-luxury-atlas"] .home-content {
        height: auto;
        min-height: calc(100svh - 118px);
        display: block;
        padding: 0.7rem;
        overflow: visible;
    }

    [data-theme="theme-luxury-atlas"] .home-topbar {
        width: 100%;
        margin: 0 0 0.85rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        grid-template-columns: minmax(0, 1fr) minmax(270px, 0.62fr);
        gap: 1rem;
        min-height: auto;
        padding: 1.4rem;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 420px;
        font-size: clamp(3.1rem, 8vw, 4.8rem);
        line-height: 1;
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 420px;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel {
        width: 100%;
        align-self: center;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios,
    [data-theme="theme-luxury-atlas"] .home-featured,
    [data-theme="theme-luxury-atlas"] .home-overview {
        margin: 0.85rem 0 0;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-grid,
    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    [data-theme="theme-luxury-atlas"] .main-header {
        margin-bottom: 0.65rem;
        padding: 1rem;
        text-align: left;
    }

    [data-theme="theme-luxury-atlas"] .page-title {
        font-size: clamp(2.35rem, 8vw, 3.2rem);
        line-height: 1.02;
    }

    [data-theme="theme-luxury-atlas"] .page-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    body[data-theme="theme-luxury-atlas"] {
        background:
            linear-gradient(180deg, #090a0f 0 68px, #fbf1df 68px 100%);
    }

    .home-topbar {
        margin-bottom: 0.75rem;
    }

    .home-search-shell {
        min-height: 42px;
        border-radius: 8px;
    }

    .home-icon-button {
        width: 42px;
        height: 42px;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel {
        background: rgba(8, 9, 13, 0.9);
    }

}

/* Stage 16: mobile home needs to read like a designed phone page, not a squeezed desktop. */
@media (max-width: 768px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        padding-bottom: calc(5.6rem + env(safe-area-inset-bottom));
    }

    [data-theme="theme-luxury-atlas"] .home-topbar {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .home-search-shell {
        min-height: 40px;
    }

    [data-theme="theme-luxury-atlas"] .home-icon-button {
        width: 40px;
        height: 40px;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        min-height: clamp(216px, 28svh, 238px);
        padding: 0.95rem;
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 250, 240, 0.8)),
            var(--atlas-bg-image) 64% top / 31rem auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-eyebrow {
        font-size: 0.72rem;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 13rem;
        white-space: pre-line;
        font-size: clamp(2rem, 9.4vw, 2.68rem);
        line-height: 1.02;
    }

    html[lang="en-US"] [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 19rem;
        font-size: clamp(1.82rem, 7vw, 2.05rem);
        line-height: 0.96;
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 17rem;
        font-size: 0.88rem;
        line-height: 1.55;
    }

    html[lang="en-US"] [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 18rem;
        font-size: 0.82rem;
        line-height: 1.42;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions {
        margin-top: 0.75rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions .primary-action {
        min-height: 42px;
        padding: 0.58rem 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        margin-top: 0.46rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        gap: 0.16rem;
        padding-top: 0.42rem;
        margin-bottom: 0.42rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading p {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        margin: 0;
        font-size: clamp(1.55rem, 7.2vw, 1.92rem);
        line-height: 1;
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.58rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        grid-template-columns: minmax(0, 1fr) minmax(94px, 0.42fr);
        min-height: 116px;
        gap: 0.5rem;
        padding: 0.62rem;
        border-radius: 7px;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::before {
        inset: 0.42rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::after {
        right: -2.2rem;
        bottom: -2.2rem;
        width: 7.5rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-number {
        top: 0.55rem;
        right: 0.58rem;
        font-size: 0.78rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-icon {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-body {
        justify-content: center;
        padding-top: 0;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-meta {
        font-size: 0.68rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title-row {
        gap: 0.35rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        max-width: 8.4rem;
        font-size: clamp(1.02rem, 4.9vw, 1.22rem);
        line-height: 1.04;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-status,
    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
        display: none;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        min-height: 28px;
        margin-top: 0.34rem;
        padding: 0.28rem 0.58rem;
        font-size: 0.72rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        width: 100%;
        height: 78px;
        align-self: center;
        margin: 0 -0.08rem 0 0;
        border-radius: 6px;
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios {
        margin-top: 8.2rem;
    }

    [data-theme="theme-luxury-atlas"] .home-scenario-grid {
        padding-bottom: 0.9rem;
    }
}

@media (max-width: 420px) {
    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 108px;
        grid-template-columns: minmax(0, 1fr) 86px;
        padding: 0.58rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-body {
        padding-top: 0;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        max-width: 7.8rem;
        font-size: 1.02rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        height: 72px;
    }
}

/* Stage 3: structural theme layer. These themes must feel like different systems, not recolored tokens. */
@media (min-width: 981px) {
    [data-theme="theme-black-salon"] .home-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
        grid-template-rows: auto auto minmax(260px, 1fr);
        gap: 1rem;
        min-height: calc(100vh - 2.7rem);
    }

    [data-theme="theme-black-salon"] .home-topbar {
        grid-column: 1 / -1;
    }

    [data-theme="theme-black-salon"] .home-hero {
        grid-column: 1 / -1;
        min-height: min(540px, 56vh);
        grid-template-columns: minmax(0, 0.86fr) minmax(300px, 0.36fr);
        background:
            linear-gradient(90deg, rgba(8, 5, 5, 0.94) 0%, rgba(18, 11, 12, 0.76) 42%, rgba(38, 10, 14, 0.28) 100%),
            var(--hero-image) center / cover no-repeat;
    }

    [data-theme="theme-black-salon"] .home-hero-panel {
        width: min(100%, 360px);
        justify-self: end;
        align-self: center;
    }

    [data-theme="theme-black-salon"] .home-scenarios {
        grid-column: 1;
        margin-top: 0;
    }

    [data-theme="theme-black-salon"] .home-featured {
        grid-column: 2;
        grid-row: 3;
        margin-top: 0;
    }

    [data-theme="theme-black-salon"] .home-featured .section-heading,
    [data-theme="theme-modern-atelier"] .home-scenarios .section-heading {
        display: block;
    }

    [data-theme="theme-black-salon"] .home-featured .section-heading h3,
    [data-theme="theme-modern-atelier"] .home-scenarios .section-heading h3 {
        max-width: 100%;
        font-size: clamp(1.7rem, 2.4vw, 2.2rem);
        line-height: 1.05;
        white-space: nowrap;
    }

    [data-theme="theme-black-salon"] .home-featured .section-heading p,
    [data-theme="theme-modern-atelier"] .home-scenarios .section-heading p {
        margin-top: 0.35rem;
        font-size: 0.88rem;
    }

    [data-theme="theme-black-salon"] .home-overview {
        grid-column: 1 / -1;
        margin-top: 0.2rem;
    }

    [data-theme="theme-black-salon"] .home-scenario-grid,
    [data-theme="theme-black-salon"] .featured-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    [data-theme="theme-black-salon"] .featured-tool-grid {
        grid-template-columns: 1fr;
    }

    [data-theme="theme-black-salon"] .home-tool-card.is-featured {
        min-height: 150px;
    }

    [data-theme="theme-silk-gift"] .home-content {
        position: relative;
        padding: 1rem;
        background:
            linear-gradient(135deg, rgba(255, 248, 232, 0.9), rgba(247, 221, 184, 0.7)),
            repeating-linear-gradient(135deg, rgba(177, 43, 36, 0.05) 0 1px, transparent 1px 18px);
        border: 1px solid rgba(194, 119, 52, 0.28);
    }

    [data-theme="theme-silk-gift"] .home-content::before {
        content: "";
        position: absolute;
        inset: 0.75rem;
        border: 4px double rgba(177, 43, 36, 0.22);
        pointer-events: none;
    }

    [data-theme="theme-silk-gift"] .home-topbar,
    [data-theme="theme-silk-gift"] .home-hero,
    [data-theme="theme-silk-gift"] .home-scenarios,
    [data-theme="theme-silk-gift"] .home-featured,
    [data-theme="theme-silk-gift"] .home-overview {
        position: relative;
        z-index: 1;
    }

    [data-theme="theme-silk-gift"] .home-hero {
        grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.5fr);
        min-height: min(560px, 58vh);
        border-style: double;
        border-width: 4px;
        background:
            linear-gradient(90deg, rgba(255, 244, 220, 0.98) 0%, rgba(255, 239, 207, 0.7) 46%, rgba(177, 43, 36, 0.04) 100%),
            var(--hero-image) 62% center / cover no-repeat;
    }

    [data-theme="theme-silk-gift"] .home-scenario-card,
    [data-theme="theme-silk-gift"] .home-tool-card,
    [data-theme="theme-silk-gift"] .hero-mini-tool,
    [data-theme="theme-silk-gift"] .home-stats span {
        border-radius: 0 16px 0 16px;
        box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.66), 0 18px 34px rgba(141, 64, 30, 0.12);
    }

    [data-theme="theme-silk-gift"] .home-scenario-card:nth-child(odd),
    [data-theme="theme-silk-gift"] .home-tool-card:nth-child(odd) {
        transform: translateY(-3px);
    }

    [data-theme="theme-silk-gift"] .home-scenarios {
        padding: 0.25rem;
        background:
            linear-gradient(135deg, rgba(255, 248, 232, 0.72), rgba(255, 239, 207, 0.36));
    }

    [data-theme="theme-modern-atelier"] .home-content {
        display: grid;
        grid-template-columns: minmax(0, 0.72fr) minmax(360px, 0.44fr);
        gap: 1.1rem;
    }

    [data-theme="theme-modern-atelier"] .home-topbar {
        grid-column: 1 / -1;
    }

    [data-theme="theme-modern-atelier"] .home-hero {
        min-height: min(520px, 56vh);
        grid-template-columns: 1fr;
        border-radius: 0;
        background:
            linear-gradient(135deg, rgba(251, 248, 240, 0.96), rgba(232, 226, 214, 0.9)),
            linear-gradient(90deg, rgba(17, 18, 20, 0.06) 0 1px, transparent 1px 72px);
        box-shadow: none;
    }

    [data-theme="theme-modern-atelier"] .home-hero-panel {
        display: none;
    }

    [data-theme="theme-modern-atelier"] .home-stats {
        max-width: 740px;
    }

    [data-theme="theme-modern-atelier"] .home-scenarios {
        grid-column: 2;
        grid-row: 2 / span 2;
        margin-top: 0;
    }

    [data-theme="theme-modern-atelier"] .home-scenario-grid {
        grid-template-columns: 1fr;
    }

    [data-theme="theme-modern-atelier"] .home-featured,
    [data-theme="theme-modern-atelier"] .home-overview {
        grid-column: 1;
        margin-top: 0;
    }

    [data-theme="theme-modern-atelier"] .home-scenario-card,
    [data-theme="theme-modern-atelier"] .home-tool-card,
    [data-theme="theme-modern-atelier"] .home-stats span {
        border-radius: 0;
        box-shadow: none;
    }

    [data-theme="theme-modern-atelier"] .home-title {
        max-width: 760px;
        font-size: clamp(3.6rem, 6.4vw, 6rem);
        letter-spacing: 0;
    }

    [data-theme="theme-classic-atlas"] .home-content {
        background:
            linear-gradient(90deg, rgba(18, 59, 105, 0.09) 0 1px, transparent 1px 25%),
            linear-gradient(180deg, rgba(18, 59, 105, 0.07) 0 1px, transparent 1px 170px),
            rgba(255, 249, 236, 0.78);
    }

    [data-theme="theme-classic-atlas"] .home-hero {
        min-height: min(560px, 58vh);
        border-color: rgba(18, 59, 105, 0.54);
        background:
            linear-gradient(90deg, rgba(255, 249, 236, 0.96) 0%, rgba(255, 249, 236, 0.74) 45%, rgba(18, 59, 105, 0.12) 100%),
            var(--hero-image) center / cover no-repeat;
    }

    [data-theme="theme-classic-atlas"] .home-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(18, 59, 105, 0.18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
            linear-gradient(180deg, transparent 0 calc(50% - 1px), rgba(18, 59, 105, 0.12) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
        pointer-events: none;
    }

    [data-theme="theme-classic-atlas"] .home-scenario-card,
    [data-theme="theme-classic-atlas"] .home-tool-card,
    [data-theme="theme-classic-atlas"] .hero-mini-tool,
    [data-theme="theme-classic-atlas"] .home-stats span {
        border-radius: 2px;
        border-left: 4px solid var(--cobalt);
        box-shadow: 0 20px 34px rgba(18, 59, 105, 0.08);
    }

    [data-theme="theme-classic-atlas"] .home-overview {
        padding: 0.4rem;
        border-top: 2px solid rgba(18, 59, 105, 0.24);
    }
}

@media (max-width: 768px) {
    [data-theme="theme-silk-gift"] .home-content {
        background:
            linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(247, 221, 184, 0.88)),
            repeating-linear-gradient(135deg, rgba(177, 43, 36, 0.05) 0 1px, transparent 1px 18px);
    }

    [data-theme="theme-silk-gift"] .home-hero {
        border-style: double;
        border-width: 4px;
    }

    [data-theme="theme-modern-atelier"] .home-hero,
    [data-theme="theme-modern-atelier"] .home-scenario-card,
    [data-theme="theme-modern-atelier"] .home-tool-card {
        border-radius: 0;
        box-shadow: none;
    }

    [data-theme="theme-classic-atlas"] .home-content {
        background:
            linear-gradient(90deg, rgba(18, 59, 105, 0.07) 0 1px, transparent 1px 96px),
            rgba(255, 249, 236, 0.92);
    }
}

/* Stage 20: mobile tool cabinet participates in every theme system. */
@media (max-width: 768px) {
    [data-theme="theme-black-salon"] .mobile-bottom-nav {
        background:
            radial-gradient(circle at 50% 0%, rgba(178, 43, 43, 0.22), transparent 10rem),
            rgba(9, 6, 7, 0.94);
        border-color: rgba(209, 166, 94, 0.38);
        border-radius: 14px;
        box-shadow: 0 24px 68px rgba(0, 0, 0, 0.48);
    }

    [data-theme="theme-black-salon"] .mobile-tool-drawer-panel {
        color: #f7ebdc;
        background:
            radial-gradient(circle at 20% 18%, rgba(178, 43, 43, 0.26), transparent 14rem),
            linear-gradient(180deg, rgba(11, 7, 8, 0.98), rgba(33, 12, 13, 0.98));
        border-color: rgba(209, 166, 94, 0.44);
        border-radius: 6px;
        box-shadow: 0 34px 96px rgba(0, 0, 0, 0.56);
    }

    [data-theme="theme-black-salon"] .mobile-tool-drawer-search,
    [data-theme="theme-black-salon"] .mobile-tool-drawer-item,
    [data-theme="theme-black-salon"] .mobile-tool-drawer-chip,
    [data-theme="theme-black-salon"] .mobile-tool-drawer-empty {
        background: rgba(255, 248, 232, 0.055);
        border-color: rgba(209, 166, 94, 0.28);
    }

    [data-theme="theme-black-salon"] .mobile-tool-drawer-chip.is-active {
        color: #190a0a;
        background: #d1a65e;
        border-color: #d1a65e;
    }

    [data-theme="theme-black-salon"] .mobile-tool-drawer-close {
        color: #f3d69d;
        background: rgba(178, 43, 43, 0.18);
        border-color: rgba(209, 166, 94, 0.4);
    }

    [data-theme="theme-silk-gift"] .mobile-bottom-nav {
        background:
            linear-gradient(135deg, rgba(255, 247, 232, 0.96), rgba(255, 225, 184, 0.94)),
            repeating-linear-gradient(135deg, rgba(177, 43, 36, 0.06) 0 1px, transparent 1px 14px);
        border: 3px double rgba(194, 119, 52, 0.5);
        border-radius: 0 18px 0 18px;
        box-shadow: 0 22px 48px rgba(141, 64, 30, 0.18);
    }

    [data-theme="theme-silk-gift"] .mobile-bottom-link {
        color: rgba(35, 22, 15, 0.62);
    }

    [data-theme="theme-silk-gift"] .mobile-bottom-link.is-active {
        color: #7d1718;
        background: rgba(177, 43, 36, 0.08);
        border-color: rgba(194, 119, 52, 0.35);
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-panel {
        color: #23160f;
        background:
            linear-gradient(150deg, rgba(255, 248, 232, 0.98), rgba(255, 232, 196, 0.96)),
            repeating-linear-gradient(135deg, rgba(177, 43, 36, 0.05) 0 1px, transparent 1px 16px);
        border: 4px double rgba(194, 119, 52, 0.52);
        border-radius: 0 20px 0 20px;
        box-shadow: 0 30px 74px rgba(141, 64, 30, 0.24);
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-panel::after {
        content: "";
        position: absolute;
        inset: 0.65rem;
        border: 1px solid rgba(177, 43, 36, 0.14);
        border-radius: 0 14px 0 14px;
        pointer-events: none;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-header,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-search,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-categories,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-list,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-empty {
        position: relative;
        z-index: 1;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-header h3,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-body strong {
        color: #23160f;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-header p,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-meta,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-body small,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-empty {
        color: rgba(75, 43, 25, 0.66);
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-search,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-item,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-empty {
        background: rgba(255, 250, 240, 0.64);
        border-color: rgba(194, 119, 52, 0.36);
        border-radius: 0 14px 0 14px;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-item {
        border-width: 3px;
        border-style: double;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-search input {
        color: #23160f;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-search input::placeholder {
        color: rgba(75, 43, 25, 0.48);
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-chip {
        color: #7b5c44;
        background: rgba(255, 250, 240, 0.62);
        border-color: rgba(194, 119, 52, 0.3);
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-chip.is-active {
        color: #fff8ec;
        background: #b12b24;
        border-color: #b12b24;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-item em,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-close,
    [data-theme="theme-silk-gift"] .mobile-tool-drawer-search span {
        color: #b12b24;
    }

    [data-theme="theme-silk-gift"] .mobile-tool-drawer-close {
        background: rgba(177, 43, 36, 0.08);
        border-color: rgba(194, 119, 52, 0.38);
        border-radius: 0 12px 0 12px;
    }

    [data-theme="theme-modern-atelier"] .mobile-bottom-nav {
        background: rgba(251, 248, 240, 0.94);
        border-color: rgba(35, 35, 35, 0.2);
        border-radius: 0;
        box-shadow: 0 20px 44px rgba(17, 18, 20, 0.12);
    }

    [data-theme="theme-modern-atelier"] .mobile-bottom-link {
        color: rgba(21, 23, 25, 0.58);
        border-radius: 0;
    }

    [data-theme="theme-modern-atelier"] .mobile-bottom-link.is-active {
        color: #151719;
        background: rgba(17, 18, 20, 0.08);
        border-color: rgba(17, 18, 20, 0.16);
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-panel {
        color: #151719;
        background:
            linear-gradient(90deg, rgba(17, 18, 20, 0.055) 0 1px, transparent 1px 64px),
            linear-gradient(180deg, rgba(251, 248, 240, 0.98), rgba(232, 226, 214, 0.98));
        border-color: rgba(35, 35, 35, 0.2);
        border-radius: 0;
        box-shadow: 0 28px 74px rgba(17, 18, 20, 0.22);
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-header h3,
    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-body strong {
        color: #151719;
        font-family: var(--font-sans);
        font-weight: 900;
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-header p,
    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-meta,
    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-body small,
    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-empty {
        color: rgba(21, 23, 25, 0.62);
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-search,
    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-item,
    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-empty {
        background: rgba(251, 248, 240, 0.7);
        border-color: rgba(35, 35, 35, 0.18);
        border-radius: 0;
        box-shadow: none;
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-search input {
        color: #151719;
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-search input::placeholder {
        color: rgba(21, 23, 25, 0.46);
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-chip {
        color: rgba(21, 23, 25, 0.68);
        background: rgba(251, 248, 240, 0.5);
        border-color: rgba(35, 35, 35, 0.18);
        border-radius: 0;
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-chip.is-active {
        color: #f8f3e8;
        background: #151719;
        border-color: #151719;
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-close {
        color: #151719;
        background: transparent;
        border-color: rgba(35, 35, 35, 0.24);
        border-radius: 0;
    }

    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-item em,
    [data-theme="theme-modern-atelier"] .mobile-tool-drawer-search span {
        color: #151719;
    }

    [data-theme="theme-classic-atlas"] .mobile-bottom-nav {
        background:
            linear-gradient(90deg, rgba(18, 59, 105, 0.1) 0 1px, transparent 1px 74px),
            rgba(255, 249, 236, 0.96);
        border-color: rgba(18, 59, 105, 0.34);
        border-radius: 6px;
        box-shadow: 0 22px 48px rgba(18, 59, 105, 0.16);
    }

    [data-theme="theme-classic-atlas"] .mobile-bottom-link {
        color: rgba(18, 59, 105, 0.68);
        border-radius: 4px;
    }

    [data-theme="theme-classic-atlas"] .mobile-bottom-link.is-active {
        color: #fff9ec;
        background: #123b69;
        border-color: #123b69;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-panel {
        color: #1f1b16;
        background:
            linear-gradient(90deg, rgba(18, 59, 105, 0.075) 0 1px, transparent 1px 72px),
            linear-gradient(180deg, rgba(255, 249, 236, 0.98), rgba(223, 231, 237, 0.96));
        border-color: rgba(18, 59, 105, 0.44);
        border-radius: 4px;
        box-shadow: 0 28px 70px rgba(18, 59, 105, 0.22);
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(18, 59, 105, 0.12) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
        pointer-events: none;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-header,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-search,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-categories,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-list,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-empty {
        position: relative;
        z-index: 1;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-header h3,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-body strong {
        color: #1f1b16;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-header p,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-meta,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-body small,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-empty {
        color: rgba(31, 27, 22, 0.62);
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-search,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-item,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-empty {
        background: rgba(255, 250, 239, 0.72);
        border-color: rgba(18, 59, 105, 0.24);
        border-radius: 4px;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-item {
        border-left: 4px solid #123b69;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-search input {
        color: #1f1b16;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-search input::placeholder {
        color: rgba(31, 27, 22, 0.45);
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-chip {
        color: rgba(18, 59, 105, 0.72);
        background: rgba(255, 250, 239, 0.62);
        border-color: rgba(18, 59, 105, 0.22);
        border-radius: 4px;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-chip.is-active {
        color: #fff9ec;
        background: #123b69;
        border-color: #123b69;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-close {
        color: #123b69;
        background: rgba(18, 59, 105, 0.08);
        border-color: rgba(18, 59, 105, 0.28);
        border-radius: 4px;
    }

    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-item em,
    [data-theme="theme-classic-atlas"] .mobile-tool-drawer-search span {
        color: #123b69;
    }
}

/* Page ownership guard: relationship result visuals belong inside tool-002, not the homepage. */
.home-hero-panel .hero-result-card {
    display: none;
}

[data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-header,
[data-theme="theme-black-salon"] .home-hero-panel .hero-panel-header {
    display: flex;
}

[data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-tools,
[data-theme="theme-black-salon"] .home-hero-panel .hero-panel-tools {
    display: grid;
}

[data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-header,
[data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool {
    color: #f8ead5;
    background: rgba(10, 10, 14, 0.88);
    border-color: rgba(199, 155, 85, 0.34);
    box-shadow: 0 22px 54px rgba(6, 8, 14, 0.24);
}

[data-theme="theme-black-salon"] .home-hero-panel .hero-panel-header,
[data-theme="theme-black-salon"] .home-hero-panel .hero-mini-tool {
    color: #f7ebdc;
    background: rgba(15, 8, 9, 0.9);
    border-color: rgba(209, 166, 94, 0.28);
    box-shadow: 0 28px 68px rgba(0, 0, 0, 0.34);
}

/* Stage 33: desktop default home keeps the bottom trust rail without relationship result preview. */
.home-system-benefits {
    display: none;
}

@media (min-width: 1180px) {
    [data-theme="theme-luxury-atlas"] .home-system-benefits {
        order: 4;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0;
        margin: 1rem -0.35rem -0.35rem;
        padding: 1rem clamp(1rem, 2vw, 1.5rem);
        color: #f8ead5;
        background: linear-gradient(90deg, #07080b, #0b111d 58%, #08090d);
        border-top: 1px solid rgba(199, 155, 85, 0.36);
        border-radius: 0 0 7px 7px;
        box-shadow: 0 -18px 50px rgba(7, 8, 12, 0.16);
    }

    [data-theme="theme-luxury-atlas"] .home-system-benefit {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        column-gap: 0.72rem;
        row-gap: 0.15rem;
        align-items: center;
        min-width: 0;
        padding: 0.25rem clamp(0.55rem, 1.2vw, 1rem);
    }

    [data-theme="theme-luxury-atlas"] .home-system-benefit + .home-system-benefit {
        border-left: 1px solid rgba(199, 155, 85, 0.22);
    }

    [data-theme="theme-luxury-atlas"] .home-system-benefit span {
        grid-row: 1 / span 2;
        width: 38px;
        height: 38px;
        border: 1px solid rgba(199, 155, 85, 0.42);
        border-radius: 50%;
        background:
            radial-gradient(circle at center, rgba(199, 155, 85, 0.32) 0 18%, transparent 19%),
            rgba(255, 248, 232, 0.05);
    }

    [data-theme="theme-luxury-atlas"] .home-system-benefit strong {
        color: #f4d28a;
        font-size: 0.94rem;
        line-height: 1.1;
    }

    [data-theme="theme-luxury-atlas"] .home-system-benefit small {
        min-width: 0;
        color: rgba(248, 234, 213, 0.62);
        font-size: 0.78rem;
        line-height: 1.35;
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios {
        order: 5;
    }

    [data-theme="theme-luxury-atlas"] .home-overview {
        order: 6;
    }
}

/* Stage 33: the home page owns discovery only; relationship results stay inside tool-002. */
@media (min-width: 1180px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        overflow: hidden;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        overflow: hidden;
        min-height: min(520px, calc(var(--momo-vh, 1vh) * 100 - 4rem));
        padding-right: clamp(1rem, 4vw, 4.5rem);
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel {
        position: static;
        z-index: auto;
        top: auto;
        right: auto;
        display: grid;
        width: min(100%, 740px);
        gap: 0.72rem;
        margin-top: 1.2rem;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-header {
        display: inline-flex;
        width: max-content;
        max-width: 100%;
        padding: 0.42rem 0.72rem;
        color: #5b241f;
        background: rgba(255, 250, 239, 0.74);
        border: 1px solid rgba(154, 43, 34, 0.16);
        border-radius: 999px;
        box-shadow: 0 16px 36px rgba(84, 38, 28, 0.12);
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-tools {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.62rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool {
        min-height: 86px;
        color: #3b241d;
        background: rgba(255, 250, 239, 0.78);
        border-color: rgba(154, 43, 34, 0.14);
        box-shadow: 0 18px 42px rgba(84, 38, 28, 0.12);
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool small {
        color: rgba(59, 36, 29, 0.64);
    }
}

/* Stage 38: tighten the default desktop home into a first-screen atlas workspace. */
@media (min-width: 1180px) {
    [data-theme="theme-luxury-atlas"] .main-container {
        padding: clamp(0.65rem, 1vw, 1rem);
    }

    [data-theme="theme-luxury-atlas"] .home-content {
        gap: 0.65rem;
        min-height: calc(100vh - 1.3rem);
        padding: clamp(0.55rem, 1vw, 0.82rem);
        overflow: hidden;
    }

    [data-theme="theme-luxury-atlas"] .home-content::before {
        inset: 0.55rem;
    }

    [data-theme="theme-luxury-atlas"] .home-topbar {
        width: min(100%, 1000px);
        margin: 0 auto 0.15rem;
    }

    [data-theme="theme-luxury-atlas"] .home-search-shell {
        min-height: 40px;
        background: rgba(255, 250, 240, 0.72);
    }

    [data-theme="theme-luxury-atlas"] .home-icon-button {
        width: 40px;
        height: 40px;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        height: clamp(365px, 44vh, 455px);
        min-height: 0;
        grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
        align-items: center;
        gap: clamp(1rem, 2vw, 2rem);
        padding: clamp(1.05rem, 2.4vw, 2.35rem) clamp(1rem, 3vw, 3.4rem);
        background:
            linear-gradient(90deg, rgba(255, 250, 240, 0.98) 0%, rgba(255, 250, 240, 0.88) 42%, rgba(251, 241, 223, 0.12) 100%),
            var(--atlas-bg-image) right center / min(56vw, 760px) auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-copy {
        align-self: center;
    }

    [data-theme="theme-luxury-atlas"] .home-eyebrow {
        font-size: 0.74rem;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 560px;
        margin: 0.45rem 0 0.7rem;
        font-size: clamp(3.25rem, 5.6vw, 5.9rem);
        line-height: 0.94;
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 540px;
        font-size: clamp(0.95rem, 1.2vw, 1.08rem);
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions {
        margin-top: 1rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions .primary-action {
        min-height: 40px;
        padding: 0.58rem 0.9rem;
        border-radius: 999px;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel {
        justify-self: stretch;
        align-self: end;
        width: min(100%, 720px);
        margin-top: 0.7rem;
        gap: 0.5rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-header {
        padding: 0.34rem 0.64rem;
        font-size: 0.82rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-tools {
        gap: 0.5rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool {
        min-height: 72px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 0.58rem;
        padding: 0.62rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool .nav-icon {
        width: 34px;
        height: 34px;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool strong {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool small {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 0.72rem;
        line-height: 1.28;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        margin: 0 clamp(0.2rem, 1.6vw, 1.5rem);
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        padding-top: 0.55rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        grid-column: 2;
        grid-row: 1 / span 2;
        font-size: clamp(2rem, 2.8vw, 3.4rem);
        line-height: 1;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading p {
        align-self: end;
        max-width: 420px;
        margin: 0;
        font-size: 0.88rem;
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.75rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 190px;
        padding: 0.92rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-icon {
        top: 0.82rem;
        left: 0.82rem;
        width: 40px;
        height: 40px;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-body {
        padding-top: 3rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        font-size: clamp(1.35rem, 1.6vw, 1.85rem);
        line-height: 1.08;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        max-width: 13.5rem;
        font-size: 0.78rem;
        line-height: 1.36;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        margin-top: 0.68rem;
        padding: 0.42rem 0.72rem;
        font-size: 0.84rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        height: 132px;
    }
}

/* Stage 47: make the mobile bottom bar a scalable site navigator instead of tool-specific shortcuts. */
@media (max-width: 768px) {
    .mobile-bottom-link {
        appearance: none;
        font-family: inherit;
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-nav {
        min-height: 76px;
        padding: 0.42rem 0.42rem 0.34rem;
        gap: 0.08rem;
        overflow: visible;
        background:
            linear-gradient(180deg, rgba(8, 9, 13, 0.96), rgba(5, 6, 9, 0.98)),
            radial-gradient(circle at 50% 0%, rgba(236, 193, 118, 0.14), transparent 11rem);
        border-color: rgba(231, 194, 128, 0.42);
        border-radius: 22px;
        box-shadow:
            inset 0 0 0 1px rgba(255, 247, 220, 0.08),
            0 20px 54px rgba(0, 0, 0, 0.38);
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link {
        min-height: 60px;
        color: rgba(250, 235, 205, 0.66);
        border-radius: 18px;
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link small {
        font-size: 0.62rem;
        letter-spacing: 0.01em;
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-icon {
        width: 30px;
        height: 30px;
        background: rgba(255, 247, 220, 0.06);
        border: 1px solid rgba(231, 194, 128, 0.2);
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link.is-active {
        color: #fff7df;
        background: rgba(255, 247, 220, 0.09);
        border-color: rgba(231, 194, 128, 0.36);
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link.is-primary {
        transform: translateY(-0.52rem);
        color: #120c09;
        background: transparent;
        border-color: transparent;
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link.is-primary small {
        color: rgba(255, 247, 220, 0.82);
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.38);
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link.is-primary .mobile-bottom-icon {
        width: 48px;
        height: 48px;
        color: #2b160b;
        background:
            radial-gradient(circle at 35% 28%, #fff1c9, #d7a247 58%, #7c221d 100%);
        border: 1px solid rgba(255, 247, 220, 0.7);
        box-shadow:
            inset 0 0 0 2px rgba(60, 20, 12, 0.2),
            0 12px 28px rgba(125, 34, 29, 0.38);
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link.is-primary .mobile-bottom-icon svg {
        width: 23px;
        height: 23px;
        stroke-width: 1.75;
    }

    [data-theme="theme-luxury-atlas"] .nav-menu.active {
        display: grid;
        gap: 0.54rem;
        padding: 0.72rem 0.7rem 1.05rem;
        color: #fff7df;
        background:
            radial-gradient(circle at 88% 0%, rgba(231, 194, 128, 0.16), transparent 10rem),
            linear-gradient(180deg, rgba(8, 9, 13, 0.98), rgba(15, 12, 13, 0.96));
        border-top: 1px solid rgba(231, 194, 128, 0.28);
        border-bottom: 1px solid rgba(231, 194, 128, 0.22);
        box-shadow:
            inset 0 0 0 1px rgba(255, 247, 220, 0.06),
            0 20px 58px rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(18px);
    }

    [data-theme="theme-luxury-atlas"] .nav-menu .nav-group-title {
        padding: 0.18rem 0.35rem 0;
        margin: 0;
        color: rgba(255, 247, 220, 0.5);
    }

    [data-theme="theme-luxury-atlas"] .nav-menu .nav-list {
        display: grid;
        gap: 0.42rem;
    }

    [data-theme="theme-luxury-atlas"] .nav-menu .nav-item {
        margin: 0;
    }

    [data-theme="theme-luxury-atlas"] .nav-menu .nav-link {
        min-height: 56px;
        padding: 0.62rem;
        color: #fff7df;
        background: rgba(255, 247, 220, 0.06);
        border-color: rgba(231, 194, 128, 0.18);
        border-radius: 14px;
        transform: none;
    }

    [data-theme="theme-luxury-atlas"] .nav-menu .nav-link:hover,
    [data-theme="theme-luxury-atlas"] .nav-menu .nav-item.active .nav-link {
        background: rgba(255, 247, 220, 0.11);
        border-color: rgba(231, 194, 128, 0.34);
        transform: none;
    }

    [data-theme="theme-luxury-atlas"] .nav-menu .nav-link-body small {
        color: rgba(255, 247, 220, 0.58);
    }

    [data-theme="theme-luxury-atlas"] .nav-menu .status-badge {
        color: #dff3e7;
        background: rgba(23, 92, 71, 0.82);
        border-color: rgba(183, 222, 196, 0.32);
    }

    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-panel {
        max-height: min(76svh, 660px);
        gap: 0.72rem;
        padding: 0.82rem;
        background:
            radial-gradient(circle at 88% 12%, rgba(199, 155, 85, 0.18), transparent 10rem),
            linear-gradient(180deg, rgba(10, 10, 14, 0.97), rgba(41, 15, 18, 0.98)),
            var(--atlas-bg-image, none) center top / 44rem auto no-repeat;
        border-color: rgba(231, 194, 128, 0.48);
        border-radius: 18px 18px 10px 10px;
        box-shadow:
            inset 0 0 0 1px rgba(255, 247, 220, 0.08),
            0 30px 90px rgba(0, 0, 0, 0.52);
    }

    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-panel::before {
        content: "";
        position: absolute;
        inset: 0.58rem;
        border: 1px solid rgba(231, 194, 128, 0.18);
        border-radius: 14px 14px 7px 7px;
        pointer-events: none;
    }

    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-handle,
    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-header,
    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-search,
    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-categories,
    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-list,
    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-empty {
        position: relative;
        z-index: 1;
    }

    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-search,
    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-item,
    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-empty {
        background: rgba(255, 247, 220, 0.075);
        border-color: rgba(231, 194, 128, 0.24);
        border-radius: 12px;
    }

    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-chip {
        min-height: 36px;
        background: rgba(255, 247, 220, 0.055);
        border-color: rgba(231, 194, 128, 0.24);
    }

    [data-theme="theme-luxury-atlas"] .mobile-tool-drawer-chip.is-active {
        color: #1f1110;
        background: #f1c978;
        border-color: #f1c978;
    }
}

@media (max-width: 370px) {
    [data-theme="theme-luxury-atlas"] .mobile-bottom-nav {
        padding-inline: 0.28rem;
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link small {
        font-size: 0.55rem;
    }

    [data-theme="theme-luxury-atlas"] .mobile-bottom-link.is-primary .mobile-bottom-icon {
        width: 44px;
        height: 44px;
    }
}

/* Stage 48: desktop atlas home moves closer to the selected system references while keeping the phone layout separate. */
.home-desktop-nav,
.home-category-rail {
    display: none;
}

@media (min-width: 1180px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        height: auto;
        min-height: calc(100vh - 1.3rem);
        gap: 0.58rem;
        padding: clamp(0.6rem, 0.9vw, 0.82rem);
        overflow: visible;
    }

    [data-theme="theme-luxury-atlas"] .home-content::before {
        inset: 0.5rem;
    }

    [data-theme="theme-luxury-atlas"] .home-topbar {
        width: min(100%, 1080px);
        min-height: 50px;
        display: grid;
        grid-template-columns: minmax(250px, 0.72fr) auto auto;
        align-items: center;
        gap: 0.85rem;
        margin: 0 auto 0.08rem;
        padding: 0.26rem 0.34rem 0.26rem 0.42rem;
        background: rgba(255, 250, 240, 0.82);
        border: 1px solid rgba(199, 155, 85, 0.32);
        border-radius: 8px;
        box-shadow: 0 16px 44px rgba(70, 47, 22, 0.08);
        backdrop-filter: blur(14px);
    }

    [data-theme="theme-luxury-atlas"] .home-search-shell {
        min-height: 38px;
        padding-inline: 0.8rem;
        background: rgba(255, 255, 250, 0.72);
        border-color: rgba(199, 155, 85, 0.3);
        border-radius: 999px;
    }

    [data-theme="theme-luxury-atlas"] .home-desktop-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(1rem, 2.2vw, 2.4rem);
        min-width: max-content;
        padding: 0 0.65rem;
    }

    [data-theme="theme-luxury-atlas"] .home-desktop-nav a {
        color: #4a2c22;
        font-size: 0.86rem;
        text-decoration: none;
        white-space: nowrap;
    }

    [data-theme="theme-luxury-atlas"] .home-desktop-nav a:first-child {
        color: #9d241d;
        font-weight: 800;
    }

    [data-theme="theme-luxury-atlas"] .home-top-actions {
        justify-content: end;
    }

    [data-theme="theme-luxury-atlas"] .home-icon-button {
        width: 38px;
        height: 38px;
        box-shadow: 0 12px 26px rgba(70, 47, 22, 0.12);
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        height: clamp(310px, 36vh, 370px);
        grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
        gap: clamp(0.8rem, 2vw, 1.75rem);
        padding: clamp(1rem, 2vw, 1.75rem) clamp(1.15rem, 3vw, 3rem);
        background:
            linear-gradient(90deg, rgba(255, 250, 240, 0.99) 0%, rgba(255, 250, 240, 0.9) 42%, rgba(251, 241, 223, 0.08) 100%),
            var(--atlas-bg-image) right 46% / min(58vw, 790px) auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 520px;
        margin: 0.36rem 0 0.62rem;
        font-size: clamp(3.35rem, 5vw, 5.35rem);
        line-height: 0.92;
    }

    html[lang="en-US"] [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 560px;
        font-size: clamp(2.85rem, 3.8vw, 4.15rem);
        line-height: 0.96;
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 520px;
        font-size: clamp(0.92rem, 1vw, 1.03rem);
        line-height: 1.55;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions {
        margin-top: 0.82rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions .primary-action {
        min-height: 38px;
        padding: 0.52rem 0.88rem;
        box-shadow: 0 14px 32px rgba(40, 18, 10, 0.18);
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel {
        align-self: end;
        gap: 0.45rem;
        margin-top: 0.45rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-tools {
        gap: 0.45rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool {
        min-height: 64px;
        padding: 0.52rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        margin: 0 clamp(0.2rem, 1.35vw, 1.25rem);
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        min-height: 44px;
        padding-top: 0.36rem;
        margin-bottom: 0.45rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        font-size: clamp(1.9rem, 2.35vw, 2.95rem);
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading p {
        font-size: 0.84rem;
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.7rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 164px;
        padding: 0.78rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-icon {
        width: 36px;
        height: 36px;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-body {
        padding-top: 2.65rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        font-size: clamp(1.18rem, 1.38vw, 1.55rem);
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
        max-width: 12.2rem;
        font-size: 0.74rem;
        line-height: 1.32;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        margin-top: 0.54rem;
        padding: 0.36rem 0.66rem;
        font-size: 0.8rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        height: 105px;
    }

    [data-theme="theme-luxury-atlas"] .home-category-rail {
        order: 4;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.62rem;
        margin: 0 clamp(0.2rem, 1.35vw, 1.25rem);
    }

    [data-theme="theme-luxury-atlas"] .home-category-card {
        position: relative;
        min-width: 0;
        min-height: 78px;
        display: grid;
        align-content: center;
        gap: 0.12rem;
        padding: 0.7rem 0.75rem;
        text-align: left;
        color: #4a2c22;
        background:
            linear-gradient(135deg, rgba(255, 252, 244, 0.94), rgba(247, 232, 202, 0.72)),
            var(--atlas-bg-image) center / 34rem auto no-repeat;
        border: 1px solid rgba(199, 155, 85, 0.42);
        border-radius: 7px;
        box-shadow: 0 14px 30px rgba(70, 47, 22, 0.08);
        cursor: pointer;
    }

    [data-theme="theme-luxury-atlas"] .home-category-card::before {
        content: "";
        position: absolute;
        inset: 0.36rem;
        border: 1px solid rgba(199, 155, 85, 0.16);
        border-radius: 5px;
        pointer-events: none;
    }

    [data-theme="theme-luxury-atlas"] .home-category-number {
        position: absolute;
        top: 0.5rem;
        right: 0.6rem;
        color: rgba(157, 36, 29, 0.5);
        font-family: var(--font-display);
        font-weight: 900;
        font-size: 0.82rem;
    }

    [data-theme="theme-luxury-atlas"] .home-category-card strong {
        position: relative;
        z-index: 1;
        display: -webkit-box;
        overflow: hidden;
        color: #2c1b15;
        font-family: var(--font-display);
        font-size: clamp(1rem, 1.05vw, 1.22rem);
        line-height: 1.12;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    [data-theme="theme-luxury-atlas"] .home-category-card small,
    [data-theme="theme-luxury-atlas"] .home-category-card em {
        position: relative;
        z-index: 1;
        overflow: hidden;
        font-size: 0.72rem;
        line-height: 1.24;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    [data-theme="theme-luxury-atlas"] .home-category-card small {
        color: rgba(74, 44, 34, 0.68);
    }

    [data-theme="theme-luxury-atlas"] .home-category-card em {
        color: #9d241d;
        font-style: normal;
        font-weight: 800;
    }

    /* Stage 64: keep the extensible "more tools" tile readable on desktop. */
    [data-theme="theme-luxury-atlas"] .home-category-card.is-more small {
        display: -webkit-box;
        overflow: hidden;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    [data-theme="theme-luxury-atlas"] .home-system-benefits {
        order: 5;
        margin: 0 clamp(0.2rem, 1.35vw, 1.25rem);
        padding: 0.72rem 0.88rem;
        border-radius: 7px;
    }

    [data-theme="theme-luxury-atlas"] .home-scenarios {
        order: 6;
    }

    [data-theme="theme-luxury-atlas"] .home-overview {
        order: 7;
    }
}

@media (min-width: 1180px) and (max-height: 820px) {
    [data-theme="theme-luxury-atlas"] .home-topbar {
        min-height: 46px;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        height: clamp(260px, 34vh, 310px);
        padding-top: 0.82rem;
        padding-bottom: 0.82rem;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        font-size: clamp(3rem, 4.6vw, 4.7rem);
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 146px;
    }

    [data-theme="theme-luxury-atlas"] .home-category-card {
        min-height: 70px;
        padding-block: 0.58rem;
    }

    [data-theme="theme-luxury-atlas"] .home-system-benefits {
        display: none;
    }
}

/* Stage 56: homepage flagship atlas polish for a richer mobile-first system. */
[data-theme="theme-luxury-atlas"] .home-hero {
    border: 1px solid rgba(199, 155, 85, 0.32);
    box-shadow:
        inset 0 0 0 1px rgba(255, 250, 240, 0.74),
        0 18px 42px rgba(70, 47, 22, 0.08);
}

[data-theme="theme-luxury-atlas"] .home-hero::before,
[data-theme="theme-luxury-atlas"] .home-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

[data-theme="theme-luxury-atlas"] .home-hero::before {
    inset: 0.58rem;
    z-index: 0;
    border: 1px solid rgba(199, 155, 85, 0.22);
    border-radius: 6px;
    background:
        linear-gradient(90deg, rgba(199, 155, 85, 0.18), transparent 18% 82%, rgba(199, 155, 85, 0.18)),
        linear-gradient(180deg, rgba(199, 155, 85, 0.12), transparent 20% 80%, rgba(199, 155, 85, 0.12));
    opacity: 0.48;
}

[data-theme="theme-luxury-atlas"] .home-hero::after {
    right: clamp(0.8rem, 2vw, 1.4rem);
    top: clamp(0.7rem, 1.8vw, 1.3rem);
    z-index: 0;
    width: clamp(7rem, 12vw, 10rem);
    aspect-ratio: 1;
    background:
        radial-gradient(circle, transparent 50%, rgba(199, 155, 85, 0.46) 51% 52%, transparent 53%),
        repeating-conic-gradient(from 16deg, rgba(7, 18, 36, 0.26) 0 4deg, transparent 4deg 16deg);
    opacity: 0.46;
}

[data-theme="theme-luxury-atlas"] .home-hero > * {
    z-index: 1;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

[data-theme="theme-luxury-atlas"] .home-tool-card.is-featured:hover {
    transform: translateY(-2px);
    border-color: rgba(231, 194, 128, 0.78);
    box-shadow:
        inset 0 0 0 1px rgba(255, 244, 214, 0.18),
        0 22px 44px rgba(70, 47, 22, 0.2);
}

@media (min-width: 1180px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.82), rgba(251, 241, 223, 0.95)),
            var(--atlas-bg-image) right top / min(78vw, 1100px) auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        background:
            linear-gradient(90deg, rgba(255, 250, 240, 0.99) 0%, rgba(255, 250, 240, 0.91) 40%, rgba(251, 241, 223, 0.08) 100%),
            var(--atlas-bg-image) right 48% / min(64vw, 880px) auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        mix-blend-mode: screen;
        opacity: 0.98;
    }
}

@media (max-width: 768px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        gap: 0.6rem;
        padding: 0.46rem;
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(251, 241, 223, 0.98)),
            var(--atlas-bg-image) 70% top / 54rem auto no-repeat;
    }

    [data-theme="theme-luxury-atlas"] .home-content::before {
        inset: 0.38rem;
        border-color: rgba(199, 155, 85, 0.42);
        box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.72);
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        min-height: clamp(226px, 27svh, 252px);
        padding: 0.98rem 1.02rem;
        background:
            linear-gradient(105deg, rgba(255, 250, 240, 0.99) 0%, rgba(255, 250, 240, 0.9) 49%, rgba(251, 241, 223, 0.36) 74%, rgba(251, 241, 223, 0.14) 100%),
            var(--atlas-bg-image) 76% top / 38rem auto no-repeat;
        border-color: rgba(199, 155, 85, 0.48);
    }

    [data-theme="theme-luxury-atlas"] .home-hero::before {
        inset: 0.44rem;
        opacity: 0.6;
    }

    [data-theme="theme-luxury-atlas"] .home-hero::after {
        right: -1.25rem;
        top: -1.15rem;
        width: 8.6rem;
        opacity: 0.34;
    }

    [data-theme="theme-luxury-atlas"] .home-eyebrow {
        letter-spacing: 0.12em;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 12.4rem;
        margin: 0.42rem 0 0.58rem;
        font-size: clamp(2.08rem, 9.9vw, 2.82rem);
        line-height: 0.98;
    }

    html[lang="en-US"] [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 18.4rem;
        font-size: clamp(1.8rem, 6.9vw, 2.08rem);
        line-height: 0.98;
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 16.4rem;
        font-size: 0.86rem;
        line-height: 1.48;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions .primary-action {
        min-height: 43px;
        border-color: rgba(199, 155, 85, 0.58);
        box-shadow: 0 14px 30px rgba(6, 8, 14, 0.18);
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        margin-top: 0.36rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        border-top-color: rgba(199, 155, 85, 0.36);
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        font-size: clamp(1.68rem, 7.3vw, 2rem);
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.48rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        grid-template-columns: minmax(0, 1fr);
        min-height: 108px;
        padding: 0.62rem 6.45rem 0.62rem 0.68rem;
        border-radius: 8px;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::before {
        inset: 0.42rem;
        border-color: rgba(255, 244, 214, 0.4);
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::after {
        right: -1.85rem;
        bottom: -2.05rem;
        width: 7.8rem;
        opacity: 0.86;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        max-width: 9.4rem;
        font-size: clamp(1.02rem, 4.7vw, 1.24rem);
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        min-height: 30px;
        margin-top: 0.32rem;
        padding: 0.27rem 0.58rem;
        font-size: 0.72rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        position: absolute;
        right: 0.42rem;
        top: 50%;
        width: 5.9rem;
        height: 4.62rem;
        margin: 0;
        transform: translateY(-50%);
        border-radius: 0;
        opacity: 0.78;
        mix-blend-mode: screen;
        box-shadow: none;
        -webkit-mask-image: radial-gradient(ellipse at 58% 52%, #000 0 62%, transparent 78%);
        mask-image: radial-gradient(ellipse at 58% 52%, #000 0 62%, transparent 78%);
    }
}

@media (max-width: 370px) {
    [data-theme="theme-luxury-atlas"] .home-hero {
        min-height: 220px;
        padding: 0.95rem;
        background-position: 78% top;
        background-size: 36rem auto;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 11.6rem;
        font-size: clamp(2rem, 9.6vw, 2.46rem);
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 15.4rem;
        font-size: 0.82rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 104px;
        padding-right: 5.86rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        right: 0.25rem;
        width: 5.35rem;
        height: 4.22rem;
    }
}

@media (max-width: 370px) and (max-height: 780px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        gap: 0.46rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        min-height: 196px;
        padding: 0.78rem 0.9rem;
        background-size: 34rem auto;
    }

    [data-theme="theme-luxury-atlas"] .home-eyebrow {
        font-size: 0.64rem;
    }

    [data-theme="theme-luxury-atlas"] .home-title {
        max-width: 10.8rem;
        margin: 0.28rem 0 0.38rem;
        font-size: clamp(1.84rem, 9vw, 2.16rem);
        line-height: 0.97;
    }

    [data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 14rem;
        font-size: 0.76rem;
        line-height: 1.34;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions {
        margin-top: 0.48rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero-actions .primary-action {
        min-height: 38px;
        padding: 0.42rem 0.78rem;
        font-size: 0.82rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        margin-top: 0.24rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        padding-top: 0.34rem;
        margin-bottom: 0.34rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        font-size: 1.46rem;
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.38rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 88px;
        padding: 0.48rem 5.25rem 0.48rem 0.56rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::before {
        inset: 0.34rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured::after {
        width: 6.5rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-meta {
        font-size: 0.62rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        max-width: 8.2rem;
        font-size: 0.95rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        min-height: 25px;
        margin-top: 0.22rem;
        padding: 0.2rem 0.48rem;
        font-size: 0.66rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-number {
        top: 0.44rem;
        right: 0.48rem;
        font-size: 0.68rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        right: 0.16rem;
        width: 4.95rem;
        height: 3.84rem;
    }
}

@media (min-width: 371px) and (max-width: 390px) and (max-height: 830px) {
    [data-theme="theme-luxury-atlas"] .home-content {
        gap: 0.52rem;
    }

    [data-theme="theme-luxury-atlas"] .home-hero {
        min-height: 224px;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured {
        margin-top: 0.28rem;
    }

    [data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        padding-top: 0.38rem;
        margin-bottom: 0.36rem;
    }

    [data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.42rem;
    }

    [data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 102px;
    }
}

/* Stage 59: bring the default mobile home closer to the selected magazine/atlas reference
   while keeping the Stage 58 product navigation model intact. */
@media (max-width: 768px) {
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] {
        background:
            linear-gradient(180deg, #fff9ed 0%, #f6e8d0 68%, #080b10 100%);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .sidebar {
        height: 62px;
        min-height: 62px;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        color: #20160e;
        background:
            linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(255, 245, 225, 0.94));
        border-bottom: 1px solid rgba(199, 155, 85, 0.38);
        box-shadow: 0 10px 24px rgba(79, 54, 25, 0.12);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .logo-container {
        display: contents;
        min-height: 0;
        padding: 0;
        border-bottom: 0;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        margin: 0;
        color: #1d1510;
        font-size: clamp(1.05rem, 5vw, 1.32rem);
        line-height: 1;
        letter-spacing: 0.02em;
        white-space: nowrap;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .logo::after {
        display: inline;
        margin-left: 0.28rem;
        color: #8f1717;
        font-size: 0.66em;
        letter-spacing: 0.04em;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .menu-toggle {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        width: 36px;
        height: 36px;
        margin: 0 0.5rem 0 0;
        color: #1f1711;
        background: transparent;
        border: 0;
        font-size: 1.28rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .sidebar-controls {
        position: static;
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        display: grid;
        grid-template-columns: 36px;
        width: 44px;
        padding: 0;
        background: transparent;
        border: 0;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .language-toggle {
        width: 36px;
        min-height: 36px;
        padding: 0;
        color: #8f1717;
        background: rgba(255, 248, 232, 0.7);
        border: 1px solid rgba(199, 155, 85, 0.36);
        border-radius: 50%;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .theme-picker {
        display: none;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .main-container {
        padding: 72px 0 0;
        padding-bottom: calc(6.3rem + env(safe-area-inset-bottom));
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-content {
        margin: 0 0.56rem;
        padding: 0.55rem;
        background:
            linear-gradient(180deg, rgba(255, 251, 241, 0.96), rgba(255, 244, 222, 0.98)),
            var(--atlas-bg-image) 68% top / 56rem auto no-repeat;
        border-color: rgba(199, 155, 85, 0.5);
        border-radius: 10px;
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.58),
            0 16px 32px rgba(109, 78, 42, 0.16);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-content::before {
        inset: 0.46rem;
        border-color: rgba(199, 155, 85, 0.34);
        border-radius: 7px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-content::after {
        top: 0.95rem;
        right: 1rem;
        width: 78px;
        opacity: 0.32;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero {
        min-height: clamp(232px, 29svh, 288px);
        padding: 0.96rem 1rem;
        color: #211811;
        background:
            linear-gradient(90deg, rgba(255, 250, 240, 0.99) 0%, rgba(255, 250, 240, 0.88) 48%, rgba(255, 250, 240, 0.18) 100%),
            var(--atlas-bg-image) 72% top / 39rem auto no-repeat;
        border-color: rgba(199, 155, 85, 0.45);
        box-shadow:
            inset 0 0 0 1px rgba(255, 252, 246, 0.68),
            0 8px 20px rgba(116, 82, 45, 0.1);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-eyebrow {
        color: #8f1717;
        font-size: 0.72rem;
        letter-spacing: 0.16em;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-title {
        max-width: 14rem;
        margin: 0.38rem 0 0.48rem;
        font-size: clamp(2.22rem, 11vw, 2.9rem);
        line-height: 0.95;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 15.6rem;
        color: rgba(40, 30, 21, 0.78);
        font-size: 0.86rem;
        line-height: 1.5;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-actions {
        display: flex;
        margin-top: 0.78rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-actions .primary-action {
        min-height: 42px;
        padding: 0.62rem 1.08rem;
        color: #f8ead5;
        background: #0c0c0b;
        border-color: rgba(199, 155, 85, 0.58);
        border-radius: 999px;
        box-shadow: 0 10px 22px rgba(8, 8, 8, 0.22);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-actions .secondary-action,
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-stats,
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel {
        display: none;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured {
        margin-top: 0.56rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        margin-bottom: 0.46rem;
        padding-top: 0.54rem;
        border-top: 1px solid rgba(199, 155, 85, 0.36);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured .section-heading p {
        color: #74604b;
        font-size: 0.76rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        color: #1f1711;
        font-size: clamp(1.7rem, 7.4vw, 2.12rem);
        line-height: 1;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.54rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 104px;
        padding: 0.72rem 6.45rem 0.62rem 0.72rem;
        border-color: rgba(199, 155, 85, 0.52);
        box-shadow:
            inset 0 0 0 1px rgba(255, 248, 232, 0.18),
            0 8px 16px rgba(35, 20, 10, 0.16);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        font-size: clamp(1.12rem, 5vw, 1.36rem);
        line-height: 1.15;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
        max-width: 10.8rem;
        -webkit-line-clamp: 2;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        min-height: 32px;
        margin-top: 0.34rem;
        border-radius: 999px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-nav {
        left: max(0.92rem, env(safe-area-inset-left));
        right: max(0.92rem, env(safe-area-inset-right));
        bottom: max(0.42rem, env(safe-area-inset-bottom));
        min-height: 70px;
        padding: 0.38rem 0.38rem 0.46rem;
        background:
            linear-gradient(180deg, rgba(255, 251, 241, 0.96), rgba(248, 232, 204, 0.96));
        border-color: rgba(199, 155, 85, 0.46);
        border-radius: 22px;
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.58),
            0 18px 34px rgba(10, 8, 6, 0.28);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-link {
        color: #5b4633;
        background: transparent;
        border-radius: 16px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-link small {
        color: inherit;
        font-size: 0.64rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-icon {
        width: 29px;
        height: 29px;
        box-shadow: none;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-link.is-active {
        color: #8f1717;
        background: rgba(143, 23, 23, 0.06);
        border-color: rgba(199, 155, 85, 0.3);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-link[data-bottom-tool-id="recent"] {
        transform: translateY(-0.42rem);
        color: #fff4cf;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-link[data-bottom-tool-id="recent"] .mobile-bottom-icon {
        width: 48px;
        height: 48px;
        color: #f8e3a8;
        background:
            radial-gradient(circle at 50% 48%, rgba(248, 227, 168, 0.24), transparent 44%),
            linear-gradient(180deg, #17120d, #050505);
        border: 1px solid rgba(199, 155, 85, 0.74);
        box-shadow:
            0 10px 24px rgba(0, 0, 0, 0.34),
            inset 0 0 0 2px rgba(248, 227, 168, 0.12);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-link[data-bottom-tool-id="recent"] small {
        color: #6b4f35;
        transform: translateY(-0.15rem);
    }

    html[lang="en-US"] body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero {
        min-height: clamp(220px, 27svh, 264px);
    }

    html[lang="en-US"] body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-title {
        max-width: 17rem;
        font-size: clamp(1.78rem, 7.5vw, 2.18rem);
        line-height: 1.02;
    }

    html[lang="en-US"] body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 16.8rem;
        font-size: 0.78rem;
        line-height: 1.42;
    }

    html[lang="en-US"] body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 106px;
    }

    html[lang="en-US"] body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-title {
        font-size: clamp(1rem, 4.3vw, 1.18rem);
    }

    html[lang="en-US"] body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-description {
        -webkit-line-clamp: 1;
    }
}

@media (max-width: 370px) {
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero {
        min-height: 188px;
        padding: 0.72rem 0.82rem;
        background-size: 35rem auto;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-title {
        max-width: 11.8rem;
        font-size: clamp(1.9rem, 10vw, 2.26rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 13.8rem;
        font-size: 0.75rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        font-size: clamp(1.55rem, 6.8vw, 1.9rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .featured-tool-grid {
        gap: 0.44rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 86px;
        padding: 0.62rem 5.2rem 0.54rem 0.64rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-action {
        min-height: 30px;
        margin-top: 0.26rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-nav {
        left: max(0.58rem, env(safe-area-inset-left));
        right: max(0.58rem, env(safe-area-inset-right));
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .mobile-bottom-link[data-bottom-tool-id="recent"] .mobile-bottom-icon {
        width: 44px;
        height: 44px;
    }
}

/* Stage 60: desktop home flagship frame. Phone rules above stay authoritative. */
@media (min-width: 1180px) {
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] {
        background:
            linear-gradient(90deg, #070a0f 0 252px, rgba(17, 13, 9, 0.58) 252px 100%),
            linear-gradient(180deg, #f4dfb8 0%, #fff7e7 42%, #f0d9ad 100%);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .main-container {
        justify-content: center;
        padding: clamp(0.8rem, 1vw, 1.25rem) clamp(0.82rem, 1.5vw, 1.7rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-content {
        width: min(100%, 1400px);
        max-width: 1400px;
        min-height: calc(100vh - clamp(1.6rem, 2vw, 2.5rem));
        margin: 0 auto;
        gap: clamp(0.68rem, 0.82vw, 0.86rem);
        padding: clamp(0.74rem, 0.92vw, 0.94rem);
        border-color: rgba(199, 155, 85, 0.54);
        border-radius: 10px;
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.9), rgba(250, 238, 216, 0.97)),
            var(--atlas-bg-image) right top / min(78vw, 1120px) auto no-repeat;
        box-shadow:
            inset 0 0 0 1px rgba(255, 252, 244, 0.74),
            inset 0 0 0 7px rgba(166, 118, 54, 0.05),
            0 28px 58px rgba(64, 42, 18, 0.18);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-content::before {
        inset: 0.58rem;
        border-color: rgba(199, 155, 85, 0.32);
        border-radius: 7px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-topbar {
        width: min(100%, 1160px);
        margin-bottom: 0.12rem;
        border-color: rgba(199, 155, 85, 0.38);
        box-shadow: 0 18px 44px rgba(70, 47, 22, 0.1);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero {
        height: auto;
        min-height: clamp(352px, 40vh, 440px);
        grid-template-columns: minmax(400px, 0.72fr) minmax(420px, 1fr);
        align-items: center;
        gap: clamp(1rem, 2.8vw, 2.6rem);
        padding: clamp(1.35rem, 2.4vw, 2.5rem) clamp(1.55rem, 3.1vw, 3.35rem);
        overflow: hidden;
        background:
            linear-gradient(90deg, rgba(255, 250, 240, 1) 0%, rgba(255, 250, 240, 0.95) 39%, rgba(255, 250, 240, 0.2) 63%, rgba(255, 250, 240, 0.04) 100%),
            var(--atlas-bg-image) right 48% / min(64vw, 900px) auto no-repeat;
        border-color: rgba(199, 155, 85, 0.46);
        box-shadow:
            inset 0 0 0 1px rgba(255, 252, 244, 0.76),
            0 18px 38px rgba(76, 47, 18, 0.1);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-copy {
        align-self: center;
        max-width: 560px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-title {
        max-width: 560px;
        margin: 0.42rem 0 0.68rem;
        font-size: clamp(4.05rem, 5.1vw, 5.9rem);
        line-height: 0.9;
    }

    html[lang="en-US"] body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-title {
        max-width: 640px;
        font-size: clamp(3.3rem, 4vw, 4.7rem);
        line-height: 0.95;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-subtitle {
        max-width: 560px;
        font-size: clamp(0.98rem, 1.04vw, 1.08rem);
        line-height: 1.64;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-actions {
        margin-top: 1rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-actions .primary-action {
        min-height: 44px;
        padding: 0.64rem 1.08rem;
        border-radius: 999px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel {
        align-self: end;
        justify-self: end;
        width: min(100%, 690px);
        gap: 0.55rem;
        padding: 0.58rem;
        background: rgba(255, 249, 238, 0.78);
        border: 1px solid rgba(199, 155, 85, 0.34);
        border-radius: 8px;
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.58),
            0 16px 30px rgba(67, 44, 21, 0.12);
        backdrop-filter: blur(12px);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-header {
        padding: 0 0.18rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel .hero-panel-tools {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.52rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool {
        min-height: 76px;
        padding: 0.62rem;
        background: rgba(255, 252, 246, 0.76);
        border-color: rgba(199, 155, 85, 0.28);
        border-radius: 7px;
        box-shadow: 0 10px 20px rgba(73, 47, 23, 0.08);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool small {
        display: -webkit-box;
        overflow: hidden;
        line-height: 1.28;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured {
        margin: 0 clamp(0.5rem, 1.05vw, 1.15rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured .section-heading {
        min-height: 48px;
        margin-bottom: 0.56rem;
        padding-top: 0.5rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-featured .section-heading h3 {
        font-size: clamp(2.2rem, 2.7vw, 3.25rem);
        line-height: 0.94;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .featured-tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(0.76rem, 1vw, 0.95rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: clamp(178px, 14.4vw, 216px);
        padding: 0.88rem;
        border-radius: 8px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured .home-tool-visual {
        width: min(34%, 10.8rem);
        height: min(52%, 7.6rem);
        right: 0.86rem;
        bottom: 0.58rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-category-rail {
        gap: 0.68rem;
        margin: 0 clamp(0.5rem, 1.05vw, 1.15rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-category-card {
        min-height: 82px;
        padding: 0.78rem 0.82rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-system-benefits {
        margin: 0 clamp(0.5rem, 1.05vw, 1.15rem);
        padding: 0.8rem 1rem;
        border: 1px solid rgba(199, 155, 85, 0.18);
        background:
            linear-gradient(90deg, rgba(6, 9, 14, 0.98), rgba(12, 12, 11, 0.98));
    }
}

@media (min-width: 1180px) and (max-width: 1360px) {
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero {
        min-height: clamp(322px, 38vh, 380px);
        grid-template-columns: minmax(360px, 0.78fr) minmax(360px, 1fr);
        padding-inline: clamp(1.2rem, 2.4vw, 2.35rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-title {
        font-size: clamp(3.45rem, 4.75vw, 5rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel {
        width: min(100%, 600px);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool {
        min-height: 70px;
        padding: 0.52rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 166px;
    }
}

@media (min-width: 1180px) and (min-width: 1700px) {
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-content {
        max-width: 1440px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 208px;
    }
}

@media (min-width: 1180px) and (max-height: 820px) {
    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-content {
        gap: 0.56rem;
        padding: 0.62rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-topbar {
        min-height: 44px;
        margin-bottom: 0;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero {
        min-height: clamp(270px, 36vh, 318px);
        padding-block: 0.86rem;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-title {
        margin-bottom: 0.46rem;
        font-size: clamp(3.05rem, 4.5vw, 4.65rem);
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-subtitle {
        font-size: 0.92rem;
        line-height: 1.48;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-hero-panel .hero-mini-tool {
        min-height: 62px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-tool-card.is-featured {
        min-height: 146px;
    }

    body[data-current-route="home"][data-theme="theme-luxury-atlas"] .home-category-card {
        min-height: 70px;
    }
}
