.drama-guess-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.dg-head,
.dg-stage,
.dg-scorebar,
.dg-level {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.dg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
}

.dg-head h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    color: var(--ink);
}

.dg-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.dg-levels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dg-level {
    padding: 13px 14px;
    color: var(--muted);
    font-size: 14px;
}

.dg-level.active {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    color: var(--ink);
    background: var(--surface-soft);
}

.dg-level.done {
    color: var(--accent-strong);
    background: var(--tag-bg);
}

.dg-scorebar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 13px 16px;
    color: var(--muted);
    font-size: 14px;
}

.dg-stage {
    min-height: 460px;
    padding: 18px;
    overflow: hidden;
}

.dg-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dg-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--ink);
    padding: 9px 16px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
}

.dg-btn.primary {
    background: var(--accent-strong);
    border-color: transparent;
    color: var(--button-text);
}

.dg-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dg-q-title {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 14px;
}

.dg-hero {
    width: min(560px, 100%);
    margin: 0 auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dg-hero img,
.dg-pair-img img,
.dg-memory-front img,
.dg-memory-front-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dg-memory-front-media {
    width: 100%;
    height: 100%;
}

.dg-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 700;
}

.dg-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.dg-option {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.dg-option.ok {
    border-color: rgba(34, 120, 70, 0.5);
    background: rgba(34, 120, 70, 0.12);
}

.dg-option.bad {
    border-color: rgba(190, 54, 54, 0.45);
    background: rgba(190, 54, 54, 0.12);
}

.dg-memory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dg-memory-card {
    position: relative;
    aspect-ratio: 4 / 3;
    border: 0;
    padding: 0;
    border-radius: var(--radius-md);
    background: transparent;
    transform-style: preserve-3d;
    transition: transform 0.24s ease;
    cursor: pointer;
}

.dg-memory-card.flipped {
    transform: rotateY(180deg);
}

.dg-memory-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
}

.dg-memory-back {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-soft);
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 18px;
}

.dg-memory-front {
    transform: rotateY(180deg);
    background: var(--surface-soft);
}

.dg-memory-card.matched {
    opacity: 0.56;
    pointer-events: none;
}

.dg-pair-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: center;
}

.dg-pair-img {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 16 / 10;
    background: var(--surface-soft);
}

.dg-hint {
    text-align: center;
    margin-top: 14px;
    color: var(--muted);
}

.dg-final {
    text-align: center;
    padding: 56px 18px;
    color: var(--ink);
}

.dg-final h3 {
    margin: 0 0 10px;
    color: var(--ink);
}

@media (max-width: 980px) {
    .dg-levels {
        grid-template-columns: 1fr;
    }

    .dg-memory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dg-pair-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dg-head {
        align-items: stretch;
        flex-direction: column;
    }

    .dg-memory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dg-options {
        grid-template-columns: 1fr;
    }

    .dg-stage {
        min-height: 420px;
        padding: 14px;
    }

    .drama-guess-page {
        gap: 12px;
    }
}
