#main-content .maze-adventure-hud{position:sticky;top:0;z-index:2;grid-template-columns:auto minmax(0,1fr) auto;width:min(96%,440px);font-family:system-ui,sans-serif;gap:0;min-height:48px}
#main-content .maze-adventure-hud .maze-status-item{padding:5px 9px;gap:5px;flex-wrap:wrap}#main-content .maze-adventure-hud .maze-status-resources{gap:10px}
.maze-resource{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;white-space:nowrap}.maze-resource>img{width:23px!important;height:23px!important;object-fit:contain!important;display:block!important}.maze-resource b{font-variant-numeric:tabular-nums}
.maze-special-overlay{position:absolute;inset:1px;width:calc(100% - 2px);height:calc(100% - 2px);object-fit:contain;filter:drop-shadow(0 0 2px #f8cd65);pointer-events:none}.maze-pickup-overlay{position:absolute;inset:6px;width:calc(100% - 12px);height:calc(100% - 12px);object-fit:contain;filter:drop-shadow(0 1px 2px #201629);pointer-events:none}
.maze-adventure-overlay{position:fixed;inset:0;z-index:15000;background:#171329ba;display:flex;align-items:center;justify-content:center;padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));box-sizing:border-box;overscroll-behavior:contain}
.maze-adventure-dialog{position:relative;box-sizing:border-box;max-width:420px;width:100%;max-height:100%;overflow-y:auto;padding:24px;border:1px solid #d0b276;border-radius:25px;background:linear-gradient(155deg,#fffcf3,#f4ebdc);color:#453656;text-align:center;box-shadow:0 20px 70px #100a2a66;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;scrollbar-width:thin}
.maze-adventure-x{position:absolute;right:8px;top:8px;width:44px;height:44px;border:0!important;background:transparent!important;box-shadow:none!important;color:#776886;font-size:26px;cursor:pointer}
.maze-adventure-portrait{height:190px;max-height:28dvh;display:flex;align-items:center;justify-content:center;margin:0 auto 12px;isolation:isolate}.maze-adventure-portrait img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 7px 9px #301f3c2e)}
.maze-adventure-overlay[data-kind="info"] .maze-adventure-portrait{height:86px}.maze-adventure-overlay[data-kind="chest"] .maze-adventure-portrait{height:130px}
.maze-adventure-eyebrow{font-size:10px;font-weight:750;letter-spacing:.12em;text-transform:uppercase;color:#927141;margin:0 22px 7px}.maze-adventure-dialog h2{font:700 28px/1.12 Georgia,serif;margin:0 0 13px;color:#4b356c;text-wrap:balance}.maze-adventure-dialog p{font:400 15px/1.6 system-ui,sans-serif;margin:0 0 20px;color:#685971;text-wrap:pretty;white-space:pre-line}
.maze-adventure-actions{display:grid;gap:10px}.maze-adventure-actions button{box-sizing:border-box;min-height:48px;width:100%;padding:12px 16px!important;border-radius:14px!important;cursor:pointer;font:650 16px/1.3 system-ui,sans-serif!important;white-space:normal}.maze-adventure-confirm{border:1px solid #684691!important;background:#684691!important;color:#fff!important;box-shadow:0 4px 12px #59397726!important}.maze-adventure-cancel{border:1px solid #c8b8d3!important;background:#fff9f0!important;color:#654a7d!important;box-shadow:none!important}
.maze-adventure-dialog button:focus-visible{outline:3px solid #3c87b5;outline-offset:3px}.maze-adventure-toast{position:fixed;left:50%;bottom:calc(110px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:16000;width:max-content;max-width:calc(100% - 28px);box-sizing:border-box;border:1px solid #9bd1d5;border-radius:13px;background:#eafafa;color:#205d69;padding:12px 17px;box-shadow:0 6px 25px #102f4129;font:600 14px/1.4 system-ui,sans-serif;text-align:center;pointer-events:none}
.maze-adventure-battle-heading{display:flex;align-items:center;gap:12px;margin:0 0 14px;padding-bottom:12px;border-bottom:1px solid #dccde6}.maze-adventure-battle-heading img{width:58px;height:68px;object-fit:contain}.maze-adventure-battle-heading span{display:grid;gap:4px}.maze-adventure-battle-heading small{font:600 10px/1.3 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.06em;color:#896792}.maze-adventure-battle-heading strong{font:700 20px/1.2 Georgia,serif;color:#5f3d79}
@media(max-width:350px){#main-content .maze-adventure-hud .maze-status-item{padding-inline:5px}#main-content .maze-adventure-hud .maze-status-resources{gap:6px}.maze-adventure-hud .maze-status-item b{font-size:13px}.maze-resource>img{width:19px!important;height:19px!important}.maze-adventure-dialog{padding:18px}.maze-adventure-dialog h2{font-size:25px}.maze-adventure-dialog p{font-size:14px}}
@media(max-height:560px){.maze-adventure-dialog{padding:18px}.maze-adventure-portrait{height:90px;max-height:20dvh;margin-bottom:5px}.maze-adventure-dialog p{margin-bottom:12px;font-size:14px}.maze-adventure-dialog h2{font-size:24px;margin-bottom:8px}.maze-adventure-actions{grid-template-columns:1fr 1fr}.maze-adventure-actions>button:only-child{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.maze-adventure-overlay,.maze-adventure-dialog{animation:none!important;transition:none!important}}

/* Chest rewards: a compact sentence with illustrated amounts. */
.maze-adventure-reward-line{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:0 0 22px;color:#5a4728;font:400 20px/1.4 Georgia,serif}.maze-adventure-reward-line>span{white-space:nowrap}.maze-adventure-rewards{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;margin:0;padding:0;list-style:none}.maze-adventure-rewards li{display:inline-flex;align-items:center;gap:6px;color:inherit;white-space:nowrap}.maze-adventure-rewards img{display:block;width:32px;height:32px;object-fit:contain}.maze-adventure-rewards b{font:700 20px/1.2 Georgia,serif;font-variant-numeric:tabular-nums}
.maze-adventure-overlay[data-kind="chest"] .maze-adventure-dialog{border:2px solid #d2b363;background:#fffbf1;color:#5a4728}.maze-adventure-overlay[data-kind="chest"] .maze-adventure-eyebrow{display:none}.maze-adventure-overlay[data-kind="chest"] .maze-adventure-portrait{height:180px;margin:8px auto 25px}.maze-adventure-overlay[data-kind="chest"] .maze-adventure-portrait img{width:auto;max-width:100%;border-radius:16px}.maze-adventure-overlay[data-kind="chest"] h2{color:#5a4728}.maze-adventure-overlay[data-kind="chest"] .maze-adventure-confirm{width:min(100%,180px);justify-self:center;border:0!important;border-radius:18px!important;background:linear-gradient(100deg,#a8791f,#f2dc91)!important;color:#fff!important;font-weight:500!important;box-shadow:0 4px 12px #8b64212b!important}
@media(max-width:350px){.maze-adventure-reward-line{font-size:18px;gap:6px}.maze-adventure-rewards img{width:28px;height:28px}.maze-adventure-rewards b{font-size:18px}}
@media(max-height:560px){.maze-adventure-overlay[data-kind="chest"] .maze-adventure-portrait{height:90px;margin-bottom:12px}.maze-adventure-reward-line{margin-bottom:14px}}

/* The resource bar, 10x10 board and action row share the same side edges. */
#main-root #main-content .maze-map-wrap,#main-root #main-content .maze-adventure-hud,#main-root #main-content .maze-btns-row{box-sizing:border-box;width:min(96%,384px)!important;max-width:100%;margin-left:auto!important;margin-right:auto!important}
#main-content .maze-map-wrap .maze-grid-shell{display:block!important;box-sizing:border-box;width:100%;min-width:0}
#main-content .maze-map-wrap .maze-grid-shell>div{display:grid!important;grid-template-columns:repeat(10,minmax(0,1fr));gap:2px}
#main-content .maze-map-wrap .maze-grid-shell>div+div{margin-top:2px}
#main-content .maze-map-wrap .maze-grid-shell>div>div{box-sizing:border-box;width:100%!important;height:auto!important;aspect-ratio:1;min-width:0;margin:0!important}
#main-content .maze-map-wrap .maze-grid-shell>div>div>img:not(:first-child):not([class]){width:84%!important;height:84%!important}

/* Larger, individually separated resources, matching the Archive HUD hierarchy. */
#main-root #main-content .maze-adventure-hud{grid-template-columns:repeat(var(--maze-hud-columns,5),minmax(0,1fr));min-height:54px;padding:5px 4px;background:#fffdf7;box-shadow:0 3px 10px #57432612}
#main-root #main-content .maze-adventure-hud>.maze-status-item{padding:3px 4px;gap:4px;flex-wrap:wrap;align-content:center}
#main-root #main-content .maze-adventure-hud .maze-resource{gap:4px;flex-wrap:wrap;max-width:100%;white-space:normal}
#main-root #main-content .maze-adventure-hud .maze-resource>img{width:32px!important;height:32px!important;flex:0 0 32px}
#main-root #main-content .maze-adventure-hud .maze-status-item b{font:700 20px/1.2 system-ui,sans-serif;font-variant-numeric:tabular-nums;max-width:100%;overflow-wrap:anywhere}
#main-root #main-content .maze-adventure-hud .maze-status-item small{font:500 12px/1.2 system-ui,sans-serif;text-transform:none;letter-spacing:0}
@media(max-width:350px){#main-root #main-content .maze-adventure-hud>.maze-status-item{padding-inline:2px;gap:3px}#main-root #main-content .maze-adventure-hud .maze-resource{gap:3px}#main-root #main-content .maze-adventure-hud .maze-resource>img{width:28px!important;height:28px!important;flex-basis:28px}#main-root #main-content .maze-adventure-hud .maze-status-item b{font-size:18px}#main-root #main-content .maze-adventure-hud .maze-status-item small{font-size:11px}}
.maze-grid-shell .maze-route-cell::after{content:"";position:absolute;inset:3px;border:2px solid #f0ca72;border-radius:3px;pointer-events:none;background:#f0ca7222;z-index:2}
