.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    display: flex;
}

.home-screen {
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
    padding: 36px 24px 28px;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 18px;
}

.home-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-greeting {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 700;
}

.home-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
}

.home-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.home-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-soft);
}

.home-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.home-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.home-cta-card {
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(123, 211, 255, 0.22), rgba(184, 166, 255, 0.22));
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.home-cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-cta-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.home-cta-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.home-cta-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.status-garden {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 2;
    animation: gardenFloat 4s ease-in-out infinite;
}

.status-garden-emoji {
    font-size: 1.4rem;
}

.status-garden-level {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-green);
}

.status-garden-points {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@keyframes gardenFloat {
    0% {
        transform: translateY(0);
        box-shadow: var(--shadow-soft), var(--shadow-glow);
    }
    50% {
        transform: translateY(-2px);
        box-shadow: var(--shadow-soft), 0 0 26px rgba(123, 211, 255, 0.22);
    }
    100% {
        transform: translateY(0);
        box-shadow: var(--shadow-soft), var(--shadow-glow);
    }
}

.home-garden-card {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 14px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.home-garden-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(125, 211, 168, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    animation: gardenFloat 4s ease-in-out infinite;
}

.home-garden-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-garden-level {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.home-garden-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(126, 184, 218, 0.15);
    overflow: hidden;
}

.home-garden-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-calm));
    width: 0%;
    transition: width 0.4s ease;
}

.home-garden-points {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.home-garden-pause {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
}

.home-quick-actions {
    margin-top: 6px;
}

.quote-container {
    margin-top: auto;
    padding: 24px;
    text-align: center;
    opacity: 0.7;
}

.quote-text {
    font-style: italic;
    font-size: 0.9rem;
}

.home-copyright {
    margin-top: 6px;
    padding-bottom: 10px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}


.flow-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-top: 10px;
}

.flow-progress {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.flow-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-calm), var(--accent-soft));
    transition: width 0.4s;
}

.flow-step {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.flow-question {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.flow-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.legal-screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.legal-header {
    text-align: center;
    margin-bottom: 10px;
}

.legal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.legal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.legal-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.legal-warning {
    padding: 16px;
    background: rgba(224, 122, 122, 0.1);
    border: 1px solid var(--accent-coral);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.legal-warning-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--accent-coral);
    margin-bottom: 8px;
    font-size: 1rem;
}

.legal-section {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
}

.legal-section-title {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-section-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-section-text ul {
    padding-left: 20px;
    margin-top: 8px;
}

.legal-section-text li {
    margin-bottom: 4px;
}

.legal-terms {
    max-height: 40vh;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-terms h1,
.legal-terms h2,
.legal-terms h3 {
    color: var(--text-primary);
    margin: 12px 0 6px;
    font-size: 1rem;
}

.legal-terms ul {
    padding-left: 18px;
    margin: 8px 0;
}

.legal-terms li {
    margin-bottom: 6px;
}

.legal-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.legal-link-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.legal-link-btn:active {
    background: var(--bg-elevated);
    transform: scale(0.98);
}

.legal-consent {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.legal-checkbox-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.legal-checkbox-container input {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    accent-color: var(--accent-calm);
    cursor: pointer;
}

.legal-checkbox-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    cursor: pointer;
}

.legal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.legal-accept-btn {
    padding: 18px;
    background: linear-gradient(135deg, var(--accent-calm), var(--accent-soft));
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(126, 184, 218, 0.3);
    transition: all 0.2s;
}

.legal-accept-btn:disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.legal-accept-btn:not(:disabled):active {
    transform: scale(0.98);
}

.legal-decline-btn {
    padding: 16px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.legal-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 30px;
    line-height: 1.6;
}

/* Response Screen */
.response-screen {
    padding: 20px;
    padding-bottom: 40px;
}

.response-header {
    text-align: center;
    margin-bottom: 24px;
}

.response-emoji {
    font-size: 3rem;
    margin-bottom: 12px;
}

.response-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.response-feeling {
    color: var(--accent-calm);
    font-weight: 600;
}

/* Timer & Breathe Screens */
.timer-screen,
.breathe-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
}

.timer-title,
.breathe-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timer-subtitle,
.breathe-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

/* Dump Screens */
.dump-screen,
.ground-screen {
    padding: 20px;
    padding-bottom: 120px;
}

.dump-header,
.ground-header {
    text-align: center;
    margin-bottom: 24px;
}

.dump-emoji,
.ground-emoji {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.dump-title,
.ground-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.dump-subtitle,
.ground-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Diary Screen */
.diary-screen {
    padding: 20px;
}

.diary-header,
.insights-header {
    margin-bottom: 24px;
}

.diary-title,
.insights-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.diary-subtitle,
.insights-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.diary-new-screen {
    padding: 20px;
    padding-bottom: 120px;
}

.diary-new-header {
    text-align: center;
    margin-bottom: 24px;
}

.diary-new-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.diary-detail-screen {
    padding: 20px;
}

.diary-detail-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-elevated);
    margin-bottom: 20px;
}

.diary-detail-emoji {
    font-size: 3rem;
    margin-bottom: 12px;
}

.diary-detail-date {
    font-size: 1.1rem;
    font-weight: 700;
}

.diary-detail-time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.diary-detail-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

/* Report Screen and others using diary-screen layout are covered */
