/* The dialog box (Work-ID 20261029-dialog-box-*; zenux, mockup 32_xldDG95, 2026-10-24: "exactly like the image", for ALL the dialog boxes).
   The window is the mockup's own 1368 x 652 dialog drawn at 1x and zoomed by the shared window factor (ui_scale.js WINDOWS 'dialogbox' / 'opening'; --win-s). Header: pokeball medal, the place's name in gold, a
   skyline, the red X. Under it the location pill; then the portrait card and the speech panel (the speaker over the words); the footer: pokeball, "2 / 3", the segment bar, PULAR and PRÓXIMA ›. On the last page the
   dialog's own choices take the buttons' place. The DOM is built by ui/dialog/dialog-box.js; the NPC dialog (app.js npcBody), the region openings (region_openings.js) and the nurse's talk box share it.
   AGENTS.md "Absolute UI hover geometry": the buttons keep one box in every state (hover / focus / press repaint colour and an inset ring only). */
:root{--dlg-blue:#1d8fd6;--dlg-cyan:#38d4f0;--dlg-gold:#f2b84b;--dlg-navy:#06152b;--dlg-red:#d6304c}
/* ---- the window ---- */
@media screen and (min-width:901px){
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]){zoom:var(--win-s,1)!important;box-sizing:border-box!important;width:1368px!important;height:652px!important;min-width:0!important;max-width:none!important;min-height:0!important;max-height:none!important;padding:0!important;
  border:2px solid var(--dlg-blue)!important;border-image:none!important;border-radius:14px!important;overflow:hidden!important;
  background:linear-gradient(180deg,#07182f 0,#051022 100%)!important;
  box-shadow:inset 0 0 0 2px #04101f,inset 0 0 46px #0b3f84aa,0 0 34px #1b6fc055,0 22px 64px #02060d!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"])::backdrop{background:#02060d66!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"])>.modal-header{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"])>#modal-body,
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) #modal-body{position:relative!important;width:100%!important;height:100%!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important;background:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important}
}
/* ---- the box (authored 1368 x 652) ---- */
.dlgbox{position:relative;box-sizing:border-box;width:100%;height:100%;min-height:0;color:#fff;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:left}
.dlgbox *{box-sizing:border-box}
.dlgbox [hidden]{display:none!important}
.dlg-head{position:absolute;left:0;top:0;width:100%;height:112px;margin:0;overflow:hidden;background:linear-gradient(180deg,#0a2447,#071a35 70%,#06142a);border-bottom:3px solid var(--dlg-blue);box-shadow:inset 0 -2px 0 #06142a}
.dlg-head::before{content:"";position:absolute;right:130px;top:10px;width:380px;height:92px;opacity:.5;pointer-events:none;
 background:linear-gradient(#0e3a73,#0e3a73);
 clip-path:polygon(0 100%,0 62%,6% 62%,6% 40%,10% 40%,10% 62%,16% 62%,16% 52%,22% 52%,22% 30%,25% 20%,28% 30%,28% 52%,34% 52%,34% 18%,38% 4%,42% 18%,42% 52%,48% 52%,48% 40%,54% 40%,54% 60%,60% 60%,60% 26%,64% 8%,68% 26%,68% 60%,74% 60%,74% 44%,82% 44%,82% 66%,90% 66%,90% 48%,100% 48%,100% 100%)}
.dlg-head::after{content:"";position:absolute;right:112px;top:-6px;width:70px;height:130px;pointer-events:none;background:linear-gradient(115deg,transparent 0 44%,#38d4f0cc 44% 49%,transparent 49% 56%,#38d4f088 56% 58%,transparent 58%);opacity:.7}
.dlg-medal{position:absolute;left:32px;top:14px;width:86px;height:86px;display:block;filter:drop-shadow(0 0 6px #38d4f066)}
.dlg-medal svg{display:block;width:100%;height:100%}
.dlg-place{position:absolute;left:160px;top:0;max-width:1080px;margin:0;font:900 46px/112px Arial,"Helvetica Neue",sans-serif;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 color:var(--dlg-gold);background:linear-gradient(180deg,#ffe29a,#f2b84b 55%,#d2891e);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-shadow:none;filter:drop-shadow(0 3px 0 #3a2506)}
.dlg-place.long{font-size:38px}.dlg-place.longer{font-size:31px}
.dlg-close{position:absolute;left:1262px;top:17px;width:78px;height:78px;margin:0;padding:22px;display:grid;place-items:center;color:#e8394f;border:2px solid #1b6fb0;border-radius:10px;background:linear-gradient(180deg,#0b2447,#07152b);box-shadow:inset 0 0 0 2px #05101f;cursor:pointer}
.dlg-close svg{display:block;width:100%;height:100%}
.dlg-close:is(:hover,:focus-visible){background:linear-gradient(180deg,#12315c,#0a1c38);border-color:var(--dlg-cyan);box-shadow:inset 0 0 0 2px var(--dlg-cyan);outline:none}
.dlg-close:active{box-shadow:inset 0 0 0 2px #fff}
/* the location pill */
.dlg-pill{position:absolute;left:18px;top:122px;width:688px;height:60px;margin:0;padding:0 24px 0 62px;display:flex;align-items:center;gap:0;
 font:700 26px/1 Arial,sans-serif;letter-spacing:.04em;color:var(--dlg-cyan);text-transform:uppercase;white-space:nowrap;overflow:hidden;
 background:linear-gradient(180deg,#0a2a52,#071d3a);box-shadow:inset 0 0 0 2px var(--dlg-blue),inset 0 0 0 4px #05101f;clip-path:polygon(0 0,calc(100% - 20px) 0,100% 20px,100% 100%,22px 100%,0 calc(100% - 22px))}
.dlg-pin{position:absolute;left:30px;top:14px;width:24px;height:32px;color:var(--dlg-cyan)}
.dlg-pin svg{display:block;width:100%;height:100%}
.dlg-pill-text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* portrait card + speech panel */
.dlg-main{position:absolute;left:38px;top:206px;width:1294px;height:292px;margin:0;display:flex;gap:34px;align-items:stretch}
.dlg-portrait{position:relative;flex:0 0 312px;width:312px;height:292px;margin:0;padding:0;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;
 border:4px solid #1bb4e6;border-radius:6px;background:radial-gradient(ellipse at 50% 38%,#3d5c8a 0,#27406a 38%,#15243f 80%);box-shadow:inset 0 0 0 3px #06142a,0 0 14px #1bb4e655}
.dlg-portrait::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,transparent 60%,#06142aaa)}
.dlg-portrait>*{position:relative;z-index:1;image-rendering:pixelated}
.dlg-portrait .dlg-sprite{display:block;margin:0 auto;max-width:100%;max-height:calc(100% - 8px)}
.dlg-portrait .dlg-hgss{--dp:3.4px;flex:0 0 auto;width:272px;height:272px;margin:0 auto}
.dlg-portrait .dlg-emblem{display:block;width:150px;height:150px;margin:auto;opacity:.55;filter:saturate(.7)}
.dlg-portrait .dlg-emblem svg{display:block;width:100%;height:100%}
.dlg-speech{position:relative;flex:1 1 0;min-width:0;height:292px;margin:0;padding:0;display:block;overflow:hidden;
 border:4px solid var(--dlg-blue);border-radius:8px;background:linear-gradient(180deg,#07182f,#05112a);box-shadow:inset 0 0 0 3px #04101f,inset 0 0 28px #0a3a7a55}
.dlg-speech::before{content:"";position:absolute;left:-1px;top:138px;width:0;height:0;border:16px solid transparent;border-left:0;border-right:16px solid var(--dlg-blue);margin-left:-17px}
.dlg-speaker{position:absolute;left:28px;top:24px;right:28px;height:56px;margin:0;display:flex;align-items:center;gap:16px;color:var(--dlg-gold);font:700 34px/1 Arial,sans-serif;letter-spacing:.01em;white-space:nowrap;overflow:visible}
.dlg-speaker::after{content:"";position:absolute;left:0;bottom:-10px;width:400px;height:4px;border-radius:2px;background:linear-gradient(90deg,var(--dlg-cyan) 0 80%,#38d4f000)}
.dlg-speaker-ball{flex:0 0 44px;width:44px;height:44px;display:block}
.dlg-speaker-ball svg{display:block;width:100%;height:100%}
.dlgbox .dlg-speaker-name{min-width:0;min-height:0;overflow:hidden;text-overflow:ellipsis;font:inherit;color:inherit;letter-spacing:inherit}
.dlg-speaker.narration{display:none}
.dlg-speech:has(.dlg-speaker.narration) .dlg-text{top:40px}
.dlg-text{position:absolute;left:28px;top:116px;right:40px;height:140px;margin:0;font:400 36px/45px Arial,"Helvetica Neue",sans-serif;color:#fff;white-space:pre-line;overflow:hidden;overflow-wrap:anywhere;letter-spacing:0}
.dlg-extras{position:absolute;left:28px;right:28px;bottom:14px;max-height:152px;margin:0;overflow:auto;color:#cfe0f5;font:400 18px/1.35 Arial,sans-serif}
.dlg-extras:empty{display:none}
.dlg-speech:has(.dlg-extras:not(:empty)) .dlg-text{height:90px;overflow:hidden;font-size:30px;line-height:38px}
/* the footer */
.dlg-foot{position:absolute;left:18px;top:534px;width:1332px;height:100px;margin:0;padding:0;
 border:2px solid #1b6fb0;border-radius:12px;background:linear-gradient(180deg,#07182f,#051022);box-shadow:inset 0 0 0 2px #04101f}
.dlg-foot-ball{position:absolute;left:22px;top:22px;width:52px;height:52px}
.dlg-foot-ball svg{display:block;width:100%;height:100%}
.dlg-count{position:absolute;left:92px;top:0;height:96px;display:flex;align-items:center;font:700 30px/1 Arial,sans-serif;letter-spacing:.06em;color:#fff;white-space:nowrap}
.dlg-seg{position:absolute;left:198px;top:35px;width:288px;height:26px;padding:3px;display:flex;gap:6px;border:2px solid #1b6fb0;border-radius:14px;background:#06152b;box-shadow:inset 0 0 0 1px #04101f}
.dlg-seg>i{flex:1 1 0;display:block;min-width:0;border-radius:9px;background:#13294a}
.dlg-seg>i.on{background:linear-gradient(180deg,#5de3ff,#1bb4e6);box-shadow:0 0 8px #38d4f088}
.dlg-sep{position:absolute;left:648px;top:16px;width:2px;height:62px;background:linear-gradient(180deg,transparent,#1d6fb0,transparent)}
#modal#modal .dlg-buttons{position:absolute!important;right:16px!important;top:8px!important;height:78px!important;margin:0!important;padding:0!important;display:flex!important;align-items:stretch!important;justify-content:flex-end!important;gap:22px!important}
#modal#modal .dlg-buttons>button,
#modal#modal .dlg-buttons .dlg-actions>button{box-sizing:border-box!important;flex:0 0 auto!important;height:78px!important;min-height:0!important;margin:0!important;padding:0 18px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;overflow:hidden!important;font:700 28px/1.1 Arial,sans-serif!important;letter-spacing:.04em!important;text-transform:uppercase!important;color:#fff!important;text-align:center!important;cursor:pointer!important;border:2px solid #1d9fe0!important;border-radius:9px!important;background:linear-gradient(180deg,#0a2a55,#071a38)!important;box-shadow:inset 0 0 0 2px #04101f!important}
#modal#modal .dlg-buttons>button[hidden],#modal#modal .dlg-buttons .dlg-actions[hidden]{display:none!important}
.dlg-skip{width:248px}
.dlg-next{width:auto;min-width:324px}
#modal#modal .dlg-buttons>.dlg-next{border-color:#ff7a92!important;background:linear-gradient(180deg,#e0344f,#a8132e)!important;box-shadow:inset 0 0 0 2px #ffa3b3aa!important}
.dlg-next::after{content:"›";font-size:36px;line-height:1;transform:translateY(-2px)}
#modal#modal .dlg-buttons>button:is(:hover:not(:disabled),:focus-visible),
#modal#modal .dlg-buttons .dlg-actions>button:is(:hover:not(:disabled),:focus-visible){filter:brightness(1.18)!important;box-shadow:inset 0 0 0 2px var(--dlg-cyan)!important;outline:none!important}
#modal#modal .dlg-buttons>.dlg-next:is(:hover:not(:disabled),:focus-visible){box-shadow:inset 0 0 0 2px #fff!important}
#modal#modal .dlg-buttons>button:active,
#modal#modal .dlg-buttons .dlg-actions>button:active{filter:brightness(.92)!important}
#modal#modal .dlg-buttons>button:disabled,
#modal#modal .dlg-buttons .dlg-actions>button:disabled{opacity:.5!important;cursor:default!important}
/* the dialog's own choices (the NPC window's .modal-actions row): the same two button looks, shrinking to share the footer */
#modal#modal .dlg-buttons .dlg-actions{display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-end!important;gap:22px!important;height:78px!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
#modal#modal .dlg-buttons .dlg-actions>button{flex:0 1 324px!important;min-width:150px!important;width:auto!important;max-width:324px!important;font-size:24px!important;line-height:1.15!important}
#modal#modal .dlg-buttons .dlg-actions>button.primary,
#modal#modal .dlg-buttons .dlg-actions>button.tch-challenge-button{border-color:#ff7a92!important;background:linear-gradient(180deg,#e0344f,#a8132e)!important;box-shadow:inset 0 0 0 2px #ffa3b3aa!important}
#modal#modal .dlg-buttons .dlg-actions>button.primary:is(:hover:not(:disabled),:focus-visible){box-shadow:inset 0 0 0 2px #fff!important}
#modal#modal .dlg-buttons .dlg-actions>button svg,
#modal#modal .dlg-buttons .dlg-actions>button i{flex:0 0 auto!important}
/* things the NPC window puts under the words (gifts, field-move notes, duo choices) */
.dlg-extras .npc-gift{display:flex;align-items:center;gap:12px;margin:0 0 6px;padding:6px 10px;border:1px solid #1b6fb0;border-radius:6px;background:#071d3a;color:#fff}
.dlg-extras .npc-gift p{margin:0;color:#cfe0f5}
.dlg-extras .field-move-note,.dlg-extras .mini-note{margin:4px 0 0;color:#9fc4ee;font-size:16px}
.dlg-extras button{box-sizing:border-box;min-height:44px;padding:0 14px;border:2px solid #1d9fe0;border-radius:7px;background:#0a2a55;color:#fff;font:700 18px/1.1 Arial,sans-serif;box-shadow:inset 0 0 0 2px #04101f}
.dlg-extras button:is(:hover:not(:disabled),:focus-visible){box-shadow:inset 0 0 0 2px var(--dlg-cyan);outline:none}
/* the shore's prompt (Surf / Fish): its lines are the words, its note and warning under them */
#modal#modal .dlg-text:has(.surf-copy){height:150px;font-size:32px;line-height:40px;white-space:normal}
#modal#modal .dlg-text .surf-line{margin:0!important;font:inherit!important;color:#fff!important;text-shadow:none!important}
#modal#modal .dlg-text .surf-line strong{color:#5fd6ff!important}
#modal#modal .dlg-text .surf-note{margin:6px 0 0!important;font-size:22px!important;line-height:28px!important;color:#9fc4ee!important}
#modal#modal .dlg-text .surf-warning{margin:6px 0 0!important;font-size:21px!important;line-height:26px!important;color:#ffb27a!important}
/* the opening scene's partner choice sits in the speech panel under one line of the words */
.dlg-speech .opening-starters{position:absolute;left:24px;right:24px;bottom:14px;height:128px;margin:0;display:flex;gap:14px;justify-content:center}
.dlg-speech .opening-starters[hidden]{display:none!important}
.dlg-speech:has(.opening-starters:not([hidden])) .dlg-text{height:46px;overflow:hidden;font-size:26px;line-height:34px;top:98px}
.dlg-speech .opening-starters .journey-starter{flex:0 0 150px;height:128px;margin:0;padding:4px;border:2px solid #1d9fe0;border-radius:8px;background:#0a2a55;color:#fff;box-shadow:inset 0 0 0 2px #04101f}
.dlg-speech .opening-starters .journey-starter.selected{border-color:var(--dlg-gold);box-shadow:inset 0 0 0 2px var(--dlg-gold)}
.dlg-speech .opening-starters .journey-starter:is(:hover,:focus-visible){box-shadow:inset 0 0 0 2px var(--dlg-cyan);outline:none}
/* a gate (the story does not allow the step yet) says so in the gold of the footer's ball */
.opening-gate .dlg-pill{color:#f2b84b}
/* ---- phones and narrow windows: the same blocks stack inside a scrolling window ---- */
@media screen and (max-width:900px){
 #modal#modal:is([data-view="dialogbox"],[data-view="opening"]){box-sizing:border-box!important;width:min(96vw,700px)!important;height:auto!important;max-height:calc(100dvh - 12px)!important;min-height:0!important;padding:0!important;overflow:auto!important;
  border:2px solid var(--dlg-blue)!important;border-image:none!important;border-radius:10px!important;background:linear-gradient(180deg,#07182f,#051022)!important;zoom:1!important}
 #modal#modal:is([data-view="dialogbox"],[data-view="opening"])>.modal-header{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
 #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) #modal-body{width:100%!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;background:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important}
 .dlgbox{height:auto;display:flex;flex-direction:column;gap:8px;padding:0 0 8px}
 .dlg-head,.dlg-pill,.dlg-main,.dlg-foot,.dlg-portrait,.dlg-speech,.dlg-speaker,.dlg-text,.dlg-extras,.dlg-medal,.dlg-place,.dlg-close,.dlg-pin,.dlg-foot-ball,.dlg-count,.dlg-seg,.dlg-sep,.dlg-buttons{position:relative;left:auto;top:auto;right:auto;bottom:auto}
 .dlg-head{flex:0 0 52px;height:52px;display:flex;align-items:center;gap:10px;padding:0 8px}
 .dlg-head::before,.dlg-head::after,.dlg-speech::before,.dlg-speaker::after,.dlg-portrait::after{display:none}
 .dlg-medal{flex:0 0 38px;width:38px;height:38px}
 .dlg-place{flex:1 1 auto;min-width:0;max-width:none;font-size:20px;line-height:52px}
 .dlg-close{flex:0 0 40px;width:40px;height:40px;padding:8px}
 .dlg-pill{width:auto;height:36px;margin:0 8px;padding:0 12px 0 40px;font-size:13px;clip-path:none;border-radius:6px}
 .dlg-pin{position:absolute;left:12px;top:8px;width:16px;height:20px}
 .dlg-main{width:auto;height:auto;margin:0 8px;display:flex;flex-direction:row;gap:8px}
 .dlg-portrait{flex:0 0 96px;width:96px;height:132px;border-width:2px}
 .dlg-portrait .dlg-hgss{--dp:1.5px;width:120px;height:120px}
 .dlg-speech{flex:1 1 0;height:auto;min-height:132px;padding:10px 12px 12px;border-width:2px}
 .dlg-speaker{height:auto;font-size:16px;gap:8px;margin:0 0 8px}
 .dlg-speaker-ball{flex-basis:22px;width:22px;height:22px}
 .dlg-text{height:auto;min-height:60px;font-size:17px;line-height:1.35;margin:0;overflow:visible}
 .dlg-extras{position:relative;max-height:none;font-size:14px;margin:8px 0 0}
 .dlg-speech:has(.dlg-extras:not(:empty)) .dlg-text{height:auto;font-size:17px;line-height:1.35}
 .dlg-foot{width:auto;height:auto;margin:0 8px;padding:8px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
 .dlg-foot-ball{flex:0 0 28px;width:28px;height:28px}
 .dlg-count{flex:0 0 auto;height:auto;font-size:16px}
 .dlg-seg{flex:1 1 90px;width:auto;height:18px;padding:2px}
 .dlg-sep{display:none}
#modal#modal .dlg-buttons{position:relative!important;right:auto!important;top:auto!important;flex:1 1 100%!important;height:auto!important;gap:8px!important}
#modal#modal .dlg-buttons>button,
#modal#modal .dlg-buttons .dlg-actions>button{height:44px!important;font-size:15px!important;padding:0 10px!important}
#modal#modal .dlg-buttons>.dlg-skip{flex:1 1 0!important;width:auto!important}
#modal#modal .dlg-buttons>.dlg-next{flex:2 1 0!important;width:auto!important}
 .dlg-next::after{font-size:24px}
#modal#modal .dlg-buttons .dlg-actions{height:auto!important;flex:1 1 100%!important;gap:8px!important;flex-wrap:wrap!important}
#modal#modal .dlg-buttons .dlg-actions>button{flex:1 1 120px!important;max-width:none!important;min-width:0!important;font-size:14px!important}
 .dlg-speech .opening-starters{position:relative;left:auto;right:auto;bottom:auto;height:auto;margin:8px 0 0;flex-wrap:wrap}
 .dlg-speech .opening-starters .journey-starter{flex:1 1 90px;height:96px}
 .dlg-speech:has(.opening-starters:not([hidden])) .dlg-text{height:auto;font-size:15px;line-height:1.3;top:auto}
}
/* mobile-web copy */
body.mobile-web #modal#modal:is([data-view="dialogbox"],[data-view="opening"]){box-sizing:border-box!important;width:min(96vw,700px)!important;height:auto!important;max-height:calc(100dvh - 12px)!important;min-height:0!important;padding:0!important;overflow:auto!important;
  border:2px solid var(--dlg-blue)!important;border-image:none!important;border-radius:10px!important;background:linear-gradient(180deg,#07182f,#051022)!important;zoom:1!important}
body.mobile-web #modal#modal:is([data-view="dialogbox"],[data-view="opening"])>.modal-header{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
body.mobile-web #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) #modal-body{width:100%!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;background:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important}
body.mobile-web .dlgbox{height:auto;display:flex;flex-direction:column;gap:8px;padding:0 0 8px}
body.mobile-web .dlg-head,
body.mobile-web .dlg-pill,
body.mobile-web .dlg-main,
body.mobile-web .dlg-foot,
body.mobile-web .dlg-portrait,
body.mobile-web .dlg-speech,
body.mobile-web .dlg-speaker,
body.mobile-web .dlg-text,
body.mobile-web .dlg-extras,
body.mobile-web .dlg-medal,
body.mobile-web .dlg-place,
body.mobile-web .dlg-close,
body.mobile-web .dlg-pin,
body.mobile-web .dlg-foot-ball,
body.mobile-web .dlg-count,
body.mobile-web .dlg-seg,
body.mobile-web .dlg-sep,
body.mobile-web .dlg-buttons{position:relative;left:auto;top:auto;right:auto;bottom:auto}
body.mobile-web .dlg-head{flex:0 0 52px;height:52px;display:flex;align-items:center;gap:10px;padding:0 8px}
body.mobile-web .dlg-head::before,
body.mobile-web .dlg-head::after,
body.mobile-web .dlg-speech::before,
body.mobile-web .dlg-speaker::after,
body.mobile-web .dlg-portrait::after{display:none}
body.mobile-web .dlg-medal{flex:0 0 38px;width:38px;height:38px}
body.mobile-web .dlg-place{flex:1 1 auto;min-width:0;max-width:none;font-size:20px;line-height:52px}
body.mobile-web .dlg-close{flex:0 0 40px;width:40px;height:40px;padding:8px}
body.mobile-web .dlg-pill{width:auto;height:36px;margin:0 8px;padding:0 12px 0 40px;font-size:13px;clip-path:none;border-radius:6px}
body.mobile-web .dlg-pin{position:absolute;left:12px;top:8px;width:16px;height:20px}
body.mobile-web .dlg-main{width:auto;height:auto;margin:0 8px;display:flex;flex-direction:row;gap:8px}
body.mobile-web .dlg-portrait{flex:0 0 96px;width:96px;height:132px;border-width:2px}
body.mobile-web .dlg-portrait .dlg-hgss{--dp:1.5px;width:120px;height:120px}
body.mobile-web .dlg-speech{flex:1 1 0;height:auto;min-height:132px;padding:10px 12px 12px;border-width:2px}
body.mobile-web .dlg-speaker{height:auto;font-size:16px;gap:8px;margin:0 0 8px}
body.mobile-web .dlg-speaker-ball{flex-basis:22px;width:22px;height:22px}
body.mobile-web .dlg-text{height:auto;min-height:60px;font-size:17px;line-height:1.35;margin:0;overflow:visible}
body.mobile-web .dlg-extras{position:relative;max-height:none;font-size:14px;margin:8px 0 0}
body.mobile-web .dlg-speech:has(.dlg-extras:not(:empty)) .dlg-text{height:auto;font-size:17px;line-height:1.35}
body.mobile-web .dlg-foot{width:auto;height:auto;margin:0 8px;padding:8px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
body.mobile-web .dlg-foot-ball{flex:0 0 28px;width:28px;height:28px}
body.mobile-web .dlg-count{flex:0 0 auto;height:auto;font-size:16px}
body.mobile-web .dlg-seg{flex:1 1 90px;width:auto;height:18px;padding:2px}
body.mobile-web .dlg-sep{display:none}
body.mobile-web #modal#modal .dlg-buttons{position:relative!important;right:auto!important;top:auto!important;flex:1 1 100%!important;height:auto!important;gap:8px!important}
body.mobile-web #modal#modal .dlg-buttons>button,
body.mobile-web #modal#modal .dlg-buttons .dlg-actions>button{height:44px!important;font-size:15px!important;padding:0 10px!important}
body.mobile-web #modal#modal .dlg-buttons>.dlg-skip{flex:1 1 0!important;width:auto!important}
body.mobile-web #modal#modal .dlg-buttons>.dlg-next{flex:2 1 0!important;width:auto!important}
body.mobile-web .dlg-next::after{font-size:24px}
body.mobile-web #modal#modal .dlg-buttons .dlg-actions{height:auto!important;flex:1 1 100%!important;gap:8px!important;flex-wrap:wrap!important}
body.mobile-web #modal#modal .dlg-buttons .dlg-actions>button{flex:1 1 120px!important;max-width:none!important;min-width:0!important;font-size:14px!important}
body.mobile-web .dlg-speech .opening-starters{position:relative;left:auto;right:auto;bottom:auto;height:auto;margin:8px 0 0;flex-wrap:wrap}
body.mobile-web .dlg-speech .opening-starters .journey-starter{flex:1 1 90px;height:96px}
body.mobile-web .dlg-speech:has(.opening-starters:not([hidden])) .dlg-text{height:auto;font-size:15px;line-height:1.3;top:auto}
/* end mobile-web copy */











@media (prefers-reduced-motion:reduce){.dlgbox *{transition:none!important;animation:none!important}}

/* ---- the field talk box (the nurse's SIM / NÃO, item notes, the heal sequence): the same navy panel, blue frame and white words, kept compact at the bottom of the map (no header: it is a line, not a window) ---- */
#game#game .field-talk{gap:12px}
#game#game .field-talk-message{flex:0 1 640px;min-height:104px;padding:14px 46px 14px 14px;gap:16px;
 background:linear-gradient(180deg,#07182f,#051022)!important;border:3px solid var(--dlg-blue)!important;border-radius:10px!important;box-shadow:inset 0 0 0 2px #04101f,inset 0 0 26px #0a3a7a66,0 0 20px #1b6fc055,0 10px 28px #02060dcc!important;color:#fff!important}
#game#game .field-talk-portrait{--talk-portrait:58px;flex:0 0 auto;width:var(--talk-portrait);height:76px;border:3px solid #1bb4e6!important;border-radius:6px!important;background-color:#27406a!important;background-image:radial-gradient(ellipse at 50% 40%,#3d5c8a,#15243f);box-shadow:inset 0 0 0 2px #06142a}
#game#game .field-talk-portrait.item-icon{background-color:#27406a!important}
#game#game .field-talk-text{color:#fff!important;font:400 20px/1.5 Arial,"Helvetica Neue",sans-serif!important;text-shadow:none!important;white-space:pre-line}
#game#game .field-talk .talk-red{color:#ff8da5!important}
#game#game .field-talk .talk-blue{color:#5fd6ff!important}
#game#game .field-talk-arrow{color:var(--dlg-cyan)!important}
#game#game .field-talk-choice{padding:10px 14px 10px 8px;gap:4px;background:linear-gradient(180deg,#07182f,#051022)!important;border:3px solid var(--dlg-blue)!important;border-radius:10px!important;box-shadow:inset 0 0 0 2px #04101f,0 0 20px #1b6fc055,0 10px 28px #02060dcc!important}
#game#game .field-talk-choice::after{border-color:#04101f}
#game#game .field-talk-choice .field-talk-option{min-width:96px;height:44px;padding:0 12px 0 8px;border:2px solid #1d9fe0!important;border-radius:7px!important;background:linear-gradient(180deg,#0a2a55,#071a38)!important;box-shadow:inset 0 0 0 2px #04101f;color:#fff!important;font:700 20px/1 Arial,sans-serif!important;letter-spacing:.04em;text-shadow:none!important}
#game#game .field-talk-choice .field-talk-option.selected,#game#game .field-talk-choice .field-talk-option:is(:hover:not(:disabled),:focus-visible){box-shadow:inset 0 0 0 2px var(--dlg-cyan)!important;filter:brightness(1.15)!important;color:#fff!important}
#game#game .field-talk-cursor{color:var(--dlg-cyan)}

/* Work-ID 20261030-lag-win-5e0a: the NPC's dialog box opens with dialog.show(), not showModal(): showModal makes the whole game shell inert and the browser restyles its 358 elements (100-170 ms at 4x CPU) before the box can
   be drawn. The UA's modal placement is repeated (fixed, centred), the page is dimmed and clicks are caught by #modal-scrim (the sibling after the dialog, shown only while the dialog is open modeless); app.js keeps the focus
   inside (focusin) and closes on Esc. Nothing here changes on hover or focus. */
#modal-scrim{display:none}
#modal[data-modeless][open]+#modal-scrim{display:block;position:fixed;inset:0;z-index:2147483000;background:#02060d66;cursor:default}
body #modal#modal[data-modeless][open]{position:fixed!important;inset:0!important;margin:auto!important;z-index:2147483001!important}

/* Work-ID 20261030-mockup-*; zenux, Trello 2026-10-30: "faca exatamente igual ao enviado". The dialog box is the mockup's own picture (ui/dialog/chrome.jpg: the window's frame, the header's skyline, the pokeball medals, the
   pill's, the portrait's and the speech panel's frames, the footer) with the live parts taken out of it; the live parts are drawn over it at the mockup's measured boxes. Controls keep their boxes in every state:
   hover / focus draw an inset ring only (AGENTS.md). The window is the same sheet for the NPC's dialog, the region openings and the nurse's talk box. */
@media screen and (min-width:901px){
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]){border:0!important;border-image:none!important;border-radius:0!important;background:#050d1a!important;box-shadow:0 22px 64px #02060d!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"])>#modal-body,body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) #modal-body{position:absolute!important;left:0!important;top:0!important;width:1368px!important;height:652px!important;margin:0!important;padding:0!important;border:0!important;border-image:none!important;border-radius:0!important;box-shadow:none!important;overflow:hidden!important;background:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlgbox{position:absolute!important;left:0!important;top:0!important;display:block!important;box-sizing:border-box!important;width:1368px!important;height:652px!important;margin:0!important;padding:0!important;gap:0!important;border:0!important;border-radius:0!important;background:url("../../assets/ui/dialog/chrome.jpg?v=1") 0 0/1368px 652px no-repeat!important;box-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlgbox.narration{background-image:url("../../assets/ui/dialog/chrome_narration.jpg?v=1")!important}
 /* the header */
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-head{position:absolute!important;left:0!important;top:0!important;display:block!important;width:1368px!important;height:112px!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-medal{opacity:0!important;pointer-events:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-place{position:absolute!important;left:163px!important;top:26px!important;width:900px!important;height:62px!important;margin:0!important;padding:0!important;color:#ffcd62!important;font:900 52px/62px Bahnschrift,"Arial Black",Arial,sans-serif!important;letter-spacing:.045em!important;text-transform:uppercase!important;text-shadow:0 2px 0 #7a4a10!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-close{position:absolute!important;left:1262px!important;top:17px!important;right:auto!important;width:78px!important;height:78px!important;margin:0!important;padding:0!important;border:0!important;border-radius:6px!important;background:none!important;box-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-close svg{opacity:0!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-close:is(:hover,:focus-visible){background:#ffffff14!important;box-shadow:inset 0 0 0 3px #fff!important;outline:none!important}
 /* the location pill */
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-pill{position:absolute!important;left:18px!important;top:122px!important;display:block!important;box-sizing:border-box!important;width:688px!important;height:60px!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-pin{opacity:0!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-pill-text{position:absolute!important;left:80px!important;top:-3px!important;width:590px!important;height:58px!important;color:#8fd3f2!important;font:500 33px/58px Bahnschrift,"Segoe UI",Arial,sans-serif!important;letter-spacing:.05em!important;text-transform:uppercase!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 /* the portrait and the speech panel */
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-main{position:absolute!important;left:0!important;top:0!important;display:block!important;width:1368px!important;height:652px!important;margin:0!important;padding:0!important;gap:0!important;pointer-events:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-main>*{pointer-events:auto!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-head{z-index:3!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-portrait{position:absolute!important;left:38px!important;top:206px!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;box-sizing:border-box!important;width:312px!important;height:292px!important;margin:0!important;padding:0 0 14px!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;overflow:hidden!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-portrait>canvas,body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-portrait>img{flex:none!important;width:auto!important;height:250px!important;max-width:100%!important;image-rendering:pixelated!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-speech{position:absolute!important;left:384px!important;top:206px!important;display:block!important;box-sizing:border-box!important;width:948px!important;height:292px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-speaker{position:absolute!important;left:30px!important;top:18px!important;display:block!important;width:900px!important;height:50px!important;margin:0!important;padding:0!important;border:0!important;background:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-speaker-ball{opacity:0!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-speaker-name{position:absolute!important;left:63px!important;top:0!important;width:700px!important;height:50px!important;color:#f3bd57!important;font:600 34px/50px Bahnschrift,"Segoe UI",Arial,sans-serif!important;letter-spacing:.01em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-speaker.narration{display:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-text{position:absolute!important;left:55px!important;top:108px!important;box-sizing:border-box!important;width:870px!important;height:150px!important;margin:0!important;padding:0!important;color:#e9f1fb!important;font:400 36px/45px Bahnschrift,"Segoe UI",Arial,sans-serif!important;letter-spacing:.02em!important;white-space:pre-line!important;overflow:hidden!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlgbox.narration .dlg-text{top:44px!important;height:214px!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-extras{position:absolute!important;left:55px!important;top:196px!important;width:870px!important;margin:0!important;padding:0!important}
 /* the footer */
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-foot{position:absolute!important;left:18px!important;top:534px!important;display:block!important;width:1332px!important;height:100px!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;pointer-events:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-foot-ball,body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-sep{opacity:0!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-count{position:absolute!important;left:98px!important;top:27px!important;margin:0!important;color:#fff!important;font:700 33px/46px Bahnschrift,"Segoe UI",Arial,sans-serif!important;letter-spacing:.06em!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-seg{position:absolute!important;left:196px!important;top:30px!important;display:flex!important;gap:6px!important;box-sizing:border-box!important;width:292px!important;height:44px!important;margin:0!important;padding:5px!important;border:3px solid #1d8fd6!important;border-radius:22px!important;background:#08182f!important;box-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-seg>i{display:block!important;flex:1 1 0!important;height:100%!important;border-radius:14px!important;background:#243c5c!important;box-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-seg>i.on{background:linear-gradient(180deg,#2ad9f7,#14b3df)!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-buttons{position:absolute!important;left:720px!important;top:9px!important;display:flex!important;align-items:stretch!important;justify-content:flex-end!important;gap:22px!important;box-sizing:border-box!important;width:596px!important;height:80px!important;margin:0!important;padding:0!important;pointer-events:auto!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-buttons .dlg-skip{flex:0 0 247px!important;width:247px!important;height:78px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px)!important;background:#0b2246!important;box-shadow:inset 0 0 0 3px #1d8fd6!important;color:#a8dcf6!important;font:700 29px/78px Bahnschrift,"Segoe UI",Arial,sans-serif!important;letter-spacing:.04em!important;text-transform:uppercase!important;text-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-buttons .dlg-next{flex:1 1 0!important;width:auto!important;height:78px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px)!important;background:linear-gradient(180deg,#e4414f,#b72a3b)!important;box-shadow:inset 0 0 0 3px #ff7a80!important;color:#fff!important;font:700 29px/78px Bahnschrift,"Segoe UI",Arial,sans-serif!important;letter-spacing:.04em!important;text-transform:uppercase!important;text-shadow:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-buttons button:is(:hover:not(:disabled),:focus-visible,.pad-focus){box-shadow:inset 0 0 0 3px #fff!important;outline:none!important}
 body:not(.mobile-web) #modal#modal:is([data-view="dialogbox"],[data-view="opening"]) .dlg-buttons .dlg-actions{display:flex!important;flex:1 1 auto!important;gap:16px!important;justify-content:flex-end!important;height:78px!important}
}
