/* Tournament folios: warm writing surfaces against the living world. */
:root{--keeper-ink:#eee4cb;--keeper-muted:#b9c2b1;--keeper-rule:#b89c6559;--keeper-panel:linear-gradient(125deg,#21252df5,#11141af5)}
.modal-backdrop{background:#080b12a8;backdrop-filter:blur(5px)}
.modal.frame{border:1px solid var(--keeper-rule);border-radius:4px;background:var(--keeper-panel);color:var(--keeper-ink);box-shadow:0 24px 90px #0009,inset 0 0 0 5px #c8ac6910;padding:clamp(24px,2.2vw,70px);max-height:88dvh;scrollbar-color:#a08a59 #161921;scrollbar-width:thin}
.modal.frame>h2{padding:0 46px 18px 0;margin-top:0;border-bottom:1px solid var(--keeper-rule);font-size:clamp(24px,1.7vw,52px)}
.modal.frame>.keeper-document-label{margin:0 0 8px;color:#c9af78;font-size:clamp(10px,.65vw,20px);letter-spacing:.2em;text-transform:uppercase}
.modal.frame .modal-close{position:absolute;top:16px;right:16px;min-width:40px;min-height:40px}
.modal.frame .modal-footer{border-top:1px solid var(--keeper-rule);padding-top:18px;display:flex;gap:12px;flex-wrap:wrap}
.modal.frame:is([data-document="duel-review"],[data-document="help"]){width:min(62rem,92vw);max-width:62rem}
.review-turns{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1rem 0}
.review-page{min-height:15rem;padding:1rem 0}
.review-action-page{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}
.review-action-page .history-beat{margin:0;padding:1rem;border:1px solid var(--keeper-rule);background:#141822}
.review-action-page .history-beat h3{margin:0 0 .5rem;font-size:1.1rem;color:#ecd7a9}
.review-page-count{margin:auto;text-align:center;color:var(--keeper-muted);font-size:.85rem}
.modal.frame[data-document="unlocks"]{width:min(64rem,94vw);max-width:64rem}
.collection-paged{padding:0}
.collection-tabs,.collection-pagination{display:flex;align-items:center;gap:.6rem;justify-content:space-between}
.collection-tabs{margin:1rem 0}.collection-tabs button{flex:1;font-size:.85rem;padding:.6rem}
.collection-tabs button[aria-pressed="true"]{background:#736342;color:#fff0cc;border-color:#d4b679}
.collection-paged .unlock-catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.collection-paged .collection-portrait{height:6rem!important}
.collection-paged .collection-item{padding:.5rem}
.collection-paged .collection-item strong{font-size:.9rem}
.collection-paged .collection-catalog-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem}
.collection-paged .collection-catalog-heading p{font-size:.75rem;max-width:24rem}
.collection-pagination{margin-top:1rem;font-size:.85rem}
.modal.frame :is(p,small){line-height:1.55}
.modal.frame .muted{color:var(--keeper-muted)}
.modal.frame :is(input:not([type=checkbox]):not([type=range]),select){background:#0a0d14;color:var(--keeper-ink);border:1px solid #81858f;padding:10px;border-radius:3px}
.modal.frame .settings-row{padding:18px 0;border-bottom:1px solid #b89c6529;gap:24px}
.modal.frame .settings-row small{max-width:48em;color:var(--keeper-muted)}
.modal.frame .guide-step{padding:20px;border-left:2px solid #b89c65;background:#ffffff04}
.modal.frame :is(.pet-deck-card,.collection-item){border-color:var(--keeper-rule);border-radius:3px;background:#121620}
.modal.frame .pet-deck-card strong{color:#efd8a2}
.modal.frame .pet-deck-card p{color:var(--keeper-ink)}
.modal.frame.folio :is(h2,h3,h4,.pet-detail-head p,.eyebrow,.gold,.deck-ledger-note){color:var(--keeper-ink)}
.modal.frame.folio .modal-close{color:var(--keeper-ink);background:#282d39}
.modal.frame.folio .pet-detail-head>.art-img{width:5rem;height:5rem;flex-basis:5rem}
.modal.frame .pet-move-art{height:5rem!important;min-height:5rem;background-size:cover}
.modal.frame.folio .pet-deck-card .gold{color:#e5c58a}
.modal.frame.folio :is(p,small,.step-number){color:var(--keeper-ink)}
.modal.frame.folio .modal-footer button{color:var(--keeper-ink);background:#282e3b;border-color:var(--keeper-rule)}
.modal.frame.folio .modal-footer button.primary{color:#262b36;background:#ead09b}
.screen.camp .pet-description-preview{font-size:.85rem}
.screen.camp .pet-description-preview :is(strong,p){font-size:inherit}
.screen.camp .fusion-source small,.screen.camp .pedestal-label,.screen.camp .fusion-placement-hint{font-size:.75rem}
.screen.camp .fusion-pedestal strong{font-size:1rem}
.screen.camp .fusion-source .art-img{width:5rem;height:4rem}
.screen.camp .fusion-result{background:var(--keeper-panel);border:1px solid var(--keeper-rule)}
.screen.camp .recruit-offers .pet-tile{background:var(--keeper-panel)}
.screen.camp .recruit-offers .pet-tile :is(p,.tiny){font-size:.85rem;line-height:1.5}
.screen.camp .recruit-offers .pet-tile>.art-img{width:7rem;height:7rem}
.modal.frame :is(.profile-account-form,.profile-account){max-width:100%}
.modal.frame .collection-catalog h3{border-bottom:1px solid var(--keeper-rule);padding-bottom:12px;margin-top:32px}
.modal.frame .collection-item.locked{opacity:.65}
.modal.frame .profile-collection{max-width:72rem}
.modal.frame .collection-heading p:last-child,.modal.frame .collection-item small,.modal.frame .collection-guest{font-size:.75rem}
.modal.frame .collection-item strong{font-size:.85rem}
.modal.frame .standard-booster-stage{padding:.5rem 0 1rem;gap:2rem}
.modal.frame .unlock-pack.standard-booster{width:10rem;flex-basis:10rem;min-height:0}
.modal.frame .standard-booster .booster-wrapper{width:7rem;height:12rem}
.modal.frame .standard-booster .pack-name{font-size:1rem}
.modal.frame .standard-booster .pack-action{font-size:.75rem}
.modal.frame .booster-promise strong{font-size:1.25rem}
.modal.frame .company-record-body{scrollbar-color:#a08a59 #161921}
.screen.camp .camp-nav{background:linear-gradient(90deg,#151922f5,#151922db);border-bottom:1px solid var(--keeper-rule)}
.screen.camp .camp-tabs button{border-radius:2px;border:1px solid transparent;padding:12px 18px;color:#c9d0bd}
.screen.camp .camp-tabs button.active{background:#d4bc8220;border-color:#d4bc8280;color:#ffe2a3;box-shadow:inset 0 -2px #d4bc82}
.camp-step-state{display:block;font-size:.75em;letter-spacing:.06em;margin-top:5px;color:#aaafb9}
.camp-content :is(.frame,.engine-offer,.pet-reward-choice){border-color:var(--keeper-rule);border-radius:3px}
.camp-content :is(.draft-aside .frame,.draft-wait,.deck-column,.development-main,.pet-reward-choice){background:var(--keeper-panel);box-shadow:0 12px 36px #0003}
.screen.camp .camp-footer{background:#11151df5;border-top:1px solid var(--keeper-rule);gap:20px}
.camp-footer p{color:var(--keeper-ink);line-height:1.45}
.draft-main>.quiet{margin-bottom:20px}
.engine-offer>small{display:block;color:#ddc88f;letter-spacing:.04em;padding:8px 0}
.engine-offer>p{color:#d1d8c8;line-height:1.5;padding:0 8px}
.screen.camp{height:calc(100dvh - 6rem);min-height:0}
.screen.camp .camp-nav{padding:1rem 1.2rem .4rem;flex-shrink:0}
.screen.camp .camp-nav h2{font-size:1.65rem;margin:0}
.screen.camp .camp-context{margin:.4rem 0;padding:.4rem 0}
.screen.camp .camp-tabs{margin-top:.4rem}
.screen.camp .camp-content{min-height:0;scrollbar-color:#a08a59 #161921}
.screen.camp .draft-layout{grid-template-columns:1fr;gap:.6rem;align-content:start}
.screen.camp .draft-aside .frame{display:flex;align-items:center;gap:1rem;padding:.65rem 1rem}
.screen.camp .draft-picks{margin:0}
.screen.camp .draft-main{justify-content:flex-start}
.screen.camp .draft-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:1.1rem;padding:1rem}
.screen.camp .engine-offer{padding:.6rem;background:#151923eb;border:1px solid var(--keeper-rule)}
.screen.camp .engine-offer>small{min-height:2.6em;text-align:center;font-size:.75rem}
.screen.camp .draft-cards .game-card{width:100%;max-width:14rem;height:22rem;min-height:22rem;margin:0;transform:none}
.screen.camp .draft-cards .card-title{font-size:1rem}
.screen.camp .draft-cards .card-rules{font-size:.88rem;min-height:6rem}
.screen.camp .draft-cards .card-art{min-height:8rem}
.screen.camp .draft-cards .game-card:hover{transform:translateY(-4px)}
@media(max-width:1400px){.screen.camp .draft-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
.deck-column>.section-heading{border-bottom:1px solid var(--keeper-rule);padding-bottom:15px}
.deck-column .card-row{padding:12px 8px;border-bottom:1px solid #b89c652b;background:transparent}
.deck-column .card-row-main small{color:#d2d8c9;line-height:1.5}
.deck-column .deck-row-meta{color:#bfae83}
.deck-column .empty-state{padding:35px;text-align:center;color:var(--keeper-muted);border:1px dashed var(--keeper-rule)}
.pet-reward-choice{padding:24px!important;transition:border-color .15s,background .15s}
.pet-reward-choice:hover{border-color:#e7ce90;background:#262b37}
.pet-reward-choice p{max-width:30em;margin-inline:auto;line-height:1.55}
.screen.round-result.frame,.screen.tournament-results{background:var(--keeper-panel);border:1px solid var(--keeper-rule);border-radius:4px;box-shadow:0 18px 65px #0007}
.results-heading{border-bottom:1px solid var(--keeper-rule);padding-bottom:20px}
.results-actions{border-top:1px solid var(--keeper-rule);padding-top:20px;gap:12px}
/* A record should fit its contents, rather than stretch into an empty wall. */
#app:has(>.tournament-results){align-items:center;padding-block:5rem 2rem}
.screen.tournament-results{height:auto;max-height:calc(100dvh - 7rem);align-self:center;grid-template-rows:auto minmax(0,1fr) auto}
.tournament-results .results-record{scrollbar-color:#a08a59 #161921}
.tournament-results .exchange-review summary{color:#e5cc96;font-size:.9rem;line-height:1.5;padding:.4rem 0;cursor:pointer}
.tournament-results .exchange-review summary:focus-visible{outline:2px solid #ffe0a0;outline-offset:3px}
.tournament-results .exchange-review>p.tiny{font-size:.8rem;line-height:1.5;padding:.3rem 0;margin:0;border-bottom:1px solid #bda37520}
.tournament-results .recap-roster small{font-size:.75rem;line-height:1.4;color:#cbd2c3}
.tournament-results .recap-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:1rem}
.tournament-results .recap-roster>div{max-width:none;display:grid;justify-items:center;gap:.4rem;text-align:center}
.tournament-results .recap-roster .art-img{width:7rem;height:7rem;background-size:contain;background-repeat:no-repeat;background-position:center}
.tournament-results .recap-roster strong{color:var(--keeper-ink)}
@media(max-height:800px){#app:has(>.tournament-results){padding-block:4rem 1rem}.screen.tournament-results{max-height:calc(100dvh - 5rem)}}
.screen.tournament-results{color:var(--keeper-ink)}
.screen.tournament-results :is(h2,h3,p,small,th,td,.rank,.score,.eyebrow,.winner-names),.modal.frame.company-record :is(h2,h3,p,small,strong,li,summary,td,.rank,.score,.causal-facts){color:var(--keeper-ink)}
.screen.tournament-results .standings-table tr.you,.modal.frame.company-record .standings-table tr.you{color:var(--keeper-ink);background:#d9bd7620}
.screen.tournament-results button,.modal.frame.company-record button{color:var(--keeper-ink);background:#282e3b;border-color:var(--keeper-rule)}
.screen.tournament-results button.primary,.modal.frame.company-record button.primary{background:#ead09b;color:#262b36}
.modal.frame.company-record .growth-build-list>.frame{background:#121723;color:var(--keeper-ink)}
.recap-roster>div{background:#ffffff05;border-bottom:2px solid #ad965b;padding:16px}
.battlefield-deployment .deployment-tray{background:linear-gradient(0deg,#11151ff5,#151a25ea);border-top:1px solid var(--keeper-rule)}
.deployment-foe-tray{background:#131720da;border:1px solid var(--keeper-rule);border-radius:3px}
#tactic-choice button{display:inline-flex;align-items:center;gap:.35rem;font-size:.8rem;min-height:2rem;padding:.25rem .5rem;border-left:1px solid var(--keeper-rule);border-radius:0}
@media(min-width:1000px){
 .battlefield-deployment{inset:4rem 0 0!important}
 .battlefield-deployment h2{font-size:1.5rem;margin:.5rem 0}
 .battlefield-deployment .deployment-tray{min-width:28rem;max-width:44vw;padding:.75rem 1rem;bottom:1rem;left:auto;right:1.5rem;transform:none}
 .deployment-preview{height:6rem!important}
 .deployment-foe-tray{top:1rem;right:1.5rem;padding:.5rem .75rem}
 .deployment-foe-tray>small{font-size:.8rem}
 .deployment-sprite small,.deployment-sprite .deployment-max-hp,.deployment-count{font-size:.75rem}
 .deployment-foe-tray .deployment-sprite>span{font-size:.85rem}
 .deployment-sprite .deployment-fatigue b{font-size:.7rem}
 .deployment-sprite .deployment-fatigue small{font-size:.65rem}
 .deployment-tray .pet-description-preview{height:auto;min-height:3rem;max-width:28rem;padding:.5rem .75rem}
 .deployment-tray .pet-description-preview strong{font-size:.9rem}
 .deployment-tray .pet-description-preview p{font-size:.8rem;line-height:1.4;margin:.3rem 0}
 .deployment-slot-label{font-size:.8rem;padding:.25rem .6rem}
 .deployment-plus{font-size:1.5rem;line-height:2rem;width:2rem;margin-bottom:.5rem}
 .deployment-tray .deploy-lock{gap:.75rem;flex-wrap:wrap}
}
.deployment-slot:focus-visible,.fusion-source:focus-visible,.starter-source:focus-visible{outline:3px solid #ffe0a0;outline-offset:4px}
.starter-confirm,.roster-confirm{border-top:1px solid var(--keeper-rule);background:#131720ea}
.starter-screen .starter-source-bank{scrollbar-color:#a08a59 #161921}
.starter-screen .pet-description-preview{font-size:.85rem;min-height:0}
.starter-screen .pet-description-preview :is(strong,p){font-size:inherit}
.starter-screen .starter-slot :is(strong,small){font-size:.85rem}
.starter-screen .starter-empty{font-size:1.75rem}
.starter-screen .starter-package strong{font-size:.9rem}
.starter-screen .starter-package span{font-size:.8rem;line-height:1.5}
.starter-screen .starter-remove{width:1.6rem;height:1.6rem;font-size:1rem}
.fusion-placement-hint{color:#d0d8c3;line-height:1.5}
.fusion-result .fusion-result-header{border-bottom:1px solid var(--keeper-rule);padding-bottom:18px}
.development-main .pet-actions{display:flex;gap:.5rem;border-bottom:1px solid var(--keeper-rule);padding-bottom:.65rem}
.development-main .pet-actions button.active{color:#ffe0a0;border-color:#d0b47a;background:#d0b47a16}
.growth-node-detail,.growth-build,.fusion-losses{border:1px solid var(--keeper-rule);border-radius:3px!important;padding:1rem}
/* Keep the selected branch beside its tree, above the secondary move ledger. */
@media(min-width:1200px){
 body.mutation-world-active .growth-body-column{width:100%}
 body.mutation-world-active .growth-build{padding:.5rem .75rem}
 body.mutation-world-active .growth-build p{margin:.3rem 0}
 body.mutation-world-active .growth-tree-column{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:0 .75rem;width:100%;align-items:start}
 body.mutation-world-active .growth-part-heading,
 body.mutation-world-active .growth-choice-help{grid-column:1/-1}
 body.mutation-world-active .growth-node-detail{margin-top:0;padding:.75rem;position:sticky;top:.5rem}
 body.mutation-world-active .growth-node-detail p{min-height:0;font-size:.85rem;line-height:1.45}
 body.mutation-world-active .growth-node{min-height:3rem;padding:.4rem!important}
 body.mutation-world-active .growth-node strong{max-width:none;font-size:.8rem}
 body.mutation-world-active .growth-develop{font-size:.9rem!important;min-height:2.5rem;padding:.55rem .8rem!important}
 body.mutation-world-active .growth-stage{flex-wrap:wrap}
 body.mutation-world-active .growth-stage small{font-size:.65rem}
 body.mutation-world-active .growth-tier{padding:.5rem;margin-bottom:.5rem}
 body.mutation-world-active .growth-move-preview{width:100%}
}
.inheritance-option.selected{outline:2px solid #d9c08a;outline-offset:2px}
.recruit-offers .pet-tile{background:var(--keeper-panel);border:1px solid var(--keeper-rule);border-radius:3px}
.modal.frame :is(.engine-move-options button,.engine-challenges article){background:#0f141f;border:1px solid var(--keeper-rule);border-radius:3px;padding:1rem}
.modal.frame .engine-challenges .catalyst-earned{display:block;margin-top:.4em;font-style:italic;font-size:.85em;opacity:.75}
.modal.frame .direction-cost{display:block;margin-top:1rem;color:#efd394;border-top:1px solid var(--keeper-rule);padding-top:.5rem}
.modal.frame .direction-options button{display:flex;flex-direction:column;align-items:stretch;text-align:left}
.modal.frame .direction-options button>p{flex:1}
.modal.frame .direction-options button>.direction-cost{margin-top:1rem}
.modal.frame .standings-table th{color:#bca775;font-size:.8em;letter-spacing:.08em;text-transform:uppercase}
.modal.frame .standings-table td{padding:.8rem}
.modal.frame .standings-table tr.you{background:#dbbb7220;border-left:3px solid #d9be7e}
.connection-note{background:#181d27f5!important;border:1px solid #cfac6f!important;color:#f3e1bb!important;box-shadow:0 8px 24px #0006;border-radius:3px!important}
.modal[data-document="account"]>.profile-account{padding-top:.5rem}
.modal.frame[data-document="account"]{max-height:calc(100dvh - 4rem);scroll-padding-block:1rem}
.modal.frame[data-document="pack-reveal"]{width:min(56rem,92vw);max-width:56rem}
.standard-pack-reveal .pack-reward-art{height:12rem!important}
.standard-pack-reveal :is(.pack-reward>small,.pack-reward>span,.pack-reveal-note){font-size:.8rem;line-height:1.4}
.modal[data-document="account"]>.profile-account>.profile-kicker{display:none}
.modal[data-document="account"]>.profile-account h2{font-size:1.5rem;margin:.5rem 0 1rem}
.profile-account :is(.profile-field>span,.profile-account-tabs button,.profile-account-form button,.profile-recover-link){font-size:.85rem}
.profile-account :is(.profile-account-form>small,.account-divider){font-size:.75rem;line-height:1.4}
.starter-meld-caption.frame{background:var(--keeper-panel);border:1px solid var(--keeper-rule);border-radius:3px}
@media(min-width:1000px){body:is(.mutation-world-active,.fusion-world-active) .screen.camp .camp-nav{padding:.65rem .8rem .25rem}body:is(.mutation-world-active,.fusion-world-active) .screen.camp .camp-context{font-size:.8rem}body:is(.mutation-world-active,.fusion-world-active) .screen.camp .camp-tabs button{padding:.5rem .65rem}body:is(.mutation-world-active,.fusion-world-active) .camp-step-state{font-size:.65rem}}
.modal.frame button:focus-visible,.screen.camp button:focus-visible{outline:3px solid #ffe0a0;outline-offset:3px}
@media(min-width:2200px){.modal.frame{font-size:clamp(18px,.85vw,30px)}.modal.frame .tiny{font-size:.8em}.modal.frame .settings-row{padding:24px 0}.camp-step-state{font-size:.8em}}
@media(max-width:900px){.modal.frame{max-height:90dvh;padding:22px 18px}.camp-tabs{flex-wrap:wrap}.screen.camp .camp-tabs button{padding:9px}.camp-step-state{font-size:11px}.modal.frame .settings-row{gap:12px}.screen.camp .camp-footer{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.pet-reward-choice{transition:none}}
/* An actual field-journal spread, rather than a framed dashboard. */
.modal.frame:is([data-document="duel-review"],[data-document="help"]){width:min(94vw,132vh);max-width:none;aspect-ratio:3/2;height:auto;max-height:92vh;padding:7% 7% 6%;border:0;border-radius:0;background:url('/art/ui/keeper-journal-spread-v1.png') center/100% 100% no-repeat;box-shadow:none;color:#302c20;overflow:hidden;display:flex;flex-direction:column}
.modal:is([data-document="duel-review"],[data-document="help"])>.keeper-document-label{display:none}
.modal.frame:is([data-document="duel-review"],[data-document="help"])>h2{font-style:italic;font-size:1.5rem;border:0;margin:0;padding:0;color:#37321f;max-width:42%}
.modal:is([data-document="duel-review"],[data-document="help"]) .review-turns{margin:.4rem 0 .5rem;font-size:.85rem}
.modal:is([data-document="duel-review"],[data-document="help"]) button{background:transparent!important;border:0!important;box-shadow:none!important;color:#483b24!important;font-family:Georgia,serif;font-style:italic;padding:.35rem .5rem;text-decoration:underline;text-underline-offset:.25em}
.modal:is([data-document="duel-review"],[data-document="help"]) button:disabled{opacity:.3}
.modal:is([data-document="duel-review"],[data-document="help"]) .modal-close{top:7%;right:6%;background:#392e20!important;color:#eedcba!important;border-radius:50%;min-width:2rem;min-height:2rem}
.modal:is([data-document="duel-review"],[data-document="help"]) .review-page{flex:1;min-height:0;padding:0}
.modal:is([data-document="duel-review"],[data-document="help"]) .review-action-page,.modal:is([data-document="duel-review"],[data-document="help"]) .review-summary{display:grid;grid-template-columns:1fr 1fr;gap:12%;height:100%;align-items:start}
.modal:is([data-document="duel-review"],[data-document="help"]) .history-beat{background:none;border:0;padding:0;margin:0}
.modal:is([data-document="duel-review"],[data-document="help"]) :is(h3,p,small,.review-page-count){color:#393321}
.modal:is([data-document="duel-review"],[data-document="help"]) .history-beat h3{font-family:Georgia,serif;font-size:1.05rem;font-style:italic;color:#392e20;margin:.4rem 0}
.modal:is([data-document="duel-review"],[data-document="help"]) .history-beat p{font-size:.8rem;line-height:1.35;margin:.3rem 0}
.modal:is([data-document="duel-review"],[data-document="help"]) .history-beat small{font-size:.7rem}
.modal:is([data-document="duel-review"],[data-document="help"]) .journal-move-art{display:block;width:100%;height:8rem;object-fit:cover;filter:sepia(.45) saturate(.65);mask-image:radial-gradient(ellipse,black 55%,transparent 76%);background-size:cover;background-position:center}
.modal:is([data-document="duel-review"],[data-document="help"]) .journal-end-mark{display:block;font-size:5rem;text-align:center;color:#655d3e}
.modal:is([data-document="duel-review"],[data-document="help"]) .modal-footer{border:0;padding:0;margin-top:.5rem;flex-wrap:nowrap;justify-content:space-between;font-size:.8rem}
.modal:is([data-document="duel-review"],[data-document="help"]) .causal-facts{border:0;padding-left:1rem;font-family:Georgia,serif;font-style:italic;font-size:.85rem;line-height:1.5}
.modal:is([data-document="duel-review"],[data-document="help"]) .journal-company{align-self:center;text-align:center;font-family:Georgia,serif;font-style:italic}
.modal:is([data-document="duel-review"],[data-document="help"]) .journal-pet-art{display:inline-block;width:45%;height:9rem;object-fit:contain;filter:sepia(.65) saturate(.55);background-size:contain;background-repeat:no-repeat;background-position:center}
@media(min-width:2200px){.modal.frame:is([data-document="duel-review"],[data-document="help"]){padding:5% 6% 5%}}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]){padding:7% 9% 8%}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]) .company-record-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:visible}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]) :is(h2,h3,p,small,strong,li){color:#382f20!important;text-shadow:none}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]) .review-page{flex:1}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]) .journal-move-art{width:100%!important;height:11rem!important;max-width:none!important;object-fit:cover;filter:sepia(.45) saturate(.65)!important;mask-image:radial-gradient(ellipse,black 45%,transparent 73%)!important}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]) .history-beat p{font-size:.95rem;line-height:1.4}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]) .history-beat h3{font-size:1.2rem}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"]) .history-beat small{font-size:.8rem}
.modal.frame.company-record:is([data-document="duel-review"],[data-document="help"])>h2{margin-left:2rem}
.modal:is([data-document="duel-review"],[data-document="help"]) .review-turns>strong{transform:translateX(7rem);font-family:Georgia,serif;font-style:italic}
.modal:is([data-document="duel-review"],[data-document="help"]) .review-page-count{transform:translateX(7rem)}
.modal:is([data-document="duel-review"],[data-document="help"]) .modal-footer{padding-bottom:1rem}
/* The catalog is an illustrated keeper's folio, with eight specimens per spread. */
.modal.frame[data-document="unlocks"]:has(.collection-catalog){width:min(94vw,136vh);max-width:none;aspect-ratio:3/2;max-height:94vh;background:url('/art/ui/keeper-journal-spread-v1.png') center/100% 100% no-repeat;border:0;box-shadow:none;padding:5% 8% 6%;color:#392f20}
.modal[data-document="unlocks"]:has(.collection-catalog)>.keeper-document-label{display:none}
.modal.frame[data-document="unlocks"]:has(.collection-catalog)>h2{font-family:Georgia,serif;font-style:italic;font-size:1.4rem;color:#392f20;border:0;margin:0;padding:0}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-tabs{gap:.4rem;margin:.5rem 0}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-tabs button{background:#e2d2ab;border:0;border-bottom:2px solid #9b885a;border-radius:0;color:#473920;font-family:Georgia,serif;font-size:.8rem;padding:.4rem}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-tabs button[aria-pressed="true"]{background:#5e382c;color:#f7e7c5}
.modal[data-document="unlocks"] .collection-paged .collection-item{background:none;border:0;box-shadow:none}
.modal[data-document="unlocks"]:has(.collection-catalog) :is(h3,strong,small,p,.collection-pagination){color:#3e3827}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-catalog-heading h3{margin:.3rem 0;font-size:1rem}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-catalog-heading p{margin:.3rem 0;font-style:italic}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-portrait{height:5.5rem!important;filter:sepia(.25) saturate(.75)}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-item.locked{opacity:.65}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-pagination{margin-top:.5rem}
.modal[data-document="unlocks"]:has(.collection-catalog) .collection-pagination button{background:none;border:0;color:#473920;text-decoration:underline;font-family:Georgia,serif;font-style:italic}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-item{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-portrait{height:8rem!important}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-item :is(strong,small){color:#3e3827!important}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .unlock-catalog-grid{column-gap:2rem}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-catalog-heading h3 span{color:#65573c}
.modal.frame[data-document="unlocks"]:has(.collection-catalog)>h2{margin-left:2rem}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-pagination>span{transform:translateX(6rem)}
.help-journal-spread{display:grid;grid-template-columns:1fr 1fr;gap:12%;flex:1;align-items:center;min-height:0}
.help-journal-spread figure{margin:0;text-align:center}
.modal .help-journal-spread .help-journal-art{width:100%!important;height:15rem!important;object-fit:cover;mask-image:radial-gradient(ellipse,black 45%,transparent 73%);filter:sepia(.4) saturate(.7);background-size:cover;background-position:center}
.help-journal-spread figcaption{font:italic .95rem/1.5 Georgia,serif;color:#54492e;margin-top:1rem}
.modal .help-journal-spread h3{font:italic 1.6rem/1.2 Georgia,serif;margin:.5rem 0 1rem}
.modal .help-journal-spread p{font-size:1rem;line-height:1.6}
.modal .help-journal-spread .help-chapter{font-size:.7rem;letter-spacing:.15em;text-transform:uppercase}
/* The forecourt is the selection surface; controls leave the creatures visible. */
.screen.shop-screen{position:fixed;inset:0;padding:0!important;max-width:none;width:100%;height:100%;background:none!important;border:0;box-shadow:none;pointer-events:none;overflow:hidden}
.shop-screen:before{display:none}.shop-heading{position:absolute;top:4rem;left:2rem;text-shadow:0 2px 6px #000}.shop-heading h2{margin:0;font-size:1.7rem}.shop-heading p{font-size:.85rem}
.shop-pet-target,.shop-screen .shop-vat-target{position:fixed;transform:translate(-50%,-50%);padding:0!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;pointer-events:auto;cursor:grab;touch-action:none;display:flex;align-items:end;justify-content:center;min-height:0;border-radius:40%}
.shop-world-targets button span{background:#171c29dd;border:1px solid #ad9c69;padding:.2rem .55rem;border-radius:3px;white-space:nowrap;font-size:.7rem}.shop-world-targets button:hover,.shop-world-targets button:focus-visible,.shop-world-targets button.picked,.shop-world-targets button.drop-hover{border-color:#e5c987!important;background:#e6cd7130!important}.shop-world-targets button[hidden]{display:none}.shop-world-targets button:disabled{opacity:.55}
.shop-recipe{position:absolute;right:1.5rem;bottom:5.5rem;width:23rem;pointer-events:auto;padding:1rem;background:linear-gradient(130deg,#161c2aec,#252a35e8);border:1px solid #a59462;border-radius:4px}.shop-recipe h3{margin:.6rem 0}.shop-recipe p{font-size:.8rem;line-height:1.4}.shop-recipe nav{display:flex;gap:.4rem;flex-wrap:wrap}.shop-recipe button{font-size:.75rem;padding:.4rem .6rem}.shop-recipe button[aria-pressed=true]{border-color:#edcc8b;background:#69613b}.shop-packages{display:grid;gap:.35rem;margin:.6rem 0}.shop-packages small{display:block;font-size:.7rem;line-height:1.3}.shop-commit{position:absolute;right:1.5rem;bottom:1.5rem;display:flex;align-items:center;gap:1rem;pointer-events:auto}.shop-commit span{font-size:.8rem;text-shadow:0 2px 4px black}
body:has(.shop-screen) .world-shade{background:none!important;opacity:.1!important}
.shop-recipe{top:5rem;bottom:auto}
.modal.frame.company-record[data-document="help"] .modal-footer button{background:#e8d8b6e8!important;border:1px solid #99876955!important;border-radius:3px;padding:.35rem .65rem;font-size:.9rem}
.modal[data-document="help"] .modal-footer button:first-child{transform:translateX(1rem)}
.modal[data-document="help"] .modal-footer button:nth-child(2){transform:translateX(-6rem)}
.modal[data-document="help"] .modal-footer button:last-child{transform:translateX(-3rem)}

/* Focused growth pages separate the move ledger from the upgrade decision. */
.growth-view-tabs{display:flex;gap:.5rem;margin:.4rem 0 .7rem;border-bottom:1px solid var(--keeper-rule);padding-bottom:.5rem}
.growth-view-tabs button{padding:.45rem .9rem}
.growth-view-tabs button[aria-pressed="true"]{color:#ffe0a0;border-color:#d0b47a;background:#d0b47a20}
.creature-growth[data-growth-view="development"] .growth-move-preview,.creature-growth[data-growth-view="moves"] .growth-tree-column{display:none!important}
.growth-ledger-hint{font-size:.8rem;color:#d0d8c3}
.creature-growth[data-growth-view="moves"] .growth-move-preview{grid-column:2/-1;align-self:start}

/* The mutation bench uses the whole viewport, with the living specimen on the right. */
@media(min-width:1000px){
 body.mutation-world-active .screen.camp{width:100%;max-width:none;height:calc(100dvh - 6rem);background:transparent;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:.5rem;padding:0;overflow:visible}
 body.mutation-world-active .screen.camp>.camp-nav{display:flex;align-items:center;gap:1rem;padding:.4rem .75rem;background:#151921e8}
 body.mutation-world-active .camp-nav .section-heading{margin:0;flex-shrink:0}
 body.mutation-world-active .camp-nav h2{font-size:1.2rem}
 body.mutation-world-active .camp-nav .camp-context{display:none}
 body.mutation-world-active .camp-tabs{flex:1;margin:0;gap:.3rem}
 body.mutation-world-active .screen.camp>.camp-content{min-height:0;min-width:0;width:64%;height:100%!important}
 body.mutation-world-active .development-layout{display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:.4rem;height:100%!important}
 body.mutation-world-active .roster-rail{flex-direction:row;gap:.4rem}
 body.mutation-world-active .roster-mini{flex:1;min-height:2.6rem;padding:.25rem .5rem}
 body.mutation-world-active .roster-mini .art-img{width:2.5rem;height:2.5rem}
 body.mutation-world-active .roster-mini small{display:none}
 body.mutation-world-active .growth-development{padding:.6rem!important;min-height:0}
 body.mutation-world-active .growth-development>.pet-description-preview{position:fixed;right:2rem;bottom:6rem;width:29%;min-height:0;background:#151921de}
 body.mutation-world-active .growth-development>.pet-actions{margin:0;padding-bottom:.3rem}
 body.mutation-world-active .growth-heading{margin:0;padding:.3rem 0;align-items:center}
 body.mutation-world-active .growth-heading h3{font-size:1.2rem}
 body.mutation-world-active .growth-kicker{display:none}
 body.mutation-world-active .growth-wallet{gap:.25rem}
 body.mutation-world-active .growth-view-tabs{margin:0 0 .3rem;padding-bottom:.3rem}
 body.mutation-world-active .growth-workbench{gap:.3rem}
 body.mutation-world-active .growth-body-column{padding:0;border:0;background:none}
 body.mutation-world-active .growth-anatomy{padding:0;gap:.3rem}
 body.mutation-world-active .growth-build{position:fixed;right:2rem;top:12rem;width:29%;background:#151921de}
 body.mutation-world-active .growth-part-heading{margin:0}
 body.mutation-world-active .growth-choice-help{margin:.3rem 0;font-size:.75rem}
 body.mutation-world-active .growth-tier{padding:.25rem;margin-bottom:.25rem}
 body.mutation-world-active .growth-node{min-height:2.3rem}
 body.mutation-world-active .screen.camp>.camp-footer{margin:0;padding:.3rem .75rem;min-height:0;flex-wrap:nowrap;background:#151921e8}
 body.mutation-world-active .camp-footer p{margin:0}
}

@media(min-width:1000px){
 body.mutation-world-active .screen.camp>.camp-nav{flex-direction:row;flex-wrap:nowrap;margin:0}
 body.mutation-world-active .camp-nav .section-heading{width:auto;gap:.5rem}
 body.mutation-world-active .camp-nav .camp-tabs{width:auto}
 body.mutation-world-active .creature-growth{padding:.4rem}
 body.mutation-world-active .growth-heading{min-height:0}
 body.mutation-world-active .growth-wallet{padding:.25rem .5rem}
 body.mutation-world-active .growth-wallet strong{font-size:1.25rem}
 body.mutation-world-active .growth-tree-column{padding:.4rem;min-height:0}
 body.mutation-world-active .growth-stage{margin-bottom:.2rem}
 body.mutation-world-active .growth-node{min-height:2.3rem;padding:.2rem!important;display:grid;grid-template-columns:auto 1fr;gap:0 .25rem}
 body.mutation-world-active .growth-node strong{margin:0}
 body.mutation-world-active .growth-node small{grid-column:2}
 body.mutation-world-active .growth-part-heading{min-height:2rem}
}

@media(min-width:1000px){
 body.mutation-world-active .camp-tabs button{min-height:0;padding:.3rem .6rem!important}
 body.mutation-world-active .camp-tabs{min-height:0}
 body.mutation-world-active .development-layout:has(.growth-development) .roster-mini{min-height:2.6rem}
 body.mutation-world-active .creature-growth{display:grid;grid-template-columns:1fr auto;gap:.25rem}
 body.mutation-world-active .growth-heading{grid-column:1;gap:.5rem}
 body.mutation-world-active .growth-view-tabs{grid-column:2;grid-row:1;align-items:center;border:0}
 body.mutation-world-active .growth-workbench{grid-column:1/-1}
 body.mutation-world-active .growth-tree{display:grid;grid-template-columns:1fr 1fr;gap:.35rem;align-self:start}
 body.mutation-world-active .growth-tree-column{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
 body.mutation-world-active .growth-tier-nodes{grid-template-columns:1fr}
 body.mutation-world-active .growth-stage small{margin-left:0}
 body.mutation-world-active .growth-tier{margin:0}
 body.mutation-world-active .growth-node-detail p{margin:.4rem 0;line-height:1.35}
}

@media(min-width:1000px){
 body.mutation-world-active .screen.camp .camp-nav{padding:.25rem .75rem;min-height:0}
 body.mutation-world-active .camp-nav .section-heading h2{margin:0}
 body.mutation-world-active .camp-nav .camp-tabs{padding:0;border:0}
 body.mutation-world-active .camp-tabs button .camp-step-state{margin-top:.1rem}
 body.mutation-world-active .growth-node{min-height:2rem!important;height:2rem;font-size:.75rem}
 body.mutation-world-active .growth-node small{font-size:.6rem;line-height:1}
 body.mutation-world-active .growth-tier-nodes{gap:.2rem}
 body.mutation-world-active .growth-part-heading{min-height:0}
 body.mutation-world-active .growth-node-detail{padding:.5rem}
 body.mutation-world-active .growth-detail-title{min-height:0}
 body.mutation-world-active .growth-develop{margin-top:.3rem}
}

@media(min-width:1000px){
 body.mutation-world-active .growth-wallet{display:flex;flex-wrap:wrap;max-width:15rem;line-height:1.1}
 body.mutation-world-active .growth-wallet small{font-size:.65rem}
 body.mutation-world-active .growth-heading{padding:.15rem 0}
 body.mutation-world-active .pet-actions button{min-height:0;padding:.3rem .65rem}
 body.mutation-world-active .growth-part-heading>div{display:flex;align-items:baseline;gap:.5rem}
 body.mutation-world-active .growth-part-heading h4{margin:0}
 body.mutation-world-active .camp-nav .camp-tabs button{height:auto;min-height:0;line-height:1.2}
 body.mutation-world-active .camp-nav .camp-tabs .camp-step-state{line-height:1.2}
 body.mutation-world-active .camp-nav .section-heading button{padding:.3rem .65rem;min-height:0}
}

@media(min-width:1000px){
 body.mutation-world-active .screen.camp>.camp-footer{width:34%;justify-self:end;justify-content:flex-end;background:#151921db}
 body.mutation-world-active .camp-footer p{font-size:.7rem;max-width:12rem}
}

@media(min-width:1000px){
 body.mutation-world-active .growth-development{align-self:start;position:relative;background:linear-gradient(115deg,#2a2d34f5,#151921f5)!important;border:3px double #a28e607d!important;box-shadow:inset 0 0 0 3px #0b0d1280,0 8px 22px #0005!important;border-radius:3px!important}
 body.mutation-world-active .growth-development:before,body.mutation-world-active .growth-development:after{content:"";position:absolute;width:.35rem;height:.35rem;top:.25rem;border:1px solid #c7b175;border-radius:50%;background:#756443;box-shadow:inset 0 1px 1px #f4dfa855;pointer-events:none}
 body.mutation-world-active .growth-development:before{left:.25rem}
 body.mutation-world-active .growth-development:after{right:.25rem}
 body.mutation-world-active .growth-development .creature-growth{background:transparent;border:0}
 body.mutation-world-active .growth-tree-column,body.mutation-world-active .growth-move-preview{background:#0c10184d;border:0;border-top:1px solid #b5a16a55}
 body.mutation-world-active .growth-node-detail{border:0;border-left:1px solid #b5a16a66;background:#0c101847}
 body.mutation-world-active .growth-tier{background:transparent;border:0;border-left:1px solid #b5a16a55;border-radius:0}
 body.mutation-world-active .camp-nav .camp-context{display:flex;position:fixed;right:2rem;top:9rem;width:29%;margin:0;padding:.4rem .6rem;flex-direction:column;gap:.2rem;background:#151921de;border:1px solid #b5a16a44}
 body.mutation-world-active .camp-context>div:first-child{display:flex;flex-wrap:wrap;gap:.3rem;align-items:center}
 body.mutation-world-active .camp-context .eyebrow{font-size:.6rem}
 body.mutation-world-active .camp-context .button-row{margin:0}
 body.mutation-world-active .camp-context .button-row button{padding:.15rem .3rem;min-height:0;font-size:.65rem}
 body.mutation-world-active .camp-context .camp-progress{display:flex;flex-wrap:wrap;gap:.2rem}
 body.mutation-world-active .camp-context .pill{font-size:.6rem;padding:.1rem .2rem}
 body.mutation-world-active .growth-build{top:16rem}
}

.creature-growth:not([data-growth-view="development"]) .growth-tree-column,.creature-growth:not([data-growth-view="moves"]) .growth-move-preview{display:none!important}
@media(min-width:1000px){
 body.mutation-world-active .creature-growth:not([data-growth-view="build"]) .growth-build{display:none}
 body.mutation-world-active .creature-growth[data-growth-view="build"] .growth-build{position:static;width:100%;margin-top:.75rem;padding:.75rem;background:#0c101847}
 body.mutation-world-active .camp-nav .camp-context{top:6rem}
 body.mutation-world-active .growth-view-tabs button{padding:.4rem .6rem}
}

/* Tournament records turn pages instead of extending beyond the desktop. */
.screen.tournament-results{grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:.5rem;width:min(76rem,94vw)}
.tournament-results .results-record{overflow:visible;padding:.4rem 0;scrollbar-gutter:auto}
.results-tabs,.results-pager{display:flex;justify-content:center;align-items:center;gap:.65rem}
.results-tabs button{padding:.4rem .8rem}
.results-tabs button[aria-pressed="true"]{border-color:#e6ca87;background:#46543c}
.results-pager button{padding:.3rem .7rem}
.results-pager span{font-size:.8rem}
.results-history ol{list-style-type:decimal;padding-left:1.5rem;margin:.4rem 0}
.results-history li{padding:.5rem;border-bottom:1px solid #bca77833;line-height:1.35}
.tournament-results .results-record .company-recap{border:0;padding:0;margin:0}
@media(max-height:800px){.tournament-results .results-heading{padding-bottom:.3rem}.tournament-results .winner-names{margin:.25rem 0}.tournament-results .standings-table td{padding:.45rem}.tournament-results .recap-roster .art-img{width:5rem;height:5rem}.tournament-results .results-actions{padding-top:.4rem}}

.tournament-results .results-record.illustrated{display:grid;grid-template-columns:minmax(0,1fr) 15rem;gap:2rem;align-items:center}
.results-emblem{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.3rem;border-left:1px solid #c1a76c66;padding-left:1rem}
.results-emblem .results-keeper-art{width:11rem;height:13rem;object-fit:contain;image-rendering:auto;filter:drop-shadow(0 .4rem .4rem #0006)}
.results-emblem .eyebrow{font-size:.65rem;color:#d3bd86}
.results-emblem>strong{font-family:Georgia,serif;font-size:1.2rem}
.results-emblem>span:last-child{font-size:.8rem;color:#d1d8c8}
.screen.tournament-results{border:3px double #b8a16d99;background:linear-gradient(115deg,#272c37f2,#131824f2);box-shadow:inset 0 0 0 4px #0c101a66,0 18px 60px #0007;border-radius:3px}
@media(max-height:800px){.tournament-results .results-record.illustrated{grid-template-columns:minmax(0,1fr) 12rem;gap:1rem}.results-emblem .results-keeper-art{width:8rem;height:10rem}}
.tournament-results .results-emblem>strong{color:#ead8ae}

.direction-workbench{display:grid;grid-template-columns:11rem minmax(0,1fr);gap:1.5rem;align-items:start}
.direction-pets{display:flex;flex-direction:column;gap:.5rem;border-right:1px solid var(--keeper-rule);padding-right:1rem}
.direction-pets button{display:flex;align-items:center;gap:.6rem;text-align:left;padding:.4rem}
.direction-pets button[aria-pressed="true"]{border-color:#d8bd77;background:#44553a}
.direction-pets .direction-pet-art{width:3.5rem;height:3.5rem;object-fit:contain;background-size:contain;background-repeat:no-repeat;background-position:center;flex-shrink:0}
.direction-selected h3{margin:0 0 .3rem}
.direction-current{font-size:.85rem;color:#cbd7bc;margin:.3rem 0 .9rem}
.modal.frame:has(.direction-workbench){width:min(68rem,92vw);height:auto;max-height:calc(100dvh - 4rem)}
.modal.frame .direction-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.modal.frame .direction-options button{min-height:11rem}
@media(max-width:1050px){.direction-workbench{grid-template-columns:9rem minmax(0,1fr);gap:.75rem}.direction-pets .direction-pet-art{width:2.5rem;height:2.5rem}}
.modal.frame .direction-options button{display:grid;grid-template-columns:4.5rem minmax(0,1fr);grid-template-rows:auto 1fr auto auto;column-gap:.8rem;row-gap:.35rem;background:linear-gradient(115deg,#e7d9b0,#bda879);color:#272b33;border:3px double #988154;border-radius:2px;box-shadow:inset 0 0 22px #6b51252b,0 3px 8px #0004;text-align:left}
.direction-options .direction-move-art{grid-column:1;grid-row:1/4;width:4.5rem;height:6.5rem;object-fit:cover;border:1px solid #776843;filter:saturate(.8)}
.direction-options button>strong,.direction-options button>p,.direction-options button>small{grid-column:2;color:inherit;margin:0}
.modal.frame .direction-options button>.direction-cost{grid-column:1/-1;color:#363b45;border-top:1px solid #73664280;padding-top:.45rem}
.direction-move-art img{width:100%;height:100%;object-fit:cover}
.modal.frame .direction-options button:hover:not(:disabled){background:linear-gradient(115deg,#f4e7be,#d1bc86);border-color:#e1c678;box-shadow:0 0 0 2px #d8bd7740}
.modal.frame .direction-options button:focus-visible{outline:3px solid #f5db8a;outline-offset:4px}
.modal.frame .direction-options button:disabled{filter:saturate(.3);opacity:.6}
.modal.frame[data-document="deck"]{--keeper-ink:#352f20;--keeper-muted:#5b533e;--keeper-rule:#74633c66;width:min(70rem,94vw);max-height:calc(100dvh - 4rem)}
.modal.frame[data-document="deck"] .keeper-document-label{color:#675538}
.modal.frame[data-document="deck"] .pet-deck-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.modal.frame[data-document="deck"] .pet-deck-card{min-height:17rem;display:flex;flex-direction:column}
.modal.frame[data-document="deck"] .pet-deck-card .gold{color:#5c4827;margin-top:auto}
.modal.frame[data-document="deck"] .pet-move-art{height:7rem!important;min-height:7rem;object-fit:cover}
.modal.frame[data-document="deck"] .modal-footer button{color:#f1e3bf}
.modal.frame[data-document="deck"] .modal-close{color:#f1e3bf}
.deck-page-count{margin:auto;text-align:center;color:#54482e;font-size:.85rem}
.modal.frame[data-document="pet"]{--keeper-ink:#eee4cb;--keeper-muted:#b9c2b1;--keeper-rule:#b89c6559;width:min(70rem,94vw)}
.modal.frame[data-document="pet"] .keeper-document-label{color:#c9af78}
.modal.frame[data-document="pet"] .modal-close{color:#f1e3bf}
.pet-inspector-tabs{display:flex;gap:.5rem;margin:.6rem 0 1rem}
.pet-inspector-tabs button{flex:1;color:#eee4cb;background:#b7a27618;border:1px solid #89734d}
.pet-inspector-tabs button[aria-pressed="true"]{color:#f3e6c3;background:#333946}
.pet-record-pages>.lineage-preview,.pet-record-pages>.monster-anatomy,.pet-record-pages>.pet-deck-grid{display:none}
.pet-record-pages[data-view="overview"]>.monster-anatomy{display:block;height:15rem;margin:0 auto;width:min(100%,36rem)}
.pet-record-pages[data-view="lineage"]>.lineage-preview{display:block}
.pet-record-pages:not([data-view="overview"]):not([data-view="lineage"])>.pet-deck-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.pet-record-pages .pet-deck-card[hidden]{display:none}
.modal.frame[data-document="pet"] .pet-detail-head{margin:0 0 .8rem;min-height:0}
.modal.frame[data-document="pet"] .pet-detail-head p{margin:.2rem 0}
.modal.frame[data-document="pet"] .pet-deck-card .gold{color:#e5c58a}
.modal.frame[data-document="pet"] .pet-deck-card{min-height:13rem}
.modal.frame[data-document="pet"] .pet-inspector-tabs button{color:#eee4cb;border:1px solid #89734d}
.modal.frame[data-document="pet"] .pet-inspector-tabs button[aria-pressed="true"]{background:#526544;border-color:#d3b56f}
.modal.frame[data-document="pet"] .anatomy-label small{color:#655737}
.modal.frame[data-document="pet"] .pet-deck-card p{font-size:.95rem}
.settings-pages{display:flex;gap:.8rem;margin:1rem 0}
.settings-pages button{flex:1;border:1px solid #89734d;color:#eee4cb}
.settings-pages button[aria-pressed="true"]{background:#526544;border-color:#d3b56f}
.settings-page[hidden]{display:none}
.modal.frame[data-document="settings"]{width:min(52rem,92vw)}
.modal.frame[data-document="settings"] .settings-row{padding:1rem 0}
.modal.frame[data-document="settings"] select{width:12rem;flex-shrink:0}
.modal.frame[data-document="standings"]{width:min(60rem,94vw)}
.standings-round{color:#d1b778;font:italic 1rem Georgia,serif}
.standings-page-count{margin:auto;color:#d3c8af;font-size:.85rem}
.modal.frame[data-document="standings"] .standings-table{table-layout:fixed;width:100%}
.modal.frame[data-document="standings"] .standings-table th:first-child{width:4.5rem}
.modal.frame[data-document="standings"] .standings-table th:last-child{width:6rem}
.modal.frame[data-document="standings"] .standings-table td{overflow-wrap:anywhere;padding:.75rem .6rem}

.shop-placement-hint:empty{display:none}.shop-recipe .shop-placement-hint{color:#f3d899;border-left:2px solid #c5a860;padding-left:.65rem;font-weight:600}

/* A one-creature company needs a small preparation desk, not a full roster tray. */
@media(min-width:1000px){
 .battlefield-deployment .deployment-tray:has(.deployment-roster>.deployment-tray-pet:only-child){width:22rem;min-width:0;max-width:36vw;border-radius:3px;border:1px solid #a5946266!important;background:linear-gradient(135deg,#1e232fed,#121723ec)!important}
 .deployment-tray:has(.deployment-roster>.deployment-tray-pet:only-child) .deployment-roster{background:none!important;padding:0}
 .deployment-tray:has(.deployment-roster>.deployment-tray-pet:only-child) .pet-description-preview{margin:.5rem 0;max-width:none}
}

.initial-growth-roster[hidden]{display:none!important}.initial-growth-intro{margin:.45rem 0 .65rem!important;line-height:1.35}

@media(min-width:1000px) and (max-height:850px){
 body.mutation-world-active .modal:has(.initial-growth-intro){padding:1rem}
 body.mutation-world-active .modal .initial-growth-intro{font-size:.8rem;line-height:1.35!important;margin:.35rem 0!important}
 body.mutation-world-active .modal:has(.initial-growth-intro)>h2{padding-bottom:.5rem;margin-bottom:.4rem}
}

@media(min-width:1000px) and (max-height:850px){
 body.mutation-world-active .modal:has(.initial-growth-intro) .growth-tree-column{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}
 body.mutation-world-active .modal:has(.initial-growth-intro) .growth-node-detail{padding:.5rem}
}

body.mutation-world-active .modal>[data-action="skip-mutation-meld"]{position:fixed;right:1.5rem;bottom:1.5rem;z-index:20;background:#191e2be8;border:1px solid #b29a65;padding:.6rem 1rem}

/* Account access is a single desktop spread; all fields stay visible. */
@media(min-width:1000px){
 .modal.frame[data-document="account"]:has(.profile-account-form){width:min(56rem,calc(100vw - 5rem));max-width:56rem}
 .modal[data-document="account"] .profile-account:has(.profile-account-form){display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:.6rem 2rem;max-width:none;padding:.5rem 0;align-items:start}
 .profile-account:has(.profile-account-form)>h2{grid-column:1;grid-row:1;margin:0!important}
 .profile-account:has(.profile-account-form)>.profile-account-tabs{grid-column:1;grid-row:2;margin:.25rem 0}
 .profile-account:has(.profile-account-form)>.account-google{grid-column:1;grid-row:3}
 .profile-account:has(.profile-account-form)>.account-divider{grid-column:1;grid-row:4;margin:0}
 .profile-account:has(.profile-account-form)>.profile-account-note{grid-column:1;grid-row:5;margin:0;font-size:.85rem;line-height:1.45}
 .profile-account:has(.profile-account-form)>.profile-account-form{grid-column:2;grid-row:1/span 6;border-left:1px solid #ad965b55;padding-left:2rem}
 .profile-account:has(.profile-account-form)>.profile-recover-link{grid-column:2;grid-row:7;margin:0;justify-self:center}
 .profile-account:has(.profile-account-form)>.account-error{grid-column:1/-1;margin:0;font-size:.85rem}
 .profile-account-form .profile-field input{padding:.55rem!important}
 .profile-account-form{gap:.65rem}
}

@media(min-width:1000px){.modal.frame[data-document="account"]:has(.profile-account-form){height:auto;align-self:center}}

.booster-promise{display:flex;flex-direction:column;align-items:center;gap:.65rem}
.booster-promise .collection-ready{display:block}
@media(min-width:1000px) and (max-height:850px){.modal.frame .standard-booster-stage{padding:.25rem 0 0}}

/* Keep catalog captions and pagination on the paper, including short desktops. */
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-item.locked{opacity:1}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-item.locked .collection-portrait{opacity:.6}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-pagination>span{transform:none}
@media(min-width:1000px) and (max-height:850px){
 .modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-portrait{height:5.5rem!important}
 .modal.frame[data-document="unlocks"]:has(.collection-catalog) .unlock-catalog-grid{row-gap:.4rem;margin-block:.6rem}
}

.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-pagination>span{transform:translateX(4rem)}
.modal.frame[data-document="unlocks"]:has(.collection-catalog) .collection-pagination button{background:#ecdfbccc;border:1px solid #a18b5e44;border-radius:2px;padding:.25rem .65rem;text-decoration:none}
/* Connection status occupies the round-status strip, leaving the hand readable. */
.connection-note{top:.6rem;bottom:auto;display:flex;align-items:center;justify-content:center;gap:1rem;max-width:calc(100vw - 14rem);padding:.55rem 1rem;font-size:.85rem;line-height:1.4;text-align:center}
.connection-note button{flex:none;border:1px solid #c9ab6e88;padding:.35rem .7rem!important;color:#fff0cd;background:#3d424f}
body:has(.connection-note) #topbar .top-center{visibility:hidden}
/* Creature build records: one specimen and its five organ histories per page. */
.modal.frame[data-document="growth-notes"]{width:min(65rem,94vw);max-width:65rem}
.growth-record{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.3fr);gap:2rem;align-items:center}
.growth-record-creature{text-align:center;padding:1rem;border-right:1px solid var(--keeper-rule);background:radial-gradient(ellipse at 50% 42%,#80906b35,transparent 65%)}
.growth-record-creature .growth-record-portrait{width:100%;height:13rem;background-size:contain!important;background-position:center!important;background-repeat:no-repeat}
.growth-record-creature h3{margin:.4rem 0;font-size:1.5rem}
.growth-record-creature p{font-size:.8rem;margin:.5rem 0 1rem}
.growth-record-organs{margin:0;display:grid;gap:.65rem}
.growth-record-organs>div{padding:.45rem 0 .65rem;border-bottom:1px solid var(--keeper-rule)}
.growth-record-organs dt{display:flex;justify-content:space-between;gap:1rem;text-transform:capitalize;color:#ead4a1;font-family:Georgia,serif;font-size:1.1rem}
.growth-record-organs dt span{display:flex;gap:.3rem;align-items:center}
.growth-record-organs i{display:block;width:.45rem;height:.45rem;border:1px solid #9a9869;transform:rotate(45deg)}
.growth-record-organs i.filled{background:#e0c484;border-color:#f2d493}
.growth-record-organs dd{margin:.4rem 0 0;font-size:.85rem;line-height:1.4}
.growth-record-count{margin:auto}
/* Empty journal entries belong on one page, never across the binding. */
.modal.frame[data-document="duel-review"] .company-record-body>.empty-state{width:42%;margin:2rem 0 0 2rem;padding:1rem 0;text-align:left;font-family:Georgia,serif;font-style:italic;line-height:1.6}
/* Paper-backed journal navigation stays legible over the botanical border. */
.modal.frame[data-document="duel-review"] :is(.review-turns,.modal-footer) button{background:#ecdfbcdf!important;border:1px solid #a18b5e55!important;border-radius:2px;padding:.3rem .65rem;text-decoration:none;color:#393321}
.modal.frame[data-document="duel-review"] :is(.review-turns,.modal-footer) button:disabled{opacity:.5}
@media(min-width:1000px) and (max-height:850px){.modal.frame.company-record[data-document="duel-review"] .journal-move-art{height:8rem!important}.modal.frame.company-record[data-document="duel-review"] .history-beat p{font-size:.85rem;line-height:1.35}}
/* Reward folio: complete offers on each page, without a scrolling card wall. */
.reward-pages{display:flex;align-items:center;justify-content:center;gap:.8rem;font-size:.8rem;margin:.35rem 0}
.reward-pages button{padding:.35rem .7rem;min-height:0}
.reward-pages [data-action="skip-cards"]{margin-left:auto}
@media(min-width:1000px){
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .camp-nav{padding:.4rem .8rem}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .section-heading{margin:0}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .camp-context{margin:.3rem 0;padding:.2rem 0;font-size:.75rem}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .camp-tabs{margin:0;padding:0}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .camp-tabs button{padding:.4rem .8rem;min-height:0}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .camp-step-state{font-size:.65rem;margin-top:.15rem}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .tab-dot{display:none}
 .screen.camp .draft-aside .frame{padding:.3rem .75rem}
 .screen.camp .draft-cards{grid-template-columns:repeat(3,minmax(0,1fr));padding:.25rem .5rem;gap:1rem}
 .screen.camp .engine-offer{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;padding:.4rem .65rem}
 .screen.camp .engine-offer>small{min-height:0;padding:.2rem 0;font-size:.7rem;line-height:1.3}
 .screen.camp .engine-offer>p{font-size:.75rem;margin:.4rem 0 0;padding:0;line-height:1.35}
 .screen.camp .draft-cards .game-card{max-width:22rem;width:100%;height:17rem;min-height:17rem}
 .screen.camp .draft-cards .card-art{height:5rem;min-height:5rem;flex:none}
 .screen.camp .draft-cards .card-rules{font-size:.85rem;min-height:0;line-height:1.3}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .camp-footer{padding:.4rem .8rem}
 .screen.camp:has(.draft-layout,.pet-reward-grid,.recruit-offers,.deck-layout) .camp-footer p{margin:0;font-size:.75rem}
}
@media(min-width:1000px) and (max-height:850px){
 .screen.camp .draft-cards .game-card{height:13rem;min-height:13rem}
 .screen.camp .draft-cards .card-art{height:4rem;min-height:4rem}
 .screen.camp .draft-layout{gap:.2rem}
 .screen.camp .engine-offer>p{font-size:.7rem;line-height:1.25}
 .reward-pages{margin:0}
}
.screen.camp .draft-layout{min-height:0;height:auto}
@media(min-width:1000px){
 .pet-reward-heading{margin:0 0 .5rem}
 .pet-reward-heading h2{font-size:1.4rem;margin:.25rem 0}
 .pet-reward-choice.frame{padding:.75rem 1rem!important;gap:.35rem}
 .pet-reward-choice .art-img{height:9rem;min-height:0}
 .pet-reward-choice strong{font-size:1.3rem}
 .pet-reward-choice p{font-size:.85rem;line-height:1.35;margin:.35rem 0 0}
}
@media(min-width:1000px){
 .development-layout:has(.recruit-offers){display:block;min-height:0;height:auto}
 .development-layout:has(.recruit-offers)>.roster-rail{display:none}
 .development-main:has(.recruit-offers){padding:.5rem .75rem;display:grid;grid-template-columns:1fr auto;gap:.3rem .7rem}
 .development-main:has(.recruit-offers)>.pet-description-preview{display:none}
 .development-main:has(.recruit-offers)>.section-heading{margin:0}
 .development-main:has(.recruit-offers)>.development-goal{margin:0}
 .development-main:has(.recruit-offers)>:is(.pet-actions,.recruit-offers,p,.free-recruit-notice){grid-column:1/-1}
 .development-main:has(.recruit-offers)>.pet-actions{margin:0;padding:0 0 .25rem;gap:.5rem}
 .development-main:has(.recruit-offers)>.pet-actions button{padding:.3rem .65rem;min-height:0}
 .recruit-offers .pet-tile{padding:.5rem .75rem}
 .recruit-offers .pet-art{height:5rem;min-height:0}
 .recruit-offers .pet-tile h3{font-size:1.1rem;margin:.25rem 0}
 .recruit-offers .pet-description{font-size:.8rem;line-height:1.3;margin:.3rem 0}
 .recruit-offers .tile-actions button{padding:.3rem .65rem;min-height:0}
}
.deck-column-pages{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:.5rem;font-size:.75rem}
.deck-column-pages button{padding:.25rem .6rem;min-height:0}
@media(min-width:1000px){
 .screen.camp .deck-layout{height:auto;min-height:0;align-items:start;gap:.75rem}
 .screen.camp .deck-column{padding:.5rem .75rem;min-height:0}
 .screen.camp .deck-column>.section-heading{margin:0 0 .4rem;padding:0 0 .4rem}
 .screen.camp .deck-column h3{font-size:1.15rem;margin:0}
 .screen.camp .deck-sort{margin:0 0 .35rem}
 .screen.camp .deck-sort button{min-height:0;padding:.25rem .6rem}
 .screen.camp .card-row{padding:.35rem .5rem;min-height:4.4rem}
 .screen.camp .card-row-main small{font-size:.75rem;line-height:1.25}
 .screen.camp .card-row-main strong{font-size:.85rem}
 .screen.camp .deck-row-meta{font-size:.65rem}
}
.modal.frame[data-document="deck-compare"]{width:min(68rem,94vw);max-width:68rem}
.modal[data-document="deck-compare"] .comparison-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
.modal[data-document="deck-compare"] .card-row{background:#181d27;border:1px solid var(--keeper-rule);padding:.55rem;min-width:0}
.modal[data-document="deck-compare"] .card-row-main{min-width:0}
.modal[data-document="deck-compare"] .replacement-intro{margin-bottom:.75rem}
.modal[data-document="deck-compare"] .replacement-intro>.art-img{width:6rem;height:5rem;flex:none}
.modal[data-document="deck-compare"] .modal-footer{align-items:center;font-size:.8rem}
.comparison-count{margin:0 auto}
/* Keep card illustrations legible as desktop UI scales up to native 4K. */
@media(min-width:1000px){
 .screen.camp .deck-column .card-row>.art-img,
 .modal[data-document="deck-compare"] .card-row>.art-img{
  width:3.5rem;height:3.5rem;flex-shrink:0;border:1px solid #b89c6570;
  box-shadow:0 .15rem .4rem #0005;
 }
}
/* Card folios: leather binding around individual illustrated paper entries. */
.screen.camp .deck-column{
 background:linear-gradient(100deg,#332f24,#212329 12%,#181b23 88%,#332f24);
 border:1px solid #aa8b52;border-radius:.25rem;
 box-shadow:0 .4rem 1.2rem #0006,inset 0 0 0 .2rem #13161c,inset 0 0 0 .25rem #af905547;
}
.screen.camp .deck-column .card-row{
 background:linear-gradient(90deg,#e6d6b9e8,#eee0c7ed),url('/art/ui/notes-panel.webp') center/cover;
 color:#302b20;border:1px solid #b49b6b;border-radius:.12rem;
 box-shadow:0 .12rem .2rem #0004;
}
.screen.camp .deck-column .card-row-main :is(strong,small){color:#302b20}
.screen.camp .deck-column .deck-row-meta{color:#625133}
.screen.camp .deck-column .card-row>button{
 color:#eee2be;background:#2d323e;border:1px solid #4d5361;border-radius:.15rem;
}
.screen.camp .deck-column .card-row>button:disabled{opacity:.4}
.screen.camp .deck-column .card-row>button:not(:disabled):hover{background:#444a59;border-color:#af965d}
.screen.camp .deck-column .row-cost{color:#f2dfb0;background:#323847;border:1px solid #8c774d;border-radius:50%;width:1.25rem;height:1.25rem;display:grid;place-items:center;flex-shrink:0;font-size:.8rem;line-height:1}
/* Match the camp's bindings and comparison entries to its card folios. */
.screen.camp .camp-nav{
 background:linear-gradient(105deg,#302f24f5,#151a24f5 30%,#1d222cf5 80%,#3a3326f5);
 border:1px solid #aa8b5266;border-radius:.25rem;
 box-shadow:0 .3rem 1rem #0004,inset 0 0 0 .18rem #b49b6512;
}
.screen.camp .camp-tabs button.active{
 background:linear-gradient(#e7d3a8,#c7ad7a);color:#292d35;
 border-color:#dcc38d;box-shadow:inset 0 0 0 2px #4c483a35,0 .15rem .3rem #0004;
}
.screen.camp .camp-tabs button.active .camp-step-state{color:#46543e}
.modal.frame[data-document="deck-compare"]{
 background:linear-gradient(110deg,#373329,#181d27 24%,#181d27 76%,#373329);
 border-color:#aa8b52;box-shadow:0 1rem 3rem #0008,inset 0 0 0 .2rem #181b21,inset 0 0 0 .25rem #af905560;
}
.modal[data-document="deck-compare"] .card-row{
 background:linear-gradient(90deg,#e6d6b9e8,#eee0c7ed),url('/art/ui/notes-panel.webp') center/cover;
 color:#302b20;border-color:#b49b6b;box-shadow:0 .12rem .2rem #0004;
}
.modal[data-document="deck-compare"] .card-row-main :is(strong,small){color:#302b20}
.modal[data-document="deck-compare"] .deck-row-meta{color:#625133}
.modal[data-document="deck-compare"] .card-row>button{color:#eee2be;background:#2d323e;border:1px solid #4d5361}
.modal[data-document="deck-compare"] .card-row>button:not(:disabled):hover{background:#444a59;border-color:#af965d}
/* One active pet needs no selection rail; put the decision on its actions. */
.direction-workbench.single-pet{grid-template-columns:minmax(0,1fr)}
.direction-workbench.single-pet>.direction-pets{display:none}
.modal.frame:has(.direction-workbench.single-pet){width:min(56rem,92vw)}
.direction-options .direction-move-art{background-size:cover;background-position:center}
.direction-options .direction-move-art{background-size:cover!important}
.tournament-results .exhibition-choice .button-row>span{color:var(--keeper-ink);font-size:.85rem}

/* Consent remains legible while waiting for the other keepers. */
.tournament-results .exhibition-choice button:disabled{opacity:1;color:#e4d4af;background:#363b47;border-color:#8a805d;cursor:default}

/* Keep the recipe above the vessels, with choices beside the creature summary. */
@media(min-width:1000px){
 .shop-recipe{width:54vw;max-width:76rem;display:grid;grid-template-columns:1fr 1.15fr;column-gap:1.2rem;padding:.8rem 1rem}
 .shop-recipe>nav:first-child{grid-column:1/-1}
 .shop-recipe>h3{grid-column:1;margin:.4rem 0}
 .shop-recipe>p{grid-column:1;margin:.2rem 0}
 .shop-recipe>.shop-packages{grid-column:2;grid-row:2/6;margin:.4rem 0;align-content:start}
 .shop-recipe>nav:last-child{grid-column:1;margin-top:.5rem}
}
.deployment-placement-hint{margin:0 0 .6rem;color:#eed5a0;font-size:clamp(12px,.8rem,26px);line-height:1.35;text-align:center}
@media(min-width:901px){.deployment-placement-hint{position:fixed;top:15%;left:25%;width:45%;margin:0;text-shadow:0 2px 5px #000}}

/* Companion replacement is a visual roster decision, not a list of names. */
.replacement-ledger{display:grid;grid-template-columns:minmax(10rem,1fr) minmax(0,3fr);gap:1.2rem;align-items:center}
.replacement-arrival{text-align:center;padding:1rem;border-right:1px solid #a68d5855}
.replacement-arrival p{line-height:1.4;color:#d8cba9}
.replacement-roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}
.replacement-roster button{display:flex;flex-direction:column;align-items:center;gap:.3rem;min-width:0;padding:.7rem;background:linear-gradient(145deg,#353942,#1a1f29);border:1px solid #ac96666b;white-space:normal}
.replacement-roster button:hover,.replacement-roster button:focus-visible{border-color:#ecd29a;background:#393e4a}
.replacement-art{display:block;width:100%;height:clamp(65px,11vh,240px);object-fit:contain}
.replacement-roster strong{line-height:1.2;overflow-wrap:anywhere}
.replacement-roster span,.replacement-roster small{font-size:.75rem;color:#d5c8a9}
.replacement-roster span svg{width:1em;height:1em}
.replacement-roster small{color:#e2bba1}
@media(max-height:750px){.replacement-roster button{padding:.45rem}.replacement-arrival{padding:.5rem}.replacement-arrival p{font-size:.85rem}}

@media(min-width:901px) and (max-height:800px){
 body.mutation-world-active .growth-tier-nodes{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.mutation-world-active .growth-node{height:2.65rem;min-height:2.65rem!important;padding:.15rem;min-width:0}
 body.mutation-world-active .growth-node strong{white-space:normal;line-height:1.05;overflow-wrap:anywhere}
}

@media(min-width:901px){
 body.mutation-world-active .development-layout:has(.growth-development) .roster-mini{flex:1 0 11rem;min-width:0}
 body.mutation-world-active .development-layout:has(.growth-development) .roster-mini .mini-text{min-width:0;overflow-wrap:anywhere}
}

/* Short desktop windows retain the whole tree rather than clipping its last tier. */
@media(min-width:1000px) and (max-height:650px){
 body.mutation-world-active .camp-nav .camp-step-state{display:none}
 body.mutation-world-active .screen.camp>.camp-nav{min-height:2.8rem}
 body.mutation-world-active .development-layout:has(.growth-development) .roster-mini{padding:.15rem .35rem;min-height:2.6rem}
 body.mutation-world-active .growth-development{position:relative}
 body.mutation-world-active .growth-development>.pet-actions{position:absolute;left:.6rem;top:.6rem;z-index:1}
 body.mutation-world-active .growth-heading{padding-left:16rem}
 body.mutation-world-active .growth-heading>div:first-child{display:none}
 body.mutation-world-active .growth-wallet{max-width:none}
 body.mutation-world-active .growth-wallet small{font-size:.65rem}
 body.mutation-world-active .growth-part{min-height:2rem!important;padding:.2rem .5rem!important}
 body.mutation-world-active .growth-tree-column{padding:.2rem}
 body.mutation-world-active .growth-anatomy{min-height:0}
 body.mutation-world-active .growth-tier{padding:.15rem}
 body.mutation-world-active .growth-stage{min-height:0;line-height:1.1}
}

@media(min-width:1000px) and (max-height:650px){
 .screen.camp:has(.recruit-offers) .camp-nav{display:grid;grid-template-columns:auto 1fr;padding:.4rem .75rem;gap:.25rem .8rem}
 .screen.camp:has(.recruit-offers) .camp-nav>.section-heading{grid-column:1;margin:0}
 .screen.camp:has(.recruit-offers) .camp-tabs{grid-column:2;grid-row:1;margin:0;padding:0;border:0}
 .screen.camp:has(.recruit-offers) .camp-tabs button{padding:.35rem .6rem;min-height:0}
 .screen.camp:has(.recruit-offers) .camp-context{grid-column:1/-1;grid-row:2;margin:0;padding:.3rem .5rem}
 .screen.camp:has(.recruit-offers) .development-main{padding:.6rem}
 .screen.camp:has(.recruit-offers) .development-main>.section-heading{margin-bottom:.25rem}
 .screen.camp:has(.recruit-offers) .pet-actions{margin:.2rem 0;padding-bottom:.2rem}
 .screen.camp:has(.recruit-offers) .recruit-offers .pet-tile{padding:.6rem}
 .screen.camp:has(.recruit-offers) .recruit-offers .pet-tile>.art-img{width:4rem;height:4rem}
 .screen.camp:has(.recruit-offers) .recruit-offers .pet-tile h3{margin:.2rem 0}
 .screen.camp:has(.recruit-offers) .recruit-offers .pet-tile p{margin:.2rem 0;line-height:1.3}
}
@media(min-width:1000px) and (max-height:650px){
 .screen.camp:has(.recruit-offers) .pet-portrait-health{height:3rem;min-height:0}
 .screen.camp:has(.recruit-offers) .pet-portrait-health .art-img{width:3rem;height:3rem}
 .screen.camp:has(.recruit-offers) .development-main>p:last-child{margin:.35rem 0!important}
}

/* Keep the fusion selection controls beside the laboratory, inside the frame. */
@media(min-width:1000px){
 body.fusion-world-active .screen.camp{width:100%;max-width:none;height:calc(100dvh - 6rem);display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:.5rem;overflow:visible;background:none;padding:0}
 body.fusion-world-active .screen.camp>.camp-nav{display:flex;align-items:center;gap:1rem;padding:.35rem .75rem}
 body.fusion-world-active .camp-nav>.section-heading{margin:0;flex-shrink:0;width:auto}
 body.fusion-world-active .camp-nav h2{font-size:1.2rem}
 body.fusion-world-active .camp-nav .camp-context{display:none}
 body.fusion-world-active .camp-tabs{margin:0;padding:0;flex:1;border:0;width:auto}
 body.fusion-world-active .screen.camp>.camp-content{width:46%;height:100%!important;min-height:0;overflow:auto!important}
 body.fusion-world-active .development-main>.pet-description-preview,
 body.fusion-world-active .development-main>.section-heading:has(h3),
 body.fusion-world-active .development-goal{display:none}
 body.fusion-world-active .development-main>.pet-actions{margin:0;padding-bottom:.3rem}
 body.fusion-world-active .fusion-workbench>.pet-description-preview{display:none}
 body.fusion-world-active .fusion-roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem;margin:.4rem 0}
 body.fusion-world-active .fusion-source{width:100%;max-width:none;min-width:0;padding:.25rem}
 body.fusion-world-active .fusion-source .art-img{width:3.5rem;height:3rem}
 body.fusion-world-active .fusion-source strong{font-size:.8rem;white-space:normal;line-height:1.15}
 body.fusion-world-active .fusion-source small{font-size:.65rem}
 body.fusion-world-active .fusion-pedestal{min-height:3.3rem;padding:.35rem;gap:.25rem;border:1px solid #bda57366;background:#191e2a}
 body.fusion-world-active .fusion-pedestal strong{font-size:.85rem;white-space:normal}
 body.fusion-world-active .fusion-placement-hint{margin:.4rem 0}
 body.fusion-world-active .fusion-empty-preview{min-height:3rem}
 body.fusion-world-active .fusion-empty-preview p{max-width:none;padding:.4rem;margin:0}
 body.fusion-world-active .screen.camp>.camp-footer{width:52%;justify-self:end;margin:0;padding:.4rem .75rem;background:#151921de;min-height:0}
}

.fusion-flow-tabs{display:flex;gap:.4rem;margin:.4rem 0}
.fusion-flow-tabs button{flex:1;padding:.4rem;min-width:0}
.fusion-flow-tabs [aria-pressed="true"]{border-color:#edcc89;background:#d4bc8230;color:#ffe2a3}
.fusion-flow[data-fusion-panel="parents"] .fusion-result,
.fusion-flow:not([data-fusion-panel="parents"]) .fusion-workbench,
.fusion-flow[data-fusion-panel="parts"] .fusion-result>:not(.fusion-result-header):not(.inheritance-grid),
.fusion-flow[data-fusion-panel="review"] .inheritance-grid{display:none}
@media(min-width:1000px){
 body.fusion-world-active .screen.camp>.camp-nav{width:46%;box-sizing:border-box;display:block;padding:.3rem .75rem}
 body.fusion-world-active .camp-nav>.section-heading{display:flex;justify-content:space-between;min-height:0}
 body.fusion-world-active .camp-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.2rem}
 body.fusion-world-active .camp-tabs button{padding:.3rem!important;min-height:0;height:auto;font-size:.75rem}
 body.fusion-world-active .camp-step-state{font-size:.6rem}
 body.fusion-world-active .fusion-flow>.section-heading{margin:.3rem 0;min-height:0}
 body.fusion-world-active .fusion-flow>.section-heading button{padding:.3rem;min-height:0}
 body.fusion-world-active .fusion-flow .fusion-empty-preview{min-height:0}
 body.fusion-world-active .fusion-flow .fusion-empty-preview p{font-size:.75rem;padding:.2rem}
 body.fusion-world-active .fusion-flow .fusion-result{margin-top:.3rem;padding:.3rem}
 body.fusion-world-active .fusion-result-header h2{margin:.2rem 0;font-size:1.25rem}
 body.fusion-world-active .fusion-result-header p{margin:.2rem 0}
 body.fusion-world-active .inheritance-grid{display:grid;grid-template-columns:1fr 1fr;gap:.3rem}
 body.fusion-world-active .inheritance-option{display:grid;grid-template-columns:2rem 1fr;gap:0 .4rem;min-height:3rem;padding:.3rem;text-align:left}
 body.fusion-world-active .inheritance-option .art-img{width:2rem;height:2rem;grid-row:1/3}
 body.fusion-world-active .inheritance-option strong{font-size:.8rem}
 body.fusion-world-active .inheritance-option small{font-size:.65rem;grid-column:2}
}
@media(min-width:1000px){
 body.fusion-world-active .camp-nav>.section-heading h2{margin:0;font-size:1.2rem}
 body.fusion-world-active .camp-nav>.section-heading button{min-height:0;padding:.3rem}
 body.fusion-world-active .camp-tabs button{line-height:1.1}
 body.fusion-world-active .camp-tabs .camp-step-state{margin-top:.2rem;line-height:1.1}
 body.fusion-world-active .fusion-flow[data-fusion-panel="parts"] .fusion-result-header :is(.eyebrow,.muted,.fusion-size-note){display:none}
 body.fusion-world-active .fusion-result-header .pet-stats{margin:.3rem 0;padding:0}
 body.fusion-world-active .fusion-result-header{min-height:0;padding:0;margin:0}
 body.fusion-world-active .fusion-flow[data-fusion-panel="parts"] .inheritance-grid{margin-top:.3rem}
}
@media(min-width:1000px){
 body.fusion-world-active .screen.camp>.camp-content{grid-column:1;grid-row:2/4}
 body.fusion-world-active .screen.camp>.camp-footer{grid-column:1;grid-row:3;align-self:end}
}
.fusion-kept-parts{border-top:1px solid #bda57366;padding:.5rem 0}
.fusion-kept-parts p{margin:.25rem 0}
.fusion-change-page{background:linear-gradient(120deg,#282d39,#111621e8);border-left:3px solid #bda573;padding:1rem 1.4rem}
.fusion-change-page h3{color:#ebd397;margin:.3rem 0 1rem}
.fusion-change-page li{padding:.5rem 0;border-bottom:1px solid #bda57330;line-height:1.4}
@media(min-width:1000px){
 body.fusion-world-active .fusion-kept-parts,body.fusion-world-active .fusion-losses{font-size:.8rem;line-height:1.35;padding:.4rem 0;margin:.3rem 0}
 body.fusion-world-active .fusion-losses p{margin:.25rem 0}
 body.fusion-world-active .fusion-review-actions{display:grid;grid-template-columns:1fr 1fr;gap:.4rem;margin:.4rem 0}
 body.fusion-world-active .fusion-review-actions button{padding:.4rem;min-height:2.2rem;font-size:.8rem}
}
@media(min-width:1000px) and (max-height:650px){
 body.fusion-world-active .camp-nav .camp-step-state{display:none}
 body.fusion-world-active .camp-tabs button{padding:.2rem!important}
 body.fusion-world-active .development-main>.pet-actions button{min-height:0;padding:.25rem .5rem}
 body.fusion-world-active .development-main{padding:.4rem}
 body.fusion-world-active .fusion-flow[data-fusion-panel="review"]>.section-heading{display:none}
 body.fusion-world-active .fusion-flow-tabs{margin:.2rem 0}
 body.fusion-world-active .fusion-flow-tabs button{padding:.25rem;min-height:0}
 body.fusion-world-active .fusion-kept-parts,body.fusion-world-active .fusion-losses{padding:.2rem 0;margin:.2rem 0}
 body.fusion-world-active .fusion-result .fusion-result-header{padding-bottom:0}
}
@media(min-width:1000px) and (max-height:650px){
 body.fusion-world-active .fusion-size-note{min-height:0}
 body.fusion-world-active .fusion-review-actions button{min-height:1.8rem;padding:.25rem}
}

/* Preferences must remain legible over dense benches and combat HUDs. */
body .modal.frame[data-document="settings"]{background:linear-gradient(135deg,#272c37,#151923)!important;box-shadow:inset 0 0 0 1px #bda57333,0 18px 50px #0009}
@media(min-width:1000px) and (max-height:650px){
 body .modal.frame[data-document="settings"] .settings-row{padding:.7rem 0}
}
@media(min-width:1000px) and (max-height:650px){
 .modal.frame.company-record[data-document="help"]{width:min(94vw,141vh);height:94dvh;max-height:94dvh;aspect-ratio:auto;padding:2.6rem 4.4rem 3.7rem}
 .modal.frame.company-record[data-document="help"]>h2{font-size:1.25rem;margin-left:0}
 .modal[data-document="help"] .help-journal-spread{gap:10%;align-items:start}
 .modal[data-document="help"] .help-journal-spread .help-journal-art{height:10rem!important}
 .modal[data-document="help"] .help-journal-spread p{font-size:.9rem;line-height:1.4;margin:.4rem 0}
 .modal[data-document="help"] .help-journal-spread h3{font-size:1.3rem;margin:.35rem 0 .5rem}
 .modal[data-document="help"] .help-journal-spread figcaption{font-size:.8rem;margin:.3rem 0}
 .modal[data-document="help"] .modal-footer{padding:0;margin-top:.3rem}
 .modal[data-document="help"] .modal-footer button{transform:none!important}
}
/* a keeper not yet recruited (from the collection) */
.locked-keeper-preview{display:grid;grid-template-columns:8rem minmax(0,1fr);gap:1.5rem;align-items:center}
.locked-keeper-preview .locked-keeper-art{width:8rem;height:11rem;background-size:contain;background-position:center;background-repeat:no-repeat}
.locked-keeper-preview p{line-height:1.5}
