@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --base-primary: #1A8CFF;
    --base-skyblue: #4DC3FF;
    --base-purple: #9966FF;
    --base-orange: #FF884D;
    --base-yellow: #FFE14D;
    --base-green: #40BF40;
    --base-black: #0D3654;
    --base-white: #fff;

    --function-submit: var(--base-primary);
    --function-link: var(--base-primary);
    --function-payment: var(--base-purple);
    --function-success: var(--base-green);

    --pastel-gray-light: #FBFBFB;
    --pastel-gray: #F5F5F5;
    --pastel-gray-dark: #F0F0F0;
    --pastel-skyblue-light: #F5FCFF;
    --pastel-skyblue: #D6F1FF;
    --pastel-purple-light: #F8F5FF;
    --pastel-purple: #F2EBFF;
    --pastel-orange-light: #FFF8F5;
    --pastel-orange: #FFEBE0;
    --pastel-yellow-light: #FFFCEB;
    --pastel-yellow: #FFF5C2;
    --pastel-green-light: #F4FBF4;
    --pastel-green: #E0F5E0;

    --border-base: #C2CCD6;
    --border-light: #D7E1EA;
    --border-bright: #85B2E0;
    --border-bright-50: rgba(133, 178, 224, 0.5);

    --text-base: var(--base-black);
    --text-sub: #818F98;
    --text-sample: #ABB4BA;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-base: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Element Padding */
    --pad-btn-base: 0.5rem 1.0rem;
    --pad-btn-sm: 0.125rem 0.75rem;
    --pad-input-base: 0.5rem 0.5rem;
    --pad-input-lg: 0.75rem 0.75rem;
    --pad-badge-base: 0.125rem 0.5rem;

    /* Borders */
    --radius-sm: 5px;
    --radius-base: 8px;
    --radius-lg: 10px;
    --radius-xl: 20px;
    --radius-2l: 30px;
    --radius-full: 50vh;

    /* Typography (Font Sizes) */
    /* 
    10px: 0.625rem 
    11px: 0.6875rem 
    12px: 0.75rem 
    13px: 0.8125rem 
    14px: 0.875rem 
    15px: 0.9375rem 
    16px: 1rem 
    17px: 1.0625rem 
    18px: 1.125rem 
    19px: 1.1875rem 
    20px: 1.25rem 
    21px: 1.3125rem 
    22px: 1.375rem 
    23px: 1.4375rem 
    24px: 1.5rem 
    25px: 1.5625rem 
    26px: 1.625rem 
    27px: 1.6875rem 
    28px: 1.75rem 
    29px: 1.8125rem 
    30px: 1.875rem 
    32px: 2rem
    36px: 2.25rem
    40px: 2.5rem
    48px: 3rem
    56px: 3.5rem
    64px: 4rem
    */

    --fs-3s: 0.75rem;
    --fs-xs: 0.875rem;
    --fs-sm: 0.9375rem;
    --fs-base: 1rem;
    --fs-lg: 1.0625rem;
    --fs-xl: 1.0625rem;
    --fs-2l: 1.125rem;
    --fs-3l: 1.25rem;
    --fs-4l: 1.375rem;
    --fs-5l: 1.5rem;
    --fs-6l: 1.75rem;
    --fs-7l: 2rem;
    --fs-8l: 3rem;

    /* Font Weights */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-bold: 600;

    /* Line Height */
    --line-height-sm: 1.6;
    --line-height-base: 1.8;
    --line-height-lg: 2.0;

    /* Width */
    --width-xs: 510px;
    --width-sm: 590px;
    --width-md: 800px;
    --width-lg: 900px;
    --width-xl: 1050px;
    --width-max: 1200px;
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans JP", sans-serif;
    color: var(--text-base);
    font-size: var(--fs-base);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--base-primary);
    text-decoration: none;
    transition: color 0.2s;
}

small {
    font-size: 87.25%;
    font-weight: var(--fw-normal);
    color: var(--text-sub);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    padding: var(--pad-input-base);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-base);
    font-size: var(--fs-base);
    box-sizing: border-box;
}

button {
    padding: var(--pad-btn-base);
    background: var(--base-white);
    border: 1px solid var(--base-primary);
    border-radius: var(--radius-full);
    color: var(--base-primary);
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

button:hover {
    background-color: var(--base-primary);
    color: var(--base-white);
}

label {
    color: var(--text-sub);
    font-size: var(--fs-sm);
}

input[type="checkbox"]+label,
input[type="radio"]+label {
    margin-bottom: 0;
    font-size: var(--fs-base);
    color: var(--text-main);
    cursor: pointer;
}

hr {
    margin: var(--space-lg) 0;
    border: none;
    border-bottom: 1px solid var(--border-main);
}

/* Layout Components */
.container {
    max-width: var(--width-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.page-section {
    padding: var(--space-xl) var(--space-sm);
}

/* Notification Banner */
.notification-banner {
    background-color: var(--color-primary-light, #e3f2fd);
    color: var(--color-primary-dark, #0d47a1);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-primary, #2196f3);
    display: none;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.notification-banner__content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}

.notification-banner__close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.5rem;
    color: inherit;
    opacity: 0.7;
}

.notification-banner__close:hover {
    opacity: 1;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    z-index: 50;
    width: 100%;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    background: var(--base-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1em;
    padding-bottom: .25em;
}

.site-header-nav {
    padding-top: .5em;
    padding-bottom: .5em;
}

.site-header-slogan {
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
}

.site-header-logo img {
    height: 50px;
}

.site-header-controller ul {
    display: flex;
    align-items: center;
    gap: .75em;
    list-style: none;
}

.site-header-controller__balance {
    font-size: var(--fs-xl);
    font-weight: var(--fw-medium);
}

.site-header-controller__balance-unit {
    font-size: var(--fs-3s);
}

.site-header-controller__link {}

.site-header-controller__link img {
    width: 24px;
    height: 24px;
}

.site-header-controller__lang-selector {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: -12px;
}

.site-header-controller__lang-dropdown {
    position: absolute;
    top: calc(100% - 5px);
    right: 0;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 6px;
    display: none;
    z-index: 1000;
    flex-direction: column;
}

.site-header-controller__lang-selector:hover .site-header-controller__lang-dropdown {
    display: flex;
    animation: dropdownFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header-controller__lang-dropdown a {
    padding: 10px 14px;
    color: var(--text-base);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-base);
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header-controller__lang-dropdown a:hover {
    background: var(--pastel-skyblue-light);
    color: var(--base-primary);
}

.site-header-controller__lang-dropdown a.is-active {
    background: var(--pastel-skyblue);
    color: var(--base-primary);
}

.site-header-controller__lang-dropdown a.is-active::after {
    content: "✓";
    font-size: 0.75rem;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.site-header-nav nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2em;
}

.site-header-nav nav ul li {
    list-style: none;
    letter-spacing: .1em;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

.site-header-nav nav ul li a {
    color: var(--text-main);
}

.page-header {
    background: linear-gradient(135deg, var(--pastel-yellow-light) 25%, var(--pastel-orange-light) 75%);
    ;
}

/* analysis-form */
.analysis-form.is-card {
    padding: 4px;
}

.analysis-form.is-card .analysis-form__inner {
    position: relative;
    padding: var(--space-base) var(--space-lg);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    z-index: 0;
}

.analysis-form.is-card .analysis-form__inner::before {
    content: "";
    position: absolute;
    z-index: -1;
    padding: 4px;
    inset: -4px;
    background: linear-gradient(135deg, #1919FF 0%, #1A8CFF 50%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    border-radius: inherit;
}

.analysis-form.is-card .analysis-form__title {
    margin-bottom: var(--space-xs);
    font-size: var(--fs-lg);
    font-weight: var(--fw-medium);
}

.analysis-form.is-card .analysis-form__notes {
    margin-top: var(--space-sm);
    font-size: var(--fs-3s);
    text-align: center;
    color: var(--text-sub);
}

.birthdate-inputs {}

.birthdate-inputs .birthdate-inputs__group {
    margin-bottom: var(--space-sm);
}

.birthdate-inputs .birthdate-inputs__group.is-select {}

.birthdate-inputs .birthdate-inputs__group.is-text {}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__label {
    font-size: var(--fs-3s);
    color: var(--text-sub);
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__text input {
    width: 100%;
    padding: 0.75rem 1.0rem;
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects {
    display: flex;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-base);
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects select {
    padding: 0.75rem 0.75rem;
    border: none;
    border-right: 1px dashed var(--border-bright-50);
    border-radius: 0;
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects select:first-child {
    border-radius: var(--radius-base) 0 0 var(--radius-base);
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects select:last-child {
    border: 0;
    border-radius: 0 var(--radius-base) var(--radius-base) 0;
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects select:focus {
    outline: none;
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects__year {
    width: 40%;
}

.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects__month,
.birthdate-inputs .birthdate-inputs__group .birthdate-inputs__selects__day {
    width: 30%;
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary));
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Cards (Glassmorphism) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card--centered {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.card__desc {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    flex-grow: 1;
}

.card__link {
    font-weight: 600;
    text-decoration: none;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.card__link:hover {
    transform: translateX(4px);
}

/* Features Section */
.features {
    padding: var(--space-xl) 0;
}

.features__title {
    /* Title styling if not covered by utility */
    margin-bottom: var(--space-lg);
}

/* Footer */
.footer {
    margin-top: var(--space-xl);
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: 1px solid var(--color-border);
    color: var(--text-muted);
}

.footer-container {
    text-align: left;
}

.footer-sitemap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-column__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-main);
}

.footer-column__list {
    list-style: none;
    padding: 0;
}

.footer-column__list li {
    margin-bottom: var(--space-xs);
}

.footer-column__list a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-column__list a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

@media (max-width: 768px) {
    .footer-sitemap {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .footer-sitemap {
        grid-template-columns: 1fr;
    }
}

/* Locale Switcher */
.locale-select {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--text-main);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.locale-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Page Headers */
.page-header {
    padding-top: var(--header-height, 113px);
}

.page-header__inner {
    padding: var(--space-xl) 0;
}

.page-header-home__wrapper {
    display: flex;
    gap: 40px;
    margin: 0 auto;
    max-width: var(--width-md);
}

.page-header-home__phrases {
    flex-basis: calc(100% - 350px - 40px);
}

.page-header-home__analysis-form {
    flex-basis: 350px;
}

.page-header-home__phrases h1 {
    font-size: 2.5rem;
}

/* Type Listing Cards */
.type-card {
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.type-card__image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto var(--space-sm);
    border: 4px solid var(--color-primary-light);
}

.type-card__placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--color-border);
    margin: 0 auto var(--space-sm);
}

.type-card__slug {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: var(--space-xs);
    letter-spacing: 2px;
}

.type-card__desc {
    font-size: 0.9rem;
}

/* Type Detail Header */
.type-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.type-header__image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    border: 4px solid var(--color-primary-light);
    box-shadow: var(--shadow-md);
}

.type-header__slug {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: var(--space-xs);
}

.type-header__title {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.type-header__desc {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Post Cards */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.tag-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--text-sub);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-link:hover,
.tag-link.is-active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.post-card {
    text-decoration: none;
    color: inherit;
}

.post-card__meta {
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Article Content Wrapper */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    background: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.article-content p {
    margin-bottom: var(--space-sm);
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.article-content__paywall {
    margin-top: var(--space-xl);
    text-align: center;
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
}

.article-content__paywall-title {
    margin-bottom: var(--space-sm);
}

.article-content__paywall-desc {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* Group Headers */
.type-group-title {
    margin-top: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.type-group-title--first {
    margin-top: 2rem;
}

/* Grid Layout Utilities */
.grid-full-width {
    grid-column: 1 / -1;
}

/* Paywall / Disabled Button */
.btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms & Alerts */
.page-narrow {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.back-link {
    display: inline-block;
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group--lg {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 700;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.alert {
    display: block;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    margin-bottom: var(--space-md);
}

.alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

/* Special Content Areas */
.content-area--member {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 2px dashed var(--text-muted);
    border-radius: 8px;
}

.content-area--member .content-area__title {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.content-area--exclusive {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 2px dashed #d4af37;
    background: #fffdf5;
    border-radius: 8px;
}

.content-area--exclusive .content-area__title {
    color: #b8860b;
    margin-bottom: 1rem;
}

/* Debug Panels */
.debug-panel {
    font-size: 0.85rem;
    background: #f8f9fa;
    padding: 1rem;
    margin-top: 2rem;
    color: var(--text-main);
    text-align: left;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.debug-panel--small {
    font-size: 0.75rem;
    padding: 0.5rem;
    margin-top: 1rem;
    border-radius: 4px;
}

.debug-panel__title {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
    font-size: 1.125rem;
}

.debug-panel__code {
    max-height: 100px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.debug-panel__code--large {
    max-height: 200px;
}

.debug-panel pre {
    white-space: pre-wrap;
    margin: 0;
}

/* Header Enhancements */
.header-nav__locale-select {
    margin-right: 15px;
}

.header-nav__balance {
    margin-right: 15px;
    color: var(--color-primary);
    font-weight: bold;
}

/* --- Form Components --- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group--lg {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 700;
}

.form-help {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-form-card {
    max-width: 400px;
    margin: var(--space-xl) auto;
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-form-card h1 {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.auth-form-card .btn-primary {
    width: 100%;
    padding: var(--space-sm);
    font-size: 1.125rem;
    margin-top: var(--space-md);
}

.auth-form-footer {
    text-align: center;
    margin-top: var(--space-md);
}

.auth-form-footer p {
    margin: var(--space-xs) 0;
}

/* --- Page Components --- */

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
}

.page-narrow {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.loading-overlay {
    text-align: center;
    display: none;
    padding: 20px 0;
}

.btn-full {
    width: 100%;
}

.mt-md {
    margin-top: var(--space-md);
}

/* Analysis Results */
.mbti-type-badge {
    display: inline-block;
    font-size: 2rem;
    font-weight: bold;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.stats-table-wrapper {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.stats-table-header {
    border-bottom: 2px solid var(--color-border);
    text-align: left;
}

.stats-table-row {
    border-bottom: 1px solid var(--color-border);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Paywall & Content Areas */
.paywall-placeholder {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
}

.content-area__title {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-footer {
    margin-top: var(--space-md);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--color-surface);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.is-active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-weight: 700;
    font-size: var(--text-xl);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: var(--space-lg);
    line-height: var(--line-height-lg);
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    background: #f9fafb;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.flex-center {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.badge-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-secondary {
    background: var(--color-border);
    color: var(--text-sub);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

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

.d-inline-block {
    display: inline-block;
}

.mb-md {
    margin-bottom: var(--space-md);
}

/* --- Layout Utilities --- */
.flex {
    display: flex;
}

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

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

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.flex-1-2 {
    flex: 1.2;
}

.flex-1-5 {
    flex: 1.5;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-xs {
    gap: 0.25rem;
}

.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 1rem;
}

.min-w-0 {
    min-width: 0;
}

.d-block {
    display: block;
}

.d-none {
    display: none;
}

.w-full {
    width: 100%;
}

/* --- Spacing Utilities --- */
.m-0 {
    margin: 0;
}

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

.mb-0 {
    margin-bottom: 0;
}

.mt-xs {
    margin-top: 0.25rem;
}

.mt-sm {
    margin-top: 0.5rem;
}

.mt-md {
    margin-top: 1rem;
}

.mt-lg {
    margin-top: 1.5rem;
}

.mb-xs {
    margin-bottom: 0.25rem;
}

.mb-sm {
    margin-bottom: 0.5rem;
}

.mb-md {
    margin-bottom: 1rem;
}

.mb-lg {
    margin-bottom: 1.5rem;
}

.p-xs {
    padding: 0.25rem;
}

.p-sm {
    padding: 0.5rem;
}

.p-md {
    padding: 1rem;
}

.py-xs {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-sm {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-md {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.px-xs {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-sm {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-md {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* --- Typography Utilities --- */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.text-right {
    text-align: right;
}

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

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

/* --- Component Wrappers --- */
.auth-card {
    max-width: 400px;
    margin: var(--space-xl) auto;
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.auth-card form .form-group:last-of-type {
    margin-bottom: var(--space-lg);
}

.auth-card .btn-primary {
    width: 100%;
    padding: var(--space-md);
    font-size: 1.125rem;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: var(--space-md);
    border-radius: var(--radius-md);
}

.stats-table-cell {
    padding: 0.5rem;
}

/* --- Static Page Component --- */
.static-page {
    max-width: 800px;
    margin: 0 auto;
}

.static-page__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.static-page__content {
    background: var(--color-surface);
    padding: var(--space-xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
}

.static-page__content h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: var(--space-xs);
}

/* --- Improved Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.card--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- Stats Component --- */
.stats-breakdown {
    margin-top: var(--space-xl);
}

.stats-card {
    background: var(--color-surface-variant);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

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

/* --- Type Detail Component --- */
.type-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.type-header {
    margin-bottom: var(--space-xl);
}

.type-header__image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: var(--space-md);
}

.type-header__badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-weight: bold;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.type-header__title {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.type-header__summary {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

.content-restricted {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-surface-variant);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
    text-align: left;
}

.content-restricted--premium {
    border-left-color: var(--color-accent);
}

.paywall {
    padding: var(--space-lg);
    text-align: center;
    background: rgba(var(--color-primary-rgb), 0.05);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.text-success {
    color: #155724;
}

.text-error {
    color: #721c24;
}