/* Art comes from the generated asset library. CSS controls layout and interaction. */
#stage[data-academy] .start-menu>#start-button,#stage[data-academy] #journey-button,#stage[data-academy] #continue-button,#stage[data-academy] #journey-map-button,#stage[data-academy] #supplies-button,#stage[data-academy] #practice-button{display:none}
#stage[data-academy] .title-menu-links{max-width:580px;gap:10px 18px}
#stage[data-academy] .title-menu-links button:before,#stage[data-academy] .game-button:before,#stage[data-academy] .game-button:after{content:none}
.academy-screen{position:absolute;inset:0;z-index:38;background:#07111cef;overflow:auto;color:#e3e3d1;background-image:var(--academy-bg);background-size:cover;background-position:center;image-rendering:pixelated}
.academy-screen::before{content:"";position:fixed;inset:0;background:#020a14b3;pointer-events:none}
.academy-shell{position:relative;width:min(1120px,94vw);min-height:min(650px,92dvh);margin:4dvh auto;padding:24px 34px;background:#0b1724e8;border:20px solid transparent;border-image:url('assets/v4/ui/dialogue-frame.png') 70 100 70 100 fill stretch;box-sizing:border-box}
.academy-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:25px;padding-bottom:18px;border-bottom:1px solid #b8a06d55}
.academy-header>div>span{font:9px Georgia,serif;letter-spacing:4px;color:#c6ae7e}.academy-header h2{font-size:31px;font-weight:400;letter-spacing:4px;margin:12px 0 0;color:#ead8a7}
.academy-balance{display:flex;align-items:center;gap:10px;font-size:12px;color:#dfd9bb;white-space:nowrap}.academy-balance small{display:block;margin-top:7px;color:#d3b36f;font-size:11px}.house-stamp{width:45px;height:54px;object-fit:contain}.academy-balance button{font-size:28px;color:#b5c9cb;padding:5px 4px 5px 15px}
.academy-content h3{font-weight:400;color:#ead8ac}.academy-footer{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:18px;padding-top:16px;border-top:1px solid #b8a06d44}.academy-footer .game-button{min-width:190px;font-size:17px}.academy-footer .menu-link{font-size:12px;padding:10px 12px}
.academy-toast{font-size:12px;color:#f1d69c;line-height:1.8;text-align:center;margin:12px 0}.academy-toast:empty{display:none}.academy-lead{font-size:14px;color:#b9cccf;line-height:1.9;margin:0 0 20px}.academy-note{font-size:11px;color:#95aeb9;line-height:1.9;padding:14px 5px 0}
.mode-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.mode-card{position:relative;min-height:240px;overflow:hidden;text-align:left;border:1px solid #ae936555;background:#091521;padding:0}.mode-card>img{position:absolute;width:100%;height:100%;inset:0;object-fit:cover;opacity:.55;transition:opacity .2s}.mode-card:hover>img,.mode-card:focus-visible>img{opacity:.85}.mode-card>span{position:relative;display:block;margin-top:80px;padding:17px 22px;background:#06101bd9}.mode-card small{font-size:9px;letter-spacing:2px;color:#d9be8f}.mode-card strong{display:block;font-weight:400;font-size:25px;letter-spacing:3px;color:#f1d9a5;margin-top:10px}.mode-card p{font-size:12px;line-height:1.8;color:#b0c4ce;margin:10px 0}.mode-card b{font-size:12px;color:#e0c18b;font-weight:400}.mode-card.compact{min-height:145px}.mode-card.compact>span{margin-top:0;height:100%;background:#06101bb8}.mode-card.compact strong{font-size:22px}.mode-card:hover{border-color:#dfbb80}
.sorting-stage{display:grid;grid-template-columns:30% 1fr;gap:24px;align-items:center}.sorting-hat{width:100%;max-height:390px;object-fit:contain;image-rendering:pixelated}.sorting-dialogue>small{font-size:10px;letter-spacing:2px;color:#98b4bf}.sorting-dialogue>h3{font-size:25px;letter-spacing:3px;margin:14px 0}.sorting-dialogue>p{font-size:18px;line-height:1.9;color:#e0dfce;min-height:95px;margin:18px 0 22px}.sorting-answers{display:grid;gap:9px}.sorting-answers>button{display:flex;align-items:center;text-align:left;background:#112234e8;border:1px solid #9a8b5e88;padding:14px 18px;font-size:13px;line-height:1.7;color:#c7d6d5}.sorting-answers>button:hover{border-color:#ebcb89;color:#ffe9b9;background:#1e3040}.sorting-answers img{width:42px;height:53px;object-fit:contain;margin-right:15px}.sorting-answers small{display:block;color:#9cb7bf;font-size:10px;margin-top:3px}.sorting-answers b{font-size:10px;color:#e1c78d;font-weight:400}
.upgrade-grid,.boon-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.upgrade-card,.boon-card{padding:10px 17px 24px;text-align:center;background:#091725aa;border:1px solid #bfa57566}.upgrade-card img,.boon-card img{width:135px;height:135px;object-fit:contain;image-rendering:pixelated}.upgrade-card h3,.boon-card h3{font-size:23px;letter-spacing:3px;margin:10px 0}.upgrade-card small,.boon-card small{font-size:11px;color:#d1b881}.upgrade-card p,.boon-card p{font-size:12px;line-height:1.8;color:#abc3c9;min-height:52px}.upgrade-card button,.skin-card button,.furniture-rack button{color:#f0d49e;font-size:12px;padding:9px 15px;border:1px solid #d4b87a77;background:#0b1926}.upgrade-card button:disabled,.skin-card button:disabled,.furniture-rack button:disabled{opacity:.4;cursor:default}.boon-card:hover{border-color:#e3c38c;background:#21313c}.boon-card b{font-size:12px;font-weight:400;color:#e0c18b}
.wardrobe-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.skin-card{text-align:center;border:1px solid #9c977755;background:#091621a6;padding:14px 12px 18px}.skin-card.selected{border-color:#dfbf80;background:#263434b8}.skin-preview{height:190px;display:flex;align-items:flex-end;justify-content:center}.skin-preview img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.skin-card h3{font-size:18px;letter-spacing:2px;margin:16px 0 10px}.skin-card p{font-size:10px;line-height:1.8;color:#9fb6bd;min-height:40px}.skin-card button{font-size:11px;width:100%;padding:10px 5px}.wand-summary{display:flex;gap:20px;align-items:center;margin-top:24px;padding:16px 0;border-top:1px solid #b6a06a55}.wand-summary>img{width:110px;height:90px;object-fit:contain;image-rendering:pixelated}.wand-summary>div{flex:1}.wand-summary small{font-size:10px;color:#a6bdc5}.wand-summary h3{font-size:17px;margin:8px 0}.wand-summary p{font-size:11px;line-height:1.7;color:#9bb4bd}.wand-summary .game-button{font-size:14px;min-width:150px}
.room-scene{position:relative;aspect-ratio:16/8;overflow:hidden;border:1px solid #ae9665}.room-backdrop{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}.room-name{position:absolute;top:16px;left:20px;font-size:12px;color:#f1d59b;background:#071522ce;padding:8px 13px}.placed-furniture{position:absolute;transform:translate(-50%,-70%);width:21%;height:39%;pointer-events:none}.placed-furniture img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.room-avatar{position:absolute;left:35%;top:53%;width:17%;height:40%}.room-avatar img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.furniture-rack{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:16px}.furniture-rack article{display:flex;gap:13px;align-items:center;padding:12px;background:#0b1b28d9;border:1px solid #8c835c66}.furniture-rack article>img{width:86px;height:86px;object-fit:contain;image-rendering:pixelated}.furniture-rack h3{font-size:17px;margin:0 0 7px;letter-spacing:2px}.furniture-rack p{font-size:10px;line-height:1.7;color:#9bb7c0;margin:0 0 10px}.furniture-rack button{font-size:10px;padding:6px 11px}
.rogue-intro{text-align:center;max-width:740px;margin:30px auto;padding:10px 20px}.rogue-intro h3{font-size:28px;letter-spacing:3px}.rogue-intro>p{font-size:16px;line-height:2;color:#b9cdd1}.rogue-rules,.run-meter{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:18px;color:#dbbc85;font-size:12px;margin:22px 0}.rogue-rules span{padding:12px 15px;border:1px solid #b99b6755}.run-meter{justify-content:space-between;font-size:11px}.route-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.route-card{padding:0;overflow:hidden;border:1px solid #9a8d6488;background:#081623;text-align:left}.route-card>img{width:100%;height:185px;object-fit:cover;image-rendering:pixelated}.route-card>span{display:block;padding:20px}.route-card small{font-size:10px;color:#c7ae7a}.route-card h3{font-size:23px;letter-spacing:3px;margin:10px 0}.route-card p{font-size:12px;color:#abc1ca;line-height:1.9;min-height:45px}.route-card b{font-size:12px;font-weight:400;color:#e2c28c}.route-card:hover{border-color:#f5d397}.event-choices{display:grid;gap:12px;margin:25px 0}.event-choices button{display:block;padding:18px;background:#102234d9;border:1px solid #b5a06a77;text-align:left}.event-choices strong{display:block;font-size:17px;color:#e8ce9c;font-weight:400}.event-choices span{display:block;font-size:12px;line-height:1.8;color:#b1c8cb;margin-top:8px}.result-story>img{width:150px;height:150px;object-fit:contain;image-rendering:pixelated}
#rogue-hud{position:absolute;top:95px;left:25px;z-index:8;font-size:10px;color:#ddc28e}#rogue-hud>div{display:flex;gap:7px;margin-top:10px}#rogue-hud button{position:relative;width:42px;height:48px;padding:0}#rogue-hud button img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}#rogue-hud button b{position:absolute;bottom:0;right:-2px;font-size:10px;color:#f6dba5;text-shadow:1px 2px #000}#rogue-hud button:disabled{opacity:.35}#stage[data-panel] #rogue-hud{visibility:hidden}
/* Use generated illustrations in every spell-facing surface. */
.rune-frame{border:none!important;background:none!important;box-shadow:none!important}.rune-frame:before,.rune-frame:after{content:none!important}.rune-frame img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.rune-slot.recognized .rune-frame{outline:2px solid var(--spell);outline-offset:3px}.book-tab img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}.book-rune>img{width:200px;height:200px;object-fit:contain;image-rendering:pixelated}.book-tab{gap:6px}.book-tab>span{font-size:10px}.rune-guide #guide-svg{width:150px;height:150px;object-fit:contain;image-rendering:pixelated;filter:none;background:none}.rune-guide>span{white-space:normal;line-height:1.8}.auto-guide-symbols{display:none}.wand-choice>.wand-art{width:100%;height:105px;object-fit:contain;image-rendering:pixelated}.potion-shop .potion-art{width:58px;grid-row:1/5;image-rendering:pixelated}#potion-belt .potion-art{width:33px;height:42px;object-fit:contain;image-rendering:pixelated}
.game-button{background:#a89259 url('assets/v4/ui/button-primary.png') center/100% 100%!important;box-shadow:none!important;border:none!important;color:#172028}.book-panel,.settings-panel,.expedition-panel{background:#10202de8;border:14px solid transparent;border-image:url('assets/v4/ui/dialogue-frame.png') 70 100 70 100 fill stretch;box-shadow:none}.chapter-node{background:#07121c var(--chapter-bg) center/cover}.chapter-node strong,.chapter-node small,.chapter-place{background:#08131bd9;padding:3px 4px}.wand-choice.equipped{background:#243333c9}.story-stage{background:#07131c var(--story-bg) center/cover}.dialogue-box{background:#0b1b29ed;border:12px solid transparent;border-image:url('assets/v4/ui/dialogue-frame.png') 70 100 70 100 fill stretch;box-shadow:none}.health-frame{background:#0c1720;border:1px solid #9f976b}.health-fill{background:#a3bc78}.boss-vitals .health-fill{background:#8eafc5}.portrait,.boss-diamond{box-shadow:none}.spell-callout{animation:none}.cast-feedback{text-shadow:1px 2px #03101b}.rune-slot.casting .rune-frame{animation:none}
@media(max-width:760px){.academy-shell{padding:20px 18px;border-width:10px;margin:3dvh auto;min-height:94dvh}.academy-header{gap:8px;margin-bottom:18px}.academy-header h2{font-size:23px;letter-spacing:2px}.academy-header>div>span{font-size:7px;letter-spacing:2px}.academy-balance{font-size:9px;gap:5px}.academy-balance small{font-size:9px}.house-stamp{width:27px;height:38px}.mode-card{min-height:220px}.mode-card>span{padding:14px;margin-top:55px}.mode-card strong{font-size:21px}.mode-card p{font-size:11px}.mode-card.compact{min-height:140px}.sorting-stage{grid-template-columns:23% 1fr;gap:12px}.sorting-dialogue>p{font-size:15px}.sorting-answers>button{font-size:11px;padding:12px}.upgrade-grid,.boon-grid{gap:10px}.upgrade-card,.boon-card{padding:8px 10px 18px}.upgrade-card img,.boon-card img{width:100px;height:100px}.upgrade-card h3,.boon-card h3{font-size:19px}.upgrade-card p,.boon-card p{font-size:11px}.wardrobe-grid{grid-template-columns:repeat(2,1fr)}.skin-preview{height:160px}.wand-summary{gap:10px;flex-wrap:wrap}.wand-summary>img{width:85px;height:85px}.room-scene{aspect-ratio:4/3}.furniture-rack{gap:9px}.furniture-rack article{padding:10px;gap:7px}.furniture-rack article>img{width:57px;height:70px}.furniture-rack h3{font-size:14px}.furniture-rack p{font-size:9px}.route-card>img{height:150px}.route-card>span{padding:15px}.route-card h3{font-size:20px}.route-card p{font-size:11px}#rogue-hud{top:166px;left:17px}.rune-guide #guide-svg{width:124px;height:124px}.book-tab img{width:28px;height:28px}.book-rune>img{width:170px;height:170px}}
@media(max-width:500px){.academy-shell{width:96vw;padding:18px 12px;border-width:7px}.academy-header{align-items:flex-start}.academy-header h2{font-size:20px;letter-spacing:1px}.academy-balance{gap:2px}.academy-balance button{padding-left:9px}.house-stamp{display:none}.mode-grid{grid-template-columns:1fr;gap:12px}.mode-card{min-height:185px}.mode-card>span{margin-top:35px}.mode-card.compact{min-height:123px}.mode-card.compact>span{margin-top:0}.sorting-stage{display:block}.sorting-hat{display:block;width:100px;height:100px;margin:0 auto}.sorting-dialogue>p{min-height:0;font-size:14px;margin:12px 0 17px}.sorting-dialogue>h3{font-size:22px;margin:8px 0}.sorting-answers>button{font-size:11px;padding:11px}.sorting-answers img{width:32px;height:42px;margin-right:10px}.sorting-answers small{font-size:9px}.academy-lead{font-size:12px}.upgrade-grid,.boon-grid{grid-template-columns:1fr}.upgrade-card{display:grid;grid-template-columns:88px 1fr;text-align:left;column-gap:13px;align-items:center}.upgrade-card img{grid-row:1/5;width:88px;height:100px}.upgrade-card h3{margin:7px 0}.upgrade-card p{min-height:0;margin:8px 0}.upgrade-card button{justify-self:start}.boon-card img{width:95px;height:95px;float:left;margin-right:14px}.boon-card{text-align:left;min-height:135px}.boon-card p{min-height:0}.skin-card{padding:10px 8px}.skin-card h3{font-size:16px}.skin-preview{height:140px}.wand-summary>div{min-width:180px}.wardrobe-grid{gap:10px}.room-scene{aspect-ratio:1/1}.room-name{font-size:9px;left:8px;top:8px;padding:6px}.furniture-rack{grid-template-columns:1fr}.furniture-rack article>img{width:70px;height:70px}.room-avatar{width:24%;height:30%;left:33%;top:58%}.placed-furniture{width:27%;height:30%}.route-grid{grid-template-columns:1fr}.route-card>img{height:145px}.route-card>span{padding:12px 17px}.route-card p{min-height:0}.run-meter{font-size:9px;gap:9px}.rogue-intro{padding:5px;margin:15px auto}.rogue-intro h3{font-size:22px}.rogue-intro>p{font-size:13px}.rogue-rules{font-size:10px;gap:7px}.rogue-rules span{padding:9px}.academy-footer .menu-link{font-size:10px}.academy-footer .game-button{font-size:15px;min-width:170px}.book-tab img{width:26px;height:26px}.book-tab>span{font-size:8px}.book-rune>img{width:130px;height:130px}.wand-choice>.wand-art{grid-column:1;grid-row:1/6;height:95px}.potion-shop .potion-art{height:58px;width:48px}}

.intent-art{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}.game[data-mode=active] #battle{cursor:crosshair}

#stage[data-academy] #mode-button{grid-column:1/-1;justify-self:center;min-width:260px;padding:18px 32px;order:0;letter-spacing:4px}

/* Readable menu type and stable generated-frame corners at every screen size. */
.academy-shell{width:min(1120px,94%);padding:28px 32px;border-image-slice:70 100 70 100;border-image-repeat:stretch}
.academy-header h2:focus{outline:none}
.academy-screen button:focus-visible{outline:2px solid #f0d598;outline-offset:4px}
.academy-header button,.academy-footer button,.sorting-answers button,.upgrade-card button,.event-choices button{min-height:44px}
.academy-balance,.academy-balance small,.academy-footer .menu-link,.academy-toast,.academy-note{font-size:13px;line-height:1.8}
.academy-lead{font-size:15px}.sorting-answers>button{font-size:15px}.sorting-answers small,.sorting-answers b{font-size:12px;line-height:1.75}
.sorting-answers>button:disabled{opacity:.45;cursor:default}
.upgrade-card p,.boon-card p,.route-card p,.event-choices span{font-size:14px;line-height:1.9}
.upgrade-card small,.boon-card small,.route-card small,.run-meter,.rogue-rules{font-size:13px;line-height:1.8}
.upgrade-card button,.boon-card b,.route-card b{font-size:14px;line-height:1.7}
.upgrade-card button:disabled{opacity:.72;color:#bdc1ba}
.academy-footer .game-button{max-width:100%;white-space:normal}
.academy-note{color:#b2c3c8}.rogue-intro .academy-note{font-size:13px}
@media(max-width:760px){.academy-shell{padding:22px 20px}.academy-header h2{line-height:1.4}.academy-balance,.academy-balance small{font-size:12px}.academy-footer .menu-link{font-size:13px}.upgrade-card,.boon-card{padding:12px 14px 20px}.upgrade-grid,.boon-grid{gap:14px}.run-meter{gap:10px}.academy-note,.academy-toast{font-size:13px}}
@media(max-width:500px){.academy-shell{width:96%;padding:18px 14px;border-width:10px}.academy-header{gap:10px}.academy-header>div:first-child{min-width:0}.academy-header h2{font-size:22px;letter-spacing:1px}.academy-balance{white-space:normal;flex-shrink:0}.academy-balance button{padding:4px;min-width:38px}.academy-balance small{margin-top:3px}.sorting-dialogue>p{font-size:16px;line-height:1.85}.sorting-answers>button{font-size:14px;padding:12px 14px}.sorting-answers small,.sorting-answers b{font-size:12px}.academy-lead,.upgrade-card p,.boon-card p,.route-card p,.event-choices span{font-size:14px}.upgrade-card small,.boon-card small,.route-card small,.run-meter,.rogue-rules{font-size:12px}.upgrade-card button,.boon-card b,.route-card b{font-size:13px}.rogue-intro>p{font-size:15px}.academy-footer{gap:8px}.academy-footer .menu-link{font-size:13px}.academy-footer .game-button{font-size:15px}}

.sorting-choice-note{font-size:13px!important;line-height:1.8!important;min-height:0!important;margin:12px 0 0!important;color:#b8cbcf!important}
@media(min-width:761px){
  .academy-shell:has([data-house]){min-height:0;margin:3dvh auto;padding:18px 24px}
  .academy-shell:has([data-house]) .academy-header{margin-bottom:16px;padding-bottom:14px}
  .sorting-stage:has([data-house]){grid-template-columns:minmax(140px,22%) 1fr;gap:24px;align-items:center}
  .sorting-stage:has([data-house]) .sorting-hat{max-height:240px}
  .sorting-stage:has([data-house]) .sorting-dialogue>h3{font-size:23px;margin:10px 0}
  .sorting-stage:has([data-house]) .sorting-dialogue>p{font-size:17px;line-height:1.75;min-height:0;margin:12px 0 16px}
  .sorting-answers:has([data-house]){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .sorting-answers>[data-house]{padding:10px 14px;min-height:88px;align-items:center;font-size:16px}
  .sorting-answers>[data-house] img{width:38px;height:50px;flex-shrink:0;margin-right:12px}
  .sorting-answers>[data-house] small{font-size:12px;line-height:1.65}
  .sorting-answers>[data-house] b{font-size:12px;line-height:1.65}
  .academy-shell:has([data-house]) .academy-footer{margin-top:14px;padding-top:10px}
}

/* Menus stay inside the game viewport; only their central content can scroll. */
.academy-screen:has(.academy-shell){overflow:hidden}
.academy-shell,.academy-shell:has([data-house]){display:flex;flex-direction:column;height:92dvh;max-height:92dvh;min-height:0;margin:4dvh auto}
.academy-header,.academy-footer,.academy-toast{flex-shrink:0}
.academy-content{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b49b68 #091725;padding:2px 4px}
.academy-footer{margin-top:14px;padding-top:12px}
@media(min-width:761px) and (max-height:820px){
  .academy-shell,.academy-shell:has([data-house]){padding:18px 24px}
  .academy-header{margin-bottom:16px;padding-bottom:12px}
  .academy-header h2{margin-top:8px}
  .academy-lead{margin-bottom:14px}
  .upgrade-card{display:grid;grid-template-columns:64px minmax(0,1fr);column-gap:12px;align-items:center;text-align:left;padding:12px 14px 16px}
  .upgrade-card img{grid-row:1/3;width:64px;height:76px}
  .upgrade-card h3{font-size:22px;line-height:1.4;letter-spacing:2px;margin:6px 0}
  .upgrade-card small{font-size:13px;line-height:1.7}
  .upgrade-card p{grid-column:1/-1;min-height:0;font-size:14px;line-height:1.8;margin:12px 0}
  .upgrade-card button{grid-column:1/-1;justify-self:stretch;align-self:end;font-size:14px}
  .route-card>img{height:120px}
  .route-card>span{padding:12px 16px}
  .route-card h3{font-size:22px;line-height:1.4;margin:8px 0}
  .route-card p{min-height:0;font-size:14px;line-height:1.8;margin:10px 0}
  .run-meter{margin:12px 0 16px}
  .boon-card img{width:88px;height:88px}
  .rogue-intro{margin:16px auto;padding:4px 16px}
  .rogue-intro h3{margin:12px 0}
  .rogue-intro>p{font-size:15px;line-height:1.85}
}
@media(max-width:760px){
  .academy-shell,.academy-shell:has([data-house]){height:94dvh;max-height:94dvh;margin:3dvh auto;padding:16px 14px}
  .academy-header{margin-bottom:14px;padding-bottom:12px}
  .academy-footer{margin-top:10px;padding-top:10px}
  .academy-content{padding:2px}
}

/* Night patrol: a letter and a small travelling kit, using the existing painted frames. */
.academy-screen[data-page=fieldwork] .academy-shell{max-width:1120px}
.fieldwork-layout{display:grid;grid-template-columns:1.15fr 1fr;gap:36px;align-items:start}
.fieldwork-letter>small{color:#cfb77d;letter-spacing:1px;font-size:11px}
.fieldwork-letter h3{font-size:27px;line-height:1.6;color:#f0dca8;margin:14px 0}
.fieldwork-letter p{font-size:14px;line-height:1.95;color:#d0d9d8}
.fieldwork-route{display:flex;gap:12px;margin:20px 0;flex-wrap:wrap}
.fieldwork-route button,.fieldwork-spells button{padding:9px 12px;border:1px solid #88734b;background:#071321;color:#e4d5ad;cursor:pointer;font:inherit;font-size:13px}
.fieldwork-route [aria-pressed=true]{border-color:#eed091;background:#28302e}
.fieldwork-note{font-size:12px!important;color:#c1b38f!important;line-height:1.8!important}
.fieldwork-pack h3,.fieldwork-spells>strong{font-size:16px;color:#e6cf98}
.fieldwork-pack{border-left:1px solid #7f745145;padding-left:28px}
.field-preparation{width:100%;display:flex;text-align:left;align-items:center;gap:16px;padding:12px 6px;margin:5px 0;border:1px solid transparent;border-bottom-color:#83724b55;color:#e9d9b1;background:transparent;cursor:pointer;font:inherit}
.field-preparation[aria-pressed=true]{border-color:#d4b773;background:#dcc48a12}
.field-preparation:disabled{opacity:.52;cursor:default}
.field-preparation img{width:50px;height:66px;object-fit:contain;image-rendering:pixelated}
.field-preparation span{display:flex;flex-direction:column;gap:7px}
.field-preparation strong{font-size:14px}.field-preparation small{font-size:12px;line-height:1.6;color:#c2cccc}.field-preparation b{font-size:11px;color:#cdbb88;font-weight:normal}
.fieldwork-spells{margin-top:22px}.fieldwork-spells>small{display:block;font-size:11px;line-height:1.8;color:#acbabd;margin-top:10px}
@media(max-width:700px){.fieldwork-layout{grid-template-columns:1fr;gap:15px}.fieldwork-pack{border-left:0;border-top:1px solid #7f745145;padding:14px 0 0}.fieldwork-letter h3{font-size:22px}.fieldwork-letter p{font-size:13px}.field-preparation img{height:48px;width:38px}.fieldwork-route{margin:12px 0}}
@media(min-width:701px){
  .academy-screen[data-page=fieldwork] .academy-shell{padding:28px 38px}
  .academy-screen[data-page=fieldwork] .academy-header{margin-bottom:14px;padding-bottom:14px}
  .academy-screen[data-page=fieldwork] .academy-header h2{font-size:32px;margin-top:8px}
  .academy-screen[data-page=fieldwork] .academy-footer{margin-top:10px;padding-top:12px}
  .academy-screen[data-page=fieldwork] .academy-toast{margin:7px 0;min-height:0}
  .fieldwork-letter h3{font-size:24px;margin:9px 0}
  .fieldwork-letter p{font-size:13px;line-height:1.75;margin:9px 0}
  .fieldwork-route{margin:13px 0;gap:8px}
  .fieldwork-pack h3{margin:4px 0 10px}
  .field-preparation{padding:7px 6px;gap:12px;margin:3px 0;min-height:66px}
  .field-preparation img{width:42px;height:48px}
  .field-preparation span{gap:4px}
  .field-preparation small{font-size:11px;line-height:1.4}
  .fieldwork-spells{margin-top:14px}
  .fieldwork-spells>small{margin-top:6px}
}
@media(min-width:701px){
 .fieldwork-spells{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}
 .fieldwork-spells>strong,.fieldwork-spells>p{grid-column:1;margin:3px 0}
 .fieldwork-spells>button{grid-column:2;grid-row:1/3;font-size:12px;padding:9px}
 .fieldwork-spells>small{grid-column:1/-1;font-size:10px;line-height:1.5}
}

/* The next step carries the previous choice with it; no extra confirmation gate. */
.run-recap{display:flex;gap:18px;align-items:flex-start;padding:14px 18px;border-left:2px solid #c9b074;background:#16302f80;color:#e7d6a5;margin:0 0 14px}
.run-recap>small{font-size:11px;white-space:nowrap;line-height:1.9;color:#b6bda8}
.run-recap strong{font-size:16px;font-weight:400}.run-recap p,.run-recap span{font-size:13px;line-height:1.8;margin:5px 0 0;color:#cbd8d3}
.run-recap span{display:block;color:#dec88e}
.route-grid.single-route{grid-template-columns:1fr}.single-route .route-card{display:grid;grid-template-columns:42% 1fr;align-items:stretch}
.single-route .route-card>img{height:100%;min-height:185px;max-height:260px}.single-route .route-card>span{padding:24px}
.field-pack-summary{margin:14px 0 6px;padding:12px 0;border-top:1px solid #8b795a66;color:#ddd5b3}
.field-pack-summary small{display:block;font-size:11px;line-height:1.7;color:#b3c4c4}.field-pack-summary strong{display:block;margin:7px 0;font-size:14px;font-weight:400;color:#ecd29a}
.field-pack-summary p{font-size:12px;line-height:1.8;margin:5px 0}
.academy-screen[data-page=fieldwork-return] .academy-shell,.academy-screen[data-page=fieldwork-received] .academy-shell{width:min(860px,94%);height:auto;max-height:92dvh;min-height:0;margin:4dvh auto}
.parcel-stage{padding:6px 12px 12px}.parcel-stage>.academy-lead{margin:4px 0 20px;line-height:1.9}
.parcel-details{display:grid;gap:18px;text-align:left}.parcel-details ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 28px}
.parcel-details li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #8c80563d;font-size:14px;color:#d5ded7}.parcel-details li b{font-weight:400;color:#edcc88}
.parcel-details .parcel-seed{color:#e6d7ae}.parcel-gift{display:flex;align-items:center;gap:22px;border-top:1px solid #9b82555c;padding:15px 0 0}
.parcel-gift>img{width:112px;height:116px;object-fit:contain;image-rendering:pixelated}.parcel-gift small{font-size:11px;color:#b9b397}.parcel-gift strong{display:block;font-size:20px;font-weight:400;color:#edce91;margin:6px 0}.parcel-gift p{font-size:13px!important;line-height:1.9!important;color:#bdcfcb!important;margin:5px 0!important}
.parcel-unlock{padding:13px 16px;margin:18px 0 8px;background:#243b332e;border-left:2px solid #afc194;color:#d6e0c3;font-size:14px;line-height:1.8}.parcel-unlock strong{font-weight:400;color:#e5d7a7}
.run-parcel{margin-top:18px;border-top:1px solid #8c805655;padding-top:14px}.run-parcel h4{font-size:14px;font-weight:400;color:#d9c38e;text-align:left;margin:0 0 10px}.run-parcel .parcel-details ul{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 18px}.run-parcel .parcel-details li{font-size:12px}.run-parcel .parcel-gift>img{width:66px;height:70px}.run-parcel .parcel-gift strong{font-size:17px}.run-parcel .parcel-gift{padding-top:10px;gap:15px}
.academy-screen[data-page=rogue-result] .result-story{max-width:820px;margin:8px auto}.academy-screen[data-page=rogue-result] .result-story>img{width:66px;height:66px}.academy-screen[data-page=rogue-result] .result-story>h3{font-size:23px;margin:9px 0}.academy-screen[data-page=rogue-result] .result-story>p{font-size:14px;line-height:1.8;margin:8px 0}
@media(max-width:700px){.run-recap{display:block;padding:12px 14px}.run-recap>small{display:block;margin-bottom:5px}.single-route .route-card{display:block}.single-route .route-card>img{height:130px;min-height:0;max-height:none}.single-route .route-card>span{padding:16px}.parcel-stage{padding:4px}.parcel-details ul{gap:6px 18px}.parcel-details li{font-size:13px}.parcel-gift{gap:15px}.parcel-gift>img{width:85px;height:96px}.parcel-gift strong{font-size:18px}.run-parcel .parcel-details ul{grid-template-columns:repeat(2,minmax(0,1fr))}.parcel-unlock{font-size:13px}.academy-screen[data-page=fieldwork-return] .academy-shell,.academy-screen[data-page=fieldwork-received] .academy-shell{height:94dvh;max-height:94dvh;margin:3dvh auto}.field-pack-summary{margin-top:12px}}

/* Keep the selected kit and new unlock visible on a 720p landscape display. */
@media(min-width:1000px) and (max-height:800px){
  .academy-screen[data-page=fieldwork] .academy-shell{padding:18px 32px}
  .academy-screen[data-page=fieldwork] .academy-header{margin-bottom:10px;padding-bottom:10px}
  .academy-screen[data-page=fieldwork] .academy-header h2{font-size:29px;margin-top:6px}
  .academy-screen[data-page=fieldwork] .fieldwork-layout{grid-template-columns:1.05fr 1fr;gap:28px}
  .academy-screen[data-page=fieldwork] .fieldwork-pack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;padding-left:22px}
  .academy-screen[data-page=fieldwork] .fieldwork-pack>h3{grid-column:1/-1;margin:2px 0 4px}
  .academy-screen[data-page=fieldwork] .field-preparation{padding:7px 6px;margin:0;gap:9px;min-height:86px;align-items:center}
  .academy-screen[data-page=fieldwork] .field-preparation img{width:32px;height:40px;flex-shrink:0}
  .academy-screen[data-page=fieldwork] .field-preparation span{gap:3px}
  .academy-screen[data-page=fieldwork] .field-preparation strong{font-size:13px}
  .academy-screen[data-page=fieldwork] .field-pack-summary{grid-column:1/-1;margin:5px 0 0;padding:8px 0 0}
  .academy-screen[data-page=fieldwork] .field-pack-summary strong{margin:4px 0}
  .academy-screen[data-page=fieldwork] .field-pack-summary p{margin:3px 0;line-height:1.65}
  .academy-screen[data-page=fieldwork] .field-pack-summary small{line-height:1.65}
  .academy-screen[data-page=fieldwork] [data-field-brew]{grid-column:1/-1;justify-self:start;padding:7px 0}
  .academy-screen[data-page=fieldwork-received] .academy-shell{padding:16px 26px}
  .academy-screen[data-page=fieldwork-received] .academy-header{margin-bottom:10px;padding-bottom:10px}
  .academy-screen[data-page=fieldwork-received] .academy-header h2{font-size:29px;margin-top:7px}
  .academy-screen[data-page=fieldwork-received] .parcel-stage{padding:2px 8px 6px}
  .academy-screen[data-page=fieldwork-received] .parcel-stage>.academy-lead{margin:2px 0 12px}
  .academy-screen[data-page=fieldwork-received] .parcel-details{gap:10px}
  .academy-screen[data-page=fieldwork-received] .parcel-details ul{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 20px}
  .academy-screen[data-page=fieldwork-received] .parcel-details li{padding:7px 0;font-size:13px}
  .academy-screen[data-page=fieldwork-received] .parcel-gift{padding-top:10px;gap:18px}
  .academy-screen[data-page=fieldwork-received] .parcel-gift>img{width:80px;height:84px}
  .academy-screen[data-page=fieldwork-received] .parcel-gift strong{font-size:18px;margin:4px 0}
  .academy-screen[data-page=fieldwork-received] .parcel-unlock{padding:10px 14px;margin:12px 0 6px;font-size:13px;line-height:1.7}
  .academy-screen[data-page=fieldwork-received] .fieldwork-note{margin:7px 0 0}
}
