/* M4 — Turn on the lights: existing PEDE & FATIA visual language */
.mobile #content.m4-content{margin:0;padding:0;border:0;background:transparent;box-shadow:none;display:flex;flex-direction:column;align-items:stretch;gap:0}
.mobile #content.m4-content .m4-kicker{margin:0 0 2px;text-align:center;color:var(--acid);font:500 clamp(12px,3.2vw,15px) 'DM Mono';letter-spacing:.22em}
.mobile #content.m4-content .m4-headline{margin:0 0 14px!important;text-align:center;color:var(--fg);font:700 clamp(76px,22vw,112px)/.78 'Space Grotesk'!important;letter-spacing:-.105em!important;text-transform:uppercase}
.mobile #content.m4-content .m4-headline span{color:var(--red)}
.mobile #content.m4-content .m4-visual{width:100%;height:clamp(190px,54vw,300px);overflow:hidden;border:1px solid rgba(240,201,120,.42);background:radial-gradient(ellipse at 60% 38%,rgba(240,201,120,.12),transparent 55%),#171716;display:flex;align-items:center;justify-content:center}
.mobile #content.m4-content .m4-visual img{width:100%;height:100%;object-fit:cover;object-position:center 48%;display:block;mix-blend-mode:screen}
.mobile #content.m4-content .m4-instruction{margin:14px 0 16px;text-align:center;color:var(--acid);font:500 clamp(11px,3vw,14px)/1.5 'DM Mono';letter-spacing:.1em}
.mobile #content.m4-content .m4-torch-button{width:100%;min-height:58px;margin:0;padding:13px 14px;display:flex;align-items:center;justify-content:center;gap:13px;background:var(--acid);color:#211b14;border:1px solid rgba(240,201,120,.8);font:700 12px 'DM Mono';letter-spacing:.07em}
.mobile #content.m4-content .m4-torch-icon{font-size:23px;line-height:1;border-right:1px solid rgba(33,27,20,.35);padding-right:13px}
.mobile #content.m4-content .m4-torch-button.is-on{background:var(--red);color:#fff;border-color:var(--red)}
.mobile #content.m4-content .m4-status{min-height:28px;margin:10px 0 0;text-align:center;color:var(--muted);font:10px/1.5 'DM Mono';letter-spacing:.06em}
@media(max-height:720px){.mobile #content.m4-content .m4-headline{font-size:clamp(64px,17vw,88px)!important;margin-bottom:10px!important}.mobile #content.m4-content .m4-visual{height:clamp(150px,38vh,230px)}.mobile #content.m4-content .m4-instruction{margin:10px 0}}
.mobile.m4-mode>#title,.mobile.m4-mode>#intro{display:none!important}
.mobile.m4-mode header{margin-bottom:clamp(16px,4vh,28px)}

/* M4 mobile full-screen composition — no scroll, image merges into the stage background */
html:has(.mobile.m4-mode),html:has(.mobile.m4-mode) body{
 width:100%;height:100%;min-height:0;overflow:hidden;overscroll-behavior:none;
}
body:has(.mobile.m4-mode){position:fixed;inset:0;min-height:0;width:100%;height:100%;overflow:hidden}
.mobile.m4-mode{
 width:100%;max-width:none;height:100vh;height:100svh;min-height:0;
 padding:env(safe-area-inset-top) 4vw env(safe-area-inset-bottom);
 margin:0;overflow:hidden;display:flex;flex-direction:column;
}
.mobile.m4-mode header{
 flex:none;height:clamp(48px,7.5svh,68px);min-height:0;
 margin:0 0 clamp(8px,1.8svh,18px);padding:0 0 8px;
}
.mobile.m4-mode header b{font-size:clamp(20px,5.2vw,27px)}
.mobile.m4-mode #content.m4-content{
 flex:1 1 auto;min-height:0;height:100%;overflow:hidden;
 display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;
 align-items:stretch;justify-content:stretch;gap:0;
}
.mobile.m4-mode #content.m4-content .m4-kicker{
 font-size:clamp(15px,4.4vw,20px);line-height:1.1;
 margin:0 0 5px;letter-spacing:.24em;
}
.mobile.m4-mode #content.m4-content .m4-headline{
 font-size:clamp(92px,25vw,150px)!important;line-height:.76!important;
 margin:0 0 clamp(5px,1.3svh,12px)!important;
 letter-spacing:-.105em!important;white-space:nowrap;
}
.mobile.m4-mode #content.m4-content .m4-visual{
 min-height:0;height:100%;width:100%;overflow:hidden;
 border:0!important;outline:0!important;box-shadow:none!important;
 background:transparent!important;
}
.mobile.m4-mode #content.m4-content .m4-visual img{
 width:100%;height:100%;object-fit:contain;object-position:center;
 mix-blend-mode:screen;filter:contrast(1.04);
}
.mobile.m4-mode #content.m4-content .m4-instruction{
 font-size:clamp(13px,3.8vw,17px);line-height:1.35;
 margin:clamp(5px,1.2svh,11px) 0 clamp(8px,1.6svh,15px);
 letter-spacing:.12em;
}
.mobile.m4-mode #content.m4-content .m4-torch-button{
 min-height:clamp(58px,8.5svh,76px);width:100%;margin:0;padding:10px 12px;
 font-size:clamp(13px,3.7vw,16px);letter-spacing:.075em;
}
.mobile.m4-mode #content.m4-content .m4-torch-icon{font-size:26px}
.mobile.m4-mode #content.m4-content .m4-status{
 min-height:0;margin:clamp(6px,1.1svh,10px) 0 0;
 font-size:clamp(10px,2.8vw,12px);line-height:1.25;
}
@media(max-height:760px){
 .mobile.m4-mode header{height:46px;margin-bottom:6px}
 .mobile.m4-mode #content.m4-content .m4-headline{font-size:clamp(76px,21vw,112px)!important;margin-bottom:3px!important}
 .mobile.m4-mode #content.m4-content .m4-instruction{margin:5px 0 7px;font-size:12px}
 .mobile.m4-mode #content.m4-content .m4-torch-button{min-height:52px}
 .mobile.m4-mode #content.m4-content .m4-status{margin-top:5px;font-size:9px}
}


/* Final M4 balance: larger header and lower action block */
.mobile.m4-mode header b{font-size:clamp(26px,6.76vw,35px)}
.mobile.m4-mode header small{font-size:clamp(13px,3.38vw,14.3px)}
.mobile.m4-mode{
 height:100dvh;
 padding-bottom:calc(env(safe-area-inset-bottom) + clamp(12px,2.2svh,22px));
}
.mobile.m4-mode #content.m4-content{
 grid-template-rows:auto auto minmax(0,1fr) auto auto;
}
.mobile.m4-mode #content.m4-content .m4-instruction{
 margin-top:clamp(10px,2svh,18px);
 margin-bottom:clamp(12px,2.4svh,22px);
}
.mobile.m4-mode #content.m4-content .m4-status{
 margin-top:clamp(8px,1.6svh,15px);
 padding-bottom:clamp(2px,.5svh,5px);
}
@media(max-height:760px){
 .mobile.m4-mode{padding-bottom:calc(env(safe-area-inset-bottom) + 10px)}
 .mobile.m4-mode header b{font-size:clamp(24px,6.2vw,31px)}
 .mobile.m4-mode header small{font-size:12px}
 .mobile.m4-mode #content.m4-content .m4-instruction{margin-top:8px;margin-bottom:9px}
 .mobile.m4-mode #content.m4-content .m4-status{margin-top:7px}
}

.mobile.m4-mode #content.m4-content{grid-template-rows:auto minmax(0,1fr) auto auto auto!important}

/* Ajuste para todos os telemóveis: o título ocupa duas linhas e nunca alarga o ecrã.
   Antes, as duas linhas ficavam numa só (nowrap a 25vw) e a grelha alargava para lá do ecrã. */
.mobile.m4-mode #content.m4-content{grid-template-columns:minmax(0,1fr)!important;width:100%;max-width:100%}
.mobile.m4-mode #content.m4-content>*{min-width:0;max-width:100%}
.mobile.m4-mode #content.m4-content .m4-headline{
 font-size:min(19vw,11.5svh,130px)!important;line-height:.82!important;
 white-space:normal;overflow:hidden;padding-right:.08em;
}
.mobile.m4-mode #content.m4-content .m4-headline span{display:block;white-space:nowrap}
.mobile.m4-mode #content.m4-content .m4-instruction,
.mobile.m4-mode #content.m4-content .m4-status{overflow-wrap:anywhere}
.mobile.m4-mode #content.m4-content .m4-torch-button{flex-wrap:wrap;text-align:center}
@media(max-height:760px){
 .mobile.m4-mode #content.m4-content .m4-headline{font-size:min(19vw,10.5svh,118px)!important}
}
