/* REVAMED MANSION — ACT III — THE CONTAINMENT COMPLEX */

.act3-room {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    padding: clamp(18px, 3vw, 34px);
    background:
        radial-gradient(circle at 50% 12%, rgba(150, 130, 90, 0.1), transparent 36%),
        linear-gradient(180deg, #0c0c0e 0%, #08080a 55%, #030304 100%);
    color: #e6e0d3;
    box-sizing: border-box;
}

.act3-copy {
    max-width: 720px;
    margin-bottom: 18px;
}

.act3-kicker {
    margin: 0 0 6px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b79a63;
}

.act3-copy h3 {
    margin: 0 0 10px;
    font-size: clamp(22px, 3vw, 30px);
    color: #f2ece0;
}

.act3-copy p {
    margin: 0;
    line-height: 1.5;
    color: #c9c1b1;
}

.act3-status,
.act3-progress,
.act3-clue {
    min-height: 1.4em;
    margin: 12px 0;
    font-size: 0.98rem;
    color: #d7cfbf;
}

.act3-continue,
.act3-return {
    display: inline-flex;
    margin-top: 16px;
    margin-right: 10px;
    min-height: 44px;
}

.act3-optional-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.act3-optional {
    min-height: 44px;
}

.act3-optional.is-used {
    opacity: 0.65;
    border-style: dashed;
}

/* ---------- Specimen Gallery ---------- */

.gallery-evidence-rack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.gallery-evidence-chip {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(183, 154, 99, 0.4);
    background: rgba(30, 26, 18, 0.7);
    color: #e6e0d3;
    cursor: pointer;
    font-size: 0.88rem;
}

.gallery-evidence-chip.is-selected {
    border-color: #d8b46b;
    box-shadow: 0 0 0 2px rgba(216, 180, 107, 0.35);
}

.gallery-evidence-chip.is-used {
    opacity: 0.4;
    cursor: default;
}

.gallery-species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.gallery-species-card {
    text-align: left;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(183, 154, 99, 0.25);
    background: rgba(14, 12, 9, 0.7);
    color: inherit;
    cursor: pointer;
    min-height: 44px;
}

.gallery-species-card h4 {
    margin: 0 0 4px;
    color: #f0e6cf;
}

.gallery-species-hint {
    margin: 0;
    font-size: 0.82rem;
    color: #a99a78;
}

.gallery-species-card.is-matched {
    border-color: rgba(110, 220, 150, 0.5);
    box-shadow: 0 0 14px rgba(110, 220, 150, 0.1);
}

.gallery-species-bio p {
    margin: 6px 0 0;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #cfc6b0;
}

/* ---------- Service Tunnels ---------- */

.tunnels-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.tunnels-choices button {
    min-height: 48px;
    flex: 1 1 200px;
}

/* ---------- Vance Control Room ---------- */

.control-systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.control-system-card {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(183, 154, 99, 0.25);
    background: rgba(14, 12, 9, 0.7);
}

.control-system-label {
    margin: 0 0 6px;
    font-weight: 700;
    color: #f0e6cf;
}

.control-system-log {
    margin: 0 0 10px;
    font-size: 0.84rem;
    line-height: 1.4;
    color: #b6ac93;
}

.control-system-card output {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.control-system-card button {
    min-height: 40px;
}

.core-instrument.is-used,
.control-system-card.is-used {
    opacity: 0.7;
}

/* ---------- Original Foundation Pens ---------- */

.pens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.pens-hotspot {
    position: relative;
    min-height: 48px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(183, 154, 99, 0.3);
    background: rgba(20, 17, 12, 0.7);
    color: inherit;
    cursor: pointer;
}

.pens-hotspot.is-inspected {
    border-color: rgba(110, 220, 150, 0.5);
}

.pens-optional-tag {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8f8264;
}

/* ---------- Foyer Finale ---------- */

.foyer-finale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.foyer-finale-hotspot {
    min-height: 48px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(183, 154, 99, 0.3);
    background: rgba(20, 17, 12, 0.7);
    color: inherit;
    cursor: pointer;
}

.foyer-finale-hotspot.is-inspected {
    border-color: rgba(110, 220, 150, 0.5);
}

/* ---------- Containment Core ---------- */

.core-stage-panel,
.core-ending-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 520px;
}

.core-instrument {
    min-height: 46px;
    text-align: left;
}

.ending-button {
    min-height: 48px;
    text-align: left;
}

.ending-button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.act3-ending-card {
    position: absolute;
    inset: 8% 6%;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    padding: clamp(18px, 3vw, 32px);
    border-radius: 14px;
    border: 1px solid rgba(183, 154, 99, 0.35);
    background: rgba(6, 6, 8, 0.97);
    box-shadow: 0 20px 60px rgba(0,0,0,0.65);
}

.act3-enter-button,
.act3-title-button {
    display: inline-flex;
    margin-top: 14px;
}

@media (max-width: 480px) {
    .act3-room { min-height: 560px; padding: 16px; }
    .gallery-species-grid,
    .control-systems-grid,
    .pens-grid,
    .foyer-finale-grid { grid-template-columns: 1fr; }
    .tunnels-choices { flex-direction: column; }
    .tunnels-choices button { flex: 1 1 auto; }
}

@media (min-width: 1200px) {
    .act3-room { min-height: 680px; }
}
