:root {
    --brand-display-font: "Fangcun ZCOOL KuaiLe", "PingFang SC", "Microsoft YaHei", sans-serif;
}

@font-face {
    font-family: "Fangcun ZCOOL KuaiLe";
    src: url("./fonts/ZCOOLKuaiLe-Fang.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fangcun Space Grotesk";
    src: url("./fonts/SpaceGrotesk-SquareInch.woff2") format("woff2");
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
}

:root {
    --auth-bg: #0d1220;
    --auth-bg-soft: #121b32;
    --auth-glass: rgba(255, 255, 255, 0.08);
    --auth-glass-strong: rgba(255, 255, 255, 0.14);
    --auth-border: rgba(255, 255, 255, 0.14);
    --auth-text: #f6f8ff;
    --auth-muted: rgba(232, 238, 255, 0.66);
    --auth-blue: #5b8cff;
    --auth-red: #f05b74;
    --auth-gold: #f5bf4f;
    --auth-green: #54d39a;
    --auth-cyan: #62d4ff;
    --auth-selection: #4f6bd8;
    --auth-selection-shadow: rgba(79, 107, 216, 0.22);
    --auth-action: #4f6bd8;
    --auth-action-hover: #425cc5;
    --auth-action-active: #354ba7;
    --motion-standard: cubic-bezier(0.2, 0, 0, 1);
    --motion-decelerate: cubic-bezier(0, 0, 0, 1);
    --motion-accelerate: cubic-bezier(0.3, 0, 1, 1);
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: rgba(255, 255, 255, 0.94);
    --panel-soft: rgba(255, 255, 255, 0.68);
    --line: rgba(123, 145, 188, 0.18);
    --text: #132238;
    --muted: #5f718b;
    --primary: #307cff;
    --primary-soft: rgba(48, 124, 255, 0.14);
    --success: #16a46d;
    --danger: #d94b66;
    --shadow: 0 20px 45px rgba(38, 78, 147, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(143, 205, 255, 0.55), transparent 26%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 18%),
        linear-gradient(180deg, #f5f9ff 0%, #e8f0ff 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.12;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.42) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 44px 44px, 72px 72px;
    background-position: 0 0, 24px 28px;
    mix-blend-mode: soft-light;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 14% 12%, rgba(91, 140, 255, 0.24), transparent 26%),
        radial-gradient(circle at 88% 16%, rgba(240, 91, 116, 0.18), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(84, 211, 154, 0.16), transparent 30%),
        linear-gradient(180deg, var(--auth-bg) 0%, #0b1325 56%, #101a30 100%);
}

.background-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.08;
    animation: float-shape 18s ease-in-out infinite alternate;
}

.shape.circle {
    border-radius: 50%;
}

.shape.square {
    border-radius: 30px;
}

.shape.one {
    top: 7%;
    left: 6%;
    width: 190px;
    height: 190px;
    background: var(--auth-blue);
    animation-duration: 22s;
}

.shape.two {
    top: 18%;
    right: 9%;
    width: 132px;
    height: 132px;
    background: var(--auth-red);
    animation-duration: 16s;
}

.shape.three {
    bottom: 8%;
    left: 12%;
    width: 236px;
    height: 236px;
    background: var(--auth-gold);
    animation-duration: 25s;
}

.shape.four {
    right: 12%;
    bottom: 14%;
    width: 170px;
    height: 170px;
    background: var(--auth-green);
    animation-duration: 20s;
}

.shape.five {
    top: 48%;
    left: 48%;
    width: 96px;
    height: 96px;
    background: rgba(255, 255, 255, 0.82);
    animation-duration: 23s;
}

.auth-stage {
    position: relative;
    z-index: 1;
    width: min(1160px, calc(100% - 36px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 0 88px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-dashboard {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, 0.96fr) minmax(420px, 1.04fr);
    gap: 22px;
    align-items: stretch;
}

.auth-side {
    display: grid;
    gap: 18px;
}

.auth-glass,
.auth-card {
    position: relative;
    border-radius: 28px;
    border: 1px solid var(--auth-border);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    overflow: hidden;
    transition:
        transform 0.34s cubic-bezier(0.2, 1.25, 0.3, 1),
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

.auth-glass:hover,
.auth-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.24);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.06));
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.auth-card {
    padding: 28px;
}

.auth-identity-panel {
    min-height: 460px;
    padding: 34px 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-orb-shell {
    position: relative;
    width: 148px;
    height: 148px;
    margin-bottom: 28px;
    display: grid;
    place-items: center;
    animation: breathe 4.2s ease-in-out infinite;
}

.auth-orb-shell::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(
        from 20deg,
        rgba(91, 140, 255, 0.96),
        rgba(98, 212, 255, 0.72),
        rgba(245, 191, 79, 0.72),
        rgba(91, 140, 255, 0.96)
    );
    filter:
        drop-shadow(0 0 24px rgba(91, 140, 255, 0.36))
        drop-shadow(0 0 34px rgba(98, 212, 255, 0.18));
    animation: spin-ring 5.2s linear infinite;
}

.auth-orb-shell::after {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(98, 212, 255, 0.22), transparent 64%);
    filter: blur(16px);
}

.auth-orb-core {
    position: relative;
    z-index: 2;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 0;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04)),
        radial-gradient(circle at 30% 28%, rgba(98, 212, 255, 0.38), transparent 42%),
        linear-gradient(135deg, #1b2b55, #101724);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        0 18px 44px rgba(0, 0, 0, 0.34);
}

.auth-hero-title {
    margin: 0;
    max-width: 8ch;
    font-size: 3.7rem;
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: 0;
    color: #ffffff;
    text-wrap: balance;
}

.auth-hero-copy {
    max-width: 34ch;
    margin: 18px 0 22px;
    color: var(--auth-muted);
    font-size: 15px;
    line-height: 1.72;
}

.auth-chip-row {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 700;
}

.auth-signal-panel {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.auth-signal-item {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-signal-item strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.auth-signal-item p {
    margin: 6px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.65;
}

.auth-card-top {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.auth-brand-block {
    display: grid;
    gap: 6px;
}

.auth-brand {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #fff;
}

.auth-brand-caption {
    margin: 0;
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
    padding: 12px 0;
    border-radius: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 700;
    transition: transform 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.auth-tab:hover {
    color: #fff;
    transform: translateY(-1px);
}

.auth-tab.active {
    color: #fff;
    background: rgba(91, 140, 255, 0.18);
    box-shadow:
        0 0 26px rgba(91, 140, 255, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form.compact {
    margin-top: 14px;
}

.auth-note,
.ticket-hint,
.flash {
    margin-bottom: 14px;
    padding: 15px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-note strong,
.ticket-hint strong {
    display: block;
    margin-bottom: 6px;
}

.auth-note p,
.ticket-hint p {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.7;
}

.ticket-hint {
    color: #fff;
}

.ticket-hint.success {
    border-color: rgba(84, 211, 154, 0.26);
    background: rgba(84, 211, 154, 0.08);
}

.auth-actions {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.text-link {
    text-align: center;
    color: #dce6ff;
    font-weight: 700;
    transition: color 0.24s ease;
}

.text-link:hover {
    color: #fff;
}

.auth-form label {
    display: grid;
    gap: 8px;
}

.auth-form span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.64);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-form input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.32);
}

.auth-form input:focus {
    border-color: rgba(98, 212, 255, 0.48);
    box-shadow: 0 0 0 4px rgba(98, 212, 255, 0.12);
    background: rgba(255, 255, 255, 0.11);
}

.shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    padding: 28px 20px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(22px);
    border-right: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #67b5ff, #2d7cff);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.brand strong,
.brand span {
    display: block;
}

.brand span,
.eyebrow,
.card-foot,
.timeline-item span,
.meta small,
.flash,
.detail-list span {
    color: var(--muted);
}

.nav-list {
    display: grid;
    gap: 8px;
}

.nav-link,
.subnav-link {
    padding: 13px 16px;
    border-radius: 16px;
    transition: 0.2s ease;
}

.nav-link.active,
.nav-link:hover,
.subnav-link.active,
.subnav-link:hover {
    background: var(--panel-strong);
    box-shadow: inset 0 0 0 1px rgba(48, 124, 255, 0.12);
    color: var(--primary);
}

.side-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.side-card {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius-lg);
}

.side-card.compact {
    background: rgba(255, 255, 255, 0.62);
}

.ghost-link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--primary);
    font-weight: 600;
}

.workspace {
    padding: 28px;
}

.topbar,
.section-head,
.hero-actions,
.topbar-actions,
.user-pill,
.list-card,
.timeline-item,
.detail-list div {
    display: flex;
    align-items: center;
}

.topbar,
.section-head,
.hero-actions,
.topbar-actions {
    justify-content: space-between;
}

.topbar {
    gap: 18px;
    margin-bottom: 18px;
}

.topbar h1,
.section-head h3,
.hero-copy h2,
.product-card h3,
.post-card h3 {
    margin: 0;
}

.topbar p,
.hero-copy p,
.section-head p,
.product-card p,
.post-card p,
.list-card p,
.side-card p {
    margin: 0;
}

.user-pill {
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--line);
}

.btn {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    padding: 13px 18px;
    cursor: pointer;
    transition:
        transform 180ms var(--motion-standard),
        box-shadow 180ms var(--motion-standard),
        border-radius 260ms var(--motion-decelerate),
        width 260ms var(--motion-decelerate);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0) scale(0.985);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--auth-blue), #7ea8ff);
    box-shadow: 0 14px 32px rgba(91, 140, 255, 0.3);
}

.btn.secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.btn.wide {
    width: 100%;
}

.btn-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 1.2em;
    border-radius: inherit;
}

.btn-label,
.btn-loader {
    grid-area: 1 / 1;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition:
        opacity 180ms var(--motion-standard),
        transform 280ms var(--motion-decelerate),
        filter 240ms var(--motion-standard);
}

.btn-loader {
    position: relative;
    width: 44px;
    height: 44px;
    opacity: 0;
    transform: scale(0.28);
    pointer-events: none;
    transition:
        opacity 180ms var(--motion-standard),
        transform 280ms var(--motion-decelerate);
}

.btn-loader-dot {
    --angle: calc(var(--dot-index) * 60deg);
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.22);
    transform:
        rotate(var(--angle))
        translateY(-18px)
        scale(0.65);
    opacity: 0;
}

.btn.primary .btn-loader-dot {
    background: rgba(255, 255, 255, 0.96);
}

.btn.secondary .btn-loader-dot {
    background: rgba(98, 212, 255, 0.94);
    box-shadow: 0 0 14px rgba(98, 212, 255, 0.26);
}

.btn.is-loading,
.btn.is-completing {
    border-radius: 999px;
}

.click-ripple-card {
    --ripple-start-opacity: 0.64;
    --infinity-ring-primary: #00f0ff;
    --infinity-ring-secondary: #7b2bff;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--infinity-ring-primary);
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    overflow: visible;
    contain: layout paint;
}

.click-ripple-card .card-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.click-ripple-card .loader-ripple {
    position: relative;
    width: 48px;
    height: 48px;
}

.click-ripple-card .loader-ripple div {
    position: absolute;
    inset: 0;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.04);
    box-shadow: 0 0 12px color-mix(in srgb, currentColor 38%, transparent);
    will-change: transform, opacity;
    animation: click-ripple-ring 520ms var(--motion-standard) forwards;
}

.click-ripple-card .loader-ripple div:nth-child(2) {
    color: var(--infinity-ring-secondary);
    animation-delay: 70ms;
}

.click-ripple-card.is-control-origin .loader-ripple {
    --ripple-start-opacity: 0.92;
    width: 52px;
    height: 52px;
}

.click-ripple-card.is-control-origin .loader-ripple div {
    border-width: 2px;
    animation-duration: 700ms;
}

.click-ripple-card.is-control-origin .loader-ripple div:nth-child(2) {
    animation-delay: 85ms;
}

.click-ripple-card.is-control-origin .loader-ripple::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 18%, transparent);
    transform: scale(0.5);
    animation: control-ripple-core 440ms var(--motion-decelerate) forwards;
}

html[data-theme="dark"] .click-ripple-card {
    --infinity-ring-primary: #00f0ff;
    --infinity-ring-secondary: #7b2bff;
}

.click-ripple-card.is-on-accent {
    --infinity-ring-primary: #8fd5ff;
    --infinity-ring-secondary: #5eead4;
}

.click-ripple-card.is-reduced-motion {
    opacity: 0.72;
}

.click-ripple-card.is-reduced-motion .loader-ripple div {
    inset: 5px;
    opacity: 0.7;
    transform: scale(1);
    animation: none;
}

.click-ripple-card.is-reduced-motion .loader-ripple div:nth-child(2) {
    inset: 14px;
    opacity: 0.46;
}

.click-ripple-card.is-reduced-motion .loader-ripple::after {
    opacity: 0.82;
    transform: scale(1);
    animation: none;
}

.control-outline-ripple {
    --outline-ring: #4f6bd8;
    --outline-glow: rgba(79, 107, 216, 0.42);
    position: fixed;
    z-index: 49;
    background: transparent;
    pointer-events: none;
}

.control-outline-line {
    position: absolute;
    inset: 0;
    border: 1px solid var(--outline-ring);
    border-radius: inherit;
    opacity: 0;
    box-shadow:
        0 0 7px var(--outline-glow),
        0 0 18px color-mix(in srgb, var(--outline-glow) 62%, transparent);
    filter: blur(0.1px);
    pointer-events: none;
    transform-origin: center;
    will-change: transform, opacity, filter;
    animation: control-outline-ripple 1400ms cubic-bezier(0.22, 0.55, 0.25, 1) forwards;
}

html[data-theme="dark"] .control-outline-ripple {
    --outline-ring: #89a5ff;
    --outline-glow: rgba(103, 232, 249, 0.38);
}

.control-outline-ripple.is-on-accent {
    --outline-ring: #8fd5ff;
    --outline-glow: rgba(94, 234, 212, 0.5);
}

.control-outline-ripple.is-reduced-motion .control-outline-line {
    opacity: 0.52;
    transform: scale(1.035);
    animation: none;
}

.btn.is-loading {
    cursor: wait;
    animation: btn-press-settle 240ms var(--motion-decelerate) forwards;
}

.btn.is-loading:hover,
.btn.is-completing:hover {
    transform: none;
}

.btn.is-loading .btn-label {
    opacity: 0;
    transform: scale(0.78);
    filter: blur(8px);
    animation: btn-label-scatter 300ms var(--motion-accelerate) forwards;
}

.btn.is-loading .btn-loader {
    opacity: 1;
    transform: scale(1);
}

.btn.is-loading.is-assembling .btn-loader-dot {
    animation: btn-dot-assemble 420ms var(--motion-decelerate) forwards;
}

.btn.is-loading.is-orbiting .btn-loader-dot {
    opacity: 1;
    animation: btn-orbit 840ms linear infinite;
}

.btn.is-completing .btn-loader {
    opacity: 1;
    transform: scale(1);
}

.btn.is-completing .btn-label {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    animation: btn-label-return 380ms var(--motion-decelerate) forwards;
}

.btn.is-completing .btn-loader-dot {
    animation: btn-dot-release 460ms var(--motion-decelerate) forwards;
}

.btn:disabled {
    pointer-events: none;
}

.flash {
    color: var(--auth-muted);
}

.flash.success {
    border-color: rgba(84, 211, 154, 0.26);
    color: #d8ffeb;
    background: rgba(84, 211, 154, 0.08);
}

.flash.error {
    border-color: rgba(240, 91, 116, 0.28);
    color: #ffd7df;
    background: rgba(240, 91, 116, 0.08);
}

.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.panel {
    padding: 24px;
    border-radius: var(--radius-xl);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(244, 249, 255, 0.9)),
        radial-gradient(circle at right top, rgba(48, 124, 255, 0.08), transparent 45%);
}

.hero-copy h2 {
    margin: 8px 0 12px;
    font-size: 34px;
    line-height: 1.2;
}

.hero-actions {
    justify-content: flex-start;
    gap: 12px;
    margin-top: 20px;
}

.hero-grid,
.grid {
    display: grid;
    gap: 18px;
}

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

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.metric-card,
.shortcut-card {
    background: var(--panel-strong);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    padding: 18px;
}

.metric-card strong {
    display: block;
    margin: 10px 0 8px;
    font-size: 28px;
}

.stack,
.timeline {
    display: grid;
    gap: 14px;
}

.list-card,
.timeline-item,
.detail-list div {
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(123, 145, 188, 0.14);
}

.meta {
    display: grid;
    gap: 6px;
    text-align: right;
}

.tag,
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.tag {
    color: var(--primary);
    background: var(--primary-soft);
}

.status {
    color: var(--success);
    background: rgba(22, 164, 109, 0.12);
}

.product-card,
.post-card {
    display: grid;
    gap: 14px;
}

.price {
    font-size: 28px;
}

.card-foot {
    font-size: 14px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(123, 145, 188, 0.12);
}

th {
    color: var(--muted);
    font-weight: 600;
}

.log-view {
    min-height: 280px;
    margin: 0;
    padding: 18px;
    border-radius: 20px;
    background: #0f1c2d;
    color: #d9e7ff;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, "Courier New", monospace;
}

@keyframes float-shape {
    0% {
        transform: translate3d(-12px, 24px, 0) rotate(0deg) scale(1);
    }
    100% {
        transform: translate3d(42px, -32px, 0) rotate(150deg) scale(1.12);
    }
}

@keyframes spin-ring {
    to {
        transform: rotate(360deg);
    }
}

@keyframes breathe {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.045);
    }
}

@keyframes btn-label-scatter {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.82) translateY(4px);
        filter: blur(8px);
    }
}

@keyframes btn-dot-assemble {
    0% {
        opacity: 0;
        transform:
            rotate(var(--angle))
            translateY(-22px)
            scale(0.18);
        filter: blur(3px);
    }
    58% {
        opacity: 1;
        transform:
            rotate(var(--angle))
            translateY(-7px)
            scale(1.08);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform:
            rotate(var(--angle))
            translateY(-12px)
            scale(0.9);
        filter: blur(0);
    }
}

@keyframes btn-orbit {
    0% {
        transform:
            rotate(var(--angle))
            translateY(-12px)
            scale(0.9);
    }
    100% {
        transform:
            rotate(calc(var(--angle) + 360deg))
            translateY(-12px)
            scale(0.9);
    }
}

@keyframes btn-dot-release {
    0% {
        opacity: 1;
        transform:
            rotate(var(--angle))
            translateY(-12px)
            scale(0.9);
    }
    48% {
        opacity: 1;
        transform:
            rotate(var(--angle))
            translateY(-20px)
            scale(0.76);
    }
    100% {
        opacity: 0;
        transform:
            rotate(var(--angle))
            translateY(0)
            scale(0.18);
    }
}

@keyframes btn-label-return {
    0% {
        opacity: 0;
        transform: scale(0.86) translateY(4px);
        filter: blur(8px);
    }
    70% {
        opacity: 1;
        transform: scale(1.025);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes click-ripple-ring {
    0% {
        opacity: var(--ripple-start-opacity);
        transform: scale(0.04);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

@keyframes control-ripple-core {
    0% {
        opacity: 0.96;
        transform: scale(0.5);
    }
    46% {
        opacity: 0.9;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(2.25);
    }
}

@keyframes control-outline-ripple {
    0% {
        opacity: 0.76;
        transform: scale(1);
        filter: blur(0.1px);
    }
    46% {
        opacity: 0.5;
        filter: blur(0.45px);
    }
    100% {
        opacity: 0;
        transform: scale(var(--outline-scale-x), var(--outline-scale-y));
        filter: blur(1.3px);
    }
}

@keyframes btn-press-settle {
    0% {
        transform: scale(0.985);
    }
    55% {
        transform: scale(1.012);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 1160px) {
    .auth-dashboard {
        grid-template-columns: 1fr;
    }

    .auth-identity-panel {
        min-height: auto;
    }

    .auth-side {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1080px) {
    .shell,
    .hero-panel,
    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 780px) {
    .auth-stage {
        width: min(100% - 20px, 1320px);
        padding-top: 20px;
    }

    .auth-side,
    .auth-side.auth-side-right {
        grid-template-columns: 1fr;
    }

    .auth-card,
    .auth-identity-panel,
    .auth-metrics-panel,
    .auth-flow-panel,
    .auth-side-note-panel {
        padding: 20px;
    }
}

@media (max-width: 720px) {
    .workspace,
    .sidebar {
        padding: 18px;
    }

    .topbar,
    .hero-actions,
    .topbar-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy h2 {
        font-size: 28px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .auth-card .btn.primary::before,
    .auth-card .btn.primary::after {
        animation-name: button-orbit-compact;
    }
}

@media (max-width: 760px) {
    body:not(:has(.auth-shell)) {
        overflow-x: hidden;
    }

    .shell {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar,
    .workspace,
    .panel,
    .topbar,
    .topbar > div,
    .topbar-actions,
    .grid,
    .hero-panel,
    .table-wrap {
        min-width: 0;
    }

    .sidebar {
        padding:
            max(16px, env(safe-area-inset-top))
            14px
            14px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.58);
    }

    .brand {
        gap: 12px;
        margin-bottom: 14px;
    }

    .brand-mark {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 22px;
    }

    .brand strong {
        font-size: 18px;
        line-height: 1.2;
    }

    .brand span {
        margin-top: 2px;
        font-size: 13px;
        line-height: 1.35;
    }

    .nav-list,
    .subnav {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-list::-webkit-scrollbar,
    .subnav::-webkit-scrollbar {
        display: none;
    }

    .nav-link,
    .subnav-link {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 11px 15px;
        border-radius: 999px;
        white-space: nowrap;
    }

    .side-card {
        display: none;
    }

    .workspace {
        width: 100%;
        padding:
            16px
            14px
            max(22px, env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .topbar {
        width: 100%;
        gap: 12px;
        margin-bottom: 14px;
    }

    .topbar h1 {
        max-width: 100%;
        overflow-wrap: anywhere;
        font-size: 30px;
        line-height: 1.16;
    }

    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        justify-content: stretch;
        gap: 8px;
    }

    .topbar-actions form {
        min-width: 0;
    }

    .topbar-actions .btn,
    .topbar-actions .theme-toggle {
        min-height: 44px;
    }

    .topbar-actions .btn.secondary {
        color: var(--text);
        background: var(--panel-strong);
        border-color: var(--line);
        box-shadow: none;
    }

    .user-pill {
        min-width: 0;
        padding: 9px 11px;
    }

    .user-pill strong,
    .user-pill span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .subnav {
        margin: 0 -14px 14px;
        padding: 0 14px 4px;
    }

    .panel {
        width: 100%;
        padding: 18px;
        border-radius: 18px;
        overflow: hidden;
    }

    .hero-panel,
    .grid.two,
    .grid.three {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-panel,
    .grid.two,
    .grid.three {
        gap: 14px;
        margin-top: 14px;
    }

    .hero-copy h2 {
        font-size: 26px;
        overflow-wrap: anywhere;
    }

    .hero-actions {
        width: 100%;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
        min-height: 44px;
        text-align: center;
    }

    .section-head,
    .list-card,
    .timeline-item,
    .detail-list div {
        align-items: flex-start;
    }

    .section-head {
        gap: 10px;
    }

    .section-head h3,
    .product-card h3,
    .post-card h3,
    .shortcut-card strong,
    .list-card strong,
    .timeline-item strong,
    .detail-list strong {
        overflow-wrap: anywhere;
    }

    .list-card,
    .timeline-item,
    .detail-list div {
        flex-direction: column;
        gap: 7px;
        padding: 14px;
        border-radius: 14px;
    }

    .table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 620px;
    }

    th,
    td {
        padding: 12px 10px;
        white-space: nowrap;
    }

    .log-view {
        min-height: 220px;
        padding: 14px;
        border-radius: 14px;
        font-size: 12px;
    }
}

body::before {
    display: block;
    opacity: 0.14;
}

.auth-shell {
    color: #f6f3ea;
    background:
        radial-gradient(circle at 14% 10%, rgba(92, 105, 151, 0.34), transparent 30%),
        radial-gradient(circle at 84% 18%, rgba(215, 157, 42, 0.13), transparent 26%),
        radial-gradient(circle at 50% 92%, rgba(91, 103, 150, 0.22), transparent 34%),
        #2c2d47;
}

.background-shapes {
    display: block;
    opacity: 0.6;
}

.shape {
    opacity: 0.045;
    filter: blur(0.2px);
}

.shape.one,
.shape.four {
    background: #fff0b4;
}

.shape.two,
.shape.three {
    background: #d8981f;
}

.shape.five {
    display: none;
}

.auth-stage {
    width: min(100% - 32px, 480px);
    min-height: 100dvh;
    padding: 24px 0;
}

.auth-dashboard {
    display: block;
    animation: auth-page-in 220ms var(--motion-decelerate) both;
}

.page-leaving .auth-dashboard {
    animation: auth-page-out 170ms var(--motion-standard) both;
}

.auth-glass,
.auth-card {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(35, 36, 58, 0.78);
    box-shadow: none;
    backdrop-filter: blur(20px) saturate(132%);
    -webkit-backdrop-filter: blur(20px) saturate(132%);
}

.auth-glass:hover,
.auth-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(38, 39, 63, 0.82);
    box-shadow: none;
}

.auth-card {
    padding: 24px;
}

.auth-card-top {
    gap: 16px;
    margin-bottom: 18px;
}

.auth-brand {
    color: #f7f1e1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-brand-caption {
    color: rgba(247, 241, 225, 0.68);
    font-size: 14px;
}

.auth-tabs {
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.auth-tab {
    border-radius: 7px;
    padding: 9px 0;
    color: rgba(247, 241, 225, 0.62);
    font-size: 14px;
    font-weight: 600;
    transition:
        background 180ms var(--motion-standard),
        color 180ms var(--motion-standard),
        transform 180ms var(--motion-standard);
}

.auth-tab:hover {
    color: #f7f1e1;
    transform: none;
}

.auth-tab.active {
    color: #211802;
    background: linear-gradient(135deg, #fff0a2, #e5a72a 62%, #bd780e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-note,
.ticket-hint,
.flash {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(247, 241, 225, 0.74);
    padding: 12px 13px;
}

.auth-note strong,
.ticket-hint strong {
    color: #f7f1e1;
    font-size: 14px;
}

.auth-note p,
.ticket-hint p {
    color: rgba(247, 241, 225, 0.68);
    line-height: 1.55;
}

.ticket-hint {
    color: #f7f1e1;
}

.ticket-hint.success,
.flash.success {
    border-color: rgba(84, 211, 154, 0.28);
    color: #c9f7dc;
    background: rgba(84, 211, 154, 0.08);
}

.flash.error {
    border-color: rgba(240, 91, 116, 0.28);
    color: #ffd7df;
    background: rgba(240, 91, 116, 0.08);
}

.auth-form {
    gap: 13px;
}

.auth-form label {
    gap: 7px;
}

.auth-form span {
    color: rgba(247, 241, 225, 0.72);
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.auth-form input {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.08);
    color: #f8f3e6;
    padding: 12px 13px;
    transition:
        border-color 170ms var(--motion-standard),
        box-shadow 170ms var(--motion-standard);
}

.auth-form input::placeholder {
    color: rgba(247, 241, 225, 0.52);
}

.auth-form input:focus {
    border-color: rgba(255, 224, 128, 0.55);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(229, 167, 42, 0.15);
}

.auth-actions {
    gap: 10px;
    margin-top: 14px;
}

.text-link {
    color: rgba(247, 241, 225, 0.7);
    font-size: 14px;
    font-weight: 600;
}

.text-link:hover {
    color: #fff0a2;
}

.btn {
    border-radius: 10px;
    padding: 12px 16px;
}

.btn.primary {
    overflow: visible;
    color: #231700;
    background:
        radial-gradient(circle at 16% 50%, rgba(255, 255, 255, 0.95) 0 7%, transparent 8%),
        linear-gradient(135deg, #fff2a8 0%, #f0ca4e 33%, #d69517 72%, #ad6c09 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        0 10px 18px rgba(43, 32, 9, 0.18);
}

.btn.primary:hover {
    background:
        radial-gradient(circle at 16% 50%, rgba(255, 255, 255, 0.98) 0 7%, transparent 8%),
        linear-gradient(135deg, #fff5b8 0%, #f2ce55 34%, #daa021 72%, #b4740d 100%);
}

.btn.secondary {
    color: #f7f1e1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.auth-card .btn.primary.wide {
    width: min(100%, 292px);
    justify-self: center;
    border-radius: 999px;
    font-weight: 800;
}

.auth-card .btn.primary::before,
.auth-card .btn.primary::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    background: #fff8cc;
    box-shadow: 0 0 12px rgba(255, 238, 148, 0.78);
    animation: button-orbit 3.2s linear infinite;
}

.auth-card .btn.primary::after {
    width: 5px;
    height: 5px;
    background: rgba(255, 245, 191, 0.86);
    animation-duration: 4.6s;
    animation-direction: reverse;
}

.btn.is-loading,
.btn.is-completing {
    border-radius: 999px;
}

.btn.primary .btn-loader-dot {
    background: rgba(255, 255, 255, 0.96);
}

.btn.secondary .btn-loader-dot {
    background: #f0ca4e;
    box-shadow: none;
}

@keyframes button-orbit {
    0% {
        transform: rotate(0deg) translateX(154px) rotate(0deg);
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) translateX(154px) rotate(-360deg);
        opacity: 0.55;
    }
}

@keyframes button-orbit-compact {
    0% {
        transform: rotate(0deg) translateX(126px) rotate(0deg);
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) translateX(126px) rotate(-360deg);
        opacity: 0.55;
    }
}

@keyframes auth-page-in {
    0% {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes auth-page-out {
    0% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-6px);
        filter: blur(5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 720px) and (orientation: portrait) {
    .home-fangxing-core-settings {
        max-height: calc(100% - 88px);
        padding: 8px;
    }

    .home-fangxing-core-settings > header {
        padding-bottom: 6px;
    }

    .home-fangxing-core-form,
    .home-fangxing-core-form:first-of-type {
        margin-top: 6px;
        padding-top: 6px;
        gap: 4px;
    }

    .home-fangxing-space-settings-form {
        gap: 3px;
    }

    .home-fangxing-space-settings-form .home-fangxing-core-save {
        min-height: 34px;
    }

}

/* Fangxing Space: a deterministic two-mode private scene. */
.home-fangxing-space {
    position: absolute;
    inset: 0;
    z-index: 6;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: #03090d;
    transition: opacity 320ms var(--motion-standard), visibility 0s linear 320ms;
}

.home-fangxing-space.is-visible,
.home-shell[data-home-view="fangxing-space"] .home-fangxing-space {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.home-fangxing-space.is-visible.is-entering-from-core,
.home-fangxing-space.is-visible.is-entering-from-galaxy {
    transition: none;
}

.home-fangxing-space.is-visible.is-entering-from-galaxy {
    contain: paint;
    animation: fangxing-space-layer-from-galaxy 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: var(--space-entry-x, 50%) var(--space-entry-y, 50%);
    will-change: opacity, transform;
}

.home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-canvas {
    animation: fangxing-space-scene-from-galaxy 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: var(--space-entry-x, 50%) var(--space-entry-y, 50%);
}

.home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-hud,
.home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-coordinates,
.home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-mode,
.home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-toolbox,
.home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-ground-controls,
.home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-return {
    animation: fangxing-space-controls-from-galaxy 200ms cubic-bezier(0.16, 1, 0.3, 1) 470ms both;
}

@keyframes fangxing-space-layer-from-galaxy {
    0%, 16% { opacity: 0; transform: scale(1.12); }
    48% { opacity: 0.66; }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fangxing-space-scene-from-galaxy {
    0% { opacity: 0.28; transform: scale(1.08); }
    48% { opacity: 0.88; }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fangxing-space-controls-from-galaxy {
    from { opacity: 0; }
    to { opacity: 1; }
}

.home-galaxy-space-fold {
    position: absolute;
    inset: 0;
    z-index: 7;
    overflow: hidden;
    pointer-events: none;
    isolation: isolate;
    contain: paint;
}

.home-galaxy-space-fold-core,
.home-galaxy-space-fold-frame,
.home-galaxy-space-fold-shard {
    position: absolute;
    display: block;
    pointer-events: none;
    left: var(--space-entry-x, 50%);
    top: var(--space-entry-y, 50%);
}

.home-galaxy-space-fold-core {
    z-index: 3;
    width: 18px;
    aspect-ratio: 1;
    opacity: 0;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    background: #d9fff7;
    box-shadow: 0 0 12px rgba(122, 244, 218, 0.72);
    transform: translate(-50%, -50%) rotate(45deg) scale(0.08);
}

.home-galaxy-space-fold-frame {
    z-index: 2;
    width: min(13vmin, 112px);
    aspect-ratio: 1;
    opacity: 0;
    border: 1px solid rgba(162, 255, 235, 0.74);
    transform: translate(-50%, -50%) rotate(45deg) scale(0.08);
}

.home-galaxy-space-fold-shard {
    z-index: 1;
    width: clamp(92px, 19vmin, 210px);
    height: 2px;
    opacity: 0;
    background: linear-gradient(90deg, rgba(226, 255, 249, 0.82), rgba(94, 215, 225, 0.34) 42%, transparent);
    transform-origin: 0 50%;
    transform: translateY(-50%) rotate(var(--fold-angle)) scaleX(0.03);
    mix-blend-mode: screen;
}

.home-galaxy-space-fold.is-running .home-galaxy-space-fold-core {
    animation: galaxy-space-fold-core 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-galaxy-space-fold.is-running .home-galaxy-space-fold-frame {
    animation: galaxy-space-fold-frame 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-galaxy-space-fold.is-running .home-galaxy-space-fold-shard {
    animation: galaxy-space-fold-shard 600ms cubic-bezier(0.16, 1, 0.3, 1) var(--fold-delay) both;
}

.home-empty-stage.is-space-entering-from-galaxy .home-galaxy-canvas {
    animation: galaxy-space-yield 640ms cubic-bezier(0.4, 0, 0.2, 1) both;
    transform-origin: var(--space-entry-x, 50%) var(--space-entry-y, 50%);
}

.home-empty-stage.is-space-entering-from-galaxy .home-galaxy-hud,
.home-empty-stage.is-space-entering-from-galaxy .home-galaxy-coordinates,
.home-empty-stage.is-space-entering-from-galaxy .home-galaxy-labels,
.home-empty-stage.is-space-entering-from-galaxy .home-galaxy-explorer,
.home-empty-stage.is-space-entering-from-galaxy .home-galaxy-philosophy,
.home-empty-stage.is-space-entering-from-galaxy .home-galaxy-return,
.home-empty-stage.is-space-entering-from-galaxy .home-fangxing-core-choice {
    animation: galaxy-space-ui-yield 260ms cubic-bezier(0.25, 1, 0.5, 1) both;
    pointer-events: none;
}

@keyframes galaxy-space-fold-core {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.08); }
    18% { opacity: 1; }
    46% { opacity: 0.96; transform: translate(-50%, -50%) rotate(135deg) scale(1.22); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(225deg) scale(0.2); }
}

@keyframes galaxy-space-fold-frame {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.08); }
    24% { opacity: 0.8; }
    74% { opacity: 0.28; transform: translate(-50%, -50%) rotate(135deg) scale(1.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(165deg) scale(1.9); }
}

@keyframes galaxy-space-fold-shard {
    0% { opacity: 0; transform: translateY(-50%) rotate(var(--fold-angle)) scaleX(0.03); }
    18% { opacity: 0.72; }
    60% { opacity: 0.28; transform: translateY(-50%) rotate(var(--fold-angle)) scaleX(1); }
    100% { opacity: 0; transform: translateY(-50%) rotate(var(--fold-angle)) scaleX(1.55); }
}

@keyframes galaxy-space-yield {
    0%, 14% { opacity: 1; transform: scale(1); }
    58% { opacity: 0.42; transform: scale(1.085); }
    100% { opacity: 0; transform: scale(1.16); }
}

@keyframes galaxy-space-ui-yield {
    from { opacity: 1; }
    to { opacity: 0; }
}

.home-fangxing-space.is-entering-from-core .home-fangxing-space-canvas {
    animation: fangxing-space-scene-from-core 1160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-fangxing-space.is-entering-from-core .home-fangxing-space-hud,
.home-fangxing-space.is-entering-from-core .home-fangxing-space-coordinates,
.home-fangxing-space.is-entering-from-core .home-fangxing-space-mode,
.home-fangxing-space.is-entering-from-core .home-fangxing-space-toolbox,
.home-fangxing-space.is-entering-from-core .home-fangxing-space-ground-controls,
.home-fangxing-space.is-entering-from-core .home-fangxing-space-return {
    animation: fangxing-space-controls-from-core 520ms cubic-bezier(0.16, 1, 0.3, 1) 720ms both;
}

@keyframes fangxing-space-scene-from-core {
    0%, 24% { opacity: 0.18; transform: scale(1.075); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fangxing-space-controls-from-core {
    from { opacity: 0; }
    to { opacity: 1; }
}

.home-core-space-transition {
    position: absolute;
    inset: 0;
    z-index: 9;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    background: #02090d;
    contain: paint;
    will-change: opacity;
}

.home-core-space-transition::before,
.home-core-space-transition::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    aspect-ratio: 1;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.08);
    will-change: transform, opacity;
}

.home-core-space-transition::before {
    width: min(48vmin, 440px);
    border: 1px solid rgba(153, 255, 220, 0.78);
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(83, 193, 211, 0.18),
        inset 0 0 34px rgba(64, 220, 181, 0.18);
}

.home-core-space-transition::after {
    width: min(12vmin, 104px);
    border-radius: 50%;
    background: radial-gradient(circle, #f1fff9 0 7%, #83f5cc 16%, rgba(78, 203, 202, 0.4) 39%, transparent 72%);
}

.home-core-space-transition.is-running {
    animation: core-space-curtain 1320ms cubic-bezier(0.65, 0, 0.2, 1) forwards;
}

.home-core-space-transition.is-running::before {
    animation: core-space-aperture 1320ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.home-core-space-transition.is-running::after {
    animation: core-space-seed 1320ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes core-space-curtain {
    0% { opacity: 0; }
    24%, 78% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes core-space-aperture {
    0%, 10% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.08); }
    28% { opacity: 0.92; transform: translate3d(-50%, -50%, 0) scale(0.42); }
    62% { opacity: 0.48; transform: translate3d(-50%, -50%, 0) scale(1.18); }
    100% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(4.8); }
}

@keyframes core-space-seed {
    0%, 12% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.12); }
    31% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
    58% { opacity: 0.86; transform: translate3d(-50%, -50%, 0) scale(2.4); }
    100% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(14); }
}

@media (prefers-reduced-motion: reduce) {
    .home-fangxing-space.is-visible.is-entering-from-galaxy {
        clip-path: none;
        animation: fangxing-space-layer-from-galaxy-reduced 220ms ease-out both;
        will-change: opacity;
    }

    .home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-canvas,
    .home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-hud,
    .home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-coordinates,
    .home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-mode,
    .home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-toolbox,
    .home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-ground-controls,
    .home-fangxing-space.is-entering-from-galaxy .home-fangxing-space-return,
    .home-fangxing-space.is-entering-from-core .home-fangxing-space-canvas,
    .home-fangxing-space.is-entering-from-core .home-fangxing-space-hud,
    .home-fangxing-space.is-entering-from-core .home-fangxing-space-coordinates,
    .home-fangxing-space.is-entering-from-core .home-fangxing-space-mode,
    .home-fangxing-space.is-entering-from-core .home-fangxing-space-toolbox,
    .home-fangxing-space.is-entering-from-core .home-fangxing-space-ground-controls,
    .home-fangxing-space.is-entering-from-core .home-fangxing-space-return {
        animation: none;
    }

    .home-core-space-transition.is-running {
        animation: core-space-curtain-reduced 220ms ease-out forwards;
    }

    .home-core-space-transition::before,
    .home-core-space-transition::after {
        display: none;
    }
}

@keyframes fangxing-space-layer-from-galaxy-reduced {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes core-space-curtain-reduced {
    0% { opacity: 0; }
    45% { opacity: 1; }
    100% { opacity: 0; }
}

.home-fangxing-space::before,
.home-fangxing-space::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-fangxing-space.is-ground-mode::before {
    background: linear-gradient(180deg, rgba(7, 39, 43, 0.12), transparent 24%, rgba(31, 58, 42, 0.08) 72%, rgba(18, 35, 26, 0.18));
}

.home-fangxing-space.is-ground-mode::after {
    opacity: 0;
}

.home-fangxing-space.is-ground-mode .home-fangxing-space-hud strong,
.home-fangxing-space.is-ground-mode .home-fangxing-space-hud > span,
.home-fangxing-space.is-ground-mode .home-fangxing-space-hud small,
.home-fangxing-space.is-ground-mode .home-fangxing-space-coordinates {
    text-shadow: 0 1px 5px rgba(2, 18, 20, 0.72);
}

.home-fangxing-space::before {
    background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--space-primary, #58d6c6) 13%, transparent), transparent 47%), linear-gradient(180deg, rgba(4, 16, 22, 0.05), rgba(1, 5, 9, 0.76));
    z-index: 1;
}

.home-fangxing-space::after {
    z-index: 2;
    opacity: 0.32;
    background-image: linear-gradient(rgba(137, 220, 214, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(137, 220, 214, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, transparent, black 24%, black 78%, transparent);
}

.home-fangxing-space-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    user-select: none;
    contain: strict;
}

.home-fangxing-space-load-veil {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
    overflow: hidden;
    isolation: isolate;
    contain: paint;
    color: #eafff8;
    background:
        radial-gradient(circle at 50% 48%, rgba(104, 225, 196, 0.2), transparent 25%),
        radial-gradient(circle at 50% 52%, rgba(22, 82, 96, 0.56), transparent 64%),
        #041017;
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-fangxing-space-load-veil::before,
.home-fangxing-space-load-veil::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(62vmin, 520px);
    aspect-ratio: 1;
    border: 1px solid rgba(148, 255, 223, 0.24);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.46);
    opacity: 0;
    pointer-events: none;
}

.home-fangxing-space-load-veil::after {
    width: min(92vmin, 760px);
    border-color: rgba(101, 215, 224, 0.12);
}

.home-fangxing-space-load-veil.is-active {
    opacity: 1;
    pointer-events: auto;
}

.home-fangxing-space-load-veil.is-active::before {
    animation: fangxing-ground-load-ring 1500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-fangxing-space-load-veil.is-active::after {
    animation: fangxing-ground-load-ring 1900ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both;
}

.home-fangxing-space-load-veil.is-completing {
    opacity: 0;
    transition-duration: 460ms;
}

.home-fangxing-space-load-orbit {
    position: relative;
    z-index: 1;
    width: min(26vmin, 190px);
    aspect-ratio: 1;
    border: 1px solid rgba(169, 255, 225, 0.26);
    border-radius: 50%;
    transform: rotate(-18deg) scale(0.74);
    box-shadow: 0 0 40px rgba(83, 218, 198, 0.13), inset 0 0 22px rgba(88, 205, 227, 0.12);
    animation: fangxing-ground-load-orbit 1450ms linear infinite;
}

.home-fangxing-space-load-orbit::before,
.home-fangxing-space-load-orbit::after {
    content: "";
    position: absolute;
    inset: 13%;
    border: 1px solid rgba(104, 215, 227, 0.3);
    border-radius: 50%;
    transform: rotate(62deg) scaleX(0.46);
}

.home-fangxing-space-load-orbit::after {
    transform: rotate(-56deg) scaleX(0.46);
    border-color: rgba(197, 255, 211, 0.28);
}

.home-fangxing-space-load-orbit i {
    position: absolute;
    left: 50%;
    top: -5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #eafff7;
    box-shadow: 0 0 15px rgba(142, 255, 224, 0.92);
    transform: translateX(-50%);
}

.home-fangxing-space-load-orbit i:nth-child(2) {
    top: auto;
    bottom: 7%;
    left: 14%;
    width: 6px;
    height: 6px;
    opacity: 0.72;
}

.home-fangxing-space-load-orbit i:nth-child(3) {
    top: 32%;
    left: auto;
    right: 4%;
    width: 5px;
    height: 5px;
    opacity: 0.58;
}

.home-fangxing-space-load-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    text-align: center;
}

.home-fangxing-space-load-copy span {
    color: rgba(174, 239, 224, 0.68);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.16em;
}

.home-fangxing-space-load-copy strong {
    color: #f2fff9;
    font-size: 15px;
    font-weight: 650;
}

@keyframes fangxing-ground-load-ring {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.46); }
    20% { opacity: 0.82; }
    72% { opacity: 0.36; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); }
}

@keyframes fangxing-ground-load-orbit {
    from { transform: rotate(-18deg) scale(0.74); }
    to { transform: rotate(342deg) scale(0.74); }
}

@media (prefers-reduced-motion: reduce) {
    .home-fangxing-space-load-veil,
    .home-fangxing-space-load-veil.is-completing {
        transition-duration: 120ms;
    }

    .home-fangxing-space-load-veil.is-active::before,
    .home-fangxing-space-load-veil.is-active::after,
    .home-fangxing-space-load-orbit {
        animation-duration: 1ms;
        animation-iteration-count: 1;
    }
}

.home-fangxing-space.is-dragging-space .home-fangxing-space-canvas {
    cursor: grabbing;
}

.home-fangxing-space.is-ground-mode .home-fangxing-space-canvas {
    cursor: grab;
}

.home-fangxing-space.is-ground-mode.is-dragging-space .home-fangxing-space-canvas {
    cursor: grabbing;
}

.home-fangxing-space-hud,
.home-fangxing-space-coordinates,
.home-fangxing-space-mode,
.home-fangxing-space-territory,
.home-fangxing-space-ground-controls,
.home-fangxing-space-return {
    position: absolute;
    z-index: 4;
}

.home-fangxing-space-hud {
    top: 28px;
    left: 30px;
    display: grid;
    gap: 6px;
}

.home-fangxing-space-hud > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--space-glow, #c9ff9d);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
}

.home-fangxing-space-hud > span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--space-glow, #c9ff9d);
    box-shadow: 0 0 13px var(--space-glow, #c9ff9d);
}

.home-fangxing-space-hud strong {
    color: #f0fff9;
    font-size: 22px;
    line-height: 1.1;
}

.home-fangxing-space-hud small,
.home-fangxing-space-coordinates {
    color: rgba(162, 208, 203, 0.68);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-fangxing-space-toolbox {
    position: absolute;
    top: 104px;
    left: 28px;
    z-index: 5;
    width: 224px;
    padding: 12px;
    border: 1px solid rgba(132, 207, 206, 0.24);
    border-radius: 9px;
    color: #eafff8;
    background: rgba(4, 19, 25, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.home-fangxing-space-toolbox[hidden] {
    display: none !important;
}

.home-fangxing-space.is-readonly .home-fangxing-space-toolbox {
    display: none;
}

.home-fangxing-space-toolbox header {
    position: relative;
    display: grid;
    gap: 3px;
    padding-right: 30px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(132, 207, 206, 0.16);
}

.home-fangxing-space-toolbox-toggle {
    position: absolute;
    top: -2px;
    right: 0;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(132, 207, 206, 0.24);
    border-radius: 7px;
    color: rgba(225, 249, 242, 0.76);
    background: rgba(8, 31, 38, 0.66);
    cursor: pointer;
}

.home-fangxing-space-toolbox-toggle:hover {
    color: #f3fffb;
    border-color: var(--space-glow, #c9ff9d);
}

.home-fangxing-space-toolbox-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 180ms var(--motion-standard);
}

.home-fangxing-space-toolbox.is-collapsed {
    width: 178px;
    padding-bottom: 9px;
}

.home-fangxing-space-toolbox.is-collapsed > :not(header) {
    display: none;
}

.home-fangxing-space-toolbox.is-collapsed .home-fangxing-space-toolbox-toggle svg {
    transform: rotate(180deg);
}

.home-fangxing-space-toolbox.is-collapsed header {
    padding-bottom: 0;
    border-bottom: 0;
}

.home-fangxing-space-toolbox.is-collapsed header small {
    display: none;
}

.home-fangxing-space-toolbox header span {
    color: var(--space-glow, #c9ff9d);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-fangxing-space-toolbox header strong {
    font-size: 13px;
}

.home-fangxing-space-toolbox header small,
.home-fangxing-space-editor-status {
    color: rgba(174, 215, 211, 0.68);
    font-size: 9px;
    line-height: 1.4;
}

.home-fangxing-space-items {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.home-fangxing-space-items button {
    min-width: 0;
    min-height: 52px;
    padding: 5px 2px;
    display: grid;
    place-items: center;
    gap: 3px;
    border: 1px solid rgba(132, 207, 206, 0.18);
    border-radius: 7px;
    color: rgba(215, 242, 237, 0.78);
    background: rgba(8, 31, 38, 0.62);
    cursor: pointer;
}

.home-fangxing-space-items button:hover,
.home-fangxing-space-items button.is-selected {
    color: #f3fffb;
    border-color: var(--space-glow, #c9ff9d);
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 25%, rgba(8, 31, 38, 0.9));
}

.home-fangxing-space-items button:disabled,
.home-fangxing-space-ocean-actions button:disabled,
.home-fangxing-space-item-actions button:disabled {
    color: rgba(174, 207, 203, 0.34);
    border-color: rgba(132, 207, 206, 0.1);
    background: rgba(7, 22, 28, 0.42);
    cursor: not-allowed;
    opacity: 0.58;
}

.home-fangxing-space-items button:disabled i {
    color: rgba(178, 222, 215, 0.34);
}

.home-fangxing-space-items i {
    color: var(--space-glow, #c9ff9d);
    font-size: 15px;
    font-style: normal;
    line-height: 1;
}

.home-fangxing-space-items span {
    font-size: 8px;
}

.home-fangxing-space-time {
    margin-top: 9px;
    padding: 8px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 7px 8px;
    border-block: 1px solid rgba(132, 207, 206, 0.14);
}

.home-fangxing-space-time-readout {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.home-fangxing-space-time-readout span {
    color: rgba(174, 215, 211, 0.62);
    font-size: 8px;
}

.home-fangxing-space-time-readout output {
    color: #eafff8;
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.home-fangxing-space-time-flow {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(218, 241, 238, 0.78);
    font-size: 8px;
    cursor: pointer;
    user-select: none;
}

.home-fangxing-space-time-flow input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.home-fangxing-space-time-flow > span {
    position: relative;
    width: 28px;
    height: 16px;
    flex: 0 0 auto;
    border: 1px solid rgba(138, 190, 190, 0.32);
    border-radius: 999px;
    background: rgba(2, 13, 18, 0.74);
    transition: border-color 160ms ease, background 160ms ease;
}

.home-fangxing-space-time-flow i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(188, 216, 214, 0.64);
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background 160ms ease, box-shadow 160ms ease;
}

.home-fangxing-space-time-flow input:checked + span {
    border-color: color-mix(in srgb, var(--space-glow, #c9ff9d) 52%, transparent);
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 26%, rgba(3, 23, 27, 0.9));
}

.home-fangxing-space-time-flow input:checked + span i {
    background: #eafff8;
    box-shadow: 0 0 9px color-mix(in srgb, var(--space-glow, #c9ff9d) 62%, transparent);
    transform: translateX(12px);
}

.home-fangxing-space-time-flow input:focus-visible + span,
.home-fangxing-space-day-toggle:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--space-glow, #c9ff9d) 72%, white);
    outline-offset: 2px;
}

.home-fangxing-space-time-flow b {
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-fangxing-space-day-toggle {
    min-height: 26px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(132, 207, 206, 0.22);
    border-radius: 6px;
    color: rgba(231, 247, 243, 0.86);
    background: rgba(8, 31, 38, 0.62);
    font-size: 8px;
    cursor: pointer;
}

.home-fangxing-space-day-toggle:hover {
    border-color: color-mix(in srgb, var(--space-glow, #c9ff9d) 54%, transparent);
    color: #f3fffb;
}

.home-fangxing-space-day-toggle i {
    position: relative;
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.home-fangxing-space-day-toggle[data-phase="day"] i {
    border: 1px solid #cce4ff;
    box-shadow: inset 3px -1px 0 rgba(8, 31, 38, 0.96), 0 0 5px rgba(142, 188, 236, 0.5);
}

.home-fangxing-space-day-toggle[data-phase="night"] i {
    background: #ffd98c;
    box-shadow: 0 0 7px rgba(255, 190, 82, 0.6);
}

.home-fangxing-space-ocean {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid rgba(87, 193, 211, 0.2);
    border-radius: 7px;
    background: rgba(4, 25, 34, 0.58);
    transition: border-color 180ms ease, background 180ms ease;
}

.home-fangxing-space-ocean.is-planning {
    border-color: rgba(112, 226, 239, 0.58);
    background: rgba(5, 39, 52, 0.78);
    box-shadow: inset 0 0 0 1px rgba(132, 239, 246, 0.2);
}

.home-fangxing-space-ocean-readout {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.home-fangxing-space-ocean-readout svg {
    width: 22px;
    height: 22px;
    color: #75ddea;
    filter: drop-shadow(0 0 5px rgba(89, 213, 232, 0.28));
}

.home-fangxing-space-ocean-readout div {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.home-fangxing-space-ocean-readout strong {
    color: #e8fbff;
    font-size: 9px;
    line-height: 1.2;
}

.home-fangxing-space-ocean-readout span {
    overflow: hidden;
    color: rgba(170, 218, 225, 0.64);
    font-size: 7px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-fangxing-space-ocean-readout b {
    color: rgba(184, 231, 237, 0.66);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 7px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.home-fangxing-space-ocean-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px 42px 38px;
    gap: 4px;
    margin-top: 7px;
}

.home-fangxing-space-ocean-actions button {
    min-width: 0;
    min-height: 27px;
    padding: 0 5px;
    border: 1px solid rgba(104, 194, 207, 0.2);
    border-radius: 6px;
    color: rgba(218, 245, 247, 0.78);
    background: rgba(6, 28, 37, 0.78);
    font-size: 8px;
    cursor: pointer;
}

.home-fangxing-space-ocean-actions button:hover:not(:disabled),
.home-fangxing-space-ocean-actions button:focus-visible {
    color: #f2feff;
    border-color: rgba(113, 224, 238, 0.62);
}

.home-fangxing-space-ocean-actions .is-primary {
    color: #ecfdff;
    border-color: rgba(102, 219, 232, 0.52);
    background: rgba(19, 91, 106, 0.56);
}

.home-fangxing-space-item-actions {
    display: flex;
    gap: 5px;
    margin-top: 9px;
}

.home-fangxing-space-item-actions button {
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid rgba(132, 207, 206, 0.2);
    border-radius: 6px;
    color: rgba(222, 246, 240, 0.82);
    background: rgba(8, 31, 38, 0.6);
    font-size: 9px;
    cursor: pointer;
}

.home-fangxing-space-item-actions .home-fangxing-space-action-icon {
    width: 30px;
    padding: 0;
    font-size: 15px;
}

.home-fangxing-space-item-actions .is-primary {
    margin-left: auto;
    color: #eafff8;
    border-color: color-mix(in srgb, var(--space-glow, #c9ff9d) 60%, transparent);
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 35%, rgba(8, 31, 38, 0.8));
}

.home-fangxing-space-editor-status {
    min-height: 14px;
    margin: 8px 0 0;
}

.home-fangxing-space-editor-status.is-success {
    color: #8ae7c5;
}

.home-fangxing-space-editor-status.is-error {
    color: #ffb4a6;
}

.home-fangxing-space-coordinates {
    top: 31px;
    right: 32px;
    display: flex;
    gap: 18px;
}

.home-fangxing-space-mode {
    top: 28px;
    left: 50%;
    display: inline-flex;
    padding: 3px;
    gap: 3px;
    border: 1px solid rgba(132, 207, 206, 0.22);
    border-radius: 999px;
    background: rgba(4, 19, 25, 0.66);
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
}

.home-fangxing-space-mode button {
    min-height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    color: rgba(195, 229, 226, 0.68);
    background: transparent;
    font-size: 9px;
    cursor: pointer;
}

.home-fangxing-space-mode button.is-active {
    color: #eafff8;
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 28%, rgba(12, 47, 52, 0.9));
    box-shadow: 0 0 20px color-mix(in srgb, var(--space-primary, #58d6c6) 22%, transparent);
}

.home-fangxing-space-mode button:disabled {
    cursor: not-allowed;
    opacity: 0.34;
}

.home-fangxing-space-territory {
    bottom: 78px;
    left: 50%;
    min-width: 316px;
    min-height: 48px;
    padding: 7px 8px 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid color-mix(in srgb, var(--space-primary, #58d6c6) 42%, transparent);
    border-radius: 8px;
    color: #eafff8;
    background: rgba(4, 20, 27, 0.88);
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: fangxing-territory-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-fangxing-space-territory[hidden] {
    display: none;
}

.home-fangxing-space-territory > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.home-fangxing-space-territory strong {
    font-size: 11px;
    line-height: 1.2;
}

.home-fangxing-space-territory > div span {
    color: rgba(174, 215, 211, 0.62);
    font-size: 8px;
}

.home-fangxing-space-projection-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(218, 241, 238, 0.78);
    font-size: 8px;
    cursor: pointer;
    user-select: none;
}

.home-fangxing-space-projection-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.home-fangxing-space-projection-toggle > span {
    position: relative;
    width: 28px;
    height: 16px;
    flex: 0 0 auto;
    border: 1px solid rgba(138, 190, 190, 0.32);
    border-radius: 999px;
    background: rgba(2, 13, 18, 0.74);
    transition: border-color 160ms ease, background 160ms ease;
}

.home-fangxing-space-projection-toggle i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(188, 216, 214, 0.64);
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background 160ms ease, box-shadow 160ms ease;
}

.home-fangxing-space-projection-toggle input:checked + span {
    border-color: color-mix(in srgb, var(--space-glow, #c9ff9d) 52%, transparent);
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 26%, rgba(3, 23, 27, 0.9));
}

.home-fangxing-space-projection-toggle input:checked + span i {
    background: #eafff8;
    box-shadow: 0 0 9px color-mix(in srgb, var(--space-glow, #c9ff9d) 62%, transparent);
    transform: translateX(12px);
}

.home-fangxing-space-projection-toggle b {
    font-weight: 650;
    white-space: nowrap;
}

.home-fangxing-space-territory button {
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--space-glow, #c9ff9d) 54%, transparent);
    border-radius: 6px;
    color: #f0fff9;
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 32%, rgba(7, 35, 40, 0.94));
    font-size: 9px;
    cursor: pointer;
}

.home-fangxing-space-territory button svg {
    width: 14px;
    height: 14px;
}

.home-fangxing-space-territory p {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    width: max-content;
    max-width: min(320px, calc(100vw - 32px));
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(255, 151, 132, 0.38);
    border-radius: 7px;
    color: #ffd2c9;
    background: rgba(38, 14, 17, 0.92);
    font-size: 9px;
    line-height: 1.4;
    text-align: center;
    transform: translateX(-50%);
}

.home-fangxing-space-territory p[hidden] {
    display: none;
}

@keyframes fangxing-territory-in {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.home-fangxing-space-ground-controls {
    right: 24px;
    bottom: 28px;
    display: none;
    gap: 4px;
    flex-direction: column;
    align-items: center;
}

.home-fangxing-space.is-ground-mode .home-fangxing-space-ground-controls {
    display: flex;
}

.home-fangxing-space-ground-controls > div {
    display: flex;
    gap: 4px;
}

.home-fangxing-space-ground-controls button,
.home-fangxing-space-return {
    min-width: 36px;
    min-height: 36px;
    border: 1px solid rgba(125, 219, 208, 0.28);
    border-radius: 10px;
    color: #eafff8;
    background: rgba(4, 24, 30, 0.75);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.home-fangxing-space-ground-controls button {
    touch-action: none;
    user-select: none;
    transition: transform 120ms ease-out, background-color 120ms ease-out, border-color 120ms ease-out;
}

.home-fangxing-space-ground-controls button.is-active {
    border-color: color-mix(in srgb, var(--space-glow, #c9ff9d) 62%, transparent);
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 34%, rgba(4, 24, 30, 0.82));
    transform: scale(0.94);
}

.home-fangxing-space-return {
    bottom: 28px;
    left: 50%;
    min-width: 128px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translateX(-50%);
    font-size: 10px;
}

.home-fangxing-space-return svg {
    width: 15px;
    height: 15px;
}

.home-fangxing-core-space {
    position: absolute;
    right: 30px;
    bottom: 76px;
    z-index: 4;
    min-height: 42px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(126, 219, 194, 0.34);
    border-radius: 6px;
    color: rgba(216, 246, 238, 0.9);
    background: rgba(3, 25, 29, 0.76);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transform: translate3d(0, 8px, 0);
    transition: opacity 280ms var(--motion-standard), transform 280ms var(--motion-standard);
}

.home-fangxing-core.is-stable .home-fangxing-core-space {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.home-fangxing-core-space svg {
    width: 15px;
    height: 15px;
}

.home-fangxing-toggle-row {
    min-height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.home-fangxing-toggle-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.home-fangxing-toggle-row i {
    position: relative;
    width: 34px;
    height: 18px;
    flex: 0 0 auto;
    border: 1px solid rgba(134, 202, 201, 0.34);
    border-radius: 999px;
    background: rgba(10, 32, 38, 0.9);
}

.home-fangxing-toggle-row i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(184, 218, 212, 0.64);
    transition: transform 180ms var(--motion-standard), background 180ms var(--motion-standard);
}

.home-fangxing-toggle-row input:checked + i {
    background: color-mix(in srgb, var(--space-primary, #58d6c6) 42%, rgba(8, 42, 43, 0.9));
}

.home-fangxing-toggle-row input:checked + i::after {
    background: #eafff8;
    transform: translateX(16px);
}

.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-galaxy-canvas,
.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-galaxy-hud,
.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-galaxy-coordinates,
.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-galaxy-labels,
.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-galaxy-explorer,
.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-galaxy-philosophy,
.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-galaxy-return,
.home-empty-stage:not(.is-space-entering-from-galaxy):has(.home-fangxing-space.is-visible) .home-fangxing-core-choice {
    opacity: 0;
    pointer-events: none;
}

.home-empty-stage.is-space-active .home-galaxy-return {
    display: none !important;
}

@media (max-width: 720px), (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-fangxing-space-hud {
        top: 16px;
        left: 16px;
    }

    .home-fangxing-space-hud strong {
        font-size: 17px;
    }

    .home-fangxing-space-coordinates {
        top: 18px;
        right: 16px;
        display: grid;
        gap: 4px;
        text-align: right;
        font-size: 7px;
    }

    .home-fangxing-space-mode {
        top: 82px;
        width: calc(100% - 32px);
        justify-content: stretch;
    }

    .home-fangxing-space-mode button {
        flex: 1;
        min-height: 30px;
        padding-inline: 7px;
        font-size: 8px;
    }

    .home-fangxing-space-territory {
        bottom: calc(60px + env(safe-area-inset-bottom));
        min-width: min(306px, calc(100% - 24px));
        gap: 9px;
        padding-left: 9px;
    }

    .home-fangxing-space-projection-toggle {
        gap: 4px;
    }

    .home-fangxing-space-projection-toggle b {
        font-size: 7px;
    }

    .home-fangxing-space-toolbox {
        top: 120px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: none;
        padding: 7px;
        display: grid;
        grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
        gap: 5px 7px;
        overflow: visible;
    }

    .home-fangxing-space-toolbox header {
        grid-column: 1 / -1;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 6px;
        min-height: 22px;
        padding-bottom: 4px;
    }

    .home-fangxing-space-toolbox header small {
        display: none;
    }

    .home-fangxing-space-toolbox header span {
        font-size: 6px;
    }

    .home-fangxing-space-toolbox header strong {
        overflow: hidden;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-fangxing-space-toolbox.is-collapsed {
        right: auto;
        width: 148px;
        display: block;
    }

    .home-fangxing-space-items {
        grid-column: 1 / -1;
        grid-template-columns: repeat(10, minmax(0, 1fr));
        gap: 3px;
        margin-top: 0;
    }

    .home-fangxing-space-items button {
        min-height: 38px;
        padding: 3px 0;
        gap: 1px;
        border-radius: 5px;
    }

    .home-fangxing-space-items i {
        font-size: 12px;
    }

    .home-fangxing-space-items span {
        max-width: 100%;
        overflow: hidden;
        font-size: 6px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-fangxing-space-time {
        grid-column: 1;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
        margin-top: 0;
        padding: 5px 6px;
        border: 1px solid rgba(132, 207, 206, 0.14);
        border-radius: 6px;
    }

    .home-fangxing-space-ocean {
        grid-column: 2;
        margin-top: 0;
        padding: 5px 6px;
    }

    .home-fangxing-space-ocean-readout {
        grid-template-columns: 19px minmax(0, 1fr) auto;
        gap: 6px;
    }

    .home-fangxing-space-ocean-readout svg {
        width: 19px;
        height: 19px;
    }

    .home-fangxing-space-ocean-actions {
        grid-template-columns: minmax(0, 1fr) 25px 34px 32px;
        gap: 3px;
        margin-top: 4px;
    }

    .home-fangxing-space-ocean-actions button {
        min-height: 23px;
        padding-inline: 3px;
        font-size: 6px;
    }

    .home-fangxing-space-time-readout {
        grid-column: 1 / -1;
    }

    .home-fangxing-space-time-readout span {
        display: inline;
        font-size: 6px;
    }

    .home-fangxing-space-time-readout output {
        min-width: 34px;
        font-size: 9px;
    }

    .home-fangxing-space-time-flow {
        justify-self: start;
        gap: 4px;
    }

    .home-fangxing-space-time-flow b,
    .home-fangxing-space-day-toggle span {
        font-size: 6px;
    }

    .home-fangxing-space-day-toggle {
        min-height: 23px;
        padding-inline: 5px;
    }

    .home-fangxing-space-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-top: 0;
    }

    .home-fangxing-space-item-actions button {
        min-height: 25px;
    }

    .home-fangxing-space-editor-status {
        grid-column: 1 / -1;
        min-height: 9px;
        margin: 0;
        overflow: hidden;
        font-size: 6px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-fangxing-space-return {
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    .home-fangxing-space-ground-controls {
        right: auto;
        left: 12px;
        bottom: calc(58px + env(safe-area-inset-bottom));
    }

    .home-fangxing-core-space {
        right: 10px;
        bottom: 76px;
        min-height: 36px;
        padding-inline: 9px;
        font-size: 9px;
    }

    .home-fangxing-toggle-row {
        min-height: 27px;
    }
}

/* Refined auth entry: product-first, quiet, QQ-centric. */
.auth-shell {
    min-height: 100dvh;
    color: #eef3ff;
    background:
        radial-gradient(circle at 18% 16%, rgba(66, 123, 224, 0.22), transparent 30%),
        linear-gradient(135deg, #101827 0%, #162033 52%, #0f1724 100%);
}

body:has(.auth-shell)::before {
    content: none;
}

.auth-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(115deg, rgba(0, 0, 0, 0.72), transparent 68%);
}

.auth-stage {
    width: min(920px, calc(100% - 40px));
    min-height: 100dvh;
    padding: 36px 0;
}

.auth-entry {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(220px, 0.74fr) minmax(340px, 390px);
    gap: 24px;
    align-items: center;
}

.auth-intro {
    padding: 8px 0 8px 4px;
}

.auth-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border-radius: 12px;
    color: #f9fbff;
    background: #2f68d8;
    box-shadow: 0 8px 16px rgba(9, 16, 31, 0.22);
    font-size: 21px;
    font-weight: 800;
}

.auth-kicker {
    margin: 0 0 8px;
    color: rgba(238, 243, 255, 0.64);
    font-size: 13px;
}

.auth-intro h1 {
    max-width: 10ch;
    margin: 0;
    color: #ffffff;
    font-size: 36px;
    line-height: 1.1;
    letter-spacing: 0;
    text-wrap: balance;
}

.auth-intro p:not(.auth-kicker) {
    max-width: 38ch;
    margin: 12px 0 0;
    color: rgba(238, 243, 255, 0.74);
    font-size: 14px;
    line-height: 1.55;
}

.auth-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.auth-rules span {
    padding: 8px 10px;
    border-radius: 999px;
    color: rgba(238, 243, 255, 0.78);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 12px;
}

.auth-card {
    padding: 20px;
    border-radius: 14px;
    border: 1px solid rgba(184, 200, 229, 0.18);
    background: rgba(17, 26, 42, 0.84);
    box-shadow: 0 18px 38px rgba(5, 10, 20, 0.26);
    backdrop-filter: blur(18px) saturate(126%);
    -webkit-backdrop-filter: blur(18px) saturate(126%);
    overflow: hidden;
}

.auth-card:hover {
    transform: none;
    border-color: rgba(184, 200, 229, 0.24);
    background: rgba(17, 26, 42, 0.88);
    box-shadow: 0 18px 38px rgba(5, 10, 20, 0.26);
}

.auth-card-top {
    gap: 13px;
    margin-bottom: 14px;
}

.auth-brand {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-brand-caption {
    color: rgba(238, 243, 255, 0.66);
}

.auth-tabs {
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.auth-tab {
    padding: 8px 0;
    border-radius: 8px;
    color: rgba(238, 243, 255, 0.62);
    font-size: 14px;
    font-weight: 650;
}

.auth-tab:hover {
    color: #ffffff;
    transform: none;
    background: rgba(255, 255, 255, 0.055);
}

.auth-tab.active {
    color: #ffffff;
    background: rgba(47, 104, 216, 0.72);
    box-shadow: none;
}

.auth-note,
.ticket-hint,
.flash {
    margin-bottom: 12px;
    padding: 10px 11px;
    border-radius: 10px;
    color: rgba(238, 243, 255, 0.76);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.auth-note strong,
.ticket-hint strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 720;
}

.auth-note p,
.ticket-hint p {
    color: rgba(238, 243, 255, 0.68);
}

.auth-form span {
    color: rgba(238, 243, 255, 0.76);
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.auth-form input {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid rgba(184, 200, 229, 0.2);
    color: #ffffff;
    background: rgba(8, 14, 24, 0.36);
}

.auth-form input::placeholder {
    color: rgba(238, 243, 255, 0.48);
}

.auth-form input:focus {
    border-color: rgba(92, 145, 255, 0.78);
    background: rgba(8, 14, 24, 0.48);
    box-shadow: 0 0 0 3px rgba(47, 104, 216, 0.22);
}

.auth-shell .btn {
    min-height: 40px;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
}

.auth-shell .btn.primary {
    color: #ffffff;
    background: #2f68d8;
    box-shadow: none;
}

.auth-shell .btn.primary:hover {
    background: #3b75e8;
}

.auth-shell .btn.secondary {
    color: rgba(238, 243, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(184, 200, 229, 0.16);
    box-shadow: none;
}

.auth-shell .btn.secondary:hover {
    background: rgba(255, 255, 255, 0.09);
}

.auth-card .btn.primary.wide {
    width: auto;
    min-width: 128px;
    justify-self: start;
    border-radius: 9px;
}

.auth-card .btn.primary::before,
.auth-card .btn.primary::after {
    content: none;
}

.auth-shell .text-link {
    color: rgba(238, 243, 255, 0.72);
    font-size: 14px;
}

.auth-shell .text-link:hover {
    color: #ffffff;
}

.auth-shell .flash.success,
.auth-shell .ticket-hint.success {
    border-color: rgba(70, 184, 126, 0.28);
    color: #cff5df;
    background: rgba(44, 141, 91, 0.14);
}

.auth-shell .flash.error {
    border-color: rgba(239, 97, 121, 0.32);
    color: #ffdbe2;
    background: rgba(176, 54, 76, 0.16);
}

.auth-shell .btn-loader {
    width: 34px;
    height: 34px;
}

.auth-shell .btn-loader-dot {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
}

@media (max-width: 820px) {
    .auth-stage {
        width: min(100% - 24px, 430px);
        padding: 18px 0 28px;
        align-items: start;
    }

    .auth-entry {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .auth-intro {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        column-gap: 10px;
        align-items: center;
        padding: 2px 2px 0;
    }

    .auth-mark {
        grid-row: span 2;
        width: 40px;
        height: 40px;
        margin-bottom: 0;
        border-radius: 10px;
        font-size: 18px;
    }

    .auth-kicker {
        margin: 0;
        font-size: 12px;
    }

    .auth-intro h1 {
        max-width: none;
        margin-top: 2px;
        font-size: 20px;
        line-height: 1.2;
    }

    .auth-intro p:not(.auth-kicker) {
        display: none;
    }

    .auth-rules {
        display: none;
    }

    .auth-card {
        padding: 16px;
        border-radius: 13px;
    }

    .auth-brand-block {
        display: none;
    }

    .auth-tabs {
        padding: 3px;
    }

    .auth-tab {
        padding: 8px 0;
        font-size: 13px;
    }

    .auth-note {
        padding: 8px 10px;
    }

    .auth-form {
        gap: 11px;
    }

    .auth-form input {
        min-height: 40px;
    }

    .auth-shell .btn {
        min-height: 38px;
        padding: 9px 12px;
    }

    .auth-card .btn.primary.wide {
        width: auto;
        min-width: 112px;
    }

    .auth-actions {
        gap: 8px;
        margin-top: 12px;
    }
}

/* Auth v3: single focused account panel. */
.auth-shell {
    display: flex;
    min-height: 100dvh;
    color: #eef2fb;
    background:
        radial-gradient(circle at 50% -10%, rgba(74, 119, 213, 0.16), transparent 38%),
        linear-gradient(180deg, #141b2a 0%, #101725 100%);
}

.auth-shell::before {
    content: none;
}

.auth-stage {
    width: min(100% - 32px, 390px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: 28px 0;
    display: grid;
    place-items: center;
}

.auth-entry {
    width: 100%;
    display: block;
}

.auth-card {
    width: 100%;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #151d2c;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-card:hover {
    background: #151d2c;
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: none;
}

.auth-card-top {
    gap: 16px;
    margin-bottom: 18px;
}

.auth-brand-block {
    display: block;
}

.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-mark {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 10px;
    background: #4169d8;
    box-shadow: none;
    font-size: 17px;
}

.auth-brand {
    font-size: 20px;
    line-height: 1.15;
}

.auth-brand-caption {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.62);
    font-size: 13px;
}

.auth-tabs {
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: #202838;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.auth-tab {
    padding: 8px 0;
    border-radius: 8px;
    color: rgba(226, 232, 240, 0.62);
    font-size: 13px;
    font-weight: 700;
}

.auth-tab.active {
    color: #ffffff;
    background: #4169d8;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab.active:hover {
    background: #4169d8;
}

.auth-note {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
}

.auth-note strong {
    font-size: 15px;
    font-weight: 760;
}

.auth-form {
    gap: 10px;
}

.auth-form.compact {
    margin-top: 12px;
}

.auth-form label {
    gap: 6px;
}

.auth-form span {
    color: rgba(226, 232, 240, 0.72);
    font-size: 13px;
}

.auth-form input {
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #101827;
    color: #f8fafc;
}

.auth-form input:focus {
    border-color: #5b7dea;
    box-shadow: 0 0 0 3px rgba(65, 105, 216, 0.2);
}

.auth-form input[aria-invalid="true"] {
    border-color: #f06b7f;
    box-shadow: 0 0 0 3px rgba(240, 107, 127, 0.12);
}

.field-error {
    margin-top: -2px;
    color: #ffb4c0;
    font-size: 12px;
    line-height: 1.35;
}

.auth-shell .btn {
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 13px;
}

.auth-card .btn.primary.wide {
    width: auto;
    min-width: 96px;
}

.auth-shell .btn.primary {
    background: #4169d8;
}

.auth-shell .btn.primary:hover {
    background: #4f77e8;
}

.auth-shell .btn.secondary {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.2);
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.auth-actions .btn.secondary.wide {
    width: auto;
    min-width: 0;
}

.auth-shell .text-link {
    font-size: 13px;
    white-space: nowrap;
}

.auth-shell button.text-link {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.ticket-hint,
.flash {
    margin-bottom: 12px;
    padding: 10px 11px;
    border-radius: 10px;
    background: #1b2434;
}

.page-leaving .auth-card {
    opacity: 0.72;
}

@media (max-width: 520px) {
    .auth-stage {
        width: min(100% - 24px, 390px);
        padding: 16px 0 22px;
        place-items: start center;
    }

    .auth-card {
        padding: 16px;
    }

    .auth-brand-block {
        display: block;
    }

    .auth-brand-row {
        gap: 10px;
    }

    .auth-mark {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 16px;
    }

    .auth-brand {
        font-size: 18px;
    }

    .auth-brand-caption {
        font-size: 12px;
    }

    .auth-tabs {
        margin-top: 2px;
    }

    .auth-actions {
        align-items: stretch;
    }

    .auth-actions .btn.secondary.wide {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* Auth state switcher: no navigation, sliding control. */
.auth-tabs {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
}

.auth-tabs::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: 8px;
    background: #4169d8;
    transform: translateX(calc(var(--auth-tab-index, 0) * 100%));
    transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-tab {
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background: transparent;
    font: inherit;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.auth-tab.active,
.auth-tab.active:hover {
    background: transparent;
}

.auth-tab:active {
    transform: scale(0.985);
}

.auth-panels {
    position: relative;
}

.auth-panel,
.login-mode-panel {
    display: none;
}

.auth-panel.is-active,
.login-mode-panel.is-active {
    display: block;
    animation: auth-panel-enter 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-mode-panel.is-active {
    display: grid;
}

@keyframes auth-panel-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-tabs::before {
        transition: none;
    }

    .auth-panel.is-active,
    .login-mode-panel.is-active {
        animation: none;
    }
}

/* Keep the auth frame fixed while panels change. */
.auth-card {
    height: min(468px, calc(100dvh - 56px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-card-top,
.auth-card > .flash {
    flex: 0 0 auto;
}

.auth-brand-caption {
    min-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-panels {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    scrollbar-width: none;
}

.auth-panels::-webkit-scrollbar {
    width: 0;
}

.auth-panels::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
}

@media (max-width: 520px) {
    .auth-card {
        height: min(500px, calc(100dvh - 36px));
    }
}

/* Auth v4: visual direction inspired by blocks-project, implemented locally. */
body:has(.auth-shell) {
    color: #121923;
    background:
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.96), transparent 30%),
        radial-gradient(circle at 82% 8%, rgba(44, 143, 166, 0.12), transparent 34%),
        linear-gradient(135deg, #f7f9fd 0%, #eef3f6 52%, #f8fafc 100%);
}

body:has(.auth-shell)::before,
body:has(.auth-shell)::after {
    content: none;
}

.auth-shell {
    display: flex;
    min-height: 100dvh;
    color: #121923;
    background:
        linear-gradient(rgba(31, 41, 55, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 41, 55, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.9), transparent 32%),
        radial-gradient(circle at 78% 12%, rgba(44, 143, 166, 0.13), transparent 34%),
        #eef3f6;
    background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

.auth-stage {
    width: min(100% - 32px, 380px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: 28px 0;
    display: grid;
    place-items: center;
}

.auth-entry {
    width: 100%;
    display: block;
}

.auth-card {
    width: 100%;
    height: min(414px, calc(100dvh - 56px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(37, 47, 66, 0.14);
    color: #121923;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 38px rgba(18, 26, 40, 0.1);
    backdrop-filter: blur(10px) saturate(1.08);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

.auth-card:hover {
    border-color: rgba(37, 47, 66, 0.14);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 38px rgba(18, 26, 40, 0.1);
}

.auth-card-top {
    flex: 0 0 auto;
    gap: 14px;
    margin-bottom: 16px;
}

.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-mark {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 10px;
    color: #fff;
    background: #0f7f8c;
    box-shadow: none;
    font-size: 17px;
}

.auth-brand {
    color: #121923;
    font-size: 19px;
    line-height: 1.15;
}

.auth-brand-caption {
    min-height: 18px;
    margin-top: 4px;
    color: #617083;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-tabs {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    overflow: hidden;
    padding: 3px;
    border-radius: 10px;
    background: #eef3f6;
    border: 1px solid rgba(37, 47, 66, 0.12);
}

.auth-tabs::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: 8px;
    background: #0f7f8c;
    transform: translateX(calc(var(--auth-tab-index, 0) * 100%));
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-tab {
    padding: 7px 0;
    border: 0;
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    color: #617083;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: color 160ms ease, transform 160ms ease;
}

.auth-tab:hover {
    color: #121923;
    background: transparent;
}

.auth-tab.active,
.auth-tab.active:hover {
    color: #ffffff;
    background: transparent;
}

.auth-tab:active {
    transform: scale(0.985);
}

.auth-note {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #121923;
}

.auth-note strong {
    color: #121923;
    font-size: 15px;
    font-weight: 760;
}

.auth-panels {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding-right: 2px;
}

.auth-panels::-webkit-scrollbar {
    width: 6px;
}

.auth-panels::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(97, 112, 131, 0.22);
}

.auth-panel,
.login-mode-panel {
    display: none;
}

.auth-panel.is-active,
.login-mode-panel.is-active {
    display: block;
    animation: auth-panel-enter 190ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-mode-panel.is-active {
    display: grid;
}

.auth-form {
    gap: 9px;
}

.auth-form.compact {
    margin-top: 12px;
}

.auth-form label {
    gap: 6px;
}

.auth-form span {
    color: #4f5f72;
    font-size: 13px;
}

.auth-form input {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 9px;
    border: 1px solid rgba(37, 47, 66, 0.16);
    background: rgba(255, 255, 255, 0.82);
    color: #121923;
}

.auth-form input::placeholder {
    color: #7a8798;
}

.auth-form input:focus {
    border-color: rgba(15, 127, 140, 0.48);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 127, 140, 0.14);
}

.auth-form input[aria-invalid="true"] {
    border-color: #c24141;
    box-shadow: 0 0 0 3px rgba(194, 65, 65, 0.12);
}

.field-error {
    margin-top: -2px;
    color: #c24141;
    font-size: 12px;
    line-height: 1.35;
}

.auth-shell .btn {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
}

.auth-card .btn.primary.wide {
    width: auto;
    min-width: 108px;
    justify-self: start;
}

.auth-shell .btn.primary {
    color: #ffffff !important;
    background: #0f7f8c;
    box-shadow: none;
}

.auth-shell .btn.primary:hover {
    background: #0d6f7a;
}

.auth-shell .btn.secondary {
    color: #121923;
    background: #ffffff;
    border: 1px solid rgba(37, 47, 66, 0.16);
    box-shadow: none;
}

.auth-shell .btn.secondary:hover {
    background: #f8fafc;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.auth-shell .btn-label {
    color: inherit;
}

.auth-shell .btn.primary .btn-label {
    color: #ffffff;
}

.auth-actions .btn.secondary.wide {
    width: auto;
    min-width: 0;
}

.auth-shell .text-link {
    color: #0f7f8c;
    font-size: 13px;
    white-space: nowrap;
}

.auth-shell button.text-link {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.ticket-hint,
.flash {
    margin-bottom: 12px;
    padding: 10px 11px;
    border-radius: 10px;
    color: #4f5f72;
    background: #f7f9fc;
    border: 1px solid rgba(37, 47, 66, 0.1);
}

.auth-shell .flash.success,
.auth-shell .ticket-hint.success {
    border-color: rgba(22, 132, 90, 0.2);
    color: #16633f;
    background: rgba(22, 132, 90, 0.08);
}

.auth-shell .flash.error {
    border-color: rgba(194, 65, 65, 0.2);
    color: #9b2c2c;
    background: rgba(194, 65, 65, 0.08);
}

.auth-shell .btn.primary .btn-loader-dot {
    background: rgba(255, 255, 255, 0.96);
}

.auth-shell .btn.secondary .btn-loader-dot {
    background: #0f7f8c;
    box-shadow: none;
}

@media (max-width: 520px) {
    .auth-stage {
        width: min(100% - 24px, 380px);
        padding: 14px 0 22px;
        place-items: start center;
    }

    .auth-card {
        height: min(420px, calc(100dvh - 28px));
        padding: 16px;
    }

    .auth-brand-row {
        gap: 10px;
    }

    .auth-mark {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 16px;
    }

    .auth-brand {
        font-size: 18px;
    }

    .auth-brand-caption {
        font-size: 12px;
    }

    .auth-tabs {
        margin-top: 2px;
    }

    .auth-actions {
        align-items: stretch;
    }

    .auth-actions .btn.secondary.wide {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* Auth v5: richer composition, same local implementation. */
body:has(.auth-shell) {
    background:
        radial-gradient(circle at 18% 18%, rgba(15, 127, 140, 0.18), transparent 28%),
        radial-gradient(circle at 72% 18%, rgba(60, 113, 190, 0.15), transparent 34%),
        linear-gradient(135deg, #f8fafc 0%, #edf4f6 48%, #f4f8fb 100%);
}

.auth-shell {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(18, 25, 35, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 25, 35, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 22% 24%, rgba(15, 127, 140, 0.18), transparent 30%),
        radial-gradient(circle at 68% 22%, rgba(60, 113, 190, 0.13), transparent 36%),
        linear-gradient(135deg, #f8fafc 0%, #edf4f6 52%, #f7fbfd 100%);
    background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

.auth-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.42) 35%, rgba(248, 250, 252, 0.12) 100%),
        radial-gradient(ellipse at 55% 52%, transparent 0%, rgba(225, 234, 238, 0.36) 76%);
}

.auth-stage {
    position: relative;
    z-index: 1;
    width: min(100% - 42px, 820px);
    min-height: 100dvh;
    padding: 28px 0;
    display: grid;
    place-items: center;
}

.auth-entry {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    align-items: stretch;
    gap: 18px;
}

.auth-visual {
    position: relative;
    min-height: 414px;
    border-radius: 14px;
    border: 1px solid rgba(37, 47, 66, 0.12);
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(235, 244, 247, 0.5)),
        radial-gradient(circle at 20% 20%, rgba(15, 127, 140, 0.18), transparent 34%);
    box-shadow: 0 18px 38px rgba(18, 26, 40, 0.08);
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(18, 25, 35, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 25, 35, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.78), transparent 76%);
}

.auth-visual::after {
    content: "";
    position: absolute;
    right: -74px;
    top: -62px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(15, 127, 140, 0.13);
    border: 1px solid rgba(15, 127, 140, 0.14);
}

.auth-visual-mark {
    position: absolute;
    left: 26px;
    top: 28px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: #0f7f8c;
    font-size: 24px;
    font-weight: 850;
}

.auth-visual-copy {
    position: absolute;
    left: 26px;
    bottom: 28px;
    display: grid;
    gap: 8px;
}

.auth-visual-copy span {
    color: #617083;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-visual-copy strong {
    color: #121923;
    font-size: 36px;
    line-height: 1.05;
    max-width: 6ch;
}

.auth-visual-map {
    position: absolute;
    inset: 92px 46px 96px 78px;
}

.auth-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #0f7f8c;
    box-shadow: 0 0 0 8px rgba(15, 127, 140, 0.12);
}

.node-a {
    left: 18%;
    top: 28%;
}

.node-b {
    right: 18%;
    top: 42%;
}

.node-c {
    left: 46%;
    bottom: 14%;
}

.auth-path {
    position: absolute;
    height: 1px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(15, 127, 140, 0.15), rgba(15, 127, 140, 0.7));
}

.path-a {
    left: 24%;
    top: 33%;
    width: 46%;
    transform: rotate(11deg);
}

.path-b {
    left: 50%;
    top: 54%;
    width: 34%;
    transform: rotate(116deg);
}

.auth-visual-stack {
    position: absolute;
    right: 24px;
    bottom: 26px;
    display: grid;
    gap: 8px;
}

.auth-visual-stack span {
    min-width: 104px;
    padding: 8px 10px;
    border-radius: 999px;
    color: #4f5f72;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(37, 47, 66, 0.1);
    font-size: 11px;
    font-weight: 800;
}

.auth-card {
    height: 414px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 38px rgba(18, 26, 40, 0.1);
}

.auth-tabs {
    background: #edf3f6;
}

.auth-form input {
    background: #ffffff;
}

.auth-shell .btn.primary {
    min-width: 118px;
}

@media (max-width: 760px) {
    .auth-stage {
        width: min(100% - 24px, 390px);
        padding: 14px 0 22px;
        place-items: start center;
    }

    .auth-entry {
        display: block;
    }

    .auth-visual {
        display: none;
    }

    .auth-card {
        height: min(420px, calc(100dvh - 28px));
        padding: 16px;
    }
}

/* Auth v6: Windows 11 / Fluent surface. */
body:has(.auth-shell) {
    color: #1f1f1f;
    background:
        radial-gradient(circle at 10% 12%, rgba(87, 168, 255, 0.32), transparent 28%),
        radial-gradient(circle at 78% 14%, rgba(123, 214, 190, 0.26), transparent 30%),
        radial-gradient(circle at 58% 82%, rgba(255, 255, 255, 0.88), transparent 38%),
        linear-gradient(135deg, #edf6fb 0%, #f7fbff 42%, #eef4f7 100%);
}

.auth-shell {
    position: relative;
    overflow: hidden;
    min-height: 100dvh;
    color: #1f1f1f;
    background:
        radial-gradient(ellipse at 16% 14%, rgba(85, 171, 255, 0.34), transparent 30%),
        radial-gradient(ellipse at 78% 18%, rgba(85, 204, 183, 0.26), transparent 34%),
        radial-gradient(ellipse at 42% 90%, rgba(255, 255, 255, 0.86), transparent 46%),
        linear-gradient(135deg, #eaf5fb 0%, #f8fbfe 54%, #edf4f7 100%);
}

.auth-shell::before {
    content: "";
    position: absolute;
    inset: -18%;
    pointer-events: none;
    background:
        conic-gradient(from 20deg at 28% 36%, rgba(0, 120, 212, 0.2), rgba(255, 255, 255, 0), rgba(76, 194, 172, 0.18), rgba(255, 255, 255, 0), rgba(0, 120, 212, 0.2));
    filter: blur(34px);
    opacity: 0.72;
}

.auth-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
        radial-gradient(circle at 50% 38%, transparent 0%, rgba(210, 224, 232, 0.28) 76%);
}

.auth-stage {
    position: relative;
    z-index: 1;
    width: min(100% - 48px, 860px);
    min-height: 100dvh;
    padding: 32px 0;
    display: grid;
    place-items: center;
}

.auth-entry {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 374px;
    gap: 18px;
    align-items: stretch;
}

.auth-visual,
.auth-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(245, 249, 252, 0.46)),
        rgba(255, 255, 255, 0.58);
    box-shadow:
        0 24px 58px rgba(31, 41, 55, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(26px) saturate(1.2);
    -webkit-backdrop-filter: blur(26px) saturate(1.2);
}

.auth-visual {
    position: relative;
    min-height: 432px;
    overflow: hidden;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(40, 48, 59, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 48, 59, 0.045) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.68), transparent 74%);
}

.auth-visual::after {
    content: "";
    position: absolute;
    right: -92px;
    top: -82px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.7), transparent 28%),
        linear-gradient(135deg, rgba(0, 120, 212, 0.32), rgba(70, 194, 172, 0.22));
    filter: blur(1px);
}

.auth-visual-mark {
    position: absolute;
    left: 28px;
    top: 30px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #0078d4, #159aa8);
    box-shadow: 0 12px 28px rgba(0, 120, 212, 0.24);
    font-size: 25px;
    font-weight: 850;
}

.auth-visual-copy {
    position: absolute;
    left: 28px;
    bottom: 30px;
    display: grid;
    gap: 9px;
}

.auth-visual-copy span {
    color: #5b6673;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-visual-copy strong {
    max-width: 7ch;
    color: #202020;
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: 0;
}

.auth-visual-map {
    position: absolute;
    inset: 94px 48px 104px 80px;
}

.auth-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #0078d4;
    box-shadow: 0 0 0 8px rgba(0, 120, 212, 0.12);
}

.auth-path {
    position: absolute;
    height: 1px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(0, 120, 212, 0.08), rgba(0, 120, 212, 0.68));
}

.auth-visual-stack {
    position: absolute;
    right: 24px;
    bottom: 28px;
    display: grid;
    gap: 9px;
}

.auth-visual-stack span {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 104px;
    padding: 8px 11px;
    overflow: hidden;
    border-radius: 13px;
    color: #415063;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(245, 250, 255, 0.58)),
        rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        0 10px 24px rgba(31, 41, 55, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.auth-visual-stack span::before {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #0078d4;
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.12);
}

.auth-visual-stack span:nth-child(2)::before {
    background: #159aa8;
    box-shadow: 0 0 0 4px rgba(21, 154, 168, 0.13);
}

.auth-visual-stack span:nth-child(3)::before {
    background: #62b36f;
    box-shadow: 0 0 0 4px rgba(98, 179, 111, 0.13);
}

.auth-card {
    height: 432px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 22px;
    color: #1f1f1f;
}

.auth-card:hover {
    border-color: rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(245, 249, 252, 0.5)),
        rgba(255, 255, 255, 0.6);
    box-shadow:
        0 24px 58px rgba(31, 41, 55, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-card-top {
    flex: 0 0 auto;
    gap: 15px;
    margin-bottom: 16px;
}

.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-mark {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 11px;
    color: #ffffff;
    background: linear-gradient(135deg, #0078d4, #159aa8);
    box-shadow: 0 8px 18px rgba(0, 120, 212, 0.18);
    font-size: 17px;
}

.auth-brand {
    color: #202020;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 800;
}

.auth-brand-caption {
    min-height: 18px;
    margin-top: 4px;
    color: #66717d;
    font-size: 13px;
}

.auth-tabs {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    overflow: hidden;
    padding: 3px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(120, 130, 145, 0.18);
}

.auth-tabs::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: 9px;
    background: var(--auth-selection);
    box-shadow: 0 5px 14px var(--auth-selection-shadow);
    transform: translateX(calc(var(--auth-tab-index, 0) * 100%));
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-tab {
    padding: 8px 0;
    border: 0;
    border-radius: 9px;
    appearance: none;
    -webkit-appearance: none;
    color: #64707d;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.auth-tab:hover {
    color: #202020;
    background: rgba(255, 255, 255, 0.3);
}

.auth-tab.active,
.auth-tab.active:hover {
    color: #ffffff;
    background: transparent;
}

.auth-note {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #202020;
}

.auth-note strong {
    color: #202020;
    font-size: 15px;
    font-weight: 760;
}

.auth-panels {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    scrollbar-width: none;
}

.auth-panels::-webkit-scrollbar {
    width: 0;
}

.auth-form {
    gap: 10px;
}

.auth-form label {
    gap: 6px;
}

.auth-form span {
    color: #596674;
    font-size: 13px;
}

.auth-form input {
    min-height: 40px;
    padding: 8px 11px;
    border-radius: 8px;
    border: 1px solid rgba(80, 88, 99, 0.2);
    background: rgba(255, 255, 255, 0.86);
    color: #202020;
}

.auth-form input::placeholder {
    color: #7b8794;
}

.auth-form input:hover {
    border-color: rgba(80, 88, 99, 0.28);
}

.auth-form input:focus {
    border-color: rgba(0, 120, 212, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.14);
}

.auth-form input[aria-invalid="true"] {
    border-color: #c42b1c;
    box-shadow: 0 0 0 3px rgba(196, 43, 28, 0.12);
}

.field-error {
    color: #c42b1c;
}

.auth-shell .btn {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.auth-card .btn.primary.wide {
    width: auto;
    min-width: 112px;
    justify-self: start;
}

.auth-shell .btn.primary {
    color: #ffffff !important;
    background: #0078d4;
    box-shadow: 0 6px 16px rgba(0, 120, 212, 0.2);
}

.auth-shell .btn.primary:hover {
    background: #106ebe;
}

.auth-shell .btn.secondary {
    color: #202020;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(80, 88, 99, 0.2);
    box-shadow: none;
}

.auth-shell .btn.secondary:hover {
    background: rgba(255, 255, 255, 0.82);
}

.auth-shell .btn-label {
    color: inherit;
}

.auth-shell .btn.primary .btn-label {
    color: #ffffff;
}

.auth-shell .text-link {
    color: #0067b8;
    font-size: 13px;
    white-space: nowrap;
}

.auth-shell button.text-link {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.ticket-hint,
.flash {
    margin-bottom: 12px;
    padding: 10px 11px;
    border-radius: 9px;
    color: #596674;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(80, 88, 99, 0.14);
}

.auth-shell .flash.success,
.auth-shell .ticket-hint.success {
    border-color: rgba(16, 124, 65, 0.2);
    color: #0f6c3b;
    background: rgba(16, 124, 65, 0.08);
}

.auth-shell .flash.error {
    border-color: rgba(196, 43, 28, 0.2);
    color: #a4262c;
    background: rgba(196, 43, 28, 0.08);
}

@media (max-width: 760px) {
    body:has(.auth-shell) {
        overflow-x: hidden;
        background:
            radial-gradient(circle at 20% 0%, rgba(0, 120, 212, 0.22), transparent 32%),
            radial-gradient(circle at 90% 8%, rgba(70, 194, 172, 0.2), transparent 34%),
            linear-gradient(180deg, #eef7fc 0%, #f8fbff 58%, #eef4f7 100%);
    }

    .auth-shell {
        min-height: 100dvh;
        overflow-y: auto;
        background:
            radial-gradient(circle at 22% 4%, rgba(0, 120, 212, 0.24), transparent 32%),
            radial-gradient(circle at 92% 12%, rgba(70, 194, 172, 0.2), transparent 34%),
            linear-gradient(180deg, #eef7fc 0%, #f8fbff 58%, #eef4f7 100%);
    }

    .auth-shell::before {
        inset: -24% -45%;
        filter: blur(28px);
        opacity: 0.58;
    }

    .auth-shell::after {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08)),
            radial-gradient(circle at 50% 18%, transparent 0%, rgba(210, 224, 232, 0.2) 82%);
    }

    .auth-stage {
        width: min(100% - 28px, 420px);
        min-height: 100dvh;
        padding: max(18px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
        place-items: start center;
    }

    .auth-entry {
        display: block;
    }

    .auth-visual {
        display: none;
    }

    .auth-card {
        height: auto;
        min-height: auto;
        padding: 18px;
        border-radius: 18px;
        overflow: visible;
    }

    .auth-card-top {
        gap: 14px;
        margin-bottom: 18px;
    }

    .auth-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 18px;
    }

    .auth-brand {
        font-size: 20px;
    }

    .auth-brand-caption {
        max-width: 260px;
        font-size: 13px;
    }

    .auth-tabs {
        padding: 4px;
        border-radius: 13px;
    }

    .auth-tabs::before {
        top: 4px;
        bottom: 4px;
        left: 4px;
        width: calc((100% - 8px) / 3);
        border-radius: 10px;
    }

    .auth-tab {
        padding: 10px 0;
        font-size: 14px;
    }

    .auth-panels {
        overflow: visible;
        min-height: auto;
        padding-right: 0;
    }

    .auth-note {
        margin-bottom: 14px;
    }

    .auth-form {
        gap: 12px;
    }

    .auth-form.compact {
        margin-top: 14px;
    }

    .auth-form input {
        min-height: 44px;
        font-size: 15px;
    }

    .auth-shell .btn {
        min-height: 44px;
        padding: 11px 14px;
        font-size: 14px;
    }

    .auth-card .btn.primary.wide {
        width: 100%;
        min-width: 0;
        justify-self: stretch;
    }

    .auth-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        margin-top: 14px;
    }

    .auth-actions .btn.secondary.wide {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .ticket-hint,
    .flash {
        padding: 11px 12px;
    }
}

/* Desktop auth layout: use the available space, no inner scrolling. */
@media (min-width: 761px) {
    .auth-stage {
        width: min(100% - 72px, 1120px);
        padding: 48px 0;
        align-items: center;
    }

    .auth-entry {
        grid-template-columns: minmax(420px, 1fr) 460px;
        gap: 24px;
    }

    .auth-visual,
    .auth-card {
        min-height: 600px;
    }

    .auth-card {
        height: 600px;
        padding: 30px;
    }

    .auth-visual-mark {
        left: 34px;
        top: 34px;
        width: 66px;
        height: 66px;
        border-radius: 18px;
        font-size: 30px;
    }

    .auth-visual-copy {
        left: 34px;
        bottom: 38px;
        gap: 12px;
    }

    .auth-visual-copy strong {
        max-width: 8ch;
        font-size: 48px;
    }

    .auth-visual-map {
        inset: 128px 72px 146px 110px;
    }

    .auth-visual-stack {
        right: 34px;
        bottom: 38px;
    }

    .auth-card-top {
        gap: 20px;
        margin-bottom: 24px;
    }

    .auth-mark {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        font-size: 21px;
    }

    .auth-brand {
        font-size: 24px;
    }

    .auth-brand-caption {
        font-size: 14px;
    }

    .auth-tabs {
        padding: 4px;
        border-radius: 13px;
    }

    .auth-tabs::before {
        top: 4px;
        bottom: 4px;
        left: 4px;
        width: calc((100% - 8px) / 3);
        border-radius: 10px;
    }

    .auth-tab {
        padding: 11px 0;
        font-size: 14px;
    }

    .auth-panels {
        overflow: visible;
        min-height: auto;
        padding-right: 0;
    }

    .auth-note {
        margin-bottom: 16px;
    }

    .auth-note strong {
        font-size: 17px;
    }

    .auth-form {
        gap: 14px;
    }

    .auth-form.compact {
        margin-top: 16px;
    }

    .auth-form label {
        gap: 8px;
    }

    .auth-form span {
        font-size: 14px;
    }

    .auth-form input {
        min-height: 46px;
        padding: 11px 13px;
        font-size: 15px;
    }

    .auth-shell .btn {
        min-height: 42px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .auth-card .btn.primary.wide {
        min-width: 136px;
    }

    .auth-actions {
        margin-top: 18px;
    }

    .ticket-hint,
    .flash {
        padding: 12px 13px;
    }
}

/* Mobile auth: phone-native Fluent layout, desktop remains untouched. */
@media (max-width: 760px) {
    body:has(.auth-shell) {
        overflow-x: hidden;
        background:
            radial-gradient(ellipse at 24% -8%, rgba(0, 120, 212, 0.28), transparent 42%),
            radial-gradient(ellipse at 112% 8%, rgba(70, 194, 172, 0.24), transparent 38%),
            linear-gradient(180deg, #eef7fc 0%, #f8fbff 52%, #edf4f8 100%);
    }

    .auth-shell {
        min-height: 100dvh;
        overflow-y: auto;
        background:
            radial-gradient(ellipse at 18% -6%, rgba(0, 120, 212, 0.24), transparent 42%),
            radial-gradient(ellipse at 98% 4%, rgba(70, 194, 172, 0.22), transparent 36%),
            linear-gradient(180deg, #eef7fc 0%, #f8fbff 58%, #eef4f7 100%);
    }

    .auth-shell::before {
        inset: -32% -52%;
        filter: blur(30px);
        opacity: 0.52;
    }

    .auth-shell::after {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.1)),
            radial-gradient(ellipse at 50% 14%, transparent 0%, rgba(202, 219, 229, 0.2) 84%);
    }

    .auth-stage {
        width: 100%;
        max-width: none;
        min-height: 100dvh;
        display: block;
        padding:
            max(12px, env(safe-area-inset-top))
            14px
            max(20px, env(safe-area-inset-bottom));
    }

    .auth-entry {
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: start;
    }

    .auth-visual {
        display: block;
        width: 100%;
        max-width: 100%;
        min-height: 96px;
        height: 96px;
        border-radius: 18px;
        overflow: hidden;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(245, 250, 253, 0.58)),
            rgba(255, 255, 255, 0.6);
        box-shadow:
            0 12px 28px rgba(31, 41, 55, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .auth-visual::before {
        background:
            linear-gradient(110deg, rgba(255, 255, 255, 0.1), rgba(0, 120, 212, 0.12) 42%, rgba(255, 255, 255, 0.18));
        mask-image: none;
    }

    .auth-visual::after {
        right: -48px;
        top: -78px;
        width: 170px;
        height: 170px;
        opacity: 0.78;
    }

    .auth-visual-mark {
        left: 16px;
        top: 16px;
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 20px;
        box-shadow: 0 10px 22px rgba(0, 120, 212, 0.22);
    }

    .auth-visual-copy {
        left: 70px;
        top: 18px;
        bottom: auto;
        gap: 4px;
    }

    .auth-visual-copy span {
        color: #5d6976;
        font-size: 10px;
        letter-spacing: 0.08em;
    }

    .auth-visual-copy strong {
        max-width: none;
        color: #202020;
        font-size: 22px;
        line-height: 1.08;
        white-space: nowrap;
    }

    .auth-visual-map,
    .auth-visual-stack {
        display: none;
    }

    .auth-card {
        width: 100%;
        max-width: 100%;
        min-height: 438px;
        height: auto;
        padding: 17px;
        border-radius: 18px;
        overflow: visible;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(247, 251, 254, 0.66)),
            rgba(255, 255, 255, 0.68);
        box-shadow:
            0 14px 32px rgba(31, 41, 55, 0.13),
            inset 0 1px 0 rgba(255, 255, 255, 0.84);
    }

    .auth-card-top {
        gap: 13px;
        margin-bottom: 16px;
    }

    .auth-brand-block {
        display: none;
    }

    .auth-card .theme-toggle {
        display: none;
    }

    .auth-brand-row {
        gap: 10px;
    }

    .auth-mark {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 17px;
    }

    .auth-brand {
        font-size: 19px;
        line-height: 1.12;
    }

    .auth-brand-caption {
        max-width: calc(100vw - 116px);
        min-height: 17px;
        margin-top: 3px;
        font-size: 12px;
        color: #5f6b78;
    }

    .auth-tabs {
        padding: 4px;
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.62);
    }

    .auth-tabs::before {
        top: 4px;
        bottom: 4px;
        left: 4px;
        width: calc((100% - 8px) / 3);
        border-radius: 10px;
        box-shadow: 0 6px 14px var(--auth-selection-shadow);
    }

    .auth-tab {
        min-height: 38px;
        padding: 9px 0;
        font-size: 14px;
        line-height: 1;
    }

    .auth-panels {
        overflow: visible;
        min-height: auto;
        padding-right: 0;
    }

    .auth-note {
        margin-bottom: 12px;
    }

    .auth-note strong {
        font-size: 15px;
    }

    .auth-form {
        gap: 11px;
    }

    .auth-form.compact {
        margin-top: 13px;
    }

    .auth-form label {
        gap: 6px;
    }

    .auth-form span {
        font-size: 13px;
    }

    .auth-form input {
        min-height: 44px;
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 15px;
        background: rgba(255, 255, 255, 0.9);
    }

    .auth-shell .btn {
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 14px;
    }

    .auth-card .btn.primary.wide,
    .auth-card .btn.secondary.wide {
        width: 100%;
        min-width: 0;
        justify-self: stretch;
    }

    .auth-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: stretch;
        align-items: stretch;
        gap: 10px;
        margin-top: 13px;
    }

    .auth-shell .text-link {
        justify-self: center;
        padding: 2px 0;
        font-size: 14px;
    }

    .ticket-hint,
    .flash {
        margin-bottom: 12px;
        padding: 10px 12px;
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .auth-stage {
        padding:
            max(10px, env(safe-area-inset-top))
            10px
            max(16px, env(safe-area-inset-bottom));
    }

    .auth-entry {
        gap: 8px;
    }

    .auth-visual {
        min-height: 86px;
        height: 86px;
        border-radius: 16px;
    }

    .auth-visual-mark {
        left: 14px;
        top: 14px;
        width: 38px;
        height: 38px;
    }

    .auth-visual-copy {
        left: 64px;
        top: 16px;
    }

    .auth-visual-copy strong {
        font-size: 20px;
    }

    .auth-card {
        min-height: 430px;
        padding: 15px;
        border-radius: 16px;
    }

    .auth-card-top {
        gap: 11px;
        margin-bottom: 14px;
    }

    .auth-form {
        gap: 10px;
    }
}

.auth-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-card-header .auth-brand-block {
    min-width: 0;
}

.auth-mobile-tools {
    display: none;
}

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

.theme-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: var(--panel-strong);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 760;
    line-height: 1;
    transition:
        transform 180ms var(--motion-standard),
        border-color 180ms var(--motion-standard),
        background 180ms var(--motion-standard),
        color 180ms var(--motion-standard);
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(48, 124, 255, 0.28);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.98);
}

.theme-toggle:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(48, 124, 255, 0.18);
}

.theme-icon {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #f5bf4f;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.theme-icon::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 1px solid rgba(245, 191, 79, 0.22);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --panel: rgba(22, 31, 49, 0.88);
    --panel-strong: rgba(30, 42, 64, 0.96);
    --panel-soft: rgba(22, 31, 49, 0.7);
    --line: rgba(146, 167, 205, 0.2);
    --text: #edf4ff;
    --muted: #aebdd2;
    --primary: #82adff;
    --primary-soft: rgba(130, 173, 255, 0.18);
    --success: #62d79e;
    --danger: #ff8094;
    --shadow: 0 20px 45px rgba(1, 6, 18, 0.34);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(63, 108, 196, 0.24), transparent 28%),
        radial-gradient(circle at 86% 8%, rgba(80, 198, 180, 0.14), transparent 22%),
        linear-gradient(180deg, #0b1220 0%, #101827 100%);
}

html[data-theme="dark"] body::before {
    opacity: 0.06;
    mix-blend-mode: screen;
}

html[data-theme="dark"] .sidebar {
    background: rgba(12, 18, 31, 0.72);
}

html[data-theme="dark"] .brand-mark {
    box-shadow: 0 16px 34px rgba(36, 103, 232, 0.24);
}

html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .subnav-link.active,
html[data-theme="dark"] .subnav-link:hover {
    background: rgba(130, 173, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(130, 173, 255, 0.18);
}

html[data-theme="dark"] .side-card.compact,
html[data-theme="dark"] .user-pill,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .shortcut-card,
html[data-theme="dark"] .list-card,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .detail-list div {
    background: rgba(30, 42, 64, 0.72);
    border-color: rgba(146, 167, 205, 0.18);
}

html[data-theme="dark"] .hero-panel {
    background:
        linear-gradient(135deg, rgba(22, 31, 49, 0.92), rgba(17, 25, 40, 0.94)),
        radial-gradient(circle at right top, rgba(130, 173, 255, 0.12), transparent 45%);
}

html[data-theme="dark"] .tag {
    color: #b9d1ff;
}

html[data-theme="dark"] .status {
    color: #b8f4d6;
    background: rgba(98, 215, 158, 0.13);
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
    border-bottom-color: rgba(146, 167, 205, 0.16);
}

html[data-theme="dark"] .btn.secondary {
    color: #edf4ff;
    background: rgba(30, 42, 64, 0.82);
    border-color: rgba(146, 167, 205, 0.2);
    box-shadow: none;
}

html[data-theme="dark"] .theme-toggle {
    color: #edf4ff;
    background: rgba(30, 42, 64, 0.92);
    border-color: rgba(146, 167, 205, 0.22);
}

html[data-theme="dark"] .theme-icon {
    background: transparent;
    box-shadow: inset -5px -3px 0 0 #dce8ff;
}

html[data-theme="dark"] .theme-icon::before {
    border-color: rgba(220, 232, 255, 0.2);
}

.auth-shell .theme-toggle {
    min-height: 38px;
    padding: 0 11px;
    color: #202020;
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(80, 88, 99, 0.2);
}

.auth-shell .theme-toggle:hover {
    border-color: rgba(0, 120, 212, 0.32);
    background: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] body:has(.auth-shell) {
    color: #edf4ff;
    background:
        radial-gradient(ellipse at 22% -8%, rgba(54, 103, 197, 0.28), transparent 42%),
        radial-gradient(ellipse at 108% 6%, rgba(70, 194, 172, 0.18), transparent 38%),
        linear-gradient(180deg, #0b1220 0%, #111827 58%, #0d1422 100%);
}

html[data-theme="dark"] {
    --auth-selection: #5a74df;
    --auth-selection-shadow: rgba(90, 116, 223, 0.24);
    --auth-action: #5a74df;
    --auth-action-hover: #6883eb;
    --auth-action-active: #465fc2;
}

html[data-theme="dark"] .auth-shell {
    color: #edf4ff;
    background:
        radial-gradient(ellipse at 18% -6%, rgba(54, 103, 197, 0.24), transparent 42%),
        radial-gradient(ellipse at 98% 4%, rgba(70, 194, 172, 0.18), transparent 36%),
        linear-gradient(180deg, #0b1220 0%, #111827 58%, #0d1422 100%);
}

html[data-theme="dark"] .auth-shell::before {
    opacity: 0.36;
}

html[data-theme="dark"] .auth-shell::after {
    background:
        linear-gradient(180deg, rgba(10, 18, 32, 0.38), rgba(10, 18, 32, 0.08)),
        radial-gradient(ellipse at 50% 14%, transparent 0%, rgba(5, 10, 20, 0.26) 84%);
}

html[data-theme="dark"] .auth-visual,
html[data-theme="dark"] .auth-card {
    color: #edf4ff;
    border-color: rgba(146, 167, 205, 0.2);
    background:
        linear-gradient(135deg, rgba(25, 36, 56, 0.88), rgba(15, 23, 38, 0.74)),
        rgba(12, 18, 31, 0.78);
    box-shadow:
        0 18px 42px rgba(1, 6, 18, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .auth-card:hover {
    border-color: rgba(146, 167, 205, 0.28);
    background:
        linear-gradient(135deg, rgba(29, 42, 66, 0.9), rgba(16, 25, 41, 0.8)),
        rgba(12, 18, 31, 0.82);
}

html[data-theme="dark"] .auth-visual::before {
    background:
        linear-gradient(rgba(220, 232, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 232, 255, 0.045) 1px, transparent 1px);
}

html[data-theme="dark"] .auth-visual-stack span {
    color: #d7e5fb;
    background:
        linear-gradient(135deg, rgba(40, 57, 87, 0.76), rgba(14, 23, 39, 0.62)),
        rgba(9, 16, 29, 0.68);
    border-color: rgba(146, 167, 205, 0.2);
    box-shadow:
        0 14px 30px rgba(1, 6, 18, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 3px 0 0 rgba(130, 173, 255, 0.42);
}

html[data-theme="dark"] .auth-visual-stack span::before {
    background: #82adff;
    box-shadow:
        0 0 0 4px rgba(130, 173, 255, 0.14),
        0 0 18px rgba(130, 173, 255, 0.45);
}

html[data-theme="dark"] .auth-visual-stack span:nth-child(2) {
    box-shadow:
        0 14px 30px rgba(1, 6, 18, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 3px 0 0 rgba(70, 194, 172, 0.42);
}

html[data-theme="dark"] .auth-visual-stack span:nth-child(2)::before {
    background: #46c2ac;
    box-shadow:
        0 0 0 4px rgba(70, 194, 172, 0.13),
        0 0 18px rgba(70, 194, 172, 0.38);
}

html[data-theme="dark"] .auth-visual-stack span:nth-child(3) {
    box-shadow:
        0 14px 30px rgba(1, 6, 18, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 3px 0 0 rgba(98, 215, 158, 0.38);
}

html[data-theme="dark"] .auth-visual-stack span:nth-child(3)::before {
    background: #62d79e;
    box-shadow:
        0 0 0 4px rgba(98, 215, 158, 0.12),
        0 0 18px rgba(98, 215, 158, 0.34);
}

.auth-visual-mark,
.auth-mark {
    font-family: var(--brand-display-font);
    font-weight: 400;
}

.auth-visual-copy strong {
    font-weight: 600;
}

html[data-theme="dark"] .auth-visual-copy span,
html[data-theme="dark"] .auth-brand-caption,
html[data-theme="dark"] .auth-form span,
html[data-theme="dark"] .ticket-hint,
html[data-theme="dark"] .flash {
    color: #aebdd2;
}

html[data-theme="dark"] .auth-visual-copy strong,
html[data-theme="dark"] .auth-brand,
html[data-theme="dark"] .auth-note,
html[data-theme="dark"] .auth-note strong {
    color: #edf4ff;
}

html[data-theme="dark"] .auth-tabs {
    background: rgba(10, 18, 32, 0.58);
    border-color: rgba(146, 167, 205, 0.18);
}

html[data-theme="dark"] .auth-tab {
    color: #aebdd2;
}

html[data-theme="dark"] .auth-tab:hover {
    color: #edf4ff;
    background: rgba(130, 173, 255, 0.08);
}

html[data-theme="dark"] .auth-form input {
    color: #edf4ff;
    background: rgba(7, 13, 24, 0.62);
    border-color: rgba(146, 167, 205, 0.22);
}

html[data-theme="dark"] .auth-form input::placeholder {
    color: #8190a8;
}

html[data-theme="dark"] .auth-form input:hover {
    border-color: rgba(146, 167, 205, 0.32);
}

html[data-theme="dark"] .auth-form input:focus {
    border-color: rgba(130, 173, 255, 0.58);
    background: rgba(9, 16, 29, 0.82);
    box-shadow: 0 0 0 3px rgba(130, 173, 255, 0.16);
}

html[data-theme="dark"] .auth-shell .btn.secondary {
    color: #edf4ff;
    background: rgba(30, 42, 64, 0.82);
    border-color: rgba(146, 167, 205, 0.22);
}

html[data-theme="dark"] .auth-shell .btn.secondary:hover {
    background: rgba(42, 57, 84, 0.9);
}

html[data-theme="dark"] .auth-shell .text-link {
    color: #9fc1ff;
}

html[data-theme="dark"] .ticket-hint,
html[data-theme="dark"] .flash {
    background: rgba(30, 42, 64, 0.7);
    border-color: rgba(146, 167, 205, 0.16);
}

html[data-theme="dark"] .auth-shell .flash.success,
html[data-theme="dark"] .auth-shell .ticket-hint.success {
    color: #b8f4d6;
    background: rgba(98, 215, 158, 0.12);
    border-color: rgba(98, 215, 158, 0.22);
}

html[data-theme="dark"] .auth-shell .flash.error {
    color: #ffc5ce;
    background: rgba(255, 128, 148, 0.12);
    border-color: rgba(255, 128, 148, 0.24);
}

html[data-theme="dark"] .auth-shell .theme-toggle {
    color: #edf4ff;
    background: rgba(30, 42, 64, 0.86);
    border-color: rgba(146, 167, 205, 0.22);
}

@media (max-width: 720px) {
    .theme-toggle {
        min-height: 38px;
    }
}

@media (max-width: 760px) {
    .auth-entry {
        position: relative;
    }

    .auth-mobile-tools {
        position: absolute;
        top: 14px;
        right: 14px;
        z-index: 3;
        display: flex;
        justify-content: flex-end;
    }

    .auth-mobile-tools .theme-toggle {
        min-height: 36px;
        padding: 0 10px;
        background: rgba(255, 255, 255, 0.82);
        border-color: rgba(80, 88, 99, 0.18);
        box-shadow: 0 8px 20px rgba(31, 41, 55, 0.12);
    }

    .auth-card-header {
        display: none;
        min-height: 0;
    }

    .auth-card-header .auth-brand-block {
        display: none;
    }

    .auth-card .theme-toggle {
        display: none;
    }

    html[data-theme="dark"] .auth-mobile-tools .theme-toggle {
        background: rgba(30, 42, 64, 0.88);
        border-color: rgba(146, 167, 205, 0.22);
        box-shadow: 0 10px 22px rgba(1, 6, 18, 0.22);
    }
}

@media (max-width: 380px) {
    .auth-mobile-tools {
        top: 12px;
        right: 12px;
    }

    .auth-mobile-tools .theme-toggle {
        min-height: 34px;
        padding: 0 9px;
    }
}

/* Verification-code submit buttons: theme-blue status chips. */
.auth-shell .auth-form .btn.secondary[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    min-height: 36px;
    justify-self: start;
    padding: 8px 15px;
    border-radius: 999px;
    color: #ffffff;
    border-color: var(--auth-action);
    background: var(--auth-action);
    box-shadow: 0 5px 12px rgba(79, 107, 216, 0.16);
    font-weight: 760;
}

.auth-shell .auth-form .btn.secondary[type="submit"]::before {
    content: none;
}

.auth-shell .auth-form .btn.secondary[type="submit"]:hover {
    color: #ffffff;
    border-color: var(--auth-action-hover);
    background: var(--auth-action-hover);
    box-shadow: 0 7px 14px rgba(79, 107, 216, 0.2);
}

.auth-shell .auth-form .btn.secondary[type="submit"]:active {
    color: #ffffff;
    border-color: var(--auth-action-active);
    background: var(--auth-action-active);
    box-shadow: inset 0 1px 2px rgba(34, 48, 112, 0.18);
}

.auth-shell .auth-form .btn.secondary[type="submit"]:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 3px rgba(79, 107, 216, 0.18),
        0 4px 10px rgba(79, 107, 216, 0.14);
}

.auth-shell .auth-form .btn.secondary[type="submit"] .btn-label {
    color: #ffffff !important;
    letter-spacing: 0;
}

.auth-shell .auth-form .btn.secondary[type="submit"] .btn-loader {
    width: 22px;
    height: 22px;
}

.auth-shell .auth-form .btn.secondary[type="submit"] .btn-loader-dot {
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    transform:
        rotate(var(--angle))
        translateY(-9px)
        scale(0.65);
}

.auth-shell .auth-form .btn.secondary[type="submit"] .btn-loader-dot {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .auth-shell .auth-form .btn.secondary[type="submit"] {
    color: #ffffff;
    border-color: var(--auth-action);
    background: var(--auth-action);
    box-shadow: 0 6px 14px rgba(1, 6, 18, 0.22);
}

html[data-theme="dark"] .auth-shell .auth-form .btn.secondary[type="submit"]::before {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .auth-shell .auth-form .btn.secondary[type="submit"]:hover {
    color: #ffffff;
    border-color: var(--auth-action-hover);
    background: var(--auth-action-hover);
    box-shadow: 0 8px 16px rgba(1, 6, 18, 0.26);
}

html[data-theme="dark"] .auth-shell .auth-form .btn.secondary[type="submit"] .btn-loader-dot {
    background: #9fc1ff;
    box-shadow: 0 0 10px rgba(159, 193, 255, 0.2);
}

.auth-shell .auth-card .btn.primary.wide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    min-width: 148px;
    min-height: 46px;
    justify-self: start;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    color: #ffffff !important;
    background: var(--auth-action);
    box-shadow: none;
}

.auth-shell .auth-card .btn.primary.wide::before {
    content: none;
}

.auth-shell .auth-card .btn.primary.wide::after {
    content: none;
}

.auth-shell .auth-card .btn.primary.wide:hover {
    background: var(--auth-action-hover);
    box-shadow: none;
}

.auth-shell .auth-card .btn.primary.wide:active {
    background: var(--auth-action-active);
}

.auth-shell .auth-card .btn.primary.wide .btn-label {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 850;
}

html[data-theme="dark"] .auth-shell .auth-card .btn.primary.wide {
    background: var(--auth-action);
}

html[data-theme="dark"] .auth-shell .auth-card .btn.primary.wide:hover {
    background: var(--auth-action-hover);
}

.auth-shell .code-request-form {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    row-gap: 9px;
}

.auth-shell .code-request-form label {
    min-width: 0;
}

.auth-shell .code-request-form .btn.secondary[type="submit"] {
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--auth-action);
    box-shadow: none;
}

.auth-shell .code-request-form .btn.secondary[type="submit"]::before {
    content: none;
}

.auth-shell .code-request-form .btn.secondary[type="submit"]:hover {
    color: #ffffff;
    background: var(--auth-action-hover);
    box-shadow: none;
}

.auth-shell .code-request-form .btn.secondary[type="submit"]:active {
    color: #ffffff;
    background: var(--auth-action-active);
}

.auth-shell .code-request-form .btn.secondary[type="submit"] .btn-label {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 850;
}

html[data-theme="dark"] .auth-shell .code-request-form .btn.secondary[type="submit"] {
    color: #ffffff;
    background: var(--auth-action);
    box-shadow: none;
}

html[data-theme="dark"] .auth-shell .code-request-form .btn.secondary[type="submit"]::before {
    background:
        radial-gradient(circle, #ffffff 0 35%, #dce7ff 38% 100%);
    box-shadow: none;
}

html[data-theme="dark"] .auth-shell .code-request-form .btn.secondary[type="submit"]:hover {
    color: #ffffff;
    background: var(--auth-action-hover);
}

/* Account actions: calm secondary controls for the login form. */
.auth-shell .auth-actions .btn.secondary[data-login-mode-trigger],
.auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(0);
    transition:
        color 170ms var(--motion-standard),
        background 170ms var(--motion-standard),
        border-color 170ms var(--motion-standard),
        box-shadow 170ms var(--motion-standard),
        transform 170ms var(--motion-standard);
}

.auth-shell .auth-actions .btn.secondary[data-login-mode-trigger] {
    gap: 5px;
    width: auto;
    padding: 4px 2px;
    color: #64748b;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-weight: 700;
}

.auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]::before {
    content: none;
}

.auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]::after {
    content: ">";
    color: currentColor;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-1px);
    transition: transform 170ms var(--motion-standard);
}

.auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]:hover {
    color: #0d6675;
    background: transparent;
    box-shadow: none;
    transform: translateY(-1px);
}

.auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]:hover::after {
    transform: translate(2px, -1px);
}

.auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]:focus-visible,
.auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"]:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 3px rgba(15, 127, 140, 0.14),
        0 2px 8px rgba(15, 127, 140, 0.1);
}

.auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"] {
    gap: 6px;
    padding: 0 8px;
    color: #64748b;
    background: transparent;
    font-weight: 680;
}

.auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"]::before {
    content: "?";
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    color: #64748b;
    background: rgba(100, 116, 139, 0.11);
    font-size: 10px;
    font-weight: 800;
}

.auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"]:hover {
    color: #0d6675;
    background: rgba(15, 127, 140, 0.055);
    transform: translateY(-1px);
}

.auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"]:hover::before {
    color: #0d6675;
    background: rgba(15, 127, 140, 0.11);
}

html[data-theme="dark"] .auth-shell .auth-actions .btn.secondary[data-login-mode-trigger] {
    color: #aebdd2;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

html[data-theme="dark"] .auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]::before {
    content: none;
}

html[data-theme="dark"] .auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]::after {
    color: currentColor;
}

html[data-theme="dark"] .auth-shell .auth-actions .btn.secondary[data-login-mode-trigger]:hover {
    color: #dbeaff;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

html[data-theme="dark"] .auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"] {
    color: #aebdd2;
}

html[data-theme="dark"] .auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"]::before {
    color: #aebdd2;
    background: rgba(174, 189, 210, 0.12);
}

html[data-theme="dark"] .auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"]:hover,
html[data-theme="dark"] .auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"]:focus-visible {
    color: #dbeaff;
    background: rgba(130, 173, 255, 0.08);
}

@media (max-width: 760px) {
    .auth-card {
        min-height: 0;
    }

    .auth-shell .code-request-form {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 8px;
    }

    .auth-shell .auth-form .btn.secondary[type="submit"] {
        min-height: 36px;
        justify-self: start;
    }

    .auth-shell .code-request-form .btn.secondary[type="submit"] {
        justify-self: start;
    }

    .auth-shell .auth-actions .btn.secondary[data-login-mode-trigger] {
        width: fit-content;
        max-width: 100%;
        justify-self: center;
        min-height: 38px;
        padding: 8px 12px;
    }

    .auth-shell .auth-actions button.text-link[data-auth-tab="forgot-password"] {
        justify-self: center;
        min-height: 34px;
    }
}

/* Final auth feedback pass: transient messages should never leave layout debt. */
.auth-shell .flash[data-flash] {
    --flash-wave-ring: rgba(22, 132, 90, 0.86);
    --flash-wave-core: rgba(31, 190, 124, 0.42);
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    margin-bottom: 12px;
    padding: 11px 13px;
    overflow: hidden;
    isolation: isolate;
    pointer-events: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 760;
    line-height: 1.35;
    transition:
        opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
        height 220ms var(--motion-decelerate),
        margin-bottom 220ms var(--motion-decelerate),
        padding-top 220ms var(--motion-decelerate),
        padding-bottom 220ms var(--motion-decelerate),
        border-width 220ms var(--motion-decelerate);
}

.auth-shell .flash[data-flash]::before {
    content: "!";
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    z-index: 1;
    width: 22px;
    height: 22px;
    margin-top: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #b42318;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    box-shadow:
        0 0 0 5px rgba(180, 35, 24, 0.08),
        0 0 16px rgba(180, 35, 24, 0.16);
}

.auth-shell .flash.success[data-flash]::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 4px;
    color: transparent;
    font-size: 0;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.46), transparent 40%),
        #45d98d;
    box-shadow:
        0 0 0 2px rgba(22, 132, 90, 0.08),
        0 0 7px rgba(22, 132, 90, 0.16);
}

.auth-shell .flash.error[data-flash] {
    --flash-wave-ring: rgba(180, 35, 24, 0.78);
    --flash-wave-core: rgba(255, 128, 148, 0.34);
    color: #8f1f17;
    border-color: rgba(180, 35, 24, 0.18);
    background:
        linear-gradient(135deg, rgba(180, 35, 24, 0.09), rgba(180, 35, 24, 0.045)),
        rgba(255, 255, 255, 0.6);
}

.auth-shell .flash.success[data-flash] {
    color: #0f5f3c;
    border-color: rgba(22, 132, 90, 0.18);
    background:
        linear-gradient(135deg, rgba(22, 132, 90, 0.105), rgba(22, 132, 90, 0.045)),
        rgba(255, 255, 255, 0.62);
}

.auth-shell .flash-message {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.auth-shell .flash.is-entering {
    opacity: 0;
    transform: translate3d(0, -8px, 0) scale(0.986);
}

.auth-shell .flash.is-entered {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.auth-flash-wave {
    --flash-stream-size: max(180px, 100%);
    position: absolute;
    inset: 0;
    z-index: 0;
    padding: 2px;
    overflow: hidden;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    contain: layout paint;
    backface-visibility: hidden;
    will-change: opacity, transform;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: auth-flash-wave-frame 1320ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-flash-wave::before,
.auth-flash-wave::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.auth-flash-wave::before {
    left: 50%;
    top: 50%;
    width: calc(var(--flash-stream-size) * 1.42);
    height: calc(var(--flash-stream-size) * 1.42);
    border-radius: 999px;
    background:
        conic-gradient(
            from -132deg,
            transparent 0deg,
            transparent 198deg,
            color-mix(in srgb, var(--flash-wave-core) 58%, transparent) 238deg,
            color-mix(in srgb, var(--flash-wave-ring) 86%, transparent) 278deg,
            color-mix(in srgb, var(--flash-wave-core) 44%, transparent) 306deg,
            transparent 338deg,
            transparent 360deg
        );
    transform: translate(-50%, -50%) rotate(0deg);
    animation: auth-input-stream 1320ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-flash-wave::after {
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--flash-wave-ring) 38%, transparent),
        inset 0 0 18px color-mix(in srgb, var(--flash-wave-core) 28%, transparent);
    opacity: 0;
    animation: auth-input-stream-shell 1320ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-shell .flash.is-dismissing {
    opacity: 0;
    transform: translateY(-6px);
}

html[data-theme="dark"] .auth-shell .flash.error[data-flash] {
    color: #ffc5ce;
    border-color: rgba(255, 128, 148, 0.24);
    background:
        linear-gradient(135deg, rgba(255, 128, 148, 0.13), rgba(255, 128, 148, 0.06)),
        rgba(23, 32, 48, 0.86);
}

html[data-theme="dark"] .auth-shell .flash.success[data-flash] {
    color: #b8f4d6;
    border-color: rgba(98, 215, 158, 0.24);
    background:
        linear-gradient(135deg, rgba(98, 215, 158, 0.14), rgba(98, 215, 158, 0.055)),
        rgba(24, 39, 48, 0.86);
}

html[data-theme="dark"] .auth-shell .flash.error[data-flash]::before {
    background: #ff7f93;
    color: #3a0810;
}

html[data-theme="dark"] .auth-shell .flash.success[data-flash]::before {
    color: transparent;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.42), transparent 40%),
        #5fe5a0;
    box-shadow:
        0 0 0 2px rgba(98, 215, 158, 0.1),
        0 0 7px rgba(98, 215, 158, 0.18);
}

html[data-theme="dark"] .auth-flash-wave {
    mix-blend-mode: screen;
}

@keyframes auth-flash-wave-frame {
    0% {
        opacity: 0;
        transform: scale(0.992);
    }

    14% {
        opacity: 0.82;
        transform: scale(1);
    }

    64% {
        opacity: 0.56;
        transform: scale(1.004);
    }

    100% {
        opacity: 0;
        transform: scale(1.01);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell .flash[data-flash],
    .auth-shell .flash.is-entering,
    .auth-shell .flash.is-entered {
        transform: none;
    }

    .auth-flash-wave,
    .auth-flash-wave::before,
    .auth-flash-wave::after {
        animation: none;
    }

    .auth-flash-wave {
        opacity: 0.18;
    }
}

/* Home v2: align the logged-in entry page with the compact auth visual system. */
body:has(.home-shell) {
    color: #121923;
    background:
        linear-gradient(rgba(31, 41, 55, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 41, 55, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.96), transparent 30%),
        radial-gradient(circle at 82% 8%, rgba(44, 143, 166, 0.13), transparent 34%),
        linear-gradient(135deg, #f7f9fd 0%, #eef3f6 52%, #f8fafc 100%);
    background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

body:has(.home-shell)::before {
    display: block;
    opacity: 0.16;
    background-image:
        radial-gradient(circle, rgba(0, 132, 210, 0.22) 1px, transparent 1px),
        linear-gradient(120deg, transparent 0 44%, rgba(0, 132, 210, 0.09) 45% 46%, transparent 47% 100%);
    background-size: 94px 94px, 180px 180px;
    background-position: 12px 8px, -24px 16px;
    mix-blend-mode: normal;
}

.home-shell {
    position: relative;
    z-index: 1;
    grid-template-columns: 244px minmax(0, 1fr);
    min-height: 100dvh;
}

.home-route-progress {
    position: fixed;
    z-index: 80;
    top: 0;
    left: 0;
    width: 34%;
    height: 2px;
    pointer-events: none;
    background: var(--home-green, #149b72);
    transform: translate3d(-110%, 0, 0);
    animation: home-route-progress 680ms cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.home-shell.is-route-loading .home-navigation,
.home-shell.is-route-loading .home-empty-stage {
    pointer-events: none;
}

@keyframes home-route-progress {
    to { transform: translate3d(330%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .home-route-progress {
        width: 100%;
        animation: none;
        transform: none;
    }
}

.home-shell .sidebar {
    position: sticky;
    top: 0;
    min-height: 100dvh;
    padding: 18px 14px;
    border-right: 1px solid rgba(37, 47, 66, 0.12);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 10px 0 34px rgba(18, 26, 40, 0.045);
    backdrop-filter: blur(12px) saturate(1.08);
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
}

.home-shell .brand {
    gap: 11px;
    margin-bottom: 18px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(37, 47, 66, 0.11);
    background: rgba(255, 255, 255, 0.56);
}

.home-shell .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #0789d7;
    box-shadow: 0 10px 18px rgba(7, 137, 215, 0.18);
    font-size: 20px;
}

.home-shell .brand strong {
    color: #121923;
    font-size: 17px;
    line-height: 1.1;
}

.home-shell .brand span {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.25;
}

.home-shell .nav-list {
    gap: 6px;
}

.home-shell .nav-link,
.home-shell .subnav-link {
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 720;
    transition:
        color 170ms var(--motion-standard),
        background 170ms var(--motion-standard),
        box-shadow 170ms var(--motion-standard),
        transform 170ms var(--motion-standard);
}

.home-shell .nav-link.active,
.home-shell .nav-link:hover,
.home-shell .subnav-link.active,
.home-shell .subnav-link:hover {
    color: #ffffff;
    background: #0789d7;
    box-shadow: none;
    transform: translateY(-1px);
}

.home-shell .side-card {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    border-color: rgba(37, 47, 66, 0.11);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 10px 24px rgba(18, 26, 40, 0.055);
}

.home-shell .side-card h3 {
    margin: 4px 0 8px;
    color: #121923;
    font-size: 17px;
}

.home-shell .side-card p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.home-shell .ghost-link {
    color: #0d6675;
    font-size: 13px;
}

.home-shell .workspace {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 22px;
}

.home-shell .topbar {
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(37, 47, 66, 0.11);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 14px 32px rgba(18, 26, 40, 0.06);
    backdrop-filter: blur(10px) saturate(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.05);
}

.home-shell .topbar .eyebrow,
.home-shell .hero-copy .eyebrow,
.home-shell .metric-card span {
    color: #64748b;
    font-size: 12px;
    font-weight: 820;
    letter-spacing: 0.04em;
}

.home-shell .topbar h1 {
    margin-top: 4px;
    color: #121923;
    font-size: 24px;
    line-height: 1.1;
}

.home-shell .topbar-actions {
    gap: 8px;
}

.home-shell .theme-toggle,
.home-shell .user-pill,
.home-shell .topbar-actions .btn.secondary {
    min-height: 38px;
    border-radius: 999px;
    border-color: rgba(37, 47, 66, 0.12);
    background: rgba(255, 255, 255, 0.7);
    color: #1f2937;
    box-shadow: none;
}

.home-shell .user-pill {
    padding: 8px 12px;
    font-size: 13px;
}

.home-shell .user-pill span {
    color: #64748b;
}

.home-shell .topbar-actions .btn.secondary {
    padding: 0 14px;
    font-size: 13px;
    font-weight: 760;
}

.home-shell .home-hero-panel {
    position: relative;
    min-height: 430px;
    padding: 22px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(37, 47, 66, 0.12);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 252, 0.78)),
        radial-gradient(circle at 88% 0%, rgba(0, 132, 210, 0.13), transparent 32%);
    box-shadow: 0 18px 38px rgba(18, 26, 40, 0.1);
    backdrop-filter: blur(10px) saturate(1.08);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

.home-shell .home-hero-panel::before,
.home-shell .home-hero-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.home-shell .home-hero-panel::before {
    inset: 0;
    opacity: 0.45;
    background:
        radial-gradient(circle at 12% 24%, rgba(0, 132, 210, 0.32) 0 2px, transparent 3px),
        radial-gradient(circle at 38% 54%, rgba(0, 132, 210, 0.28) 0 2px, transparent 3px),
        radial-gradient(circle at 72% 22%, rgba(0, 132, 210, 0.2) 0 2px, transparent 3px),
        linear-gradient(125deg, transparent 0 28%, rgba(0, 132, 210, 0.14) 28.3% 28.8%, transparent 29% 100%),
        linear-gradient(32deg, transparent 0 60%, rgba(0, 132, 210, 0.13) 60.2% 60.8%, transparent 61% 100%);
}

.home-shell .home-hero-panel::after {
    right: -72px;
    bottom: -120px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: rgba(0, 132, 210, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 132, 210, 0.08);
}

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

.home-shell .home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #0d6675;
    background: rgba(15, 127, 140, 0.08);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.home-shell .home-hero-badge span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.home-shell .hero-copy {
    align-self: center;
}

.home-shell .hero-copy h2 {
    max-width: 540px;
    margin: 10px 0 10px;
    color: #121923;
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: 0.98;
    font-weight: 880;
    text-wrap: balance;
}

.home-shell .hero-copy p:not(.eyebrow) {
    max-width: 540px;
    color: #475569;
    font-size: 15px;
    line-height: 1.75;
}

.home-shell .home-session-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.home-shell .home-session-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid rgba(37, 47, 66, 0.1);
    border-radius: 999px;
    color: #475569;
    background: rgba(255, 255, 255, 0.54);
    font-size: 13px;
    font-weight: 720;
}

.home-shell .hero-actions {
    gap: 10px;
    margin-top: 22px;
}

.home-shell .btn {
    border-radius: 999px;
    font-weight: 820;
}

.home-shell .btn.primary {
    color: #ffffff;
    background: #4f6bd8;
    box-shadow: none;
}

.home-shell .btn.primary:hover {
    background: #5d78e8;
}

.home-shell .hero-actions .btn.primary {
    min-height: 46px;
    padding: 0 24px;
}

.home-shell .hero-actions .btn.secondary {
    min-height: 46px;
    padding: 0 20px;
    color: #475569;
    border: 1px solid rgba(37, 47, 66, 0.12);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.home-shell .hero-actions .btn.secondary:hover {
    color: #0d6675;
    background: rgba(255, 255, 255, 0.82);
}

.home-shell .home-metric-grid {
    align-self: stretch;
    gap: 10px;
}

.home-shell .home-metric-card {
    min-height: 152px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(37, 47, 66, 0.1);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        transform 170ms var(--motion-standard),
        border-color 170ms var(--motion-standard),
        background 170ms var(--motion-standard);
}

.home-shell .home-metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 132, 210, 0.22);
    background: rgba(255, 255, 255, 0.74);
}

.home-shell .home-metric-card strong {
    margin: 12px 0 7px;
    color: #121923;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 34px;
    line-height: 0.95;
    font-variant-numeric: tabular-nums;
}

.home-shell .home-metric-card small {
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

html[data-theme="dark"] body:has(.home-shell) {
    color: #edf4ff;
    background:
        linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        radial-gradient(ellipse at 22% -8%, rgba(54, 103, 197, 0.28), transparent 42%),
        radial-gradient(ellipse at 108% 6%, rgba(70, 194, 172, 0.18), transparent 38%),
        linear-gradient(180deg, #0b1220 0%, #111827 58%, #0d1422 100%);
    background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

html[data-theme="dark"] body:has(.home-shell)::before {
    opacity: 0.11;
    background-image:
        radial-gradient(circle, rgba(80, 170, 255, 0.42) 1px, transparent 1px),
        linear-gradient(120deg, transparent 0 44%, rgba(80, 170, 255, 0.14) 45% 46%, transparent 47% 100%);
    mix-blend-mode: screen;
}

html[data-theme="dark"] .home-shell .sidebar,
html[data-theme="dark"] .home-shell .topbar,
html[data-theme="dark"] .home-shell .side-card,
html[data-theme="dark"] .home-shell .brand {
    border-color: rgba(146, 167, 205, 0.16);
    background: rgba(17, 25, 40, 0.72);
    box-shadow: none;
}

html[data-theme="dark"] .home-shell .brand strong,
html[data-theme="dark"] .home-shell .topbar h1,
html[data-theme="dark"] .home-shell .hero-copy h2,
html[data-theme="dark"] .home-shell .home-metric-card strong,
html[data-theme="dark"] .home-shell .side-card h3 {
    color: #edf4ff;
}

html[data-theme="dark"] .home-shell .brand span,
html[data-theme="dark"] .home-shell .topbar .eyebrow,
html[data-theme="dark"] .home-shell .hero-copy .eyebrow,
html[data-theme="dark"] .home-shell .metric-card span,
html[data-theme="dark"] .home-shell .hero-copy p:not(.eyebrow),
html[data-theme="dark"] .home-shell .home-metric-card small,
html[data-theme="dark"] .home-shell .side-card p,
html[data-theme="dark"] .home-shell .user-pill span {
    color: #aebdd2;
}

html[data-theme="dark"] .home-shell .nav-link,
html[data-theme="dark"] .home-shell .subnav-link {
    color: #aebdd2;
}

html[data-theme="dark"] .home-shell .nav-link.active,
html[data-theme="dark"] .home-shell .nav-link:hover,
html[data-theme="dark"] .home-shell .subnav-link.active,
html[data-theme="dark"] .home-shell .subnav-link:hover {
    color: #ffffff;
    background: #5a74df;
}

html[data-theme="dark"] .home-shell .theme-toggle,
html[data-theme="dark"] .home-shell .user-pill,
html[data-theme="dark"] .home-shell .topbar-actions .btn.secondary,
html[data-theme="dark"] .home-shell .hero-actions .btn.secondary,
html[data-theme="dark"] .home-shell .home-session-strip span,
html[data-theme="dark"] .home-shell .home-metric-card {
    color: #edf4ff;
    border-color: rgba(146, 167, 205, 0.16);
    background: rgba(23, 32, 48, 0.72);
}

html[data-theme="dark"] .home-shell .home-hero-panel {
    border-color: rgba(146, 167, 205, 0.17);
    background:
        linear-gradient(135deg, rgba(22, 31, 49, 0.88), rgba(17, 25, 40, 0.78)),
        radial-gradient(circle at 88% 0%, rgba(90, 116, 223, 0.18), transparent 32%);
    box-shadow: 0 18px 38px rgba(1, 6, 18, 0.22);
}

html[data-theme="dark"] .home-shell .home-hero-badge {
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.09);
}

html[data-theme="dark"] .home-shell .btn.primary {
    background: #5a74df;
}

html[data-theme="dark"] .home-shell .btn.primary:hover {
    background: #6883eb;
}

@media (max-width: 1080px) {
    .home-shell {
        grid-template-columns: 1fr;
    }

    .home-shell .sidebar {
        position: relative;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(37, 47, 66, 0.12);
    }

    .home-shell .home-hero-panel {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .home-shell .sidebar {
        padding: max(14px, env(safe-area-inset-top)) 14px 12px;
    }

    .home-shell,
    .home-shell .workspace,
    .home-shell .topbar,
    .home-shell .home-hero-panel,
    .home-shell .hero-copy,
    .home-shell .hero-actions,
    .home-shell .home-session-strip {
        min-width: 0;
        max-width: 100%;
    }

    .home-shell .workspace {
        padding: 14px;
    }

    .home-shell .topbar {
        padding: 14px;
    }

    .home-shell .topbar-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    .home-shell .topbar-actions .user-pill {
        flex: 1 1 178px;
        min-width: 0;
    }

    .home-shell .topbar-actions form {
        flex: 0 0 auto;
    }

    .home-shell .home-hero-panel {
        min-height: auto;
        padding: 18px;
    }

    .home-shell .hero-copy h2 {
        max-width: 100%;
        font-size: 30px;
        line-height: 1.08;
        overflow-wrap: anywhere;
        word-break: break-word;
        text-wrap: pretty;
    }

    .home-shell .hero-copy p:not(.eyebrow) {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.68;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .home-shell .hero-actions .btn {
        max-width: 100%;
    }

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

    .home-shell .home-metric-card {
        min-height: 130px;
        padding: 14px;
    }

    .home-shell .home-metric-card strong {
        font-size: 28px;
    }
}

@media (max-width: 440px) {
    .home-shell .topbar-actions {
        grid-template-columns: 1fr;
    }

    .home-shell .theme-toggle,
    .home-shell .topbar-actions .btn.secondary {
        width: fit-content;
    }

    .home-shell .home-metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Fangcun Galaxy scene. */
.home-theme-veil {
    position: fixed;
    inset: 0;
    z-index: 9;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
}

.home-theme-veil::before,
.home-theme-veil::after {
    content: "";
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: calc(50% + 2px);
    background: #05090c;
    will-change: transform;
}

.home-theme-veil::before {
    left: -1px;
    box-shadow:
        18px 0 42px rgba(91, 196, 241, 0.28),
        5px 0 14px rgba(101, 224, 178, 0.42);
    transform: translate3d(-104%, 0, 0);
}

.home-theme-veil::after {
    right: -1px;
    box-shadow:
        -18px 0 42px rgba(91, 196, 241, 0.28),
        -5px 0 14px rgba(101, 224, 178, 0.42);
    transform: translate3d(104%, 0, 0);
}

.home-theme-veil[data-mode="leave"]::before,
.home-theme-veil[data-mode="leave"]::after {
    background: #e8ffff;
}

.home-theme-veil[data-mode="leave"]::before {
    box-shadow:
        22px 0 54px rgba(104, 204, 245, 0.44),
        7px 0 18px rgba(101, 224, 178, 0.58);
}

.home-theme-veil[data-mode="leave"]::after {
    box-shadow:
        -22px 0 54px rgba(104, 204, 245, 0.44),
        -7px 0 18px rgba(101, 224, 178, 0.58);
}

.home-theme-veil.is-active {
    visibility: visible;
}

.home-theme-veil.is-active::before {
    animation: home-theme-gate-left 1040ms cubic-bezier(0.65, 0, 0.2, 1) both;
}

.home-theme-veil.is-active::after {
    animation: home-theme-gate-right 1040ms cubic-bezier(0.65, 0, 0.2, 1) both;
}

@keyframes home-theme-gate-left {
    0%,
    8% {
        transform: translate3d(-104%, 0, 0);
    }

    46%,
    54% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-104%, 0, 0);
    }
}

@keyframes home-theme-gate-right {
    0%,
    8% {
        transform: translate3d(104%, 0, 0);
    }

    46%,
    54% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(104%, 0, 0);
    }
}

.home-mobile-bar,
.home-nav-backdrop,
.home-nav-close {
    display: none;
}

.home-nav-brand {
    grid-template-columns: 44px minmax(0, 1fr) auto;
}

.home-nav-brand-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.home-galaxy-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 900ms var(--motion-standard);
    contain: strict;
    will-change: opacity;
}

.home-empty-stage.is-galaxy-ready .home-galaxy-canvas {
    opacity: 1;
}

.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-canvas,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-hud,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-coordinates,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-labels,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-explorer,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-philosophy,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-return,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-fangxing-core-choice,
.home-shell:not([data-home-view="fangcun-galaxy"]) .home-fangxing-core {
    opacity: 0;
    pointer-events: none;
}

.home-shell:not([data-home-view="fangcun-galaxy"]) .home-galaxy-labels * {
    pointer-events: none !important;
}

.home-service-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: min(520px, calc(100% - 48px));
    padding: 28px;
    display: grid;
    align-content: center;
    gap: 12px;
    border: 1px solid rgba(98, 200, 238, 0.24);
    border-radius: 18px;
    color: var(--home-text);
    background:
        radial-gradient(circle at 18% 16%, rgba(101, 224, 178, 0.14), transparent 34%),
        rgba(5, 18, 31, 0.78);
    box-shadow: 0 20px 46px rgba(2, 8, 18, 0.34);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, calc(-50% + 14px), 0) scale(0.98);
    transition:
        opacity 240ms var(--motion-standard),
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-service-panel > strong {
    color: #f2fff9;
    font-size: 30px;
    line-height: 1.1;
}

.home-service-panel > p {
    max-width: 44ch;
    margin: 0;
    color: var(--home-muted);
    line-height: 1.72;
}

.home-service-kicker {
    color: var(--home-cyan);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.home-service-panel-transfer,
.home-service-panel-convert {
    --repair-bg: #edf5f8;
    --repair-surface: rgba(247, 251, 253, 0.96);
    --repair-surface-strong: rgba(255, 255, 255, 0.98);
    --repair-surface-muted: #e8f1f4;
    --repair-ledger-bg: #eef6f4;
    --repair-line: rgba(45, 86, 116, 0.14);
    --repair-line-strong: rgba(45, 86, 116, 0.28);
    --repair-accent-line: rgba(8, 127, 186, 0.34);
    --repair-text: #132238;
    --repair-muted: #5f718b;
    --repair-dim: #8392a6;
    --repair-cyan: #087fba;
    --repair-cyan-bright: #169ad2;
    --repair-cyan-soft: rgba(8, 127, 186, 0.1);
    --repair-green: #168f7c;
    --repair-green-bright: #39c6a1;
    --repair-green-soft: rgba(22, 143, 124, 0.11);
    --repair-gold: #b88b23;
    --repair-danger: #d84b63;
    width: min(960px, calc(100% - 48px));
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 56px);
    padding: 0;
    display: block;
    align-content: initial;
    gap: 0;
    overflow: hidden;
    border-color: var(--repair-accent-line);
    border-radius: 8px;
    color: var(--repair-text);
    background: var(--repair-bg);
    box-shadow: 0 8px 8px rgba(17, 54, 76, 0.1);
}

html[data-theme="dark"] .home-service-panel-transfer,
html[data-theme="dark"] .home-service-panel-convert {
    --repair-bg: #07111f;
    --repair-surface: #0b1728;
    --repair-surface-strong: #0d1b2e;
    --repair-surface-muted: #0b1a2b;
    --repair-ledger-bg: #091522;
    --repair-line: rgba(132, 162, 201, 0.15);
    --repair-line-strong: rgba(132, 162, 201, 0.27);
    --repair-accent-line: rgba(42, 166, 214, 0.4);
    --repair-text: #edf4ff;
    --repair-muted: #a7b7cd;
    --repair-dim: #60758f;
    --repair-cyan: #2aa6d6;
    --repair-cyan-bright: #43d6e8;
    --repair-cyan-soft: rgba(42, 166, 214, 0.11);
    --repair-green: #56c7ad;
    --repair-green-bright: #79e9bd;
    --repair-green-soft: rgba(86, 199, 173, 0.11);
    --repair-gold: #d6b861;
    --repair-danger: #ff858e;
    background: var(--repair-bg);
    box-shadow: 0 8px 8px rgba(1, 8, 20, 0.32);
}

.home-file-repair-board {
    min-height: 0;
    height: auto;
    max-height: inherit;
    display: flex;
    flex-direction: column;
    color: var(--repair-text);
    background: var(--repair-bg);
}

.home-file-repair-head {
    min-height: 72px;
    padding: 0 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--repair-line);
    background: var(--repair-surface-strong);
}

.home-file-repair-title-lockup {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-file-repair-mark {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--repair-accent-line);
    border-radius: 8px;
    color: var(--repair-cyan);
    background: color-mix(in srgb, var(--repair-cyan) 8%, var(--repair-surface-strong));
}

.home-file-repair-mark svg {
    width: 24px;
    height: 24px;
}

.home-file-repair-title-lockup .home-service-kicker {
    color: var(--repair-cyan);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
}

.home-file-repair-head strong {
    display: block;
    margin-top: 2px;
    color: var(--repair-text);
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0;
}

.home-file-repair-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--repair-muted);
    font-size: 11px;
}

.home-file-repair-status span,
.home-file-repair-mode {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-file-repair-status i,
.home-file-repair-mode i,
.home-file-repair-route span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--repair-green-bright);
    box-shadow: 0 0 8px color-mix(in srgb, var(--repair-green-bright) 58%, transparent);
}

.home-file-repair-status strong {
    margin: 0;
    color: var(--repair-cyan);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 10px;
}

.home-file-repair-layout {
    min-height: 0;
    flex: 0 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 306px;
    overflow: hidden;
}

.home-file-repair-workbench {
    min-width: 0;
    min-height: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 24px;
    overflow: auto;
    background: var(--repair-surface-strong);
}

.home-file-repair-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.home-file-repair-section-head > div > span,
.home-file-repair-results header span {
    color: var(--repair-cyan);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0;
}

.home-file-repair-section-head h3 {
    margin: 5px 0 0;
    color: var(--repair-text);
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: 0;
}

.home-file-repair-mode {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid var(--repair-line);
    border-radius: 999px;
    color: var(--repair-muted);
    background: var(--repair-cyan-soft);
    font-size: 10px;
    white-space: nowrap;
}

.home-file-repair-flash {
    min-height: 48px;
    margin: 12px 12px 0;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    border: 1px solid var(--repair-line-strong);
    border-radius: 6px;
    color: var(--repair-text);
    background: var(--repair-cyan-soft);
    font-size: 12px;
    line-height: 1.5;
}

.home-file-repair-flash.success {
    border-color: color-mix(in srgb, var(--repair-green) 34%, transparent);
    background: color-mix(in srgb, var(--repair-green) 10%, var(--repair-surface));
}

.home-file-repair-flash.error {
    border-color: color-mix(in srgb, var(--repair-danger) 36%, transparent);
    background: color-mix(in srgb, var(--repair-danger) 10%, var(--repair-surface));
}

.home-file-repair-form {
    display: grid;
    gap: 18px;
}

.home-file-conversion-progress {
    min-width: 0;
    min-height: 68px;
    margin-bottom: -6px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--repair-cyan) 38%, var(--repair-line));
    border-radius: 6px;
    background: color-mix(in srgb, var(--repair-cyan) 8%, var(--repair-bg));
}

.home-file-conversion-progress > span:nth-child(2) {
    min-width: 0;
}

.home-file-conversion-progress strong,
.home-file-conversion-progress small {
    display: block;
}

.home-file-conversion-progress strong {
    color: var(--repair-text);
    font-size: 13px;
}

.home-file-conversion-progress small {
    margin-top: 4px;
    color: var(--repair-muted);
    font-size: 11px;
    line-height: 1.5;
}

.home-file-conversion-progress em {
    color: var(--repair-cyan);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 12px;
    font-style: normal;
    font-weight: 760;
}

.home-file-conversion-spinner {
    position: relative;
    width: 30px;
    height: 30px;
    display: block;
    border: 1px solid var(--repair-line-strong);
    border-radius: 50%;
}

.home-file-conversion-spinner::before,
.home-file-conversion-job-icon::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 2px solid color-mix(in srgb, var(--repair-cyan) 22%, transparent);
    border-top-color: var(--repair-cyan);
    border-radius: 50%;
    animation: home-file-conversion-spin 900ms linear infinite;
}

.home-file-conversion-spinner i {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--repair-green-bright);
    transform: translate(-50%, -50%);
}

.home-file-repair-upload.is-disabled,
.home-file-repair-form[aria-busy="true"] .home-file-repair-field,
.home-file-repair-form[aria-busy="true"] .home-file-repair-route {
    opacity: 0.52;
}

.home-file-repair-form select:disabled,
.home-file-repair-form input:disabled,
.home-file-repair-actions .btn:disabled {
    cursor: not-allowed;
}

.home-file-repair-actions .btn.primary:disabled,
.home-file-repair-actions .btn.primary:disabled:hover {
    border-color: var(--repair-line-strong);
    color: var(--repair-muted);
    background: var(--repair-surface);
}

.home-file-repair-upload {
    min-height: 112px;
    padding: 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid var(--repair-line-strong);
    border-radius: 6px;
    background: var(--repair-bg);
}

.home-file-repair-upload-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--repair-accent-line);
    border-radius: 50%;
    color: var(--repair-cyan);
    background: color-mix(in srgb, var(--repair-cyan) 9%, transparent);
}

.home-file-repair-upload-icon svg {
    width: 20px;
    height: 20px;
}

.home-file-repair-upload-copy {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 3px;
}

.home-file-repair-upload-copy strong,
.home-file-repair-upload-copy small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-file-repair-upload-copy strong {
    color: var(--repair-text);
    font-size: 14px;
}

.home-file-repair-upload-copy small {
    color: var(--repair-muted);
    font-size: 11px;
}

.home-file-repair-upload input[type="file"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
    padding: 7px;
    border: 1px solid var(--repair-line);
    border-radius: 6px;
    color: var(--repair-text);
    background: var(--repair-surface-soft, var(--repair-surface-muted));
    outline: none;
}

.home-file-repair-upload input[type="file"]::file-selector-button {
    min-height: 28px;
    margin-right: 10px;
    padding: 0 12px;
    border: 1px solid var(--repair-line-strong);
    border-radius: 5px;
    color: var(--repair-text);
    background: var(--repair-cyan-soft);
    font: inherit;
    font-size: 12px;
    font-weight: 760;
    cursor: pointer;
}

.home-file-repair-upload input[type="file"]:focus {
    border-color: var(--repair-cyan);
    box-shadow: 0 0 0 3px var(--repair-cyan-soft);
    background: var(--repair-surface);
}

.home-file-repair-field {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.home-file-repair-field > span {
    color: var(--repair-cyan);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 760;
}

.home-file-repair-field select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--repair-line-strong);
    border-radius: 6px;
    color: var(--repair-text);
    background: var(--repair-surface);
    font: inherit;
    font-size: 13px;
    outline: none;
}

.home-file-repair-field select:focus {
    border-color: var(--repair-cyan);
    box-shadow: 0 0 0 3px var(--repair-cyan-soft);
}

.home-file-repair-route {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    align-items: center;
    gap: 7px;
    color: var(--repair-muted);
    font-size: 9px;
}

.home-file-repair-route span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.home-file-repair-route b {
    height: 1px;
    background: var(--repair-line);
}

.home-file-repair-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.home-file-convert-actions {
    grid-template-columns: minmax(0, 1fr);
}

.home-file-repair-actions .btn {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    justify-content: center;
    gap: 9px;
    border-radius: 6px;
    box-shadow: none;
    font-size: 13px;
}

.home-file-repair-actions .btn.primary {
    border-color: var(--repair-cyan);
    color: #ffffff;
    background: var(--repair-cyan);
}

.home-file-repair-actions .btn.primary:hover {
    border-color: var(--repair-cyan-bright);
    background: var(--repair-cyan-bright);
}

.home-file-repair-actions .btn.secondary {
    color: var(--repair-text);
    border-color: var(--repair-line-strong);
    background: transparent;
}

.home-file-repair-actions .btn.secondary:hover {
    border-color: var(--repair-cyan);
    background: var(--repair-cyan-soft);
}

.home-file-repair-actions .btn svg,
.home-file-repair-result svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.home-file-repair-rail {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-left: 1px solid var(--repair-line);
    background: var(--repair-ledger-bg);
}

.home-file-format-catalog {
    min-width: 0;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--repair-line);
    background: color-mix(in srgb, var(--repair-surface) 78%, var(--repair-ledger-bg));
}

.home-file-format-catalog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-file-format-catalog header > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.home-file-format-catalog header span {
    color: var(--repair-cyan);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0;
}

.home-file-format-catalog header strong {
    color: var(--repair-text);
    font-size: 14px;
    line-height: 1.2;
}

.home-file-format-catalog header em {
    width: 32px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--repair-line-strong);
    border-radius: 4px;
    color: var(--repair-cyan-bright);
    background: var(--repair-cyan-soft);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 11px;
    font-style: normal;
    font-weight: 760;
}

.home-file-format-catalog-list {
    max-height: 146px;
    margin: 14px 0 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.home-file-format-catalog-list li {
    min-height: 31px;
    padding: 6px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--repair-line);
}

.home-file-format-catalog-list li:last-child {
    border-bottom: 1px solid var(--repair-line);
}

.home-file-format-catalog-list strong,
.home-file-format-catalog-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-file-format-catalog-list strong {
    color: var(--repair-text);
    font-size: 11px;
    font-weight: 680;
}

.home-file-format-catalog-list span {
    color: var(--repair-muted);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 10px;
    text-align: right;
}

.home-file-repair-results {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.home-file-repair-results {
    min-height: 0;
    max-height: 184px;
    align-content: start;
    overflow: auto;
    background: color-mix(in srgb, var(--repair-surface) 62%, var(--repair-ledger-bg));
}

.home-file-repair-results header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.home-file-repair-results header strong {
    color: var(--repair-text);
    font-size: 12px;
}

.home-file-repair-results p {
    margin: 0;
    padding: 12px;
    border: 1px dashed var(--repair-line-strong);
    border-radius: 6px;
    color: var(--repair-muted);
    background: var(--repair-surface);
    font-size: 12px;
}

.home-file-repair-result {
    min-height: 54px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--repair-line);
    border-radius: 6px;
    color: var(--repair-text);
    background: var(--repair-surface-strong);
    transition:
        border-color 180ms var(--motion-standard),
        background 180ms var(--motion-standard),
        transform 180ms var(--motion-standard);
}

.home-file-conversion-job {
    position: relative;
    min-height: 58px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--repair-line);
    border-radius: 6px;
    color: var(--repair-text);
    background: var(--repair-surface-strong);
}

.home-file-conversion-job::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--repair-cyan);
    transform-origin: left;
    animation: home-file-conversion-line 1.8s ease-in-out infinite;
}

.home-file-conversion-job.is-failed {
    border-color: color-mix(in srgb, var(--repair-danger) 38%, var(--repair-line));
}

.home-file-conversion-job.is-failed::after {
    display: none;
}

.home-file-conversion-job-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: block;
}

.home-file-conversion-job.is-queued .home-file-conversion-job-icon::before {
    animation-duration: 1.5s;
}

.home-file-conversion-job.is-failed .home-file-conversion-job-icon::before {
    content: "!";
    inset: 1px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--repair-danger) 60%, var(--repair-line));
    color: var(--repair-danger);
    font-size: 12px;
    font-weight: 800;
    animation: none;
}

.home-file-conversion-job .home-file-repair-result-name em {
    min-width: 0;
    max-width: 116px;
    flex: 0 1 auto;
    overflow: hidden;
    color: var(--repair-cyan);
    font-size: 10px;
    font-style: normal;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-file-conversion-job.is-failed .home-file-repair-result-name em {
    color: var(--repair-danger);
}

.home-file-conversion-job strong,
.home-file-conversion-job small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-file-conversion-job strong {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--repair-text);
    font-size: 13px;
}

.home-file-conversion-job small {
    color: var(--repair-muted);
    font-size: 11px;
}

@keyframes home-file-conversion-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes home-file-conversion-line {
    0% {
        opacity: 0.2;
        transform: scaleX(0.08);
    }
    48% {
        opacity: 1;
        transform: scaleX(0.72);
    }
    100% {
        opacity: 0.2;
        transform: translateX(100%) scaleX(0.08);
    }
}

.home-file-repair-result:hover,
.home-file-repair-result:focus-visible {
    border-color: var(--repair-cyan);
    background: var(--repair-cyan-soft);
    transform: translateY(-1px);
    outline: none;
}

.home-file-repair-result-body {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.home-file-repair-result-name {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-file-repair-result strong,
.home-file-repair-result small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-file-repair-result strong {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--repair-text);
    font-size: 14px;
}

.home-file-repair-countdown {
    min-width: 52px;
    min-height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--repair-gold) 42%, var(--repair-line));
    border-radius: 999px;
    color: var(--repair-gold);
    background: color-mix(in srgb, var(--repair-gold) 9%, transparent);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 11px;
    font-style: normal;
    font-weight: 760;
    line-height: 1;
}

.home-file-repair-result small {
    margin-top: 2px;
    color: var(--repair-muted);
    font-size: 12px;
}

.home-file-repair-result i {
    font-style: normal;
    color: var(--repair-cyan);
    font-size: 12px;
}

@media (max-width: 920px) {
    .home-service-panel-transfer,
    .home-service-panel-convert {
        width: min(840px, calc(100% - 36px));
    }

    .home-file-repair-layout {
        grid-template-columns: minmax(0, 1fr) 276px;
    }

    .home-file-repair-workbench {
        padding: 24px;
    }
}

@media (max-width: 780px) {
    .home-service-panel-transfer,
    .home-service-panel-convert {
        inset: calc(64px + env(safe-area-inset-top)) 0 0;
        left: 0;
        top: calc(64px + env(safe-area-inset-top));
        width: 100%;
        height: calc(100dvh - 64px - env(safe-area-inset-top));
        min-height: 0;
        max-height: none;
        border: 0;
        border-radius: 0;
        transform: none;
    }

    .home-shell[data-home-view="file-transfer"] .home-service-panel-transfer,
    .home-shell[data-home-view="file-convert"] .home-service-panel-convert {
        transform: none;
    }

    .home-file-repair-head {
        display: none;
    }

    .home-file-repair-board {
        height: 100%;
        max-height: none;
    }

    .home-file-repair-status {
        display: none;
    }

    .home-file-repair-layout {
        display: block;
        overflow: auto;
    }

    .home-file-repair-workbench {
        min-height: 0;
        padding: 24px 20px 20px;
        gap: 20px;
    }

    .home-file-repair-form {
        gap: 16px;
    }

    .home-file-repair-upload {
        min-height: 104px;
        padding: 12px;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 11px;
    }

    .home-file-repair-upload-icon {
        width: 38px;
        height: 38px;
    }

    .home-file-repair-upload input[type="file"] {
        min-height: 38px;
        padding: 5px;
    }

    .home-file-repair-actions .btn {
        min-height: 44px;
    }

    .home-file-repair-rail {
        margin: 2px 18px 20px;
        display: block;
        border-left: 0;
        border: 1px solid var(--repair-line-strong);
        border-radius: 6px;
        overflow: hidden;
        background: var(--repair-surface);
    }

    .home-file-rail-panel,
    .home-file-rail-panel.is-active {
        display: block;
    }

    .home-file-repair-results.home-file-rail-panel,
    .home-file-repair-results.home-file-rail-panel.is-active {
        display: grid;
    }

    .home-file-rail-panel > header {
        display: flex;
    }

    .home-file-repair-results {
        max-height: 236px;
        gap: 10px;
        padding: 16px;
        background: var(--repair-surface);
    }

    .home-file-format-catalog {
        padding: 0;
        border-bottom: 0;
        background: var(--repair-surface);
    }

    .home-file-format-catalog-list {
        max-height: 140px;
        margin: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .home-file-format-catalog-list li {
        min-width: 0;
        min-height: 44px;
        padding: 7px 12px;
        grid-template-columns: minmax(0, 1fr);
        align-content: center;
        gap: 2px;
        border-top: 0;
        border-right: 1px solid var(--repair-line);
        border-bottom: 1px solid var(--repair-line);
    }

    .home-file-format-catalog-list li:nth-child(even) {
        border-right: 0;
    }

    .home-file-format-catalog-list span {
        text-align: left;
    }
}

@media (max-width: 520px) {
    .home-file-repair-title-lockup .home-service-kicker {
        display: none;
    }

    .home-file-repair-head strong {
        font-size: 18px;
    }

    .home-file-repair-section-head {
        align-items: center;
    }

    .home-file-repair-section-head h3 {
        font-size: 21px;
    }

    .home-file-repair-mode {
        display: none;
    }

    .home-file-conversion-progress {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 10px;
        padding: 11px 12px;
    }

    .home-file-conversion-progress em {
        grid-column: 2;
        margin-top: -4px;
    }

    .home-file-conversion-spinner {
        width: 28px;
        height: 28px;
    }

    .home-file-repair-route {
        grid-template-columns: auto 1fr auto;
    }

    .home-file-repair-route span:nth-of-type(2),
    .home-file-repair-route b:nth-of-type(2) {
        display: none;
    }

}

@media (prefers-reduced-motion: reduce) {
    .home-file-conversion-spinner::before,
    .home-file-conversion-job-icon::before,
    .home-file-conversion-job::after {
        animation-duration: 3s;
    }
}

html .home-shell .home-file-repair-actions .btn.primary {
    border-color: var(--repair-cyan);
    color: #ffffff;
    background: var(--repair-cyan);
}

html .home-shell .home-file-repair-actions .btn.primary:hover {
    border-color: var(--repair-cyan-bright);
    background: var(--repair-cyan-bright);
}

html .home-shell .home-file-repair-actions .btn.secondary {
    color: var(--repair-text);
    border-color: var(--repair-line-strong);
    background: transparent;
}

html .home-shell .home-file-repair-actions .btn.secondary:hover {
    border-color: var(--repair-cyan);
    background: var(--repair-cyan-soft);
}

.home-shell[data-home-view="file-transfer"] .home-service-panel-transfer,
.home-shell[data-home-view="file-convert"] .home-service-panel-convert,
.home-shell[data-home-view="fangcun-crystal-pool"] .home-service-panel-crystal,
.home-shell[data-home-view="xulai-ai"] .home-service-panel-xulai {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(-50%, -50%, 0) scale(1);
}

@media (max-width: 780px) {
    html .home-shell[data-home-view="file-transfer"] .home-service-panel-transfer,
    html .home-shell[data-home-view="file-convert"] .home-service-panel-convert {
        transform: none;
    }
}

.home-empty-stage::before,
.home-empty-stage::after {
    z-index: 0;
}

.home-stage-grid {
    z-index: 2;
    pointer-events: none;
}

.home-galaxy-hud,
.home-galaxy-coordinates,
.home-galaxy-labels {
    position: absolute;
    z-index: 4;
    transition: opacity 260ms var(--motion-standard);
}

.home-galaxy-labels {
    inset: 0;
    pointer-events: none;
    contain: layout paint style;
}

.home-galaxy-line-label {
    position: absolute;
    z-index: 0;
    color: color-mix(in srgb, var(--home-cyan) 64%, var(--home-dim));
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 6px;
    line-height: 1;
    letter-spacing: 0.04em;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 7px rgba(98, 200, 238, 0.46);
    transition: opacity 160ms var(--motion-standard);
    white-space: nowrap;
}

.home-galaxy-star-label {
    position: absolute;
    z-index: 1;
    min-width: 72px;
    padding: 5px 8px 5px 12px;
    display: grid;
    gap: 2px;
    border-left: 1px solid rgba(98, 200, 238, 0.42);
    color: var(--home-muted);
    background: rgba(5, 18, 31, 0.38);
    box-shadow: 0 8px 22px rgba(3, 12, 24, 0.16);
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    transform: translate3d(-50%, -50%, 0);
    transition: opacity 180ms var(--motion-standard), border-color 180ms var(--motion-standard);
    white-space: nowrap;
    will-change: transform, opacity;
}

.home-galaxy-labels.is-dragging .home-galaxy-star-label,
.home-galaxy-labels.is-dragging .home-galaxy-line-label,
.home-galaxy-labels.is-dragging .home-galaxy-cluster-label {
    transition: none;
    will-change: transform;
}

.home-galaxy-star-label::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--home-cyan);
    box-shadow: 0 0 10px rgba(98, 200, 238, 0.74);
    transform: translateY(-50%);
}

.home-galaxy-star-label::after {
    content: "";
    position: absolute;
    inset: -8px;
}

.home-galaxy-star-label strong,
.home-galaxy-star-label small {
    display: block;
    line-height: 1.15;
}

.home-galaxy-star-label strong {
    color: var(--home-text);
    font-family: "Fangcun Space Grotesk", "Segoe UI", sans-serif;
    font-size: 10px;
    font-weight: 680;
}

.home-galaxy-star-label small {
    color: var(--home-dim);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.04em;
}

.home-galaxy-star-label.is-own {
    min-width: 106px;
    border-left-color: rgba(146, 255, 231, 0.86);
    background: rgba(8, 38, 45, 0.62);
    box-shadow: 0 0 24px rgba(86, 215, 187, 0.22), 0 8px 22px rgba(3, 12, 24, 0.18);
}

.home-galaxy-star-label.is-own::before {
    width: 8px;
    height: 8px;
    background: #efffff;
    box-shadow: 0 0 0 3px rgba(101, 224, 178, 0.16), 0 0 16px rgba(104, 244, 220, 0.95);
}

.home-galaxy-star-label.is-focused {
    border-color: rgba(223, 252, 255, 0.9);
    box-shadow: 0 0 20px rgba(98, 212, 255, 0.24);
}

.home-galaxy-star-label.is-satellite {
    min-width: 62px;
    padding: 4px 7px 4px 10px;
    background: rgba(4, 14, 27, 0.48);
}

.home-galaxy-star-label.is-satellite strong {
    font-size: 9px;
}

.home-galaxy-star-label.is-satellite small {
    font-size: 7px;
}

.home-galaxy-cluster-label {
    position: absolute;
    z-index: 0;
    padding: 4px 7px;
    border: 1px solid rgba(98, 200, 238, 0.2);
    color: rgba(188, 229, 241, 0.78);
    background: rgba(4, 14, 27, 0.5);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 7px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0);
    transition: opacity 180ms var(--motion-standard);
    white-space: nowrap;
}

.home-galaxy-philosophy {
    position: absolute;
    top: calc(50% + min(21vh, 176px));
    left: 50%;
    z-index: 5;
    width: min(680px, calc(100% - 96px));
    margin: 0;
    color: #e9faff;
    text-align: center;
    opacity: 0;
    filter: blur(8px);
    pointer-events: none;
    transform: translate3d(-50%, 12px, 0);
    transition:
        opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 220ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-galaxy-philosophy.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(-50%, 0, 0);
}

.home-galaxy-philosophy blockquote {
    max-width: 62ch;
    margin: 0 auto;
    color: rgba(233, 250, 255, 0.96);
    font-family: "Fangcun Space Grotesk", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 520;
    line-height: 1.7;
    text-wrap: balance;
    text-shadow: 0 0 18px rgba(79, 200, 222, 0.22), 0 2px 9px rgba(0, 7, 17, 0.78);
}

.home-galaxy-philosophy figcaption {
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(139, 184, 202, 0.76);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
    line-height: 1;
}

.home-galaxy-philosophy figcaption i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #62d7b9;
    box-shadow: 0 0 8px rgba(98, 215, 185, 0.72);
}

.home-fangxing-core-choice {
    position: absolute;
    right: 28px;
    bottom: 24px;
    z-index: 5;
    width: min(430px, calc(100% - 362px));
    min-height: 78px;
    padding: 12px 12px 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid rgba(104, 219, 196, 0.3);
    border-radius: 7px;
    color: #eafffb;
    background: rgba(3, 19, 28, 0.86);
    box-shadow: 0 18px 46px rgba(0, 8, 15, 0.34), inset 0 1px rgba(221, 255, 249, 0.04);
    backdrop-filter: blur(18px) saturate(1.1);
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
    opacity: 0;
    filter: blur(8px);
    pointer-events: none;
    transform: translate3d(0, 12px, 0);
    transition:
        opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 220ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.home-fangxing-core-choice.is-visible {
    opacity: 1;
    filter: blur(0);
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.home-fangxing-core-choice-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.home-fangxing-core-choice-copy > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #79e5cf;
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
    line-height: 1;
}

.home-fangxing-core-choice-copy > span i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d9fff2;
    box-shadow: 0 0 10px rgba(91, 240, 193, 0.82);
}

.home-fangxing-core-choice-copy strong {
    overflow: hidden;
    color: #f0fffc;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-fangxing-core-choice-copy small {
    overflow: hidden;
    color: rgba(151, 193, 199, 0.72);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-fangxing-core-choice-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
}

.home-fangxing-core-choice-actions button,
.home-fangxing-core-exit {
    min-height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(126, 196, 204, 0.24);
    border-radius: 6px;
    color: rgba(215, 240, 241, 0.82);
    background: rgba(6, 29, 37, 0.68);
    font-size: 10px;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 160ms var(--motion-standard), color 160ms var(--motion-standard), background 160ms var(--motion-standard);
}

.home-fangxing-core-choice-actions button[hidden] {
    display: none !important;
}

.home-fangxing-core-choice-actions button:hover,
.home-fangxing-core-exit:hover {
    border-color: rgba(131, 238, 218, 0.62);
    color: #f0fffb;
    background: rgba(9, 48, 54, 0.86);
}

.home-fangxing-core-choice-actions button:focus-visible,
.home-fangxing-core-exit:focus-visible {
    outline: 2px solid rgba(111, 236, 215, 0.8);
    outline-offset: 3px;
}

.home-fangxing-core-choice-actions .is-primary {
    border-color: rgba(113, 236, 205, 0.62);
    color: #edfffa;
    background: rgba(17, 112, 102, 0.72);
    box-shadow: 0 0 22px rgba(55, 219, 178, 0.16), inset 0 1px rgba(230, 255, 249, 0.11);
}

.home-fangxing-core-choice-actions svg,
.home-fangxing-core-exit svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.home-fangxing-core {
    --core-flash: 0;
    --core-prism: 0;
    --core-return-opacity: 1;
    --core-return-scale: 1;
    --core-return-blur: 0px;
    position: absolute;
    inset: 0;
    z-index: 6;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: #010708;
    transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 300ms;
}

.home-fangxing-core.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.home-fangxing-core.is-leaving {
    visibility: visible;
    opacity: var(--core-return-opacity);
    pointer-events: none;
    transition: none;
}

.home-fangxing-core.is-leaving .home-fangxing-core-canvas {
    filter: blur(var(--core-return-blur));
    transform: scale(var(--core-return-scale));
    transform-origin: 50% 50%;
    will-change: filter, transform;
}

.home-fangxing-core::before,
.home-fangxing-core::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.home-fangxing-core::before {
    background:
        linear-gradient(90deg, rgba(0, 12, 14, 0.62), transparent 18% 82%, rgba(0, 12, 14, 0.62)),
        linear-gradient(180deg, rgba(0, 5, 7, 0.54), transparent 24% 72%, rgba(0, 5, 7, 0.74));
}

.home-fangxing-core::after {
    opacity: var(--core-flash);
    background: radial-gradient(circle at 50% 50%, #f7ffd9 0 3%, #8aff9e 8%, rgba(44, 255, 186, 0.48) 23%, transparent 58%);
    mix-blend-mode: screen;
}

.home-fangxing-core-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 1;
}

.home-fangxing-core-prism {
    position: absolute;
    inset: -8%;
    z-index: 3;
    opacity: var(--core-prism);
    pointer-events: none;
    background:
        linear-gradient(112deg, transparent 30%, rgba(77, 255, 190, 0.08) 43%, transparent 52%),
        linear-gradient(68deg, transparent 42%, rgba(255, 221, 115, 0.07) 49%, rgba(109, 219, 255, 0.08) 54%, transparent 63%);
    mix-blend-mode: screen;
    transform: scale(1.08);
}

.home-fangxing-core-rename {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    min-width: min(270px, calc(100% - 40px));
    display: grid;
    justify-items: center;
    gap: 5px;
    color: #effff8;
    text-align: center;
    pointer-events: none;
    opacity: var(--core-rename-label-opacity, 0);
    filter: blur(var(--core-rename-label-blur, 7px));
    transform: translate3d(-50%, calc(-50% - 116px + var(--core-rename-label-lift, 10px)), 0)
        scale(var(--core-rename-label-scale, 0.96));
    transform-origin: 50% 100%;
    will-change: opacity, filter, transform;
}

.home-fangxing-core-rename::after {
    content: "";
    width: 52px;
    height: 1px;
    margin-top: 3px;
    background: linear-gradient(90deg, transparent, rgba(132, 255, 207, 0.9), transparent);
    box-shadow: 0 0 8px rgba(75, 255, 187, 0.4);
    transform: scaleX(0.36);
    transition: transform 260ms var(--motion-standard), background 260ms var(--motion-standard);
}

.home-fangxing-core-rename::before {
    content: "";
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, rgba(146, 244, 216, 0.58), transparent);
    transform: translateX(-50%);
}

.home-fangxing-core-rename > span,
.home-fangxing-core-rename > small {
    color: rgba(135, 227, 205, 0.74);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-fangxing-core-rename > strong {
    max-width: min(320px, calc(100vw - 48px));
    overflow-wrap: anywhere;
    color: #f3fff7;
    font-size: 21px;
    font-weight: 680;
    line-height: 1.2;
    text-shadow:
        0 1px 3px rgba(0, 10, 9, 0.96),
        0 0 9px rgba(126, 255, 188, 0.58),
        0 0 20px rgba(71, 222, 179, 0.3);
}

.home-fangxing-core.is-rename-swapped .home-fangxing-core-rename::after {
    background: linear-gradient(90deg, transparent, rgba(255, 231, 140, 0.96), #ecfff4, rgba(111, 226, 255, 0.92), transparent);
    transform: scaleX(1);
}

.home-fangxing-core.is-rename-swapped .home-fangxing-core-rename > strong {
    animation: home-core-name-swap 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes home-core-name-swap {
    0% { opacity: 0.16; filter: blur(5px); clip-path: inset(0 48% 0 48%); }
    58% { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); }
    100% { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); }
}

.home-fangxing-core-echo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: min(420px, calc(100% - 48px));
    margin: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: #eafff8;
    text-align: center;
    pointer-events: none;
    opacity: var(--core-echo-opacity, 0);
    filter: blur(var(--core-echo-blur, 8px));
    transform: translate3d(-50%, calc(-50% + 126px + var(--core-echo-lift, 9px)), 0);
    will-change: opacity, filter, transform;
}

.home-fangxing-core-echo::before,
.home-fangxing-core-echo::after {
    content: "";
    width: 82px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(121, 220, 207, 0.74), transparent);
}

.home-fangxing-core-echo > span,
.home-fangxing-core-echo > small {
    color: rgba(130, 213, 204, 0.78);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-fangxing-core-echo blockquote {
    max-width: 100%;
    margin: 1px 0;
    display: -webkit-box;
    overflow: hidden;
    color: #eafff8;
    font-size: 13px;
    font-weight: 560;
    line-height: 1.65;
    text-wrap: pretty;
    text-shadow: 0 1px 3px rgba(0, 10, 9, 0.94), 0 0 14px rgba(92, 226, 199, 0.3);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.home-fangxing-core.is-echo-committed .home-fangxing-core-echo blockquote {
    animation: home-core-echo-commit 440ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes home-core-echo-commit {
    0% { opacity: 0.24; filter: blur(6px); clip-path: inset(45% 0 45% 0); }
    62% { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); }
    100% { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); }
}

.home-fangxing-core-hud,
.home-fangxing-core-coordinates,
.home-fangxing-core-exit {
    position: absolute;
    z-index: 4;
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    transition: opacity 420ms var(--motion-standard), transform 420ms var(--motion-standard);
}

.home-fangxing-core.is-stable .home-fangxing-core-hud,
.home-fangxing-core.is-stable .home-fangxing-core-coordinates,
.home-fangxing-core.is-stable .home-fangxing-core-exit {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.home-fangxing-core-hud {
    top: 28px;
    left: 30px;
    display: grid;
    justify-items: start;
}

.home-fangxing-core-hud > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #82e9bf;
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
}

.home-fangxing-core-hud > span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dfffd7;
    box-shadow: 0 0 12px rgba(127, 255, 167, 0.8);
}

.home-fangxing-core-hud strong {
    margin-top: 8px;
    color: #f2fff9;
    font-size: 20px;
    line-height: 1.15;
}

.home-fangxing-core-hud small {
    margin-top: 5px;
    color: rgba(157, 204, 197, 0.72);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
}

.home-fangxing-core-coordinates {
    top: 30px;
    right: 32px;
    display: flex;
    gap: 18px;
    color: rgba(143, 197, 188, 0.56);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-fangxing-core-exit {
    bottom: 26px;
    left: 50%;
    min-height: 42px;
    padding-inline: 15px;
    color: #edfffa;
    background: rgba(3, 25, 29, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translate3d(-50%, 8px, 0);
}

.home-fangxing-core.is-stable .home-fangxing-core-exit {
    transform: translate3d(-50%, 0, 0);
}

.home-fangxing-core-edit {
    position: absolute;
    right: 30px;
    bottom: 26px;
    z-index: 4;
    min-height: 42px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(126, 219, 194, 0.34);
    border-radius: 6px;
    color: rgba(216, 246, 238, 0.9);
    background: rgba(3, 25, 29, 0.76);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 8px, 0);
    transition: opacity 280ms var(--motion-standard), transform 280ms var(--motion-standard), border-color 160ms var(--motion-standard), background 160ms var(--motion-standard);
}

.home-fangxing-core.is-stable .home-fangxing-core-edit {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.home-fangxing-core.is-renaming .home-fangxing-core-hud,
.home-fangxing-core.is-renaming .home-fangxing-core-coordinates,
.home-fangxing-core.is-renaming .home-fangxing-core-exit,
.home-fangxing-core.is-renaming .home-fangxing-core-edit,
.home-fangxing-core.is-renaming .home-fangxing-core-settings {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.home-fangxing-core.is-resonating .home-fangxing-core-hud,
.home-fangxing-core.is-resonating .home-fangxing-core-coordinates,
.home-fangxing-core.is-resonating .home-fangxing-core-exit,
.home-fangxing-core.is-resonating .home-fangxing-core-edit,
.home-fangxing-core.is-resonating .home-fangxing-core-settings {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.home-fangxing-core-edit:hover {
    border-color: rgba(142, 242, 215, 0.68);
    background: rgba(8, 46, 48, 0.88);
}

.home-fangxing-core-edit:focus-visible,
.home-fangxing-core-settings-close:focus-visible,
.home-fangxing-core-save:focus-visible {
    outline: 2px solid rgba(111, 236, 215, 0.82);
    outline-offset: 3px;
}

.home-fangxing-core-edit svg {
    width: 15px;
    height: 15px;
}

.home-fangxing-core-settings {
    position: absolute;
    right: 28px;
    bottom: 80px;
    z-index: 5;
    width: min(410px, calc(100% - 56px));
    max-height: calc(100% - 150px);
    padding: 14px;
    overflow: auto;
    border: 1px solid rgba(122, 219, 199, 0.38);
    border-radius: 7px;
    color: #e8fff7;
    background: rgba(3, 21, 28, 0.93);
    backdrop-filter: blur(20px) saturate(1.08);
    -webkit-backdrop-filter: blur(20px) saturate(1.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 10px, 0);
    transition: opacity 220ms var(--motion-standard), transform 220ms var(--motion-standard), visibility 0s linear 220ms;
}

.home-fangxing-core-settings.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
}

.home-fangxing-core.is-settings-open .home-fangxing-core-edit {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.home-fangxing-core-settings > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(122, 219, 199, 0.18);
}

.home-fangxing-core-settings > header > div {
    display: grid;
    gap: 4px;
}

.home-fangxing-core-settings > header span {
    color: #72e8c6;
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-fangxing-core-settings > header strong {
    color: #f1fffb;
    font-size: 15px;
}

.home-fangxing-core-settings-close {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(126, 219, 194, 0.26);
    border-radius: 6px;
    color: rgba(207, 241, 233, 0.78);
    background: rgba(7, 41, 45, 0.56);
    cursor: pointer;
}

.home-fangxing-core-settings-close svg {
    width: 15px;
    height: 15px;
}

.home-fangxing-core-form {
    margin-top: 13px;
    padding-top: 13px;
    display: grid;
    gap: 8px;
    border-top: 1px solid rgba(122, 219, 199, 0.13);
}

.home-fangxing-core-form:first-of-type {
    border-top: 0;
}

.home-fangxing-core-form label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 12px;
}

.home-fangxing-core-form label > span {
    color: rgba(224, 247, 241, 0.86);
    font-size: 10px;
    font-weight: 650;
}

.home-fangxing-core-form label > output {
    color: rgba(132, 224, 205, 0.74);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-fangxing-core-form textarea,
.home-fangxing-core-form input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(126, 219, 194, 0.24);
    border-radius: 5px;
    color: #effff9;
    background: rgba(2, 13, 19, 0.74);
    font: inherit;
    font-size: 11px;
    line-height: 1.55;
    resize: vertical;
}

.home-fangxing-core-form textarea {
    min-height: 72px;
}

.home-fangxing-core-form textarea::placeholder,
.home-fangxing-core-form input::placeholder {
    color: rgba(169, 205, 201, 0.5);
}

.home-fangxing-core-form textarea:focus,
.home-fangxing-core-form input:focus {
    border-color: rgba(130, 238, 211, 0.68);
    outline: 0;
}

.home-fangxing-core-save {
    min-height: 36px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    justify-self: start;
    border: 1px solid rgba(117, 230, 200, 0.48);
    border-radius: 5px;
    color: #eafff7;
    background: rgba(16, 104, 92, 0.72);
    font-size: 10px;
    cursor: pointer;
}

.home-fangxing-core-save:hover {
    border-color: rgba(149, 247, 218, 0.82);
    background: rgba(20, 130, 111, 0.82);
}

.home-fangxing-core-save:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.home-fangxing-core-save i {
    font-style: normal;
    font-size: 12px;
}

.home-fangxing-core-form-status {
    min-height: 14px;
    margin: 0;
    color: rgba(159, 208, 198, 0.68);
    font-size: 9px;
    line-height: 1.45;
}

.home-fangxing-core-form-status.is-success {
    color: #8ae7c5;
}

.home-fangxing-core-form-status.is-error {
    color: #ffb4a6;
}

.home-empty-stage.is-core-active {
    cursor: default;
}

.home-empty-stage,
.home-fangxing-core {
    overflow: clip;
}

.home-empty-stage.is-core-active .home-galaxy-hud,
.home-empty-stage.is-core-active .home-galaxy-coordinates,
.home-empty-stage.is-core-active .home-galaxy-labels,
.home-empty-stage.is-core-active .home-galaxy-explorer,
.home-empty-stage.is-core-active .home-galaxy-philosophy,
.home-empty-stage.is-core-active .home-fangxing-core-choice,
.home-empty-stage.is-core-active .home-galaxy-return,
.home-empty-stage.is-core-active .home-stage-grid {
    opacity: 0;
    pointer-events: none;
}

.home-empty-stage.is-core-active .home-fangxing-core-choice {
    display: none;
    visibility: hidden;
}

.home-galaxy-explorer {
    position: absolute;
    bottom: 24px;
    left: 28px;
    z-index: 5;
    width: min(286px, calc(100% - 56px));
    padding: 12px;
    border: 1px solid rgba(112, 181, 205, 0.22);
    border-radius: 7px;
    color: #dcecf5;
    background: rgba(5, 16, 29, 0.76);
    box-shadow: 0 16px 42px rgba(0, 6, 16, 0.28), inset 0 1px rgba(220, 250, 255, 0.04);
    backdrop-filter: blur(16px) saturate(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(1.08);
    transition: opacity 220ms var(--motion-standard), transform 220ms var(--motion-standard);
    user-select: none;
}

.home-galaxy-explorer header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(112, 181, 205, 0.14);
}

.home-galaxy-explorer-toggle {
    width: 100%;
    min-width: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
}

.home-galaxy-explorer-toggle:disabled {
    cursor: default;
}

.home-galaxy-explorer-toggle > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: "Fangcun Space Grotesk", "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 680;
}

.home-galaxy-explorer-toggle-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.home-galaxy-explorer-toggle-meta svg {
    width: 14px;
    height: 14px;
    display: none;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-galaxy-explorer header i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #61d6c5;
    box-shadow: 0 0 10px rgba(97, 214, 197, 0.74);
}

.home-galaxy-explorer header output {
    color: #72cce6;
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
}

.home-galaxy-explorer-body {
    overflow: hidden;
}

.home-galaxy-explorer-control {
    margin-top: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
}

.home-galaxy-explorer-control > span,
.home-galaxy-explorer-control > output {
    font-size: 9px;
    line-height: 1;
}

.home-galaxy-explorer-control > span {
    color: rgba(216, 235, 244, 0.76);
}

.home-galaxy-explorer-control > output {
    color: #78d4e3;
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
}

.home-galaxy-explorer-control input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
    height: 18px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: ew-resize;
    touch-action: none;
}

.home-galaxy-explorer-control input[type="range"]::-webkit-slider-runnable-track {
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #4fc4da 0 var(--range-progress, 0%), rgba(119, 159, 183, 0.22) var(--range-progress, 0%) 100%);
}

.home-galaxy-explorer-control input[type="range"]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    margin-top: -6px;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #dffcff;
    border-radius: 50%;
    background: #1ca5c0;
    box-shadow: 0 0 0 3px rgba(28, 165, 192, 0.14), 0 0 14px rgba(70, 202, 220, 0.38);
}

.home-galaxy-explorer-control input[type="range"]::-moz-range-track {
    height: 2px;
    border-radius: 2px;
    background: rgba(119, 159, 183, 0.22);
}

.home-galaxy-explorer-control input[type="range"]::-moz-range-progress {
    height: 2px;
    border-radius: 2px;
    background: #4fc4da;
}

.home-galaxy-explorer-control input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 2px solid #dffcff;
    border-radius: 50%;
    background: #1ca5c0;
    box-shadow: 0 0 0 3px rgba(28, 165, 192, 0.14);
}

.home-galaxy-explorer-control input[type="range"]:focus-visible {
    outline: 1px solid rgba(118, 221, 236, 0.72);
    outline-offset: 4px;
}

.home-galaxy-return {
    position: absolute;
    bottom: 26px;
    left: 50%;
    z-index: 5;
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(119, 206, 222, 0.34);
    border-radius: 7px;
    color: #e9faff;
    background: rgba(5, 20, 35, 0.82);
    box-shadow: 0 12px 34px rgba(0, 7, 17, 0.3);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    transform: translateX(-50%);
    transition: opacity 180ms var(--motion-standard), border-color 180ms var(--motion-standard), background 180ms var(--motion-standard);
}

.home-galaxy-return[hidden] {
    display: none;
}

.home-galaxy-return:hover {
    border-color: rgba(135, 231, 239, 0.68);
    background: rgba(8, 35, 51, 0.92);
}

.home-galaxy-return:focus-visible {
    outline: 2px solid rgba(118, 221, 236, 0.78);
    outline-offset: 3px;
}

.home-galaxy-return svg {
    width: 16px;
    height: 16px;
}

.home-galaxy-return span {
    font-size: 10px;
    font-weight: 650;
}

.home-empty-stage {
    cursor: zoom-in;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.home-galaxy-hud {
    top: 28px;
    left: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.home-galaxy-hud > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--home-cyan);
    font-family: "Fangcun Space Grotesk", "Segoe UI", sans-serif;
    font-size: 10px;
    line-height: 1.2;
}

.home-galaxy-hud > span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--home-green);
    box-shadow: 0 0 12px rgba(86, 199, 173, 0.7);
}

.home-galaxy-hud strong {
    margin-top: 8px;
    color: var(--home-text);
    font-size: 20px;
    line-height: 1.15;
}

.home-galaxy-hud small {
    margin-top: 5px;
    color: var(--home-dim);
    font-family: "Fangcun Space Grotesk", "Segoe UI", sans-serif;
    font-size: 10px;
}

.home-galaxy-coordinates {
    top: 30px;
    right: 32px;
    display: flex;
    gap: 18px;
    color: var(--home-dim);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
}

.home-empty-stage.is-galaxy-fallback::before {
    opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
    .home-theme-veil {
        display: none;
    }

    .home-theme-denied {
        transition-duration: 1ms;
    }
}

@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-theme-denied {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        width: calc(100vw - 28px);
        min-width: 0;
    }

    .home-shell {
        position: relative;
        display: block;
        height: 100dvh;
        overflow: hidden;
    }

    .home-mobile-bar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 5;
        min-height: calc(64px + env(safe-area-inset-top));
        padding: max(10px, env(safe-area-inset-top)) 14px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid var(--home-border);
        background: color-mix(in srgb, var(--home-bg-deep) 78%, transparent);
        backdrop-filter: blur(18px) saturate(1.08);
        -webkit-backdrop-filter: blur(18px) saturate(1.08);
    }

    .home-mobile-brand {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--home-text);
    }

    .home-mobile-brand-mark {
        width: 38px;
        height: 38px;
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        border: 1px solid var(--home-border-strong);
        border-radius: 6px;
        color: var(--home-cyan);
        background: color-mix(in srgb, var(--home-cyan-soft) 78%, var(--home-surface-strong));
        font-family: var(--brand-display-font);
        font-size: 18px;
    }

    .home-mobile-brand-mark svg {
        width: 21px;
        height: 21px;
    }

    .home-mobile-brand strong {
        overflow: hidden;
        font-size: 15px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-mobile-menu,
    .home-nav-close {
        width: 44px;
        height: 44px;
        padding: 0;
        place-items: center;
        border: 1px solid var(--home-border-strong);
        border-radius: 6px;
        color: var(--home-muted);
        background: var(--home-surface-strong);
        cursor: pointer;
        touch-action: manipulation;
    }

    .home-mobile-menu {
        display: grid;
    }

    .home-mobile-menu svg,
    .home-nav-close svg {
        width: 20px;
        height: 20px;
    }

    .home-navigation {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 7;
        width: min(88vw, 360px);
        height: 100dvh;
        min-height: 0;
        padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
        overflow: hidden;
        border-right: 1px solid var(--home-border-strong);
        transform: translate3d(-105%, 0, 0);
        transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
        will-change: transform;
    }

    .home-shell.is-mobile-nav-open .home-navigation {
        transform: translate3d(0, 0, 0);
    }

    .home-navigation > * {
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    .home-nav-brand {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .home-nav-brand-actions .home-nav-signal {
        display: none;
    }

    .home-nav-close {
        display: grid;
        width: 38px;
        height: 38px;
    }

    .home-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 6;
        display: block;
        border: 0;
        opacity: 0;
        pointer-events: none;
        background: rgba(2, 8, 18, 0.58);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        transition: opacity 260ms var(--motion-standard);
    }

    .home-shell.is-mobile-nav-open .home-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .home-empty-stage {
        display: block;
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
    }

    .home-galaxy-hud {
        top: calc(80px + env(safe-area-inset-top));
        left: 18px;
    }

    .home-galaxy-hud strong {
        font-size: 18px;
    }

    .home-galaxy-coordinates {
        top: calc(84px + env(safe-area-inset-top));
        right: 18px;
        display: block;
    }

    .home-galaxy-coordinates span {
        display: block;
        margin-bottom: 4px;
        text-align: right;
    }

    .home-galaxy-coordinates span:nth-child(n + 3) {
        display: none;
    }

    .home-galaxy-star-label {
        min-width: 62px;
        padding: 4px 6px 4px 9px;
    }

    .home-galaxy-star-label strong {
        font-size: 9px;
    }

    .home-galaxy-star-label small {
        font-size: 7px;
    }

    .home-galaxy-line-label {
        font-size: 5px;
    }

    .home-galaxy-star-label.is-own {
        min-width: 88px;
    }

    .home-galaxy-explorer {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        left: 14px;
        width: auto;
        padding: 10px 12px;
    }

    .home-galaxy-explorer-control {
        margin-top: 9px;
    }

    .home-galaxy-return {
        bottom: calc(156px + env(safe-area-inset-bottom));
        min-height: 40px;
    }

    .home-galaxy-philosophy {
        top: auto;
        bottom: calc(220px + env(safe-area-inset-bottom));
        width: calc(100% - 36px);
    }

    .home-galaxy-philosophy blockquote {
        font-size: 14px;
        line-height: 1.65;
    }

    .home-galaxy-philosophy figcaption {
        margin-top: 7px;
    }

    .home-fangxing-core-choice {
        right: 14px;
        bottom: calc(164px + env(safe-area-inset-bottom));
        left: 14px;
        width: auto;
        min-height: 84px;
        gap: 10px;
        padding: 10px;
    }

    .home-fangxing-core-choice-copy strong {
        font-size: 12px;
    }

    .home-fangxing-core-choice-actions {
        gap: 6px;
    }

    .home-fangxing-core-choice-actions button {
        min-width: 44px;
        min-height: 44px;
        padding-inline: 10px;
    }

    .home-fangxing-core-hud {
        top: calc(82px + env(safe-area-inset-top));
        left: 18px;
    }

    .home-fangxing-core-rename {
        transform: translate3d(-50%, calc(-50% - 96px + var(--core-rename-label-lift, 10px)), 0)
            scale(var(--core-rename-label-scale, 0.96));
    }

    .home-fangxing-core-rename > strong {
        font-size: 17px;
    }

    .home-fangxing-core-echo {
        width: calc(100% - 44px);
        transform: translate3d(-50%, calc(-50% + 108px + var(--core-echo-lift, 9px)), 0);
    }

    .home-fangxing-core-echo blockquote {
        font-size: 12px;
        line-height: 1.58;
        -webkit-line-clamp: 5;
    }

    .home-fangxing-core-hud strong {
        font-size: 18px;
    }

    .home-fangxing-core-coordinates {
        top: calc(86px + env(safe-area-inset-top));
        right: 18px;
        display: grid;
        gap: 4px;
        text-align: right;
    }

    .home-fangxing-core-exit {
        bottom: max(22px, env(safe-area-inset-bottom));
        min-height: 44px;
    }

    .home-fangxing-core-edit {
        right: 18px;
        bottom: max(22px, env(safe-area-inset-bottom));
        min-height: 44px;
        padding-inline: 11px;
    }

    .home-fangxing-core-settings {
        position: fixed;
        right: 14px;
        bottom: calc(78px + env(safe-area-inset-bottom));
        left: 14px;
        width: auto;
        max-height: calc(100% - 180px);
        padding: 12px;
    }

    .home-fangxing-core {
        position: fixed;
        inset: 0;
    }

    .home-fangxing-core-settings > header strong {
        font-size: 14px;
    }

    .home-empty-stage {
        cursor: default;
    }

}

@media (max-width: 374px) {
    .home-navigation {
        width: min(91vw, 340px);
        padding-inline: 12px;
    }

    .home-mobile-bar {
        padding-inline: 12px;
    }
}

@media (max-width: 720px) {
    /* Keep the mobile compositor cheap while preserving the layered look. */
    .home-navigation,
    .home-fangxing-space-toolbox,
    .home-fangxing-space-mode {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-galaxy-canvas,
    .home-navigation,
    .home-nav-backdrop {
        transition-duration: 1ms;
    }

    .home-galaxy-philosophy {
        filter: none;
        transition-duration: 1ms;
    }

    .home-fangxing-core,
    .home-fangxing-core-choice,
    .home-fangxing-core-hud,
    .home-fangxing-core-coordinates,
    .home-fangxing-core-exit,
    .home-fangxing-core-edit,
    .home-fangxing-core-settings {
        transition-duration: 1ms;
    }

    .home-fangxing-core.is-rename-swapped .home-fangxing-core-rename > strong {
        animation-duration: 180ms;
    }

    .home-fangxing-core.is-echo-committed .home-fangxing-core-echo blockquote {
        animation-duration: 180ms;
    }

}

/* Home navigation v3: isolated Nebula command surface. */
@property --home-nav-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

body:has(.home-shell) {
    --home-bg: #07111f;
    --home-bg-deep: #081321;
    --home-surface: rgba(11, 23, 40, 0.9);
    --home-surface-strong: rgba(14, 27, 46, 0.97);
    --home-border: rgba(132, 162, 201, 0.15);
    --home-border-strong: rgba(132, 162, 201, 0.27);
    --home-text: #edf4ff;
    --home-muted: #a7b7cd;
    --home-dim: #60758f;
    --home-cyan: #2aa6d6;
    --home-green: #56c7ad;
    --home-cyan-soft: rgba(42, 166, 214, 0.11);
    margin: 0;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--home-text);
    background: var(--home-bg);
}

body:has(.home-shell)::before {
    display: block;
    z-index: 0;
    opacity: 0.54;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(102, 213, 170, 0.9), transparent),
        radial-gradient(1px 1px at 50% 80%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 65% 20%, rgba(67, 214, 232, 0.9), transparent),
        radial-gradient(1px 1px at 35% 70%, rgba(153, 235, 226, 0.72), transparent);
    background-size: 380px 380px, 300px 300px, 420px 420px, 500px 500px, 260px 260px;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    mix-blend-mode: screen;
    animation: home-stars-drift 120s linear infinite;
}

html[data-theme="light"] body:has(.home-shell) {
    --home-bg: #edf4f7;
    --home-bg-deep: #f8fbfd;
    --home-surface: rgba(247, 251, 253, 0.92);
    --home-surface-strong: rgba(255, 255, 255, 0.96);
    --home-border: rgba(45, 86, 116, 0.12);
    --home-border-strong: rgba(45, 86, 116, 0.22);
    --home-text: #132238;
    --home-muted: #5f718b;
    --home-dim: #8392a6;
    --home-cyan: #087fba;
    --home-green: #168f7c;
    --home-cyan-soft: rgba(0, 120, 212, 0.08);
    color: var(--home-text);
    background: var(--home-bg);
}

html[data-theme="dark"] body:has(.home-shell) {
    color: var(--home-text);
    background:
        radial-gradient(ellipse at 18% -8%, rgba(30, 94, 154, 0.18), transparent 42%),
        radial-gradient(ellipse at 96% 12%, rgba(39, 139, 139, 0.1), transparent 38%),
        linear-gradient(180deg, #081426 0%, #0a1728 54%, var(--home-bg) 100%);
}

html[data-theme="light"] body:has(.home-shell)::before {
    opacity: 0.18;
    mix-blend-mode: multiply;
}

@keyframes home-stars-drift {
    to {
        background-position: 380px 380px, -300px 300px, 420px -420px, -500px 500px, 260px -260px;
    }
}

@keyframes home-nav-border-spin {
    to {
        --home-nav-angle: 360deg;
    }
}

@keyframes home-user-orbit {
    to {
        transform: rotate(360deg);
    }
}

.home-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    min-height: 100dvh;
    isolation: isolate;
    background:
        linear-gradient(90deg, transparent 0 72%, rgba(42, 166, 214, 0.028) 72% 72.1%, transparent 72.1%),
        linear-gradient(180deg, transparent 0 68%, rgba(86, 199, 173, 0.026) 68% 68.1%, transparent 68.1%);
}

.home-shell .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-navigation {
    position: relative;
    z-index: 3;
    min-width: 0;
    min-height: 100dvh;
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--home-border);
    background: var(--home-surface);
    box-shadow: 20px 0 70px rgba(1, 8, 20, 0.28);
    backdrop-filter: blur(20px) saturate(1.08);
    -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.home-navigation::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.34;
    background:
        linear-gradient(135deg, transparent 0 46%, rgba(42, 166, 214, 0.08) 46.2% 46.4%, transparent 46.6% 100%),
        linear-gradient(45deg, transparent 0 70%, rgba(86, 199, 173, 0.05) 70.2% 70.4%, transparent 70.6% 100%);
    background-size: 280px 280px, 210px 210px;
}

.home-nav-glow-frame {
    --home-nav-angle: 0deg;
    flex: 0 0 auto;
    padding: 1px;
    border-radius: 8px;
    background: conic-gradient(
        from var(--home-nav-angle),
        rgba(42, 166, 214, 0.12),
        var(--home-cyan),
        rgba(86, 199, 173, 0.16),
        var(--home-green),
        rgba(42, 166, 214, 0.12)
    );
    animation: home-nav-border-spin 14s linear infinite;
}

.home-nav-brand {
    min-height: 70px;
    padding: 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 10px;
    align-items: center;
    gap: 11px;
    border-radius: 7px;
    background: var(--home-surface-strong);
}

.home-nav-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: #021312;
    background: linear-gradient(135deg, #0789d7, #20aeb7);
    box-shadow: 0 9px 25px rgba(0, 120, 212, 0.2);
    font-family: var(--brand-display-font);
    font-size: 21px;
}

.home-nav-brand strong,
.home-nav-brand small {
    display: block;
    min-width: 0;
}

.home-nav-brand strong {
    color: var(--home-text);
    font-size: 16px;
    line-height: 1.2;
}

.home-nav-brand small {
    margin-top: 4px;
    color: var(--home-dim);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: 0;
}

.home-nav-signal {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--home-green);
    box-shadow: 0 0 0 5px rgba(102, 213, 170, 0.08), 0 0 14px rgba(102, 213, 170, 0.55);
}

.home-nav-tabs {
    position: relative;
    flex: 0 0 auto;
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--home-border);
}

.home-nav-tabs span {
    padding: 9px 4px;
    color: var(--home-dim);
    font-size: 12px;
    font-weight: 650;
    text-align: center;
}

.home-nav-tabs span.is-active {
    color: var(--home-cyan);
}

.home-nav-tabs i {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    background: var(--home-cyan);
    box-shadow: 0 0 12px rgba(67, 214, 232, 0.72);
}

.home-nav-search {
    flex: 0 0 auto;
    min-height: 44px;
    margin-top: 14px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--home-border-strong);
    border-radius: 7px;
    background: var(--home-bg-deep);
    transition: border-color 180ms var(--motion-standard), box-shadow 180ms var(--motion-standard);
}

.home-nav-search:focus-within {
    border-color: var(--home-cyan);
    box-shadow: 0 0 0 3px var(--home-cyan-soft);
}

.home-nav-search svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: var(--home-dim);
}

.home-nav-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--home-text);
    background: transparent;
    font-size: 13px;
}

.home-nav-search input::placeholder {
    color: var(--home-dim);
}

.home-nav-search kbd,
.home-nav-item kbd {
    min-width: 34px;
    min-height: 21px;
    padding: 2px 6px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--home-border-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    color: var(--home-muted);
    background: var(--home-surface-strong);
    font-family: "Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
    font-weight: 650;
    line-height: 1;
}

.home-nav-section {
    min-height: 0;
    margin-top: 15px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.home-nav-section-label {
    flex: 0 0 auto;
    padding: 0 8px 6px;
    color: var(--home-dim);
    font-family: "Space Grotesk", ui-monospace, monospace;
    font-size: 9px;
    line-height: 1.3;
    letter-spacing: 0;
}

.home-nav-admin-label {
    display: block;
    margin-top: 10px;
    padding-top: 11px;
    border-top: 1px solid var(--home-border);
}

.home-nav-list {
    position: relative;
    min-height: 0;
    padding: 4px 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--home-border-strong) transparent;
}

.home-nav-ink {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 2px;
    height: 54px;
    pointer-events: none;
    background: linear-gradient(180deg, var(--home-cyan), var(--home-green));
    box-shadow: 0 0 13px rgba(67, 214, 232, 0.8);
    transition: transform 420ms cubic-bezier(0.34, 1.3, 0.64, 1), height 240ms var(--motion-standard), opacity 160ms;
    will-change: transform;
}

.home-nav-ink.is-positioning {
    transition: none;
}

.home-nav-item {
    position: relative;
    z-index: 1;
    min-height: 54px;
    padding: 8px 9px 8px 12px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 6px;
    color: var(--home-muted);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 180ms var(--motion-standard), background 180ms var(--motion-standard), transform 180ms var(--motion-standard);
}

.home-nav-item[hidden] {
    display: none !important;
}

.home-nav-item:hover,
.home-nav-item.is-active {
    color: var(--home-text);
    background: var(--home-cyan-soft);
    transform: translateX(2px);
}

.home-nav-item:active {
    transform: translateX(2px) scale(0.985);
}

.home-nav-item svg {
    width: 19px;
    height: 19px;
    color: var(--home-dim);
    transition: color 180ms var(--motion-standard), filter 180ms var(--motion-standard);
}

.home-nav-item:hover svg,
.home-nav-item.is-active svg {
    color: var(--home-cyan);
    filter: drop-shadow(0 0 7px rgba(67, 214, 232, 0.38));
}

.home-nav-item > span {
    min-width: 0;
}

.home-nav-item strong,
.home-nav-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-nav-item strong {
    color: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
}

.home-nav-item small {
    margin-top: 3px;
    color: var(--home-dim);
    font-family: "Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
    line-height: 1.2;
    letter-spacing: 0;
}

.home-nav-item.is-active kbd {
    color: var(--home-cyan);
    border-color: rgba(67, 214, 232, 0.28);
}

.home-nav-admin:hover,
.home-nav-admin.is-active {
    background: rgba(102, 213, 170, 0.09);
}

.home-nav-admin:hover svg,
.home-nav-admin.is-active svg {
    color: var(--home-green);
}

.home-nav-empty {
    margin: 24px 0 0;
    color: var(--home-dim);
    font-size: 12px;
    text-align: center;
}

.home-nav-footer {
    flex: 0 0 auto;
    margin-top: 12px;
    padding-top: 13px;
    border-top: 1px solid var(--home-border);
}

.home-user-block {
    min-height: 54px;
    padding: 8px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.home-user-block strong,
.home-user-block small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-user-block strong {
    color: var(--home-text);
    font-size: 13px;
}

.home-user-block small {
    margin-top: 3px;
    color: var(--home-dim);
    font-size: 10px;
}

.home-user-orbit {
    position: relative;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--home-border-strong);
    border-radius: 50%;
}

.home-user-orbit::before {
    content: "方";
    color: var(--home-cyan);
    font-family: var(--brand-display-font);
    font-size: 13px;
}

.home-user-orbit i {
    position: absolute;
    inset: -3px;
    border: 1px solid transparent;
    border-top-color: var(--home-green);
    border-radius: 50%;
    animation: home-user-orbit 7s linear infinite;
}

.home-user-status {
    padding: 4px 6px;
    border: 1px solid rgba(102, 213, 170, 0.24);
    border-radius: 4px;
    color: var(--home-green);
    background: rgba(102, 213, 170, 0.07);
    font-family: "Space Grotesk", ui-monospace, monospace;
    font-size: 8px;
    line-height: 1;
}

.home-nav-footer-actions {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.home-nav-footer-actions form {
    min-width: 0;
}

.home-shell .home-nav-footer-actions .theme-toggle,
.home-nav-logout {
    width: 100%;
    min-height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    color: var(--home-muted);
    background: var(--home-bg-deep);
    box-shadow: none;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: color 180ms var(--motion-standard), border-color 180ms var(--motion-standard), background 180ms var(--motion-standard), transform 180ms var(--motion-standard);
}

.home-shell .home-nav-footer-actions .theme-toggle:hover,
.home-nav-logout:hover {
    color: var(--home-text);
    border-color: var(--home-border-strong);
    background: var(--home-cyan-soft);
}

.home-shell .home-nav-footer-actions .theme-toggle:active,
.home-nav-logout:active {
    transform: scale(0.98);
}

.home-shell[data-home-view="fangcun-galaxy"] .theme-toggle.is-theme-locked {
    opacity: 0.58;
    cursor: not-allowed;
}

.home-shell[data-home-view="fangcun-galaxy"] .theme-toggle.is-theme-locked:hover,
.home-shell[data-home-view="fangcun-galaxy"] .theme-toggle.is-theme-locked:active {
    color: var(--home-muted);
    border-color: var(--home-border);
    background: var(--home-bg-deep);
    transform: none;
}

.home-service-link {
    width: fit-content;
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(126, 229, 192, 0.36);
    border-radius: 6px;
    color: #ecfff5;
    background: rgba(58, 169, 117, 0.16);
    font-size: 12px;
    font-weight: 760;
    transition: background 180ms var(--motion-standard), border-color 180ms var(--motion-standard), transform 180ms var(--motion-standard);
}

.home-service-link:hover {
    border-color: rgba(164, 246, 211, 0.62);
    background: rgba(83, 203, 143, 0.24);
    transform: translateY(-1px);
}

.home-service-panel-crystal {
    --fj-home-surface: rgba(246, 252, 248, 0.96);
    --fj-home-surface-strong: rgba(255, 255, 255, 0.98);
    --fj-home-line: rgba(26, 105, 70, 0.18);
    --fj-home-line-strong: rgba(26, 105, 70, 0.32);
    --fj-home-text: #0e2419;
    --fj-home-muted: #4f6c5f;
    --fj-home-green: #0f8a59;
    --fj-home-green-lit: #44c77e;
    --fj-home-gold: #c59b2a;
    width: min(1040px, calc(100% - 42px));
    min-height: min(680px, calc(100dvh - 52px));
    max-height: calc(100dvh - 52px);
    align-content: stretch;
    padding: 0;
    overflow: auto;
    border-color: var(--fj-home-line);
    border-radius: 10px;
    color: var(--fj-home-text);
    background:
        radial-gradient(circle at 78% 16%, rgba(63, 190, 117, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 248, 242, 0.96));
    box-shadow: 0 24px 58px rgba(13, 39, 28, 0.16);
}

html[data-theme="dark"] .home-service-panel-crystal {
    --fj-home-surface: rgba(2, 8, 5, 0.94);
    --fj-home-surface-strong: rgba(4, 16, 9, 0.98);
    --fj-home-line: rgba(75, 255, 146, 0.18);
    --fj-home-line-strong: rgba(102, 255, 164, 0.38);
    --fj-home-text: #eafff1;
    --fj-home-muted: #9cc7aa;
    --fj-home-green: #4dff91;
    --fj-home-green-lit: #9cffb5;
    --fj-home-gold: #f2d36f;
    background:
        radial-gradient(circle at 74% 14%, rgba(63, 255, 134, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(0, 5, 3, 0.98), rgba(2, 18, 9, 0.96));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46), 0 0 42px rgba(55, 255, 133, 0.08);
}

.home-fangjing-shell {
    min-height: 100%;
    padding: 24px;
    display: grid;
    gap: 18px;
}

.home-fangjing-header {
    min-height: 178px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.44fr);
    gap: 18px;
    align-items: center;
}

.home-fangjing-header > div:first-child {
    display: grid;
    gap: 10px;
    align-content: center;
}

.home-fangjing-header strong {
    color: var(--fj-home-text);
    font-size: 34px;
    line-height: 1.08;
}

.home-fangjing-header p {
    max-width: 62ch;
    margin: 0;
    color: var(--fj-home-muted);
    font-size: 14px;
    line-height: 1.72;
}

.home-fangjing-crystal {
    position: relative;
    min-height: 172px;
    display: grid;
    place-items: center;
}

.home-fangjing-crystal::before,
.home-fangjing-crystal::after {
    content: "";
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--fj-home-green) 42%, transparent);
    border-radius: 50%;
}

.home-fangjing-crystal::before {
    width: 220px;
    height: 78px;
    transform: rotate(-18deg);
}

.home-fangjing-crystal::after {
    width: 154px;
    height: 54px;
    border-color: color-mix(in srgb, var(--fj-home-gold) 40%, transparent);
    transform: rotate(25deg);
}

.home-fangjing-crystal span {
    position: absolute;
    width: 128px;
    height: 168px;
    clip-path: polygon(50% 0, 92% 28%, 76% 100%, 24% 100%, 8% 28%);
    background: linear-gradient(145deg, #dfffe9, var(--fj-home-green-lit) 42%, var(--fj-home-green) 68%, var(--fj-home-gold));
    box-shadow:
        0 22px 28px rgba(19, 92, 55, 0.2),
        0 0 34px color-mix(in srgb, var(--fj-home-green-lit) 38%, transparent);
    animation: home-fangjing-float 5.4s ease-in-out infinite;
}

.home-fangjing-crystal span:nth-child(2) {
    clip-path: polygon(50% 0, 92% 28%, 50% 42%);
    background: rgba(255, 255, 255, 0.46);
    box-shadow: none;
}

.home-fangjing-crystal span:nth-child(3) {
    clip-path: polygon(8% 28%, 50% 42%, 24% 100%);
    background: color-mix(in srgb, var(--fj-home-green) 54%, transparent);
    box-shadow: none;
}

.home-fangjing-crystal span:nth-child(4) {
    clip-path: polygon(92% 28%, 50% 42%, 76% 100%);
    background: color-mix(in srgb, var(--fj-home-gold) 36%, transparent);
    box-shadow: none;
}

.home-fangjing-flash {
    min-height: 42px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    border: 1px solid var(--fj-home-line);
    border-radius: 8px;
    color: var(--fj-home-text);
    background: var(--fj-home-surface);
    font-size: 13px;
    line-height: 1.45;
}

.home-fangjing-flash.success {
    border-color: color-mix(in srgb, var(--fj-home-green) 34%, transparent);
    background: color-mix(in srgb, var(--fj-home-green) 10%, var(--fj-home-surface));
}

.home-fangjing-flash.error {
    border-color: rgba(255, 107, 107, 0.32);
    background: color-mix(in srgb, #ff6b6b 10%, var(--fj-home-surface));
}

.home-fangjing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(248px, 0.38fr);
    gap: 14px;
    align-items: start;
}

.home-fangjing-work,
.home-fangjing-guard {
    padding: 18px;
    display: grid;
    gap: 15px;
    border: 1px solid var(--fj-home-line);
    border-radius: 8px;
    background: var(--fj-home-surface);
}

.home-fangjing-work header,
.home-fangjing-guard {
    color: var(--fj-home-text);
}

.home-fangjing-work header {
    display: grid;
    gap: 5px;
}

.home-fangjing-work header span,
.home-fangjing-guard > span {
    color: var(--fj-home-green);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0.08em;
}

.home-fangjing-work h3,
.home-fangjing-guard h3 {
    margin: 0;
    color: var(--fj-home-text);
    font-size: 21px;
    line-height: 1.18;
}

.home-fangjing-work p,
.home-fangjing-guard p {
    margin: 0;
    color: var(--fj-home-muted);
    font-size: 13px;
    line-height: 1.66;
}

.home-fangjing-form {
    display: grid;
    gap: 11px;
}

.home-fangjing-form label {
    display: grid;
    gap: 6px;
}

.home-fangjing-form label > span {
    color: var(--fj-home-muted);
    font-size: 12px;
    font-weight: 760;
}

.home-fangjing-form input,
.home-fangjing-form select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--fj-home-line);
    border-radius: 7px;
    color: var(--fj-home-text);
    background: var(--fj-home-surface-strong);
    outline: none;
}

.home-fangjing-form input::placeholder {
    color: color-mix(in srgb, var(--fj-home-muted) 64%, transparent);
}

.home-fangjing-form input:focus,
.home-fangjing-form select:focus {
    border-color: var(--fj-home-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--fj-home-green) 18%, transparent);
}

.home-fangjing-submit,
.home-fangjing-secondary {
    width: 100%;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-weight: 820;
    cursor: pointer;
    transition: transform 180ms var(--motion-standard), background 180ms var(--motion-standard), border-color 180ms var(--motion-standard);
}

.home-fangjing-submit {
    color: #06110b;
    background: linear-gradient(135deg, #c5ffd6, var(--fj-home-green-lit) 54%, var(--fj-home-gold));
}

.home-fangjing-secondary {
    color: var(--fj-home-text);
    border-color: var(--fj-home-line);
    background: var(--fj-home-surface-strong);
}

.home-fangjing-submit:hover,
.home-fangjing-secondary:hover {
    transform: translateY(-1px);
}

.home-fangjing-sms {
    padding: 12px;
    display: grid;
    gap: 8px;
    border: 1px solid var(--fj-home-line);
    border-radius: 7px;
    background: color-mix(in srgb, var(--fj-home-green) 10%, var(--fj-home-surface));
}

.home-fangjing-sms strong {
    color: var(--fj-home-text);
    font-size: 13px;
    line-height: 1.5;
}

.home-fangjing-sms a {
    width: fit-content;
    color: var(--fj-home-green);
    font-size: 13px;
    font-weight: 760;
}

.home-fangjing-results {
    display: grid;
    gap: 8px;
}

.home-fangjing-results > div {
    min-height: 42px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--fj-home-line);
    border-radius: 7px;
    background: var(--fj-home-surface-strong);
}

.home-fangjing-results span {
    color: var(--fj-home-gold);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 11px;
}

.home-fangjing-results strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--fj-home-text);
    font-size: 13px;
}

.home-fangjing-results small,
.home-fangjing-guard dd {
    color: var(--fj-home-green);
    font-size: 12px;
    font-weight: 780;
}

.home-fangjing-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.home-fangjing-guard dl {
    margin: 0;
    display: grid;
    gap: 8px;
}

.home-fangjing-guard dl > div {
    padding-top: 9px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--fj-home-line);
}

.home-fangjing-guard dt,
.home-fangjing-guard dd {
    margin: 0;
    font-size: 12px;
}

.home-fangjing-guard dt {
    color: var(--fj-home-muted);
}

@keyframes home-fangjing-float {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }

    50% {
        transform: translateY(-8px) rotate(1.4deg);
    }
}

@media (max-width: 860px) {
    .home-service-panel-crystal {
        width: min(100% - 24px, 720px);
        max-height: calc(100dvh - 26px);
    }

    .home-fangjing-shell {
        padding: 16px;
    }

    .home-fangjing-header,
    .home-fangjing-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-fangjing-crystal {
        min-height: 150px;
    }
}

@media (max-width: 520px) {
    .home-fangjing-header strong {
        font-size: 28px;
    }

    .home-fangjing-actions,
    .home-fangjing-results > div {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-fangjing-results small {
        justify-self: start;
    }
}

.app-shell .topbar-actions .btn.secondary {
    color: var(--text);
    border: 1px solid var(--line);
    background: var(--panel-strong);
    box-shadow: none;
}

.app-shell .topbar-actions .btn.secondary:hover {
    background: #ffffff;
}

html[data-theme="dark"] .app-shell .topbar-actions .btn.secondary {
    color: #edf4ff;
    border-color: rgba(146, 167, 205, 0.16);
    background: rgba(23, 32, 48, 0.72);
}

html[data-theme="dark"] .app-shell .topbar-actions .btn.secondary:hover {
    background: rgba(30, 42, 64, 0.96);
}

.fangjing-shell {
    --fj-bg: #f6fbf8;
    --fj-surface: rgba(255, 255, 255, 0.94);
    --fj-surface-soft: rgba(240, 249, 244, 0.86);
    --fj-line: rgba(39, 91, 65, 0.16);
    --fj-line-strong: rgba(39, 91, 65, 0.3);
    --fj-text: #10221a;
    --fj-muted: #516b5e;
    --fj-green: #14895c;
    --fj-green-bright: #35b978;
    --fj-green-soft: rgba(31, 159, 99, 0.12);
    --fj-gold: #c79b24;
    --fj-gold-soft: rgba(206, 161, 43, 0.14);
    display: grid;
    gap: 16px;
}

html[data-theme="dark"] .fangjing-shell {
    --fj-bg: #020705;
    --fj-surface: rgba(4, 12, 9, 0.96);
    --fj-surface-soft: rgba(7, 22, 15, 0.9);
    --fj-line: rgba(75, 255, 160, 0.16);
    --fj-line-strong: rgba(89, 255, 171, 0.34);
    --fj-text: #eafff1;
    --fj-muted: #90baa0;
    --fj-green: #3ee889;
    --fj-green-bright: #8affae;
    --fj-green-soft: rgba(70, 255, 145, 0.13);
    --fj-gold: #f1d071;
    --fj-gold-soft: rgba(241, 208, 113, 0.12);
}

.fangjing-hero,
.fangjing-flow,
.fangjing-guard {
    border: 1px solid var(--fj-line);
    border-radius: 8px;
    color: var(--fj-text);
    background: var(--fj-surface);
    box-shadow: 0 12px 28px rgba(23, 48, 34, 0.08);
}

html[data-theme="dark"] .fangjing-hero,
html[data-theme="dark"] .fangjing-flow,
html[data-theme="dark"] .fangjing-guard {
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3), 0 0 34px rgba(54, 255, 139, 0.06);
}

.fangjing-hero {
    min-height: 300px;
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr);
    gap: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 20%, var(--fj-green-soft), transparent 32%),
        linear-gradient(135deg, var(--fj-surface), var(--fj-bg));
}

html[data-theme="dark"] .fangjing-hero {
    background:
        radial-gradient(circle at 76% 22%, rgba(81, 255, 153, 0.17), transparent 34%),
        linear-gradient(135deg, #030806, #06120c 54%, #020403);
}

.fangjing-copy {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 12px;
}

.fangjing-copy .eyebrow {
    margin: 0;
    color: var(--fj-green);
}

.fangjing-copy h2 {
    margin: 0;
    color: var(--fj-text);
    font-size: 36px;
    line-height: 1.08;
    letter-spacing: 0;
    text-wrap: balance;
}

.fangjing-copy p:not(.eyebrow) {
    max-width: 58ch;
    margin: 0;
    color: var(--fj-muted);
    font-size: 15px;
    line-height: 1.72;
    text-wrap: pretty;
}

.fangjing-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.fangjing-status-row span {
    min-height: 32px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--fj-line);
    border-radius: 999px;
    color: var(--fj-muted);
    background: var(--fj-surface-soft);
    font-size: 12px;
    font-weight: 760;
}

.fangjing-status-row i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fj-green);
    box-shadow: 0 0 10px color-mix(in srgb, var(--fj-green) 58%, transparent);
}

.fangjing-crystal-stage {
    position: relative;
    min-height: 250px;
    display: grid;
    place-items: center;
}

.fangjing-crystal-stage::before {
    content: "";
    position: absolute;
    width: min(76%, 320px);
    height: 1px;
    bottom: 26px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--fj-gold) 60%, transparent), transparent);
}

.fangjing-orbit {
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--fj-green) 36%, transparent);
    border-radius: 50%;
    transform: rotate(-16deg);
}

.fangjing-orbit.orbit-a {
    width: 250px;
    height: 92px;
}

.fangjing-orbit.orbit-b {
    width: 172px;
    height: 64px;
    border-color: color-mix(in srgb, var(--fj-gold) 42%, transparent);
    transform: rotate(28deg);
}

.fangjing-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fj-green-bright);
    box-shadow: 0 0 16px color-mix(in srgb, var(--fj-green-bright) 70%, transparent);
    animation: fangjing-spark 3.8s ease-in-out infinite;
}

.fangjing-spark.spark-a {
    left: 18%;
    top: 28%;
}

.fangjing-spark.spark-b {
    right: 22%;
    top: 18%;
    width: 6px;
    height: 6px;
    animation-delay: 680ms;
}

.fangjing-spark.spark-c {
    right: 16%;
    bottom: 28%;
    width: 5px;
    height: 5px;
    background: var(--fj-gold);
    animation-delay: 1180ms;
}

.fangjing-crystal {
    position: relative;
    width: 168px;
    height: 218px;
    filter:
        drop-shadow(0 18px 26px rgba(26, 90, 61, 0.2))
        drop-shadow(0 0 24px color-mix(in srgb, var(--fj-green-bright) 34%, transparent));
    animation: fangjing-crystal-float 5.6s ease-in-out infinite;
}

.fangjing-crystal::before,
.fangjing-crystal::after,
.fangjing-crystal .facet {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0, 92% 28%, 76% 100%, 24% 100%, 8% 28%);
}

.fangjing-crystal::before {
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.9), transparent 28%),
        linear-gradient(160deg, color-mix(in srgb, var(--fj-green-bright) 42%, white), color-mix(in srgb, var(--fj-green) 64%, #143826));
    border: 1px solid var(--fj-line-strong);
}

.fangjing-crystal::after {
    inset: 10px 16px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.04));
    opacity: 0.58;
    transform: translateX(-9px);
}

html[data-theme="dark"] .fangjing-crystal::before {
    background:
        linear-gradient(130deg, rgba(234, 255, 241, 0.34), transparent 28%),
        linear-gradient(160deg, #8affae, #21d876 48%, #051c10 100%);
}

.fangjing-crystal .facet-a {
    clip-path: polygon(50% 0, 92% 28%, 50% 42%);
    background: rgba(255, 255, 255, 0.48);
}

.fangjing-crystal .facet-b {
    clip-path: polygon(8% 28%, 50% 42%, 24% 100%);
    background: color-mix(in srgb, var(--fj-green) 54%, transparent);
}

.fangjing-crystal .facet-c {
    clip-path: polygon(92% 28%, 50% 42%, 76% 100%);
    background: color-mix(in srgb, var(--fj-gold) 36%, transparent);
}

.fangjing-crystal .facet-d {
    clip-path: polygon(24% 100%, 50% 42%, 76% 100%);
    background: rgba(255, 255, 255, 0.16);
}

.fangjing-crystal .facet-e {
    clip-path: polygon(8% 28%, 50% 0, 92% 28%, 50% 42%);
    background: rgba(255, 255, 255, 0.18);
}

.fangjing-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
    gap: 16px;
    align-items: start;
}

.fangjing-flow,
.fangjing-guard {
    padding: 22px;
    display: grid;
    gap: 18px;
}

.fangjing-flow-head {
    display: grid;
    gap: 6px;
}

.fangjing-flow-head > span,
.fangjing-guard > span {
    color: var(--fj-green);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.06em;
}

.fangjing-flow-head h3,
.fangjing-guard h3 {
    margin: 0;
    color: var(--fj-text);
    font-size: 22px;
    line-height: 1.18;
}

.fangjing-flow-head p,
.fangjing-guard p {
    max-width: 62ch;
    margin: 0;
    color: var(--fj-muted);
    font-size: 14px;
    line-height: 1.68;
}

.fangjing-form {
    display: grid;
    gap: 14px;
}

.fangjing-form label {
    display: grid;
    gap: 7px;
}

.fangjing-form label > span {
    color: var(--fj-muted);
    font-size: 13px;
    font-weight: 720;
}

.fangjing-form input,
.fangjing-form select {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--fj-line);
    border-radius: 8px;
    color: var(--fj-text);
    background: var(--fj-surface-soft);
    outline: none;
    transition: border-color 170ms var(--motion-standard), box-shadow 170ms var(--motion-standard), background 170ms var(--motion-standard);
}

.fangjing-form input::placeholder {
    color: color-mix(in srgb, var(--fj-muted) 58%, transparent);
}

.fangjing-form input:focus,
.fangjing-form select:focus {
    border-color: var(--fj-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--fj-green) 18%, transparent);
    background: var(--fj-surface);
}

.fangjing-form .btn.primary,
.fangjing-actions .btn.primary {
    color: #07150e;
    background: linear-gradient(135deg, #c9ffd8, var(--fj-green-bright) 52%, var(--fj-gold));
    box-shadow: none;
}

.fangjing-form .btn.primary:hover,
.fangjing-actions .btn.primary:hover {
    background: linear-gradient(135deg, #dcffe5, #72ed9f 50%, #f2d477);
}

.fangjing-reset-form {
    margin-top: -6px;
}

.fangjing-sms-panel {
    padding: 14px;
    display: grid;
    gap: 8px;
    border: 1px solid var(--fj-line);
    border-radius: 8px;
    background: var(--fj-green-soft);
}

.fangjing-sms-panel p,
.fangjing-sms-panel strong {
    margin: 0;
    color: var(--fj-text);
    line-height: 1.62;
}

.fangjing-sms-panel a {
    width: fit-content;
    color: var(--fj-green);
    font-weight: 760;
}

.fangjing-result-list {
    display: grid;
    gap: 8px;
}

.fangjing-result-list > div {
    min-height: 46px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--fj-line);
    border-radius: 8px;
    background: var(--fj-surface-soft);
}

.fangjing-result-list span {
    color: var(--fj-gold);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 12px;
}

.fangjing-result-list strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--fj-text);
    font-size: 14px;
}

.fangjing-result-list small {
    color: var(--fj-green);
    font-size: 12px;
    font-weight: 760;
}

.fangjing-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.fangjing-guard {
    background:
        linear-gradient(180deg, var(--fj-surface), var(--fj-surface-soft));
}

.fangjing-guard dl {
    margin: 0;
    display: grid;
    gap: 9px;
}

.fangjing-guard dl > div {
    padding: 11px 0;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--fj-line);
}

.fangjing-guard dt,
.fangjing-guard dd {
    margin: 0;
    font-size: 13px;
}

.fangjing-guard dt {
    color: var(--fj-muted);
}

.fangjing-guard dd {
    color: var(--fj-green);
    font-weight: 760;
}

@keyframes fangjing-crystal-float {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }

    50% {
        transform: translateY(-8px) rotate(1.4deg);
    }
}

@keyframes fangjing-spark {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.82);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@media (max-width: 900px) {
    .fangjing-hero,
    .fangjing-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    .fangjing-crystal-stage {
        min-height: 210px;
    }
}

@media (max-width: 560px) {
    .fangjing-hero,
    .fangjing-flow,
    .fangjing-guard {
        padding: 16px;
    }

    .fangjing-copy h2 {
        font-size: 30px;
    }

    .fangjing-actions,
    .fangjing-result-list > div {
        grid-template-columns: minmax(0, 1fr);
    }

    .fangjing-result-list small {
        justify-self: start;
    }
}

.home-theme-denied {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10;
    min-width: 220px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 3px;
    border: 1px solid rgba(104, 204, 245, 0.28);
    border-radius: 8px;
    color: #edf9ff;
    background: rgba(5, 14, 25, 0.94);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 10px, 0) scale(0.98);
    transition: opacity 180ms var(--motion-standard), transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-theme-denied::before {
    content: "";
    grid-row: 1 / 3;
    width: 7px;
    height: 7px;
    margin-top: 4px;
    border-radius: 50%;
    background: #62c8ee;
    box-shadow: 0 0 12px rgba(98, 200, 238, 0.78);
}

.home-theme-denied strong,
.home-theme-denied span {
    grid-column: 2;
}

.home-theme-denied strong {
    font-size: 12px;
    line-height: 1.2;
}

.home-theme-denied span {
    color: #8ea6bf;
    font-size: 10px;
    line-height: 1.2;
}

.home-theme-denied.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.home-empty-stage {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 100dvh;
    overflow: hidden;
    background:
        linear-gradient(135deg, transparent 0 48%, rgba(0, 120, 212, 0.04) 48.1% 48.2%, transparent 48.3% 100%),
        linear-gradient(45deg, transparent 0 72%, rgba(41, 166, 170, 0.03) 72.1% 72.2%, transparent 72.3% 100%);
    background-size: 420px 420px, 310px 310px;
}

.home-empty-stage::before,
.home-empty-stage::after {
    content: "";
    position: absolute;
    left: -12%;
    width: 126%;
    pointer-events: none;
    border-radius: 50% 50% 0 0 / 72px 72px 0 0;
    transform: rotate(-2deg);
}

.home-empty-stage::before {
    bottom: 11%;
    height: 250px;
    border-top: 1px solid rgba(42, 166, 214, 0.12);
    background: linear-gradient(180deg, rgba(14, 55, 83, 0.2), rgba(12, 32, 55, 0.36) 46%, transparent 100%);
}

.home-empty-stage::after {
    bottom: -1%;
    height: 220px;
    border-top: 1px solid rgba(86, 199, 173, 0.09);
    background: linear-gradient(180deg, rgba(20, 67, 81, 0.16), rgba(7, 22, 39, 0.3) 52%, transparent 100%);
    transform: rotate(1.5deg);
}

.home-stage-grid {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(116, 157, 195, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 157, 195, 0.065) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 56% 50%, #000 0 8%, rgba(0, 0, 0, 0.45) 36%, transparent 74%);
}

html[data-theme="light"] .home-nav-mark {
    color: #f7fffd;
}

html[data-theme="light"] .home-navigation {
    box-shadow: 20px 0 60px rgba(18, 50, 47, 0.08);
}

html[data-theme="light"] .home-stage-grid {
    opacity: 0.46;
}

html[data-theme="light"] .home-empty-stage::before {
    border-top-color: rgba(0, 120, 212, 0.1);
    background: linear-gradient(180deg, rgba(190, 226, 237, 0.2), rgba(219, 237, 242, 0.28) 46%, transparent 100%);
}

html[data-theme="light"] .home-empty-stage::after {
    border-top-color: rgba(43, 166, 170, 0.08);
    background: linear-gradient(180deg, rgba(204, 233, 238, 0.18), rgba(232, 243, 246, 0.3) 52%, transparent 100%);
}

@media (max-width: 980px) {
    .home-shell {
        grid-template-columns: 306px minmax(0, 1fr);
    }

    .home-navigation {
        padding: 14px;
    }
}

@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    body:has(.home-shell) {
        overflow: hidden;
    }

    .home-shell {
        display: block;
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .home-navigation {
        width: 100%;
        height: 100dvh;
        min-height: 0;
        padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
        overflow: hidden;
        border-right: 0;
    }

    .home-navigation > * {
        width: min(100%, 430px);
        margin-inline: auto;
    }

    .home-nav-tabs {
        margin-top: 12px;
    }

    .home-nav-tabs span {
        padding-block: 8px;
        font-size: 14px;
    }

    .home-nav-brand {
        min-height: 64px;
        padding: 10px;
        grid-template-columns: 42px minmax(0, 1fr) 10px;
    }

    .home-nav-mark {
        width: 42px;
        height: 42px;
    }

    .home-nav-search {
        min-height: 48px;
        margin-top: 12px;
    }

    .home-nav-search input {
        font-size: 16px;
    }

    .home-nav-search kbd,
    .home-nav-item kbd {
        display: none;
    }

    .home-nav-section {
        min-height: 0;
        margin-top: 12px;
        width: min(100%, 430px);
    }

    .home-nav-section-label {
        padding-bottom: 5px;
        font-size: 9px;
    }

    .home-nav-list {
        min-height: 0;
        padding-bottom: 8px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .home-nav-ink {
        width: 3px;
    }

    .home-nav-item {
        min-height: 56px;
        padding: 8px 12px;
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 12px;
        touch-action: manipulation;
    }

    .home-nav-item strong {
        font-size: 14px;
    }

    .home-nav-item small {
        font-size: 9px;
    }

    .home-nav-admin-label {
        margin-top: 8px;
        padding-top: 9px;
    }

    .home-nav-footer {
        margin-top: 8px;
        padding-top: 10px;
    }

    .home-user-block {
        min-height: 52px;
        padding-block: 6px;
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }

    .home-user-orbit {
        width: 34px;
        height: 34px;
    }

    .home-user-block strong {
        font-size: 14px;
    }

    .home-user-block small {
        font-size: 11px;
    }

    .home-shell .home-nav-footer-actions .theme-toggle,
    .home-nav-logout {
        min-height: 44px;
        font-size: 13px;
        touch-action: manipulation;
    }

    .home-empty-stage {
        display: none;
    }
}

@media (max-width: 374px) {
    .home-navigation {
        padding-inline: 12px;
    }

    .home-navigation > * {
        max-width: 100%;
    }

    .home-nav-brand {
        min-height: 60px;
        grid-template-columns: 40px minmax(0, 1fr) 8px;
    }

    .home-nav-mark {
        width: 40px;
        height: 40px;
    }

    .home-nav-item {
        min-height: 54px;
    }

    .home-user-status {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {
    .home-nav-item:hover,
    .home-nav-item.is-active {
        transform: none;
    }

    .home-nav-item:active {
        transform: scale(0.985);
    }
}

@media (max-height: 760px) and (min-width: 721px) {
    .home-navigation {
        padding: 11px 14px;
    }

    .home-nav-brand {
        min-height: 58px;
        padding: 8px 10px;
    }

    .home-nav-mark {
        width: 38px;
        height: 38px;
    }

    .home-nav-tabs {
        margin-top: 10px;
    }

    .home-nav-search,
    .home-nav-section {
        margin-top: 10px;
    }

    .home-nav-item {
        min-height: 47px;
        padding-block: 5px;
    }

    .home-nav-footer {
        margin-top: 7px;
        padding-top: 8px;
    }

    .home-user-block {
        min-height: 46px;
        padding-block: 4px;
    }
}

@media (max-height: 520px) and (min-width: 721px) and (hover: none) and (pointer: coarse) {
    body:has(.home-shell) {
        overflow: hidden;
    }

    .home-shell {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .home-navigation {
        height: 100dvh;
        min-height: 0;
        padding: max(9px, env(safe-area-inset-top)) 12px max(9px, env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .home-nav-brand {
        min-height: 50px;
        padding: 6px 8px;
        grid-template-columns: 36px minmax(0, 1fr) 8px;
    }

    .home-nav-mark {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .home-nav-brand strong {
        font-size: 14px;
    }

    .home-nav-tabs {
        display: none;
    }

    .home-nav-search {
        min-height: 44px;
        margin-top: 8px;
    }

    .home-nav-search input {
        font-size: 16px;
    }

    .home-nav-search kbd,
    .home-nav-item kbd {
        display: none;
    }

    .home-nav-section {
        min-height: 0;
        margin-top: 8px;
    }

    .home-nav-list {
        min-height: 0;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .home-nav-item {
        min-height: 48px;
        grid-template-columns: 22px minmax(0, 1fr);
        touch-action: manipulation;
    }

    .home-nav-item small {
        display: none;
    }

    .home-nav-footer {
        margin-top: 5px;
        padding-top: 5px;
    }

    .home-user-block {
        min-height: 38px;
        padding-block: 2px;
        grid-template-columns: 30px minmax(0, 1fr) auto;
    }

    .home-user-orbit {
        width: 28px;
        height: 28px;
    }

    .home-user-block small,
    .home-user-status {
        display: none;
    }

    .home-nav-footer-actions {
        margin-top: 5px;
    }

    .home-shell .home-nav-footer-actions .theme-toggle,
    .home-nav-logout {
        min-height: 44px;
        font-size: 12px;
        touch-action: manipulation;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:has(.home-shell)::before,
    .home-nav-glow-frame,
    .home-user-orbit i {
        animation: none;
    }

    .home-nav-ink,
    .home-nav-item {
        transition-duration: 1ms;
    }
}

@media (max-width: 520px) {
    .home-shell .workspace {
        width: min(100%, 390px);
        margin-inline: auto;
    }

    .home-shell .topbar-actions .user-pill {
        flex-basis: 100%;
    }

    .home-shell .hero-copy h2 {
        font-size: 28px;
    }

    .home-shell .home-metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Final mobile galaxy overrides must follow the legacy home breakpoints. */
.home-nav-brand {
    grid-template-columns: 44px minmax(0, 1fr) auto;
}

@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-navigation {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 7;
        width: min(88vw, 360px);
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        border-right: 1px solid var(--home-border-strong);
        transform: translate3d(-105%, 0, 0);
        transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .home-shell.is-mobile-nav-open .home-navigation {
        transform: translate3d(0, 0, 0);
    }

    .home-navigation > * {
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    .home-nav-brand {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .home-nav-brand-actions .home-nav-signal {
        display: none;
    }

    .home-nav-close {
        width: 38px;
        height: 38px;
        display: grid;
    }

    .home-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 6;
        display: block;
        border: 0;
        opacity: 0;
        pointer-events: none;
        background: rgba(2, 8, 18, 0.58);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        transition: opacity 260ms var(--motion-standard);
    }

    .home-shell.is-mobile-nav-open .home-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .home-empty-stage {
        position: fixed;
        inset: 0;
        display: block;
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
    }
}

@media (max-width: 374px) {
    .home-navigation {
        width: min(91vw, 340px);
    }
}

/* Mobile core controls: a compact inner-core console, not a desktop popover. */
@keyframes home-core-control-pulse {
    0%,
    100% {
        box-shadow: inset 0 0 0 1px rgba(137, 244, 214, 0.16), 0 0 6px rgba(73, 220, 183, 0.2);
    }

    50% {
        box-shadow: inset 0 0 0 1px rgba(204, 255, 240, 0.38), 0 0 10px rgba(73, 220, 183, 0.38);
    }
}

@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-mobile-brand {
        margin-left: auto;
        justify-content: flex-end;
    }

    .home-mobile-brand strong {
        text-align: right;
    }

    .home-mobile-menu {
        flex: 0 0 44px;
    }

    .home-fangxing-core-edit {
        right: 14px;
        bottom: max(18px, env(safe-area-inset-bottom));
        min-height: 48px;
        padding-inline: 14px;
        gap: 9px;
        border-color: rgba(132, 239, 210, 0.56);
        color: #effff9;
        background: rgba(5, 48, 47, 0.9);
        font-size: 12px;
        font-weight: 680;
        border-radius: 8px;
    }

    .home-fangxing-core-edit svg {
        width: 18px;
        height: 18px;
    }

    .home-fangxing-core-settings {
        position: fixed;
        top: auto;
        right: 0;
        bottom: max(14px, env(safe-area-inset-bottom));
        left: 0;
        width: min(calc(100vw - 24px), 390px);
        height: auto;
        max-height: min(44dvh, 372px);
        margin-inline: auto;
        padding: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-color: rgba(135, 232, 207, 0.46);
        border-radius: 0;
        color: #edfff9;
        background: rgba(1, 15, 20, 0.94);
        clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
        transform: translate3d(0, 16px, 0) scale(0.99);
        transform-origin: 50% 100%;
        transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1), transform 260ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 260ms;
    }

    .home-fangxing-core-settings::before {
        content: "";
        position: absolute;
        top: 0;
        right: auto;
        left: 48px;
        z-index: 2;
        width: 34px;
        height: 1px;
        background: #72e8c6;
        box-shadow: 44px 0 0 rgba(114, 232, 198, 0.48), 98px 0 0 rgba(114, 232, 198, 0.24);
        opacity: 0.82;
        pointer-events: none;
    }

    .home-fangxing-core-settings::after {
        content: "";
        position: absolute;
        top: 48px;
        right: 0;
        z-index: 2;
        width: 2px;
        height: 22px;
        background: rgba(114, 232, 198, 0.7);
        box-shadow: 0 30px 0 rgba(114, 232, 198, 0.22);
        pointer-events: none;
    }

    .home-fangxing-core-settings.is-open {
        transform: translate3d(0, 0, 0) scale(1);
    }

    .home-fangxing-core-settings > header {
        position: sticky;
        top: 0;
        z-index: 1;
        min-height: 54px;
        padding: 5px 9px 5px 11px;
        gap: 10px;
        border-bottom-color: rgba(122, 219, 199, 0.24);
        background: rgba(4, 27, 31, 0.96);
    }

    .home-fangxing-core-settings > header > div {
        grid-template-columns: 26px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        gap: 2px 9px;
        min-width: 0;
    }

    .home-fangxing-core-settings > header > div::before {
        content: "";
        grid-row: 1 / 3;
        width: 19px;
        height: 19px;
        justify-self: center;
        border: 1px solid rgba(153, 245, 220, 0.7);
        background: rgba(32, 149, 124, 0.2);
        transform: rotate(45deg);
        animation: home-core-control-pulse 2200ms ease-in-out infinite;
    }

    .home-fangxing-core-settings > header span {
        color: rgba(135, 230, 207, 0.7);
        font-size: 8px;
    }

    .home-fangxing-core-settings > header strong {
        overflow: hidden;
        color: #f2fffb;
        font-size: 14px;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-fangxing-core-settings-close {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-color: rgba(126, 219, 194, 0.4);
        border-radius: 8px;
        color: #dffaf2;
        background: rgba(7, 45, 47, 0.66);
    }

    .home-fangxing-core-settings-close svg {
        width: 18px;
        height: 18px;
    }

    .home-fangxing-core-form,
    .home-fangxing-core-form:first-of-type {
        margin: 0;
        padding: 9px 11px 10px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 7px 10px;
        align-content: start;
        border-top: 1px solid rgba(122, 219, 199, 0.17);
    }

    .home-fangxing-core-form:first-of-type {
        border-top: 0;
    }

    .home-fangxing-core-form + .home-fangxing-core-form {
        background: transparent;
    }

    .home-fangxing-core-form label {
        grid-column: 1 / -1;
        gap: 6px 9px;
    }

    .home-fangxing-core-form label > span {
        color: #e8fff7;
        font-size: 11px;
        font-weight: 650;
    }

    .home-fangxing-core-form label > span::before {
        content: "";
        width: 5px;
        height: 5px;
        margin-right: 7px;
        display: inline-block;
        background: #72e8c6;
        box-shadow: 0 0 6px rgba(114, 232, 198, 0.52);
        transform: rotate(45deg) translateY(-1px);
    }

    .home-fangxing-core-form label > output {
        color: rgba(140, 220, 199, 0.82);
        font-size: 8px;
    }

    .home-fangxing-core-form textarea,
    .home-fangxing-core-form input {
        min-height: 44px;
        padding: 8px 10px;
        border-color: rgba(126, 219, 194, 0.3);
        border-radius: 2px;
        color: #f2fff9;
        background: rgba(0, 9, 14, 0.84);
        font-size: 14px;
        line-height: 1.5;
    }

    .home-fangxing-core-form textarea {
        min-height: 68px;
        resize: none;
    }

    .home-fangxing-core-form textarea::placeholder,
    .home-fangxing-core-form input::placeholder {
        color: rgba(190, 220, 215, 0.68);
    }

    .home-fangxing-core-form textarea:focus,
    .home-fangxing-core-form input:focus {
        border-color: rgba(150, 247, 219, 0.88);
        background: rgba(1, 20, 24, 0.94);
        box-shadow: inset 0 0 0 1px rgba(126, 238, 209, 0.16);
    }

    .home-fangxing-core-save {
        width: auto;
        min-width: 112px;
        min-height: 44px;
        padding-inline: 12px;
        grid-column: 1;
        justify-self: start;
        justify-content: center;
        border-color: rgba(133, 239, 209, 0.52);
        border-radius: 8px;
        color: #f3fffb;
        background: rgba(15, 103, 89, 0.88);
        font-size: 11px;
        font-weight: 680;
        touch-action: manipulation;
    }

    .home-fangxing-core-save:active:not(:disabled) {
        background: rgba(20, 142, 117, 0.94);
        transform: scale(0.985);
    }

    .home-fangxing-core-save i {
        width: 20px;
        height: 20px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(219, 255, 245, 0.3);
        border-radius: 4px;
        font-size: 0;
        transform: rotate(45deg);
    }

    .home-fangxing-core-save i::before {
        content: "↗";
        font-size: 13px;
        transform: rotate(-45deg);
    }

    .home-fangxing-core-form-status {
        grid-column: 2;
        align-self: center;
        min-height: 15px;
        color: rgba(181, 220, 211, 0.76);
        font-size: 9px;
        line-height: 1.5;
    }

    .home-fangxing-core.is-settings-open .home-fangxing-core-exit {
        opacity: 0;
        pointer-events: none;
    }

    .home-fangxing-core.is-settings-open .home-fangxing-core-canvas {
        opacity: 0.94;
        filter: saturate(0.92) brightness(0.9);
        transform: translate3d(0, -7dvh, 0) scale(0.93);
    }

    .home-fangxing-core-canvas {
        transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1), filter 260ms cubic-bezier(0.16, 1, 0.3, 1), transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@media (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-fangxing-core-settings {
        top: auto;
        right: 0;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 0;
        width: min(calc(100vw - 28px), 720px);
        height: auto;
        max-height: calc(100dvh - 78px - env(safe-area-inset-top));
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto 1fr;
    }

    .home-fangxing-core.is-settings-open .home-fangxing-core-canvas {
        opacity: 0.94;
        transform: translate3d(0, -19vh, 0) scale(0.84);
    }

    .home-fangxing-core-settings > header {
        grid-column: 1 / -1;
        min-height: 58px;
        padding-block: 7px;
    }

    .home-fangxing-core-form,
    .home-fangxing-core-form:first-of-type {
        padding: 9px 11px 10px;
    }

    .home-fangxing-core-form + .home-fangxing-core-form {
        border-left: 1px solid rgba(122, 219, 199, 0.17);
    }

    .home-fangxing-core-form textarea,
    .home-fangxing-core-form input,
    .home-fangxing-core-save {
        min-height: 46px;
    }

    .home-fangxing-core-form textarea {
        min-height: 74px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-fangxing-core-settings > header > div::before {
        animation: none;
    }

    .home-fangxing-core-canvas {
        transition-duration: 1ms;
    }
}

/* Mobile navigation and core controls use fixed, touch-safe tracks. */
@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-navigation {
        width: min(76vw, 288px);
        padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
    }

    .home-nav-glow-frame,
    .home-nav-brand {
        min-height: 54px;
    }

    .home-nav-brand {
        padding: 7px 8px;
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .home-nav-mark {
        width: 38px;
        height: 38px;
        font-size: 19px;
    }

    .home-nav-brand strong {
        font-size: 15px;
    }

    .home-nav-brand small {
        margin-top: 2px;
        font-size: 8px;
    }

    .home-nav-close {
        width: 36px;
        height: 36px;
    }

    .home-nav-tabs {
        margin-top: 7px;
        display: grid;
    }

    .home-nav-tabs span {
        padding-block: 4px;
        font-size: 10px;
    }

    .home-nav-search {
        min-height: 40px;
        margin-top: 7px;
        padding-inline: 9px;
        display: flex;
    }

    .home-nav-search input {
        font-size: 13px;
    }

    .home-nav-section {
        margin-top: 7px;
    }

    .home-nav-section-label {
        display: block;
        padding: 0 5px 3px;
        font-size: 8px;
    }

    .home-nav-list {
        display: block;
        gap: 0;
        padding: 2px 0;
        overflow: hidden;
    }

    .home-nav-ink {
        display: block;
        width: 2px;
        height: 44px;
    }

    .home-nav-item {
        min-width: 0;
        min-height: 44px;
        padding: 5px 7px 5px 10px;
        grid-template-columns: 19px minmax(0, 1fr);
        gap: 8px;
        border-bottom: 0;
        border-radius: 5px;
        background: transparent;
    }

    .home-nav-item:hover,
    .home-nav-item.is-active {
        background: rgba(67, 214, 232, 0.065);
    }

    .home-nav-item svg {
        width: 18px;
        height: 18px;
    }

    .home-nav-item strong {
        font-size: 12px;
    }

    .home-nav-item small {
        margin-top: 1px;
        display: block;
        font-size: 7px;
    }

    .home-nav-admin-label {
        margin-top: 2px;
        padding: 4px 5px 3px;
        display: block;
        font-size: 7px;
    }

    .home-nav-footer {
        margin-top: 5px;
        padding-top: 6px;
    }

    .home-user-block {
        min-height: 38px;
        padding: 3px 5px;
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 7px;
    }

    .home-user-orbit {
        width: 28px;
        height: 28px;
    }

    .home-user-status {
        display: inline-flex;
        padding-inline: 4px;
        font-size: 6px;
    }

    .home-nav-footer-actions {
        margin-top: 4px;
    }

    .home-shell .home-nav-footer-actions .theme-toggle,
    .home-nav-logout {
        min-height: 44px;
        padding-inline: 7px;
        font-size: 10px;
    }

    .home-fangxing-core-choice {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .home-fangxing-core-choice-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-fangxing-core-choice-actions button {
        width: 100%;
        min-width: 0;
        padding-inline: 8px;
    }

    .home-fangxing-core-exit,
    .home-fangxing-core-edit {
        bottom: max(18px, env(safe-area-inset-bottom));
        width: calc(50% - 20px);
        min-width: 0;
        max-width: 168px;
        min-height: 48px;
        padding-inline: 10px;
        white-space: nowrap;
    }

    .home-fangxing-core-exit {
        left: 14px;
        transform: translate3d(0, 8px, 0);
    }

    .home-fangxing-core.is-stable .home-fangxing-core-exit {
        transform: translate3d(0, 0, 0);
    }

    .home-fangxing-core-edit {
        right: 14px;
        justify-content: center;
    }
}

@media (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-navigation {
        padding-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
    }

    .home-nav-glow-frame,
    .home-nav-brand {
        min-height: 48px;
    }

    .home-nav-brand {
        padding-block: 4px;
    }

    .home-nav-mark {
        width: 36px;
        height: 36px;
    }

    .home-nav-section {
        margin-top: 6px;
    }

    .home-nav-section > .home-nav-section-label,
    .home-user-block {
        display: none;
    }

    .home-nav-list {
        gap: 0;
    }

    .home-nav-item {
        min-height: 44px;
    }

    .home-nav-admin-label {
        display: block;
    }

    .home-nav-footer {
        margin-top: 5px;
        padding-top: 5px;
    }

    .home-nav-footer-actions {
        margin-top: 0;
    }
}

@media (max-width: 720px) and (max-height: 620px) and (orientation: portrait) {
    .home-navigation {
        padding-block: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-bottom));
    }

    .home-nav-glow-frame,
    .home-nav-brand {
        min-height: 48px;
    }

    .home-nav-brand {
        padding-block: 4px;
    }

    .home-nav-mark {
        width: 34px;
        height: 34px;
    }

    .home-nav-tabs {
        margin-top: 5px;
    }

    .home-nav-tabs span {
        padding-block: 3px;
    }

    .home-nav-search {
        min-height: 36px;
        margin-top: 5px;
    }

    .home-nav-section {
        margin-top: 5px;
    }

    .home-nav-footer {
        margin-top: 3px;
        padding-top: 3px;
    }

    .home-nav-footer-actions {
        margin-top: 0;
    }
}

/* Mobile galaxy tools use progressive disclosure and stay clear of the star field. */
@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-galaxy-explorer {
        right: 10px;
        bottom: max(4px, env(safe-area-inset-bottom));
        left: auto;
        width: min(220px, calc(100% - 20px));
        padding: 0;
        overflow: hidden;
        transition:
            opacity 220ms var(--motion-standard),
            transform 220ms var(--motion-standard);
    }

    .home-galaxy-explorer.is-expanded {
        right: 10px;
        left: 10px;
        width: auto;
    }

    .home-galaxy-explorer header {
        min-height: 38px;
        padding: 0;
        border-bottom: 0;
    }

    .home-galaxy-explorer-toggle {
        min-height: 38px;
        padding: 0 9px 0 10px;
        cursor: pointer;
        touch-action: manipulation;
    }

    .home-galaxy-explorer-toggle > span:first-child {
        font-size: 10px;
    }

    .home-galaxy-explorer-toggle-meta svg {
        display: block;
    }

    .home-galaxy-explorer.is-expanded .home-galaxy-explorer-toggle-meta svg {
        transform: rotate(180deg);
    }

    .home-galaxy-explorer-body {
        max-height: 108px;
        padding: 0 10px 6px;
        opacity: 1;
        transform: translate3d(0, 0, 0);
        transition:
            max-height 180ms cubic-bezier(0.16, 1, 0.3, 1),
            padding 180ms cubic-bezier(0.16, 1, 0.3, 1),
            opacity 140ms ease-out,
            transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .home-galaxy-explorer:not(.is-expanded) .home-galaxy-explorer-body {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        pointer-events: none;
        transform: translate3d(0, 5px, 0);
    }

    .home-galaxy-explorer-control {
        margin-top: 5px;
        gap: 4px 10px;
    }

    .home-galaxy-explorer-control > span,
    .home-galaxy-explorer-control > output {
        font-size: 8px;
    }

    .home-galaxy-explorer-control input[type="range"] {
        height: 16px;
    }

    .home-galaxy-return {
        bottom: calc(52px + env(safe-area-inset-bottom));
    }

    .home-empty-stage:has(.home-galaxy-explorer.is-expanded) .home-galaxy-return {
        bottom: calc(140px + env(safe-area-inset-bottom));
    }

    .home-empty-stage:has(.home-fangxing-core-choice.is-visible) .home-galaxy-explorer {
        opacity: 0;
        pointer-events: none;
        transform: translate3d(0, 8px, 0);
    }

    .home-fangxing-core-choice {
        right: 10px;
        bottom: max(4px, env(safe-area-inset-bottom));
        left: 10px;
        width: auto;
        min-height: 0;
        padding: 7px 8px 7px 10px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .home-fangxing-core-choice-copy {
        gap: 2px;
    }

    .home-fangxing-core-choice-copy > span,
    .home-fangxing-core-choice-copy small {
        font-size: 7px;
    }

    .home-fangxing-core-choice-copy strong {
        font-size: 11px;
    }

    .home-fangxing-core-choice-actions {
        gap: 4px;
    }

    .home-fangxing-core-choice-actions button {
        min-width: 0;
        min-height: 36px;
        padding-inline: 8px;
        gap: 4px;
        font-size: 9px;
    }

    .home-fangxing-core-choice-actions svg {
        width: 13px;
        height: 13px;
    }

    .home-empty-stage:has(.home-fangxing-core-choice.is-visible) .home-galaxy-philosophy {
        bottom: calc(86px + env(safe-area-inset-bottom));
        width: calc(100% - 24px);
    }

    .home-empty-stage:has(.home-fangxing-core-choice.is-visible) .home-galaxy-philosophy blockquote {
        font-size: 12px;
        line-height: 1.48;
    }
}

/* The portrait core editor exposes both profile controls without inner scrolling. */
@media (max-width: 720px) and (orientation: portrait) {
    .home-fangxing-core-settings {
        right: 10px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 10px;
        width: min(calc(100vw - 20px), 420px);
        height: auto;
        max-height: none;
        overflow: hidden;
    }

    .home-fangxing-core-settings > header {
        position: relative;
        min-height: 46px;
        padding: 3px 7px 3px 10px;
    }

    .home-fangxing-core-settings::after {
        display: none;
    }

    .home-fangxing-core-settings > header > div {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 1px 7px;
    }

    .home-fangxing-core-settings > header > div::before {
        width: 15px;
        height: 15px;
    }

    .home-fangxing-core-settings > header span {
        font-size: 7px;
    }

    .home-fangxing-core-settings > header strong {
        font-size: 12px;
    }

    .home-fangxing-core-settings-close {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .home-fangxing-core-form,
    .home-fangxing-core-form:first-of-type {
        padding: 7px 9px 8px;
        gap: 5px 8px;
    }

    .home-fangxing-core-form label {
        gap: 4px 7px;
    }

    .home-fangxing-core-form label > span {
        font-size: 9px;
    }

    .home-fangxing-core-form label > span::before {
        width: 4px;
        height: 4px;
        margin-right: 5px;
    }

    .home-fangxing-core-form label > output {
        font-size: 7px;
    }

    .home-fangxing-core-form textarea,
    .home-fangxing-core-form input {
        min-height: 38px;
        padding: 6px 8px;
        font-size: 13px;
        line-height: 1.35;
    }

    .home-fangxing-core-form textarea {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }

    .home-fangxing-core-save {
        min-width: 102px;
        min-height: 40px;
        padding-inline: 10px;
        font-size: 9px;
    }

    .home-fangxing-core-save i {
        width: 18px;
        height: 18px;
    }

    .home-fangxing-core-form-status {
        min-height: 12px;
        max-height: 28px;
        overflow: hidden;
        font-size: 8px;
        line-height: 1.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-galaxy-explorer,
    .home-galaxy-explorer-body,
    .home-galaxy-explorer-toggle-meta svg {
        transition-duration: 1ms;
    }
}

@media (max-width: 720px) and (orientation: portrait) {
    .home-fangxing-core-settings {
        max-height: calc(100% - 88px);
        padding: 8px;
    }

    .home-fangxing-core-settings > header {
        padding-bottom: 6px;
    }

    .home-fangxing-core-form,
    .home-fangxing-core-form:first-of-type {
        margin-top: 6px;
        padding-top: 6px;
        gap: 4px;
    }

    .home-fangxing-space-settings-form {
        gap: 3px;
    }

    .home-fangxing-space-settings-form .home-fangxing-core-save {
        min-height: 34px;
    }

}

/* Keep the expanded home menu usable: the channel list scrolls, footer actions stay visible. */
.home-navigation {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.home-navigation > .home-nav-glow-frame,
.home-navigation > .home-nav-tabs,
.home-navigation > .home-nav-search,
.home-navigation > .home-nav-footer {
    flex: 0 0 auto;
}

.home-navigation > .home-nav-section {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.home-navigation .home-nav-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.home-navigation .home-nav-footer {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    margin-top: 8px;
    padding-top: 9px;
    padding-bottom: max(2px, env(safe-area-inset-bottom));
}

@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-navigation {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .home-navigation .home-nav-list {
        display: block;
        overflow-y: auto;
    }

    .home-navigation .home-nav-footer {
        margin-top: 5px;
        padding-top: 6px;
    }
}

@media (max-width: 720px) and (max-height: 620px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-user-block {
        min-height: 34px;
        padding: 2px 5px;
    }

    .home-user-orbit {
        width: 26px;
        height: 26px;
    }

    .home-nav-footer-actions {
        margin-top: 3px;
    }

    .home-shell .home-nav-footer-actions .theme-toggle,
    .home-nav-logout {
        min-height: 40px;
    }
}

/* ---- FANGJING STATS ---- */
.home-fangjing-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.fj-stat-item {
    min-height: 68px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--fj-home-line);
    border-radius: 8px;
    background: var(--fj-home-surface);
}

.fj-stat-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--fj-home-green);
    background: color-mix(in srgb, var(--fj-home-green) 14%, transparent);
    font-size: 16px;
    flex-shrink: 0;
}

html[data-theme="dark"] .fj-stat-icon {
    background: color-mix(in srgb, var(--fj-home-green) 22%, transparent);
    color: var(--fj-home-green-bright);
}

.fj-stat-value {
    display: block;
    color: var(--fj-home-text);
    font-size: 24px;
    line-height: 1.1;
}

.fj-stat-item small {
    display: block;
    color: var(--fj-home-muted);
    font-size: 11px;
    margin-top: 2px;
}

.home-fangjing-motto {
    margin: -4px 0 0;
    color: var(--fj-home-gold);
    font-size: 13px;
    font-weight: 760;
    text-align: center;
}

/* ---- AUTO MODE NOTICE ---- */
.fj-auto-notice {
    min-height: 42px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--fj-home-green) 28%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--fj-home-green) 8%, var(--fj-home-surface));
    color: var(--fj-home-muted);
    font-size: 12px;
}

.fj-auto-badge {
    min-width: 56px;
    padding: 3px 8px;
    text-align: center;
    border-radius: 99px;
    color: #06110b;
    background: var(--fj-home-green);
    font-size: 10px;
    font-weight: 820;
    letter-spacing: 0.04em;
}

html[data-theme="dark"] .fj-auto-badge {
    color: #020705;
    background: var(--fj-home-green-bright);
}

/* ---- CRYSTAL BOX ---- */
.home-fangjing-crystal-box {
    display: grid;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.fj-cbox-item {
    min-height: 38px;
    padding: 7px 10px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    border: 1px solid var(--fj-home-line);
    border-radius: 6px;
    background: var(--fj-home-surface-strong);
}

.fj-cbox-item span {
    color: var(--fj-home-gold);
    font-size: 12px;
}

.fj-cbox-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--fj-home-text);
    font-size: 12px;
}

.fj-cbox-item small {
    color: var(--fj-home-muted);
    font-size: 10px;
    flex-shrink: 0;
}

/* ---- POOL BUTTON ---- */
.home-fangjing-pool-btn {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--fj-home-green) 38%, transparent);
    border-radius: 8px;
    color: var(--fj-home-text);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--fj-home-green) 16%, transparent),
        color-mix(in srgb, var(--fj-home-gold) 10%, transparent),
        var(--fj-home-surface-strong));
    font-size: 15px;
    font-weight: 820;
    cursor: pointer;
    transition: transform 180ms var(--motion-standard), box-shadow 180ms var(--motion-standard);
}

.home-fangjing-pool-btn svg {
    width: 22px;
    height: 22px;
    color: var(--fj-home-gold);
}

.home-fangjing-pool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--fj-home-green) 28%, transparent);
}

html[data-theme="dark"] .home-fangjing-pool-btn {
    box-shadow: 0 4px 16px rgba(60, 255, 140, 0.08);
}

html[data-theme="dark"] .home-fangjing-pool-btn:hover {
    box-shadow: 0 10px 32px rgba(70, 255, 145, 0.22);
}

/* ---- POOL OVERLAY ---- */
.home-fangjing-pool-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    flex-direction: column;
    background: var(--fj-bg);
}

.home-fangjing-pool-overlay.is-open {
    display: flex;
}

.fj-pool-header {
    position: relative;
    z-index: 1102;
    min-height: 72px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    border-bottom: 1px solid var(--fj-home-line);
    background: color-mix(in srgb, var(--fj-home-surface) 88%, transparent);
    backdrop-filter: blur(12px);
}

.fj-pool-header strong {
    color: var(--fj-home-text);
    font-size: 26px;
}

.fj-pool-header small {
    color: var(--fj-home-muted);
    font-size: 13px;
    margin-left: auto;
}

.fj-pool-close {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--fj-home-line);
    border-radius: 6px;
    color: var(--fj-home-text);
    background: var(--fj-home-surface-strong);
    font-size: 13px;
    font-weight: 760;
    cursor: pointer;
}

.fj-pool-canvas {
    flex: 1;
    display: block;
    width: 100%;
}

.fj-pool-loading {
    position: absolute;
    inset: 0;
    z-index: 1101;
    display: none;
    place-items: center;
    color: var(--fj-home-green);
    background: var(--fj-bg);
    font-size: 16px;
    font-weight: 760;
}

.fj-pool-loading.is-active {
    display: grid;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
    .home-fangjing-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .fj-pool-header {
        padding: 12px 14px;
    }
    .fj-pool-header strong {
        font-size: 20px;
    }
}

/* ---- XULAI STAR RIVER ---- */
.xulai-stage-panel {
    position: relative;
    height: min(760px, calc(100dvh - 112px));
    min-height: 620px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    color: #e8f5ff;
    background: transparent;
    box-shadow: none;
}

.xulai-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    isolation: isolate;
}

.xulai-cosmos,
.xulai-cosmos-canvas,
.xulai-cosmos-vignette {
    position: absolute;
    inset: 0;
}

.xulai-cosmos {
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 48%, rgba(13, 74, 151, 0.36), transparent 38%),
        radial-gradient(circle at 18% 72%, rgba(0, 130, 255, 0.09), transparent 29%),
        radial-gradient(circle at 84% 18%, rgba(45, 211, 255, 0.07), transparent 24%),
        #020916;
}

.xulai-cosmos-canvas {
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    contain: strict;
}

.xulai-cosmos-vignette {
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 48%, transparent 24%, rgba(1, 7, 18, 0.16) 64%, rgba(0, 3, 10, 0.86) 100%),
        linear-gradient(180deg, rgba(2, 7, 18, 0.46), transparent 25%, transparent 73%, rgba(1, 5, 14, 0.82));
}

.xulai-poem-field {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
    perspective: 900px;
    opacity: 1;
    transform-style: preserve-3d;
}

.xulai-poem {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    max-width: none;
    max-height: 34ch;
    color: rgba(190, 232, 255, var(--close-alpha, 0.72));
    font-family: "KaiTi", "STKaiti", "SimKai", "楷体", serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    writing-mode: vertical-rl;
    text-orientation: upright;
    white-space: nowrap;
    opacity: 0;
    transform: translate3d(var(--close-x, 0px), var(--close-y, 0px), var(--intro-z, -640px))
        rotate(var(--close-r, 0deg)) scale(var(--close-scale, 1));
    transform-origin: top center;
    transition: transform 2300ms cubic-bezier(0.18, 0.72, 0.2, 1),
        opacity 1500ms ease;
    transition-delay: var(--intro-delay, 0ms);
}

.xulai-poem-distant {
    transform: translate3d(var(--close-x, 0px), var(--close-y, 0px), 0)
        rotate(var(--close-r, 0deg)) scale(var(--close-scale, 1));
    transition-property: opacity;
    transition-duration: 1300ms;
}

.xulai-stage.is-intro-open .xulai-poem {
    opacity: var(--close-alpha, 0.72);
    transform: translate3d(var(--close-x, 0px), var(--close-y, 0px), 0)
        rotate(var(--close-r, 0deg)) scale(var(--close-scale, 1));
}

.xulai-poem-character {
    display: inline-block;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center;
}

.xulai-stage.is-poem-flying .xulai-poem-flight-source .xulai-poem-character {
    animation: xulai-poem-character-release 460ms cubic-bezier(0.2, 0.72, 0.25, 1) forwards;
    animation-delay: var(--peel-delay, 0ms);
}

.xulai-stage.is-poem-flying .xulai-poem-distant,
.xulai-stage.is-poem-flying .xulai-poem-character-source:not(.xulai-poem-flight-source) {
    animation: xulai-poem-distant-release 900ms ease forwards;
    animation-delay: var(--line-release-delay, 420ms);
}

@keyframes xulai-poem-character-release {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    38% {
        opacity: 0.88;
        transform: translate3d(var(--peel-mid-x, 0px), var(--peel-mid-y, 0px), 0) scale(1.08);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--peel-x, 0px), var(--peel-y, 0px), 0) scale(0.72);
    }
}

@keyframes xulai-poem-distant-release {
    from {
        opacity: var(--close-alpha, 0.72);
    }
    to {
        opacity: 0;
    }
}

.xulai-splash {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #f4fbff;
    background:
        radial-gradient(circle at 50% 46%, rgba(24, 119, 224, 0.28), transparent 34%),
        radial-gradient(circle at 50% 50%, rgba(32, 184, 255, 0.1), transparent 58%),
        #020916;
    pointer-events: none;
    transition: opacity 2200ms cubic-bezier(0.45, 0, 0.55, 1);
}

.xulai-splash.is-leaving {
    visibility: hidden;
    opacity: 0;
    transition: opacity 2200ms cubic-bezier(0.45, 0, 0.55, 1), visibility 0s linear 2200ms;
}

.xulai-splash.is-resetting {
    visibility: visible;
    opacity: 1;
    transition: none !important;
}

.xulai-splash.is-resetting .xulai-splash-phrases strong,
.xulai-splash.is-resetting .xulai-splash-phrases > span {
    opacity: 1;
    transform: none;
    transition: none !important;
}

.xulai-splash-phrases {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    white-space: nowrap;
}

.xulai-splash-phrases strong {
    display: block;
    color: #f4fbff;
    font-size: 52px;
    font-weight: 820;
    line-height: 1.1;
    letter-spacing: 0;
    text-shadow: 0 0 16px rgba(64, 187, 255, 0.7), 0 0 46px rgba(22, 119, 255, 0.36);
    transition: transform 2200ms cubic-bezier(0.45, 0, 0.55, 1), opacity 2100ms ease;
}

.xulai-splash-phrases > span {
    color: rgba(125, 218, 255, 0.82);
    font-family: "Fangcun Space Grotesk", ui-monospace, monospace;
    font-size: 20px;
    transition: opacity 700ms ease;
}

.xulai-splash.is-leaving [data-xulai-splash-left] {
    transform: translate3d(-58vw, 0, 0);
    opacity: 0;
}

.xulai-splash.is-leaving [data-xulai-splash-right] {
    transform: translate3d(58vw, 0, 0);
    opacity: 0;
}

.xulai-splash.is-leaving .xulai-splash-phrases > span {
    opacity: 0;
}

.xulai-sigil {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: 500px;
    height: 500px;
    display: grid;
    place-items: center;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.xulai-sigil-halo {
    position: absolute;
    width: 76%;
    height: 76%;
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle, rgba(45, 167, 255, 0.2), rgba(26, 116, 255, 0.08) 42%, transparent 72%);
    filter: blur(10px);
    transform: scale(0.72);
    transition: opacity 900ms var(--motion-decelerate), transform 1100ms var(--motion-decelerate);
}

.xulai-sigil-character {
    position: relative;
    color: rgba(172, 229, 255, 0.025);
    font-family: "KaiTi", "STKaiti", "SimKai", "楷体", serif;
    font-size: 438px;
    font-weight: 400;
    font-style: normal;
    font-synthesis: none;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 0 22px rgba(59, 190, 255, 0.24), 0 0 70px rgba(25, 112, 255, 0.24);
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 1000ms var(--motion-decelerate), transform 1200ms var(--motion-decelerate), text-shadow 1000ms var(--motion-decelerate);
}

.xulai-stage.is-assembled .xulai-sigil-halo {
    opacity: 1;
    transform: scale(1);
}

.xulai-stage.is-assembled .xulai-sigil-character {
    color: rgba(180, 232, 255, 0.13);
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 24px rgba(60, 205, 255, 0.55), 0 0 76px rgba(26, 116, 255, 0.52);
    background-image:
        linear-gradient(160deg, rgba(224, 250, 255, 0.92) 0%, rgba(75, 190, 255, 0.82) 48%, rgba(23, 107, 201, 0.88) 100%);
    background-size: 100% 180%;
    background-position: 50% 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(180, 238, 255, 0.18);
    animation: xulai-sigil-surface 8s ease-in-out infinite;
}

@keyframes xulai-sigil-surface {
    0%, 100% {
        background-position: 50% 0;
    }
    50% {
        background-position: 50% 100%;
    }
}

@media (max-width: 760px) {
    .xulai-stage-panel {
        height: calc(100dvh - 96px);
        min-height: 560px;
    }

    .xulai-splash-phrases {
        gap: 12px;
    }

    .xulai-splash-phrases strong {
        font-size: 34px;
    }

    .xulai-splash-phrases > span {
        font-size: 15px;
    }

    .xulai-poem {
        font-size: 16px;
    }

    .xulai-sigil {
        width: 390px;
        height: 390px;
    }

    .xulai-sigil-character {
        font-size: 320px;
    }

}

@media (max-width: 520px) {
    .xulai-stage-panel {
        height: calc(100dvh - 72px);
        min-height: 520px;
        border-radius: 0;
    }

    .xulai-splash-phrases {
        gap: 8px;
    }

    .xulai-splash-phrases strong {
        font-size: 25px;
    }

    .xulai-splash-phrases > span {
        font-size: 12px;
    }

    .xulai-poem {
        font-size: 14px;
    }

    .xulai-sigil {
        width: 290px;
        height: 290px;
    }

    .xulai-sigil-character {
        font-size: 232px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .xulai-splash-phrases strong,
    .xulai-sigil-halo,
    .xulai-sigil-character,
    .xulai-splash {
        transition-duration: 1ms;
    }

    .xulai-poem {
        transition-duration: 1ms;
    }

    .xulai-stage.is-reduced-motion .xulai-poem {
        animation: none;
        opacity: 0;
    }

    .xulai-stage.is-reduced-motion .xulai-sigil-character {
        animation: none;
    }
}

html[data-theme="light"] .xulai-stage-panel {
    color: #163d58;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

html[data-theme="light"] .xulai-cosmos {
    background:
        radial-gradient(circle at 50% 48%, rgba(74, 167, 218, 0.2), transparent 38%),
        radial-gradient(circle at 18% 72%, rgba(20, 137, 201, 0.08), transparent 29%),
        radial-gradient(circle at 84% 18%, rgba(44, 170, 213, 0.1), transparent 24%),
        #edf5f9;
}

html[data-theme="light"] .xulai-cosmos-vignette {
    background:
        radial-gradient(circle at 50% 48%, transparent 24%, rgba(226, 240, 247, 0.08) 64%, rgba(206, 226, 237, 0.58) 100%),
        linear-gradient(180deg, rgba(239, 248, 252, 0.32), transparent 25%, transparent 73%, rgba(203, 225, 237, 0.48));
}

html[data-theme="light"] .xulai-poem {
    color: rgba(20, 76, 111, var(--close-alpha, 0.72));
}

html[data-theme="light"] .xulai-splash {
    color: #123a58;
    background:
        radial-gradient(circle at 50% 46%, rgba(62, 166, 220, 0.2), transparent 34%),
        radial-gradient(circle at 50% 50%, rgba(84, 198, 231, 0.12), transparent 58%),
        #eef7fb;
}

html[data-theme="light"] .xulai-splash-phrases strong {
    color: #123a58;
    text-shadow: 0 1px 12px rgba(44, 145, 194, 0.24), 0 0 32px rgba(42, 139, 194, 0.16);
}

html[data-theme="light"] .xulai-splash-phrases > span {
    color: rgba(30, 113, 157, 0.72);
}

html[data-theme="light"] .xulai-sigil-halo {
    background: radial-gradient(circle, rgba(51, 157, 211, 0.22), rgba(47, 133, 194, 0.08) 42%, transparent 72%);
    filter: blur(4px);
}

html[data-theme="light"] .xulai-sigil-character {
    color: rgba(15, 91, 139, 0.08);
    text-shadow: 0 0 6px rgba(35, 132, 182, 0.16);
}

html[data-theme="light"] .xulai-stage.is-assembled .xulai-sigil-character {
    color: rgba(10, 82, 132, 0.62);
    text-shadow: 0 0 7px rgba(35, 145, 201, 0.2);
    background-image:
        linear-gradient(160deg, #0b557f 0%, #2a91bc 48%, #084879 100%);
    -webkit-text-stroke: 1px rgba(7, 65, 105, 0.22);
}

html[data-theme="light"] .xulai-stage.is-assembled .xulai-sigil-halo {
    background: radial-gradient(circle, rgba(57, 165, 216, 0.26), rgba(45, 126, 184, 0.08) 42%, transparent 72%);
}

/* The home shell uses the same stage as the dedicated 徐莱 route. */
.home-shell[data-home-view="xulai-ai"] .home-service-panel-xulai {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-width: none;
    padding: 0;
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.home-shell[data-home-view="xulai-ai"] .home-service-panel-xulai > .xulai-stage-panel {
    height: 100%;
    min-height: 0;
}

@media (max-width: 760px) {
    .home-shell[data-home-view="xulai-ai"] .home-service-panel-xulai {
        width: 100%;
        height: 100%;
        min-height: 100%;
    }
}

.home-progress-notice {
    position: absolute;
    top: max(22px, env(safe-area-inset-top));
    right: max(24px, env(safe-area-inset-right));
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 0 7px 12px;
    border-left: 2px solid rgba(79, 200, 244, 0.72);
    color: rgba(218, 244, 255, 0.9);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: 0;
    text-shadow: 0 0 18px rgba(49, 174, 228, 0.5);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -5px, 0);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.home-progress-notice > i {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #55cef3;
    box-shadow: 0 0 10px rgba(85, 206, 243, 0.78);
}

.home-shell[data-home-view="fangcun-import"] .home-progress-notice[data-home-progress-view="fangcun-import"],
.home-shell[data-home-view="xulai-ai"] .home-progress-notice[data-home-progress-view="xulai-ai"],
.home-shell[data-home-view="fangxing-nebula"] .home-progress-notice[data-home-progress-view="fangxing-nebula"],
.home-shell[data-home-view="watcher"] .home-progress-notice[data-home-progress-view="watcher"],
.home-shell[data-home-view="settings"] .home-progress-notice[data-home-progress-view="settings"] {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
}

html[data-theme="light"] .home-progress-notice {
    border-left-color: rgba(14, 116, 174, 0.58);
    color: #155f8d;
    text-shadow: 0 0 16px rgba(49, 151, 202, 0.18);
}

html[data-theme="light"] .home-progress-notice > i {
    background: #0e7eb6;
    box-shadow: 0 0 9px rgba(14, 126, 182, 0.34);
}

@media (max-width: 720px),
    (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
    .home-progress-notice {
        top: calc(74px + env(safe-area-inset-top));
        right: max(14px, env(safe-area-inset-right));
        font-size: 11px;
    }
}
