#millStartBtn{display:block;width:min(530px,100%);margin:18px auto 12px;border:1px solid #badcc7;border-radius:12px;padding:17px 20px;background:linear-gradient(110deg,#457664,#285756);color:#fff9e4;font:700 18px/1.35 system-ui;cursor:pointer;min-height:62px;box-shadow:0 7px 30px #254b4433;text-align:left}
#millStartBtn small{display:block;margin-top:5px;font:400 13px/1.4 system-ui;color:#d9f0e6}
#millStartBtn:hover{background:#4b826e}#millStartBtn:focus-visible{outline:3px solid #f1d696;outline-offset:4px}
#millHUD[hidden]{display:none!important}#millHUD{position:fixed;inset:0;z-index:22;pointer-events:none;color:#f5f0dc;font-family:system-ui,sans-serif}
.mill-heading{position:absolute;left:28px;top:26px;max-width:460px;text-shadow:0 2px 6px #061814}
.mill-heading small{display:block;color:#c6ddcf;font-size:11px;letter-spacing:.19em;margin-bottom:8px}
.mill-heading h2{font:500 clamp(24px,2.8vw,40px)/1.1 Georgia,serif;letter-spacing:-.02em;margin:0 0 9px;max-width:400px}
.mill-heading p{font:13px/1.5 system-ui;margin:0;color:#dcebe0}
.mill-status{position:absolute;right:26px;top:28px;text-align:right;display:grid;gap:6px;padding:11px 15px;border:1px solid #8fb8a23b;border-radius:10px;background:#112b2bb8;backdrop-filter:blur(8px);font-size:12px}
.mill-status b{font-size:15px;font-weight:500;color:#aee6e0}.mill-status small{font-size:10px;color:#bfd0c5;max-width:230px}
.mill-bottom{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);width:min(680px,calc(100% - 36px));text-align:center}
#millContext{display:inline-block;max-width:100%;box-sizing:border-box;font-size:12px;line-height:1.5;letter-spacing:.025em;padding:9px 15px;background:#102524e0;border:1px solid #a7c9ac55;border-radius:8px;margin-bottom:9px;box-shadow:0 2px 10px #0003}
.mill-actions{display:flex;justify-content:center;gap:6px;pointer-events:auto}
.mill-actions button{box-sizing:border-box;min-height:48px;min-width:66px;border:1px solid #8aa79888;background:#152c2eea;color:#e0eadf;border-radius:8px;padding:8px 10px;cursor:pointer;font:12px/1.3 system-ui;touch-action:manipulation}
.mill-actions button kbd{display:block;font:700 14px/1 system-ui;margin-bottom:5px;color:#f3e3af}.mill-actions button:hover{background:#395c52}.mill-actions button:focus-visible{outline:2px solid #f3e3af}
.mill-dpad{display:none;pointer-events:auto}.mill-dpad button{width:48px;height:48px;border:1px solid #abc0b5a6;border-radius:9px;background:#153f3ee0;color:white;font-size:21px;touch-action:none}
#millReplayBtn{position:absolute;bottom:24px;right:25px;pointer-events:auto;background:#142c2ce8;border:1px solid #b3c6ba5e;border-radius:7px;min-height:44px;padding:8px 12px;color:#ccdcd0;cursor:pointer;font:11px system-ui}
body.in-mill #hud .top.left,body.in-mill #hud .objective,body.in-mill #spellHelp,body.in-mill .actionbar,body.in-mill #academyCasebook,body.in-mill #perunoffCasebook,body.in-mill #perunoffReputation,body.in-mill #tutorial,body.in-mill #crosshair,body.in-mill .collection-hud{display:none!important}
body.in-mill #directorCard{top:auto;bottom:148px;left:50%;right:auto;transform:translateX(-50%);width:min(610px,calc(100% - 32px));box-sizing:border-box;text-align:center;background:#142b2af2;border-color:#789e85}
body.in-mill #vignette{opacity:.45}body.in-mill #toast{bottom:215px;max-width:calc(100% - 28px);box-sizing:border-box;font-size:12px}
body.in-mill #pause{z-index:100}body.in-mill #millHUD:has(~ #pause:not(.hidden)){visibility:hidden}
@media(max-width:900px){#millReplayBtn{top:129px;right:16px;bottom:auto}.mill-status{right:16px;top:18px}.mill-heading{left:16px;top:18px;max-width:58%}.mill-heading h2{font-size:29px}}
@media(pointer:coarse),(max-width:740px){.mill-dpad{display:grid;position:absolute;left:14px;bottom:114px;grid-template-columns:repeat(3,48px);gap:3px}.mill-dpad button:first-child{grid-column:2}.mill-dpad button:nth-child(2){grid-column:1}.mill-bottom{bottom:14px;width:calc(100% - 20px)}.mill-actions button{flex:1;min-width:0;padding:7px 3px;min-height:48px}.mill-heading small{font-size:9px}.mill-heading h2{font-size:24px}.mill-heading p{font-size:11px}.mill-status{font-size:10px;padding:8px;max-width:35%}.mill-status b{font-size:12px}.mill-status small{font-size:9px}#millContext{font-size:11px;padding:6px 10px}#millReplayBtn{right:12px;top:126px}.mill-heading{max-width:57%}body.in-mill #directorCard{bottom:230px;font-size:12px}body.in-mill #toast{bottom:330px}}
@media(max-height:500px){.mill-heading{top:12px;left:16px;max-width:57%}.mill-heading h2{font-size:22px;max-width:none;margin-bottom:5px}.mill-heading small{margin-bottom:4px}.mill-status{top:12px}.mill-status small{display:none}.mill-bottom{bottom:10px;width:min(460px,calc(100% - 210px));left:auto;right:10px;transform:none}.mill-actions button{min-width:0;flex:1}.mill-dpad{bottom:12px;left:12px}#millReplayBtn{top:93px;right:16px}body.in-mill #directorCard{bottom:128px;width:min(520px,calc(100% - 28px))}body.in-mill #toast{bottom:225px}}
@media(max-width:600px){#start.panel{max-height:95dvh;overflow:auto;box-sizing:border-box}#millStartBtn{font-size:15px;padding:13px}#millStartBtn small{font-size:11px}.vs-mode-grid{margin-top:8px}.panel h1{font-size:34px}}

body.in-mill #directorCard{top:auto!important;height:auto!important;max-height:24vh;overflow:auto;min-height:0!important}body.in-mill #verticalSliceHud,body.in-mill #vsTarget,body.in-mill #hiddenPages{display:none!important}

#millContinueBtn{display:block;margin:8px auto 16px;padding:12px 20px;min-height:48px;background:#193c39;border:1px solid #87b7a2;border-radius:8px;color:#e4f4dc;cursor:pointer;font:14px system-ui}#millContinueBtn[hidden]{display:none}

/* Keep the layout viewport responsive when a touch device rotates. */
#gl{width:100%!important;height:100%!important}
/* V1.07: compact expedition UI leaves the world and protagonist in view. */
.mill-heading{left:24px;top:22px;max-width:340px;padding:12px 16px;border-left:2px solid #cba969;background:linear-gradient(90deg,#10202bd9,#10202b00);text-shadow:0 2px 8px #07141e}
.mill-heading small{font-size:9px;letter-spacing:.16em;color:#c1af85;margin-bottom:6px}
.mill-heading h2{font-size:25px;max-width:310px;line-height:1.12;margin-bottom:7px;color:#fbefd3}
.mill-heading p{font-size:12px;color:#c8d8df}.mill-status{background:#101f2bcd;border-color:#809a9b55}.mill-status b{color:#b8e8f0}
body.in-mill #vignette{opacity:.24}.mill-actions button{background:#12232eea;border-color:#849c9a88}.mill-actions button kbd{color:#deb578}
@media(max-width:740px){.mill-heading{top:12px;left:10px;padding:8px 9px;max-width:53%;box-sizing:border-box}.mill-heading h2{font-size:18px;overflow-wrap:anywhere}.mill-heading small{font-size:8px}.mill-heading p{font-size:10px}.mill-status{right:10px;top:12px;max-width:34%}.mill-status small{display:none}#millReplayBtn{top:101px;min-height:44px}.mill-dpad{bottom:118px}.mill-bottom{bottom:12px}}
@media(max-height:500px){.mill-heading{top:10px;left:12px;padding:7px 10px;max-width:48%}.mill-heading h2{font-size:20px}.mill-heading small{font-size:8px}.mill-heading p{font-size:10px}.mill-status{top:10px}#millReplayBtn{top:95px}.mill-dpad{bottom:12px}}
#millSoundBtn{position:absolute;bottom:76px;right:25px;pointer-events:auto;min-width:70px;min-height:44px;background:#152b34e8;border:1px solid #b3c6ba5e;border-radius:7px;padding:8px 12px;color:#ccdcd0;cursor:pointer;font:11px system-ui}
#millSoundBtn[aria-pressed=false]{color:#a4a9a5;background:#17262b}
@media(max-width:900px){#millSoundBtn{bottom:auto;right:16px;top:179px}}
@media(max-width:740px){#millSoundBtn{top:153px;right:12px}}
@media(max-height:500px){#millSoundBtn{top:146px;right:16px}}

/* The existing context line briefly reports the actual material result. */
#millContext[data-cast-state="resisted"]{color:#ffe0ae;border-color:#b3a58a;background:#292a23ed}
#millContext[data-cast-state="applied"]{color:#d1f8ff;border-color:#7dc9d4}
