:root {
    --page-bg-start: #f6f0e8;
    --page-bg-end: #d8e2f1;
    --panel-bg: rgba(255, 255, 255, 0.88);
    --panel-border: rgba(24, 29, 43, 0.08);
    --accent: #a63c32;
    --accent-dark: #7c291f;
    --board-light: #f3e0c2;
    --board-dark: #a7704f;
    --board-frame: #2d2118;
    --square-label: rgba(32, 20, 10, 0.72);
    --hero-ink: #172031;
}

body.alpha-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 32rem),
        linear-gradient(145deg, var(--page-bg-start), var(--page-bg-end));
    color: #172031;
    font-family: Georgia, "Times New Roman", serif;
}

.hero-panel,
.card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(16px);
}

.hero-panel {
    box-shadow: 0 1.75rem 3.5rem rgba(34, 41, 58, 0.14);
}

.eyebrow {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
}

.session-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: inset 0 0 0 1px rgba(26, 36, 53, 0.08);
}

.alerts-placeholder {
    min-height: 0;
}

.board-shell {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: min(100%, 42rem);
    aspect-ratio: 1;
    border: 0.75rem solid var(--board-frame);
    border-radius: 1.35rem;
    overflow: hidden;
    box-shadow: 0 1.5rem 2.75rem rgba(30, 22, 16, 0.22);
}

.board-square {
    position: relative;
    min-height: 3rem;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-square.light {
    background: var(--board-light);
}

.board-square.dark {
    background: var(--board-dark);
}

.board-square-button {
    appearance: none;
    width: 100%;
    height: 100%;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.board-square-button:not(:disabled) {
    cursor: pointer;
}

.board-square-button:hover:not(:disabled),
.board-square-button:focus-visible:not(:disabled) {
    z-index: 1;
    box-shadow: inset 0 0 0 0.24rem rgba(253, 244, 170, 0.75);
    outline: none;
}

.board-square-button.is-selected {
    box-shadow: inset 0 0 0 0.3rem rgba(255, 230, 115, 0.95);
}

.board-square-button.is-target {
    box-shadow: inset 0 0 0 0.3rem rgba(124, 197, 109, 0.88);
}

.board-square-button.is-ai-last-move {
    box-shadow: inset 0 0 0 0.26rem rgba(91, 180, 255, 0.9);
}

.board-square-button.is-replay-current {
    box-shadow: inset 0 0 0 0.26rem rgba(58, 110, 165, 0.88);
}

.board-square-button:disabled {
    cursor: default;
}

.square-name {
    position: absolute;
    top: 0.3rem;
    left: 0.35rem;
    font-size: 0.72rem;
    color: var(--square-label);
}

.piece-glyph {
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1;
    color: #111;
    text-shadow: 0 0.08rem 0 rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

.choice-notes {
    background: rgba(246, 240, 232, 0.88);
    border: 1px solid rgba(24, 29, 43, 0.08);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-accent:hover,
.btn-accent:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.move-history {
    max-height: 22rem;
    overflow-y: auto;
}

.replay-current-move {
    border-color: rgba(58, 110, 165, 0.35);
}

.replay-list-item.is-selected .replay-record-button {
    border-color: rgba(58, 110, 165, 0.6);
    background: rgba(216, 226, 241, 0.55);
}

.replay-list {
    max-height: 20rem;
    overflow-y: auto;
}

.replay-record-button {
    border-radius: 1rem;
}

body.replay-active {
    overflow: hidden;
}

.replay-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
}

.replay-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 27, 38, 0.52);
    backdrop-filter: blur(10px);
}

.replay-overlay-shell {
    position: relative;
    width: min(100%, 84rem);
    max-height: 100vh;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.replay-overlay-card {
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

@media (max-width: 767.98px) {
    .board-grid {
        border-width: 0.55rem;
        border-radius: 1rem;
    }

    .square-name {
        font-size: 0.62rem;
    }
}
