#panel.minigame-panel,.activity-screen {
 position:fixed;inset:0;z-index:1500;box-sizing:border-box;width:100%;max-width:none;height:100dvh;max-height:none;
 margin:0;border:0;border-radius:0;transform:none;backdrop-filter:none;
 padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#panel.minigame-panel {background:#fff4dd;display:flex;flex-direction:column;overflow:auto;}
#panel.minigame-panel[hidden]{display:none;}
#panel.minigame-panel .panel-heading,.activity-screen>header{flex:none;display:flex;align-items:center;gap:.6rem;padding:5px clamp(8px,2vw,26px);min-height:40px;}
.minigame-panel .panel-heading{background:#54314e;color:#fff4dc;}
#panel.minigame-panel #panel-kicker{color:inherit;flex:1;}
.minigame-panel #close-panel,.game-expand{font:700 13px system-ui;white-space:nowrap;width:auto;height:auto;border:1px solid currentColor;border-radius:9px;padding:6px 10px;color:#54314e;background:#fff4dc;}
.game-expand[hidden]{display:none;}
#panel.minigame-panel:has(.chaos-machine)>h2{display:none;}
#panel.minigame-panel #panel-body{flex:1;min-height:0;margin:0;display:flex;flex-direction:column;}
.minigame-panel .chaos-machine{flex:1;min-height:0;display:flex;flex-direction:column;position:relative;border:0;border-radius:0;box-shadow:none;overflow:auto;}
.minigame-panel .chaos-machine canvas{width:100%;flex:1 1 0;height:0;min-height:100px;aspect-ratio:auto;display:block;}
.minigame-panel .chaos-marquee{padding:2px 2%;border-bottom-width:2px;}
.minigame-panel .chaos-marquee img{height:clamp(28px,4.5vh,48px);width:auto;}
.minigame-panel .chaos-console{justify-content:center;gap:clamp(8px,4vw,72px);padding:5px 8px;}
.minigame-panel .chaos-pocket,.minigame-panel .chaos-machine [data-status],.minigame-panel .chaos-how,.minigame-panel .chaos-machine details{margin:2px 2%;}
.minigame-panel .chaos-machine details[open]{max-height:32dvh;overflow:auto;}
.minigame-panel:not(:has(.chaos-machine)) #panel-body{align-items:center;justify-content:center;gap:.5rem;padding:0 5vw;}
.minigame-panel .fishing-display{flex:1;align-self:stretch;max-height:60dvh;}
.activity-screen{display:flex;flex-direction:column;overflow:auto;}
.activity-screen>header>div{margin-right:auto;}.activity-screen>header h2{margin:0;font-size:clamp(16px,2.1vw,24px);}
.activity-screen>header .eyebrow{display:none;}
.activity-screen .activity-strip,.activity-screen .activity-touch{flex:none;padding:4px clamp(8px,2vw,26px);margin:0;}
.activity-screen .activity-stage,.activity-screen[data-scene=tables] .activity-stage{
 flex:1 1 0;min-height:100px;width:100%;height:auto;max-height:none;align-self:stretch;aspect-ratio:auto;border-radius:0;overflow:hidden;
}
.activity-screen .activity-stage #activity-world,.activity-screen .activity-stage #activity-canvas{
 position:absolute;inset:0;box-sizing:border-box;width:100%;height:100%;max-height:none;border:0;border-radius:0;object-fit:contain;
}
.activity-screen[data-scene=tables] #activity-canvas{pointer-events:auto;}
.activity-screen .game-notes{flex:none;max-height:32dvh;overflow:auto;margin:2px 2%;font-size:13px;}
.game-notes summary,.chaos-machine summary{cursor:pointer;}
.activity-screen #activity-results:not(:empty){margin:2px 2%;max-height:32dvh;overflow:auto;}
.activity-screen .table-preview{margin:2px 2%;}
@media(max-height:540px){.minigame-panel .chaos-marquee,.minigame-panel .chaos-how{display:none;}.activity-screen .activity-touch button,.activity-screen header button{padding:4px 8px;}.minigame-panel .chaos-pocket{min-height:0;}.minigame-panel .chaos-console{padding:2px 6px;}}

