/* Original port-office design: limestone, walnut, brass and harbour green. */
#title .box.ui2d-window{padding:0;width:min(820px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 32px);box-sizing:border-box;border:3px solid #684a2a;border-radius:4px;background:#f3e8ce;box-shadow:0 18px 70px #171c1bbb,inset 0 0 0 2px #c8a968;text-align:left;overflow:auto;color:#302719}
.ui2d-heading{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:14px;padding:16px 20px;background:linear-gradient(110deg,#3d5246,#243b34);color:#fff0cd;border-bottom:3px double #c6a56c;box-shadow:0 3px 10px #30271933}
.ui2d-heading h2{font:27px Georgia,serif;margin:0;letter-spacing:.4px}.ui2d-heading>span{font-size:30px;color:#dec28a}.ui2d-heading button{margin-left:auto;min-height:44px;padding:8px 14px;white-space:nowrap}
.ui2d-content{padding:20px}.ui2d-intro{display:flex;align-items:center;gap:16px;justify-content:space-between;border-bottom:1px solid #cdb78d;padding-bottom:16px}.ui2d-intro p{margin:0;font:15px/1.5 Georgia,serif;color:#5a4a32}.ui2d-count{flex:none;border:1px solid #b49b68;background:#e4d4ad;padding:7px 12px;border-radius:20px;font:13px Georgia,serif}.ui2d-tools{display:flex;justify-content:flex-end;margin:14px 0}.ui2d-tools button{min-height:44px;padding:8px 14px}
.ui2d-messages{display:grid;gap:10px}.ui2d-message{display:flex;align-items:flex-start;gap:14px;text-align:left;width:100%;box-sizing:border-box;padding:16px;margin:0;border:1px solid #c2ae85;border-left:4px solid #c2ae85;border-radius:3px;background:#ede2c7;color:#55472f;box-shadow:0 2px 3px #644c2310;text-shadow:none;letter-spacing:0}.ui2d-message.is-unread{background:#fff7e3;border-left-color:#496c55;color:#302719}.ui2d-message:hover:not(:disabled){filter:none;background:#fffbed}.ui2d-message:active:not(:disabled){transform:none}.ui2d-message:focus-visible{outline:3px solid #496c55;outline-offset:2px}.ui2d-seal{display:grid;place-items:center;width:42px;height:42px;flex:none;border:1px solid #ad9462;border-radius:50%;background:#e1d0a5;color:#49614b;font:25px Georgia,serif}.ui2d-letter{min-width:0;flex:1}.ui2d-message-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;font:12px/1.4 Georgia,serif;color:#766445;margin-bottom:7px}.ui2d-message-meta b{color:#405e4a;font-weight:bold}.ui2d-read{margin-left:auto;font-size:11px;text-transform:uppercase;letter-spacing:.8px}.is-unread .ui2d-read{color:#405e4a;font-weight:bold}.ui2d-message-text{display:block;font:16px/1.55 Georgia,serif;overflow-wrap:anywhere}.ui2d-empty{text-align:center;padding:48px 16px;color:#766445}.ui2d-empty>span{font-size:48px}
@media(max-width:600px){#title .box.ui2d-window{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.ui2d-heading{padding:12px;gap:10px}.ui2d-heading h2{font-size:23px}.ui2d-heading>span{font-size:25px}.ui2d-content{padding:12px}.ui2d-intro{align-items:flex-start;flex-direction:column;gap:10px;padding-bottom:12px}.ui2d-message{gap:10px;padding:12px 10px}.ui2d-seal{width:30px;height:30px;font-size:21px}.ui2d-message-meta{gap:6px 10px}.ui2d-read{margin-left:0}.ui2d-message-text{font-size:15px}.ui2d-tools button{width:100%}}
.ui2d-hall-window{border:3px solid #684a2a;outline-color:#c8a968;width:680px;box-sizing:border-box}.ui2d-hall-window .city-window-handle{background:linear-gradient(110deg,#3d5246,#243b34);color:#fff0cd;border-bottom:3px double #c6a56c;padding:14px 16px}.ui2d-hall-window .city-window-title{font-size:25px}.ui2d-hall-window .city-panel-host{padding:16px}.ui2d-hall-window button{min-height:44px}.ui2d-hall-window .tabs{display:none}.ui2d-hall{font:15px/1.5 Georgia,serif;color:#302719}.ui2d-hall-intro{color:#685437;margin:0 0 16px}.ui2d-officers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ui2d-hall-card{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid #c5ae80;background:#fff6e0;min-width:0}.ui2d-hall-card>span{font-size:26px;color:#52674a}.ui2d-hall-card h4{margin:0 0 6px;font-size:13px;font-variant:small-caps;color:#74613d}.ui2d-hall-card p{margin:0;overflow-wrap:anywhere}.ui2d-officers .ui2d-hall-card:first-child{grid-column:1/-1;background:#e3d4ae;border-color:#ac9259}.ui2d-officers .ui2d-hall-card:first-child p{font-size:21px}.ui2d-standing{border-left:4px solid #52674a;padding:12px;background:#e4e6cc}.ui2d-hall h3{font:21px Georgia,serif;border-bottom:1px solid #bba373;padding-bottom:8px;margin:20px 0 12px}.ui2d-duties{display:grid;gap:10px}.ui2d-hall-ledger{margin-top:14px;padding:4px 16px;background:#e5d7b7;border:1px solid #bba373}.ui2d-meeting{border-top:1px solid #c0aa7a;padding-top:12px;color:#405e4a}.ui2d-hall-note{font-size:13px;font-style:italic;color:#786648}.ui2d-city-lines{border:1px solid #c5ae80;padding:0 12px;background:#ede3ca}
@media(max-width:600px){body.in-city-3d .city-window.ui2d-hall-window{top:38px;right:6px;width:calc(100vw - 12px);max-width:none;max-height:calc(100dvh - var(--game-header-height,120px) - 220px)}.ui2d-hall-window .city-panel-host{padding:12px}.ui2d-officers{grid-template-columns:1fr}.ui2d-hall-window .city-window-title{font-size:22px}.ui2d-hall-card{padding:12px}.ui2d-hall{font-size:15px}}
body.in-city-3d .city-window.ui2d-market-window{max-height:calc(100dvh - 172px)}.ui2d-market-window .city-window-handle{background:linear-gradient(110deg,#3d5246,#243b34);color:#fff0cd;border-bottom:3px double #c6a56c;padding:14px 16px}.ui2d-market-window .tabs{display:none}.ui2d-market-window button{min-height:44px}.ui2d-market-window .city-panel-host{padding:16px}.ui2d-market-intro{padding:12px 16px;background:#e5d7b7;border:1px solid #bba373;margin:12px 0}.ui2d-market-intro h3{margin:0 0 8px;font:23px Georgia,serif}.ui2d-market-intro p{margin:0}.ui2d-market{font:15px/1.5 Georgia,serif}.ui2d-market th{padding:10px 8px;color:#405e4a;font-size:13px}.ui2d-market tbody{border:1px solid #c5ae80;background:#fff6e0}.ui2d-market tbody:nth-child(odd){background:#eee2c4}.ui2d-market td{padding:12px 8px}.ui2d-market td:first-child{font-weight:bold}.ui2d-market .deal td{padding:0 8px 14px;font-weight:normal;line-height:1.5}.ui2d-market .deal small{display:block;margin-top:6px;color:#685437}.ui2d-market .qty button{min-width:38px}.ui2d-market .qty b{padding:0 6px}.ui2d-market svg.gi{width:28px;height:28px}.ui2d-market-window .rumor{display:flex;flex-wrap:wrap;gap:8px}.ui2d-market-window input,.ui2d-market-window select{min-height:44px;box-sizing:border-box;font:15px Georgia,serif;max-width:100%;border:1px solid #aa9367;background:#fff7e3;padding:8px}
@media(max-width:650px){.ui2d-market-window .city-panel-host{padding:10px;font-size:15px}.ui2d-market{display:block;width:100%;border-collapse:separate}.ui2d-market thead{display:none}.ui2d-market tbody{display:block;border-radius:3px;margin-bottom:12px;padding:12px;box-shadow:0 2px 3px #644c2310}.ui2d-market tr{display:flex;flex-wrap:wrap;gap:8px}.ui2d-market td{display:block;text-align:left;padding:0;font-weight:normal;min-width:0}.ui2d-market tr:not(.deal)>td:first-child{width:100%;font-size:19px;border-bottom:1px solid #d5c398;padding-bottom:8px}.ui2d-market td[data-label]:not(.qty){flex:1;min-width:75px;font-size:15px}.ui2d-market td[data-label]::before{content:attr(data-label);display:block;font-size:12px;color:#766445;font-weight:normal;margin-bottom:3px}.ui2d-market td.qty{width:100%;white-space:normal;margin:4px 0}.ui2d-market .qty b{display:inline-block;min-width:26px;text-align:center}.ui2d-market .deal{margin-top:6px}.ui2d-market .deal td{padding:0;border:0;width:100%;font-size:14px}.ui2d-market .deal button{padding:8px;margin:2px}.ui2d-market-window .rumor>*{flex:1;min-width:110px}.ui2d-market-window .rumor input{width:110px}}
/* Almacén and Banco (ui2d): the same controls, framed as port-office ledgers. */
.ui2d-store-window,.ui2d-bank-window{border:3px solid #684a2a;outline-color:#c8a968;box-sizing:border-box}
.ui2d-store-window .city-window-handle,.ui2d-bank-window .city-window-handle{background:linear-gradient(110deg,#3d5246,#243b34);color:#fff0cd;border-bottom:3px double #c6a56c}
.ui2d-store-head{display:flex;align-items:center;gap:14px;padding:6px 0 12px;border-bottom:1px solid #cdb78d;margin-bottom:12px}.ui2d-store-head>span{font-size:30px;color:#684a2a}
.ui2d-store-head h3{margin:0;font:24px Georgia,serif;color:#302719}.ui2d-store-head p{margin:4px 0 0;font:14px/1.45 Georgia,serif;color:#5a4a32}
.ui2d-store-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin-bottom:14px}
.ui2d-store-tile{border:1px solid #c2ae85;border-left:4px solid #3d5246;border-radius:3px;background:#ede2c7;padding:8px 10px}.ui2d-store-tile small{display:block;color:#6b5a3c}.ui2d-store-tile b{font:20px Georgia,serif;color:#302719}
.ui2d-store-note{padding:10px 12px;border:1px dashed #b49b68;background:#efe4c8;border-radius:3px;font:14px Georgia,serif;color:#5a4a32}
.ui2d-store-body table{width:100%;border-collapse:separate;border-spacing:0 6px}.ui2d-store-body td,.ui2d-store-body th{padding:8px 10px;background:#ede2c7;border-top:1px solid #c2ae85;border-bottom:1px solid #c2ae85}.ui2d-store-body th{background:#e0d1a8;font:12px Georgia,serif;color:#5a4a32;text-transform:uppercase;letter-spacing:.5px}
.ui2d-store-body td:first-child,.ui2d-store-body th:first-child{border-left:1px solid #c2ae85;border-radius:3px 0 0 3px}.ui2d-store-body td:last-child,.ui2d-store-body th:last-child{border-right:1px solid #c2ae85;border-radius:0 3px 3px 0}
.ui2d-store-body button{min-height:36px;padding:6px 12px;margin:2px}.ui2d-bank .card{border:1px solid #c2ae85;border-left:4px solid #b49b68;background:#ede2c7;border-radius:3px;padding:10px 12px;margin:8px 0}
@media(max-width:600px){.ui2d-store-window,.ui2d-bank-window{width:calc(100vw - 12px)}.ui2d-store-head h3{font-size:21px}.ui2d-store-body button{min-height:44px}.ui2d-store-body td,.ui2d-store-body th{padding:6px}}
/* Desktop space: the bottom bar already switches windows, so the duplicate tab strip goes; the window closes with its button. */
.ui2d-store-window .tabs,.ui2d-bank-window .tabs{display:none}
.ui2d-store-window #panel>p,.ui2d-bank-window #panel>p{margin:4px 0}
.ui2d-store-head{padding:2px 0 8px;margin-bottom:8px;gap:10px}.ui2d-store-head>span{font-size:24px}.ui2d-store-head h3{font-size:21px}
.ui2d-store-tiles{margin-bottom:8px}.ui2d-store-tile{padding:5px 10px}.ui2d-store-tile b{font-size:17px}

#title .box.ui2d-reports{width:min(1120px,calc(100vw - 32px))}.ui2d-reports .ui2d-content{padding:16px 22px 28px}.ui2d-report-nav{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:16px;border-bottom:1px solid #bba373}.ui2d-report-nav button{display:block;padding:10px 14px;border:1px solid #aa9367;background:#e4d4ad;color:#304c3c;text-decoration:none;font:15px Georgia,serif}.ui2d-report-nav button:hover,.ui2d-report-nav button:focus-visible{background:#fff6e0;outline:2px solid #496c55;outline-offset:1px}.ui2d-report-section{scroll-margin-top:94px;margin-top:22px;font:15px/1.55 Georgia,serif;color:#302719}.ui2d-report-section>h3{font:24px Georgia,serif;color:#405e4a;margin:0 0 14px;padding-bottom:10px;border-bottom:2px solid #bba373}.ui2d-report-section>.card{border:1px solid #c2ae85;border-left:4px solid #52674a;background:#fff6e0;padding:16px 18px;margin:12px 0;box-shadow:none}.ui2d-report-section>.card>b:first-child{font:21px Georgia,serif;color:#405e4a}.ui2d-report-section small{font-size:14px;line-height:1.65}.ui2d-report-section table{width:100%;border-collapse:collapse;margin:12px 0;text-align:left}.ui2d-report-section th{font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#405e4a;background:#e4d4ad;padding:9px 12px}.ui2d-report-section td{padding:8px 12px;border-bottom:1px solid #d3c29c}.ui2d-report-section tr:nth-child(even) td{background:#eee3c8}.ui2d-report-section caption{text-align:left;font-size:17px;color:#405e4a;margin-bottom:8px}.ui2d-report-section>p{padding:12px 14px;background:#e5d7b7;border:1px solid #c5ae80}
/* Desktop trading desk: readable rows rather than oversized mobile-style cards. */
.market-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:8px 0}.market-tools label{font-size:13px}.market-tools input[type=search]{width:160px}.market-tools input[type=checkbox]{min-height:0}.market-destination{display:block;font-weight:normal;font-size:12px;color:#405e4a;max-width:220px}.market-compare-note{font-size:12px;color:#685437;margin:6px 0}.market-quantity{width:60px;text-align:center;box-sizing:border-box}
@media(min-width:900px){.ui2d-market-window .city-window-handle{padding:8px 12px}.ui2d-market-window .city-panel-host{padding:8px 14px}.ui2d-market-window button{min-height:30px;padding:4px 8px}.ui2d-market-window input,.ui2d-market-window select{min-height:30px;padding:4px}.ui2d-market-intro{padding:7px 10px;margin:6px 0;display:flex;justify-content:space-between;align-items:center;gap:12px}.ui2d-market-intro h3{margin:0;font-size:21px}.ui2d-market{width:100%;font-size:14px}.ui2d-market th{padding:5px 8px}.ui2d-market td{padding:5px 8px}.ui2d-market .deal td{padding:0 8px 6px}.ui2d-market .deal br{display:none}.ui2d-market .deal small{display:inline;margin-left:12px;font-size:12px}.ui2d-market .qty{white-space:nowrap}.ui2d-market .qty button{min-width:27px}.ui2d-market svg.gi{width:22px;height:22px}}
@media(min-width:900px){.ui2d-market-window .port-ship-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}.ui2d-market-window .port-ship-summary br{display:none}.ui2d-market-window .port-ship-summary p{margin:0}.ui2d-market-window .port-ship-summary+div{font-size:12px;margin:4px 0}}

/* Compact one-view market (Patrician 3 style trading-goods table) */
.mkt-tools{margin:4px 0;gap:10px;flex-wrap:nowrap;align-items:center}.mkt-tools label{white-space:nowrap}.mkt-tools input[type=search]{width:120px}.mkt-tools select{max-width:150px}
.mkt-preview{min-height:18px;margin:2px 0 4px;padding:2px 8px;font-size:12px;line-height:18px;color:#685437;background:#f1e6c9;border:1px solid #d5c398;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mkt-table{display:block;width:100%;font:13px/1.2 Georgia,serif}
.mkt-heads,.mkt-grid{display:grid;grid-template-columns:1fr;column-gap:12px}
.mkt-head,.mkt-row{display:grid;grid-template-columns:minmax(90px,1.4fr) minmax(54px,.8fr) minmax(70px,1fr) 34px 40px 84px 84px;align-items:center;column-gap:6px}
.mkt-head{padding:2px 4px;font-size:11px;color:#405e4a;font-weight:bold;border-bottom:1px solid #c5ae80}.mkt-head>div{overflow:hidden;white-space:nowrap}.mkt-head .mkt-hold,.mkt-head .mkt-avg{text-align:right}.mkt-head2{display:none}
.mkt-row{min-height:26px;padding:1px 4px;border-bottom:1px solid #d5c398;background:#fff6e0}.mkt-row:nth-child(odd){background:#eee2c4}
.mkt-good{display:flex;align-items:center;gap:4px;font-weight:bold;overflow:hidden;white-space:nowrap}.mkt-good span{overflow:hidden;text-overflow:ellipsis}.mkt-good svg.gi{width:20px;height:20px;flex:none}
.mkt-price,.mkt-stock,.mkt-hold,.mkt-avg{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mkt-price small.market-destination{display:block;font-size:10px;line-height:1.1;max-width:none}
.mkt-hold,.mkt-avg{text-align:right}
.ui2d-market-window .mkt-pill,.mkt-pill{min-height:22px;padding:1px 6px;font-size:12px;width:100%;box-sizing:border-box;white-space:nowrap;border-radius:11px}
.mkt-qtybar{display:flex;align-items:center;gap:6px;margin:6px 0 4px;font-size:13px}.mkt-qtybar span{font-weight:bold;margin-right:4px}
.ui2d-market-window .mkt-qtybar button{min-height:26px;min-width:38px;padding:2px 8px;border-radius:13px}.mkt-qtybar button.on{background:#405e4a;color:#fff0cd;border-color:#243b34}
.mkt-alerts{margin:6px 0 0;font-size:13px}.mkt-alerts summary{cursor:pointer;font-weight:bold}.mkt-alerts h4{margin:4px 0}
@media(max-width:899px){.mkt-row,.mkt-head{grid-template-columns:minmax(80px,1.3fr) 54px 70px 30px 36px 76px 76px;font-size:12px}}
@media(max-width:650px){.ui2d-market-window .mkt-table{display:block}.mkt-tools{flex-wrap:wrap}.mkt-row,.mkt-head{grid-template-columns:1fr 1fr;row-gap:2px;padding:4px}.mkt-head{display:none}.mkt-good{grid-column:1/-1}.mkt-hold,.mkt-avg{text-align:left}.ui2d-market-window .mkt-pill{min-height:34px}}
/* mkt fit tuning: single column (Marco 25/10), compact rows, tighter chrome */
@media(min-width:900px){.mkt-heads,.mkt-grid{grid-template-columns:minmax(0,1fr)}.mkt-head,.mkt-row{grid-template-columns:minmax(120px,1.6fr) minmax(60px,.9fr) minmax(80px,1.1fr) 40px 44px 78px 78px;column-gap:8px}.mkt-row{min-height:20px;padding:0 4px}.mkt-good svg.gi{width:18px;height:18px}.ui2d-market-window .mkt-pill{min-height:20px;padding:0 4px;font-size:11px}.mkt-tools{margin:2px 0}.mkt-tools input[type=search]{min-height:24px}.ui2d-market-window .mkt-tools input,.ui2d-market-window .mkt-tools select{min-height:24px;padding:1px 4px}.mkt-preview{margin:1px 0;min-height:16px;line-height:16px}.mkt-qtybar{margin:3px 0 1px}.ui2d-market-window .mkt-alerts{margin:2px 0 0}.ui2d-market-window .ui2d-market-intro p{margin:2px 0}.ui2d-market-window .mkt-qtybar button{min-height:22px;padding:0 8px}.ui2d-market-window .ui2d-market-intro{padding:3px 10px;margin:3px 0;display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}.ui2d-market-window .ui2d-market-intro h3{font-size:17px;margin:0}}
/* mkt fit one-view: the whole goods list visible without scroll at 1366x768 (Marco 25/10): P3-dense rows, minimal chrome */
@media(min-width:900px){body.in-city-3d .city-window.ui2d-market-window{max-height:calc(100dvh - var(--game-header-height,96px) - 38px)}.ui2d-market-window .city-window-handle{padding:3px 12px}.ui2d-market-window .city-panel-host{padding:3px 10px}.ui2d-market-window .port-ship-summary{flex-wrap:nowrap;font-size:12px;white-space:nowrap;overflow:hidden}.ui2d-market-window .port-ship-summary button{min-height:22px;padding:1px 6px}.ui2d-market-window .port-ship-summary+div{font-size:11px;margin:0}.ui2d-market-window .ui2d-market-intro{padding:2px 10px;margin:1px 0}.ui2d-market-window .ui2d-market-intro h3{font-size:15px;line-height:18px}.ui2d-market-window .mkt-tools{margin:1px 0;font-size:11px}.ui2d-market-window .mkt-tools input,.ui2d-market-window .mkt-tools select{min-height:20px;padding:0 4px;font-size:11px}.mkt-preview{margin:1px 0;min-height:12px;line-height:12px;padding:0 6px;font-size:11px}.mkt-head{font-size:10px;padding:0 4px}.mkt-row{min-height:14px;padding:0 4px;font-size:12px}.mkt-good svg.gi{width:14px;height:14px}.ui2d-market-window .mkt-pill{min-height:13px;padding:0 4px;font-size:10px}.mkt-qtybar{margin:1px 0 0;font-size:12px}.ui2d-market-window .mkt-qtybar button{min-height:18px;padding:0 6px}.ui2d-market-window .mkt-alerts{margin:1px 0 0;font-size:11px}.ui2d-market-window button{min-height:22px;padding:1px 8px}.ui2d-market-window .ui2d-market-intro p{font-size:12px}.ui2d-market-window .dest{font-size:11px;margin:1px 0;line-height:13px}}
/* mkt fit one-view, shorter viewports (1280x720 class): same density logic, trims chrome not fonts */
@media(min-width:900px) and (max-height:760px){body.in-city-3d .city-window.ui2d-market-window{max-height:calc(100dvh - var(--game-header-height,96px) - 36px)}.ui2d-market-window .city-window-handle{padding:2px 12px}.ui2d-market-window .city-panel-host{padding:2px 8px}.ui2d-market-window .port-ship-summary{font-size:11px}.ui2d-market-window .port-ship-summary+div{font-size:10px}.ui2d-market-window .ui2d-market-intro{padding:1px 8px}.ui2d-market-window .ui2d-market-intro h3{font-size:14px;line-height:16px}.ui2d-market-window .ui2d-market-intro p{font-size:11px}.ui2d-market-window .mkt-tools input,.ui2d-market-window .mkt-tools select{min-height:18px}.mkt-preview{min-height:11px;line-height:11px}.mkt-row{min-height:11px}.ui2d-market-window .mkt-pill{min-height:10px}.mkt-good svg.gi{width:12px;height:12px}.ui2d-market-window .city-window-title{font-size:16px}.mkt-qtybar{font-size:11px}.ui2d-market-window .mkt-qtybar button{min-height:16px}.ui2d-market-window button{min-height:20px}.ui2d-market-window .dest{font-size:10px;line-height:12px}.ui2d-market-window .city-window-handle{padding:1px 12px}.ui2d-market-window .city-panel-host{padding:1px 8px}.ui2d-market-window .ui2d-market-intro{padding:0 8px}.ui2d-market-window .port-ship-summary button{min-height:18px}.ui2d-market-window .mkt-tools input,.ui2d-market-window .mkt-tools select{min-height:16px}.ui2d-market-window button{min-height:18px}.ui2d-market-window .mkt-qtybar button{min-height:14px}.mkt-preview{min-height:10px;line-height:10px}.ui2d-market-window .port-ship-summary{line-height:14px}}
/* Route tab: compact P3-style stops table (active route and editor). Global: the route tab renders in the plain panel, not a ui2d window. */
.route-table{width:100%;border-collapse:collapse;margin:8px 0;font:15px Georgia,serif}
.route-table th{padding:6px 8px;color:#405e4a;font-size:13px;text-align:left;border-bottom:2px solid #bba373}
.route-table td{padding:6px 8px;border-bottom:1px solid #d3c29c;vertical-align:middle;text-align:left}
.route-table tbody tr:nth-child(even) td{background:#eee3c8}
.route-table select{max-width:100%}
.route-table input[type=number]{width:78px;box-sizing:border-box}
/* P3 visual route strip: port chips with what the ship buys/sells at each, arrows between, loop home */
.rpath-card{display:block}
.rpath-chain{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0}
.rpath-stop{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;padding:6px 10px;background:#eee3c8;border:1px solid #bba373;border-radius:10px;max-width:230px}
.rpath-stop b{color:#405e4a;font-size:15px}
.rpath-io{display:flex;flex-direction:column;gap:1px;font-size:13px;line-height:1.35}
.rpath-io svg{vertical-align:-3px}
.rpath-buy{color:#2e6b34}
.rpath-sell{color:#8a5a17}
.rpath-arrow{color:#8a6f3a;font-size:18px;line-height:1}
.rpath-home{font-size:16px}
.rpath-preview{border-style: dashed;opacity:.92}
/* Route editor: full-width selects so port/good names read complete, sensible column minimums. */
.route-editor select{width:100%}
.route-editor td:nth-child(2){min-width:6em}
.route-editor td:nth-child(3),.route-editor td:nth-child(5){min-width:5em}
.route-editor input[type=number]{width:50px;padding:6px 4px}
.route-editor .rt-x{min-width:32px;padding:4px 6px}
.route-editor td:last-child{white-space:nowrap}
