.x-room{height:100%;min-height:0;display:grid;grid-template-rows:33px minmax(0,1fr);gap:7px;padding:7px 12px;background:radial-gradient(ellipse at 25% 50%,#82906c,#3c5448);color:#f3e9c8;overflow:hidden}.x-room h1,.x-room h2,.x-room h3,.x-room p{margin:0}.x-room button,.x-modal button{min-height:40px;font-size:11px;padding:5px 9px}.x-heading,.x-heading>div{display:flex;align-items:center;gap:8px;min-width:0}.x-heading{justify-content:space-between}.x-heading>.icon,.x-heading>div>.icon{height:24px;width:24px;flex:none;color:#dcc281}.x-heading h1{font-size:19px;white-space:nowrap}.x-heading>div>span{font-size:11px;color:#d9ddbf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-heading>button{min-height:31px;font-size:10px;flex:none}
.x-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:12px;min-height:0}.x-route{display:grid;grid-template-rows:27px minmax(0,1fr) 62px;gap:5px;min-height:0}.x-route>header{display:flex;align-items:center;justify-content:space-between;gap:5px}.x-route>header>b{font-size:12px}.x-route>header>small{font-size:9px;color:#dce1bd}.x-road{position:relative;min-height:0;background:radial-gradient(ellipse at 60% 40%,#4f674c00,#273f3b77),repeating-linear-gradient(45deg,#66795511 0 3px,transparent 3px 24px),#6d7e59;border:1px solid #a0a67c;border-radius:7px;overflow:hidden}.x-path{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.x-path>path{stroke:#b3aa7e;stroke-width:12;fill:none;stroke-linejoin:round;stroke-linecap:round}.x-path>.x-path-edge{stroke:#8a8961;stroke-width:18}.x-road-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:6px;padding:6px}.x-road-grid>button{align-self:center;justify-self:center;min-width:0;width:calc(100% - 8px);max-width:113px;min-height:46px;padding:4px 6px;display:flex;gap:5px;background:#4f664c;border:2px solid #aab17c;color:#ede4bf;position:relative;box-shadow:0 3px 0 #263f3555}.x-road-grid>button:disabled{cursor:default;opacity:1}.x-stop{font-size:24px;line-height:1;min-width:25px;font-weight:800}.x-road-grid>button>span:last-child{display:flex;flex-direction:column;gap:3px;min-width:0;text-align:left}.x-road-grid b{font-size:10px;white-space:nowrap}.x-road-grid small{font-size:8px;line-height:1.1}.x-road-grid .unvisited{background:#51694d;color:#c1cdaa;border-color:#829570}.x-road-grid .unvisited .x-stop{color:#a7b58a}.x-road-grid .cleared{background:#bdc08a;color:#314c38;border-color:#ded3a0}.x-road-grid .defeated{background:#b98970;color:#4c342c;border-color:#e0b197}.x-road-grid .approaching{background:#e1c378;color:#334a36;border-color:#fae8aa;box-shadow:0 0 0 3px #f2d77a33}.x-road-grid .approaching .x-stop{animation:x-march 1.3s ease-in-out infinite}@keyframes x-march{50%{transform:translateX(3px)}}@media(prefers-reduced-motion:reduce){.x-road-grid .approaching .x-stop{animation:none}}
.x-crew-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;min-height:0}.x-crew-list>button{min-width:0;min-height:0;height:100%;justify-content:flex-start;gap:4px;padding:5px;background:#2e4b3d;border:1px solid #9ba47b;color:#eddfba}.x-crew-list>.fallen{background:#64534a;border-color:#ba8e75}.x-crew-list>.critical{border-color:#e0a678}.x-crew-list .portrait{height:38px;width:28px;flex:none}.x-crew-list .fallen .portrait{filter:grayscale(1);opacity:.55}.x-crew-list>button>span{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px;text-align:left}.x-crew-list b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-crew-list small{font-size:9px;white-space:nowrap}.x-hp{height:5px;display:block;border-radius:2px;background:#182e27;overflow:hidden}.x-hp>i{display:block;height:100%;background:#b7cd8b}.critical .x-hp>i{background:#e4ab76}.fallen .x-hp>i{background:#b48373}
.x-sheet{min-height:0;display:grid;grid-template-rows:51px 44px minmax(0,1fr) 44px 21px;gap:6px;padding:8px;border:2px solid #a3aa80;border-radius:8px;background:#eee4c7;color:#314a3c}.x-expedition-state,.x-expedition-state>div{display:flex;align-items:center;justify-content:space-between;gap:6px}.x-expedition-state>div{align-items:flex-start;flex-direction:column;gap:0}.x-expedition-state small{font-size:10px}.x-expedition-state b{font-size:26px;color:#69592f;line-height:1.1}.x-expedition-state>span{font-size:11px;text-align:right;display:flex;flex-direction:column;gap:3px}.x-expedition-state button{min-height:24px;font-size:10px;padding:2px 7px}.x-travel-note{font-size:11px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:4px 7px;background:#dce0bd;border-left:3px solid #91a270}.x-travel-note b{font-size:12px;line-height:1.2}.x-travel-note p{font-size:10px;line-height:1.3}.x-bag{min-height:0;display:flex;flex-direction:column;gap:5px}.x-bag>header{display:flex;align-items:center;justify-content:space-between;gap:5px;height:25px;flex:none}.x-bag>header>b{font-size:11px}.x-bag>header>button{min-height:25px;font-size:10px;padding:3px 7px}.x-bag>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;min-height:0;flex:1;align-content:center}.x-bag>div>span{display:flex;align-items:center;gap:4px;min-width:0;background:#dfddba;padding:2px 4px}.x-bag .item-art{width:24px;height:25px;flex:none}.x-bag b{font-size:10px}.x-bag strong{color:#745e32}.x-bag p{font-size:11px;grid-column:1/-1;color:#7a8268}.x-expedition-actions{display:flex;gap:6px;min-height:0}.x-expedition-actions>.primary{flex:1;background:#d8b96e;color:#2c4335;border:2px solid #efd59a;box-shadow:0 2px 0 #997f44}.x-expedition-actions>button{min-height:44px;flex:none}.x-footer-note{font-size:9px;line-height:1.2;align-self:center;color:#6a785d}
.x-plan .x-sheet{grid-template-rows:29px 43px minmax(0,1fr) 36px 44px 24px;gap:5px}.x-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.x-sheet-heading>b{font-size:12px}.x-sheet-heading>button{min-height:27px;padding:2px 7px;font-size:10px}.x-policy-tabs{display:flex;gap:4px;min-height:0}.x-policy-tabs>button{flex:1;min-width:0;min-height:0;padding:4px;font-size:11px;background:#d6dbb8}.x-policy-tabs>.selected{background:#ddbf78;color:#344b38;border:2px solid #a98c48}.x-plan-copy{display:flex;flex-direction:column;justify-content:center;gap:5px;min-height:0;background:#dfe0bd;padding:5px 7px}.x-plan-copy p{font-size:12px;line-height:1.3}.x-plan-copy small{font-size:10px;color:#6c7b60;line-height:1.25}.x-contract{display:flex;flex-direction:column;justify-content:center;gap:3px}.x-contract b{font-size:13px}.x-contract small{font-size:9px;color:#738060}.x-contract>b>small{font-size:9px;font-weight:400;margin-left:5px}.x-plan-actions{display:flex;gap:5px}.x-plan-actions>.primary{flex:1;background:#d8b96e;color:#2c4335;border:2px solid #efd59a;box-shadow:0 2px 0 #997f44}.x-plan-actions>button{min-height:44px}.x-reason{font-size:9px;line-height:1.25;color:#737c62;align-self:center}
.x-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.x-empty>div{display:flex;gap:9px}.x-empty .portrait{height:55px;width:44px}.x-empty h2{font-size:19px}.x-empty p{font-size:12px}.x-empty>.primary{min-height:44px}.x-legacy{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px}.x-legacy h2{font-size:20px}.x-legacy p{font-size:12px}.x-legacy>strong{font-size:36px;color:#ecd08a}.x-legacy .x-crew-list{width:100%;height:62px}
.x-modal>.modal-body{gap:7px}.x-modal h2,.x-modal h3,.x-modal p{margin:0}.x-rules{display:grid;grid-template-rows:32px minmax(0,1fr) 28px;gap:12px;height:100%;min-height:0}.x-rules>header{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px}.x-rules>header>span{font-size:10px}.x-rules>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;min-height:0}.x-rules section{padding:12px;display:flex;flex-direction:column;justify-content:center;gap:12px;background:#dcdfbc;border:1px solid #a4b08a}.x-rules section.selected{border:2px solid #ab8d49;background:#e8d8a7}.x-rules h3{font-size:17px}.x-rules p{font-size:12px;line-height:1.5}.x-rules>footer{font-size:11px;color:#6c7b61;align-self:center}.x-crew-detail{display:flex;gap:20px;align-items:center;justify-content:center;height:100%}.x-crew-detail>.portrait{height:105px;width:85px;flex:none}.x-crew-detail>section{display:flex;flex-direction:column;gap:12px}.x-crew-detail h2{font-size:18px}.x-crew-detail b{font-size:15px}.x-crew-detail p{font-size:13px}.x-crew-detail small{font-size:11px;color:#6d7d61}.x-item-cards{display:flex;gap:12px;flex:1;min-height:0}.x-item-cards>section{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px;padding:12px;background:#dfe1bd;border:1px solid #a5b08b}.x-item-cards header{display:flex;gap:7px;align-items:center}.x-item-cards header>div{display:flex;flex-direction:column;gap:4px}.x-item-cards .item-art{width:43px;height:47px;flex:none}.x-item-cards h3{font-size:15px}.x-item-cards p{font-size:12px;line-height:1.5}.x-item-cards small{font-size:10px;color:#6c7b5d}.x-pager{display:flex;gap:20px;justify-content:center;align-items:center;flex:none;height:44px;font-size:11px}.x-pager>button{min-height:44px;min-width:50px}
@media(max-width:780px){.x-room{padding:5px 8px;gap:5px}.x-heading h1{font-size:17px}.x-heading>div>span{font-size:10px}.x-layout{grid-template-columns:1.3fr 1fr;gap:7px}.x-route>header>b{font-size:11px}.x-route>header>small{font-size:8px}.x-crew-list{gap:3px}.x-crew-list>button{padding:3px;gap:3px}.x-crew-list .portrait{width:24px;height:32px}.x-crew-list b{font-size:9px}.x-crew-list small{font-size:8px}.x-sheet{padding:6px;gap:5px}.x-plan .x-sheet{gap:4px}.x-plan-copy p{font-size:11px}.x-plan-copy small{font-size:9px}.x-road-grid>button{width:100%;padding:3px 4px;gap:4px}.x-stop{font-size:21px;min-width:20px}.x-road-grid b{font-size:9px}.x-road-grid small{font-size:8px}.x-travel-note b{font-size:11px}.x-expedition-actions>button{font-size:10px;padding:4px 7px}.x-rules section{padding:8px}.x-rules h3{font-size:15px}.x-rules p{font-size:11px;line-height:1.4}}
.short-screen .x-room{grid-template-rows:28px minmax(0,1fr);gap:4px;padding:4px 8px}.short-screen .x-heading h1{font-size:16px}.short-screen .x-heading>div>span{font-size:9px;max-width:235px}.short-screen .x-heading>button{min-height:28px;font-size:9px;padding:3px 7px}.short-screen .x-route{grid-template-rows:19px minmax(0,1fr) 47px;gap:3px}.short-screen .x-route>header>b{font-size:10px}.short-screen .x-route>header>small{font-size:8px}.short-screen .x-road-grid{gap:3px;padding:3px 8px}.short-screen .x-road-grid>button{min-height:39px;height:39px;max-width:108px;padding:2px 5px}.short-screen .x-road-grid>button>span:last-child{gap:2px}.short-screen .x-road-grid b{font-size:9px}.short-screen .x-road-grid small{font-size:8px}.short-screen .x-stop{font-size:19px;min-width:20px}.short-screen .x-crew-list .portrait{height:28px;width:23px}.short-screen .x-crew-list>button>span{gap:3px}.short-screen .x-crew-list b{font-size:9px}.short-screen .x-crew-list small{font-size:8px}.short-screen .x-hp{height:4px}.short-screen .x-sheet{grid-template-rows:37px 31px minmax(0,1fr) 40px 18px;padding:4px 6px;gap:3px}.short-screen .x-expedition-state b{font-size:21px}.short-screen .x-expedition-state small{font-size:9px}.short-screen .x-expedition-state>span{font-size:9px;gap:2px}.short-screen .x-expedition-state button{min-height:20px;height:20px;font-size:9px;padding:1px 7px}.short-screen .x-travel-note{padding:3px 5px;gap:2px}.short-screen .x-travel-note b{font-size:10px}.short-screen .x-travel-note p{font-size:8px;line-height:1.15}.short-screen .x-bag{gap:2px}.short-screen .x-bag>header{height:20px}.short-screen .x-bag>header>b{font-size:9px}.short-screen .x-bag>header>button{min-height:20px;height:20px;font-size:9px;padding:1px 7px}.short-screen .x-bag>div{gap:2px}.short-screen .x-bag>div>span{padding:0 3px;gap:2px}.short-screen .x-bag .item-art{height:18px;width:18px}.short-screen .x-bag b{font-size:9px}.short-screen .x-bag p{font-size:10px}.short-screen .x-expedition-actions>button{min-height:40px;font-size:10px;padding:3px 8px}.short-screen .x-footer-note{font-size:8px}.short-screen .x-plan .x-sheet{grid-template-rows:23px 32px minmax(0,1fr) 29px 40px 20px;gap:3px}.short-screen .x-sheet-heading>b{font-size:10px}.short-screen .x-sheet-heading>button{min-height:23px;font-size:9px;padding:1px 6px}.short-screen .x-policy-tabs>button{font-size:10px;padding:2px}.short-screen .x-plan-copy{padding:3px 5px;gap:3px}.short-screen .x-plan-copy p{font-size:10px;line-height:1.2}.short-screen .x-plan-copy small{font-size:8px;line-height:1.15}.short-screen .x-contract{gap:2px}.short-screen .x-contract b{font-size:11px}.short-screen .x-contract small{font-size:8px}.short-screen .x-contract>b>small{font-size:8px}.short-screen .x-plan-actions>button{min-height:40px;font-size:10px;padding:3px 6px}.short-screen .x-reason{font-size:8px;line-height:1.2}.short-screen .x-rules{grid-template-rows:25px minmax(0,1fr) 23px;gap:6px}.short-screen .x-rules>header{font-size:11px}.short-screen .x-rules>header>span{font-size:9px}.short-screen .x-rules section{padding:7px;gap:8px}.short-screen .x-rules h3{font-size:14px}.short-screen .x-rules p{font-size:10px;line-height:1.3}.short-screen .x-rules>footer{font-size:9px}.short-screen .x-crew-detail{gap:15px}.short-screen .x-crew-detail>.portrait{height:70px;width:57px}.short-screen .x-crew-detail>section{gap:8px}.short-screen .x-crew-detail h2{font-size:16px}.short-screen .x-crew-detail b{font-size:13px}.short-screen .x-crew-detail p{font-size:11px}.short-screen .x-crew-detail small{font-size:10px}.short-screen .x-item-cards{gap:8px}.short-screen .x-item-cards>section{padding:7px;gap:7px}.short-screen .x-item-cards .item-art{height:35px;width:31px}.short-screen .x-item-cards h3{font-size:13px}.short-screen .x-item-cards p{font-size:11px;line-height:1.3}

.x-bag>div{grid-auto-rows:minmax(0,1fr);align-content:stretch}.x-bag>div.x-many-materials{grid-template-columns:repeat(3,minmax(0,1fr))}.x-bag>div>span{min-height:0}.x-many-materials .item-art{height:20px;width:20px}.x-many-materials b{font-size:9px}.x-bag>div .item-art{max-height:100%}
.short-screen .x-sheet{grid-template-rows:37px 29px minmax(0,1fr) 40px}.short-screen .x-footer-note{display:none}.short-screen .x-plan .x-sheet{grid-template-rows:23px 32px minmax(0,1fr) 29px 40px}.short-screen .x-reason:not(.has-reason){display:none}.short-screen .x-plan .x-sheet:has(.has-reason){grid-template-rows:23px 29px minmax(0,1fr) 27px 36px 22px}.short-screen .x-plan .x-sheet:has(.has-reason) .x-plan-actions>button{min-height:36px}.short-screen .x-plan .x-sheet:has(.has-reason) .x-plan-copy>small{display:none}.short-screen .x-plan-copy>small{display:none}.short-screen .x-many-materials b{font-size:8px}.short-screen .x-many-materials .item-art{height:17px;width:17px}

/* Loot remains inspectable after return; historic items never become usable copies. */
.x-item-cards>section.q1{border:2px solid #7299a4;background:#e2e8ce}.x-item-cards>section.q2{border:2px solid #b89145;background:#f0dfaa}
.x-item-cards>section>strong{font-size:13px;color:#41674e;line-height:1.4}.x-item-cards .x-loot-inspect{margin-top:auto;min-height:44px;font-size:12px;padding:6px}
.short-screen .x-item-cards>section{gap:6px}.short-screen .x-item-cards>section>strong{font-size:11px}.short-screen .x-item-cards .x-loot-inspect{font-size:11px;min-height:40px;padding:4px}

.x-item-cards{justify-content:center}.x-item-cards>section{max-width:420px}.x-item-cards header .item-art{width:64px;height:70px}.x-item-cards header>div{gap:5px}.x-item-cards h3{font-size:18px}.x-item-cards p{font-size:13px}
.short-screen .x-item-cards header .item-art{width:48px;height:52px}.short-screen .x-item-cards h3{font-size:16px}.short-screen .x-item-cards p{font-size:12px}
.x-contract> b{display:flex;justify-content:space-between;gap:8px}.x-contract strong{color:#f8d786}
.x-cash-reward{display:flex!important;align-items:center;gap:8px;padding:7px 8px;background:#594f2c55;border:1px solid #aa9861;border-radius:5px;margin:5px 0}
.x-cash-reward>strong{color:#ffdc83;font-size:21px;white-space:nowrap}.x-cash-reward>small{font-size:11px}.x-cash-reward>span{margin-left:auto;font-size:10px!important;color:#d1d7ba!important;background:none!important;border:0!important;padding:0!important}
@media(max-height:345px){.x-cash-reward{padding:4px 6px;margin:3px 0}.x-cash-reward>strong{font-size:17px}.x-contract>small{font-size:10px}}
/* Keep five/six heroes in the HP strip instead of overflowing into a second row. */
.x-crew-list{grid-template-columns:repeat(var(--crew-count,4),minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
.x-crew-list>button{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:3px}
.x-crew-list .portrait{width:22px;height:30px}.x-crew-list small{overflow:hidden;text-overflow:ellipsis}
.short-screen .x-crew-list>button{grid-template-columns:17px minmax(0,1fr);padding:3px;gap:2px}
.short-screen .x-crew-list .portrait{width:17px;height:24px}.short-screen .x-crew-list>button>span{gap:3px}
.x-bag>.x-cash-reward{flex:0 0 auto}.x-bag>div:not(.x-cash-reward){overflow-y:auto;touch-action:pan-y;align-content:start}
/* Arrival formation uses the actual destination terrain, before any dispatch. */
.x-deployment{min-height:0;display:grid;grid-template-rows:25px minmax(0,1fr) 40px;gap:6px}
.x-deployment>header{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}.x-deployment>header>span{font-size:10px;color:#d9d4b4}
.x-deploy-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:5px;padding:6px;background:#203c43cf;border:1px solid #9baf95;border-radius:8px;min-height:0}
.x-deploy-grid>.x-deploy-cell{position:relative;min-height:0;padding:0;overflow:hidden;border:1px solid #749383;border-radius:5px;background:#49604e77;color:#dac88b;isolation:isolate;touch-action:manipulation}
.x-deploy-cell>.unit-figure{position:absolute;inset:0 16% 12px;width:68%;height:calc(100% - 12px);max-width:none;pointer-events:none;z-index:1}
.x-deploy-cell>span{position:absolute;bottom:0;left:0;right:0;font-size:11px;line-height:16px;background:#142a39e6;color:#f6e6bf;z-index:2}
.x-deploy-cell>strong{font-size:22px}.x-deploy-cell.selected{box-shadow:inset 0 0 0 2px #f7d88f;border-color:#fff1a3;background:#6b755ac4}
.deploy-rock{position:absolute;inset:12% 15%;background:linear-gradient(125deg,#8b9397 0 35%,#535f68 36% 72%,#364453 73%);clip-path:polygon(14% 25%,42% 3%,81% 17%,99% 77%,82% 95%,8% 89%,0 53%);box-shadow:inset 0 -9px 0 #24323f;pointer-events:none}
.x-deploy-cell.blocked,.w-cell.blocked{background:repeating-linear-gradient(135deg,#7e554a55 0 7px,#1f34433d 7px 14px);border-color:#b69582}
.x-deploy-grid>.blocked:disabled{opacity:1;filter:none}
.x-deploy-grid>.conflict,.w-board-cells>.conflict{border:2px solid #ff9b82;box-shadow:inset 0 0 0 2px #d35a39;background:#744836}
.x-deploy-cell>em,.w-board-cells>.conflict>em{position:absolute;top:0;right:0;font-style:normal;font-size:9px;line-height:13px;color:#fff1d8;background:#a44630;padding:0 4px;z-index:3}
.x-deploy-instruction{display:flex;flex-direction:column;justify-content:center;gap:3px;border:1px solid #799985;background:#233d46;border-radius:5px;padding:5px 8px;color:#e6d6b0}.x-deploy-instruction>b{font-size:12px}.x-deploy-instruction>span{font-size:10px;color:#cfdec8}.x-deploy-instruction.conflict{border-color:#e99b79;background:#634137;color:#fff1d0}
.x-plan .x-plan-actions{display:flex;gap:5px}.x-plan .x-plan-actions>[data-action='x-depart']{flex:1}.x-plan .x-plan-actions>[data-action='x-prepare']{min-width:0;max-width:96px;white-space:normal;font-size:10px}
@media(max-height:345px){.x-deployment{grid-template-rows:18px minmax(0,1fr) 32px;gap:3px}.x-deployment>header{font-size:10px}.x-deployment>header>span{font-size:8px}.x-deploy-grid{gap:3px;padding:4px}.x-deploy-instruction{padding:3px 6px;gap:1px}.x-deploy-instruction>b{font-size:10px}.x-deploy-instruction>span{font-size:9px}.x-deploy-cell>span{font-size:9px;line-height:13px}.x-deploy-cell>.unit-figure{inset:0 18% 11px;width:64%;height:calc(100% - 11px)}.x-deploy-cell>em,.w-board-cells>.conflict>em{font-size:8px;line-height:11px}.x-plan .x-plan-actions>[data-action='x-prepare']{font-size:9px;max-width:80px}}
