/* Morning Quest — public styles */

:root {
    --color-sky-top: #dceefb;
    --color-sky-mid: #e8f4fc;
    --color-sky-bottom: #f5e6d8;
    --color-text: #2c3a47;
    --color-text-soft: #5a6b7a;
    --color-accent: #e8a87c;
    --color-card: rgba(255, 255, 255, 0.78);
    --color-card-border: rgba(255, 255, 255, 0.95);
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
    --quest-max: 26rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --radius: 1.25rem;
    --shadow-soft: 0 10px 40px rgba(44, 58, 71, 0.08);
    --tap-min: 2.75rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--color-text);
    background: linear-gradient(180deg, var(--color-sky-top) 0%, var(--color-sky-mid) 50%, var(--color-sky-bottom) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

body.mood-calm { --color-sky-bottom: #f0e8e4; }
body.mood-happy { --color-sky-bottom: #fce8d5; --color-accent: #f4a261; }
body.mood-hopeful { --color-sky-bottom: #f5ecd8; }
body.mood-sleepy { --color-sky-bottom: #e8eef5; }

body.is-bright .sky__glow { opacity: 1; }
body.is-bright .sky__sun { transform: translateX(-50%) scale(1.08); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.sky__glow {
    position: absolute;
    top: -8%;
    left: 50%;
    width: min(130vw, 36rem);
    height: min(85vw, 26rem);
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255, 220, 160, 0.5) 0%, transparent 70%);
    opacity: 0.65;
    transition: opacity 0.8s ease;
}

.sky__sun {
    position: absolute;
    top: 3%;
    left: 50%;
    width: 4rem;
    height: 4rem;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff8e7 0%, #ffd89b 50%, rgba(255, 200, 120, 0.35) 100%);
    box-shadow: 0 0 50px rgba(255, 200, 120, 0.35);
    transition: transform 0.8s ease, box-shadow 0.8s ease;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
}

.cloud--1 { width: 5rem; height: 2rem; top: 16%; left: 5%; opacity: 0.65; }
.cloud--2 { width: 4rem; height: 1.5rem; top: 24%; right: 8%; opacity: 0.45; }
.cloud--3 { width: 6rem; height: 2rem; top: 10%; right: 20%; opacity: 0.35; }

.quest-app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-sm) var(--space-lg);
}

.quest-app__inner {
    width: 100%;
    max-width: var(--quest-max);
}

.screen {
    text-align: center;
    animation: screen-in 0.45s ease;
}

.screen__eyebrow {
    margin: 0 0 var(--space-xs);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}

.screen__title {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 6vw, 2.35rem);
    font-weight: 600;
    line-height: 1.15;
}

.screen__subtitle {
    margin: 0 0 var(--space-lg);
    font-size: 1.05rem;
    color: var(--color-text-soft);
    line-height: 1.6;
}

.screen__date {
    margin: 0 0 var(--space-md);
    font-size: 0.9rem;
    color: var(--color-text-soft);
}

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

.quest-header__label {
    margin: 0 0 var(--space-xs);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}

.quest-header__step {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-text);
}

.progress-stars {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin: 0 0 var(--space-md);
    font-size: 1rem;
    letter-spacing: 0.15em;
}

.progress-stars__star {
    color: rgba(44, 58, 71, 0.25);
    transition: color 0.35s ease, transform 0.35s ease;
}

.progress-stars__star.is-lit {
    color: #e8a87c;
    text-shadow: 0 0 12px rgba(232, 168, 124, 0.5);
}

.quest-card {
    padding: var(--space-md);
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.quest-card__emoji {
    display: block;
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.quest-card__heading {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
}

.quest-card__text {
    margin: 0 0 var(--space-md);
    color: var(--color-text-soft);
    font-size: 0.98rem;
    line-height: 1.65;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: var(--tap-min);
    padding: 0.75rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
    background: #fff;
    box-shadow: 0 12px 36px rgba(44, 58, 71, 0.1);
}

.btn:focus {
    outline: none;
}

.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.btn--primary {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border-color: rgba(232, 168, 124, 0.35);
}

.btn--block {
    width: 100%;
    max-width: 16rem;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 4.5rem;
    padding: var(--space-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.choice-btn__emoji {
    font-size: 1.5rem;
}

.choice-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

.choice-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.sun-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 6.5rem;
    height: 6.5rem;
    margin: var(--space-md) auto;
    font-size: 3rem;
    background: radial-gradient(circle at 35% 35%, #fff8e7 0%, #ffd89b 55%, #f4c47a 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 200, 120, 0.45);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.sun-btn:hover {
    transform: scale(1.05);
}

.sun-btn.is-awake {
    transform: scale(1.12);
    box-shadow: 0 0 60px rgba(255, 200, 120, 0.65);
}

.star-field {
    position: relative;
    min-height: 11rem;
    margin: var(--space-sm) 0 var(--space-md);
}

.star-field__item {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tap-min);
    min-height: var(--tap-min);
    padding: 0.5rem;
    font-size: 1.35rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.star-field__item:hover {
    transform: scale(1.1);
}

.star-field__item:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.star-field__item--decoy {
    cursor: default;
    opacity: 0.85;
}

.success-panel {
    padding: var(--space-md);
}

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

.success-panel__title {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
}

.success-panel__detail {
    margin: 0 0 var(--space-md);
    color: var(--color-text-soft);
}

.success-panel__reward {
    margin: 0 0 var(--space-md);
    font-size: 0.95rem;
    color: var(--color-accent);
}

.complete-panel__divider {
    height: 1px;
    margin: var(--space-md) 0;
    background: linear-gradient(90deg, transparent, rgba(44, 58, 71, 0.12), transparent);
}

.complete-panel__lock {
    font-size: 2rem;
    margin: var(--space-sm) 0;
}

.message-reveal {
    margin-top: var(--space-md);
    padding: var(--space-md);
    text-align: center;
    background: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    animation: screen-in 0.5s ease;
}

.message-reveal__heading {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.message-reveal__body {
    margin: 0;
    line-height: 1.7;
    color: var(--color-text-soft);
}

.quote-screen {
    padding: var(--space-lg) var(--space-md);
}

.quote-screen__badge {
    margin: 0 0 var(--space-sm);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.quote-screen__title {
    margin: 0 0 var(--space-lg);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
}

.quote-screen__text {
    margin: 0 0 var(--space-md);
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 4.5vw, 1.55rem);
    font-style: italic;
    line-height: 1.55;
}

.quote-screen__author {
    margin: 0 0 var(--space-lg);
    font-size: 0.9rem;
    color: var(--color-text-soft);
}

.quote-screen__footer {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-text-soft);
}

.unlock-anim__lock {
    display: inline-block;
    font-size: 2.5rem;
    animation: lock-pop 0.6s ease;
}

@media (min-width: 768px) {
    :root {
        --quest-max: 28rem;
    }
}
