/* 0.9.9a: illustrated scenes, not repeated flat cards. Original art and mechanics remain intact. */
:root{--art-divider:url('../assets/ui/result/divider.png');--art-ribbon:url('../assets/ui/decor/ribbon_gold.png');--art-town:url('../assets/backgrounds/bg_02_town_square.png');--art-cook:url('../assets/facilities/cook.png')}
/* The party stands on a single shared scene. Only the actual selection has a highlight. */
#mealLifeDialog.meal-growth-screen{background:linear-gradient(180deg,#153c3b38 0%,#153c3b14 35%,#17352ec9 78%,#122f2bef 100%),var(--art-town) center/cover no-repeat;padding:clamp(5px,1.5vmin,16px);gap:clamp(3px,1vmin,12px)}
#mealLifeDialog.meal-growth-screen .meal-life-head{border:0;padding:0;justify-content:space-between;gap:8px}
#mealLifeDialog.meal-growth-screen .meal-life-head h2{background:var(--reg-heading) center/100% 100% no-repeat;padding:.45em 2em .55em;margin:0;line-height:1.1;color:#fff7d6;text-shadow:0 2px 2px #17231d;font-size:clamp(17px,3.6vmin,32px)}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-head h2{background-image:var(--reg-victory);padding:.5em 2.4em .9em}
#mealLifeDialog.meal-growth-screen .meal-growth-body{grid-template-columns:minmax(100px,22%) minmax(0,1fr);gap:clamp(6px,1.4vmin,18px)}
#mealLifeDialog.meal-growth-screen .meal-life-summary{background:transparent;border:clamp(9px,1.9vmin,20px) solid transparent;border-image:var(--reg-parchment) 52 65 52 65 fill stretch;border-radius:0;box-shadow:none;padding:2px;color:#543815;gap:clamp(2px,.7vmin,8px);font-size:clamp(10px,2.3vmin,19px);align-self:stretch;justify-content:center;overflow:hidden}
#mealLifeDialog.meal-growth-screen .meal-life-summary img{height:clamp(40px,23dvh,225px);max-width:100%;filter:drop-shadow(0 3px 2px #8a602a50)}
#mealLifeDialog.meal-growth-screen .meal-life-summary strong{font-size:1.12em;line-height:1.15}
#mealLifeDialog.meal-growth-screen .meal-life-summary::after{content:'';background:var(--art-cook) center/contain no-repeat;width:100%;height:clamp(25px,12dvh,115px);flex:0 1 auto;min-height:0}
#mealLifeDialog.meal-growth-screen .meal-growth-main{gap:2px;position:relative}
#mealLifeDialog.meal-growth-screen .meal-life-people{gap:clamp(2px,.5vmin,8px);align-items:stretch}
#mealLifeDialog.meal-growth-screen .meal-life-people .meal-life-person{position:relative;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;outline:0!important;color:#fff4d9!important;justify-content:flex-end;gap:2px;padding:3px 1px 5px!important;font-size:clamp(10px,2.35vmin,20px)!important;line-height:1.15;text-shadow:0 1px 2px #10261e,0 0 4px #10261e!important;overflow:hidden;isolation:isolate}
#mealLifeDialog.meal-growth-screen .meal-life-person img{height:clamp(32px,39dvh,375px);width:100%;max-width:100%;min-height:32px;object-fit:contain;filter:drop-shadow(0 4px 2px #162c2570);transition:filter .15s,transform .15s;flex-shrink:1}
#mealLifeDialog.meal-growth-screen .meal-life-person strong{width:100%;padding:.4em .35em .3em;background:var(--art-ribbon) center/100% 100% no-repeat;color:#513213;text-shadow:none;font-size:1.05em;line-height:1.2;min-width:0}
#mealLifeDialog.meal-growth-screen .meal-life-person .meal-xp{color:#ffe297;font-weight:900;font-size:1.14em}
#mealLifeDialog.meal-growth-screen .meal-life-person[aria-pressed=true] img{filter:drop-shadow(0 0 3px #fff1a0) drop-shadow(0 0 8px #e6a636);transform:translateY(-2px)}
#mealLifeDialog.meal-growth-screen .meal-life-person[aria-pressed=true]::after{content:'';position:absolute;top:3px;right:3px;width:clamp(22px,6vmin,48px);height:clamp(22px,6vmin,48px);background:var(--reg-check) center/contain no-repeat;pointer-events:none}
#mealLifeDialog.meal-growth-screen .meal-life-person:focus-visible{outline:2px dashed #fff1af!important;outline-offset:-2px}
#mealLifeDialog.meal-growth-screen .meal-life-person:disabled{opacity:.48}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-person:disabled{opacity:1;cursor:default}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-person::after{display:none}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-person img{height:clamp(32px,36dvh,340px)}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-level-up strong{background-image:var(--reg-heading);color:#fff3c6;text-shadow:0 1px 2px #18352c}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-level-up img{filter:drop-shadow(0 0 9px #f2c459)}
#mealLifeDialog.meal-growth-screen .meal-growth-nav{gap:clamp(10px,2vmin,24px);padding:0;align-items:center;color:#fff1ce;text-shadow:0 1px 2px #17372d}
#mealLifeDialog.meal-growth-screen .meal-growth-nav button{width:clamp(34px,8vmin,60px);height:clamp(28px,7vmin,46px);min-height:0;padding:0;font-size:0;background:url('../assets/ui/registered/arrow_left.png') center/contain no-repeat;box-shadow:none}
#mealLifeDialog.meal-growth-screen .meal-growth-nav button:last-child{background-image:url('../assets/ui/registered/arrow_right.png')}
#mealLifeDialog.meal-growth-screen .meal-growth-bottom{border:0;position:relative;padding:6px 0 0;gap:10px}
#mealLifeDialog.meal-growth-screen .meal-growth-bottom::before{content:'';position:absolute;top:0;left:0;right:0;height:5px;background:var(--art-divider) center/100% 100% no-repeat;pointer-events:none}
#mealLifeDialog.meal-growth-screen .meal-growth-bottom button{min-width:clamp(120px,29vw,340px);min-height:clamp(38px,10vmin,75px);white-space:nowrap}
#mealLifeDialog.meal-growth-screen .meal-life-message{line-height:1.25;overflow-wrap:anywhere;text-shadow:0 1px 2px #142d24}
@media(max-height:360px){#mealLifeDialog.meal-growth-screen .meal-life-summary::after{display:none}#mealLifeDialog.meal-growth-screen .meal-life-person span{font-size:10px}#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-person img{height:30dvh}#mealLifeDialog.meal-growth-screen .meal-life-person strong{padding:.32em .2em}}
@media(orientation:portrait){#mealLifeDialog.meal-growth-screen .meal-growth-body{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}#mealLifeDialog.meal-growth-screen .meal-life-summary{flex-direction:row;flex-wrap:wrap}#mealLifeDialog.meal-growth-screen .meal-life-summary img{height:52px;width:52px}#mealLifeDialog.meal-growth-screen .meal-life-summary::after{display:none}#mealLifeDialog.meal-growth-screen .meal-life-people{grid-template-columns:repeat(3,minmax(0,1fr))}#mealLifeDialog.meal-growth-screen .meal-life-person img{max-height:17dvh}}
@media(prefers-reduced-motion:reduce){#mealLifeDialog.meal-growth-screen .meal-life-person img{transition:none}}
/* Hero dossier: one visual stage and a continuous reading area instead of nested cards. */
#heroDetails .detail-portrait{border:0;border-radius:0;background:var(--zp-pedestal) center 81%/68% auto no-repeat,linear-gradient(#173c3a36,#173c3abf),var(--art-town) center/cover no-repeat}
#heroDetails .detail-name{background:var(--reg-heading) center/100% 100% no-repeat;border:0;border-radius:0;padding-inline:9%;box-shadow:none}
#heroDetails .detail-tab{border:0!important;border-radius:0!important;background:var(--zp-card-normal) center/100% 100% no-repeat!important;box-shadow:none}
#heroDetails .detail-tab[aria-pressed=true]{background-image:var(--zp-card-selected)!important}
#heroDetails .detail-pane-scroll{border:clamp(8px,1.6vmin,16px) solid transparent;border-image:var(--reg-parchment) 52 65 52 65 fill stretch;color:#49361e;padding:2px 5px;scrollbar-color:#a88b54 #f4e4bf}
#heroDetails .detail-data .growth-card,#heroDetails .detail-data .strength-card,#heroDetails .detail-data .bond-card,#heroDetails .detail-skill{background:none;border:0;border-radius:0;box-shadow:none;padding:3px 4px 7px;margin:0 0 5px;border-bottom:1px solid #b8985b}
#heroDetails .detail-data h3,#heroDetails .detail-data .detail-muted,#heroDetails .detail-data .detail-foot{color:#65461f}
#heroDetails .detail-stat{background:none;border:0;border-bottom:1px solid #b8985b;border-radius:0;color:#49361e;padding:3px 5px}
#heroDetails .detail-meter{background:#d6c398}
#heroDetails .detail-data .meal-life-section button,#heroDetails #growthTraining button{background:var(--reg-secondary) center/100% 100% no-repeat;border:0;box-shadow:none;color:#fff4d4;text-shadow:0 1px 2px #19312b}
#heroDetails #growthTraining button.primary{background-image:var(--reg-primary)}
/* Recipe archive: one open parchment, illustrated recipe entries, no tile backgrounds. */
#recipeBook .recipe-book-head h2,#facilityPanel .facility-head h2,#plazaInventory .facility-head h2,#facilityShop .facility-head h2{background:var(--reg-heading) center/100% 100% no-repeat;color:#fff4d7;padding:.45em 2em .55em;text-shadow:0 1px 2px #16362c;line-height:1.1}
#recipeBook .recipe-book-list{border:clamp(10px,2vmin,22px) solid transparent;border-image:var(--reg-parchment) 52 65 52 65 fill stretch;gap:5px;padding:3px 6px}
#recipeBook .recipe-book-card{background:none;border:0;border-radius:0;border-bottom:1px solid #c3a672;box-shadow:none;gap:4px;padding:5px 3px}
/* Facilities and inventory: shared parchment surfaces; keep existing dialog sizing and actions. */
#facilityPanel,#plazaInventory,#facilityShop{border:12px solid transparent;border-image:var(--reg-parchment) 52 65 52 65 fill stretch;background:none;border-radius:0;box-shadow:none}
#facilityPanel .recipe-choice,#plazaInventory .inventory-item,#facilityShop .shop-card{background:none;border:0;border-radius:0;box-shadow:none;border-bottom:1px solid #c3a672}
#facilityPanel .recipe-choice[aria-pressed=true]{border:0;background:var(--zp-card-selected) center/100% 100% no-repeat;padding:6px!important;color:#493720}
#facilityShop .shop-focus{border-bottom:2px solid #a3782c}
/* Existing victory scene: remove repeated neutral XP tiles, keep visual result art. */
#modal .battle-result .br-growth-card{border:0;border-radius:0;background:none;border-bottom:1px solid #b99b63;box-shadow:none}
#modal .battle-result .br-growth-card.br-level-up{background:none;color:#704717}
/* Final art pass: names are free-standing labels, not five miniature buttons. */
#mealLifeDialog.meal-growth-screen .meal-life-head h2{padding:.7em 2.1em .8em}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-head h2{padding:.7em 2.7em 1.05em}
#mealLifeDialog.meal-growth-screen .meal-life-person strong{background:none;color:#fff4d6;text-shadow:0 2px 2px #192c24,0 0 4px #192c24;font-size:1.22em;padding:.2em .15em;line-height:1.1}
#mealLifeDialog.meal-growth-screen .meal-life-person[aria-pressed=true] strong{color:#ffe18a}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-person:not(.meal-level-up) strong{color:#fff4d6}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-level-up strong{background:none;color:#ffe18a}
#mealLifeDialog.meal-growth-screen .meal-life-person img{width:134%;max-width:none;height:clamp(32px,48dvh,450px)}
#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-person img{height:clamp(32px,43dvh,400px)}
#mealLifeDialog.meal-growth-screen .meal-life-person[aria-pressed=true]::after{top:15%;right:3px}
@media(max-height:360px){#mealLifeDialog.meal-growth-screen .meal-life-head h2{padding:.5em 1.8em .6em}#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-head h2{padding:.45em 2.2em .7em}#mealLifeDialog.meal-growth-screen[data-meal-page=result] .meal-life-person img{height:35dvh}}
@media(orientation:portrait){#mealLifeDialog.meal-growth-screen .meal-life-person img{width:100%;max-height:17dvh}}
/* Portrait label and roster remain distinct from actual action buttons. */
#heroDetails .detail-name{background:#15392dd9;color:#fff1cf;padding:4px 10px;max-width:100%;width:100%}
#heroDetails .detail-name #detailOwned{background:none;border:0;border-radius:0;color:#ffe18c;padding:0 4px}
#heroDetails .detail-tab{background:none!important;position:relative;border-bottom:2px solid transparent!important;padding:3px 4px!important;grid-template-rows:minmax(16px,1fr) auto auto;overflow:hidden}
#heroDetails .detail-tab[aria-pressed=true]{background:none!important;border-bottom:2px solid #f1ce75!important;color:#ffe2a0}
#heroDetails .detail-tab[aria-pressed=true] img{filter:drop-shadow(0 0 3px #ffd778)}
#heroDetails .detail-tab:focus-visible{outline:2px dashed #ffe19a;outline-offset:-2px}
@media(orientation:landscape) and (max-height:450px){#heroDetails .detail-tab{height:clamp(47px,15dvh,62px)}}
#recipeBook .recipe-empty{color:#5b4021;grid-column:1/-1}
#heroDetails .detail-tab::before,#heroDetails .detail-tab::after{display:none!important}
/* Facility pages use the whole viewport, not a floating website-style modal. */
#facilityPanel,#plazaInventory,#facilityShop{position:fixed;inset:0;margin:0;box-sizing:border-box;width:100vw;height:100dvh;max-width:none;max-height:none;padding:clamp(6px,1.7vmin,18px);border-width:clamp(9px,2vmin,22px);overflow:auto;overscroll-behavior:contain}
#facilityShop[open],#plazaInventory[open],#facilityPanel[open]{display:flex;flex-direction:column;gap:clamp(4px,1.3vmin,12px)}
#facilityShop .shop-grid{flex:1;align-content:center;align-items:center;gap:clamp(8px,2vw,30px);width:min(100%,1500px);margin:auto}
#facilityShop .shop-card{font-size:clamp(12px,2.2vmin,22px);gap:clamp(4px,1vmin,10px)}
#facilityShop img{height:clamp(64px,35dvh,320px)}
#plazaInventory .inventory-grid{min-height:0;align-content:start;overflow:auto}
#facilityPanel .facility-content{flex:1;min-height:0;grid-template-columns:minmax(100px,38%) minmax(0,1fr);align-items:center}
#facilityPanel .facility-content img.facility-product{max-height:clamp(80px,35dvh,300px)}
#facilityPanel .recipe-choices{flex-shrink:0}
#facilityPanel .facility-actions{flex-shrink:0}
@media(max-height:360px){#facilityShop .shop-card{font-size:11px}#facilityShop img{height:29dvh}#facilityPanel .facility-content{flex:0 0 auto}}
