.trade-shell{display:grid;grid-template-columns:240px minmax(400px,1fr) 240px;max-width:none;margin:auto;align-items:start;min-height:calc(100vh - 78px)}
.trade-sidebar{padding:22px 17px;max-height:calc(100vh - 78px);overflow-y:auto;position:sticky;top:0;background:#183338}.trade-left{border-right:1px solid #476059}.trade-right{border-left:1px solid #476059}.trade-sidebar h2{font-size:23px;margin:12px 0}.trade-sidebar h3{font-size:17px;color:#efcf95;margin:25px 0 12px}.trade-sidebar p,.trade-table p{font-size:12px;line-height:1.6}.trade-energy{display:flex;align-items:center;justify-content:space-between;background:#314c43;border:1px solid #71856c;border-radius:12px;margin-top:22px;padding:13px}.trade-energy span{font-size:12px;max-width:100px}.trade-energy strong{font-size:30px;color:#f2d493}.trade-energy small{font-size:14px;color:#b4c4ac}.trade-lord-status{color:#e1c999;margin:10px 0 18px}.trade-shell details{padding:12px 0;border-top:1px solid #465e59}.trade-shell summary{cursor:pointer;font-size:13px;font-weight:600;display:flex;justify-content:space-between;gap:8px}.trade-shell summary span{font-size:11px;color:#b3c9b2}.trade-shell details p{margin:10px 0}.trade-action-form{display:grid;gap:9px;margin:13px 0 3px}.trade-action-form label{font-size:11px}.trade-action-form select{margin-top:7px;max-width:100%;font-size:12px}.trade-action-form button{padding:9px;font-size:12px}.trade-halls article{border:1px solid #50665c;border-radius:10px;padding:12px;margin:11px 0;background:#243e3d}.trade-hall-title{display:flex;justify-content:space-between;gap:10px;font-size:13px;overflow-wrap:anywhere}.trade-hall-title span{white-space:nowrap;color:#e8c889}.trade-halls small{font-size:10px;color:#b5c3b5}.trade-chips{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}.trade-chips>span{display:flex;align-items:center;gap:4px;padding:4px 5px;background:#112b2d;border-radius:4px;font-size:10px}.trade-chips img{width:15px;height:20px;object-fit:cover;border-radius:2px}.trade-chips b{color:#efce91}.trade-product{font-size:18px;color:#efce91}.trade-recipes{display:grid;gap:6px}.trade-recipes button{font-size:11px;padding:8px}.trade-table{padding:12px 8px;min-width:0;background:radial-gradient(ellipse at 50% 35%,#49614d 0%,#264a43 45%,#173337 100%)}.trade-table-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.trade-table h1{font-size:29px;margin:7px 0 15px}.trade-table .board-container{min-height:450px;height:min(64vh,740px);padding:0;margin:0;overflow:hidden;border-radius:14px}.trade-table .board-svg{width:100%;height:100%;max-height:none}.trade-build-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:8px 0 18px}.trade-build-controls button{font-size:11px;padding:10px 6px}.trade-build-controls small{display:block;font-size:9px;color:#b8c4ad;margin-top:5px}.trade-build-controls .selected{border-color:#f1d393;background:#526546}.trade-player{border-left:4px solid var(--player);padding:10px;background:#203d3d;margin:8px 0;border-radius:5px;display:grid;gap:4px;font-size:12px}.trade-player span{font-size:15px;color:#f3d6a3}.trade-player small{color:#aec4b6;font-size:10px}.trade-player.current{background:#415a4a;box-shadow:inset 0 0 0 1px #7d9274}.trade-offer,.trade-contract{padding:12px;border:1px solid #587264;border-radius:9px;margin:10px 0;background:#28423e}.trade-offer strong,.trade-contract strong{font-size:12px;display:block}.trade-offer small{display:block;font-size:10px;margin:7px 0;color:#b8c5b1}.trade-offer button,.trade-contract button{font-size:11px;padding:8px;width:100%}.trade-reward{color:#efd095}.trade-rule-text p{font-size:13px;line-height:1.75;margin:18px 0}.trade-win{padding:12px;background:#425e48;border:1px solid #ebce96;border-radius:12px}.trade-lord-die{font-size:12px;text-align:center;line-height:1.7;color:#e9ce98}.trade-sidebar .dice-row{margin:15px 0}.trade-board .edge-target{stroke-width:9}.trade-board .node-target{stroke-width:2}.trade-sidebar button:disabled{opacity:.45}
@media(min-width:1600px){.trade-shell{grid-template-columns:270px minmax(500px,1fr) 270px}.trade-sidebar{padding:25px}}
@media(max-width:1100px){.trade-shell{grid-template-columns:230px minmax(360px,1fr)}.trade-right{grid-column:1/-1;position:static;max-height:none;display:block}.trade-table{padding:16px 10px}.trade-table h1{font-size:24px}.trade-table-head .pill{display:none}}
@media(max-width:800px){.trade-shell{display:flex;flex-direction:column}.trade-table{order:0;width:100%}.trade-left{order:1;width:100%;position:static;max-height:none}.trade-right{order:2;width:100%;display:block}.trade-table .board-container{min-height:400px;height:60vh}.trade-build-controls{grid-template-columns:repeat(2,1fr)}}
.trade-market-form{display:grid;grid-template-columns:1fr 75px;gap:10px;margin:14px 0}.trade-market-form label{font-size:11px}.trade-market-form input,.trade-market-form select{margin-top:7px;padding:9px;font-size:12px;width:100%}.trade-market-form p,.trade-market-form button{grid-column:1/-1}
.trade-round-track{margin:4px 0 14px;padding:12px;border:1px solid #7c896a;border-radius:12px;background:#193a3b}.trade-round-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.trade-round-heading h3{font:600 13px sans-serif;color:#efce91;margin:0}.trade-lord-location{font-size:12px;color:#f4d8a4}.trade-round-route{display:grid;grid-template-columns:repeat(var(--trade-round-count,16),minmax(0,1fr));gap:4px;margin:12px 0}.trade-round-route span{display:grid;place-items:center;min-height:28px;border:1px solid #5b756b;border-radius:5px;font-size:12px;color:#c0d1c2;background:#243d3c}.trade-round-route .completed{background:#4b644d;color:#e3eacb}.trade-round-route .attack-round{border-bottom:3px solid #d28361}.trade-round-route .current{background:#ddbd7b;color:#193735;border:2px solid #f4deb1;font-weight:800;box-shadow:0 0 8px #ddbd7b44}.trade-round-caption{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:10px;color:#c8cbb3}.trade-board-merchant{cursor:pointer;outline:none}.trade-board-merchant rect{fill:#1a383b;stroke:#748f7d;stroke-width:2}.trade-board-merchant:hover rect,.trade-board-merchant:focus rect{stroke:#f4d292;stroke-width:4}.trade-board-merchant.ready rect{fill:#395247;stroke:#e8c781}.trade-board-merchant text{font:12px sans-serif;fill:#ced8bd;pointer-events:none}.trade-board-merchant .merchant-name{font-size:17px;font-weight:700;fill:#f1d197}.trade-merchant-order p{font-size:14px;line-height:1.6}.trade-merchant-portrait{display:block;width:90px;height:90px;object-fit:contain;margin:0 auto 15px}.trade-merchant-order h3{text-align:center;color:#e9c992}
@media(max-width:500px){.trade-round-track{padding:9px}.trade-round-route{gap:2px}.trade-round-route span{font-size:10px;min-height:24px}.trade-lord-location{font-size:11px}}
.trade-dice{align-items:flex-start;gap:18px}.trade-die-group{display:grid;justify-items:center;gap:6px}.trade-die-group small{font-size:10px;color:#e5d5ad}.trade-dice .die{width:52px;height:52px;display:grid;place-items:center;font-size:29px;line-height:1}.trade-dice .trade-lord-die{background:#080808;color:#fff;border:2px solid #656565;box-shadow:inset 0 0 0 2px #161616,0 3px 5px #0005}
.lord-die-symbol{display:inline-block;width:32px;height:32px;vertical-align:middle}.trade-lord-die-legend,.trade-lord-die-legend>span{display:inline-flex;align-items:center;gap:4px}.trade-lord-die-legend{flex-wrap:wrap}.trade-lord-die-legend .lord-die-symbol{width:16px;height:16px;color:#f4d8a4}
.trade-building{cursor:pointer;outline:none}.trade-building:hover rect,.trade-building:focus rect{stroke:#ffe2a4;stroke-width:5}.trade-building text{pointer-events:none}#modal[data-trade-shipping]{width:min(800px,calc(100vw - 30px));max-height:calc(100vh - 30px);padding:22px}.trade-shipping-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.trade-shipping-overview article{padding:13px;border:1px solid #526f62;border-radius:10px;background:#233d3b}.trade-shipping-overview .shipping-source{border-color:#e8c587;background:#304d43}.trade-shipping-overview .unbuilt{border-style:dashed;background:#1b3233}.trade-shipping-hall-title{display:flex;justify-content:space-between;gap:10px;align-items:start;font-size:13px}.trade-shipping-hall-title strong{overflow-wrap:anywhere}.trade-shipping-hall-title span{color:#efd298;font-size:11px;white-space:nowrap}.trade-shipping-overview small{font-size:11px;color:#c6d0ba}.trade-shipping-goods{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0;font-size:12px}.trade-shipping-goods>span{display:flex;align-items:center;gap:5px;background:#152e30;border-radius:5px;padding:5px 7px}.trade-shipping-goods img{width:18px;height:24px;object-fit:cover;border-radius:2px}.trade-shipping-goods b{color:#f0d196}.trade-shipping-incoming{font-size:11px!important;margin:9px 0 0!important;color:#cfbb92!important}.trade-shipping-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.trade-shipping-form label{font-size:12px}.trade-shipping-form select,.trade-shipping-form input{display:block;width:100%;margin-top:6px;font-size:13px}.trade-shipping-form button,.trade-shipping-status{grid-column:1/-1}.trade-shipping-status,.trade-shipping-note{font-size:12px!important;line-height:1.5!important}.trade-shipping-status{margin:0!important;color:#efd298!important}.trade-shipping-form button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:540px){.trade-shipping-overview,.trade-shipping-form{grid-template-columns:1fr}#modal[data-trade-shipping]{padding:16px}.trade-shipping-hall-title span{white-space:normal}}
/* Illustrated construction cards retain readable prices when an action is disabled. */
.trade-building-menu{container-type:inline-size;margin:12px 0 20px}
.trade-board-buildings{overflow:visible}
.trade-board-buildings .trade-building-menu{margin:0;padding:4px}
.trade-board-buildings .trade-build-controls{grid-template-columns:repeat(4,minmax(0,1fr))}
.trade-board-buildings .trade-building-heading h3{font-size:22px}
.trade-board-buildings .trade-building-heading>span{font-size:13px}
.trade-board-buildings .trade-build-card>strong{font-size:18px}
.trade-board-buildings .trade-build-status{font-size:12px}
.trade-board-buildings .trade-build-cost .trade-material b,.trade-board-buildings .trade-build-controls .trade-build-cost .trade-material small{font-size:12px}
.trade-board-buildings .trade-building-menu>p{font-size:14px;margin:6px 0}
.trade-board-buildings .trade-building-menu>button{font-size:14px;padding:6px 12px}
.trade-table .board-container:has(>.trade-board){height:auto;min-height:0}
.trade-table .board-container>.trade-board{height:auto}
.trade-table .board-view-controls{padding:4px 6px 0}
.trade-table .trade-round-track{position:sticky;top:6px;z-index:3;margin:4px 0 6px;padding:8px 12px;box-shadow:0 3px 10px #102c2e44}
.trade-table .trade-round-route{margin:7px 0}
.trade-table .trade-round-route span{min-height:26px}
#modal[data-trade-transports]{width:min(800px,calc(100vw - 30px));container-type:inline-size}
.trade-building-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.trade-building-heading h3{font-size:18px;margin:0;color:#edf0dc}
.trade-building-heading>span{font-size:11px;color:#c2d0be}
.trade-build-controls{gap:10px;margin:0 0 10px}
.trade-build-item{position:relative;display:flex;min-width:0;align-items:stretch}
.trade-build-controls .trade-build-card{display:grid;width:100%;grid-template-columns:64px minmax(0,1fr);grid-template-rows:minmax(60px,auto) auto auto minmax(32px,auto);align-items:stretch;gap:4px 6px;text-align:left;padding:8px;border:1px solid #647565;border-radius:12px;background:linear-gradient(155deg,#355143,#1b3638);color:#eef0dc;min-width:0;overflow:hidden}
.trade-build-card:disabled{opacity:1;cursor:not-allowed}
.trade-build-card:not(:disabled){border-color:#8ac895;box-shadow:0 2px 10px #0e26274d}
.trade-build-card:not(:disabled):hover,.trade-build-card:focus-visible,.trade-build-card.selected{border-color:#f4d694;box-shadow:0 0 0 2px #f4d69470}
.trade-build-art{--art-height:60px;grid-column:1/-1;grid-row:1;display:grid;place-items:center;width:100%;height:var(--art-height);border-radius:8px;background:radial-gradient(ellipse at center,#a4b18b30,transparent 75%)}
.trade-build-art img,.trade-build-art svg{width:100%;height:var(--art-height);min-height:0;object-fit:contain;filter:drop-shadow(0 5px 3px #0b252750)}
.trade-build-card>strong{grid-column:1/-1;align-self:center;font:600 14px Georgia,serif;text-align:center;overflow-wrap:anywhere}
.trade-build-controls .trade-build-info-button{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:1px solid #b6c99b;border-radius:50%;background:#28483e;color:#f8dfaa;font:bold 18px Georgia,serif;cursor:pointer;z-index:1}
.trade-build-controls .trade-build-info-button:hover,.trade-build-controls .trade-build-info-button:focus-visible{border-color:#ffe5a6;background:#48614a;outline:2px solid #f4d694;outline-offset:2px}
.trade-build-cost{grid-column:1/-1;display:grid;gap:4px}
.trade-build-cost .trade-material{padding:3px 5px;gap:5px}
.trade-build-cost .trade-material>img{width:18px;height:22px}
.trade-build-cost .trade-material>span:not(.trade-material-mark){display:flex;align-items:center;justify-content:space-between;gap:5px;flex:1}
.trade-build-cost .trade-material b{font-size:10px}
.trade-build-controls .trade-build-cost .trade-material small{font-size:10px;margin:0;flex-shrink:0}
.trade-build-cost .trade-material-scope,.trade-build-cost .trade-material-mark{display:none}
.trade-material{display:flex;align-items:center;gap:6px;min-width:0;border-radius:6px;background:#102c2e80;padding:6px;text-align:left;font-size:11px;line-height:1.35}
.trade-material>img{width:22px;height:27px;object-fit:cover;border-radius:3px;flex-shrink:0}
.trade-material>span:not(.trade-material-mark){min-width:0;overflow-wrap:anywhere}
.trade-material b{font-size:11px;font-weight:650}
.trade-material small,.trade-build-controls .trade-material small{display:block;font-size:10px;font-weight:400;color:inherit;margin:2px 0 0;opacity:.9}
.trade-material-mark{margin-left:auto;font-size:14px;font-weight:700}
.material-enough{color:#9beaac}.material-partial{color:#ffe08a}.material-missing{color:#ffa29b}
.trade-build-status{grid-column:1/-1;font-size:10px;text-align:center;display:grid;place-items:center;border-top:1px solid #81967a33;padding:4px 36px 0 0;font-weight:500;line-height:1.35}
.trade-building-info{max-width:640px;min-width:0;color:#d4dfcd}
.trade-building-info-intro{display:flex;align-items:center;gap:16px;margin:6px 0 14px}
.trade-building-info-intro>img{width:88px;height:76px;flex:none;object-fit:contain;filter:drop-shadow(0 4px 3px #102c2e66)}
.trade-building-info-intro>div{min-width:0}
.trade-building-info h4{font-size:14px;color:#f0d296;margin:0 0 9px}
.trade-building-info-cost{display:flex;flex-wrap:wrap;gap:8px 14px}
.trade-building-info-material{display:flex;align-items:center;gap:7px;font-size:13px;min-width:0}
.trade-building-info-material>img{width:26px;height:32px;object-fit:cover;border-radius:4px}
.trade-building-info-material>strong{overflow-wrap:anywhere}
.trade-building-info .trade-building-info-payment{font-size:12px;line-height:1.55;margin:0 0 18px;color:#b9cbbf}
.trade-building-info ul{padding-left:20px;margin:0;font-size:14px;line-height:1.6}
.trade-building-info li+li{margin-top:10px}
@media(pointer:coarse){.trade-build-controls .trade-build-info-button{width:44px;height:44px}.trade-build-status{min-height:44px;padding-right:48px}}
@media(max-width:420px){.trade-building-info-intro{gap:10px}.trade-building-info-intro>img{width:64px;height:64px}.trade-building-info ul{font-size:13px}}
.trade-storage-slots{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:11px 0}
.trade-storage-slot{position:relative;display:grid;place-items:center;min-width:0;padding:0;aspect-ratio:1/1.14;border:1px solid #80957b;border-radius:6px;background:#142e30;overflow:hidden}
.trade-storage-slot .trade-good-image{display:block;width:100%;height:100%;object-fit:cover;border-radius:4px}
.trade-storage-slot.empty{border-style:dashed;border-color:#78917a99;background:#1b353344}
.trade-storage-empty{font-size:20px;line-height:1;color:#90a48b}
.trade-storage-slot.reserved,.trade-storage-slot.incoming{border-color:#e8c587}
.trade-storage-mark{position:absolute;right:0;bottom:0;display:grid;place-items:center;width:15px;height:15px;border-radius:4px 0 0 0;background:#efd298;color:#173337;font-size:12px;font-weight:700;line-height:1}
.trade-storage-slot.incoming .trade-good-image{opacity:.65}
.trade-storage-arrival{width:auto;min-width:20px;height:18px;padding:0 3px;font-variant-numeric:tabular-nums}
.trade-storage-cancel{position:absolute;inset:0;display:grid;place-items:center;width:100%;height:100%;padding:0;border:0;border-radius:5px;background:transparent;color:inherit}
.trade-storage-cancel:disabled{opacity:1;cursor:default}
.trade-storage-cancel:hover:not(:disabled),.trade-storage-cancel:focus-visible{outline:2px solid #f2d18d;outline-offset:-3px;background:transparent}
.trade-storage-cancel:hover:not(:disabled) .trade-good-image,.trade-storage-cancel:focus-visible .trade-good-image{opacity:1}
.trade-storage-cancel:active:not(:disabled){transform:none}
.trade-shipping-overview .unbuilt .trade-storage-slots{opacity:.5}
.trade-storage-slots [draggable="true"]{cursor:grab;user-select:none}
.trade-storage-slots [draggable="true"]:active{cursor:grabbing}
.trade-storage-slots .shipping-dragging{opacity:.4}
.trade-shipping-overview article.shipping-drop-allowed{border-color:#9beaac;box-shadow:inset 0 0 0 2px #9beaac55}
.trade-shipping-overview article.shipping-drop-over{background:#3c6249;box-shadow:inset 0 0 0 3px #9beaac}
.trade-shipping-overview article.shipping-drop-blocked{border-color:#aa7773}
.trade-production-info{margin-top:14px;border-top:1px solid #69837180;padding-top:11px}
.trade-production-info h4{font-size:12px;color:#e9e7cc;margin:0 0 9px}
.trade-production-info p{font-size:11px!important;line-height:1.55!important;color:#cad5c5;margin:8px 0 0!important}
.trade-recipe{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:start;gap:5px;max-width:100%;padding:2px 0}
.trade-recipe+.trade-recipe{margin-top:12px}
.trade-recipe-good{display:grid;gap:3px;min-width:0;text-align:center;line-height:1.25}
.trade-recipe-good>.trade-storage-slot{width:100%}
.trade-recipe-good>strong{font-size:10px;overflow-wrap:anywhere;width:calc(100% + 16px);margin-inline:-8px}
.trade-recipe-good>small{font-size:9px;color:inherit;overflow-wrap:anywhere}
.trade-recipe-good>.trade-market-hint{font-size:8px;line-height:1.3}
.trade-recipe-output{color:#ebdfbd}
.trade-storage-slot.trade-production-choice{padding:0;border-color:#91a589;cursor:pointer;opacity:1}
.trade-production-choice:hover:not(:disabled),.trade-production-choice:focus-visible{border-color:#f4d694;outline:2px solid #f4d694;outline-offset:2px}
.trade-production-choice:disabled{cursor:default}
.trade-production-choice[aria-disabled="true"],.trade-build-card[aria-disabled="true"]{opacity:.65;cursor:help}
.trade-recipe-symbol{display:grid;place-items:center;aspect-ratio:1/1.14;min-width:0;font-size:18px;color:#cbd5c5}
.trade-recipe-points{grid-column:span 3;align-self:center;font-size:12px;color:#ebdfbd}
.trade-surprise-question{display:grid;place-items:center;width:100%;height:100%;font-size:clamp(24px,3vw,38px);font-weight:800;color:#f2d493;background:radial-gradient(circle,#596549,#233e37)}
.trade-sale-products{display:grid;grid-template-columns:repeat(auto-fit,minmax(74px,1fr));gap:12px 7px;align-items:start}
.trade-sale-products .trade-sale-product>.trade-storage-slot{width:48px;max-width:100%;justify-self:center}
.trade-sale-products .trade-sale-product>strong{width:100%;margin-inline:0;font-size:9px;min-height:2.5em}
.trade-sale-all{max-width:100%;min-height:36px;padding:6px;font-size:10px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.trade-sale-points{font-size:10px;font-weight:700;color:#efd298;white-space:nowrap}
.trade-sale-loss .trade-sale-points,.trade-sale-loss>span>small:last-child{color:#ffaaa0}
.trade-sale-loss>.trade-storage-slot{border-color:#c48172}
.trade-surprise-result{display:flex;align-items:center;gap:10px;margin-top:12px;padding:9px;border:1px solid #8b9c74;border-radius:8px;background:#314b40}
.trade-surprise-result>.trade-storage-slot{flex:0 0 45px}
.trade-surprise-result>span:last-child{display:grid;gap:3px;min-width:0}
.trade-surprise-result strong{font-size:12px;color:#efcf95;overflow-wrap:anywhere}
.trade-surprise-result small{font-size:10px;color:#c8d4c4}
.trade-mill-recipes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px;align-items:start}
.trade-mill-recipes .trade-recipe{grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr);margin:0;gap:5px}
.trade-mill-recipes .trade-recipe-good>.trade-storage-slot{max-width:48px;justify-self:center}
.trade-mill-recipes .trade-recipe-good>strong{width:100%;margin-inline:0}
.trade-mill-recipes .trade-recipe-symbol{padding-top:15px}
.trade-production-info .trade-recipe-good{align-content:start;justify-items:center}
.trade-production-info .trade-recipe-good>.trade-storage-slot{width:min(100%,48px);aspect-ratio:1;align-self:start;justify-self:center}
.trade-production-info .trade-recipe-good>.trade-storage-slot>.trade-good-image{width:100%;height:100%;aspect-ratio:1;object-fit:contain}
.trade-production-info .trade-recipe-symbol{height:48px;aspect-ratio:auto;padding-top:0;align-self:start}
.trade-carrot-button{margin-top:14px;font-size:11px}
.trade-storage-slot.carrot-slot{border-color:#f2a94e;background:#70502833}
.carrot-placeholder{width:75%;opacity:.22}
.trade-carrot-intro{display:flex;align-items:center;gap:14px;margin:8px 0 20px}
.trade-carrot-intro>img{width:52px;height:60px}
.trade-carrot-intro p{margin:5px 0 0}
@container(max-width:620px){.trade-build-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.trade-building-heading{align-items:start;flex-direction:column;gap:4px}}
@container(max-width:360px){.trade-build-controls .trade-build-card{grid-template-columns:44px minmax(0,1fr);gap:4px}.trade-build-card>strong{font-size:12px}.trade-build-cost .trade-material{gap:3px;padding:3px}.trade-build-cost .trade-material>img{width:15px;height:20px}}
/* The turn guide is optional after RainerZufall; actions keep their server rules. */
.trade-turn-guide{margin:16px 0;padding:12px;border:1px solid #70876c;border-radius:12px;background:#213f3c}
.trade-turn-heading{display:flex;justify-content:space-between;gap:8px;align-items:baseline;flex-wrap:wrap}
.trade-turn-heading h3,.trade-sidebar .trade-turn-guide h3{margin:0;font-size:15px;color:#e6e8cf}
.trade-turn-heading>span{font-size:9px;color:#bfceba}
.trade-turn-steps{display:grid;gap:5px;margin:13px 0;padding:0;list-style:none}
.trade-turn-steps button{display:flex;align-items:center;gap:8px;width:100%;padding:7px 8px;text-align:left;font-size:11px;font-weight:500;color:#c3d0bf;background:#193435;border:1px solid #466357;border-radius:7px}
.trade-turn-steps button>span{display:grid;place-items:center;width:20px;height:20px;flex:0 0 20px;border-radius:50%;background:#365246;font-size:10px}
.trade-turn-steps button:disabled{opacity:1;cursor:default}
.trade-turn-steps .current{background:#435e47;border-color:#dac894;color:#fff1cc}
.trade-turn-steps .reviewed>span{background:#355d45;color:#a4e8b0}
.trade-turn-steps button.trade-end-reminder:not(:disabled){animation:trade-end-reminder-pulse 1.6s ease-in-out infinite;border-color:#f5ce7b;color:#fff1cc}
@keyframes trade-end-reminder-pulse{0%,100%{background:#435e47;box-shadow:0 0 0 0 #f5ce7b00}50%{background:#80612e;box-shadow:0 0 0 3px #f5ce7b80}}
@media(prefers-reduced-motion:reduce){.trade-turn-steps button.trade-end-reminder:not(:disabled){animation:none;background:#80612e;box-shadow:0 0 0 2px #f5ce7b}}
.trade-turn-content{border-top:1px solid #647a634f;padding-top:10px}
.trade-turn-content h4{font-size:14px;margin:0 0 7px;color:#f0dfb9}
.trade-turn-content .trade-turn-energy{margin:9px 0 12px;padding:10px;gap:8px}
.trade-turn-energy strong{white-space:nowrap}
.trade-turn-content .trade-turn-energy small{display:inline;margin:0;font-size:12px}
.trade-turn-content p{font-size:11px;line-height:1.55;margin:7px 0 12px}
.trade-turn-content small{display:block;margin:10px 0 0;color:#bdcdbd;font-size:10px;line-height:1.5}
.trade-turn-content .trade-turn-empty{color:#e1cea5}
.trade-turn-content button{font-size:11px;padding:9px 7px}
.trade-turn-content button+button{margin-top:7px}
.trade-turn-links{display:grid;gap:6px}
.trade-turn-links button{text-align:left;margin:0!important}
.trade-turn-extras{display:grid;gap:6px;margin-top:13px;border-top:1px solid #647a634f;padding-top:10px}
.trade-turn-extras button{width:100%;text-align:left;font-size:11px;padding:8px}
.trade-turn-extras button[data-trade-menu-unread]{display:flex;justify-content:space-between;align-items:center;gap:8px;border-color:#e8be73}
.trade-menu-unlock-badge{padding:2px 6px;border-radius:999px;background:#f0cb83;color:#29322a;font-size:10px;font-weight:700;line-height:1.3}
.trade-turn-extras button[data-trade-menu-flash]{animation:trade-menu-unlock-pulse 1.2s var(--menu-unlock-delay,0ms) ease-in-out 3}
@keyframes trade-menu-unlock-pulse{0%,100%{box-shadow:0 0 0 0 #e8be7300}50%{box-shadow:inset 0 0 12px #e8be7350,0 0 0 2px #e8be73}}
@media(prefers-reduced-motion:reduce){.trade-turn-extras button[data-trade-menu-flash]{animation:none}}
.trade-turn-review{font-size:11px;line-height:1.55;padding-left:16px;margin:10px 0 14px;color:#ccdac7}
.trade-turn-review li{margin:7px 0}.trade-turn-raid{color:#ffc194}
.trade-building-menu:focus-visible,[data-trade-anchor]:focus-visible{outline:2px solid #edcf94;outline-offset:5px}
@media(max-width:800px){.trade-turn-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.trade-left .trade-turn-guide{max-width:600px;margin-left:auto;margin-right:auto}}
#modal[data-trade-shipping]{max-width:800px}
#modal[data-trade-shipping] .modal-head{justify-content:flex-end;margin-bottom:4px}
#modal[data-trade-shipping] .modal-head h2{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#modal[data-trade-shipping] .trade-shipping-overview{margin-top:0}
#modal[data-trade-acquire]{max-width:660px}
.trade-acquire-summary{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0 12px}
.trade-acquire-summary .trade-energy{margin:0;gap:12px}
.trade-acquire-summary .trade-energy strong{white-space:nowrap}
.trade-acquire-storage{display:grid;gap:4px;padding:12px;border:1px solid #506f62;border-radius:12px}
.trade-acquire-storage span,.trade-acquire-storage small{font-size:12px;color:#c6d5c8}
.trade-acquire-storage strong{font-size:22px;color:#f2d493}
.trade-acquire-fields{display:grid;gap:10px;margin:14px 0}
.trade-acquire-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border:1px solid #506f62;border-radius:12px;background:#213e3b}
.trade-acquire-resource{display:flex;align-items:center;gap:12px;min-width:0}
.trade-acquire-resource img{width:55px;height:68px;object-fit:cover;border:1px solid #9b9870;border-radius:7px;flex-shrink:0}
.trade-acquire-resource>div{display:grid;gap:4px}.trade-acquire-resource strong{font-size:15px;color:#f1d195}.trade-acquire-resource small{font-size:11px;color:#bbcbc1}.trade-acquire-resource span{font-size:12px;color:#d5e3d5}
.trade-acquire-amounts{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end;max-width:245px;flex-shrink:0}
.trade-acquire-amount{display:grid;gap:4px;place-items:center;min-width:65px;min-height:64px;padding:8px;border:1px solid #d8bc7d;border-radius:9px;background:#52644b;color:#fff0ca}
.trade-acquire-amount strong{font-size:23px;line-height:1}.trade-acquire-amount small{font-size:10px;white-space:nowrap}
.trade-acquire-amount:hover:not(:disabled){background:#6b7852;border-color:#ffe0a4}.trade-acquire-amount:disabled{opacity:1;background:#263936;border-color:#496058;color:#7f918b;cursor:not-allowed}
.trade-acquire-row:focus-visible,.trade-acquire-amount:focus-visible{outline:2px solid #ffe0a4;outline-offset:3px}
.trade-acquire-row.exhausted .trade-acquire-resource img{opacity:.5}.trade-acquire-row.exhausted .trade-acquire-resource span{color:#99afa4}
@media(max-width:520px){.trade-acquire-row{gap:8px;padding:10px}.trade-acquire-resource{gap:8px}.trade-acquire-resource img{width:43px;height:55px}.trade-acquire-resource strong{font-size:13px}.trade-acquire-resource small{font-size:10px}.trade-acquire-amounts{gap:5px;max-width:154px}.trade-acquire-amount{min-width:48px;min-height:56px;padding:6px 4px}.trade-acquire-amount strong{font-size:21px}.trade-acquire-amount small{font-size:9px}}
@media(max-width:360px){.trade-acquire-row{flex-wrap:wrap}.trade-acquire-amounts{max-width:none;justify-content:flex-start}}
.trade-acquire-note,.trade-acquire-empty{font-size:13px;line-height:1.6}.trade-acquire-note strong{color:#f0c48a}
@media(max-width:450px){.trade-acquire-summary{gap:8px}.trade-acquire-summary .trade-energy{padding:10px;flex-wrap:wrap}.trade-acquire-summary .trade-energy strong{font-size:25px}}
/* Illustrated shipments; the cart follows physical route progress from the server. */
.trade-cargo-position>.trade-cargo-leader{stroke-width:2;stroke-dasharray:3 2;pointer-events:none}.trade-cargo-position>circle{pointer-events:none}
.trade-board-cargo{cursor:pointer;outline:none}.trade-board-cargo>*{pointer-events:none}.trade-board-cargo .trade-cargo-frame{pointer-events:all;filter:drop-shadow(0 2px 2px #0c252aba)}
.trade-board-cargo.own .trade-cargo-frame{stroke:#fff1c4;stroke-width:2.5}.trade-board-cargo:hover .trade-cargo-frame,.trade-board-cargo:focus .trade-cargo-frame{stroke:#fff9df;stroke-width:4}

.trade-cargo-detail-heading{display:flex;align-items:center;gap:16px;border-left:6px solid var(--cargo-color);padding:12px;background:#24413e;border-radius:9px}.trade-cargo-detail-heading>.trade-good-image{width:62px;height:72px;object-fit:cover;border-radius:6px}.trade-cargo-detail-heading strong{font-size:23px;color:#eed19c}.trade-cargo-detail-heading p{margin:6px 0 0}
.trade-cargo-detail dl{display:grid;gap:0;margin:20px 0}.trade-cargo-detail dl>div{display:grid;grid-template-columns:145px 1fr;gap:14px;padding:12px 0;border-bottom:1px solid #567265}.trade-cargo-detail dt{color:#b4c6bf}.trade-cargo-detail dd{margin:0;overflow-wrap:anywhere}.trade-cargo-detail>p{font-size:12px;color:#b7c9bd}
@media(max-width:500px){.trade-cargo-detail dl>div{grid-template-columns:1fr;gap:5px}.trade-cargo-detail-heading strong{font-size:19px}}
[data-trade-detail="cargo"]{container-type:inline-size}
.trade-transport-list{display:grid;gap:12px;margin:14px 0}
.trade-queue{padding:14px;border:1px solid #698576;border-radius:12px;background:#213e3b;margin:16px 0;container-type:inline-size}
.trade-queue h3{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;color:#ecd094}.trade-queue h3 span{font-size:12px;font-weight:normal}
.trade-queue p,.trade-queue>small{font-size:12px;color:#bdcfc5;line-height:1.5}.trade-queue ol{padding-left:24px;margin-bottom:12px}.trade-queue li{padding:12px 0;border-top:1px solid #65847355}
.trade-queue-item{display:flex;gap:12px;align-items:center}.trade-queue-item>.trade-good-image{width:44px;height:54px;object-fit:cover;border-radius:6px;flex-shrink:0}.trade-queue-item>div{min-width:0;overflow-wrap:anywhere}.trade-queue-item small{display:block;font-size:12px;color:#bdcfc5;margin-top:4px}
.trade-queue-controls{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.trade-queue-controls button{font-size:12px;padding:6px 9px}.trade-shipping-reserved{font-size:12px;margin:10px 0 4px;color:#ecd094}
.trade-transport-card{padding:15px;border:1px solid #607b66;border-radius:13px;background:linear-gradient(140deg,#2e4a40,#1b383a);overflow:hidden}
.trade-transport-card>header{display:flex;align-items:center;gap:12px;padding-bottom:10px;border-bottom:1px solid #7e957b33}
.trade-transport-goods{position:relative;width:54px;height:54px;flex-shrink:0}
.trade-transport-goods>.trade-good-image{width:48px;height:48px;object-fit:cover;border-radius:9px;border:1px solid #9caa84}
.trade-transport-goods>b{position:absolute;right:0;bottom:-2px;background:#ecd094;color:#203c36;border:2px solid #304b40;min-width:25px;padding:2px 4px;border-radius:8px;font-size:13px;text-align:center}
.trade-transport-title{min-width:0}.trade-transport-title>small{font-size:10px;color:#b9cebb}.trade-transport-title h4{font-size:16px;margin:4px 0;color:#f0e4c6;overflow-wrap:anywhere}
.trade-transport-eta{display:grid;grid-template-columns:23px auto;align-items:center;gap:2px 7px;margin-left:auto;color:#edd29a;flex-shrink:0}
.trade-transport-eta>svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;grid-row:1/3}
.trade-transport-eta>strong{font-size:24px;line-height:1}.trade-transport-eta>span{font-size:10px;line-height:1.35;color:#c7d5bf}
.trade-transport-journey{display:grid;grid-template-columns:120px minmax(80px,1fr) 120px;gap:20px;align-items:center;margin:18px 0 10px}
.trade-transport-building{display:flex;flex-direction:column;align-items:center;min-width:0;background:transparent;border:1px solid transparent;border-radius:9px;padding:5px;color:#e9e5cb;text-align:center}
.trade-transport-building:hover,.trade-transport-building:focus-visible{background:#5a70522e;border-color:#b7c291}
.trade-transport-building-art{display:block;height:86px;width:100%}.trade-transport-building-art>img{width:100%;height:86px;object-fit:contain;filter:drop-shadow(0 4px 3px #102a2a70)}
.trade-transport-building>strong{font-size:12px;line-height:1.3;overflow-wrap:anywhere;margin-top:6px}.trade-transport-building>small{font-size:10px;color:#bdcdb8;margin-top:4px}
.trade-transport-middle{min-width:0;text-align:center;padding-top:31px}.trade-transport-middle>small{display:block;font-size:10px;color:#c4d1b7;margin-top:14px}
.trade-transport-track{height:30px;position:relative;margin:0 24px}
.trade-transport-rail,.trade-transport-completed{position:absolute;top:12px;height:8px;left:0;border-radius:5px}
.trade-transport-rail{width:100%;background:repeating-linear-gradient(90deg,#65826a 0 10px,#28473e 10px 17px)}
.trade-transport-completed{background:#d7c07f;transition:width .4s}
.trade-transport-cart{position:absolute;width:52px;height:70px;bottom:12px;transform:translateX(-50%);transition:left .4s}
.trade-transport-cart>.trade-good-image{position:absolute;top:0;left:10px;width:38px;height:40px;object-fit:cover;border-radius:5px;border:1px solid #a4b58e}
.trade-transport-cart>svg:last-child{position:absolute;width:52px;height:30px;bottom:0;left:0}
.trade-transport-arrow{position:absolute;right:-19px;top:0;font-size:30px;line-height:30px;color:#d7c07f}
.trade-transport-card>footer{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 17px;padding-top:9px;font-size:10px;color:#c7d6c1}
.trade-transport-card>footer>span{display:flex;align-items:center;gap:5px}.trade-transport-card>footer svg{width:35px;height:20px}.trade-transport-blu{color:#bee0f0}.trade-transport-blu b{font-size:22px;line-height:1}.trade-transport-safe{color:#9bdbf0}.trade-transport-safe svg{fill:none;stroke:currentColor;stroke-width:3}
.trade-transport-speeds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 2px}.trade-transport-speeds>div{display:flex;align-items:center;justify-content:center;gap:9px;padding:9px 6px;border:1px solid #647c623d;border-radius:9px;background:#19353880}.trade-transport-speeds svg{width:48px;height:27px;flex-shrink:0}.trade-transport-speeds span{font-size:10px;color:#c2d1bc}.trade-transport-speeds strong{display:block;color:#e5dcba;font-size:11px;margin-top:3px}.trade-transport-speeds .trade-transport-horse{font-size:30px;line-height:1;color:#bbddea;width:32px;text-align:center}
.trade-transport-empty{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;padding:20px}.trade-transport-empty>span{width:58px;opacity:.7}.trade-transport-empty>span svg{width:58px;height:35px}.trade-transport-empty button{font-size:12px}
@container(max-width:520px){.trade-transport-card{padding:10px}.trade-transport-journey{grid-template-columns:82px minmax(55px,1fr) 82px;gap:5px}.trade-transport-building-art,.trade-transport-building-art>img{height:65px}.trade-transport-building>strong{font-size:10px}.trade-transport-building>small{font-size:9px}.trade-transport-title h4{font-size:14px}.trade-transport-eta>strong{font-size:22px}.trade-transport-eta>svg{display:none}.trade-transport-eta{display:flex;flex-direction:column;align-items:end}.trade-transport-eta>span{font-size:9px;text-align:right}.trade-transport-speeds>div{flex-direction:column;text-align:center;gap:3px}.trade-transport-speeds strong{font-size:10px}.trade-transport-middle>small{font-size:9px}}

/* Start-of-turn RainerZufall dialog. */
dialog.roll-popup{max-width:430px;text-align:center;padding:30px}.roll-popup h2{font-size:34px;margin:9px 0}.roll-popup-dice{justify-content:center;margin:26px 0}.roll-popup .die{width:76px;height:76px;font-size:42px}.roll-popup .roll-countdown{color:var(--ink);font-size:16px}.roll-countdown strong{color:var(--accent);font-size:24px;font-variant-numeric:tabular-nums}.roll-popup progress{display:block;width:100%;height:7px;border:0;border-radius:8px;overflow:hidden;accent-color:var(--accent);margin:0 0 22px}.roll-popup progress::-webkit-progress-bar{background:#294447}.roll-popup progress::-webkit-progress-value{background:var(--accent)}.roll-popup .roll-popup-status{min-height:2.8em;font-size:12px;margin-bottom:0}

.trade-blu-visitor image{filter:drop-shadow(0 3px 3px #102b3b55)}
.trade-blu-visitor text{font:600 13px system-ui,sans-serif;fill:#efd39d}
.trade-blu{pointer-events:none}.trade-blu-route{stroke:#a7d8ee;stroke-width:3;stroke-dasharray:4 5;opacity:.5}.trade-blu-position{filter:drop-shadow(0 2px 2px #102b3b)}

.trade-forecast-notice{margin:12px 0;padding:10px 12px;background:#173335;border:1px solid #77948366;border-radius:8px;font-size:12px;color:#edd39b;line-height:1.5}
.trade-forecast-notice>small{display:block;margin-top:5px;color:#c0d0c8;font-size:11px}
.trade-shipment-forecast{display:grid;gap:7px;margin:12px 0 4px}
.trade-forecast-row{display:flex;align-items:flex-start;gap:9px;padding:10px 12px;border:1px solid currentColor;border-left-width:4px;border-radius:8px;line-height:1.45}
.trade-forecast-row.safe{color:#a5e2b9;background:#234b39}.trade-forecast-row.danger{color:#ffb5a4;background:#4b3030}.trade-forecast-row.warning{color:#f0d38a;background:#434333}
.trade-forecast-row>span{font-size:17px;line-height:1.2;flex-shrink:0}.trade-forecast-row strong{display:block;font-size:12px}.trade-forecast-row small{display:block;font-size:11px;margin-top:3px;color:inherit}

.trade-lord-speech{pointer-events:none;filter:drop-shadow(0 3px 3px #102b3b66);transition:transform .2s ease}
@media(prefers-reduced-motion:reduce){.trade-lord-speech{transition:none}}
.trade-lord-speech rect,.trade-lord-speech path{fill:#fff2d2;stroke:#795132;stroke-width:2}
.trade-lord-speech text{font:700 13px system-ui,sans-serif;fill:#392c23;stroke:none}
.trade-raid-running .trade-lord-figure{opacity:0}
.trade-raid-running .trade-lord-chat{opacity:.15}
[data-trade-raid-layer]{pointer-events:none}
.trade-raid-route{fill:none;stroke:#ef7b58;stroke-width:11;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 5px #e96c3a)}
.trade-raid-fence{fill:none;stroke:#9aeeff;stroke-width:13;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 6px #40c9ff)}
.trade-raid-walker{filter:drop-shadow(0 4px 3px #10232766)}
.trade-raid-speech rect,.trade-raid-speech path{fill:#fff2d2;stroke:#795132;stroke-width:2}
.trade-board .trade-raid-speech text{font:700 14px system-ui,sans-serif;fill:#392c23;stroke:none}
.trade-raid-shield{filter:drop-shadow(0 0 6px #51ceff)}
.trade-raid-shield path{fill:#276b91;stroke:#c5f4ff;stroke-width:2.5}
.trade-raid-shield .check{fill:none;stroke:#e8fcff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.trade-raid-loot rect{fill:#183336;stroke:#f0ce87;stroke-width:2}
.trade-board .trade-raid-loot text{font:800 11px system-ui,sans-serif;fill:#fff2d2;paint-order:stroke;stroke:#183336;stroke-width:3px}

.trade-fence-preview{display:block;width:100%;height:180px;margin:16px 0;border:1px solid #416263;border-radius:10px;background:#163237}
.trade-building-route-preview{margin:10px 0}
.trade-building-route-preview svg{display:block;width:100%;height:clamp(105px,24vh,185px);border:1px solid #416263;border-radius:10px;background:#163237}
.trade-building-route-preview figcaption{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:6px;color:#cfddd6;font-size:12px}
.trade-fence-cost{padding:14px;border:1px solid #647f70;border-radius:10px;background:#203f3b}
.trade-fence-cost h3{margin:0 0 12px;font-size:15px}
.trade-fence-cost>span{display:inline-flex;align-items:center;gap:6px;margin:0 18px 6px 0}
.trade-fence-cost img{width:29px;height:40px;object-fit:cover;border-radius:4px}
.trade-fence-status{color:#efc783}

/* Route choices keep their action visible while instructions and maps scroll. */
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi])[open]{display:flex;flex-direction:column;width:min(680px,calc(100vw - 24px));max-width:680px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:16px;overflow:hidden}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .modal-head{flex:none;align-items:flex-start;gap:12px;margin-bottom:10px}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .modal-head h2{font-size:22px;line-height:1.2;margin:0;overflow-wrap:anywhere}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .modal-head>button{flex:none}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .trade-route-panel,#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .trade-route-form{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;min-width:0;gap:0;margin:0;overflow:hidden}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .trade-route-scroll{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:6px}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .trade-route-actions{flex:none;display:grid;gap:6px;padding-top:10px;margin-top:8px;border-top:1px solid #49645a;background:var(--panel,#1c343a)}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .trade-route-actions>button{width:100%;min-height:42px;margin:0;padding:10px 12px;font-size:13px;line-height:1.3}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) p{font-size:12px;line-height:1.45;margin:6px 0}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) label{font-size:12px;line-height:1.4;margin-bottom:8px}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) select{min-width:0;min-height:40px;padding:8px 10px;margin-top:4px;font-size:13px}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .form-row{gap:10px}
#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .trade-fence-preview{height:140px;margin:8px 0}
#modal[data-trade-camp-build] .trade-camp-intro{gap:10px;margin-bottom:9px}
#modal[data-trade-camp-build] .trade-camp-intro h3{font-size:16px;margin:0 0 4px}
#modal[data-trade-camp-build] .trade-camp-preview{width:58px;height:52px}
#modal[data-trade-camp-build] .trade-camp-materials{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
#modal[data-trade-camp-build] .trade-camp-materials .trade-material{flex:1 1 140px;min-width:0;gap:6px;padding:5px 7px}
#modal[data-trade-camp-build] .trade-camp-materials .trade-material>img{width:24px;height:30px}
#modal[data-trade-camp-build] .trade-camp-materials .trade-material b{font-size:12px}
#modal[data-trade-camp-build] .trade-camp-connection-map{height:140px;max-height:none}
#modal[data-trade-camp-build] .trade-camp-connection-preview{margin-top:8px}
#modal[data-trade-camp-build] .trade-camp-connection-preview figcaption{gap:5px 14px;padding:7px 9px;font-size:11px}
#modal[data-trade-camp-build] [data-camp-site]{min-height:36px;font-size:12px;line-height:1.3;padding:7px 10px}
#modal[data-trade-camp-build] .trade-camp-route-details{border:1px solid #49685e;border-radius:8px;margin-top:8px;padding:8px 10px}
#modal[data-trade-camp-build] .trade-camp-route-details summary{font-size:12px;line-height:1.4;font-weight:650;color:#efd09f;cursor:pointer}
#modal[data-trade-camp-build] .trade-camp-route-about{display:flex;align-items:center;gap:8px;margin-top:8px}
#modal[data-trade-camp-build] .trade-camp-route-about .trade-camp-preview{width:36px;height:34px}
#modal[data-trade-camp-build] .trade-camp-site-note{font-size:11px;margin:7px 0 0}
#modal[data-trade-fence] .trade-route-illustration{width:78px;height:48px;max-height:48px;object-fit:contain;float:right;margin:0 0 6px 10px}
#modal[data-trade-fence] .form-row{clear:both}
#modal[data-trade-fence] .trade-fence-cost{padding:9px}
#modal[data-trade-fence] .trade-fence-cost h3{font-size:13px;margin:0 0 7px}
#modal[data-trade-fence] .trade-fence-cost>span{gap:5px;font-size:12px;margin:0 12px 3px 0}
#modal[data-trade-fence] .trade-fence-cost img{width:22px;height:30px}
#modal[data-trade-carrot] .trade-carrot-intro{align-items:flex-start;gap:10px;margin:0 0 10px}
#modal[data-trade-carrot] .trade-carrot-intro>img{width:32px;height:42px;flex:none}
#modal[data-trade-carrot] .trade-carrot-intro strong{font-size:13px}
#modal[data-trade-drachi] .trade-drachi-intro{align-items:flex-start;gap:10px;margin-bottom:8px}
#modal[data-trade-drachi] .trade-drachi-intro>img{width:54px;height:54px;flex:0 0 54px}
#modal[data-trade-drachi] .trade-drachi-intro h3{font-size:16px;margin:0 0 4px}
#modal[data-trade-drachi] .trade-drachi-buy{gap:8px;padding:9px;flex-direction:row;align-items:center}
#modal[data-trade-drachi] .trade-drachi-buy>span{grid-template-columns:25px auto;gap:3px 7px}
#modal[data-trade-drachi] .trade-drachi-buy img{width:25px;height:31px}
#modal[data-trade-drachi] .trade-drachi-buy strong{font-size:14px}
#modal[data-trade-drachi] .trade-drachi-buy button{width:auto;font-size:12px;padding:9px}
#modal[data-trade-drachi] .trade-drachi-status{gap:3px;padding:8px 10px;margin:8px 0}
#modal[data-trade-drachi] .trade-drachi-status>span{font-size:12px;line-height:1.45}
#modal[data-trade-drachi] .trade-drachi-route-summary{padding:8px}
#modal[data-trade-drachi] .trade-drachi-route-preview{height:130px;margin:6px 0}
#modal[data-trade-drachi] .trade-drachi-target-fields{margin-top:8px}
@media(max-width:480px){#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi])[open]{width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:12px}#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .modal-head h2{font-size:20px}#modal:is([data-trade-camp-build],[data-trade-fence],[data-trade-carrot],[data-trade-drachi]) .trade-route-actions>button{min-height:44px}#modal[data-trade-drachi] .trade-drachi-buy>span{min-width:0}}

.auth-art .auth-board{max-width:760px;margin:24px auto 0;transform:rotate(-8deg);opacity:1}
.auth-board .trade-home-board{height:auto}

button.trade-player{position:relative;width:100%;text-align:left;border:0;border-left:4px solid var(--player);padding:10px 28px 10px 10px;color:inherit;font-weight:400;cursor:pointer}
button.trade-player:hover{background:#314d48;box-shadow:inset 0 0 0 1px var(--player)}
button.trade-player:focus-visible{outline:2px solid #efcf95;outline-offset:3px}
.trade-player .trade-player-open{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:24px;color:#b9cfc6}
.trade-titles{display:grid;gap:8px;margin:0 0 14px}
.trade-shell .trade-title-disclosure{grid-column:1/-1;min-width:0;padding:0;border:0;margin:0 0 8px}
.trade-title-disclosure>.trade-title-toggle{display:flex;align-items:center;justify-content:initial;gap:8px;min-height:34px;padding:7px 10px;list-style:none;border:1px solid #64745a;border-radius:7px;background:#29443e;color:#efd09a;font-size:12px;line-height:1.3}
.trade-title-toggle::-webkit-details-marker{display:none}
.trade-title-toggle::before{content:'›';font-size:18px;line-height:1;transform:rotate(0deg)}
.trade-title-disclosure[open]>.trade-title-toggle::before{transform:rotate(90deg)}
.trade-title-disclosure>.trade-title-toggle>span{margin-left:auto;color:#c7d1bd;font-size:10px}
.trade-title-toggle:hover{background:#365247}
.trade-title-toggle:focus-visible{outline:2px solid #efcf95;outline-offset:3px}
.trade-title-disclosure>.trade-titles{margin:8px 0 0}
@media(pointer:coarse){.trade-title-disclosure>.trade-title-toggle{min-height:44px}}
.trade-title{min-width:0;padding:9px 10px;border:1px solid #64745a;border-left:3px solid var(--title-player);border-radius:7px;background:linear-gradient(120deg,#3a4c3b,#243e3b)}
.trade-title-illustrated{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:9px;align-items:start}
.trade-title-illustrated>.trade-title-image{grid-column:1;grid-row:1/span 2;align-self:center;display:block;width:48px;height:56px;object-fit:contain}
.trade-title-illustrated>.trade-title-heading,.trade-title-illustrated>.trade-title-progress{grid-column:2;min-width:0}
.trade-title-heading{display:flex;align-items:flex-start;flex-wrap:wrap;gap:5px 8px}
.trade-title-heading h4{flex-basis:100%;font-family:inherit;font-size:16.5px;line-height:1.15;color:#f2d492;margin:0;font-weight:750;overflow-wrap:anywhere}
.trade-title-bonus{color:#ffe0a2;background:#9f823826;padding:2px 5px;border-radius:4px;font-size:9.75px;line-height:1.3;white-space:nowrap}
.trade-title-progress{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 8px;margin-top:7px}
.trade-titles .trade-title-holder{min-width:0;padding:0;background:none;border:0;border-radius:3px;text-align:left;color:#e0e7da;font-size:10.5px;line-height:1.35;overflow-wrap:anywhere;cursor:pointer}
.trade-title-holder:hover{color:#ffe0a2}.trade-title-holder:focus-visible{outline:2px solid #efcf95;outline-offset:3px}
.trade-title-count,.trade-title-unassigned{color:#bfcec0;font-size:9.75px;line-height:1.35;font-variant-numeric:tabular-nums}
.trade-titles .trade-title-rule{margin:1px 0 0;color:#afc2b5;font-size:9px;line-height:1.45}
.trade-right button.trade-player{padding:8px 26px 8px 10px;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start;font-size:13.5px}
.trade-right button.trade-player.trade-player-has-titles{grid-template-columns:minmax(0,1fr) 48px}
.trade-right .trade-player .trade-player-name{grid-column:1/-1;min-width:0;font-size:13.5px;line-height:1.3;overflow-wrap:anywhere}
.trade-right .trade-player .trade-player-details{display:grid;gap:6px;min-width:0}
.trade-right .trade-player-details>.player-portrait{width:40px;height:40px;float:none;margin:0}
.trade-right .trade-player .trade-player-score{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;min-width:0;font-size:15px;line-height:1.3}
.trade-right .trade-player .trade-player-score-value{flex:1 1 110px;min-width:0;font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.trade-right .trade-player .trade-player-details>small{font-size:10.5px;line-height:1.4;overflow-wrap:anywhere}
.trade-right .trade-player .trade-player-trophies{display:grid;gap:4px;align-self:center;justify-items:center;width:48px}
.trade-right .trade-player-trophy{display:block;width:48px;height:56px;object-fit:contain}
@media(max-width:1100px) and (min-width:801px){.trade-titles{grid-template-columns:repeat(2,minmax(0,1fr))}.trade-titles .trade-title-rule{grid-column:1/-1}}
@media(pointer:coarse) and (max-width:1366px){.trade-shell .trade-right .trade-sidebar-content{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}}

#modal[data-trade-player]{width:min(680px,calc(100vw - 28px))}
.trade-right .trade-sidebar-content>.trade-titles{grid-column:1/-1}
.trade-score-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;border:1px solid #516e60;border-left:5px solid var(--player);border-radius:12px;background:#23423f}
.trade-score-summary>div{min-width:0}
.trade-score-summary strong{font-size:18px;overflow-wrap:anywhere}
.trade-score-summary p{margin:7px 0 0;font-size:12px;color:#b7cbc1}
.trade-score-summary>span{display:grid;grid-template-columns:auto auto;align-items:center;gap:4px 8px;flex-shrink:0;color:#efcf95}
.trade-score-summary b{font-size:30px;text-align:center}
.trade-score-summary small{grid-column:1/-1;text-align:center;font-size:11px}
.trade-score-intro,.trade-score-legacy{font-size:13px;line-height:1.6;color:#bed0c7}
.trade-player-activity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.trade-player-activity article{min-width:0;padding:12px;border:1px solid #516e60;border-radius:9px;background:#23423f}
.trade-player-metric-heading{display:flex;align-items:center;gap:10px}
.trade-player-metric-value{font-size:26px;line-height:1;color:#efcf95;font-variant-numeric:tabular-nums}
.trade-player-metric-heading>span{font-size:12px;font-weight:700;line-height:1.4;color:#e4e9dd}
.trade-player-metric-title{margin:9px 0 5px;font-size:12px;font-weight:700;line-height:1.4;color:#efcf95}
.trade-player-metric-progress,.trade-player-metric-rule{display:block;font-size:11px;line-height:1.5;color:#c8d7c5}
.trade-player-metric-rule{margin-top:5px;color:#aac0b4}
@media(max-width:520px){.trade-player-activity{grid-template-columns:1fr}}
.trade-score-legacy{padding:10px 12px;border:1px dashed #607669;border-radius:8px}
.trade-score-path{list-style:none;padding:0;margin:24px 0 4px}
.trade-score-path>li{position:relative;display:grid;grid-template-columns:46px minmax(0,1fr) 70px;align-items:center;gap:14px;min-height:82px;padding:12px 0}
.trade-score-path>li:not(:last-child)::after{content:'';position:absolute;left:22px;top:50%;bottom:-50%;width:2px;background:#527568}
.trade-score-marker{position:relative;z-index:1;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:#24493c;border:2px solid #7bb48f;color:#b8ebc3;font-weight:700;font-size:17px}
.trade-score-loss .trade-score-marker{background:#513934;border-color:#df9689;color:#ffd0c5}
.trade-score-start .trade-score-marker{background:#1d3439;border-color:#678277;color:#cfddd4}
.trade-score-finish .trade-score-marker{background:#534c32;border-color:#eac47e;color:#ffe0a5}
.trade-score-path strong{display:block;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.trade-score-path small{display:block;color:#b4c9be;font-size:11px;line-height:1.5;margin:3px 0}
.trade-score-total{text-align:right;color:#efcf95;font-size:22px;font-variant-numeric:tabular-nums}
.trade-score-total small{font-weight:400}
.trade-score-finish>div,.trade-score-finish>.trade-score-total{border-top:1px solid #52695e;padding-top:16px}
@media(max-width:520px){#modal[data-trade-player]{padding:18px 14px}.trade-score-summary{padding:12px;gap:10px}.trade-score-path>li{grid-template-columns:40px minmax(0,1fr) 62px;gap:10px}.trade-score-marker{width:40px;height:40px}.trade-score-path>li:not(:last-child)::after{left:19px}.trade-score-summary strong{font-size:15px}}

/* Two independent raw-resource choices for the final Friend contract. */
.trade-friend-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}.trade-friend-choice{display:grid;gap:8px;color:#d6e1db;font-size:13px}.trade-friend-choice>div{display:flex;align-items:center;gap:10px}.trade-friend-choice .trade-good-image,.trade-friend-placeholder{width:44px;height:54px;flex-shrink:0;border-radius:6px;object-fit:cover}.trade-friend-placeholder{display:grid;place-items:center;font-size:27px;border:1px dashed #7c9689;color:#edce94;background:#24433e}.trade-friend-choice select{width:100%;min-width:0}.trade-friend-choices+ .hint{font-size:12px;line-height:1.5}
@media(max-width:560px){.trade-friend-choices{grid-template-columns:1fr}}
.trade-drachi-swap .trade-storage-slot .trade-drachi-recipe-art{object-fit:contain}
/* Optional browser-only tutorial. Header, board columns and inventory stay put. */
.trade-tutorial-controls{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid #63817b55}
.trade-tutorial-controls[hidden],.trade-tutorial-popup[hidden]{display:none}
.trade-tutorial-popup{position:fixed;right:clamp(12px,20vw,290px);bottom:calc(var(--trade-dock-height,78px) + 12px);z-index:40;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - var(--trade-dock-height,78px) - var(--trade-header-height,90px) - 32px);overflow:auto;overscroll-behavior:contain;padding:18px 20px;border:1px solid #e8bd72;border-radius:16px;background:#203e40;box-shadow:0 12px 40px #0008;color:#eee8d7;text-align:left}
.trade-tutorial-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.trade-tutorial-heading .eyebrow{font-size:11px;color:#efc982;letter-spacing:1.6px}
.trade-tutorial-heading button{flex:none}
.trade-tutorial-popup h2{font-size:25px;line-height:1.15;margin:0 0 12px;color:#ffe2a8}
.trade-tutorial-popup p{font-size:15px;line-height:1.65;margin:0 0 16px;color:#e0e7df}
.trade-tutorial-topics{font-size:12px;color:#bdcfc8}.trade-tutorial-topics summary{cursor:pointer;color:#efcf95;padding:4px 0}.trade-tutorial-topics label{display:grid;gap:6px;margin-top:8px}
.trade-tutorial-topics select{width:100%;min-width:0;font-size:13px;padding:10px}
.trade-tutorial-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}
.trade-tutorial-off{margin-left:auto}.trade-tutorial-navigation button{padding:8px 10px}
.trade-tutorial-note{display:block;margin-top:12px;font-size:11px;line-height:1.5;color:#baccc5;text-align:center}
body:has(dialog[open]) .trade-tutorial-popup,body:has(.trade-raid-running) .trade-tutorial-popup{display:none}
@media(max-width:700px){.trade-tutorial-popup{left:12px;right:12px;width:auto;padding:14px 16px}.trade-tutorial-popup h2{font-size:22px}.trade-tutorial-popup p{font-size:14px}}

.trade-final-shipping-status{margin:0 0 10px;padding:7px 10px;border:1px solid #81936c;border-radius:8px;background:#304c3f;color:#f1d59c;font-size:12px;font-weight:600;line-height:1.4}
.trade-staggered-roles{margin:10px 0;padding:9px;border:1px solid #6f866d;border-radius:8px;background:#28453e}
.trade-staggered-roles h3{margin:0 0 7px;font-size:13px}
.trade-staggered-roles ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.trade-staggered-roles li{min-width:0;padding:6px 7px;border-left:3px solid #778c74;background:#1d3837;border-radius:4px}
.trade-staggered-roles li.active{border-left-color:#efcf95}.trade-staggered-roles li.ready{opacity:.75}
.trade-staggered-roles strong,.trade-staggered-roles span{display:block;overflow-wrap:anywhere;font-size:11px;line-height:1.4}
.trade-staggered-roles span{color:#c2d2c1}.trade-staggered-roles .own strong{color:#f4d59f}
.trade-staggered-guide .trade-turn-heading{flex-wrap:wrap}.trade-staggered-guide .trade-turn-heading h3{font-size:15px}
.trade-staggered-guide .trade-staggered-notice{margin:8px 0;font-size:11px;line-height:1.6;color:#c4d5c7}
#trade-production-limit-notice{width:min(440px,calc(100vw - 28px));max-width:440px;max-height:calc(100dvh - 28px);padding:22px;overflow:auto}
#trade-production-limit-notice::backdrop{background:#07191b66;backdrop-filter:none}
#trade-production-limit-notice .modal-head{margin-bottom:14px}
#trade-production-limit-notice h2{font-size:23px;line-height:1.2;overflow-wrap:anywhere}
#trade-production-limit-notice p{font-size:15px;line-height:1.6;margin:0 0 18px}
#trade-production-limit-notice button{min-height:44px}
#trade-skill-confirm-dialog{width:min(480px,calc(100vw - 28px));max-width:480px;max-height:calc(100dvh - 28px);padding:22px;overflow:auto}
#trade-skill-confirm-dialog::backdrop{background:#07191b66;backdrop-filter:none}
#trade-skill-confirm-dialog .modal-head{margin-bottom:14px}
#trade-skill-confirm-dialog h2{font-size:23px;line-height:1.2;overflow-wrap:anywhere}
#trade-skill-confirm-dialog p{font-size:15px;line-height:1.6}
.trade-skill-confirm-bonus{color:#efd09a}
.trade-skill-confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:20px}
.trade-skill-confirm-actions button{min-height:44px;flex:1 1 140px}

/* Keep the map readable around the production warehouse. Touch layouts retain
   their existing space and targets; the Camp column needs 620px of content. */
#modal[data-trade-shipping]::backdrop{background:#07191b33;backdrop-filter:none}
@media(min-width:1000px) and (pointer:fine){
 #modal[data-trade-shipping]{width:680px;max-width:calc(100vw - 32px);max-height:72vh;max-height:72dvh;margin:auto 16px auto auto;padding:12px;scroll-padding:12px}
 #modal[data-trade-shipping] .trade-shipping-overview{gap:8px;margin-bottom:10px}
 #modal[data-trade-shipping] .trade-shipping-overview>article{padding:9px}
 #modal[data-trade-shipping] .trade-shipping-hall-title{gap:6px;font-size:12px}
 #modal[data-trade-shipping] .trade-storage-slots{gap:4px;margin:8px 0}
 #modal[data-trade-shipping] .trade-production-info{margin-top:9px;padding-top:8px}
 #modal[data-trade-shipping] .trade-production-info h4{margin-bottom:6px}
 #modal[data-trade-shipping] .trade-mill-recipes{gap:10px 12px}
 #modal[data-trade-shipping] .trade-recipe+.trade-recipe{margin-top:8px}
 #modal[data-trade-shipping] .trade-mill-recipes .trade-recipe+.trade-recipe{margin-top:0}
 #modal[data-trade-shipping] .trade-sale-products{gap:8px 6px}
 #modal[data-trade-shipping] .trade-sale-product>.trade-storage-slot{width:40px}
}

#trade-gen-z-warning{width:min(480px,calc(100vw - 28px));max-width:480px;max-height:calc(100dvh - 28px);padding:22px;overflow:auto}
#trade-gen-z-warning::backdrop{background:#07191b66;backdrop-filter:none}
#trade-gen-z-warning h2{font-size:23px;line-height:1.2;margin:0}
.trade-action-warning p,.trade-action-warning li{font-size:14px;line-height:1.6}
.trade-action-warning ul{padding-left:20px;margin:14px 0}
.trade-action-warning-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.trade-action-warning-buttons button{min-height:44px;flex:1 1 150px}

.trade-tutorial-details{margin:0 0 10px;color:#cfddcc;font-size:13px}
.trade-tutorial-details>summary{cursor:pointer;color:#efcf95;padding:6px 0}
.trade-tutorial-popup .trade-tutorial-details p{font-size:13px;line-height:1.55;margin:8px 0 12px}
.trade-tutorial-navigation{flex-wrap:wrap}
@media(pointer:coarse){.trade-tutorial-popup button,.trade-tutorial-popup summary,.trade-tutorial-popup select{min-height:44px}.trade-tutorial-popup summary{display:flex;align-items:center}.trade-tutorial-navigation button{white-space:normal}}
