:root {
    --bg: #eef3fb;
    --bg-strong: #dde7f6;
    --surface: rgba(255, 255, 255, 0.76);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --surface-solid: #ffffff;
    --surface-dark: #0f1c33;
    --text-strong: #10203a;
    --text-primary: #1b2b46;
    --text-secondary: #51627f;
    --text-tertiary: #7787a1;
    --line-soft: rgba(79, 102, 138, 0.14);
    --line-strong: rgba(52, 84, 138, 0.2);
    --brand: #216bff;
    --brand-deep: #0f4fd1;
    --brand-soft: rgba(33, 107, 255, 0.14);
    --brand-soft-strong: rgba(33, 107, 255, 0.24);
    --brand-cyan: #3db5ff;
    --brand-amber: #ffb25a;
    --emerald: #14966d;
    --emerald-soft: rgba(20, 150, 109, 0.14);
    --amber: #d2861f;
    --accent-glass-text: #13233c;
    --accent-glass-muted: #52637f;
    --accent-glass-border: rgba(92, 132, 190, 0.16);
    --accent-glass-bg:
        radial-gradient(circle at 100% 0%, rgba(91, 158, 255, 0.25) 0%, rgba(91, 158, 255, 0) 38%),
        radial-gradient(circle at 12% 100%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0) 46%),
        linear-gradient(145deg, rgba(248, 251, 255, 0.98) 0%, rgba(224, 237, 255, 0.92) 100%);
    --accent-glass-shadow: 0 22px 58px rgba(33, 107, 255, 0.13), inset 0 0 0 1px rgba(255, 255, 255, 0.56);
    --shadow-soft: 0 18px 45px rgba(20, 38, 68, 0.08);
    --shadow-medium: 0 30px 80px rgba(20, 38, 68, 0.12);
    --shadow-strong: 0 36px 90px rgba(13, 33, 67, 0.18);
    --shadow-premium: 0 38px 110px rgba(9, 24, 54, 0.2);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    --frame-width: min(1180px, calc(100vw - 40px));
    --auth-card-width: 520px;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display",
        "Segoe UI Variable Text", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
        "Helvetica Neue", sans-serif;
    --bs-font-sans-serif: var(--font-sans);
    --bs-body-font-family: var(--font-sans);
    --transition-fast: 180ms ease;
    --transition-base: 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.app-body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-synthesis-weight: none;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(circle at 8% 0%, rgba(104, 161, 255, 0.2) 0%, rgba(104, 161, 255, 0) 28%),
        radial-gradient(circle at 94% 12%, rgba(255, 194, 120, 0.18) 0%, rgba(255, 194, 120, 0) 24%),
        radial-gradient(circle at 76% 30%, rgba(104, 214, 255, 0.12) 0%, rgba(104, 214, 255, 0) 22%),
        linear-gradient(180deg, #f7f9fd 0%, #edf2fa 44%, #e7eef9 100%);
}

::selection {
    color: #ffffff;
    background: rgba(33, 107, 255, 0.68);
}

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

p,
ul,
ol {
    margin-bottom: 0;
}

.app-frame {
    width: var(--frame-width);
    margin: 0 auto;
}

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

.app-gradient {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.75;
}

.app-gradient-blue {
    top: -180px;
    left: -120px;
    width: 540px;
    height: 540px;
    background: radial-gradient(circle, rgba(72, 149, 255, 0.36) 0%, rgba(72, 149, 255, 0) 72%);
}

.app-gradient-silver {
    top: 140px;
    right: -180px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 70%);
}

.app-gradient-cyan {
    top: 42%;
    right: 18%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(61, 181, 255, 0.22) 0%, rgba(61, 181, 255, 0) 68%);
}

.app-gradient-amber {
    bottom: -120px;
    left: 30%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255, 178, 90, 0.18) 0%, rgba(255, 178, 90, 0) 70%);
}

.app-ribbon {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 42%;
    border: 1px solid rgba(255, 255, 255, 0.36);
    opacity: 0.46;
    filter: blur(0.2px);
}

.app-ribbon-left {
    top: 110px;
    left: -200px;
    transform: rotate(-18deg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
}

.app-ribbon-right {
    right: -180px;
    bottom: 120px;
    transform: rotate(22deg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 100%);
}

.app-grid-texture {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(120, 143, 179, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 143, 179, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.app-header,
.app-main,
.app-footer {
    position: relative;
    z-index: 1;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 18px 0 0;
    transition: padding var(--transition-base);
}

.app-header.is-scrolled {
    padding-top: 10px;
}

.topbar-shell {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 18px 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(245, 249, 255, 0.72) 100%);
    box-shadow: 0 22px 65px rgba(17, 34, 65, 0.1);
    backdrop-filter: blur(28px);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.app-header.is-scrolled .topbar-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(245, 249, 255, 0.82) 100%);
    box-shadow: 0 28px 70px rgba(17, 34, 65, 0.14);
    transform: translateY(-1px);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    grid-column: 1;
    min-width: 0;
}

.brand-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    box-shadow: 0 18px 34px rgba(26, 92, 219, 0.32);
}

.brand-symbol svg {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 18px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-copy strong {
    color: var(--text-strong);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-copy small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.primary-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.primary-nav::-webkit-scrollbar {
    display: none;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-chip:hover {
    color: var(--text-strong);
    background: rgba(255, 255, 255, 0.72);
    transform: translateY(-1px);
}

.nav-chip.is-active {
    color: var(--brand-deep);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(233, 242, 255, 0.96) 100%);
    box-shadow: inset 0 0 0 1px rgba(33, 107, 255, 0.16);
}

.topbar-actions,
.session-cluster,
.guest-actions,
.button-inline-row,
.hero-action-row,
.action-stack,
.action-stack-inline,
.pill-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-actions,
.session-cluster,
.guest-actions {
    min-width: 0;
}

.topbar-actions {
    grid-column: 3;
    justify-self: end;
}

.session-cluster,
.pill-row {
    flex-wrap: wrap;
}

.session-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-width: 260px;
    padding: 10px 14px;
    border: 1px solid rgba(70, 100, 146, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
}

.session-label {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.session-chip strong {
    display: block;
    max-width: 220px;
    overflow: hidden;
    color: var(--text-strong);
    font-size: 0.92rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-main {
    padding: 32px 0 72px;
}

.page-stage > section {
    animation: page-enter 720ms cubic-bezier(0.18, 0.88, 0.22, 1) both;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-footer {
    padding: 0 0 30px;
}

.footer-shell {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 20px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    color: var(--text-tertiary);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(242, 247, 255, 0.58) 100%);
    box-shadow: 0 20px 54px rgba(17, 34, 65, 0.08);
    backdrop-filter: blur(24px);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    justify-self: start;
    min-width: 0;
}

.footer-brand img {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(26, 92, 219, 0.22);
}

.footer-brand div {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.footer-brand strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.15;
}

.footer-brand span {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.footer-contact {
    justify-self: center;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.footer-contact:hover {
    color: var(--text-primary);
}

.footer-year {
    justify-self: end;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.surface-panel {
    position: relative;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 255, 0.78) 100%);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(20px);
}

.surface-panel::before {
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-lg) - 2px);
    pointer-events: none;
    content: "";
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.surface-panel::after {
    position: absolute;
    inset: auto auto 0 -10%;
    width: 62%;
    height: 52%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 74%);
    pointer-events: none;
    content: "";
}

.surface-panel > * {
    position: relative;
    z-index: 1;
}

.surface-panel-elevated {
    box-shadow: var(--shadow-premium);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-deep);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.display-title,
.section-title,
.panel-header h2,
.summary-card h2,
.progress-card h2 {
    color: var(--text-strong);
    letter-spacing: 0;
}

.display-title {
    margin-top: 0;
    font-size: 3.45rem;
    font-weight: 800;
    line-height: 1.08;
}

.eyebrow + .display-title {
    margin-top: 14px;
}

.lead-copy,
.section-subtitle,
.panel-header p,
.feature-card p,
.helper-card p,
.summary-card p,
.auth-helper,
.field-hint,
.empty-state p,
.empty-inline,
.preview-markdown {
    color: var(--text-secondary);
}

.lead-copy {
    max-width: 680px;
    margin-top: 16px;
    font-size: 1rem;
    line-height: 1.68;
}

.section-title {
    margin-top: 0;
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.18;
}

.eyebrow + .section-title {
    margin-top: 10px;
}

.section-subtitle {
    max-width: 620px;
    margin-top: 12px;
    font-size: 0.96rem;
    line-height: 1.64;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.panel-header h2 {
    margin-top: 0;
    font-size: 1.32rem;
    font-weight: 800;
}

.panel-header .eyebrow + h2 {
    margin-top: 8px;
}

.panel-header p {
    max-width: 420px;
    font-size: 0.92rem;
    line-height: 1.62;
}

.panel-header.compact {
    margin-bottom: 18px;
}

.panel-header-inverse h2,
.panel-header-inverse p,
.panel-header-inverse .eyebrow {
    color: #f3f7ff;
}

.content-badge,
.info-pill,
.progress-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(72, 98, 138, 0.14);
}

.message-banner {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 18px;
    font-size: 0.94rem;
    font-weight: 700;
    word-break: keep-all;
    overflow-wrap: anywhere;
    box-shadow: var(--shadow-soft);
}

.message-banner-success {
    color: #0d6a4e;
    background: linear-gradient(180deg, rgba(219, 248, 238, 0.92) 0%, rgba(243, 255, 251, 0.88) 100%);
    box-shadow: inset 0 0 0 1px rgba(20, 150, 109, 0.16), var(--shadow-soft);
}

.message-banner-danger {
    color: #9a2840;
    background: linear-gradient(180deg, rgba(255, 233, 238, 0.92) 0%, rgba(255, 244, 246, 0.88) 100%);
    box-shadow: inset 0 0 0 1px rgba(204, 73, 104, 0.16), var(--shadow-soft);
}

.message-banner-warning {
    color: #865100;
    background: linear-gradient(180deg, rgba(255, 244, 217, 0.96) 0%, rgba(255, 251, 237, 0.9) 100%);
    box-shadow: inset 0 0 0 1px rgba(215, 156, 28, 0.18), var(--shadow-soft);
}

.page-flash-stack {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.verification-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.verification-banner-copy {
    display: grid;
    gap: 6px;
}

.verification-banner-copy p {
    margin: 0;
    font-weight: 600;
}

.verification-banner-action {
    flex-shrink: 0;
}

.btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn.btn-sm {
    min-height: 38px;
    padding: 0 14px;
}

.btn.btn-lg {
    min-height: 52px;
    padding: 0 22px;
}

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

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    border-color: transparent !important;
    background: linear-gradient(135deg, #3278ff 0%, #1253d4 100%) !important;
    box-shadow: 0 10px 22px rgba(18, 41, 80, 0.12) !important;
}

.btn-outline-secondary {
    color: var(--text-primary);
    border-color: rgba(73, 101, 145, 0.16);
    background: rgba(255, 255, 255, 0.72);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: var(--text-strong) !important;
    border-color: rgba(73, 101, 145, 0.22) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.btn-light {
    color: var(--text-primary);
    border: 1px solid transparent;
    background: rgba(238, 243, 251, 0.9);
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    color: var(--text-strong) !important;
    background: rgba(255, 255, 255, 0.96) !important;
}

.form-control {
    min-height: 54px;
    border-color: rgba(83, 109, 150, 0.14);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--text-strong);
    font-size: 0.98rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.form-control::placeholder {
    color: #9cacbf;
    font-weight: 600;
}

.form-control:focus {
    border-color: rgba(33, 107, 255, 0.28);
    box-shadow: 0 0 0 4px rgba(33, 107, 255, 0.09);
}

.form-control.text-area {
    min-height: 132px;
    resize: vertical;
    line-height: 1.64;
}

.field-label {
    margin-bottom: 8px;
    color: var(--text-strong);
    font-size: 0.92rem;
    font-weight: 800;
}

.field-hint {
    margin-bottom: 12px;
    font-size: 0.88rem;
    line-height: 1.56;
}

.form-stack,
.helper-stack,
.feature-grid,
.summary-grid,
.progress-card-grid,
.entry-grid {
    display: grid;
    gap: 18px;
}

.form-section {
    padding: 18px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.form-section:focus-within,
.goal-toggle-card:has(.form-check-input:focus-visible) {
    border-color: rgba(33, 107, 255, 0.24);
    box-shadow: 0 18px 34px rgba(22, 49, 96, 0.08);
    transform: translateY(-1px);
}

.home-shell,
.workspace-shell,
.reader-shell,
.auth-layout {
    display: grid;
    gap: 24px;
}

.hero-grid,
.workspace-grid-two,
.reflection-layout,
.reader-grid,
.auth-layout {
    display: grid;
    gap: 24px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.hero-grid-premium {
    align-items: stretch;
}

.hero-panel-primary {
    display: grid;
    align-content: center;
    padding: 36px;
    min-height: 420px;
    overflow: hidden;
}

.hero-panel-primary::after {
    display: none;
}

.hero-panel-premium {
    background:
        radial-gradient(circle at top right, rgba(78, 152, 255, 0.18) 0%, rgba(78, 152, 255, 0) 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 248, 255, 0.82) 100%);
}

.hero-copy-stack {
    max-width: 760px;
}

.hero-tagline {
    display: grid;
    gap: 4px;
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--text-secondary);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.62;
    word-break: keep-all;
}

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

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

.hero-side-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.hero-action-row {
    margin-top: 28px;
    flex-wrap: nowrap;
}

.hero-action-row .btn {
    min-width: 190px;
}

.hero-story-grid {
    display: grid;
    grid-template-columns: 1.1fr repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.hero-story-card {
    min-height: 100%;
    padding: 22px 22px 24px;
    border: 1px solid rgba(86, 111, 153, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hero-story-card-highlight {
    border-color: var(--accent-glass-border);
    background: var(--accent-glass-bg);
    box-shadow: var(--accent-glass-shadow);
}

.story-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.74);
}

.hero-story-card strong {
    display: block;
    margin-top: 0;
    color: var(--text-strong);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.55;
}

.story-kicker + strong {
    margin-top: 16px;
}

.hero-story-card p {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.hero-story-card-highlight .story-kicker {
    color: var(--brand-deep);
    background: var(--brand-soft);
}

.hero-story-card-highlight strong,
.hero-story-card-highlight p {
    color: var(--accent-glass-text);
}

.hero-story-card-highlight p {
    color: var(--accent-glass-muted);
}

.hero-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 30px;
}

.metric-tile {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(91, 116, 156, 0.12);
}

.metric-tile span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.metric-tile strong {
    display: block;
    margin-top: 0;
    color: var(--text-strong);
    font-size: 0.94rem;
    line-height: 1.48;
}

.metric-tile span + strong {
    margin-top: 10px;
}

.product-window {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(180deg, #f9fbff 0%, #edf3fb 100%);
    box-shadow: inset 0 0 0 1px rgba(100, 123, 160, 0.12);
}

.window-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(106, 127, 161, 0.12);
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(120, 140, 174, 0.38);
}

.window-dot:first-child {
    background: rgba(255, 125, 97, 0.78);
}

.window-dot:nth-child(2) {
    background: rgba(255, 193, 77, 0.78);
}

.window-dot:nth-child(3) {
    background: rgba(60, 204, 120, 0.78);
}

.window-content {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.window-row {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.window-row span,
.window-row em {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 700;
}

.window-row strong {
    color: var(--text-strong);
    font-size: 0.96rem;
    font-weight: 800;
}

.hero-side-panel {
    min-height: 100%;
}

.hero-side-panel-dark {
    color: var(--accent-glass-text);
    border-color: var(--accent-glass-border);
    background:
        var(--accent-glass-bg);
    box-shadow: var(--accent-glass-shadow);
}

.hero-side-panel-dark .panel-header h2,
.hero-side-panel-dark .panel-header p,
.hero-side-panel-dark .eyebrow {
    color: var(--accent-glass-text);
}

.hero-side-panel-soft {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 246, 255, 0.82) 100%);
}

.hero-side-panel-soft h2 {
    margin: 10px 0 0;
    color: var(--text-strong);
    font-size: 1.72rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    word-break: keep-all;
}

.hero-side-panel-soft p {
    margin: 2px 0 0;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.62;
}

.product-window-dark {
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 0 0 1px rgba(92, 132, 190, 0.15);
}

.product-window-dark .window-toolbar {
    color: var(--accent-glass-muted);
    border-bottom-color: rgba(92, 132, 190, 0.14);
}

.product-window-dark .window-row {
    background: rgba(255, 255, 255, 0.74);
}

.product-window-dark .window-row strong {
    color: var(--accent-glass-text);
}

.product-window-dark .window-row span,
.product-window-dark .window-row em {
    color: #63738f;
}

.hero-glance-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.glance-pill {
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.glance-pill span {
    display: block;
    color: rgba(243, 247, 255, 0.68);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.glance-pill strong {
    display: block;
    margin-top: 8px;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 800;
}

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

.insight-mini-card,
.helper-card {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 0 0 1px rgba(76, 104, 148, 0.12);
}

.insight-mini-card .eyebrow,
.helper-card strong,
.summary-label {
    font-size: 0.78rem;
}

.insight-mini-card p,
.helper-card p,
.empty-state p,
.summary-card p,
.progress-card-meta {
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.58;
}

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

.feature-grid-premium {
    align-items: stretch;
}

.feature-card,
.philosophy-card {
    min-height: 100%;
}

.feature-card {
    display: grid;
    align-content: start;
}

.feature-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--brand-deep);
    font-size: 0.9rem;
    font-weight: 800;
    background: var(--brand-soft);
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 0 0 1px rgba(86, 111, 153, 0.12);
}

.feature-card h2,
.philosophy-card h2,
.summary-card h2 {
    margin-top: 18px;
    font-size: 1.34rem;
    font-weight: 800;
    line-height: 1.32;
    word-break: keep-all;
}

.feature-card p,
.philosophy-card p {
    margin-top: 14px;
    font-size: 0.94rem;
    line-height: 1.6;
}

.feature-footnote {
    display: block;
    margin-top: auto;
    padding-top: 20px;
    color: var(--text-tertiary);
    font-size: 0.84rem;
    font-weight: 700;
}

.philosophy-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-color: var(--accent-glass-border);
    background: var(--accent-glass-bg);
    box-shadow: var(--accent-glass-shadow);
}

.philosophy-card .eyebrow,
.philosophy-card h2,
.philosophy-card p,
.philosophy-card .info-pill {
    color: var(--accent-glass-text);
}

.philosophy-card .info-pill {
    color: var(--brand-deep);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px rgba(33, 107, 255, 0.12);
}

.auth-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: start;
}

.auth-layout-centered {
    grid-template-columns: minmax(0, var(--auth-card-width));
    justify-content: center;
    min-height: min(680px, calc(100vh - 230px));
    padding: 36px 0 52px;
}

.auth-layout-centered .auth-card,
.error-layout-centered .error-state-panel {
    width: 100%;
    justify-self: stretch;
}

.auth-layout-centered .panel-header {
    justify-content: center;
    margin-bottom: 28px;
    text-align: center;
}

.auth-layout-centered .panel-header h2 {
    font-size: 1.62rem;
}

.auth-showcase {
    display: grid;
    align-content: start;
    gap: 24px;
    min-height: 0;
}

.auth-showcase-rich {
    color: var(--accent-glass-text);
    border-color: var(--accent-glass-border);
    background: var(--accent-glass-bg);
    box-shadow: var(--accent-glass-shadow);
}

.auth-showcase-emerald {
    background: var(--accent-glass-bg);
}

.auth-showcase-copy .eyebrow,
.auth-showcase-copy .display-title,
.auth-showcase-copy .lead-copy {
    color: var(--accent-glass-text);
}

.auth-display-title {
    max-width: 760px;
}

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

.auth-floating-card {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(92, 132, 190, 0.12);
}

.auth-floating-card-primary {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(119, 188, 255, 0.18) 100%);
}

.auth-floating-card span {
    display: block;
    color: var(--accent-glass-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-floating-card strong {
    display: block;
    margin-top: 12px;
    color: var(--accent-glass-text);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.46;
}

.auth-floating-card p {
    margin-top: 10px;
    color: var(--accent-glass-muted);
    font-size: 0.88rem;
    line-height: 1.56;
}

.auth-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.auth-stat-card {
    padding: 18px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-stat-card span {
    display: block;
    color: rgba(243, 247, 255, 0.66);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-stat-card strong {
    display: block;
    margin-top: 10px;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.55;
}

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

.auth-preview-card {
    padding: 20px 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(81, 108, 149, 0.12);
}

.auth-preview-card strong {
    display: block;
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.auth-preview-card span {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.56;
}

.auth-card {
    display: grid;
    align-content: start;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.88) 100%);
    box-shadow: var(--shadow-premium);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.toggle-row strong {
    display: block;
    color: var(--text-strong);
    font-size: 0.92rem;
    font-weight: 800;
}

.toggle-row span {
    min-width: 0;
}

.toggle-row small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.55;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 8px;
    border-color: rgba(67, 101, 148, 0.24);
    box-shadow: none;
}

.form-check-input:checked {
    border-color: var(--brand);
    background-color: var(--brand);
}

.auth-helper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
}

.auth-helper a {
    color: var(--brand-deep);
}

.auth-helper-separator {
    color: var(--text-tertiary);
}

.workspace-header {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
    align-items: center;
    gap: 24px;
}

.workspace-hero {
    background:
        radial-gradient(circle at top right, rgba(107, 166, 255, 0.16) 0%, rgba(107, 166, 255, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 248, 255, 0.82) 100%);
}

.workspace-hero-morning {
    background:
        radial-gradient(circle at top right, rgba(107, 166, 255, 0.18) 0%, rgba(107, 166, 255, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 247, 255, 0.84) 100%);
}

.workspace-hero-evening {
    background:
        radial-gradient(circle at top right, rgba(80, 206, 214, 0.18) 0%, rgba(80, 206, 214, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 250, 252, 0.84) 100%);
}

.workspace-hero-analytic {
    background:
        radial-gradient(circle at top right, rgba(255, 178, 90, 0.18) 0%, rgba(255, 178, 90, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(249, 246, 240, 0.84) 100%);
}

.workspace-hero-reader {
    background:
        radial-gradient(circle at top right, rgba(144, 166, 204, 0.18) 0%, rgba(144, 166, 204, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 247, 252, 0.84) 100%);
}

.workspace-hero-library {
    background:
        radial-gradient(circle at top right, rgba(92, 128, 255, 0.18) 0%, rgba(92, 128, 255, 0) 28%),
        radial-gradient(circle at 74% 18%, rgba(20, 150, 109, 0.1) 0%, rgba(20, 150, 109, 0) 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 247, 255, 0.84) 100%);
}

.workspace-header-rich {
    align-items: center;
}

.workspace-header-copy {
    display: grid;
    align-content: center;
    align-self: stretch;
    min-width: 0;
    min-height: 86px;
    padding-left: clamp(12px, 1.35vw, 22px);
}

.workspace-meta-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.workspace-meta-stack-single {
    grid-template-columns: minmax(0, 1fr);
    justify-self: end;
    width: min(100%, 360px);
}

.workspace-meta-card {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 86px;
    padding: 18px 20px;
    border: 1px solid rgba(84, 109, 150, 0.11);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.workspace-meta-card-accent {
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.workspace-meta-card-wide {
    grid-column: 1 / -1;
}

.workspace-meta-label {
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workspace-meta-card strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-meta-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.56;
}

.workspace-meta-card .button-inline-row {
    flex-wrap: wrap;
}

.workspace-grid-two {
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
}

.workspace-grid-one,
.account-security-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.account-security-layout {
    width: min(640px, 100%);
    max-width: 640px;
    margin: 0 auto;
}

.account-security-card {
    gap: 18px;
}

.account-overview-card {
    gap: 18px;
}

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

.account-profile-card,
.account-info-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid rgba(84, 109, 150, 0.11);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.account-profile-card {
    background: rgba(255, 255, 255, 0.68);
}

.account-info-grid {
    display: grid;
    gap: 12px;
}

.account-profile-card span,
.account-info-card span {
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.account-profile-card strong,
.account-info-card strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-security-header {
    align-items: center;
    margin-bottom: 22px;
}

.account-security-header h2 {
    margin-top: 8px;
    font-size: 1.9rem;
}

.account-identity-card,
.password-rule-card {
    display: grid;
    gap: 6px;
    padding: 15px 18px;
    border: 1px solid rgba(84, 109, 150, 0.11);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.account-identity-card {
    min-width: 0;
    margin-bottom: 2px;
}

.account-identity-card span,
.password-rule-card span {
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.account-identity-card strong,
.password-rule-card strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.password-rule-card {
    background: rgba(255, 255, 255, 0.68);
}

.launcher-form {
    display: grid;
    gap: 18px;
}

.entry-grid,
.progress-card-grid {
    grid-template-columns: 1fr;
}

.entry-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(84, 109, 150, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 0 0 1px rgba(83, 109, 150, 0.08);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.entry-card:hover {
    border-color: rgba(33, 107, 255, 0.22);
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(18, 41, 80, 0.12);
}

.entry-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    color: var(--brand-deep);
    font-size: 0.92rem;
    font-weight: 800;
    background: var(--brand-soft);
}

.entry-card-icon-night {
    color: #0a6b78;
    background: rgba(18, 188, 212, 0.16);
}

.entry-card-body strong {
    display: block;
    color: var(--text-strong);
    font-size: 0.96rem;
    font-weight: 800;
}

.entry-card-body span,
.entry-card-action,
.empty-inline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 24px;
}

.editor-main,
.reflection-form,
.reference-panel {
    display: grid;
    gap: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.editor-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.accent-surface {
    background: rgba(255, 255, 255, 0.76);
}

.helper-list {
    display: grid;
    gap: 12px;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.58;
}

.reflection-layout {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
}

.reference-panel {
    align-content: start;
    align-self: start;
}

.goal-toggle-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.goal-toggle-card:has(.form-check-input:checked) {
    border-color: rgba(20, 150, 109, 0.22);
    background: rgba(20, 150, 109, 0.08);
    transform: translateY(-1px);
}

.goal-toggle-label {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.55;
}

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

.summary-grid-premium {
    align-items: stretch;
}

.summary-card {
    min-height: 100%;
}

.summary-card-featured {
    display: grid;
    grid-column: span 2;
    align-content: space-between;
    background: rgba(255, 255, 255, 0.78);
}

.summary-card-stat {
    background: rgba(255, 255, 255, 0.76);
}

.summary-card-accent {
    display: grid;
    align-content: space-between;
    background: rgba(255, 255, 255, 0.76);
}

.summary-label {
    color: var(--text-tertiary);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.summary-value {
    display: block;
    margin-top: 14px;
    color: var(--text-strong);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 0;
}

.summary-kpi-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.summary-insight-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.summary-insight-list span,
.summary-insight-list a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--brand-deep);
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 1px rgba(33, 107, 255, 0.1);
}

.summary-insight-list a:hover {
    color: var(--brand-deep);
    transform: translateX(2px);
}

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

.operations-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.operations-panel {
    display: grid;
    gap: 20px;
}

.operations-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.operations-panel-header h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.operations-metric-list {
    display: grid;
    gap: 10px;
}

.operations-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(108, 123, 146, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.operations-metric-row span {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
}

.operations-metric-row strong {
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.operations-empty {
    padding: 26px;
    border-radius: 18px;
    color: var(--text-secondary);
    text-align: center;
    background: rgba(255, 255, 255, 0.62);
}

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

.operations-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.operations-table th,
.operations-table td {
    padding: 14px 16px;
    white-space: nowrap;
}

.operations-table th {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.operations-table td {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(108, 123, 146, 0.12);
    border-bottom: 1px solid rgba(108, 123, 146, 0.12);
}

.operations-table td:first-child {
    border-left: 1px solid rgba(108, 123, 146, 0.12);
    border-radius: 16px 0 0 16px;
    color: var(--text-strong);
}

.operations-table td:last-child {
    border-right: 1px solid rgba(108, 123, 146, 0.12);
    border-radius: 0 16px 16px 0;
}

.operations-trend-panel {
    gap: 24px;
    overflow: hidden;
}

.operations-trend-header {
    align-items: flex-start;
}

.operations-trend-actions {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.operations-trend-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.operations-trend-filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 10px 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(108, 123, 146, 0.12);
}

.operations-trend-filter label span {
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.operations-trend-filter input[type="date"] {
    min-height: 30px;
    border: 0;
    color: var(--text-strong);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    background: transparent;
}

.operations-week-buttons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(108, 123, 146, 0.12);
}

.operations-week-buttons button {
    min-width: 44px;
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    color: var(--text-tertiary);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    background: transparent;
    cursor: pointer;
}

.operations-week-buttons button:hover,
.operations-week-buttons button.is-active {
    color: #ffffff;
    background: var(--brand-blue);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.operations-delta-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.operations-delta-strip span {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 34px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(108, 123, 146, 0.12);
}

.operations-delta-strip strong {
    margin-left: 4px;
    color: var(--brand-deep);
}

.operations-trend-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
    gap: 18px;
}

.operations-chart-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(108, 123, 146, 0.13);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 255, 0.62)),
        rgba(255, 255, 255, 0.74);
}

.operations-chart-card-soft {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 249, 236, 0.62)),
        rgba(255, 255, 255, 0.74);
}

.operations-chart-head,
.operations-chart-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.operations-chart-head > span {
    color: var(--text-strong);
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.operations-chart-legend {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.operations-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
}

.operations-chart-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.legend-active {
    background: #2563eb;
}

.legend-writing {
    background: #0f9f6e;
}

.legend-new {
    background: #f59e0b;
}

.legend-goal {
    background: #ef7f45;
}

.operations-line-chart {
    width: 100%;
    min-height: 190px;
}

.operations-line-chart line {
    stroke: rgba(108, 123, 146, 0.16);
    stroke-width: 1;
}

.trend-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4.2;
}

.trend-line-active {
    stroke: #2563eb;
}

.trend-line-writing {
    stroke: #0f9f6e;
}

.trend-line-new {
    stroke: #f59e0b;
    stroke-dasharray: 6 8;
}

.trend-line-goal {
    stroke: #ef7f45;
}

.trend-dot {
    fill: #ffffff;
    stroke-width: 3;
}

.trend-dot-active {
    stroke: #2563eb;
}

.trend-dot-writing {
    stroke: #0f9f6e;
}

.trend-dot-goal {
    stroke: #ef7f45;
}

.operations-chart-axis {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
}

.operations-bar-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 0 0 1px rgba(108, 123, 146, 0.1);
}

.operations-bar-week {
    display: grid;
    gap: 8px;
    justify-items: center;
    min-width: 0;
}

.operations-bar-stack {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 74px;
    padding: 10px 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.operations-bar {
    width: 10px;
    min-height: 0;
    border-radius: 999px;
}

.operations-bar-active {
    background: linear-gradient(180deg, #73a7ff, #2563eb);
}

.operations-bar-writing {
    background: linear-gradient(180deg, #72ddb6, #0f9f6e);
}

.operations-bar-engagement {
    background: linear-gradient(180deg, #ffd58a, #f59e0b);
}

.operations-bar-week strong {
    color: var(--text-strong);
    font-size: 0.72rem;
    font-weight: 900;
}

.operations-bar-week > span {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
}

.progress-card {
    display: grid;
    gap: 20px;
    background: rgba(255, 255, 255, 0.76);
}

.progress-card-top,
.progress-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.progress-percent-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    min-height: 84px;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--brand-deep);
    font-size: 1.12rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.12);
}

.progress-percent-badge-sm {
    min-width: 64px;
    min-height: 64px;
    font-size: 0.98rem;
}

.progress-track-shell {
    padding: 14px 0 0;
}

.progress-track {
    overflow: hidden;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(33, 107, 255, 0.08);
}

.progress-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4d93ff 0%, #2069ff 100%);
    box-shadow: 0 10px 24px rgba(33, 107, 255, 0.24);
}

.library-filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
    align-items: end;
    gap: 20px;
}

.library-filter-copy {
    display: grid;
    gap: 8px;
}

.library-filter-copy h2,
.library-export-panel h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.24rem;
    font-weight: 800;
    line-height: 1.34;
}

.library-filter-copy p,
.library-export-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.58;
}

.library-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 0.8fr)) minmax(240px, 1.2fr);
    gap: 12px;
}

.library-filter-field {
    padding: 14px;
}

.library-filter-field-keyword {
    min-width: 0;
}

.library-filter-actions {
    display: flex;
    grid-column: 2 / 3;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.library-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.library-timeline-panel {
    display: grid;
    gap: 18px;
}

.library-timeline-list {
    display: grid;
    gap: 16px;
}

.library-timeline-card {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(84, 109, 150, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 45px rgba(18, 41, 80, 0.07);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.library-timeline-card:hover {
    border-color: rgba(33, 107, 255, 0.2);
    box-shadow: 0 26px 62px rgba(18, 41, 80, 0.12);
    transform: translateY(-2px);
}

.library-date-mark {
    display: grid;
    align-self: start;
    align-content: center;
    justify-items: center;
    min-height: 82px;
    border-radius: 24px;
    color: var(--text-strong);
    border: 1px solid rgba(84, 109, 150, 0.12);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.library-date-mark span {
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
}

.library-date-mark strong {
    color: var(--text-strong);
    font-size: 0.92rem;
    font-weight: 800;
    white-space: nowrap;
}

.library-timeline-body {
    display: grid;
    gap: 14px;
}

.library-timeline-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.library-timeline-top h3 {
    margin: 10px 0 0;
    color: var(--text-strong);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.34;
}

.library-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.62;
}

.library-snapshot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.library-snapshot-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(84, 109, 150, 0.1);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0) 42%),
        rgba(248, 251, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.library-snapshot-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--brand);
    content: "";
}

.library-snapshot-card-goals::before,
.library-snapshot-card-focus::before {
    background: #216bff;
}

.library-snapshot-card-risk::before {
    background: #ffb25a;
}

.library-snapshot-card-outcome::before {
    background: #14966d;
}

.library-snapshot-card-improvement::before {
    background: #6f7ef7;
}

.library-snapshot-card-next::before {
    background: #3db5ff;
}

.library-snapshot-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.library-snapshot-heading span {
    color: var(--brand-deep);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.library-snapshot-heading strong {
    color: var(--text-strong);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.34;
}

.library-goal-preview-list,
.library-content-line-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.library-goal-preview-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.library-goal-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--brand-deep);
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(33, 107, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(33, 107, 255, 0.12);
}

.library-goal-preview-list li.is-done .library-goal-status {
    color: #0d6a4e;
    background: rgba(20, 150, 109, 0.12);
    box-shadow: inset 0 0 0 1px rgba(20, 150, 109, 0.15);
}

.library-goal-text,
.library-content-line-list li {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.5;
}

.library-goal-preview-list li.is-done .library-goal-text {
    color: var(--text-secondary);
}

.library-content-line-list li {
    position: relative;
    padding-left: 14px;
}

.library-content-line-list li::before {
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(33, 107, 255, 0.52);
    content: "";
}

.library-more-chip {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.1);
}

.library-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.library-trend-panel,
.library-calendar-panel,
.library-export-panel {
    display: grid;
    gap: 16px;
}

.library-trend-panel .panel-header h2 {
    max-width: 12em;
}

.library-trend-chart {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 10px;
    min-height: 190px;
    padding: 18px 12px 4px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.1);
}

.library-trend-bar {
    display: grid;
    grid-template-rows: 1fr auto;
    justify-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    height: 150px;
}

.library-trend-fill {
    align-self: end;
    width: min(100%, 56px);
    min-height: 10px;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #4d93ff 0%, #2069ff 100%);
    box-shadow: 0 16px 28px rgba(33, 107, 255, 0.2);
}

.library-trend-bar small {
    max-width: 60px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.library-calendar-weekdays,
.library-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.library-calendar-weekdays span {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.library-calendar-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 13px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.08);
}

.library-calendar-day.is-muted {
    color: rgba(119, 135, 161, 0.48);
    background: rgba(255, 255, 255, 0.36);
}

.library-calendar-day.has-entry {
    color: #ffffff;
    background: #6b88c6;
    box-shadow: 0 12px 24px rgba(33, 107, 255, 0.14);
}

.library-calendar-day.intensity-1 {
    background: #8aa2d6;
}

.library-calendar-day.intensity-2 {
    background: #4e82f5;
}

.library-calendar-day.intensity-3 {
    background: #14966d;
}

.library-calendar-day.is-today {
    box-shadow: 0 0 0 3px rgba(33, 107, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.library-export-panel {
    background: rgba(255, 255, 255, 0.76);
}

.export-document {
    max-width: 860px;
    margin: 0 auto;
}

.export-report {
    max-width: 920px;
}

.export-report-cover {
    position: relative;
    overflow: hidden;
}

.export-report-cover::after {
    position: absolute;
    right: -120px;
    bottom: -180px;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(33, 107, 255, 0.16) 0%, rgba(33, 107, 255, 0) 68%);
    content: "";
}

.export-document-header h2 {
    font-size: 2.2rem;
}

.export-file-name {
    display: block;
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.export-markdown h1 {
    font-size: 1.6rem;
}

.export-markdown hr {
    margin: 28px 0;
    border-color: rgba(84, 109, 150, 0.16);
}

.export-report-body {
    display: grid;
    gap: 22px;
    padding: 34px 36px 40px;
}

.export-report-summary {
    display: grid;
    grid-template-columns: 1.2fr repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.export-summary-card,
.export-report-insight,
.export-empty-state,
.export-entry-card {
    border: 1px solid rgba(84, 109, 150, 0.12);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 48px rgba(17, 34, 65, 0.07);
}

.export-summary-card {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 146px;
    padding: 22px;
    border-radius: 24px;
}

.export-summary-card-primary {
    color: var(--text-strong);
    border-color: rgba(84, 109, 150, 0.12);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 48px rgba(17, 34, 65, 0.07);
}

.export-summary-card span {
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.export-summary-card strong {
    color: var(--text-strong);
    font-size: 1.72rem;
    font-weight: 800;
    line-height: 1.1;
}

.export-summary-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.export-summary-card-primary span,
.export-summary-card-primary strong,
.export-summary-card-primary p {
    color: inherit;
}

.export-summary-card-primary span,
.export-summary-card-primary p {
    color: var(--text-secondary);
    opacity: 1;
}

.export-report-insight,
.export-empty-state {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(20, 150, 109, 0.08) 0%, rgba(20, 150, 109, 0) 28%),
        rgba(255, 255, 255, 0.78);
}

.export-report-insight h3,
.export-empty-state h3,
.export-entry-header h3 {
    margin: 8px 0 0;
    color: var(--text-strong);
    font-weight: 800;
    letter-spacing: 0;
}

.export-report-insight h3,
.export-empty-state h3 {
    font-size: 1.28rem;
}

.export-empty-state p {
    color: var(--text-secondary);
}

.export-condition-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-condition-list span,
.export-entry-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.1);
}

.export-entry-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
    border-radius: 30px;
    break-inside: avoid;
}

.export-entry-date {
    display: grid;
    align-self: start;
    align-content: center;
    justify-items: center;
    min-height: 96px;
    border-radius: 28px;
    color: var(--text-strong);
    border: 1px solid rgba(84, 109, 150, 0.12);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.export-entry-date span {
    color: var(--accent-glass-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.export-entry-date strong {
    color: var(--accent-glass-text);
    font-size: 0.94rem;
    font-weight: 800;
    white-space: nowrap;
}

.export-entry-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.export-entry-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.export-entry-header h3 {
    font-size: 1.4rem;
    line-height: 1.28;
}

.export-entry-header p {
    margin-top: 8px;
    color: var(--text-secondary);
    line-height: 1.56;
}

.export-entry-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    color: var(--brand-deep);
    font-size: 1rem;
    font-weight: 800;
    background: rgba(235, 243, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(33, 107, 255, 0.16);
}

.export-entry-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.export-entry-markdown {
    padding: 20px;
    border-radius: 22px;
    background: rgba(248, 251, 255, 0.82);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.1);
}

.export-entry-markdown.record-article-premium,
.record-article-reference {
    padding: 22px;
}

.export-entry-markdown h1,
.export-entry-markdown h2,
.export-entry-markdown h3 {
    margin-top: 24px;
}

.export-entry-markdown h1:first-child,
.export-entry-markdown h2:first-child,
.export-entry-markdown h3:first-child {
    margin-top: 0;
}

.reader-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.reader-grid-premium {
    align-items: start;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.reader-article {
    padding: 36px;
    background: rgba(255, 255, 255, 0.78);
}

.reader-article-premium {
    overflow: hidden;
    padding: 0;
    background: rgba(255, 255, 255, 0.82);
}

.reader-document-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 36px 28px;
    border-bottom: 1px solid rgba(78, 104, 145, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.reader-document-header h2 {
    margin: 10px 0 0;
    color: var(--text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

.reader-document-header p {
    max-width: 560px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.62;
}

.reader-badge {
    color: var(--brand-deep);
    background: rgba(255, 255, 255, 0.86);
}

.reader-side {
    align-content: start;
    align-self: start;
}

.reader-side-premium {
    display: grid;
    gap: 16px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.78);
}

.reader-side-header {
    margin-bottom: 2px;
}

.reader-date-card {
    padding: 22px;
    border-radius: 24px;
    color: var(--text-strong);
    border: 1px solid rgba(84, 109, 150, 0.12);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.reader-date-card span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
}

.reader-date-card strong {
    display: block;
    margin-top: 8px;
    color: var(--text-strong);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.reader-date-card p {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.56;
}

.reader-info-stack {
    display: grid;
    gap: 12px;
}

.reader-info-card,
.reader-outline-card,
.reader-helper-card {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.12);
}

.reader-info-card strong,
.reader-outline-card h3,
.reader-helper-card strong {
    color: var(--text-strong);
    font-weight: 800;
}

.reader-info-card p,
.reader-helper-card p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.56;
}

.reader-outline-card {
    display: grid;
    gap: 12px;
}

.reader-outline-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

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

.reader-outline-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.1);
}

.reader-outline-list span::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--brand);
    content: "";
}

.reader-action-stack {
    gap: 12px;
}

.reader-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reader-action-row .btn {
    flex: 1 1 0;
}

.reader-empty-state {
    display: grid;
    gap: 16px;
    padding: 34px 36px 40px;
}

.reader-empty-state h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.24;
}

.reader-empty-state p {
    max-width: 560px;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.68;
}

.reader-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.preview-markdown,
.record-article {
    font-size: 0.96rem;
    line-height: 1.74;
}

.preview-markdown h1,
.preview-markdown h2,
.preview-markdown h3,
.preview-markdown h4,
.preview-markdown h5,
.preview-markdown h6 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-strong);
    font-weight: 800;
    letter-spacing: 0;
}

.preview-markdown h1 {
    font-size: 1.8rem;
}

.preview-markdown h2 {
    font-size: 1.5rem;
}

.preview-markdown h3 {
    font-size: 1.24rem;
}

.preview-markdown p + h1,
.preview-markdown p + h2,
.preview-markdown p + h3,
.preview-markdown ul + h1,
.preview-markdown ul + h2,
.preview-markdown ul + h3 {
    margin-top: 26px;
}

.preview-markdown ul {
    display: grid;
    gap: 12px;
    padding-left: 20px;
}

.preview-markdown li {
    color: var(--text-primary);
    line-height: 1.62;
}

.preview-markdown li input[type="checkbox"] {
    margin-right: 10px;
    transform: translateY(2px);
}

.preview-markdown p {
    color: var(--text-secondary);
}

.record-article-premium {
    padding: 34px 36px 40px;
}

.record-article-premium h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 34px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(84, 109, 150, 0.12);
    font-size: 1.26rem;
    line-height: 1.34;
}

.record-article-premium h2:first-child {
    margin-top: 0;
}

.record-article-premium h2::before {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #4d93ff 0%, #2069ff 100%);
    box-shadow: 0 0 0 5px rgba(33, 107, 255, 0.1);
    content: "";
}

.record-article-reference h2 {
    margin-top: 24px;
    font-size: 1.14rem;
}

.record-article-reference li {
    min-height: 42px;
    padding-top: 11px;
    padding-bottom: 11px;
}

.export-entry-markdown.record-article-premium h2 {
    margin-top: 26px;
    font-size: 1.18rem;
}

.export-entry-markdown.record-article-premium li {
    min-height: 42px;
    padding-top: 11px;
    padding-bottom: 11px;
}

.record-article-premium ul {
    gap: 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.record-article-premium li {
    position: relative;
    min-height: 48px;
    padding: 13px 16px 13px 42px;
    border: 1px solid rgba(84, 109, 150, 0.1);
    border-radius: 18px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 12px 28px rgba(18, 41, 80, 0.05);
}

.record-article-premium li::before {
    position: absolute;
    top: 21px;
    left: 20px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(33, 107, 255, 0.78);
    content: "";
}

.record-article-premium li:has(input[type="checkbox"]) {
    padding-left: 54px;
}

.record-article-premium li:has(input[type="checkbox"])::before {
    display: none;
}

.record-article-premium li:has(input[type="checkbox"]:checked) {
    border-color: rgba(20, 150, 109, 0.18);
    color: #0c5c45;
    background: rgba(225, 249, 240, 0.72);
}

.record-article-premium li input[type="checkbox"] {
    position: absolute;
    top: 14px;
    left: 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #14966d;
    transform: none;
}

.empty-state {
    padding: 24px;
    border: 1px dashed rgba(100, 124, 164, 0.28);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.56);
}

.empty-state strong {
    color: var(--text-strong);
    font-size: 0.98rem;
    font-weight: 800;
}

.empty-state-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.empty-inline {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(241, 245, 252, 0.9);
}

.week-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.helper-stack-tight {
    gap: 14px;
}

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

.helper-stack-tight .helper-card {
    display: flex;
    align-items: center;
    min-height: 64px;
}

.week-nav-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.week-nav-card {
    display: grid;
    gap: 5px;
    justify-items: center;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.12);
}

.week-nav-card strong {
    color: var(--text-strong);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.2;
}

.week-nav-card span {
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25;
}

.week-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.week-range-row .section-subtitle {
    margin-top: 0;
}

.week-current-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: fit-content;
    min-height: 30px;
    padding: 6px 13px;
    border-radius: 999px;
    color: var(--brand-deep);
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 0 0 1px rgba(33, 107, 255, 0.16),
        0 8px 18px rgba(33, 107, 255, 0.06);
}

.week-current-link.is-active {
    color: var(--text-tertiary);
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(84, 109, 150, 0.12);
}

.action-stack {
    gap: 14px;
}

.action-stack-inline {
    flex-wrap: wrap;
    margin-top: 6px;
}

.text-danger {
    font-size: 0.86rem;
    font-weight: 700;
}

.error-state-panel {
    display: grid;
    gap: 28px;
    justify-items: center;
    min-height: 360px;
    align-content: center;
    padding: 48px;
    text-align: center;
    background:
        radial-gradient(circle at top right, rgba(33, 107, 255, 0.14) 0%, rgba(33, 107, 255, 0) 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 255, 0.86) 100%);
}

.error-layout-centered {
    display: grid;
    grid-template-columns: minmax(0, var(--auth-card-width));
    align-items: center;
    justify-content: center;
    min-height: min(640px, calc(100vh - 230px));
    padding: 36px 0 52px;
}

.error-state-panel .section-title {
    margin: 0;
}

.error-state-panel .section-subtitle {
    max-width: 560px;
}

.error-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.error-action-row .btn {
    min-width: 160px;
}

@media (max-width: 1180px) {
    .hero-grid,
    .auth-layout,
    .operations-grid,
    .operations-trend-grid,
    .workspace-grid-two,
    .reflection-layout,
    .reader-grid,
    .library-filter-panel,
    .library-layout,
    .editor-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .workspace-meta-stack {
        min-width: 0;
    }

    .summary-card-featured {
        grid-column: span 2;
    }

    .library-filter-actions {
        grid-column: auto;
        justify-content: flex-start;
    }
}

@media (max-width: 920px) {
    .topbar-shell {
        grid-template-columns: 1fr;
        justify-items: stretch;
        gap: 16px;
        padding: 18px 20px;
        border-radius: 28px;
    }

    .primary-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .topbar-actions,
    .session-cluster,
    .guest-actions,
    .workspace-header,
    .panel-header,
    .progress-card-top,
    .progress-card-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        grid-column: auto;
        justify-self: stretch;
    }

    .workspace-meta-stack,
    .auth-stat-grid,
    .hero-glance-row {
        grid-template-columns: 1fr;
    }

    .workspace-meta-stack-single {
        justify-self: stretch;
        width: 100%;
    }

    .workspace-header {
        grid-template-columns: 1fr;
    }

    .workspace-header-copy {
        min-height: auto;
        width: 100%;
        padding-left: 0;
    }

    .panel-header p {
        max-width: none;
    }

    .hero-metric-grid,
    .feature-grid,
    .summary-grid,
    .operations-summary-grid,
    .export-report-summary,
    .library-filter-grid,
    .helper-stack-tight,
    .week-nav-pair {
        grid-template-columns: 1fr;
    }

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

    .summary-card-featured {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    :root {
        --frame-width: calc(100vw - 24px);
    }

    .app-header {
        padding: 10px 0 0;
    }

    .app-header.is-scrolled {
        padding-top: 8px;
    }

    .app-main {
        padding: 18px 0 56px;
    }

    .surface-panel,
    .hero-panel-primary,
    .reader-article {
        padding: 24px 20px;
        border-radius: 24px;
    }

    .reader-article-premium {
        padding: 0;
    }

    .reader-document-header {
        flex-direction: column;
        padding: 26px 22px 22px;
    }

    .reader-document-header h2 {
        font-size: 1.55rem;
    }

    .record-article-premium {
        padding: 26px 22px 30px;
    }

    .reader-side-premium {
        padding: 22px;
    }

    .reader-empty-state {
        padding: 28px 22px 32px;
    }

    .reader-empty-state h2 {
        font-size: 1.45rem;
    }

    .reader-empty-actions,
    .reader-action-row {
        flex-direction: column;
    }

    .brand-copy small {
        display: none;
    }

    .topbar-shell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px 12px;
        padding: 12px 14px;
        border-radius: 26px;
    }

    .brand-lockup {
        gap: 10px;
        min-width: 0;
        flex: 0 0 auto;
    }

    .brand-symbol {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .brand-copy {
        display: none;
    }

    .primary-nav {
        order: 3;
        flex: 0 0 100%;
        justify-content: flex-start;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 2px;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .primary-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-chip {
        min-height: 32px;
        padding: 0 10px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .topbar-actions {
        order: 2;
        width: auto;
        margin-left: auto;
        flex: 0 0 auto;
        justify-self: auto;
    }

    .session-cluster,
    .guest-actions {
        width: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .session-chip {
        display: none;
    }

    .topbar-actions form {
        display: inline-flex;
    }

    .verification-banner {
        gap: 12px;
        padding: 14px 16px;
    }

    .verification-banner-copy {
        gap: 4px;
    }

    .verification-banner-copy p {
        overflow-wrap: anywhere;
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .auth-helper {
        flex-direction: column;
        gap: 8px;
    }

    .auth-helper-separator {
        display: none;
    }

    .display-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .hero-action-row,
    .button-inline-row,
    .pill-row,
    .action-stack,
    .empty-state-actions,
    .action-stack-inline {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .btn.btn-sm,
    .btn.btn-lg {
        width: 100%;
    }

    .topbar-actions .btn,
    .topbar-actions .btn.btn-sm,
    .topbar-actions form .btn {
        width: auto;
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.8rem;
    }

    .entry-card {
        grid-template-columns: auto 1fr;
    }

    .entry-card-action {
        grid-column: 2 / 3;
        justify-self: start;
    }

    .goal-toggle-card {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .library-timeline-card,
    .export-entry-card {
        grid-template-columns: 1fr;
    }

    .library-snapshot-grid {
        grid-template-columns: 1fr;
    }

    .library-timeline-top,
    .library-card-meta,
    .export-entry-header,
    .library-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .export-report-body {
        padding: 24px 20px 28px;
    }

    .export-entry-card {
        gap: 16px;
        padding: 18px;
        border-radius: 24px;
    }

    .export-entry-date {
        min-height: 76px;
    }

    .progress-percent-badge {
        min-width: 72px;
        min-height: 72px;
        font-size: 1.02rem;
    }

    .footer-shell {
        align-items: center;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
        border-radius: 24px;
    }

    .footer-brand,
    .footer-contact,
    .footer-year {
        justify-self: center;
    }

    .workspace-meta-card,
    .hero-story-card,
    .auth-floating-card,
    .auth-stat-card {
        padding: 18px 16px;
        border-radius: 20px;
    }

    .error-state-panel {
        min-height: 420px;
        padding: 32px 22px;
    }

    .error-action-row {
        flex-direction: column;
    }
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    body.app-body {
        color: #111827;
        background: #ffffff;
    }

    .app-background,
    .app-header,
    .app-footer,
    .page-flash-stack,
    .verification-banner,
    .print-toolbar {
        display: none !important;
    }

    .app-main {
        padding: 0;
    }

    .app-frame {
        width: 100%;
    }

    .surface-panel,
    .reader-article,
    .reader-article-premium {
        border: 0;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
        backdrop-filter: none;
    }

    .surface-panel::before,
    .surface-panel::after {
        display: none;
    }

    .export-document {
        max-width: none;
    }

    .reader-document-header,
    .record-article-premium {
        padding: 0 0 24px;
    }

    .export-report-body {
        gap: 16px;
        padding: 20px 0 0;
    }

    .export-report-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .export-summary-card,
    .export-report-insight,
    .export-empty-state,
    .export-entry-card,
    .export-entry-markdown {
        border-color: #dbe3ef;
        background: #ffffff;
        box-shadow: none;
    }

    .export-summary-card-primary,
    .export-entry-date {
        color: #13233c;
        background: #e6f0ff;
    }

    .export-summary-card {
        min-height: 0;
        padding: 14px;
        border-radius: 16px;
        break-inside: avoid;
    }

    .export-summary-card strong {
        font-size: 1.24rem;
    }

    .export-report-insight,
    .export-empty-state {
        padding: 16px;
        border-radius: 18px;
        break-inside: avoid;
    }

    .export-entry-card {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 16px;
        padding: 16px;
        border-radius: 20px;
        page-break-inside: avoid;
    }

    .export-entry-date {
        min-height: 74px;
        border-radius: 18px;
    }

    .export-entry-header h3 {
        font-size: 1.1rem;
    }

    .export-entry-score {
        width: 58px;
        height: 58px;
    }

    .export-entry-markdown {
        padding: 14px;
        border-radius: 16px;
    }

    .record-article-premium li {
        break-inside: avoid;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
