/* css/study.css — the student page (study.php), chat 2.33 Phase A.
   New file; every rule is scoped to .study-* so nothing else on the site
   changes. The puzzle itself is styled by puzzle.css and daily-embed.css
   exactly as a category or saved puzzle is. */

/* The set's name under the logo, in the header strip. */
.study-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    line-height: 1.25;
    color: var(--cream);
    text-align: center;
    margin: -0.35rem auto 0;
    max-width: 92%;
}

/* Puzzle couldn't load (connection etc.) — shown inside the card. */
.study-error {
    margin: 1rem auto 0;
    max-width: 420px;
    text-align: center;
    font-size: .85rem;
    line-height: 1.5;
    color: #E8A99C;
}
.study-error[hidden] { display: none; }

/* Paused, archived, deleted or unknown link. */
.study-unavailable {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.75rem;
    box-sizing: border-box;
    max-width: 30rem;
    margin: 0 auto;
}
.study-unavailable[hidden] { display: none; }
.study-unavailable .puzzle-view-logo { margin-bottom: 2rem; }
.study-unavailable-label {
    font-size: .7rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 .7rem;
}
.study-unavailable-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 6vw, 1.9rem);
    line-height: 1.25;
    color: var(--cream);
    margin: 0 0 .9rem;
}
.study-unavailable-text {
    font-size: .92rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 1.75rem;
}
.study-unavailable-home { max-width: 260px; }

/* On desktop puzzle.css centres the page with body padding; the
   not-available message fills the screen instead. */
@media (min-width: 640px) {
    html.puzzle-page body.study-page:has(.study-unavailable:not([hidden])) { padding: 0; }
}

/* "Play another review" fits on one line in the win card on phones
   (the card is ~244px inside; .win-btn's own 32px side padding wrapped it). */
.study-page .win-card .win-btn {
    padding-left: 12px;
    padding-right: 12px;
}

/* Demo bar ("Try it as a student" on /teachers, round 2) */
.study-demo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    background: #2E4A6B;
    color: var(--cream);
    font-size: .82rem;
}
.study-demo-exit {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(245,237,216,0.6);
    border-radius: 50px;
    color: var(--cream);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
}
.study-demo-exit:hover { background: rgba(245,237,216,0.12); }
@media (min-width: 640px) {
    .study-demo-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 120; justify-content: center; gap: 18px; }
}
.study-demo-exit { white-space: nowrap; flex-shrink: 0; }
