/* HC Joyn play — 성경 퀴즈 (HTML5) */
:root {
    --bg: #0b1220;
    --surface: #121a2b;
    --card: #151f33;
    --border: rgba(148, 163, 184, 0.18);
    --text: #e8eef8;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-dim: rgba(56, 189, 248, 0.15);
    --ok: #4ade80;
    --bad: #f87171;
    --radius: 14px;
    --font: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
}

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

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

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font);
    background: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.12), transparent),
        radial-gradient(900px 500px at 100% 0%, rgba(129, 140, 248, 0.1), transparent),
        var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.play-app {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.play-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.play-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.play-brand h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.play-tagline {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.play-logo {
    font-size: 2rem;
    line-height: 1;
}

.user-pill {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.play-main {
    flex: 1;
}

.screen {
    display: none;
}

.screen-active {
    display: block;
}

.muted {
    color: var(--muted);
    font-size: 0.95rem;
}

.muted.small {
    font-size: 0.85rem;
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

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

.choice-card {
    font: inherit;
    cursor: pointer;
    padding: 1rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}

.choice-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
}

.choice-card.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.btn {
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.2rem;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    border: none;
    font-weight: 600;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 0.45rem;
    max-height: 48vh;
    overflow-y: auto;
    padding: 0.15rem;
}

.book-chip {
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.5rem 0.4rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.book-chip.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.limit-text {
    font-size: 1.05rem;
    margin: 0;
}

.game-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.timer {
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    font-weight: 600;
}

.ref {
    font-size: 0.85rem;
    color: var(--accent);
    margin: 0 0 0.5rem;
}

.question {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 1rem;
    line-height: 1.45;
}

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

.answer-btn {
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.answer-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.answer-btn.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.text-input {
    width: 100%;
    font: inherit;
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.feedback {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.feedback.ok {
    background: rgba(74, 222, 128, 0.12);
    color: var(--ok);
}

.feedback.bad {
    background: rgba(248, 113, 113, 0.12);
    color: var(--bad);
}

.game-actions {
    margin-top: 1rem;
}

.result-big {
    font-size: 1.35rem;
    margin: 0.5rem 0;
}

.result-jseeds {
    color: var(--accent);
    font-weight: 600;
}

.play-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted);
}

.play-footer p {
    margin: 0;
}

.limit-card .limit-text strong {
    color: var(--text);
}
