.ffp-game {
    --ffp-ink: #202124;
    --ffp-muted: #5f6368;
    --ffp-line: #dadce0;
    --ffp-panel: #ffffff;
    --ffp-soft: #f8f9fa;
    color: var(--ffp-ink);
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 760px);
    gap: 22px;
    align-items: start;
    margin: 24px 0;
    position: relative;
}

.ffp-state,
.ffp-chapter {
    background: var(--ffp-panel);
    border: 1px solid var(--ffp-line);
    border-radius: 8px;
    padding: 18px;
}

.ffp-state h3,
.ffp-chapter h2 {
    margin-top: 0;
}

.ffp-chapter header span {
    color: var(--ffp-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.ffp-stats {
    display: grid;
    gap: 8px;
}

.ffp-stats div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--ffp-line);
    padding-bottom: 8px;
}

.ffp-inventory {
    margin-top: 18px;
}

.ffp-inventory h4 {
    margin-bottom: 8px;
}

.ffp-inventory ul {
    margin: 0;
    padding-left: 18px;
}

.ffp-side-menu {
    margin-top: 18px;
    border-top: 1px solid var(--ffp-line);
    padding-top: 14px;
}

.ffp-side-menu h4 {
    margin: 0 0 10px;
}

.ffp-side-menu form {
    margin: 0 0 8px;
}

.ffp-side-menu button,
.ffp-rediscover button {
    width: 100%;
    border: 1px solid var(--ffp-line);
    background: var(--ffp-soft);
    color: var(--ffp-ink);
    border-radius: 6px;
    padding: 9px 11px;
    cursor: pointer;
    text-align: left;
}

.ffp-side-menu button:hover,
.ffp-rediscover button:hover {
    border-color: #1f6feb;
}

.ffp-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0 18px;
}

.ffp-image-error {
    border: 1px solid #d63638;
    background: #fcf0f1;
    color: #8a2424;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0 18px;
}

.ffp-text {
    font-size: 17px;
    line-height: 1.7;
}

.ffp-choices {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.ffp-rediscover {
    margin: 22px 0 0;
}

.ffp-rediscover button {
    border-color: #6b7280;
    background: #fff;
    font-weight: 700;
}

.ffp-rediscover button:disabled {
    cursor: not-allowed;
    color: var(--ffp-muted);
    background: var(--ffp-soft);
}

.ffp-choices form {
    margin: 0;
}

.ffp-choices button {
    width: 100%;
    border: 1px solid #1f6feb;
    background: #1f6feb;
    color: #fff;
    border-radius: 6px;
    padding: 11px 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.ffp-choices button:disabled {
    cursor: not-allowed;
    background: var(--ffp-soft);
    border-color: var(--ffp-line);
    color: var(--ffp-muted);
}

.ffp-last,
.ffp-ending {
    margin-top: 16px;
    background: var(--ffp-soft);
    border: 1px solid var(--ffp-line);
    border-radius: 6px;
    padding: 10px;
}

.ffp-loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(248, 249, 250, 0.82);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.ffp-is-loading .ffp-loader {
    display: flex;
}

.ffp-loader-card {
    max-width: 320px;
    background: #fff;
    border: 1px solid var(--ffp-line);
    border-radius: 8px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 18px 60px rgba(32, 33, 36, 0.14);
}

.ffp-loader-card span {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #d8e2ff;
    border-top-color: #1f6feb;
    border-radius: 50%;
    animation: ffp-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.ffp-loader-card strong,
.ffp-loader-card p {
    display: block;
    margin: 0;
}

.ffp-loader-card p {
    color: var(--ffp-muted);
    margin-top: 6px;
}

@keyframes ffp-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 760px) {
    .ffp-game {
        grid-template-columns: 1fr;
    }
}
