/* Tundra Trade Route — page-scoped presentation only.
 * Combat execution continues through the protected OmniSIM/Wilderness stack.
 */
.tundra-trade-route-page{
  --ttr-cyan:#73dcff;
  --ttr-blue:#0d628c;
  --ttr-deep:#041d30;
  --ttr-gold:#ffd56a;
}
.tundra-trade-route-page .omnisim-cinematic-hero{
  margin-bottom:16px;
}
body.tundra-trade-route-page .omnisim-cinematic-hero .omnisim-hero-stage{
  aspect-ratio:17/5!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  background:#061b2a;
}
body.frozen-battle-page.tundra-trade-route-page .omnisim-cinematic-hero .ttr-header-scene{
  width:100%!important;height:100%!important;object-fit:contain!important;object-position:center center!important;
  transform:none!important;filter:none!important;opacity:1!important;visibility:visible!important;
}
.tundra-trade-route-page .ttr-explainer{
  display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center;
  margin:0 0 18px;padding:15px 18px;
  border:1px solid color-mix(in srgb,var(--ttr-cyan) 34%,transparent);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(5,35,55,.94),rgba(8,64,88,.74));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 15px 34px rgba(0,0,0,.2);
  color:#eaf9ff;
}
.tundra-trade-route-page .ttr-explainer-mark{
  display:inline-grid;place-items:center;min-width:116px;min-height:44px;padding:0 14px;
  border:1px solid rgba(255,213,106,.55);border-radius:999px;
  background:linear-gradient(180deg,rgba(255,193,67,.22),rgba(141,85,5,.24));
  color:#ffe3a1;font-size:11px;font-weight:1000;letter-spacing:.16em;
}
.tundra-trade-route-page .ttr-explainer b{font-size:15px;letter-spacing:.01em}
.tundra-trade-route-page .ttr-explainer p{margin:5px 0 0;color:#bdd8e6;line-height:1.55;font-size:13px}

/* Frozen mode: keep the canonical DOM/state for protected mechanics, hide controls
 * that are not meaningful for solo-march truck raids. */
.tundra-trade-route-page .omnisim-context-band,
.tundra-trade-route-page .command-context,
.tundra-trade-route-page .command-meta-wrap,
.tundra-trade-route-page .command-toggle-row,
.tundra-trade-route-page .command-speed-wrap,
.tundra-trade-route-page .rail-global-tools,
.tundra-trade-route-page #optimizerRecommendations_def,
.tundra-trade-route-page #battleSetupViewSwitch,
.tundra-trade-route-page .formation-mode-toggle,
.tundra-trade-route-page .ratio-wrap,
.tundra-trade-route-page .battle-full-joiner-title,
.tundra-trade-route-page .battle-full-joiner-container,
.tundra-trade-route-page .battle-full-joiner-actions,
.tundra-trade-route-page .battle-full-joiner-help,
.tundra-trade-route-page .joiner-actions,
.tundra-trade-route-page [id$="_joinerContainer"]{
  display:none!important;
}
.tundra-trade-route-page .command-orbit{
  grid-template-columns:minmax(0,1fr) minmax(270px,430px)!important;
  justify-content:center;
}
.tundra-trade-route-page .command-core{grid-column:2;justify-self:center;width:100%}
.tundra-trade-route-page #optimizerRecommendations_att{grid-column:1;align-self:stretch}
.tundra-trade-route-page .command-dial{min-height:154px}
/* The modern Trucks command cards use the same full column geometry as OmniSIM. */
.tundra-trade-route-page #optimizeAttBtn{width:100%!important;max-width:none!important}
.tundra-trade-route-page #optimizeAttBtn .command-opt-label::after{
  content:' LEAD HEROES';
}
.tundra-trade-route-page .command-gen{inset:auto 50% 8px auto;transform:translateX(50%);z-index:4}

/* The center simulation dock becomes the truck-vs-truck battle scene. */
.tundra-trade-route-page .simulation-dock{
  position:relative;overflow:hidden;isolation:isolate;
  background:
    linear-gradient(180deg,rgba(2,18,31,.16),rgba(2,18,31,.78)),
    url('/static/image/tundra-trade-route/run-battle.webp') center/cover no-repeat!important;
  min-height:210px;
  border-color:rgba(115,220,255,.42)!important;
}
.tundra-trade-route-page .simulation-dock::before{
  content:'';position:absolute;inset:0;z-index:-1;
  box-shadow:inset 0 0 55px rgba(2,18,31,.58);
}
.tundra-trade-route-page .simulation-dock button,
.tundra-trade-route-page .simulation-dock .simulation-button,
.tundra-trade-route-page #multiFightBtn{position:relative;z-index:2}

/* A single total drives the exact integer 1:1:1 distribution. */
.tundra-trade-route-page .ttr-total-control{
  margin:10px 0 14px;padding:12px 14px;border-radius:14px;
  border:1px solid rgba(115,220,255,.26);background:rgba(3,29,45,.7);
  display:grid;grid-template-columns:1fr minmax(140px,190px);gap:12px;align-items:center;
}
.tundra-trade-route-page .ttr-total-copy b{display:block;color:#eaf9ff;font-size:13px}
.tundra-trade-route-page .ttr-total-copy small{display:block;color:#8eb4c8;margin-top:3px;line-height:1.35}
.tundra-trade-route-page .ttr-total-control input{
  width:100%;min-height:44px;border:1px solid rgba(115,220,255,.35);border-radius:10px;
  background:#061d2b;color:#f1fbff;font-weight:900;text-align:center;font-size:15px;
}
.tundra-trade-route-page .ttr-equal-badge{
  display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding:4px 8px;border-radius:999px;
  background:rgba(80,196,241,.12);border:1px solid rgba(115,220,255,.24);color:#9de8ff;font-size:10px;font-weight:900;
}
.tundra-trade-route-page .troop-card input[id$="_count"]{
  pointer-events:none;background:rgba(9,38,54,.55)!important;color:#9fc8d8!important;
}

/* Always use the compact information density while preserving full 30-leaf stars
 * and the widget-level selector requested by the owner. */
.tundra-trade-route-page .hero-card .skill-list,
.tundra-trade-route-page .hero-card .widget-box,
.tundra-trade-route-page .hero-stat-strip,
.tundra-trade-route-page .skill-level-readout,
.tundra-trade-route-page .star-controls{
  display:none!important;
}
.tundra-trade-route-page .hero-card{padding-bottom:10px}
.tundra-trade-route-page .hero-progress-main{min-width:0}
.tundra-trade-route-page .hero-progression-top{min-height:0;margin:0}
.tundra-trade-route-page .snowflake-row{margin-top:5px}
.tundra-trade-route-page .hero-widget-corner{align-self:center}
.tundra-trade-route-page .ttr-hero-heading-note{
  display:block;margin:-6px 0 10px;color:#83aabc;font-size:11px;line-height:1.4;
}

/* Attacker is always My Stats; defender is manual/report-entry only. */
.tundra-trade-route-page .army-panel.att .stat-mode-wrap,
.tundra-trade-route-page .army-panel.def .stat-mode-wrap{display:none!important}
.tundra-trade-route-page .army-panel.att .stat-mode-help,
.tundra-trade-route-page .army-panel.def .stat-mode-help{display:none!important}
.tundra-trade-route-page .army-panel.att .dynamic-loadout,
.tundra-trade-route-page .army-panel.def .dynamic-loadout{display:none!important}
.tundra-trade-route-page .ttr-stat-mode-banner{
  margin:7px 0 12px;padding:9px 11px;border-radius:10px;
  background:rgba(77,196,234,.08);border:1px solid rgba(77,196,234,.18);color:#9fc8d8;font-size:11px;line-height:1.45;
}
.tundra-trade-route-page .ttr-stat-mode-banner b{color:#e9fbff}

@media(max-width:980px){
  .tundra-trade-route-page .ttr-explainer{grid-template-columns:1fr;text-align:left}
  .tundra-trade-route-page .ttr-explainer-mark{justify-self:start}
  .tundra-trade-route-page .command-orbit{display:flex!important;flex-direction:column!important;gap:10px}
  .tundra-trade-route-page #optimizerRecommendations_att{order:2;width:100%}
  .tundra-trade-route-page .command-core{order:1;width:100%}
  .tundra-trade-route-page .ttr-total-control{grid-template-columns:1fr}
}
@media(max-width:560px){
  .tundra-trade-route-page .ttr-explainer{padding:12px;border-radius:14px}
  .tundra-trade-route-page .ttr-explainer p{font-size:12px}
  .tundra-trade-route-page .ttr-total-control{padding:10px}
  .tundra-trade-route-page .simulation-dock{min-height:170px}
}


/* Current OmniSIM workspace contract: hide only event-irrelevant surfaces after the
 * command deck has been transformed into the modern command center. */
.tundra-trade-route-page .omnisim-context-band,
.tundra-trade-route-page .omnisim-toggle-strip,
.tundra-trade-route-page .omnisim-meta-strip,
.tundra-trade-route-page .omnisim-meta-results,
.tundra-trade-route-page #optimizerRecommendations,
.tundra-trade-route-page .optimizer-settings,
.tundra-trade-route-page .army-panel .battle-joiner-section{
  display:none!important;
}
.tundra-trade-route-page .omnisim-battle-main{
  grid-template-columns:minmax(335px,.86fr) minmax(520px,1.22fr) minmax(335px,.86fr)!important;
  gap:16px!important;align-items:stretch;
}
@media(min-width:1721px){
  .tundra-trade-route-page .omnisim-battle-main{grid-template-columns:minmax(0,.72fr) minmax(0,1.04fr) minmax(0,.72fr)!important}
}
.tundra-trade-route-page .omnisim-optimizer-column.att{grid-column:1}
.tundra-trade-route-page .omnisim-simulation-console{grid-column:2}
.tundra-trade-route-page .omnisim-optimizer-column.def{grid-column:3}
.tundra-trade-route-page .omnisim-simulation-hero{
  position:relative;isolation:isolate;overflow:hidden;
  min-height:190px;padding:24px 18px;border-radius:18px;
  display:flex;flex-direction:column;justify-content:center;align-items:center;
  background:
    linear-gradient(180deg,rgba(2,18,31,.10),rgba(2,18,31,.72)),
    url('/static/image/tundra-trade-route/run-battle.webp') center/cover no-repeat!important;
  box-shadow:inset 0 0 58px rgba(2,18,31,.58);
}
.tundra-trade-route-page .omnisim-simulation-hero::after{
  content:'';position:absolute;inset:0;z-index:-1;
  background:radial-gradient(circle at 50% 56%,rgba(94,214,255,.05),rgba(1,12,22,.34) 74%);
}
.tundra-trade-route-page .omnisim-sim-kicker{
  text-shadow:0 2px 12px rgba(0,0,0,.9);color:#e7f9ff!important;
}
.tundra-trade-route-page .omnisim-run-heading{
  backdrop-filter:blur(4px);background:rgba(4,28,42,.72)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.4),inset 0 1px rgba(255,255,255,.12)!important;
}
.tundra-trade-route-page .omnisim-gen-control{min-width:0}
.tundra-trade-route-page .ttr-gen-control>span{white-space:nowrap;flex:0 0 auto}
.tundra-trade-route-page .omnisim-optimizer-column.att .omnisim-ratio-line>*{display:none!important}
.tundra-trade-route-page .omnisim-optimizer-column.att .omnisim-ratio-line::after{
  content:'1 : 1 : 1';font-weight:950;letter-spacing:.08em;color:#b9edff;
}
.tundra-trade-route-page .optimizer-recommend-card .ratio{font-size:0!important}
.tundra-trade-route-page .optimizer-recommend-card .ratio::after{
  content:'Fixed 1 : 1 : 1';font-size:11px;font-weight:900;color:#a7deef;
}
.tundra-trade-route-page .ttr-split-preview{display:block;margin-top:6px;color:#83b4c9;font-size:10px}
.tundra-trade-route-page .ttr-split-preview strong{color:#dff7ff;font-weight:900}
.tundra-trade-route-page .ttr-stat-mode-banner.error{border-color:rgba(244,91,105,.38);background:rgba(105,24,36,.2);color:#f7b6bd}
.tundra-trade-route-page .ttr-stat-mode-banner.error b{color:#ffd8dc}
.tundra-trade-route-page .ttr-defender-specials{
  margin:14px 0 20px;padding:0 0 16px;border-bottom:1px solid rgba(102,192,225,.13);
}
.tundra-trade-route-page .ttr-specials-copy{margin:-5px 0 10px;color:#84aabd;font-size:11px;line-height:1.4}
.tundra-trade-route-page .ttr-defender-specials .v60-panel-actions{
  flex-wrap:wrap;gap:7px;
}
.tundra-trade-route-page .ttr-defender-specials .dynamic-tool-btn{
  min-height:34px;
}
.tundra-trade-route-page .ttr-hero-picker-empty{
  grid-column:1/-1;padding:20px;border:1px dashed rgba(110,204,237,.3);border-radius:14px;
  background:rgba(4,35,51,.52);text-align:center;color:#b9d5e2;
}
.tundra-trade-route-page .ttr-hero-picker-empty b{display:block;color:#edfaff;margin-bottom:5px}
.tundra-trade-route-page .hero-picker-choice small{display:block;margin-top:3px;color:#8fb8c8;font-size:9px;font-weight:800}

/* Counts are computed, not editable. Tier/FC and final raw stats remain editable exactly
 * where OmniSIM exposes them. */
.tundra-trade-route-page .troop-card input[id$="_count"]{cursor:default;opacity:.82}
.tundra-trade-route-page .army-panel.att .profile-stats-panel{display:block}

@media(max-width:1024px){
  .tundra-trade-route-page .omnisim-battle-main{grid-template-columns:1fr!important}
  .tundra-trade-route-page .omnisim-simulation-console{grid-column:1!important;grid-row:1!important}
  .tundra-trade-route-page .omnisim-optimizer-column.att{grid-column:1!important;grid-row:2!important}
  .tundra-trade-route-page .omnisim-optimizer-column.def{grid-column:1!important;grid-row:3!important}
  .tundra-trade-route-page .omnisim-simulation-hero{min-height:175px}
}
@media(max-width:560px){
  .tundra-trade-route-page .omnisim-simulation-hero{min-height:150px;padding:18px 12px}
  .tundra-trade-route-page .ttr-equal-badge{display:flex;margin:6px 0 0;width:max-content}
}

/* The frozen Trucks command deck removes neighboring utility controls, so its lone
 * generation selector must be allowed to shrink with the simulation column instead of
 * inheriting OmniSIM's desktop minimum width and pushing the page a few pixels wide. */
.tundra-trade-route-page .ttr-gen-control{
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  box-sizing:border-box!important;
  gap:6px!important;
  padding:0 8px!important;
  overflow:hidden!important;
}
body.tundra-trade-route-page.frozen-battle-page .ttr-gen-control select{
  flex:0 0 56px!important;
  width:56px!important;
  min-width:0!important;
  max-width:56px!important;
  box-sizing:border-box!important;
  min-height:32px!important;
  margin:0!important;
  padding:0 18px 0 5px!important;
  pointer-events:auto!important;
  position:relative!important;
  z-index:4!important;
  outline-offset:-2px!important;
}

/* Override OmniSIM's element-qualified Battle Context rule. Trucks is permanently
 * Wilderness, so the visual mode selector must not survive through specificity. */
body.tundra-trade-route-page.frozen-battle-page .omnisim-context-band{
  display:none!important;
}

/* Trucks has only six leader cards. Keep them fully paintable even when the browser is
   taking a full-page capture or the user scrolls quickly between armies; the generic
   Battle page's content-visibility:auto optimization can otherwise leave off-screen
   hero cards temporarily unpainted. */
.tundra-trade-route-page .hero-card{
  content-visibility:visible;
  contain-intrinsic-size:auto;
}

/* Trucks mobile report-reader status must stay inside the reader cell. OmniSIM's
   desktop status bubble intentionally uses width:max-content, but on a narrow phone
   a long OCR/error message can otherwise extend a few pixels beyond the viewport and
   inflate the command row's scroll width. Keep the same bubble, just wrap it to the
   available reader column on this page. */
body.tundra-trade-route-page.frozen-battle-page .omnisim-reader-host .battle-reader-status{
  left:0!important;
  right:0!important;
  width:auto!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}


/* Owner follow-up: keep the defender formation visible while making it explicitly read-only. */
.tundra-trade-route-page .ttr-defender-formation-column .omnisim-recommend-disclosure{display:none!important}
.tundra-trade-route-page .ttr-defender-formation-column .omnisim-optimizer-action{opacity:1!important;cursor:default!important;filter:none!important}
.tundra-trade-route-page .ttr-defender-formation-column .omnisim-optimizer-action:disabled{opacity:1!important}
.tundra-trade-route-page .ttr-defender-formation-column .omnisim-optimizer-title b{color:#e4f7ff!important}
.tundra-trade-route-page #battleSwapAction{display:flex!important}
.tundra-trade-route-page .ttr-hero-picker-limit-note{grid-column:1/-1;margin-top:4px;padding:10px 12px;border:1px solid rgba(106,193,226,.22);border-radius:12px;background:rgba(6,34,49,.72);color:#9fc7d8;font-size:10px;line-height:1.45}
.tundra-trade-route-page .ttr-hero-picker-limit-note b{color:#dff7ff}
