/* ==========================================================================
   Four Pillars - Global Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables & Reset
   -------------------------------------------------------------------------- */
:root {
    --primary-color: #333333;
    /* Dark Gray */
    --accent-color: #5D5DFF;
    /* Point Blue */
    --bg-color: #F5F5F7;
    /* Apple-style Background */
    --text-color: #111111;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --white: #FFFFFF;
    --border-color: #EAEAEA;
    --error-color: #DC2626;
    --success-color: #059669;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */
.brand-logo {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: inline-block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
}

.hanja-text {
    font-family: 'Noto Serif KR', serif;
}

/* --------------------------------------------------------------------------
   3. Layouts
   -------------------------------------------------------------------------- */

/* Dashboard Layout (App-Shell) */
.dashboard-body {
    background-color: var(--white);
    display: block;
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll */
}

.dashboard-layout {
    display: flex;
    flex-direction: row;
    /* Desktop: Sidebar Left, Content Right */
    height: 100vh;
    height: 100dvh;
}

.dashboard-sidebar {
    width: 200px;
    background: #F8F9FA;
    border-right: 1px solid #E8EAED;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    flex-shrink: 0;
    overflow-y: auto;
    z-index: 200;
}

.dashboard-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    /* Scroll is here now */
    position: relative;
    height: 100vh;
}

.dashboard-topbar {
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid #E8EAED;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    transition: box-shadow 0.3s ease;
}

.dashboard-topbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.dashboard-main {
    flex: 1;
    overflow: visible;
    padding: 40px 60px 40px 60px;
    position: relative;
    background-color: var(--white);
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 64px;
    /* Generous spacing between sections */
    width: 100%;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 64px;
    /* Match dashboard-content gap for consistency */
}

.dashboard-footer {
    padding: 32px 0;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-family: 'Noto Sans KR', sans-serif;
    border-top: 1px solid #E8EAED;
    margin-top: 64px;
}

/* --------------------------------------------------------------------------
   4. Common Components
   -------------------------------------------------------------------------- */

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: #1A73E8;
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    min-height: 56px;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-primary:hover {
    background: #1765CC;
    transform: scale(1.01);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #E0E0E0;
    color: #AAA;
    cursor: not-allowed;
    transform: none;
}

/* Inputs */
.input-field {
    width: 100%;
    font-size: 1.1rem;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #DADCE0;
    border-radius: 4px;
    transition: 0.3s;
    background: #FFFFFF;
    box-sizing: border-box;
    min-height: 56px;
    font-family: 'Noto Sans KR', sans-serif;
}

.input-field:focus {
    border-color: #1A73E8;
    background: var(--white);
    outline: none;
    box-shadow: 0 0 0 1px #1A73E8;
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px 0 12px;
    height: 48px;
    color: #5F6368;
    text-decoration: none;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.nav-item:hover {
    background: #E0E0E0;
    color: #202124;
}

.nav-item.active {
    background: #E8F0FE;
    /* Google Blue Tint */
    color: #1A73E8;
    font-weight: 600;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item.active svg {
    color: #1A73E8;
}

.lang-dropdown {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid #DDD;
    border-radius: 6px;
    padding: 4px 24px 4px 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px auto;
    transition: all 0.2s;
}

.lang-dropdown:hover {
    border-color: #BBB;
    color: #333;
}

.lang-dropdown:focus {
    outline: none;
    border-color: var(--text-tertiary);
}

/* --------------------------------------------------------------------------
   5. Features
   -------------------------------------------------------------------------- */

/* ==========================================================================
   HERO PROFILE SECTION (Google-Style Modern Dashboard)
   ========================================================================== */

.profile-header-hero {
    background: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 16px;
    padding: 48px 40px 40px 40px;
    margin-bottom: 0;
    color: #202124;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.05);
}

.profile-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-main-info {
    display: flex;
    gap: 24px;
    align-items: center;
    flex: 1;
    min-width: 300px;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #F8F9FA;
    border: 2px solid #E8EAED;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.avatar-character {
    font-family: 'Noto Serif KR', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.avatar-element-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #FFFFFF;
    color: #202124;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #E8EAED;
}

.profile-title-group {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #202124;
}

.profile-metadata-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.profile-metadata-inline .metadata-item {
    gap: 6px;
}

.profile-metadata-inline .meta-text {
    font-size: 0.85rem;
}

.profile-subtitle {
    font-size: 1rem;
    margin: 0 0 16px 0;
    color: #5F6368;
}

.profile-quick-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-chip {
    background: #F8F9FA;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #202124;
    border: 1px solid #E8EAED;
}

.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-action-primary,
.btn-action-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
    height: 36px;
}

.btn-action-primary {
    background: #1A73E8;
    color: #FFFFFF;
}

.btn-action-primary:hover {
    background: #1765CC;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-action-secondary {
    background: #FFFFFF;
    color: #5F6368;
    border: 1px solid #DADCE0;
}

.btn-action-secondary:hover {
    background: #F8F9FA;
    border-color: #DADCE0;
}

.profile-metadata-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #E8EAED;
    flex-wrap: wrap;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metadata-item svg {
    flex-shrink: 0;
    color: #5F6368;
}

.meta-text {
    font-size: 0.9rem;
    color: #5F6368;
    font-weight: 400;
}

.metadata-divider {
    color: #DADCE0;
    font-size: 0.9rem;
    user-select: none;
}

.placeholder-badge {
    background: #F8F9FA;
    border: 1px dashed #DADCE0;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    color: #80868B;
    font-weight: 500;
    height: 36px;
    display: inline-flex;
    align-items: center;
}

/* Legacy metadata-chip styles (deprecated, kept for compatibility) */
.metadata-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F8F9FA;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #E8EAED;
}

.metadata-chip svg {
    flex-shrink: 0;
    color: #5F6368;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: #5F6368;
    margin-bottom: 4px;
}

.meta-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #202124;
}

/* ==========================================================================
   FOUR PILLARS SECTION (Day Pillar Hero + Supporting Cards)
   ========================================================================== */

/* Generic section headers (for landing page, etc.) */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #202124;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

/* Dashboard-specific section headers (clean spacing) */
.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.dashboard-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #202124;
    margin: 0 0 20px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Hero Pillar Card (Day Pillar) */
/* Removed unused pillar-hero-card styles */

/* Unified Pillars Grid (All 4 pillars in one row) */
.pillars-grid-unified {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.pillar-card {
    background: white;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pillar-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Day pillar gets a special highlight */
.pillar-card-primary {
    border: 2px solid #1A73E8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
}

.pillar-card-header {
    margin-bottom: 4px;
}

.pillar-chars {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.char-box {
    width: 56px;
    height: 56px;
    background: #1A73E8;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif KR', serif;
    font-size: 1.75rem;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pillar-elements {
    display: flex;
    gap: 6px;
    justify-content: center;
    font-size: 0.75rem;
}

.element-badge {
    background: #F8F9FA;
    padding: 4px 8px;
    border-radius: 4px;
    color: #5F6368;
    font-weight: 500;
}

.pillar-tengods {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.tengod-badge {
    background: #E8EAED;
    color: #5F6368;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

.hidden-stems {
    font-size: 0.7rem;
    color: #80868B;
    font-family: 'Noto Serif KR', serif;
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #F0F0F0;
}

/* Supporting Pillars Grid */
/* Removed unused pillars-grid-supporting and pillar-compact-card styles */

.pillar-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 4px;
}

.pillar-sublabel {
    display: block;
    font-size: 0.75rem;
    color: #5F6368;
}

/* OLD Profile Header (Deprecated - keeping for fallback) */
.profile-header-card {
    background: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 0;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.05);
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #F5F5F5;
    color: #202124;
    font-family: 'Noto Serif KR', serif;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-title-group h1 {
    font-size: 1.6rem;
    margin: 0 0 4px 0;
    font-weight: 700;
    color: #202124;
}

.profile-badge {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: #F0F0F0;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: right;
}

.profile-detail-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.95rem;
    color: #5F6368;
}

/* Manse Grid (Four Pillars) */
.manse-grid-container {
    display: grid;
    grid-template-rows: 44px 70px 40px 70px 40px 40px;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: column;
    gap: 1px;
    background: #F5F5F5;
    /* Shows through gaps */
    padding: 0;
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid #E8EAED;
    border-radius: 8px;
}

.manse-data-col {
    display: contents;
}

.manse-header-cell,
.manse-data-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    box-sizing: border-box;
    padding: 12px 8px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: none;
}

.manse-data-cell {
    background-color: var(--white);
}

.manse-header-cell {
    background-color: #FAFAFA;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 14px 8px;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    /* Ensure header cell has white background if needed, or keep transparent/gray */
}

.manse-data-cell.large {
    font-size: 2rem;
    font-weight: 700;
    color: #202124;
    position: relative;
    padding: 20px 12px;
    font-family: 'Noto Serif KR', serif;
    letter-spacing: -0.5px;
}

.manse-data-cell.large .element {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.95;
    letter-spacing: -0.5px;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--white);
}

.manse-data-cell.small {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-family: 'Noto Serif KR', serif !important;
    font-weight: 500;
    padding: 12px 8px;
}

/* ==========================================================================
   TIMELINE SECTION (Tab-based Luck Cycles)
   ========================================================================== */

.timeline-tabs {
    display: flex;
    gap: 8px;
    background: #F8F9FA;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #E8EAED;
}

.timeline-tab-btn {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    color: #5F6368;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
}

.timeline-tab-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.timeline-tab-btn.active {
    background: white;
    color: #1A73E8;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.timeline-content-wrapper {
    background: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 32px;
    margin-top: 24px;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.05);
    min-height: 200px;
}

.timeline-tab-content {
    display: none;
}

.timeline-tab-content.active {
    display: block;
}

/* Legacy styles - kept for compatibility */
.daewoon-section {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

#ilwoon-section {
    margin-bottom: 0;
}

.daewoon-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #202124;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    display: none;
    /* Hidden since tabs replace section titles */
}

.daewoon-grid {
    display: flex;
    flex-direction: row-reverse;
    /* Right to Left */
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px 0 0 0;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
}

.daewoon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    flex-shrink: 0;
    position: relative;
    padding: 12px 8px;
    background: transparent;
    margin-left: 3px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    /* Reserve space for active border */
}

.daewoon-item.active {
    background-color: #E8F0FE;
    border-left: 3px solid #1A73E8;
    margin-left: 0;
    padding-left: 8px;
    border-radius: 8px;
}

.daewoon-grid[data-lang="en"] .daewoon-item {
    min-width: 95px;
}

.dw-age {
    font-size: 1rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 4px;
}

.dw-ten-stem,
.dw-ten-branch,
.dw-stage {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    text-align: center;
}

.dw-char-box {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Noto Serif KR', serif;
    border: 1px solid #E8EAED;
    background: #1A73E8;
    color: white;
}

.text-main {
    display: block;
    white-space: nowrap;
    font-weight: 500;
}

.text-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 2px;
    white-space: nowrap;
    font-weight: 400;
}

/* Analysis & Charts */
/* ==========================================================================
   DISTRIBUTION SECTION (Google Analytics Card Grid Style)
   ========================================================================== */

.distribution-section {
    display: flex;
    flex-direction: column;
    gap: 64px;
    /* Margin controlled by dashboard-content gap */
}


.elements-grid,
.tengods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.element-stat-card,
.tengod-stat-card {
    background: white;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.05);
}

.element-stat-card:hover,
.tengod-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Strongest element gets special styling */
.element-stat-card.strongest {
    border: 2px solid #1A73E8;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
}

.element-stat-card.strongest::after {
    content: '최강';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #1A73E8;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Strongest ten god gets special styling */
.tengod-stat-card.strongest {
    border: 2px solid #1A73E8;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
}

.tengod-stat-card.strongest::after {
    content: '최다';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #1A73E8;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif KR', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.stat-card-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #5F6368;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #202124;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-card-percent {
    font-size: 0.85rem;
    font-weight: 500;
    color: #80868B;
}

/* Legacy bar chart styles (kept for compatibility) */
.distribution-card {
    background: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.05);
}

.distribution-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #202124;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dist-bar-item {
    display: grid;
    grid-template-columns: max-content 1fr 30px 50px;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.dist-bar-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #5F6368;
    white-space: nowrap;
}

.dist-bar-wrapper {
    position: relative;
    height: 8px;
    background: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
}

.dist-bar-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: width 1s ease-out;
}

.dist-bar-value {
    color: #202124;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}

.dist-bar-percent {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-align: right;
}

/* --------------------------------------------------------------------------
   6. Utilities & Animations
   -------------------------------------------------------------------------- */
.spacer {
    flex: 1;
}

/* --------------------------------------------------------------------------
   7. Error States - Google Flat Design
   -------------------------------------------------------------------------- */

/* Field Error Message */
.field-error {
    color: #D93025;
    font-size: 0.75rem;
    margin-top: 4px;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    animation: slideDown 0.2s ease-out;
}

.field-error::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 1px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23D93025' d='M7 0C3.1 0 0 3.1 0 7s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm1 10H6V6h2v4zm0-5H6V3h2v2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Field Error Active State */
.field-error-active {
    border-color: #D93025 !important;
    background: #FFFFFF !important;
}

.field-error-active:focus {
    border-color: #D93025 !important;
    box-shadow: 0 0 0 1px #D93025 !important;
    background: #FFFFFF !important;
}

/* Form Error Banner */
.form-error-banner {
    background: #FCE8E6;
    border: 1px solid #D93025;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #D93025;
    font-size: 0.875rem;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: slideDown 0.2s ease-out;
}

.form-error-banner::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='%23D93025' d='M9 0C4 0 0 4 0 9s4 9 9 9 9-4 9-9-4-9-9-9zm1 13H8V8h2v5zm0-6H8V5h2v2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Toast Notifications - Google Flat Design */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #323232;
    color: #FFFFFF;
    padding: 14px 24px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),
        0 6px 10px 0 rgba(0, 0, 0, 0.14),
        0 1px 18px 0 rgba(0, 0, 0, 0.12);
    max-width: 568px;
    min-width: 288px;
    text-align: left;
}

.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: #188038;
}

.toast-error {
    background: #D93025;
}

.toast-info {
    background: #323232;
}

/* Keyframes */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ==========================================================================
   8. Landing Page (index.html) - Google Flat Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   8.1 Base Styles
   -------------------------------------------------------------------------- */
.landing-body {
    background-color: #FFFFFF;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    color: #202124;
    margin: 0;
    padding: 0;
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --------------------------------------------------------------------------
   8.2 Header Navigation
   -------------------------------------------------------------------------- */
.landing-header {
    position: sticky;
    top: 0;
    background: #FFFFFF;
    border-bottom: 1px solid #E8EAED;
    height: 64px;
    display: flex;
    align-items: center;
    z-index: 100;
}

.landing-header .landing-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.landing-header .brand-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #202124;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: #5F6368;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #202124;
}

.btn-get-started {
    background: #1A73E8;
    color: #FFFFFF;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.btn-get-started:hover {
    background: #1765CC;
}

/* --------------------------------------------------------------------------
   8.3 Main Content Area
   -------------------------------------------------------------------------- */
.landing-main {
    padding: 80px 0;
}

/* --------------------------------------------------------------------------
   8.4 Hero Section
   -------------------------------------------------------------------------- */
.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 120px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    color: #202124;
    margin: 0 0 24px;
    letter-spacing: -1.5px;
}

.hero-title .title-line {
    display: block;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #5F6368;
    margin: 0 0 40px;
    font-weight: 400;
}

.hero-cta {
    margin-top: 40px;
}

.btn-primary-large {
    display: inline-block;
    background: #1A73E8;
    color: #FFFFFF;
    padding: 16px 40px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-primary-large:hover {
    background: #1765CC;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

/* --------------------------------------------------------------------------
   8.5 Feature Grid
   -------------------------------------------------------------------------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 120px;
}

.feature-card {
    background: #FFFFFF;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.2s;
}

.feature-card:hover {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    border-color: #C8C9CC;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    color: #1A73E8;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #202124;
    margin: 0 0 12px;
}

.feature-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #5F6368;
    margin: 0;
}

/* --------------------------------------------------------------------------
   8.6 How It Works Section
   -------------------------------------------------------------------------- */
.how-it-works {
    margin-bottom: 120px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #202124;
    text-align: center;
    margin: 0 0 64px;
    letter-spacing: -0.5px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.step-item {
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    background: #E8F0FE;
    color: #1A73E8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 24px;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #202124;
    margin: 0 0 12px;
}

.step-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #5F6368;
    margin: 0;
}

/* --------------------------------------------------------------------------
   8.7 CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
    text-align: center;
    background: #F8F9FA;
    border-radius: 12px;
    padding: 80px 40px;
    margin-bottom: 80px;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #202124;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.cta-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #5F6368;
    margin: 0 0 40px;
}

/* --------------------------------------------------------------------------
   8.8 Footer
   -------------------------------------------------------------------------- */
.landing-footer {
    background: #F8F9FA;
    border-top: 1px solid #E8EAED;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: #202124;
}

.footer-copyright {
    font-size: 0.875rem;
    color: #5F6368;
}

.footer-right {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   9. Auth Pages (login.html/register.html) - Google Flat Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   9.1 Base Styles
   -------------------------------------------------------------------------- */
.auth-body {
    background-color: #FFFFFF;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    color: #202124;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   9.2 Header
   -------------------------------------------------------------------------- */
.auth-header {
    border-bottom: 1px solid #E8EAED;
    height: 64px;
    display: flex;
    align-items: center;
}

.auth-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.auth-header .brand-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #202124;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-header-text {
    font-size: 0.875rem;
    color: #5F6368;
}

.btn-header-action {
    background: #1A73E8;
    color: #FFFFFF;
    padding: 8px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.btn-header-action:hover {
    background: #1765CC;
}

/* --------------------------------------------------------------------------
   9.3 Main Content
   -------------------------------------------------------------------------- */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-box {
    background: #FFFFFF;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    padding: 32px 40px;
    text-align: center;
    margin: auto 0;
}

/* --------------------------------------------------------------------------
   9.4 Auth Titles
   -------------------------------------------------------------------------- */
.auth-box-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #202124;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.auth-box-subtitle {
    font-size: 0.95rem;
    color: #5F6368;
    margin: 0 0 24px;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   9.5 Auth Form Elements
   -------------------------------------------------------------------------- */
.auth-form {
    text-align: left;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    border: 1px solid #DADCE0;
    border-radius: 4px;
    background: #FFFFFF;
    color: #202124;
    transition: all 0.2s;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #1A73E8;
    box-shadow: 0 0 0 1px #1A73E8;
}

.form-input::placeholder {
    color: #80868B;
}

/* --------------------------------------------------------------------------
   9.6 Auth Buttons
   -------------------------------------------------------------------------- */
.btn-auth-primary {
    width: 100%;
    padding: 10px 24px;
    background: #1A73E8;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    margin-top: 4px;
}

.btn-auth-primary:hover {
    background: #1765CC;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-auth-primary:active {
    background: #1557B0;
}

.btn-auth-primary:disabled {
    background: #E8EAED;
    color: #80868B;
    cursor: not-allowed;
}

.btn-auth-secondary {
    display: block;
    width: 100%;
    padding: 10px 24px;
    background: #FFFFFF;
    color: #1A73E8;
    border: 1px solid #DADCE0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn-auth-secondary:hover {
    background: #F8F9FA;
    border-color: #C8C9CC;
}

/* --------------------------------------------------------------------------
   9.7 Auth Divider
   -------------------------------------------------------------------------- */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: #5F6368;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E8EAED;
}

.auth-divider span {
    padding: 0 16px;
}

/* --------------------------------------------------------------------------
   9.8 Auth Footer
   -------------------------------------------------------------------------- */
.auth-footer {
    border-top: 1px solid #E8EAED;
    height: 56px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.auth-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* --------------------------------------------------------------------------
   9.9 Wizard Steps (register.html)
   -------------------------------------------------------------------------- */
.wizard-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 24px;
    width: 100%;
}

.progress-text {
    font-size: 0.875rem;
    color: #5F6368;
    font-weight: 500;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #E8EAED;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1A73E8;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 14.28%;
}

/* Step Container */
.step {
    display: none;
    animation: slideUp 0.4s ease;
}

.step.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-header {
    text-align: left;
    margin-bottom: 4px;
}

.step-header .auth-box-title {
    text-align: left;
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.step-header .auth-box-subtitle {
    text-align: left;
    margin-bottom: 0;
}

/* Form Elements Spacing */
.step form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step form .input-field {
    margin-bottom: 0;
}

.step form .btn-primary {
    margin-top: 8px;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 12px;
}

.radio-label {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label span {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;
    background: #FFFFFF;
    border-radius: 4px;
    font-weight: 500;
    font-size: 1rem;
    color: #5F6368;
    transition: all 0.2s;
    border: 1px solid #DADCE0;
    min-height: 48px;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
}

.radio-label input:checked+span {
    background: #E8F0FE;
    border-color: #1A73E8;
    color: #1A73E8;
    font-weight: 600;
}

.radio-label:hover span {
    border-color: #C8C9CC;
}

/* Date/Time Group */
.time-group,
.date-group {
    display: flex;
    gap: 12px;
}

.time-group select,
.date-group select {
    flex: 1;
    padding: 10px 14px;
    font-size: 1rem;
    border: 1px solid #DADCE0;
    border-radius: 4px;
    background: #FFFFFF;
    color: #202124;
    -webkit-appearance: none;
    appearance: none;
    min-height: 42px;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%235F6368%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px auto;
    padding-right: 32px;
}

.time-group select:focus,
.date-group select:focus {
    outline: none;
    border-color: #1A73E8;
    box-shadow: 0 0 0 1px #1A73E8;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-loading {
    padding: 12px 16px;
    margin-top: 8px;
    text-align: center;
    color: #5F6368;
    font-size: 0.875rem;
    background: #F8F9FA;
    border-radius: 4px;
}

.search-results {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #DADCE0;
    border-radius: 4px;
    margin-top: 8px;
    display: none;
    background: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #E8EAED;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #202124;
    transition: background 0.15s;
}

.search-item:hover {
    background: #F8F9FA;
}

.search-item:last-child {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   9.10 Cloudflare Turnstile Widget
   -------------------------------------------------------------------------- */
.cf-turnstile {
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   10. Mobile Overrides (Global)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Dashboard Layout */
    .dashboard-layout {
        flex-direction: column;
    }

    .dashboard-content-wrapper {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-topbar {
        padding: 0 20px;
    }

    /* Sidebar -> Bottom Nav */
    .dashboard-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid #EAEAEA;
        padding: 0;
        justify-content: space-around;
        align-items: center;
        z-index: 300;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    }

    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        font-size: 0.7rem;
        border-radius: 12px;
        flex: 1;
        justify-content: center;
    }

    .nav-item svg {
        width: 20px;
        height: 20px;
    }

    .spacer {
        display: none;
    }

    .sidebar-brand-mobile {
        display: none;
    }

    .dashboard-main {
        padding: 20px 20px 80px 20px;
    }

    /* Bottom padding: 60px (nav) + 20px (spacing) */
    .dashboard-footer {
        padding: 20px 0 10px 0;
    }

    .dashboard-content {
        gap: 48px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 48px;
    }

    /* Hero Profile Section */
    .profile-header-hero {
        padding: 32px 24px 24px 24px;
        border-radius: 12px;
    }

    .profile-hero-content {
        flex-direction: column;
        margin-bottom: 24px;
    }

    .profile-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-width: 100%;
        gap: 16px;
    }

    .profile-title-group {
        width: 100%;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }

    .avatar-character {
        font-size: 2rem;
    }

    .profile-name {
        font-size: 1.5rem;
        margin-bottom: 12px;
        text-align: center;
    }

    .profile-metadata-inline {
        gap: 6px;
        margin-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-metadata-inline .metadata-item {
        background: #F8F9FA;
        padding: 8px 12px;
        border-radius: 8px;
        width: 100%;
        border: 1px solid #E8EAED;
    }

    .profile-metadata-inline .metadata-item svg {
        width: 14px;
        height: 14px;
    }

    .profile-metadata-inline .meta-text {
        font-size: 0.85rem;
        flex: 1;
    }

    .profile-metadata-inline .metadata-divider {
        display: none;
    }

    .profile-subtitle {
        font-size: 0.9rem;
    }

    .profile-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .btn-action-primary,
    .btn-action-secondary {
        width: 100%;
        justify-content: center;
    }

    .profile-metadata-row {
        gap: 12px;
        padding-top: 20px;
        font-size: 0.85rem;
        flex-direction: column;
        align-items: stretch;
    }

    .placeholder-badge {
        width: 100%;
        justify-content: center;
    }

    .metadata-item svg {
        width: 16px;
        height: 16px;
    }

    .metadata-divider {
        display: none;
    }

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

    /* Legacy metadata-chip mobile styles */
    .metadata-chip {
        padding: 12px;
    }

    /* Four Pillars Section */
    .pillars-section {
        margin-bottom: 48px;
    }

    .section-header-modern {
        margin-bottom: 12px;
    }

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

    /* Dashboard-specific mobile styles */
    .dashboard-section-header {
        margin-bottom: 0;
    }

    .dashboard-section-title {
        font-size: 1.5rem;
    }

    /* Removed mobile overrides for unused pillar-hero-card and pillar-compact-card styles */

    /* Manse Cards Mobile */
    .manse-cards-container {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 24px;
    }

    .pillar-row {
        flex-direction: row;
        /* Horizontal on mobile for better space usage?
           Actually, vertical (Heaven over Earth) is standard for Saju.
           Let's keep vertical but maybe side-by-side Heaven/Earth?
           No, standard is Heaven Top, Earth Bottom. */
    }

    /* Luck Grids */
    .luck-grid {
        padding-right: 20px;
        /* Space for scroll */
    }

    /* OLD Profile Header (Deprecated) */
    .profile-header-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        margin-bottom: 0;
    }

    .profile-details-grid {
        width: 100%;
        text-align: left;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #F0F0F0;
    }

    .profile-detail-item {
        justify-content: flex-start;
    }

    /* Manse Grid */
    .manse-grid-container {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: minmax(36px, auto) minmax(56px, auto) minmax(36px, auto) minmax(56px, auto) minmax(36px, auto) minmax(36px, auto);
        gap: 1px;
    }

    .manse-label-cell {
        font-size: 0.75rem;
        padding: 8px 6px;
    }

    .manse-data-cell.large {
        font-size: 1.4rem;
        padding: 16px 8px;
    }

    .manse-data-cell.large .element {
        bottom: 4px;
        right: 6px;
        font-size: 0.65rem;
    }

    .manse-data-cell.small {
        font-size: 0.75rem;
        padding: 10px 6px;
        white-space: normal;
        word-break: keep-all;
        line-height: 1.4;
    }

    /* Timeline Section */
    .timeline-section {
        margin-bottom: 48px;
    }

    .timeline-tabs {
        flex-direction: column;
        padding: 0;
        background: transparent;
        gap: 8px;
    }

    .timeline-tab-btn {
        padding: 12px 16px;
        border: 1px solid #E8EAED;
        border-radius: 8px;
        background: white;
    }

    .timeline-tab-btn.active {
        background: #1A73E8;
        color: white;
        border-color: #1A73E8;
    }

    .timeline-content-wrapper {
        padding: 24px;
        margin-top: 16px;
    }

    /* Luck Cycles - Legacy */
    .daewoon-section {
        padding: 0;
    }

    .daewoon-section h2 {
        margin-bottom: 20px;
    }

    .daewoon-grid {
        justify-content: flex-start;
        flex-direction: row-reverse;
        gap: 12px;
        padding: 6px 0 0 0;
    }

    .daewoon-item {
        min-width: 70px;
        gap: 6px;
        padding: 8px 6px;
        margin-left: 3px;
    }

    .daewoon-item.active {
        margin-left: 0;
        padding-left: 6px;
    }

    .daewoon-grid[data-lang="en"] .daewoon-item {
        min-width: 85px;
    }

    .dw-age {
        font-size: 0.9rem;
    }

    .dw-char-box {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .dw-ten-stem,
    .dw-ten-branch,
    .dw-stage {
        font-size: 0.7rem;
    }

    .text-sub {
        font-size: 0.65rem;
    }

    #ilwoon-section {
        margin-bottom: 48px;
    }

    /* Distribution Section - Card Grid */
    .distribution-section {
        gap: 48px;
        margin-bottom: 48px;
    }

    .elements-grid,
    .tengods-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .element-stat-card,
    .tengod-stat-card {
        padding: 20px 16px;
    }

    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .stat-card-value {
        font-size: 1.75rem;
    }

    /* Legacy Distribution Cards */
    .distribution-card {
        padding: 24px;
    }

    .distribution-title {
        font-size: 1.3rem;
        margin-bottom: 24px;
    }

    .dist-bar-item {
        grid-template-columns: 1fr 50px;
        grid-template-rows: auto auto;
        grid-template-areas: "label label" "bar percent";
        gap: 6px 12px;
        margin-bottom: 8px;
    }

    .dist-bar-label {
        grid-area: label;
        width: auto !important;
        margin-bottom: 2px;
    }

    .dist-bar-wrapper {
        grid-area: bar;
        height: 28px;
    }

    .dist-bar-percent {
        grid-area: percent;
        font-size: 0.85rem;
        text-align: right;
    }

    .report-section {
        gap: 48px;
        margin-bottom: 48px;
    }

    /* Wizard Inputs */
    .radio-label span,
    .time-group select,
    .date-group select {
        padding: 16px;
        min-height: 56px;
        font-size: 16px;
        /* iOS Zoom Fix */
    }

    .search-item {
        padding: 16px;
        font-size: 1rem;
        min-height: 52px;
    }

    /* Landing Page Mobile */
    .landing-container {
        padding: 0 20px;
    }

    .landing-header {
        height: 56px;
    }

    .landing-header .brand-logo {
        font-size: 1.25rem;
    }

    .nav-actions {
        gap: 16px;
    }

    .nav-link {
        font-size: 0.875rem;
    }

    .btn-get-started {
        padding: 8px 16px;
        font-size: 0.875rem;
    }

    .landing-main {
        padding: 40px 0;
    }

    .hero-content {
        margin-bottom: 64px;
        padding: 0;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
        margin-bottom: 20px;
    }

    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 32px;
    }

    .hero-cta {
        margin-top: 32px;
    }

    .btn-primary-large {
        width: 100%;
        padding: 14px 32px;
        font-size: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 64px;
    }

    .feature-card {
        padding: 32px 24px;
    }

    .how-it-works {
        margin-bottom: 64px;
    }

    .landing-main .section-title {
        font-size: 2rem;
        margin-bottom: 48px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cta-section {
        padding: 48px 24px;
        margin-bottom: 48px;
    }

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

    .cta-description {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .landing-footer {
        padding: 32px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    .footer-left {
        order: 2;
    }

    .footer-right {
        order: 1;
        width: 100%;
    }

    /* Auth Pages Mobile */
    .auth-header {
        height: 56px;
    }

    .auth-header-container {
        padding: 0 20px;
    }

    .auth-header .brand-logo {
        font-size: 1.25rem;
    }

    .auth-header-text {
        display: none;
    }

    .btn-header-action {
        padding: 8px 16px;
        font-size: 0.875rem;
    }

    .auth-main {
        padding: 20px 16px;
    }

    .auth-box {
        padding: 24px;
        border: none;
        border-radius: 0;
    }

    .auth-box-title {
        font-size: 1.5rem;
    }

    .auth-box-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .form-input {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .auth-footer {
        height: 52px;
    }

    .auth-footer-container {
        padding: 0 20px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .footer-copyright {
        order: 2;
        width: 100%;
    }

    .footer-links {
        order: 1;
        width: 100%;
    }
}