.craft-goal-panel {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #587081;
  border-left: 3px solid #ffc153;
  background: linear-gradient(120deg, #152936, #0b1721);
  color: #e9f3f7;
  text-align: left;
}
.craft-goal-panel > img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #09131d;
  border: 1px solid #4c6576;
  border-radius: 7px;
}
.craft-goal-panel > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.craft-goal-panel strong {
  font-size: 15px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.craft-goal-panel span {
  font-size: 12px;
  color: #ffe0a0;
}
.craft-goal-panel small {
  font-size: 11px;
  color: #aabecb;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.craft-goal-panel progress {
  width: 100%;
  height: 7px;
  accent-color: #ffc153;
}
.craft-goal-panel button {
  font-size: 12px;
  min-height: 40px;
  padding: 8px;
}
.craft-goal-panel[data-ready="true"] {
  border-left-color: #72eed9;
}
.field-card > .craft-goal-panel {
  margin: 4px 0 12px;
}
.result-subject > .craft-goal-panel {
  margin-top: 14px;
}
#garage .craft-goal-panel {
  margin-top: 14px;
}
#build-presets {
  display: grid;
  gap: 7px;
  margin: 10px 0 16px;
}
#build-presets > h3 {
  font-size: 15px;
  margin: 0 0 3px;
}
#build-presets > button {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  text-align: left;
  padding: 9px;
  background: linear-gradient(120deg, #253c4e, #102330);
  border: 1px solid #6e899b;
  min-width: 0;
}
#build-presets > button[aria-pressed="true"] {
  border-color: #ffc153;
  box-shadow: inset 3px 0 #ffc153;
}
#build-presets img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
#build-presets strong {
  display: block;
  font-size: 14px;
  color: #ffe2a7;
}
#build-presets small {
  display: block;
  font-size: 11px;
  line-height: 1.45;
  color: #c4d4df;
}
#build-presets button:disabled {
  opacity: 0.7;
}
#build-presets button:disabled strong {
  color: #ced8df;
}
#build-description {
  font-size: 12px;
  line-height: 1.55;
  padding: 10px;
  border-left: 3px solid #61d5df;
  background: #122a36;
  margin: 8px 0;
}
#garage .equipment-panel {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#field-build-state {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  bottom: 110px;
  max-width: min(330px, calc(100vw - 36px));
  padding: 8px 12px;
  border-left: 3px solid #577183;
  background: #102532e8;
  color: #c4d5e0;
  font-size: 12px;
  pointer-events: none;
}
#field-build-state[data-active="true"] {
  border-left-color: #6ff0d6;
  color: #a1ffe9;
}
#field-rescue-banner {
  position: absolute;
  left: 50%;
  top: 24%;
  transform: translateX(-50%);
  width: min(380px, calc(100vw - 30px));
  padding: 15px 18px;
  background: linear-gradient(135deg, #102a3bf5, #071823f2);
  border: 1px solid #81dce5;
  border-top: 3px solid #64e8de;
  box-shadow: 0 6px 24px #0009;
  pointer-events: none;
  text-align: center;
  display: grid;
  gap: 8px;
}
#field-rescue-banner strong {
  font-size: 22px;
  color: #b5fff0;
}
#field-rescue-banner span {
  font-size: 12px;
  line-height: 1.5;
  color: #deedf2;
}
#field-rescue-banner progress {
  width: 100%;
  height: 10px;
  accent-color: #5eedd5;
}
#field-rescue-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rescue-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 6px 10px;
  color: #8dffde;
  background: #072c32e8;
  border: 1px solid #62bcae;
  font-size: 12px;
  white-space: nowrap;
}
.party-member[data-status="down"] {
  border-color: #5bd6bd;
}
@media (max-width: 640px) {
  .craft-goal-panel {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 10px;
    gap: 8px;
  }
  .craft-goal-panel > img {
    width: 36px;
    height: 36px;
  }
  .craft-goal-panel > button {
    grid-column: 2;
    justify-self: start;
  }
  .craft-goal-panel strong {
    font-size: 14px;
  }
  #field-build-state {
    bottom: 157px;
    left: 10px;
    max-width: 210px;
    font-size: 10px;
    padding: 6px 9px;
  }
  #field-rescue-banner {
    top: 20%;
  }
}
@media (max-height: 520px) {
  #field-rescue-banner {
    top: 30%;
    padding: 9px 12px;
    gap: 4px;
  }
  #field-rescue-banner strong {
    font-size: 17px;
  }
  #field-build-state {
    bottom: 80px;
    max-width: 220px;
  }
}
[hidden] {
  display: none !important;
}

#build-presets:not([open]) {
  display: block;
}
#build-presets summary {
  padding: 11px 12px;
  border: 1px solid #718ca1;
  background: #1a3040;
  color: #ffe0a2;
  font-weight: 800;
  cursor: pointer;
}
#build-presets[open] summary {
  margin-bottom: 7px;
}
#garage #save {
  position: sticky;
  bottom: 0;
  z-index: 3;
  box-shadow: 0 -6px 12px #07131d;
}
@container (max-width: 340px) {
  .craft-goal-panel > div { grid-column: 2 / -1; }
  .craft-goal-panel > button { grid-column: 1 / -1; justify-self: stretch; }
}
body[data-menu-ready="loading"] button[aria-busy="true"] {
  cursor: progress;
  opacity: .78;
}
