:root {
    --ds-page: #f7f2ea;
    --ds-ink: #251f21;
    --ds-ink-2: #6f6862;
    --ds-ink-4: #d9d2c7;
}

html, body, #root { margin: 0; min-height: 100%; }
body {
    background: var(--ds-page);
    color: var(--ds-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.head h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.25;
}
.fact {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-ink-2);
    background: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.intro {
    font-size: 16px;
    line-height: 1.55;
    color: var(--ds-ink);
    margin: 12px 0 0;
}

.cover {
    margin: 0;
}
.cover img {
    width: 100%;
    display: block;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.cover figcaption {
    font-size: 13px;
    color: var(--ds-ink-2);
    margin-top: 6px;
}

.howto h2 {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 8px;
}
.howto ol {
    margin: 0;
    padding-inline-start: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
    line-height: 1.5;
}

/* ==== Game (identical to the Instinct File build) ==== */

.game { display: flex; flex-direction: column; gap: 12px; }

.game-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.game-chip {
    font-size: 14px;
    color: var(--ds-ink-2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
}
.game-chip b { font-size: 20px; font-weight: 600; color: var(--ds-ink); }
.game-chip-jordan b { color: #c8102e; }
.game-chip-curry b { color: #3b6fd4; }
.game-chip-time { font-weight: 600; color: var(--ds-ink); }

.game-court {
    position: relative;
    /* Keep the whole court, scoreboard and action button on one screen:
       the court is 2:3, so cap its width by viewport height. */
    width: min(100%, 40vh);
    margin: 0 auto;
}
.game-court canvas { aspect-ratio: 2 / 3; }
.game-court canvas { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }

.game-message {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(37, 31, 33, 0.88);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(37, 31, 33, 0.45);
    border-radius: 16px;
}
.game-result {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    padding: 0 20px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.game-big {
    font: inherit;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    background: #73a89a;
    border: none;
    border-radius: 999px;
    padding: 16px 32px;
    min-height: 56px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.game-big:active { transform: scale(0.96); }

.game-actions { display: flex; justify-content: center; }
.game-btn {
    font: inherit;
    font-size: 19px;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    padding: 14px 40px;
    min-height: 56px;
    min-width: 200px;
    cursor: pointer;
    color: #fff;
}
.game-btn:active { transform: scale(0.96); }
.game-btn-shoot { background: #73a89a; }
.game-btn-block { background: #3b6fd4; }
.game-btn:disabled { background: var(--ds-ink-4); cursor: default; transform: none; }

.game-hint {
    text-align: center;
    font-size: 14px;
    color: var(--ds-ink-2);
    min-height: 20px;
}
.game-howto {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    padding: 0 24px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
