/* Paper Game — immersive stage under tools chrome */

body.game-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

body.game-page .tools-nav {
    flex: 0 0 auto;
}

.game-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    background:
        linear-gradient(180deg, #7ec8e3 0%, #b8dce8 42%, #6b9e4a 42%, #4a7a32 100%);
}

.game-root {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.game-root canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.game-hud {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
}

.game-hud-hp {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    align-self: flex-start;
    padding: 0.4rem 0.65rem;
    background: rgba(28, 27, 25, 0.72);
    color: #f6f5f2;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.game-hud-label {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.72rem;
    opacity: 0.85;
}

.game-hud-bar {
    width: 7.5rem;
    height: 0.55rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.game-hud-value {
    min-width: 2ch;
    font-variant-numeric: tabular-nums;
}

.game-hud-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    pointer-events: none;
}

.game-hud-stats {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.65rem;
    background: rgba(28, 27, 25, 0.72);
    color: #f6f5f2;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.game-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-variant-numeric: tabular-nums;
    min-width: 2.4rem;
}

.game-stat-icon {
    color: #ffd166;
    font-size: 0.78rem;
}

.game-hud-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #52b788, #95d5b2);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.game-hud-hint {
    align-self: center;
    padding: 0.5rem 1rem;
    background: rgba(28, 27, 25, 0.7);
    color: #f6f5f2;
    border-radius: 10px;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
    max-width: min(36rem, 92vw);
    text-align: center;
    box-shadow: 0 8px 24px rgba(20, 30, 40, 0.18);
}

/* Turn combat overlay */
.game-encounter {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(12, 18, 28, 0.35);
    pointer-events: auto;
}

.game-encounter[hidden] {
    display: none !important;
}

.game-encounter-panel {
    width: min(22rem, 100%);
    padding: 1rem 1.15rem 1.1rem;
    background: rgba(28, 27, 25, 0.92);
    color: #f6f5f2;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.game-encounter-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.game-encounter-name {
    margin: 0 0 0.55rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.game-encounter-bar {
    height: 0.55rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    overflow: hidden;
}

.game-encounter-fill {
    display: block;
    height: 100%;
    background: #a33b3b;
    border-radius: inherit;
    transition: width 0.2s ease;
}

.game-encounter-log {
    min-height: 2.4em;
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.35;
}

.game-encounter-actions {
    display: flex;
    gap: 0.55rem;
}

.game-encounter-btn {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 8px;
    background: #c9a227;
    color: #1c1b19;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
}

.game-encounter-btn--ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #f6f5f2;
}
