/* Appearance controls stay reachable on narrow screens. */
.mm-entry .mm-theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:44px;padding:10px 14px;border:1px solid var(--ui-control-line);border-radius:12px;background:var(--ui-surface);color:var(--ui-ink);font:600 var(--type-14)/1.3 var(--sans,system-ui);cursor:pointer;white-space:nowrap}
.mm-entry .mm-theme-toggle:focus-visible,.mm-device-switch button:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
.mm-device-switch{display:flex;gap:4px;justify-content:flex-end;margin:0 0 16px}
.mm-device-switch button{min-height:44px;padding:10px 18px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface);color:var(--ui-muted);font:600 var(--type-14)/1.3 var(--sans,system-ui);cursor:pointer}
.mm-device-switch button[aria-pressed=true]{background:var(--ui-ink);color:var(--ui-surface);border-color:var(--ui-ink)}
.mm-entry[data-entry-device=mobile] .mm-screen-image{display:flex;justify-content:center;align-items:flex-start;padding:20px;background:var(--ui-soft)}
.mm-entry[data-entry-device=mobile] .mm-screen-image img{display:block;width:min(100%,390px);height:auto;max-height:none;object-fit:contain;object-position:top;border:1px solid var(--ui-line);border-radius:18px}
.mm-entry[data-entry-device=desktop] .mm-screen-image img{width:100%;height:auto;object-fit:contain;object-position:top}
html.vr-app .wall-opt span{background:var(--ui-surface);color:var(--ui-ink)}
@media(max-width:600px){.mm-entry .mm-header{flex-wrap:wrap;gap:10px}.mm-entry .mm-brand{margin-right:auto}.mm-entry .mm-header-key{margin-left:0}.mm-entry .mm-theme-toggle{font-size:var(--type-14);padding:9px 11px}.mm-entry .mm-brand small{display:none}.mm-entry[data-entry-device=mobile] .mm-screen-image{padding:12px}.mm-device-switch{justify-content:flex-start}.mm-entry .mm-header nav{order:4;width:100%;justify-content:flex-start}}
@media(max-width:350px){.mm-entry .mm-theme-toggle{padding:8px}.mm-entry .mm-header-key{font-size:var(--type-14)}.mm-entry .mm-brand{gap:5px}.mm-entry .mm-brand>span:last-child{font-size:var(--type-20)}}
@media(max-width:600px){:is(#gate .mm-entry,.mm-entry).mm-entry .mm-header{height:auto;min-height:76px;gap:10px;padding-top:12px;padding-bottom:12px}:is(#gate .mm-entry,.mm-entry).mm-entry .mm-brand{margin-right:auto;flex:none}:is(#gate .mm-entry,.mm-entry).mm-entry .mm-header-key{margin-left:0}:is(#gate .mm-entry,.mm-entry).mm-entry .mm-brand>span:last-child{font-size:var(--type-20)}}
:is(#gate .mm-entry,.mm-entry).mm-entry[data-entry-device=mobile] .mm-screen-image{display:flex;justify-content:center;align-items:flex-start;padding:0;background:var(--ui-soft)}
:is(#gate .mm-entry,.mm-entry).mm-entry[data-entry-device=mobile] .mm-screen-image img{width:min(100%,390px);height:auto;max-height:none;object-fit:contain;object-position:top}
.mm-device-switch{padding:16px 18px 0}
@media(max-width:600px){:is(#gate .mm-entry,.mm-entry).mm-entry[data-entry-device=mobile] .mm-screen-panel{padding:22px 10px 10px}:is(#gate .mm-entry,.mm-entry).mm-entry[data-entry-device=mobile] .mm-screen-copy{padding:0 8px}}

/* Full device previews: the frame owns its natural height, with no clipping. */
:is(#gate .mm-entry,.mm-entry).mm-entry[data-entry-device] .mm-screen-image{display:flex;align-items:center;justify-content:center;align-self:center;width:100%;max-height:none;overflow:visible;background:transparent;border:0;border-radius:0;padding:16px 22px 26px;box-shadow:none}
.mm-preview-device{position:relative;box-sizing:border-box;background:var(--color-source-202020);border:1px solid var(--color-source-64615c);margin:auto;flex:none;max-width:100%}
.mm-device-screen{overflow:hidden;background:var(--color-ink);line-height:0}
:is(#gate .mm-entry,.mm-entry).mm-entry[data-entry-device] .mm-screen-image .mm-device-screen img{display:block;width:100%;height:auto;max-width:100%;max-height:none;border:0;border-radius:0;object-fit:contain;margin:0}
.mm-entry[data-entry-device=mobile] .mm-preview-device{width:min(100%,312px);padding:25px 7px 20px;border-radius:34px}
.mm-entry[data-entry-device=mobile] .mm-device-screen{border-radius:22px}
.mm-entry[data-entry-device=mobile] .mm-preview-device::before{content:"";position:absolute;width:44px;height:4px;border-radius:4px;background:var(--color-source-87837b);left:calc(50% - 22px);top:10px}
.mm-entry[data-entry-device=mobile] .mm-preview-device::after{content:"";position:absolute;width:66px;height:3px;border-radius:4px;background:var(--color-source-87837b);left:calc(50% - 33px);bottom:8px}
.mm-entry[data-entry-device=desktop] .mm-preview-device{width:100%;padding:19px 8px 11px;border-radius:13px 13px 3px 3px}
.mm-entry[data-entry-device=desktop] .mm-device-screen{border-radius:3px}
.mm-entry[data-entry-device=desktop] .mm-preview-device::before{content:"";position:absolute;width:5px;height:5px;background:var(--color-source-87837b);border-radius:50%;left:calc(50% - 2.5px);top:7px}
.mm-entry[data-entry-device=desktop] .mm-preview-device::after{content:"";position:absolute;left:-3.5%;bottom:-12px;width:107%;height:12px;box-sizing:border-box;border:1px solid var(--color-source-64615c);background:var(--color-source-373532);border-radius:1px 1px 12px 12px}
:is(#gate .mm-entry,.mm-entry).mm-entry .mm-preview-dialog[data-preview-device=mobile]{width:min(480px,calc(100vw - 20px))}
:is(#gate .mm-entry,.mm-entry).mm-entry .mm-preview-dialog[data-preview-device=mobile]>img{display:block;width:100%;height:auto;max-height:calc(90dvh - 70px);object-fit:contain;background:var(--color-ink)}
@media(max-width:600px){:is(#gate .mm-entry,.mm-entry).mm-entry[data-entry-device] .mm-screen-image{padding:12px 12px 22px}.mm-entry[data-entry-device=mobile] .mm-preview-device{width:min(100%,300px)}.mm-entry[data-entry-device=desktop] .mm-preview-device{padding:13px 5px 7px;border-radius:9px 9px 2px 2px}.mm-entry[data-entry-device=desktop] .mm-preview-device::before{top:4px;width:4px;height:4px}}
