.shipyard-page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.shipyard-page-title{
  margin:0;
  font-size:36px;
  line-height:1;
  letter-spacing:.35px;
  font-weight:950;
}

.shipyard-page-sub{
  margin-top:7px;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

.shipyard-page-chips{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.shipyard-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  padding:5px 10px;
  border:1px solid rgba(73,102,192,.64);
  border-radius:999px;
  background:linear-gradient(180deg,rgba(19,32,78,.88),rgba(11,20,51,.92));
  color:#cbd7fa;
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.shipyard-chip b{
  color:#f5fbff;
  font-size:12px;
  text-shadow:0 0 9px rgba(125,211,252,.38);
}

.shipyard-action-status{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1300;
  width:min(390px,calc(100vw - 24px));
  margin:0;
  padding:9px 12px;
  border:1px solid rgba(93,201,255,.38);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(17,52,91,.92),rgba(9,27,57,.96));
  color:#d8f5ff;
  font-size:11px;
  font-weight:850;
  box-shadow:0 6px 18px rgba(0,0,0,.14);
}

.shipyard-action-status[hidden]{display:none !important}
.shipyard-action-status.is-error{
  border-color:rgba(255,107,129,.48);
  background:linear-gradient(180deg,rgba(91,25,43,.94),rgba(54,14,28,.97));
  color:#ffe0e7;
}

body.shipyard-dialog-open{overflow:hidden}

.shipyard-dialog-backdrop{
  position:fixed;
  inset:0;
  z-index:1600;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(2,5,15,.76);
  backdrop-filter:blur(5px);
  box-sizing:border-box;
}

.shipyard-dialog-backdrop[hidden]{display:none !important}

.shipyard-dialog-panel{
  position:relative;
  width:min(520px,100%);
  padding:25px 25px 21px;
  overflow:hidden;
  border:1px solid rgba(255,97,124,.72);
  border-radius:18px;
  background:
    radial-gradient(circle at 50% -18%,rgba(255,72,105,.23),transparent 55%),
    linear-gradient(180deg,rgba(65,17,33,.99),rgba(24,8,19,.995));
  color:#ffeef2;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 0 44px rgba(255,43,82,.08),
    0 0 35px rgba(255,39,78,.18),
    0 24px 70px rgba(0,0,0,.58);
  box-sizing:border-box;
}

.shipyard-dialog-kicker{
  margin-bottom:6px;
  color:#ff8ea2;
  font-size:9px;
  font-weight:950;
  letter-spacing:.14em;
}

.shipyard-dialog-panel h2{
  margin:0;
  color:#fff;
  font-size:25px;
  line-height:1.1;
  text-shadow:0 0 16px rgba(255,84,116,.3);
}

.shipyard-dialog-panel p{
  margin:12px 0 18px;
  color:#ffd7df;
  font-size:13px;
  font-weight:750;
  line-height:1.5;
}

.shipyard-dialog-close{
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid rgba(255,122,146,.48);
  border-radius:10px;
  background:rgba(102,22,44,.72);
  color:#fff;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}

.shipyard-dialog-confirm{
  width:100%;
  min-height:43px;
  border-color:rgba(255,105,133,.65) !important;
  background:linear-gradient(180deg,#9b304d,#691d35) !important;
  color:#fff !important;
}

.shipyard-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.shipyard-section-title{
  margin:0;
  font-size:20px;
  line-height:1.1;
  font-weight:950;
  letter-spacing:.18px;
}

.shipyard-section-sub{
  max-width:720px;
  margin:4px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}

.shipyard-collapsible{
  padding:0;
  overflow:hidden;
}

.shipyard-section-toggle{
  min-height:76px;
  margin:0;
  padding:16px 18px;
  cursor:pointer;
  list-style:none;
  user-select:none;
}

.shipyard-section-toggle::-webkit-details-marker{
  display:none;
}

.shipyard-section-toggle-meta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex:0 0 auto;
  min-height:32px;
  padding:6px 10px;
  border:1px solid rgba(102,139,222,.35);
  border-radius:999px;
  background:rgba(20,39,91,.72);
  color:#aebfe4;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
}

.shipyard-section-toggle-meta b{
  color:#fff;
}

.shipyard-section-toggle-meta i{
  font-style:normal;
  transition:transform .18s ease;
}

.shipyard-collapsible[open] .shipyard-section-toggle-meta i{
  transform:rotate(180deg);
}

.shipyard-collapsible[open] .shipyard-section-toggle{
  border-bottom:1px solid rgba(75,105,181,.22);
}

.shipyard-collapsible-body{
  margin:0;
  padding:16px 18px 18px;
}

/* Kompakter Hangar */
.hangar-groups{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  align-items:stretch;
}

.hangar-group-card{
  --hangar-rgb:125,211,252;
  min-width:0;
  padding:10px;
  border:1px solid rgba(var(--hangar-rgb),.25);
  border-radius:13px;
  background:
    radial-gradient(circle at 100% 0%,rgba(var(--hangar-rgb),.08),transparent 42%),
    linear-gradient(180deg,rgba(14,21,52,.93),rgba(9,15,38,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 6px 18px rgba(0,0,0,.12);
}

.hangar-group-card-trade{--hangar-rgb:86,211,255}
.hangar-group-card-exploration{--hangar-rgb:167,139,250}
.hangar-group-card-special{--hangar-rgb:251,191,36}
.hangar-group-card-combat{--hangar-rgb:248,113,113}

.hangar-group-head{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:7px;
  margin-bottom:7px;
}

.hangar-group-title{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  color:var(--text);
  font-size:13px;
  line-height:1.2;
  font-weight:950;
}

.hangar-group-title::before{
  content:"";
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:999px;
  background:rgb(var(--hangar-rgb));
  box-shadow:0 0 9px rgba(var(--hangar-rgb),.72);
}

.hangar-group-meta{
  display:grid;
  grid-template-columns:minmax(0,1fr) 68px;
  gap:6px;
  min-width:0;
}

.hangar-group-stat,
.hangar-group-total{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  min-width:0;
  min-height:36px;
  padding:6px 8px;
  border:1px solid rgba(var(--hangar-rgb),.22);
  border-radius:9px;
  background:rgba(8,15,38,.72);
  box-sizing:border-box;
}

.hangar-group-stat-label,
.hangar-group-total-label{
  overflow:hidden;
  color:#95a4ce;
  font-size:8.5px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:.065em;
  text-transform:uppercase;
  text-overflow:ellipsis;
}

.hangar-group-stat-value,
.hangar-group-total-value{
  flex:0 0 auto;
  color:#f5fbff;
  font-size:15px;
  line-height:1;
  font-weight:950;
  white-space:nowrap;
  text-shadow:0 0 10px rgba(var(--hangar-rgb),.48);
}

.hangar-group-total{
  justify-content:center;
  flex-direction:column;
  gap:2px;
  text-align:center;
}

.hangar-list{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.hangar-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  min-height:32px;
  padding:5px 8px;
  border:1px solid rgba(37,54,105,.76);
  border-radius:9px;
  background:rgba(11,19,47,.7);
  box-sizing:border-box;
}

.hangar-row-name{
  min-width:0;
  overflow:hidden;
  color:var(--text);
  font-size:11px;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hangar-row-qty{
  min-width:22px;
  color:rgb(var(--hangar-rgb));
  font-size:12px;
  font-weight:950;
  text-align:right;
  text-shadow:0 0 8px rgba(var(--hangar-rgb),.42);
}

.hangar-empty{
  display:flex;
  align-items:center;
  min-height:32px;
  padding:6px 8px;
  border:1px dashed rgba(var(--hangar-rgb),.26);
  border-radius:9px;
  background:rgba(9,16,40,.4);
  color:#8f9cc0;
  font-size:10px;
  line-height:1.3;
  box-sizing:border-box;
}

/* Einheitliche Schiffsbaukarten */
.shipyard-cards{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:1fr;
  gap:11px;
  align-items:stretch;
}

.ship-card{
  display:grid;
  grid-template-rows:auto 1fr;
  min-width:0;
  height:100%;
  overflow:hidden;
  border:1px solid rgba(44,63,125,.92);
  border-radius:15px;
  background:linear-gradient(180deg,rgba(14,21,52,.92),rgba(9,15,38,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 8px 22px rgba(0,0,0,.16);
  transition:border-color .16s ease,box-shadow .18s ease,transform .18s ease;
}

.ship-card:hover{transform:translateY(-1px)}

.ship-card-ok{
  border-color:rgba(74,255,178,.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 0 1px rgba(74,255,178,.06),
    0 8px 22px rgba(0,0,0,.16);
}

.ship-card-no_resources{
  border-color:rgba(255,186,73,.44);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 0 1px rgba(255,186,73,.06),
    0 8px 22px rgba(0,0,0,.16);
}

.ship-card-no_shipyard{
  border-color:rgba(255,107,129,.44);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 0 1px rgba(255,107,129,.06),
    0 8px 22px rgba(0,0,0,.16);
}

.ship-card-no_research{
  border-color:rgba(255,107,129,.52);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 0 1px rgba(255,107,129,.07),
    0 8px 22px rgba(0,0,0,.16);
}

.ship-card-queued{
  border-color:rgba(96,165,250,.44);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 0 1px rgba(96,165,250,.06),
    0 8px 22px rgba(0,0,0,.16);
}

.ship-card-top{
  display:flex;
  flex-direction:column;
  min-height:105px;
  padding:11px 12px 10px;
  border-bottom:1px solid rgba(34,48,90,.55);
  background:
    radial-gradient(circle at 100% 0%,rgba(125,211,252,.09),transparent 40%),
    linear-gradient(180deg,rgba(20,31,74,.55),rgba(11,18,44,.28));
  box-sizing:border-box;
}

.ship-card-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  min-width:0;
}

.ship-card-title{
  min-width:0;
  margin:0;
  color:var(--text);
  font-size:17px;
  line-height:1.15;
  font-weight:950;
}

.ship-card-qty{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:25px;
  padding:4px 7px;
  border:1px solid rgba(125,211,252,.24);
  border-radius:999px;
  background:rgba(125,211,252,.08);
  color:#9bb0da;
  font-size:9px;
  font-weight:850;
  white-space:nowrap;
}

.ship-card-qty strong{
  color:#72dcff;
  font-size:11px;
  font-weight:950;
  text-shadow:0 0 8px rgba(125,211,252,.4);
}

.ship-card-meta-row{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:27px;
  margin-top:6px;
}

.ship-status-compact{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-width:0;
  min-height:27px;
}

.ship-status-compact.is-warning{
  max-width:100%;
  padding:3px 7px;
  border:1px solid rgba(255,186,73,.26);
  border-radius:999px;
  background:rgba(255,176,32,.075);
  box-sizing:border-box;
}

.ship-card-no_shipyard .ship-status-compact.is-warning{
  border-color:rgba(255,107,129,.27);
  background:rgba(201,77,103,.075);
}

.ship-card-state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:25px;
  padding:4px 8px;
  border:1px solid rgba(73,102,192,.7);
  border-radius:999px;
  background:rgba(16,28,70,.78);
  color:var(--text);
  font-size:9px;
  line-height:1;
  font-weight:950;
  letter-spacing:.065em;
  text-transform:uppercase;
  white-space:nowrap;
  box-sizing:border-box;
}

.ship-card-state-ok{
  border-color:rgba(74,255,178,.3);
  background:rgba(26,126,79,.18);
  color:#baffdd;
  text-shadow:0 0 8px rgba(74,255,178,.3);
}

.ship-card-state-no_resources{
  border-color:rgba(255,186,73,.32);
  background:rgba(255,176,32,.11);
  color:#ffe0a8;
}

.ship-card-state-no_shipyard{
  border-color:rgba(255,107,129,.31);
  background:rgba(201,77,103,.11);
  color:#ffd5df;
}

.ship-card-state-queued{
  border-color:rgba(96,165,250,.36);
  background:rgba(37,99,235,.15);
  color:#cfe6ff;
}

.ship-card-queued .ship-card-state-detail.visible{color:#aecdff}

.ship-status-compact.is-warning .ship-card-state-no_resources,
.ship-status-compact.is-warning .ship-card-state-no_shipyard{
  min-height:19px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}

.ship-card-state-detail{
  display:none;
  min-width:0;
  color:#9facce;
  font-size:9px;
  line-height:1.25;
  font-weight:850;
}

.ship-card-state-detail.visible{display:inline}
.ship-card-no_resources .ship-card-state-detail.visible{color:#ffd18a}
.ship-card-no_shipyard .ship-card-state-detail.visible{color:#ffb2c1}

.ship-card-desc{
  margin-top:6px;
  color:#a7b2d1;
  font-size:10.5px;
  line-height:1.38;
}

.ship-card-requirement{
  margin-top:7px;
  padding:6px 8px;
  border-left:3px solid #ff637f;
  border-radius:6px;
  background:linear-gradient(90deg,rgba(133,30,55,.28),rgba(133,30,55,.04));
  color:#ffb3c1;
  font-size:9.5px;
  font-weight:850;
  line-height:1.35;
}

.ship-card-requirement[hidden]{display:none !important}

.ship-card-body{
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:10px 11px 11px;
}

.ship-card-header{
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  align-items:stretch;
  gap:9px;
  min-width:0;
  margin-bottom:9px;
}

.ship-card-thumb-shell{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  min-width:0;
}

.ship-card-thumb{
  width:92px;
  height:92px;
  padding:5px;
  border:1px solid rgba(72,101,196,.68);
  border-radius:20px;
  background:linear-gradient(180deg,rgba(24,38,88,.95),rgba(10,18,46,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 7px 16px rgba(0,0,0,.17);
  box-sizing:border-box;
}

.ship-card-thumb-img{
  display:block;
  width:100%;
  height:100%;
  border:1px solid rgba(255,255,255,.06);
  border-radius:15px;
  background:#09122c;
  object-fit:cover;
  object-position:center;
}

.ship-card-thumb-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  border:1px dashed rgba(125,211,252,.28);
  border-radius:15px;
  background:linear-gradient(180deg,rgba(19,31,74,.55),rgba(11,19,47,.72));
  color:var(--accent2);
  font-size:24px;
  font-weight:950;
}

.ship-facts-panel{
  min-width:0;
  padding:7px;
  border:1px solid rgba(34,48,90,.82);
  border-radius:12px;
  background:rgba(9,16,42,.56);
  box-sizing:border-box;
}

.ship-facts-panel-head{
  margin:0 0 5px;
  color:var(--accent2);
  font-size:9px;
  line-height:1;
  font-weight:950;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.ship-facts-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}

.ship-fact-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:5px;
  min-width:0;
  min-height:31px;
  padding:5px 7px;
  border:1px solid rgba(37,54,105,.78);
  border-radius:8px;
  background:rgba(12,20,50,.7);
  box-sizing:border-box;
}

.ship-fact-label{
  min-width:0;
  color:#8997bd;
  font-size:8.5px;
  line-height:1.15;
  font-weight:850;
  letter-spacing:.035em;
  text-transform:uppercase;
}

.ship-fact-value{
  color:#f4f8ff;
  font-size:12px;
  line-height:1;
  font-weight:950;
  text-align:right;
  white-space:nowrap;
}

.ship-fact-build-time{
  border-color:rgba(71,207,255,.32);
  background:linear-gradient(180deg,rgba(17,48,78,.78),rgba(10,27,54,.82));
}

.ship-fact-build-time .ship-fact-value,
.ship-build-time-value{
  color:#75e9ff;
  text-shadow:0 0 8px rgba(75,213,255,.28);
}

.ship-purchase-panel{
  display:grid;
  grid-template-columns:minmax(190px,1.08fr) minmax(184px,.92fr);
  align-items:stretch;
  gap:12px;
  min-width:0;
  min-height:166px;
  margin-top:auto;
  padding:11px 12px;
  border:1px solid rgba(34,48,90,.72);
  border-radius:11px;
  background:rgba(8,14,36,.58);
  box-sizing:border-box;
}

.ship-cost-column{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  min-width:0;
}

.ship-cost-title{
  margin:0 0 8px;
  padding-left:3px;
  color:#72ddff;
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.075em;
  text-transform:uppercase;
  text-shadow:0 0 9px rgba(89,205,255,.28);
}

.shipyard-cards .bcost-list{
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:repeat(3,36px);
  gap:7px;
  min-height:122px;
  max-width:none;
  margin:0;
}

.shipyard-cards .bcost-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  min-height:36px;
  padding:7px 12px 7px 14px;
  border:1px solid rgba(37,54,105,.68);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(15,26,62,.82),rgba(10,18,47,.86));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  box-sizing:border-box;
}

.shipyard-cards .bcost-label{
  min-width:0;
  overflow:hidden;
  color:#c2cceb;
  font-size:11.5px;
  line-height:1.15;
  font-weight:750;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.shipyard-cards .bcost-value{
  flex:0 0 auto;
  color:var(--text);
  font-size:13.5px;
  line-height:1;
  font-weight:950;
  white-space:nowrap;
  transition:color .15s ease,text-shadow .15s ease;
}

.shipyard-cards .bcost-value.is-affordable{
  color:#6ff79a;
  text-shadow:0 0 9px rgba(74,255,178,.34);
}

.shipyard-cards .bcost-value.is-missing{
  color:#ff9ca8;
  text-shadow:0 0 9px rgba(255,107,129,.30);
}

.ship-missing-box{
  margin-top:7px;
  padding:8px;
  border:1px solid rgba(255,176,32,.3);
  border-radius:10px;
  background:rgba(58,39,8,.3);
}

.ship-missing-box[hidden]{display:none !important}

.ship-missing-title{
  margin:0 0 5px;
  color:#ffd48c;
  font-size:8px;
  font-weight:950;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.ship-missing-list{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.ship-missing-row{
  display:grid;
  grid-template-columns:minmax(70px,auto) 1fr;
  align-items:center;
  gap:7px;
}

.ship-missing-label,
.ship-missing-value{
  color:#ffe7ba;
  font-size:9px;
  font-weight:850;
}

.ship-missing-value{color:#fff0d1;font-weight:950}

.ship-build-form{
  display:grid;
  grid-template-rows:43px minmax(64px,1fr);
  align-items:stretch;
  align-content:stretch;
  align-self:stretch;
  gap:10px;
  min-width:0;
  padding-left:12px;
  border-left:1px solid rgba(52,72,132,.52);
}

.ship-build-time-summary{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  width:100%;
  min-width:0;
  min-height:43px;
  padding:8px 10px;
  border:1px solid rgba(71,207,255,.32);
  border-radius:9px;
  background:linear-gradient(180deg,rgba(17,48,78,.78),rgba(10,27,54,.82));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
  box-sizing:border-box;
}

.ship-build-time-label{
  min-width:0;
  color:#9cb4d8;
  font-size:9px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:.055em;
  text-transform:uppercase;
}

.ship-build-time-value{
  font-size:12.5px;
  line-height:1;
  font-weight:950;
  text-align:right;
  white-space:nowrap;
}

.ship-build-controls{
  display:grid;
  grid-template-columns:72px minmax(0,1fr);
  align-items:end;
  align-self:end;
  gap:9px;
  width:100%;
  min-width:0;
}

.ship-quantity-control,
.ship-build-actions{
  display:grid;
  grid-template-rows:12px 48px;
  align-items:stretch;
  align-self:end;
  gap:4px;
  min-width:0;
}

.ship-control-label{
  padding-left:3px;
  color:#b5c2e6;
  font-size:9.5px;
  line-height:1;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.ship-build-form input[type="number"]{
  width:100%;
  height:48px;
  min-width:0;
  padding:6px 8px;
  border:1px solid rgba(73,102,192,.55);
  border-radius:9px;
  outline:0;
  background:linear-gradient(180deg,rgba(14,24,59,.96),rgba(9,16,42,.98));
  color:#f5f8ff;
  font:inherit;
  font-size:13px;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
  box-sizing:border-box;
}

.ship-build-form input[type="number"]:focus{
  border-color:rgba(93,201,255,.82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 0 2px rgba(66,168,255,.12),
    0 0 13px rgba(66,168,255,.15);
}

.ship-build-actions .btn,
.ship-build-btn{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:48px;
  min-height:48px;
  padding:5px 8px;
  overflow:hidden;
  border:1px solid rgba(89,162,255,.62);
  border-radius:9px;
  background:
    radial-gradient(circle at 50% 0%,rgba(114,205,255,.13),transparent 60%),
    linear-gradient(180deg,#173d91,#0b245d);
  color:#dff7ff;
  font:inherit;
  font-size:12.5px;
  font-weight:950;
  line-height:1.12;
  letter-spacing:.02em;
  text-align:center;
  white-space:normal;
  text-shadow:
    0 0 5px rgba(125,211,252,.34),
    0 0 9px rgba(82,190,255,.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 -1px 0 rgba(3,12,42,.66),
    0 0 11px rgba(51,128,255,.13),
    0 6px 12px rgba(4,13,48,.24);
  cursor:pointer;
  transition:filter .16s ease,transform .16s ease,box-shadow .16s ease;
  box-sizing:border-box;
}

.ship-build-btn::after{
  content:"";
  position:absolute;
  top:0;
  left:-45%;
  width:35%;
  height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent);
  transform:skewX(-18deg);
  transition:left .32s ease;
}

.ship-build-btn:hover:not(:disabled){
  filter:brightness(1.10);
  transform:translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    0 0 16px rgba(70,160,255,.26),
    0 7px 14px rgba(5,17,62,.28);
}

.ship-build-btn:hover:not(:disabled)::after{left:115%}

.ship-build-btn:focus-visible{
  outline:2px solid rgba(125,211,252,.86);
  outline-offset:2px;
}

.ship-build-btn:disabled{
  cursor:not-allowed;
  opacity:1;
  transform:none;
}

.ship-build-btn-no_resources,
.ship-build-btn-no_shipyard,
.ship-build-btn-no_research,
.ship-build-btn-config_error,
.ship-build-btn-queued{
  border-color:rgba(255,107,129,.62);
  background:
    radial-gradient(circle at 50% 0%,rgba(255,174,188,.18),transparent 58%),
    linear-gradient(180deg,#91374f,#5f2036);
  color:#ffe7ec;
  text-shadow:0 0 8px rgba(255,107,129,.43);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 0 13px rgba(255,107,129,.15);
}

.ship-build-form .ship-build-btn[aria-disabled="true"]{
  border-color:rgba(255,92,122,.86);
  background:
    radial-gradient(circle at 50% 0%,rgba(255,184,196,.24),transparent 58%),
    linear-gradient(180deg,#a53b58,#671f38);
  color:#fff1f4;
  text-shadow:
    0 0 5px rgba(255,211,220,.36),
    0 0 10px rgba(255,79,116,.46);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(52,8,24,.72),
    0 0 10px rgba(255,63,105,.22),
    0 6px 12px rgba(38,5,18,.28);
  animation:shipyard-blocked-glow 2.4s ease-in-out infinite;
}

.ship-build-form .ship-build-btn[aria-disabled="true"]:hover{
  filter:brightness(1.08);
  transform:none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(52,8,24,.72),
    0 0 17px rgba(255,63,105,.34),
    0 6px 12px rgba(38,5,18,.3);
}

@keyframes shipyard-blocked-glow{
  0%,100%{
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.14),
      inset 0 -1px 0 rgba(52,8,24,.72),
      0 0 8px rgba(255,63,105,.18),
      0 6px 12px rgba(38,5,18,.28);
  }
  50%{
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.16),
      inset 0 -1px 0 rgba(52,8,24,.72),
      0 0 17px rgba(255,63,105,.36),
      0 6px 12px rgba(38,5,18,.3);
  }
}

@media (prefers-reduced-motion:reduce){
  .ship-build-form .ship-build-btn[aria-disabled="true"]{animation:none}
}

.shipyard-empty{
  padding:15px;
  border:1px solid rgba(148,50,71,.78);
  border-radius:13px;
  background:linear-gradient(180deg,rgba(58,20,32,.66),rgba(42,15,24,.78));
}

.shipyard-empty-title{
  margin:0 0 5px;
  color:#fff;
  font-size:15px;
  font-weight:950;
}

.shipyard-empty-text{
  margin:0;
  color:#ffd9e2;
  font-size:11px;
  line-height:1.4;
}

@media (max-width:1100px){
  .hangar-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:820px){
  .shipyard-page-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .shipyard-cards{grid-template-columns:1fr}
  .ship-card-top{min-height:0}
}

@media (max-width:700px){
  .shipyard-section-toggle{
    min-height:68px;
    padding:13px 14px;
    gap:10px;
  }

  .shipyard-section-toggle .shipyard-section-sub{
    display:none;
  }

  .shipyard-section-toggle-meta{
    min-height:30px;
    padding:5px 8px;
    font-size:10px;
  }

  .shipyard-collapsible-body{
    padding:13px 12px 14px;
  }
}

@media (max-width:620px){
  .shipyard-page-title{font-size:30px}
  .hangar-groups{grid-template-columns:1fr}
  .shipyard-page-chips{width:100%}
}

@media (max-width:470px){
  .shipyard-dialog-backdrop{padding:10px}
  .shipyard-dialog-panel{padding:22px 17px 17px}
  .shipyard-dialog-panel h2{padding-right:34px;font-size:22px}
  .shipyard-dialog-panel p{font-size:12px}

  .ship-card-header{grid-template-columns:78px minmax(0,1fr)}

  .ship-card-thumb{
    width:78px;
    height:78px;
    border-radius:17px;
  }

  .ship-card-thumb-img,
  .ship-card-thumb-placeholder{border-radius:12px}

  .ship-facts-list{grid-template-columns:1fr}
  .ship-fact-row{min-height:27px}

  .ship-purchase-panel{
    grid-template-columns:1fr;
    min-height:0;
  }

  .ship-build-form{
    grid-template-rows:43px auto;
    align-content:stretch;
    padding:9px 0 0;
    border-top:1px solid rgba(52,72,132,.52);
    border-left:0;
  }

  .ship-build-controls{grid-template-columns:66px minmax(0,1fr)}

  .ship-status-compact.is-warning{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
    border-radius:10px;
  }

  .ship-card-state-detail.visible{white-space:normal}
}
