:root {
    color-scheme: dark;
    --bg-primary: #080b14;
    --bg-secondary: #111624;
    --bg-card: rgba(20, 27, 43, 0.72);
    --surface-1: rgba(17, 22, 36, 0.82);
    --surface-2: rgba(25, 32, 50, 0.86);
    --surface-3: rgba(33, 42, 63, 0.92);
    --surface-soft: rgba(255, 255, 255, 0.045);
    --text-primary: #f6f2e9;
    --text-secondary: #c2c5d2;
    --text-muted: #858b9f;
    --text-dark: #10141f;
    --accent: #dfad76;
    --accent-strong: #f0c590;
    --accent-soft: rgba(223, 173, 118, 0.14);
    --aurora: #6cc5b3;
    --aurora-soft: rgba(108, 197, 179, 0.14);
    --violet: #a391d4;
    --danger: #e27373;
    --success: #67bd91;
    --warning: #e4b96d;
    --gold: var(--accent);
    --gold-dark: #bd8253;
    --gold-glow: rgba(223, 173, 118, 0.24);
    --border-gold: rgba(223, 173, 118, 0.17);
    --line: rgba(255, 255, 255, 0.085);
    --line-strong: rgba(255, 255, 255, 0.14);
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;
    --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.28);
    --shadow-glow: 0 20px 70px rgba(108, 197, 179, 0.11);
    --transition: 220ms cubic-bezier(.2, .75, .25, 1);
    --sidebar-width: 276px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg-primary);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% -10%, rgba(108, 197, 179, 0.12), transparent 34rem),
        radial-gradient(circle at 90% 18%, rgba(163, 145, 212, 0.1), transparent 32rem),
        linear-gradient(150deg, #080b14 0%, #0c101b 48%, #090d17 100%);
    color: var(--text-primary);
    font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

body.app-loading .app-shell {
    visibility: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a,
[onclick] {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--aurora);
    outline-offset: 3px;
}

::selection {
    color: var(--text-dark);
    background: var(--accent-strong);
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 20px;
    background: rgba(194, 197, 210, 0.28);
    background-clip: padding-box;
}

.ambient-orb {
    position: fixed;
    z-index: -1;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    pointer-events: none;
}

.ambient-orb--one {
    top: 12%;
    right: -12rem;
    background: var(--violet);
}

.ambient-orb--two {
    bottom: -14rem;
    left: 22%;
    background: var(--aurora);
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1200;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 28px 20px 22px;
    border-right: 1px solid var(--line);
    background: rgba(8, 11, 20, 0.8);
    backdrop-filter: blur(28px) saturate(130%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 10px;
    border: 0;
    color: var(--text-primary);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(223, 173, 118, 0.36);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(223, 173, 118, 0.18), rgba(108, 197, 179, 0.08));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.brand-mark::before,
.brand-mark::after {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-strong);
    content: '';
    box-shadow: 0 0 12px var(--accent);
}

.brand-mark::before {
    transform: translate(-6px, 4px);
}

.brand-mark::after {
    transform: translate(7px, -5px);
}

.brand-orbit {
    width: 19px;
    height: 12px;
    transform: rotate(-28deg);
    border: 1px solid var(--aurora);
    border-radius: 50%;
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-tagline {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sidebar-context {
    margin: 34px 10px 12px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.navbar-links {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
}

.nav-link {
    position: relative;
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    text-align: left;
    transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.nav-link:hover {
    transform: translateX(2px);
    border-color: var(--line);
    color: var(--text-primary);
    background: var(--surface-soft);
}

.nav-link.active {
    border-color: rgba(108, 197, 179, 0.2);
    color: #e9fff9;
    background: linear-gradient(110deg, rgba(108, 197, 179, 0.17), rgba(108, 197, 179, 0.06));
    box-shadow: inset 3px 0 var(--aurora);
}

.nav-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: currentColor;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.sidebar-footer {
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.path-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(223, 173, 118, 0.09), rgba(163, 145, 212, 0.05));
}

.path-card__label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.path-card__value {
    margin-top: 5px;
    font-size: 13px;
    font-weight: 700;
}

.logout-link {
    color: #c59090;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: 28px clamp(24px, 4vw, 68px) 70px;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    margin: -28px calc(clamp(24px, 4vw, 68px) * -1) 28px;
    padding: 12px clamp(24px, 4vw, 68px);
    border-bottom: 1px solid transparent;
    background: linear-gradient(to bottom, rgba(8, 11, 20, 0.92), rgba(8, 11, 20, 0.68), transparent);
    backdrop-filter: blur(18px);
}

.app-topbar__context {
    display: grid;
    gap: 1px;
}

.app-topbar__eyebrow {
    color: var(--aurora);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.app-topbar__title {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 650;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text-secondary);
    background: var(--surface-1);
    cursor: pointer;
    transition: var(--transition);
}

.icon-button:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    color: var(--text-primary);
}

.icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.menu-button {
    display: none;
}

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

.section {
    display: none;
    max-width: 1440px;
    margin: 0 auto;
    animation: sectionReveal 420ms cubic-bezier(.18, .8, .24, 1) both;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 26px;
}

.section-heading {
    display: grid;
    gap: 7px;
}

.section-kicker {
    color: var(--aurora);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-title,
.section-heading h1 {
    margin: 0;
    color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.12;
}

.section-description {
    max-width: 680px;
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.section-actions,
.btn-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.card,
.profile-card,
.collection-group,
.memory-card,
.album-card,
.being-card,
.artifact-card,
.stat-card {
    border: 1px solid var(--line) !important;
    background: linear-gradient(145deg, rgba(25, 32, 50, 0.76), rgba(14, 19, 31, 0.82)) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.17);
    backdrop-filter: blur(18px);
}

.card,
.profile-card {
    border-radius: var(--radius-lg) !important;
}

.memory-card,
.album-card,
.being-card,
.artifact-card,
.stat-card {
    border-radius: var(--radius-md) !important;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition) !important;
}

.memory-card:hover,
.album-card:hover,
.being-card:hover,
.artifact-card:hover,
.stat-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(108, 197, 179, 0.25) !important;
    box-shadow: var(--shadow-glow) !important;
}

.btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-2px) !important;
}

.btn:active {
    transform: translateY(0) scale(0.98) !important;
}

.btn-primary {
    color: #0b1917;
    background: linear-gradient(135deg, #78d2bf, #56ae9c);
    box-shadow: 0 10px 28px rgba(108, 197, 179, 0.16);
}

.btn-primary:hover {
    box-shadow: 0 14px 34px rgba(108, 197, 179, 0.25);
}

.btn-secondary {
    border-color: var(--line);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.045);
}

.btn-secondary:hover {
    border-color: var(--line-strong);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.075);
}

.btn-success {
    color: #182018;
    background: linear-gradient(135deg, #e8c18f, #cc945e);
}

.btn-danger {
    border-color: rgba(226, 115, 115, 0.24);
    color: #f4b5b5;
    background: rgba(226, 115, 115, 0.11);
}

.btn[disabled] {
    transform: none !important;
    opacity: 0.5;
    cursor: not-allowed;
}

.type-tabs,
.type-picker,
#beingFilters,
#deviceFoldersBar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.type-tabs {
    margin-bottom: 24px;
    padding-bottom: 4px;
}

.type-tab,
.type-chip,
.filter-btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    padding: 0 14px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    color: var(--text-muted) !important;
    background: var(--surface-soft) !important;
    cursor: pointer;
    font: inherit;
    font-size: 12px !important;
    font-weight: 700;
    transition: var(--transition);
}

.type-tab:hover,
.type-chip:hover,
.filter-btn:hover,
.type-tab.active,
.type-chip.active,
.filter-btn.active {
    transform: translateY(-2px);
    border-color: rgba(108, 197, 179, 0.25) !important;
    color: #dffff8 !important;
    background: rgba(108, 197, 179, 0.12) !important;
    box-shadow: none !important;
}

.collection-group {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: var(--radius-md) !important;
}

.collection-group .group-header {
    min-height: 58px;
    padding: 13px 18px;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.025) !important;
}

.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    padding: 14px;
}

.artifact-card {
    padding: 17px !important;
}

.artifact-name,
.card-title {
    color: var(--text-primary) !important;
}

.artifact-price,
.text-gold,
.stat-value {
    color: var(--accent-strong) !important;
}

.chip,
.badge-rpg,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid var(--line) !important;
    border-radius: 999px;
    color: var(--text-secondary) !important;
    background: var(--surface-soft) !important;
    font-size: 11px;
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select,
.memory-editor,
#deviceSearchInput,
.city-modal-content input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid var(--line) !important;
    border-radius: 13px !important;
    color: var(--text-primary) !important;
    background: rgba(5, 8, 15, 0.42) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-group textarea,
.memory-editor {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.memory-editor:focus,
#deviceSearchInput:focus {
    outline: none;
    border-color: rgba(108, 197, 179, 0.52) !important;
    background: rgba(8, 13, 22, 0.72) !important;
    box-shadow: 0 0 0 4px rgba(108, 197, 179, 0.08) !important;
}

.form-group select option {
    color: var(--text-primary);
    background: #151b2a;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(3, 5, 10, 0.72);
    backdrop-filter: blur(16px);
}

.modal.active {
    display: flex;
    animation: veilReveal 180ms ease both;
}

.modal-content {
    width: min(100%, 570px);
    max-height: min(88vh, 900px);
    overflow-y: auto;
    padding: 28px !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary);
    background: linear-gradient(155deg, rgba(28, 35, 53, 0.98), rgba(12, 17, 28, 0.99)) !important;
    box-shadow: 0 38px 110px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.06);
    animation: modalReveal 300ms cubic-bezier(.2, .85, .28, 1) both !important;
}

.modal-content h2,
.modal-title {
    margin: 0 0 21px;
    color: var(--text-primary) !important;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 25px;
    font-weight: 400;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.notification {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 5000;
    display: block;
    max-width: min(390px, calc(100vw - 32px));
    padding: 14px 18px;
    transform: translateY(-14px) scale(0.97);
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    color: var(--text-primary) !important;
    background: rgba(20, 27, 43, 0.94) !important;
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(22px);
    transition: opacity var(--transition), transform var(--transition);
}

.notification.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.notification[data-type='success'] {
    border-color: rgba(103, 189, 145, 0.35);
}

.notification[data-type='error'] {
    border-color: rgba(226, 115, 115, 0.38);
}

.notification[data-type='warning'] {
    border-color: rgba(228, 185, 109, 0.38);
}

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.045);
}

.skeleton::after {
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    content: '';
    animation: skeletonSweep 1.5s infinite;
}

.skeleton-stack {
    display: grid;
    gap: 14px;
}

.skeleton-hero {
    height: 250px;
}

.skeleton-row {
    height: 84px;
}

.life-dashboard {
    display: grid;
    gap: 18px;
}

.life-hero {
    position: relative;
    display: grid;
    min-height: 330px;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 78% 28%, rgba(108, 197, 179, 0.22), transparent 16rem),
        radial-gradient(circle at 12% 90%, rgba(223, 173, 118, 0.15), transparent 23rem),
        linear-gradient(135deg, rgba(27, 34, 51, 0.97), rgba(10, 14, 24, 0.97));
    box-shadow: var(--shadow-card);
}

.life-hero::after {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: radial-gradient(rgba(255, 255, 255, 0.26) 0.7px, transparent 0.7px);
    background-size: 21px 21px;
    content: '';
    pointer-events: none;
    mask-image: linear-gradient(to right, transparent, black);
}

.life-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vw, 58px);
}

.life-hero__eyebrow {
    margin-bottom: 14px;
    color: var(--aurora);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.life-hero h1 {
    max-width: 680px;
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(35px, 5vw, 64px);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.life-hero__subtitle {
    max-width: 620px;
    margin: 17px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.life-hero__actions {
    display: flex;
    gap: 9px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.life-orbit {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 300px;
    place-items: center;
}

.life-orbit__ring {
    position: absolute;
    width: min(28vw, 270px);
    aspect-ratio: 1;
    border: 1px solid rgba(108, 197, 179, 0.24);
    border-radius: 50%;
    animation: orbitSpin 24s linear infinite;
}

.life-orbit__ring::before,
.life-orbit__ring::after {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    content: '';
    box-shadow: 0 0 22px currentColor;
}

.life-orbit__ring::before {
    top: 14%;
    left: 10%;
    color: var(--accent);
    background: currentColor;
}

.life-orbit__ring::after {
    right: 3%;
    bottom: 27%;
    color: var(--violet);
    background: currentColor;
}

.life-orbit__core {
    position: relative;
    display: grid;
    width: 140px;
    height: 140px;
    place-items: center;
    border: 1px solid rgba(223, 173, 118, 0.27);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(223, 173, 118, 0.2), rgba(108, 197, 179, 0.06) 55%, transparent 56%);
    box-shadow: 0 0 80px rgba(108, 197, 179, 0.16);
}

.life-orbit__level {
    display: grid;
    gap: 2px;
    text-align: center;
}

.life-orbit__number {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 40px;
    line-height: 1;
}

.life-orbit__label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.life-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.7fr);
    gap: 18px;
}

.life-panel {
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.14);
}

.life-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.life-panel__head h2 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 400;
}

.life-panel__head p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.life-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.life-stat {
    min-height: 126px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.027);
}

.life-stat__value {
    display: block;
    margin-top: 18px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1;
}

.life-stat__label {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 11px;
}

.life-stat__signal {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aurora);
    box-shadow: 0 0 18px rgba(108, 197, 179, 0.5);
}

.path-progress {
    display: grid;
    gap: 12px;
}

.path-progress__meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.path-progress__status {
    color: var(--text-secondary);
    font-size: 13px;
}

.path-progress__count {
    color: var(--accent-strong);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
}

.xp-bar,
.path-progress__track {
    height: 8px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.xp-fill,
.path-progress__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--aurora), var(--accent));
    transition: width 1s cubic-bezier(.2, .8, .25, 1);
}

.path-next {
    margin-top: 18px;
    padding: 17px;
    border: 1px solid rgba(163, 145, 212, 0.18);
    border-radius: 17px;
    background: rgba(163, 145, 212, 0.07);
}

.path-next__label {
    color: var(--violet);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.path-next__title {
    margin-top: 6px;
    font-weight: 700;
}

.quick-paths {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.quick-path {
    min-height: 112px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 17px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.quick-path:hover {
    transform: translateY(-3px);
    border-color: rgba(223, 173, 118, 0.24);
    background: var(--accent-soft);
}

.quick-path__label {
    display: block;
    margin-top: 24px;
    font-size: 13px;
    font-weight: 750;
}

.quick-path__hint {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10px;
}

.profile-error,
.empty-state {
    display: grid;
    min-height: 240px;
    place-items: center;
    padding: 38px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    text-align: center;
}

.life-experience {
    display: grid;
    grid-template-columns: minmax(230px, 0.34fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.life-navigator,
.life-story,
.life-suggestions {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(25, 32, 50, 0.7), rgba(14, 19, 31, 0.78));
    box-shadow: var(--shadow-card);
}

.life-navigator {
    position: sticky;
    top: 96px;
    overflow: hidden;
}

.life-navigator__head,
.life-toolbar,
.life-suggestions__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.life-navigator__head h2,
.life-panel-heading h2,
.life-suggestions__head h2,
.life-moment h2,
.life-moment h3 {
    margin: 4px 0 0;
    color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
}

.life-navigator__head h2,
.life-panel-heading h2,
.life-suggestions__head h2 {
    font-size: 20px;
}

.life-periods {
    display: grid;
    max-height: 340px;
    gap: 5px;
    overflow-y: auto;
    padding: 12px;
}

.life-period {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.life-period small {
    color: var(--text-muted);
}

.life-period:hover,
.life-period.active {
    border-color: rgba(108, 197, 179, 0.22);
    color: var(--text-primary);
    background: rgba(108, 197, 179, 0.1);
}

.life-archive {
    padding: 18px;
    border-top: 1px solid var(--line);
}

.life-archive #memoriesList {
    display: grid;
    max-height: 360px;
    gap: 8px;
    overflow-y: auto;
    margin-top: 13px;
}

.life-archive .memory-card {
    padding: 12px !important;
    cursor: pointer;
}

.life-story {
    min-width: 0;
    overflow: hidden;
}

.life-toolbar {
    align-items: flex-end;
}

.life-toolbar__controls,
.life-event-form-grid {
    display: grid;
    grid-template-columns: auto minmax(110px, 1fr) auto minmax(130px, 1fr);
    align-items: center;
    gap: 8px;
}

.life-toolbar__controls label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 750;
}

.life-toolbar__controls select {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text-primary);
    background: rgba(5, 8, 15, 0.4);
}

.life-suggestions {
    margin: 16px;
    border-color: rgba(223, 173, 118, 0.2);
    box-shadow: none;
}

.life-suggestions__head {
    padding: 15px 16px;
}

.life-suggestions__head > span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #f9d8b3;
    background: var(--accent-soft);
}

.life-suggestion-list {
    display: grid;
}

.life-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
}

.life-suggestion:first-child {
    border-top: 0;
}

.life-suggestion > div:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.life-suggestion span,
.life-suggestion small,
.life-muted {
    color: var(--text-muted);
}

.life-suggestion small {
    flex-basis: 100%;
}

.life-suggestion__actions {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.life-suggestion__actions .btn {
    min-height: 38px;
    padding: 0 11px;
}

.life-timeline {
    position: relative;
    display: grid;
    gap: 32px;
    padding: 22px;
}

.life-month {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
}

.life-month__label {
    position: sticky;
    top: 96px;
    align-self: start;
    padding-top: 15px;
    color: var(--aurora);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: capitalize;
}

.life-month__moments {
    display: grid;
    gap: 10px;
}

.life-card {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.life-card__rail::before,
.life-card__rail::after {
    position: absolute;
    left: 8px;
    content: '';
}

.life-card__rail::before {
    top: 0;
    bottom: -10px;
    width: 1px;
    background: var(--line-strong);
}

.life-card__rail::after {
    top: 21px;
    width: 9px;
    height: 9px;
    border: 3px solid #14221f;
    border-radius: 50%;
    background: var(--aurora);
    box-shadow: 0 0 0 3px rgba(108, 197, 179, 0.12);
}

.life-card--object .life-card__rail::after {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(223, 173, 118, 0.1);
}

.life-card__body {
    display: grid;
    gap: 7px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.life-card:hover .life-card__body,
.life-card:focus-visible .life-card__body {
    transform: translateX(3px);
    border-color: rgba(108, 197, 179, 0.26);
    background: rgba(108, 197, 179, 0.055);
}

.life-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    font-size: 11px;
}

.life-card__meta > span:first-child {
    color: var(--aurora);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.life-card__body > strong {
    color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 400;
}

.life-card__context,
.life-card__connections {
    color: var(--text-secondary);
    font-size: 12px;
}

.life-card__connections {
    color: var(--accent-strong);
}

.life-more {
    margin: 0 22px 22px;
}

.life-moment-modal {
    width: min(820px, 100%);
}

.life-moment h2 {
    font-size: clamp(30px, 5vw, 46px);
}

.life-moment h3 {
    font-size: 20px;
}

.life-moment__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.life-moment__facts > div {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.life-moment__facts span,
.life-link span,
.life-link small {
    color: var(--text-muted);
    font-size: 11px;
}

.life-fact-link {
    padding: 0;
    border: 0;
    color: var(--accent);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.life-fact-link:hover {
    text-decoration: underline;
}

.life-moment-back {
    margin-bottom: 18px;
}

.life-moment__description {
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}

.life-moment__section {
    margin-top: 24px;
}

.life-moment__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.life-moment__section-head .btn {
    min-height: 38px;
}

.life-moment__actions {
    display: flex;
    gap: 8px;
}

.life-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 9px;
    margin-top: 10px;
}

.life-link-wrap {
    display: grid;
    grid-template-rows: 1fr auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
}

.life-link {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 13px;
    border: 0;
    color: var(--text-primary);
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.life-link:hover {
    background: var(--surface-2);
}

.life-link__remove {
    padding: 8px 13px;
    border: 0;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    text-align: left;
}

.life-link__remove:hover {
    color: var(--danger);
    background: var(--surface-2);
}

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

#map-wrapper {
    height: min(72vh, 760px) !important;
    min-height: 540px !important;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

#map {
    height: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #111827;
}

.leaflet-control-zoom a,
.leaflet-bar a {
    border-color: var(--line) !important;
    color: var(--text-primary) !important;
    background: rgba(14, 19, 31, 0.9) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    color: var(--text-primary);
    background: #171d2d;
}

.city-modal-overlay {
    border-radius: inherit;
}

.city-modal-content {
    width: min(460px, 94%) !important;
    max-height: 100%;
    overflow-y: auto;
    padding: 25px !important;
    border: 0 !important;
    border-right: 1px solid var(--line-strong) !important;
    color: var(--text-primary);
    background: rgba(13, 18, 29, 0.94) !important;
    box-shadow: 18px 0 80px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(22px) !important;
}

.city-life-summary {
    display: grid;
    gap: 4px;
    margin: 18px 0 10px;
    padding: 13px 14px;
    border: 1px solid rgba(108, 197, 179, 0.18);
    border-radius: 14px;
    background: rgba(108, 197, 179, 0.07);
}

.city-life-summary strong {
    color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 19px;
    font-weight: 400;
}

.city-life-context {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.city-life-group {
    min-width: 0;
}

.city-life-group .section-label {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.city-life-group .section-label span {
    color: var(--aurora);
}

.city-life-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
}

.city-life-item {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text-primary);
    background: var(--surface-soft);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.city-life-item strong,
.city-life-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-life-item small,
.city-life-empty {
    color: var(--text-muted);
    font-size: 11px;
}

.city-life-item:hover {
    border-color: var(--line-strong);
}

.city-life-empty {
    padding: 15px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    line-height: 1.5;
}

.app-dialog {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 5, 10, 0.76);
    backdrop-filter: blur(15px);
    animation: veilReveal 160ms ease both;
}

.app-dialog__panel {
    width: min(100%, 430px);
    padding: 25px;
    border: 1px solid var(--line-strong);
    border-radius: 23px;
    background: linear-gradient(150deg, #1a2133, #0e1320);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.5);
    animation: modalReveal 260ms cubic-bezier(.2, .85, .28, 1) both;
}

.app-dialog__eyebrow {
    color: var(--aurora);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.app-dialog__title {
    margin: 8px 0 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 23px;
    font-weight: 400;
}

.app-dialog__message {
    margin: 12px 0 0;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.app-dialog__input {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    color: var(--text-primary);
    background: rgba(5, 8, 15, 0.48);
}

textarea.app-dialog__input {
    min-height: 120px;
    resize: vertical;
}

.app-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 22px;
}

.auth-page,
.landing-page {
    min-height: 100vh;
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(320px, 0.88fr) minmax(480px, 1.12fr);
}

.auth-story {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(28px, 5vw, 68px);
    border-right: 1px solid var(--line);
    background:
        radial-gradient(circle at 70% 28%, rgba(108, 197, 179, 0.19), transparent 17rem),
        radial-gradient(circle at 5% 95%, rgba(223, 173, 118, 0.16), transparent 24rem),
        #0b0f19;
}

.auth-story::after {
    position: absolute;
    inset: 0;
    opacity: 0.17;
    background-image: radial-gradient(rgba(255, 255, 255, 0.4) 0.7px, transparent 0.7px);
    background-size: 23px 23px;
    content: '';
    pointer-events: none;
}

.auth-story > * {
    position: relative;
    z-index: 1;
}

.auth-story__message {
    max-width: 620px;
    margin: auto 0;
}

.auth-story__message h1 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(42px, 6vw, 78px);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.auth-story__message p {
    max-width: 520px;
    margin: 22px 0 0;
    color: var(--text-secondary);
    font-size: 16px;
}

.auth-points {
    display: flex;
    gap: 9px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.auth-point {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.035);
    font-size: 11px;
}

.auth-panel {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 30px;
}

.login-box {
    width: min(100%, 440px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.login-box h1 {
    margin: 0;
    color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 38px;
    font-weight: 400;
    text-align: left;
}

.login-box .subtitle {
    margin: 8px 0 27px;
    color: var(--text-muted);
    text-align: left;
}

.login-box .form-group {
    margin-bottom: 16px;
}

.login-box .form-group label {
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.login-box .form-group input {
    width: 100%;
    min-height: 50px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--text-primary);
    background: var(--surface-1);
}

.login-box .btn-primary {
    width: 100%;
    margin-top: 5px;
}

.login-box .switch-link {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.login-box .switch-link a {
    color: var(--accent-strong);
    cursor: pointer;
}

.error-message,
.success-message {
    display: none;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 13px;
    font-size: 12px;
    text-align: left;
}

.error-message {
    border-color: rgba(226, 115, 115, 0.28);
    color: #f2b0b0;
    background: rgba(226, 115, 115, 0.09);
}

.success-message {
    border-color: rgba(103, 189, 145, 0.28);
    color: #a8dec2;
    background: rgba(103, 189, 145, 0.09);
}

.landing-page {
    background:
        radial-gradient(circle at 80% 8%, rgba(108, 197, 179, 0.12), transparent 31rem),
        radial-gradient(circle at 18% 45%, rgba(223, 173, 118, 0.08), transparent 31rem);
}

.landing-nav {
    position: relative;
    z-index: 10;
    display: flex;
    max-width: 1240px;
    min-height: 90px;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    padding: 20px 28px;
}

.landing-nav__actions {
    display: flex;
    gap: 9px;
}

.landing-hero {
    display: grid;
    max-width: 1240px;
    min-height: calc(100vh - 90px);
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
    align-items: center;
    gap: clamp(36px, 7vw, 100px);
    margin: 0 auto;
    padding: 56px 28px 100px;
}

.landing-kicker {
    color: var(--aurora);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.landing-hero h1 {
    max-width: 760px;
    margin: 19px 0 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(48px, 7vw, 92px);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.landing-hero__lead {
    max-width: 630px;
    margin: 25px 0 0;
    color: var(--text-secondary);
    font-size: clamp(15px, 2vw, 19px);
}

.landing-hero__actions {
    display: flex;
    gap: 10px;
    margin-top: 31px;
    flex-wrap: wrap;
}

.landing-promise {
    display: flex;
    gap: 22px;
    margin-top: 34px;
    color: var(--text-muted);
    font-size: 11px;
    flex-wrap: wrap;
}

.universe-preview {
    position: relative;
    min-height: 570px;
}

.universe-card {
    position: absolute;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 25px;
    background: rgba(17, 22, 36, 0.78);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

.universe-card--map {
    inset: 7% 2% 18% 7%;
    background:
        radial-gradient(circle at 34% 44%, rgba(108, 197, 179, 0.4) 0 3px, transparent 4px),
        radial-gradient(circle at 65% 27%, rgba(223, 173, 118, 0.5) 0 3px, transparent 4px),
        radial-gradient(circle at 76% 66%, rgba(163, 145, 212, 0.5) 0 3px, transparent 4px),
        linear-gradient(36deg, transparent 47%, rgba(108, 197, 179, 0.16) 48% 49%, transparent 50%),
        linear-gradient(145deg, #162333, #121827 55%, #171827);
}

.universe-card--map::after {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 44px 44px;
    content: '';
}

.universe-card--memory {
    right: -3%;
    bottom: 8%;
    z-index: 2;
    width: 58%;
    padding: 20px;
    animation: floatCard 7s ease-in-out infinite;
}

.universe-card--moment {
    top: 0;
    left: 0;
    z-index: 3;
    width: 48%;
    padding: 18px;
    animation: floatCard 8s ease-in-out -2s infinite;
}

.universe-card__eyebrow {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.universe-card__title {
    margin-top: 7px;
    color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
}

.universe-card__meta {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 10px;
}

.landing-flow,
.landing-values {
    max-width: 1240px;
    margin: 0 auto;
    padding: 110px 28px;
}

.landing-section-head {
    max-width: 760px;
}

.landing-section-head h2 {
    margin: 12px 0 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(34px, 5vw, 60px);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.flow-grid,
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-top: 43px;
}

.flow-card,
.value-card {
    min-height: 220px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-1);
    transition: var(--transition);
}

.flow-card:hover,
.value-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108, 197, 179, 0.22);
}

.flow-card__number {
    color: var(--accent);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 13px;
}

.flow-card h3,
.value-card h3 {
    margin: 42px 0 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 400;
}

.flow-card p,
.value-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.landing-cta {
    max-width: 1184px;
    margin: 30px auto 100px;
    padding: clamp(40px, 7vw, 84px);
    border: 1px solid var(--line);
    border-radius: 36px;
    background:
        radial-gradient(circle at 85% 20%, rgba(108, 197, 179, 0.18), transparent 22rem),
        linear-gradient(140deg, rgba(31, 39, 58, 0.85), rgba(12, 17, 28, 0.9));
    text-align: center;
}

.landing-cta h2 {
    max-width: 720px;
    margin: 0 auto;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.landing-cta p {
    max-width: 590px;
    margin: 17px auto 25px;
    color: var(--text-secondary);
}

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

@keyframes modalReveal {
    from { transform: translateY(18px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes veilReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes skeletonSweep {
    to { transform: translateX(100%); }
}

@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 230px;
    }

    .brand-tagline {
        display: none;
    }

    .life-hero {
        grid-template-columns: minmax(0, 1fr) 250px;
    }

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

    .auth-page {
        grid-template-columns: 0.85fr 1.15fr;
    }

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

@media (max-width: 820px) {
    body {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }

    .sidebar {
        width: min(86vw, 310px);
        transform: translateX(-105%);
        transition: transform 280ms cubic-bezier(.2, .8, .25, 1);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
        box-shadow: 30px 0 100px rgba(0, 0, 0, 0.55);
    }

    body.nav-open::after {
        position: fixed;
        inset: 0;
        z-index: 1100;
        background: rgba(3, 5, 10, 0.63);
        content: '';
        backdrop-filter: blur(8px);
    }

    .app-main {
        margin-left: 0;
        padding: 18px 16px 36px;
    }

    .app-topbar {
        min-height: 62px;
        margin: -18px -16px 20px;
        padding: 10px 16px;
    }

    .menu-button {
        display: grid;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        left: 10px;
        z-index: 1000;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding: 7px;
        border: 1px solid var(--line-strong);
        border-radius: 21px;
        background: rgba(14, 19, 31, 0.9);
        box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(24px);
    }

    .mobile-bottom-nav .nav-link {
        display: grid;
        min-height: 53px;
        place-items: center;
        gap: 1px;
        padding: 4px 2px;
        border-radius: 15px;
        box-shadow: none;
        font-size: 9px;
        text-align: center;
    }

    .mobile-bottom-nav .nav-link:hover {
        transform: none;
    }

    .mobile-bottom-nav .nav-icon {
        height: 24px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-actions,
    .btn-group {
        width: 100%;
        justify-content: flex-start;
    }

    .life-experience {
        grid-template-columns: 1fr;
    }

    .life-navigator {
        position: static;
    }

    .life-periods {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .life-period {
        min-width: 118px;
    }

    .life-archive {
        display: none;
    }

    .life-toolbar,
    .life-suggestion {
        align-items: stretch;
        flex-direction: column;
    }

    .life-toolbar__controls {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .life-suggestion__actions {
        flex-wrap: wrap;
    }

    .life-suggestion__actions .btn {
        flex: 1 1 100px;
    }

    .life-month {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .life-month__label {
        position: static;
    }

    .life-hero {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .life-orbit {
        display: none;
    }

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

    .auth-page {
        display: block;
    }

    .auth-story {
        min-height: auto;
        padding: 28px 22px 40px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .auth-story__message {
        margin: 70px 0 0;
    }

    .auth-story__message h1 {
        font-size: clamp(38px, 12vw, 58px);
    }

    .auth-panel {
        min-height: auto;
        padding: 42px 22px 80px;
    }

    .landing-nav {
        padding: 16px 18px;
    }

    .landing-nav .btn-secondary {
        display: none;
    }

    .landing-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 72px 20px 70px;
    }

    .landing-hero h1 {
        font-size: clamp(48px, 14vw, 72px);
    }

    .universe-preview {
        min-height: 490px;
    }

    .flow-grid,
    .value-grid {
        grid-template-columns: 1fr;
    }

    .landing-flow,
    .landing-values {
        padding: 76px 20px;
    }

    .landing-cta {
        margin: 20px 14px 70px;
        border-radius: 28px;
    }

    #map-wrapper {
        min-height: 430px !important;
        height: 66vh !important;
    }
}

@media (max-width: 560px) {
    .app-topbar__eyebrow {
        display: none;
    }

    .topbar-actions .topbar-optional {
        display: none;
    }

    .section-title,
    .section-heading h1 {
        font-size: 34px;
    }

    .section-actions .btn,
    .btn-group .btn {
        flex: 1 1 140px;
    }

    .life-timeline {
        padding: 16px 12px;
    }

    .life-card__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .life-card__body {
        padding: 14px;
    }

    .life-moment__facts,
    .life-event-form-grid,
    .city-life-list {
        grid-template-columns: 1fr;
    }

    .life-hero__content {
        padding: 27px 22px;
    }

    .life-hero h1 {
        font-size: 39px;
    }

    .life-stats,
    .quick-paths {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .life-panel {
        padding: 18px;
    }

    .quick-path:last-child {
        grid-column: 1 / -1;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        width: 100% !important;
        max-width: none !important;
        max-height: 92vh;
        padding: 23px 18px calc(22px + env(safe-area-inset-bottom)) !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        border-left: 0 !important;
        border-radius: 25px 25px 0 0 !important;
        animation-name: sheetReveal !important;
    }

    .modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .notification {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .artifact-grid {
        grid-template-columns: 1fr !important;
    }

    .auth-points {
        gap: 6px;
    }

    .universe-preview {
        min-height: 420px;
    }
}

@keyframes sheetReveal {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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