:root {
    /* Nodoka Note - Haru Midori (Spring Green) Theme Tokens */
    --green: #7CBD4A;
    --green-dark: #3B6D11;
    --green-deep: #27500A;
    --green-light: #EAF3DE;
    --green-mid: #C0DD97;
    --amber: #F9B84A;
    --amber-dark: #C47B1A;
    --bg: #F7F4EE;
    --white: #FFFFFF;
    --text: #2C2C2A;
    --muted: #5F6B52;
    --hint: #888780;
    --border: #D8ECC8;
    
    /* Functional Tokens */
    --accent-primary: var(--green);
    --accent-secondary: var(--amber);
    --accent-gradient: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%);
    --bg-main: var(--bg);
    --bg-card: var(--white);
    --border-soft: rgba(124, 189, 74, 0.2);
    --text-primary: var(--text);
    --text-secondary: var(--muted);
    
    /* Shadows & Effects (Softened for the new theme) */
    --shadow-sm: 0 1px 8px rgba(59, 109, 17, 0.06);
    --shadow-md: 0 4px 12px rgba(59, 109, 17, 0.08);
    --shadow-lg: 0 8px 24px rgba(59, 109, 17, 0.12);
    --glass-blur: blur(8px);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-size: 17px; /* 2026 Blog Standard */
}

/* Unified Background Decoration */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(100px);
}
.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: drift 20s infinite alternate;
}
.blob-1 { width: 500px; height: 500px; background: var(--green); top: -200px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--amber); bottom: -100px; left: -100px; }

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

/* Main Layout */
.app-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    flex: 1;
}

header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    padding: 2rem 0;
}

h1 {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--green-deep);
    letter-spacing: -0.01em;
}

.subtitle {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

h1 em {
    color: var(--green);
    font-style: normal;
}

.main-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

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

/* Glass Card - Updated for Light Mode */
.glass-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Forms */
.form-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.section-header {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--green-light);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"] {
    width: 100%;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.125rem;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--green);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--green-light);
}

.unit {
    position: absolute;
    right: 1.125rem;
    color: var(--hint);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Dashboard */
.results-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.summary-stat {
    position: relative;
    padding: var(--spacing-md);
    overflow: hidden;
}

.summary-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--green);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--hint);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value span {
    color: var(--green-dark);
}

.stat-subtext {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green);
    margin-top: 4px;
}

/* Charts Area */
.chart-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.chart-container {
    padding: 0;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer & Navigation */
footer {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--white);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: var(--spacing-lg);
}

.footer-nav a {
    color: var(--muted) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 30px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-nav a:hover {
    color: var(--green-dark) !important;
    background: var(--green-light);
    transform: translateY(-2px);
    border-color: var(--green);
}

.footer-nav a.active {
    color: var(--green-deep) !important;
    background: var(--green-light);
    border-color: var(--green);
    font-weight: 700;
    pointer-events: none;
}

.disclaimer {
    max-width: 800px;
    margin: 1.5rem auto 0;
    padding: 1.25rem;
    background: var(--green-light);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--green-deep);
}

.copyright {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--hint);
}

/* Portal Specific Styles */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 1rem;
}

.portal-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--green);
}

.portal-icon {
    width: 60px;
    height: 60px;
    background: var(--green-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    margin-bottom: 1.25rem;
}

.portal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.portal-desc {
    font-size: 0.95rem;
    color: var(--muted);
    flex-grow: 1;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.portal-btn {
    display: inline-block;
    padding: 0.9rem 1.5rem;
    background: var(--green-light);
    color: var(--green-deep);
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.portal-card:hover .portal-btn {
    background: var(--green);
    color: var(--white);
}

.badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 600;
}

.badge-standard { background: var(--green-light); color: var(--green-deep); }
.badge-advanced { background: #E6F1FB; color: #185FA5; }
.badge-pro { background: #FAEEDA; color: #C47B1A; }
.badge-ultra { background: #EEEDFE; color: #3C3489; }
.badge-life { background: #FCEBEB; color: #A32D2D; }

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--green-mid);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-card, .chart-box, .portal-card {
    animation: fadeIn 0.6s ease-out forwards;
}
