body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #000000; 
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 25%, #172630 0%, #050709 58%, #020303 100%);
}

.game-shell {
    isolation: isolate;
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    display: block;
    max-width: 100vw;
    max-height: 100vh;
}

.top-actions {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.objective-strip {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(620px, calc(100vw - 230px));
    padding: 9px 13px;
    color: #f1e5cd;
    background: rgba(5, 8, 10, 0.7);
    border: 1px solid rgba(220, 202, 158, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.objective-strip span {
    color: #dbc58f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.objective-strip strong {
    font-size: 13px;
    font-weight: 600;
}

.save-status {
    position: absolute;
    top: 66px;
    left: 20px;
    z-index: 10;
    padding: 6px 9px;
    color: rgba(244, 234, 216, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    background: rgba(5, 8, 10, 0.58);
    border: 1px solid rgba(220, 202, 158, 0.2);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
}

.save-status.visible {
    opacity: 1;
    transform: translateY(0);
}

.top-actions button,
.inventory-item {
    color: #eadfca;
    background: rgba(5, 8, 10, 0.64);
    border: 1px solid rgba(220, 202, 158, 0.36);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.22);
    cursor: pointer;
}

.top-actions button {
    min-width: 78px;
    padding: 9px 12px;
    border-radius: 3px;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.top-actions button:hover,
.inventory-item:hover {
    border-color: rgba(238, 210, 144, 0.78);
    color: #fff4d7;
}

.inventory-item.selected {
    border-color: rgba(238, 210, 144, 0.95);
    background: rgba(219, 197, 143, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 245, 210, 0.14), 0 0 24px rgba(219, 197, 143, 0.18), 0 8px 24px rgba(0, 0, 0, 0.22);
}

.bottom-hud {
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 10;
    width: min(1180px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 14px;
    transform: translateX(-50%);
    pointer-events: none;
}

.dialogue-panel,
.inventory-panel {
    background: linear-gradient(180deg, rgba(7, 11, 13, 0.86), rgba(5, 7, 8, 0.94));
    border: 1px solid rgba(224, 205, 166, 0.28);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.dialogue-panel {
    position: relative;
    min-height: 104px;
    padding: 18px 22px;
}

.dialogue-panel.captions-disabled {
    display: grid;
    place-items: center;
}

.speaker {
    display: block;
    margin-bottom: 8px;
    color: #dbc58f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dialogue-panel p {
    max-width: 820px;
    margin: 0;
    color: #f4ead8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.42;
}

.skip-hint {
    position: absolute;
    right: 16px;
    bottom: 10px;
    color: rgba(219, 197, 143, 0.66);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.inventory-panel {
    min-height: 104px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    pointer-events: auto;
    scrollbar-color: rgba(220, 202, 158, 0.4) rgba(5, 8, 10, 0.35);
}

.empty-slot {
    width: 100%;
    color: rgba(232, 219, 192, 0.44);
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
}

.inventory-item {
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
    padding: 6px;
    border-radius: 3px;
}

.inventory-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.modal-backdrop,
.closeup-backdrop,
.broadcast-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.42);
}

.closeup-backdrop {
    z-index: 36;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 42%, rgba(225, 196, 126, 0.08), transparent 44%),
        rgba(0, 0, 0, 0.72);
}

.closeup-panel {
    position: relative;
    width: min(920px, calc(100vw - 40px));
    max-height: min(760px, calc(100vh - 48px));
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    color: #f4ead8;
    background: #050708;
    border: 1px solid rgba(224, 205, 166, 0.34);
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.closeup-panel img {
    width: 100%;
    min-height: 0;
    max-height: calc(100vh - 210px);
    display: block;
    object-fit: contain;
    background: #020303;
}

.closeup-caption {
    padding: 18px 22px 20px;
    background: linear-gradient(180deg, rgba(8, 12, 13, 0.95), rgba(4, 6, 7, 0.98));
    border-top: 1px solid rgba(224, 205, 166, 0.24);
}

.closeup-caption h2 {
    margin: 0 0 8px;
    color: #f2e2bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    letter-spacing: 0;
}

.closeup-caption p {
    margin: 0;
    color: rgba(244, 234, 216, 0.8);
    font-size: 15px;
    line-height: 1.48;
}

.puzzle-panel {
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(224, 205, 166, 0.18);
}

.puzzle-panel span {
    display: block;
    color: rgba(219, 197, 143, 0.78);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.puzzle-panel ol {
    margin: 10px 0 12px;
    padding-left: 20px;
    color: rgba(244, 234, 216, 0.82);
    font-size: 14px;
    line-height: 1.45;
}

.puzzle-panel li + li {
    margin-top: 5px;
}

.puzzle-readouts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.puzzle-readouts div {
    min-width: 0;
    padding: 9px 10px;
    background: rgba(8, 18, 20, 0.56);
    border: 1px solid rgba(119, 184, 178, 0.22);
}

.puzzle-readouts dt {
    overflow: hidden;
    color: rgba(154, 255, 243, 0.68);
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.puzzle-readouts dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    color: #f4ead8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.25;
}

.puzzle-panel strong {
    display: block;
    color: #f2e2bd;
    font-size: 14px;
    line-height: 1.35;
}

.game-modal {
    position: relative;
    width: min(620px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 60px));
    overflow: auto;
    padding: 28px;
    color: #f4ead8;
    background: linear-gradient(180deg, rgba(10, 15, 17, 0.97), rgba(4, 6, 7, 0.98));
    border: 1px solid rgba(224, 205, 166, 0.34);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
}

.game-modal.wide {
    width: min(900px, calc(100vw - 32px));
}

.game-modal h2,
.broadcast-card h2 {
    margin: 0 0 18px;
    color: #f2e2bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    letter-spacing: 0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 7px 10px;
    color: #eadfca;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(220, 202, 158, 0.32);
    cursor: pointer;
}

.pause-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
}

.pause-actions {
    display: grid;
    gap: 10px;
}

.pause-actions button {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    color: #f4ead8;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: left;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(224, 205, 166, 0.22);
    cursor: pointer;
}

.pause-actions button:hover {
    color: #fff4d7;
    border-color: rgba(224, 205, 166, 0.62);
    background: rgba(219, 197, 143, 0.1);
}

.pause-actions .danger-action {
    margin-top: 6px;
    color: #f0c0af;
    border-color: rgba(204, 83, 62, 0.34);
}

.pause-actions .danger-action:hover {
    color: #ffe2d8;
    border-color: rgba(242, 125, 102, 0.72);
    background: rgba(135, 29, 19, 0.2);
}

.pause-status {
    min-height: 228px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(180deg, rgba(7, 14, 17, 0.2), rgba(3, 5, 6, 0.82)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 5px),
        rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(224, 205, 166, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pause-status span,
.pause-status small {
    color: rgba(219, 197, 143, 0.72);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.pause-status strong {
    display: block;
    margin-top: 6px;
    color: #f2e2bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    line-height: 1.1;
}

.pause-status p {
    margin: 14px 0 18px;
    color: rgba(244, 234, 216, 0.8);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.44;
}

.journal-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.journal-tabs button {
    min-width: 0;
    padding: 9px 8px;
    color: rgba(244, 234, 216, 0.64);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(224, 205, 166, 0.18);
    cursor: pointer;
}

.journal-tabs button.active,
.journal-tabs button:hover {
    color: #fff4d7;
    border-color: rgba(224, 205, 166, 0.58);
    background: rgba(219, 197, 143, 0.1);
}

.journal-tabs span,
.journal-tabs small {
    display: block;
}

.journal-tabs span {
    overflow: hidden;
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.journal-tabs small {
    margin-top: 4px;
    color: #dbc58f;
    font-size: 11px;
}

.journal-entry-list {
    display: grid;
}

.dossier-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dossier-card {
    padding: 14px;
    color: rgba(244, 234, 216, 0.82);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(224, 205, 166, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dossier-card-top {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.dossier-portrait,
.dossier-initials {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(224, 205, 166, 0.26);
    background: rgba(10, 18, 22, 0.64);
}

.dossier-portrait {
    display: block;
    object-fit: cover;
    object-position: center top;
}

.dossier-initials {
    display: grid;
    place-items: center;
    color: #dbc58f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 800;
}

.dossier-card-top span {
    display: block;
    margin-bottom: 4px;
    color: rgba(219, 197, 143, 0.72);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dossier-card h3 {
    margin: 0 0 4px;
    color: #fff4d7;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.08;
}

.dossier-card small {
    display: block;
    color: rgba(244, 234, 216, 0.7);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
}

.dossier-card p {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.42;
}

.dossier-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.dossier-card dt {
    margin-bottom: 3px;
    color: rgba(219, 197, 143, 0.68);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dossier-card dd {
    margin: 0;
    color: rgba(244, 234, 216, 0.78);
    font-size: 13px;
    line-height: 1.38;
}

.broadcast-log {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.broadcast-card {
    padding: 14px 16px 16px;
    color: rgba(244, 234, 216, 0.82);
    background:
        linear-gradient(90deg, rgba(108, 189, 202, 0.1), transparent 48%),
        rgba(4, 10, 14, 0.46);
    border: 1px solid rgba(108, 189, 202, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.broadcast-card-top {
    margin-bottom: 12px;
}

.broadcast-card-top span {
    display: block;
    margin-bottom: 6px;
    color: rgba(148, 210, 218, 0.78);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.broadcast-card h3 {
    margin: 0 0 8px;
    color: #fff4d7;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1.12;
}

.broadcast-card p {
    margin: 0;
    color: rgba(244, 234, 216, 0.74);
    font-size: 14px;
    line-height: 1.45;
}

.broadcast-card ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
}

.broadcast-card li {
    padding-left: 3px;
    color: rgba(244, 234, 216, 0.9);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.45;
}

.journal-entry {
    padding: 16px 0;
    border-top: 1px solid rgba(224, 205, 166, 0.2);
}

.journal-entry > span {
    display: block;
    margin-bottom: 6px;
    color: rgba(219, 197, 143, 0.7);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.journal-entry h3 {
    margin: 0 0 8px;
    color: #dbc58f;
    font-size: 14px;
    text-transform: uppercase;
}

.journal-entry p,
.muted {
    margin: 0;
    color: rgba(244, 234, 216, 0.78);
    font-size: 16px;
    line-height: 1.5;
}

.evidence-summary {
    margin: -4px 0 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #f4ead8;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(224, 205, 166, 0.18);
}

.supporting-summary {
    margin: -4px 0 16px;
    padding: 11px 14px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(224, 205, 166, 0.14);
}

.evidence-summary span,
.supporting-summary span,
.evidence-card-top span {
    color: rgba(219, 197, 143, 0.72);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.evidence-summary strong,
.supporting-summary strong {
    color: #f2e2bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
}

.supporting-summary p {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(244, 234, 216, 0.62);
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dependency-strip {
    margin: -4px 0 16px;
    padding: 13px 14px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: rgba(8, 18, 20, 0.5);
    border: 1px solid rgba(119, 184, 178, 0.2);
}

.dependency-strip span {
    color: rgba(154, 255, 243, 0.72);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.dependency-strip strong {
    color: #9afff3;
    font-size: 14px;
}

.dependency-strip p {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(244, 234, 216, 0.74);
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-log {
    margin: -4px 0 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(224, 205, 166, 0.14);
}

.act-log-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.act-log-summary span {
    color: rgba(219, 197, 143, 0.72);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.act-log-summary strong {
    color: #f2e2bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
}

.act-log-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.act-log-card {
    min-height: 128px;
    padding: 12px;
    color: rgba(244, 234, 216, 0.45);
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(224, 205, 166, 0.12);
}

.act-log-card.active {
    color: rgba(244, 234, 216, 0.84);
    border-color: rgba(119, 184, 178, 0.34);
}

.act-log-card.complete {
    color: #f4ead8;
    background: rgba(219, 197, 143, 0.055);
    border-color: rgba(224, 205, 166, 0.34);
}

.act-log-card span {
    display: block;
    color: rgba(154, 255, 243, 0.62);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.act-log-card h3 {
    margin: 6px 0 8px;
    color: inherit;
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
}

.act-log-card p {
    margin: 0;
    color: rgba(244, 234, 216, 0.64);
    font-size: 12px;
    line-height: 1.38;
}

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

.evidence-card {
    min-height: 226px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    color: rgba(244, 234, 216, 0.48);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(224, 205, 166, 0.12);
}

.evidence-card.found {
    color: #f4ead8;
    background:
        linear-gradient(180deg, rgba(219, 197, 143, 0.065), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.025);
    border-color: rgba(224, 205, 166, 0.34);
}

.evidence-card.supporting {
    min-height: 196px;
    background: rgba(8, 18, 20, 0.32);
    border-style: dashed;
}

.evidence-card.supporting.found {
    background:
        linear-gradient(180deg, rgba(119, 184, 178, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(8, 18, 20, 0.32);
    border-color: rgba(119, 184, 178, 0.34);
}

.evidence-card-top {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.evidence-card-top img,
.evidence-placeholder {
    width: 58px;
    height: 58px;
    display: block;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(224, 205, 166, 0.16);
}

.evidence-card h3 {
    margin: 4px 0 0;
    color: #dbc58f;
    font-size: 14px;
    line-height: 1.2;
    text-transform: uppercase;
}

.evidence-card p {
    flex: 1;
    margin: 12px 0 14px;
    color: rgba(244, 234, 216, 0.76);
    font-size: 14px;
    line-height: 1.45;
}

.evidence-card:not(.found) p {
    color: rgba(244, 234, 216, 0.42);
}

.evidence-card button {
    align-self: flex-start;
    min-width: 112px;
    min-height: 36px;
    padding: 8px 10px;
    color: #171109;
    background: #dbc58f;
    border: 1px solid rgba(255, 242, 204, 0.55);
    border-radius: 3px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
}

.evidence-card button:disabled {
    color: rgba(244, 234, 216, 0.35);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(224, 205, 166, 0.16);
    cursor: default;
}

.map-list {
    display: grid;
    gap: 10px;
}

.map-location {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 10px 12px;
    color: rgba(244, 234, 216, 0.44);
    font: inherit;
    text-align: left;
    background: transparent;
    border: 1px solid rgba(224, 205, 166, 0.12);
}

.map-location.unlocked {
    color: #f4ead8;
    border-color: rgba(224, 205, 166, 0.34);
    background: rgba(255, 255, 255, 0.035);
}

.map-location:not(:disabled) {
    cursor: pointer;
}

.map-location:not(:disabled):hover {
    border-color: rgba(224, 205, 166, 0.58);
    background: rgba(255, 255, 255, 0.07);
}

.map-location:disabled {
    cursor: default;
}

.map-location img {
    width: 112px;
    height: 78px;
    display: block;
    object-fit: cover;
    filter: grayscale(1) brightness(0.48);
    border: 1px solid rgba(224, 205, 166, 0.12);
}

.map-location.unlocked img {
    filter: saturate(0.82) brightness(0.82);
    border-color: rgba(224, 205, 166, 0.32);
}

.map-location span {
    min-width: 0;
}

.map-location strong,
.map-location em,
.map-location b,
.map-location p {
    display: block;
}

.map-location strong {
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.map-location em {
    margin-top: 4px;
    color: rgba(219, 197, 143, 0.62);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
}

.map-location b {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: rgba(244, 234, 216, 0.78);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.map-location p {
    margin: 6px 0 0;
    color: rgba(244, 234, 216, 0.58);
    font-size: 12px;
    line-height: 1.35;
}

.map-location small {
    color: #dbc58f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-list {
    display: grid;
    gap: 14px;
}

.settings-list label {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid rgba(224, 205, 166, 0.16);
}

.settings-list span {
    color: #dbc58f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-list input[type="range"] {
    width: 100%;
    accent-color: #dbc58f;
}

.settings-list select {
    min-height: 38px;
    color: #f4ead8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(224, 205, 166, 0.3);
}

.settings-toggle {
    grid-template-columns: 1fr auto;
}

.settings-toggle input {
    width: 22px;
    height: 22px;
    accent-color: #dbc58f;
}

.broadcast-overlay {
    z-index: 40;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 44%, rgba(40, 118, 112, 0.22), transparent 34%),
        radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(0, 0, 0, 0.82) 74%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(153, 255, 238, 0.035) 0 2px, transparent 2px 7px),
        rgba(2, 4, 5, 0.72);
    animation: staticPulse 0.32s steps(2, end) infinite, broadcastVignette 4.8s ease-in-out infinite;
}

.broadcast-card {
    position: relative;
    overflow: hidden;
    width: min(680px, calc(100vw - 32px));
    padding: 30px;
    background: linear-gradient(180deg, rgba(3, 8, 10, 0.94), rgba(1, 5, 6, 0.98));
    border: 1px solid rgba(171, 226, 220, 0.46);
    box-shadow: 0 0 74px rgba(50, 226, 211, 0.2), 0 0 120px rgba(80, 6, 12, 0.32), inset 0 0 44px rgba(50, 226, 211, 0.08);
}

.broadcast-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(151, 255, 241, 0.12), transparent),
        repeating-linear-gradient(0deg, transparent 0 10px, rgba(255, 255, 255, 0.045) 10px 11px);
    mix-blend-mode: screen;
    opacity: 0.48;
    animation: signalSweep 2.4s linear infinite;
}

.broadcast-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 48%;
    height: 2px;
    background: rgba(232, 255, 250, 0.5);
    box-shadow: 0 0 16px rgba(170, 255, 244, 0.8), 0 0 34px rgba(187, 0, 20, 0.52);
    opacity: 0.68;
    animation: signalTear 1.1s steps(2, end) infinite;
}

.broadcast-kicker {
    position: relative;
    display: block;
    margin-bottom: 12px;
    color: #9afff3;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(139, 231, 223, 0.62);
}

.broadcast-card h2 {
    position: relative;
    color: #f6e6c2;
    text-shadow: 0 0 18px rgba(246, 230, 194, 0.22), 1px 0 rgba(141, 255, 239, 0.48), -1px 0 rgba(142, 4, 19, 0.45);
}

.broadcast-card p {
    position: relative;
    margin: 12px 0 0;
    color: #e5fff9;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.45;
    text-shadow: 0 0 14px rgba(111, 237, 226, 0.34), 1px 0 rgba(143, 0, 18, 0.34);
}

.ending-overlay {
    position: absolute;
    inset: 0;
    z-index: 48;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 24%, rgba(218, 184, 108, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(2, 5, 7, 0.62), rgba(0, 0, 0, 0.9));
}

.ending-card {
    width: min(1120px, calc(100vw - 40px));
    max-height: min(760px, calc(100vh - 48px));
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    overflow: hidden;
    color: #f4ead8;
    background: rgba(4, 7, 8, 0.98);
    border: 1px solid rgba(224, 205, 166, 0.34);
    box-shadow: 0 30px 95px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ending-card img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.ending-copy {
    min-height: 0;
    padding: 30px;
    overflow: auto;
    background: linear-gradient(180deg, rgba(8, 13, 15, 0.94), rgba(4, 6, 7, 0.99));
}

.ending-copy > span,
.credits-list h3 {
    color: #dbc58f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ending-copy h2 {
    margin: 8px 0 18px;
    color: #f2e2bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 36px;
    letter-spacing: 0;
}

.ending-copy p {
    margin: 12px 0 0;
    color: rgba(244, 234, 216, 0.82);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.48;
}

.credits-list {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(224, 205, 166, 0.22);
}

.credits-list h3 {
    margin: 0 0 6px;
}

.credits-list p {
    margin-top: 7px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.ending-copy button {
    margin-top: 24px;
    padding: 10px 14px;
    color: #171109;
    background: #dbc58f;
    border: 1px solid rgba(255, 242, 204, 0.55);
    border-radius: 3px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
}

.ending-copy button:hover {
    background: #f1dfac;
}

@keyframes staticPulse {
    0% { opacity: 0.96; transform: translateX(0); }
    50% { opacity: 0.82; transform: translateX(1px); }
    100% { opacity: 0.96; transform: translateX(-1px); }
}

@keyframes broadcastVignette {
    0%, 100% { filter: contrast(1.08) saturate(0.9); }
    50% { filter: contrast(1.32) saturate(1.18); }
}

@keyframes signalSweep {
    0% { transform: translateX(-70%); }
    100% { transform: translateX(70%); }
}

@keyframes signalTear {
    0% { transform: translateY(-38px); opacity: 0.2; }
    36% { transform: translateY(16px); opacity: 0.76; }
    100% { transform: translateY(54px); opacity: 0.28; }
}

.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

@media (max-width: 760px) {
    .objective-strip {
        top: 12px;
        left: 12px;
        right: 12px;
        max-width: none;
    }

    .top-actions {
        top: 58px;
        right: 12px;
    }

    .save-status {
        top: 104px;
        left: 12px;
    }

    .bottom-hud {
        grid-template-columns: 1fr;
        bottom: 12px;
    }

    .dialogue-panel {
        min-height: 88px;
        padding: 14px 16px;
    }

    .dialogue-panel p {
        font-size: 16px;
    }

    .inventory-panel {
        min-height: 72px;
    }

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

    .dossier-grid {
        grid-template-columns: 1fr;
    }

    .evidence-grid {
        grid-template-columns: 1fr;
    }

    .dependency-strip {
        grid-template-columns: auto auto;
    }

    .dependency-strip p {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .act-log-list {
        grid-template-columns: 1fr;
    }

    .map-location {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .map-location img {
        width: 76px;
        height: 64px;
    }

    .map-location small {
        grid-column: 2;
    }

    .settings-list label {
        grid-template-columns: 1fr;
    }

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

    .pause-status {
        min-height: 170px;
    }

    .ending-card {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .ending-card img {
        height: 42vh;
    }

    .ending-copy {
        overflow: visible;
    }
}
