html:has(dialog.ive-home-dialog[open]){overflow:hidden}
dialog.ive-home-dialog {
 width:min(72rem,calc(100% - 2rem));max-width:none;height:min(51rem,calc(100% - 2rem));max-height:none;
 box-sizing:border-box; padding:0; overflow:hidden;
 color:#fff6ec;background:#141628;border:2px solid #9878b0;border-radius:12px;
 box-shadow:0 8px 44px #08040be6;
}
dialog.ive-home-dialog::backdrop{background:#0e0726cf}
dialog.ive-home-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
.ive-dialog-head{
 display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem .5rem 1rem;gap:1rem;
 background:#241937;border-bottom:1px solid #644d78;color:#fff2ff;font:700 .94rem/1.25 var(--ive-mono,monospace)
}
.ive-dialog-head button{min-height:44px;padding:.44rem .8rem;background:#302241;color:#fff2ff;border:1px solid #9878b0;border-radius:5px}
.ive-dialog-head button:hover{color:#201331;background:#f5deff}
.ive-dialog-head button:focus-visible,#ive-guide-button:focus-visible{outline:3px solid #f3d981;outline-offset:2px}
.ive-home-dialog iframe{width:100%;height:100%;min-height:0;border:0;background:#141628}
#ive-guide-button{
 position:fixed;z-index:8;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));
 isolation:isolate;display:grid;grid-template-columns:38px auto;grid-template-rows:1fr;align-items:center;gap:.5rem;
 min-height:55px;padding:.32rem .69rem .32rem .46rem;
 color:#fff4fb;background:#241838;border:2px solid #a889c4;border-radius:10px;
 box-shadow:0 .23rem 0 #100a1c,0 .32rem 1rem #0c0718a8;font:750 .78rem/1.13 var(--ive-mono,monospace)
}
#ive-guide-button img{width:38px;height:48px;object-fit:contain;image-rendering:pixelated;pointer-events:none}
#ive-guide-button[hidden],body:has(#play-shell:not([hidden])) #ive-guide-button{display:none}
#ive-guide-button:hover{background:#37264c;color:#fff4fb}
dialog#ive-guide-dialog{width:min(28rem,calc(100% - 2rem));height:auto;max-height:calc(100% - 2rem);inset:auto max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) auto;margin:0}
.ive-guide-content{padding:.85rem 1rem 1.1rem;overflow:auto;line-height:1.45;color:#f6eaff}
.ive-guide-content p{margin:0 0 .65rem}
.ive-guide-content ol{padding-left:1.3rem;margin:.2rem 0 .8rem}
.ive-guide-content li+li{margin-top:.54rem}
.ive-guide-content a{color:#faf2ff;text-decoration:underline}
@media(max-width:575px){
 dialog.ive-home-dialog:not(#ive-guide-dialog){width:calc(100% - .5rem);height:calc(100% - .75rem)}
 #ive-guide-button{right:max(.55rem,env(safe-area-inset-right));bottom:max(.55rem,env(safe-area-inset-bottom))}
}
/* Outer device housing of the embedded field guide, not a generic dialog. */
@font-face{font-family:VT323;src:url('./site-art/fonts/VT323-Regular.ttf') format('truetype');font-display:swap}
dialog#ive-dex-dialog {
 --dex-red:#cb3e46;--dex-edge:#531c35;--dex-hot:#f77b70;
 background:linear-gradient(145deg,#e34e50,var(--dex-red) 38%,#a3273d 100%);
 border:4px solid var(--dex-edge);border-radius:22px 22px 18px 18px;
 box-shadow:inset 0 4px var(--dex-hot),inset 0 -5px #76273a,0 9px 0 #201122,0 18px 55px #06030add;
 padding:0 9px 9px;
}
#ive-dex-dialog::backdrop{background:#100a23ba}
#ive-dex-dialog .ive-dialog-head {
 background:none;border:0;padding:10px 5px 8px;min-height:62px;
 color:#fff4dc;text-shadow:1px 2px #641e36;
 gap:12px;font:400 clamp(20px,3.8vw,29px)/1 VT323,monospace;
}
.dex-device-lights{display:flex;align-items:flex-start;gap:5px;flex:none}
.dex-device-lens{
 width:35px;height:35px;display:block;border:3px solid #4e1c35;border-radius:50%;
 background:radial-gradient(circle at 31% 26%,#edfcff 0 14%,#b3ebf7 15% 25%,#57a7e7 27% 50%,#2865a2 51% 100%);
 box-shadow:0 0 0 2px #fff1e6,inset -2px -3px 0 #194578;
}
.dex-device-led{width:8px;height:8px;margin-top:3px;border:1px solid #4e1c35;border-radius:50%;box-shadow:inset 1px 1px #fff8e199}
.dex-device-led.is-red{background:#fa756e}.dex-device-led.is-yellow{background:#ffdf79}.dex-device-led.is-green{background:#87ce97}
.dex-device-mark{display:grid;gap:2px;margin-right:auto}
.dex-device-mark small{letter-spacing:.07em;font-size:.65em;color:#ffe0ba}
#ive-dex-dialog .ive-dialog-head button {
 border:2px solid #4f2437;border-radius:6px;box-shadow:inset 0 2px #ffffff50,0 2px #4f2437;
 background:#eee5d1;color:#371d39;min-height:37px;padding:.3rem .67rem;font:400 21px/1 VT323,monospace;
}
#ive-dex-dialog .ive-dialog-head button:hover{background:#fff3c9}
#ive-dex-dialog .ive-dialog-head button:focus-visible{outline-color:#fff3ba}
#ive-dex-dialog iframe{box-sizing:border-box;border:3px solid #522337;border-radius:10px;background:#b9414a}
@media(max-width:575px){
 dialog#ive-dex-dialog{padding:0 4px 4px;border-width:3px;border-radius:14px}
 #ive-dex-dialog .ive-dialog-head{min-height:49px;gap:8px;padding:6px 4px}
 .dex-device-lens{width:27px;height:27px}.dex-device-led{width:5px;height:5px}.dex-device-lights{gap:3px}
 #ive-dex-dialog .ive-dialog-head button{min-height:34px;font-size:18px}
}
