.mg-foto-galeria {
    --foto-arena: #dfcbb1;
    --foto-tinta: #24201c;
    background: var(--foto-arena);
    color: var(--foto-tinta);
}
.mg-foto-pista {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
}
.mg-foto-pista::-webkit-scrollbar { display: none; }
#game-shell .mg-foto-pista > .mg-foto-vista {
    flex: 0 0 100%;
    display: grid;
    position: relative;
    place-items: center;
    min-width: 0;
    height: clamp(225px, 37vw, 340px);
    padding: 14px 16px 38px;
    background: transparent !important;
    color: inherit;
    border: 0;
    border-radius: 0 !important;
    scroll-snap-align: start;
    box-sizing: border-box;
}
button.mg-foto-vista { cursor: zoom-in; }
#game-shell .mg-foto-vista img {
    display: block;
    position: absolute;
    inset: 12px 14px auto;
    width: calc(100% - 28px) !important;
    height: calc(100% - 48px) !important;
    min-height: 0;
    max-height: none !important;
    object-fit: contain !important;
    border: 0 !important;
    border-radius: 0 !important;
    user-select: none;
    -webkit-user-drag: none;
}
.mg-foto-observar {
    position: absolute;
    bottom: 8px;
    right: 10px;
    padding: 5px 11px;
    border: 1px solid #9c826a;
    border-radius: 999px;
    background: #ecdbc5;
    color: var(--foto-tinta);
    font-size: 12px;
    font-weight: 750;
}
.mg-foto-nav {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-top: 1px solid #baa185;
    background: #ebdac4;
}
#game-shell .mg-foto-nav > .mg-foto-arrow, #game-shell .mg-foto-inspector header > .mg-foto-arrow {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid #806951;
    border-radius: 50% !important;
    background: #f6e9d7 !important;
    color: #211a15 !important;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}
.mg-foto-arrow svg { width: 22px; height: 22px; }
.mg-foto-arrow[aria-disabled="true"] { opacity: .55; }
.mg-foto-arrow:focus-visible, .mg-foto-vista:focus-visible { outline: 2px solid #603952; outline-offset: -3px; }
.mg-foto-contador { font-size: 13px; font-weight: 750; white-space: nowrap; }
.mg-foto-pista-ayuda { margin-left: auto; font-size: 12px; font-weight: 650; }

#game-shell .mg-foto-inspector {
    width: min(670px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid #91765e;
    border-radius: 14px;
    background: #161212;
    color: #f7f2ea;
}
.mg-foto-inspector::backdrop { background: #0b0708cb; }
.mg-foto-inspector > header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 12px; }
.mg-foto-inspector h2 { margin: 0; font-size: clamp(16px, 3.8vw, 24px); }
#game-shell .mg-foto-inspector .mg-foto-vista { height: clamp(180px, calc(100dvh - 162px), 560px); padding: 15px; }
#game-shell .mg-foto-inspector .mg-foto-vista img { height: calc(100% - 24px) !important; }

.mg-gorra-escena {
    display: grid;
    justify-items: center;
    background: #dfcbb1;
    color: #24201c;
    padding: 0 12px 10px;
}
.mg-gorra-escena canvas {
    width: min(100%, 520px, calc(100dvh - 185px));
    height: auto;
    aspect-ratio: 1;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.mg-gorra-escena canvas:active { cursor: grabbing; }
.mg-gorra-guia { font-size: 13px; font-weight: 700; pointer-events: none; }
.mg-gorra-controles .mg-foto-contador { min-width: 77px; text-align: center; }
#game-shell .mg-gorra-interior {
    margin-left: auto;
    padding: 7px 10px;
    min-height: 40px;
    border: 1px solid #806951;
    border-radius: 999px;
    background: #f6e9d7;
    color: #211a15;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

#game-shell .mg-foto-vista > .mg-gorra-en-foto {
    width: auto;
    max-width: 100%;
    height: calc(100% - 38px);
    aspect-ratio: 1;
    cursor: grab;
    touch-action: pan-y;
    align-self: start;
}
.mg-gorra-en-foto:active { cursor: grabbing; }
.mg-gorra-en-foto:focus-visible { outline: 2px solid #db9fbb; outline-offset: 2px; }
.mg-gorra-en-foto-guia {
    position: absolute;
    bottom: 9px;
    color: #f7f2ea;
    background: #211b1b;
    border-radius: 999px;
    padding: 5px 10px;
}
