/* loadout-generator — generated by scripts/tools-v2/build-tool-css.js from
   views/v1-backup/tools-loadout-generator.ejs. DO NOT EDIT BY HAND: npm run test:tools-page-v2
   regenerates it and fails if this file has drifted.

   The shared vocabulary (.btn-primary, .form-input, .tool-card, .badge-*,
   .toast-*, #map, headings) is NOT here — public/css/tools-page-v2.css
   declares it once for every tool page. What is left is this tool's own,
   with its colour literals resolved to theme tokens and every selector
   scoped to the tool body so nothing reaches the shared header. */

.tpv2 {
  --primary: var(--sk-warning);
  --primary-dark: var(--sk-warning);
  --success: var(--sk-success);
  --danger: var(--sk-danger);
  --bg-dark: var(--sk-bg);
  --bg-card: var(--sk-surface);
  --bg-input: var(--sk-surface-2);
  --text-primary: var(--sk-text);
  --text-secondary: var(--sk-muted);
  --border: var(--sk-border-2);
}

.tpv2-body .wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
}

.tpv2-body .wizard-steps::before {
  content: '';
  position: absolute;
  top: 1.25rem;
  left: 2.5rem;
  right: 2.5rem;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.tpv2-body .wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  cursor: pointer;
  transition: all 0.2s;
}

.tpv2-body .wizard-step .step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.2s;
}

.tpv2-body .wizard-step.active .step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tpv2-body .wizard-step.completed .step-number {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.tpv2-body .wizard-step .step-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 80px;
}

.tpv2-body .wizard-step.active .step-label {
  color: var(--primary);
  font-weight: 500;
}

.tpv2-body .step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tpv2-body .step-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tpv2-body .category-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tpv2-body .category-tabs::-webkit-scrollbar {
  display: none;
}

.tpv2-body .category-tab {
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  background: var(--bg-input);
  font-size: 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  touch-action: manipulation;
}

@media (min-width: 640px) {
.tpv2-body .category-tab {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  gap: 0.5rem;
}
}

.tpv2-body .category-tab:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.tpv2-body .category-tab.active {
  background: var(--sk-warning-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.tpv2-body .item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  max-height: 350px;
  overflow-y: auto;
  padding: 0.25rem;
}

@media (min-width: 480px) {
.tpv2-body .item-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
}

@media (min-width: 768px) {
.tpv2-body .item-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  max-height: 400px;
  padding: 0.5rem;
}
}

.tpv2-body .item-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  text-align: center;
}

.tpv2-body .item-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--sk-warning) 15%, transparent);
}

.tpv2-body .item-card.selected {
  background: var(--sk-warning-soft);
  border-color: var(--primary);
}

.tpv2-body .item-card.has-items,
.tpv2-body .item-card.has-children-badge {
  background: var(--sk-warning-soft);
  border-color: var(--primary);
  box-shadow: 0 0 12px color-mix(in srgb, var(--sk-warning) 30%, transparent);
  position: relative;
}

.tpv2-body .item-card.has-items .item-icon,
.tpv2-body .item-card.has-children-badge .item-icon {
  color: var(--primary);
}

.tpv2-body .item-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1;
}

.tpv2-body .grid-qty-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  margin-top: 0.25rem;
}

.tpv2-body .grid-qty-btn {
  background: var(--sk-border-2);
  border: none;
  color: var(--text-secondary);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  transition: all 0.15s;
  touch-action: manipulation;
}

.tpv2-body .grid-qty-btn:hover,
.tpv2-body .grid-qty-btn:active {
  background: var(--sk-border-2);
  color: var(--text-primary);
}

.tpv2-body .grid-qty-btn.plus {
  background: var(--sk-success-soft);
  color: var(--success);
}

.tpv2-body .grid-qty-btn.plus:hover,
.tpv2-body .grid-qty-btn.plus:active {
  background: var(--sk-success-soft);
}

.tpv2-body .grid-qty-btn.minus {
  background: var(--sk-danger-soft);
  color: var(--sk-danger-text);
}

.tpv2-body .grid-qty-btn.minus:hover,
.tpv2-body .grid-qty-btn.minus:active {
  background: var(--sk-danger-soft);
}

.tpv2-body .grid-qty-count {
  min-width: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--primary);
}

@media (min-width: 640px) {
.tpv2-body .grid-qty-controls {
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.tpv2-body .grid-qty-btn {
  width: 1.4rem;
  height: 1.4rem;
}

.tpv2-body .grid-qty-count {
  min-width: 1.25rem;
  font-size: 0.75rem;
}
}

.tpv2-body .item-card.compatible {
  background: var(--sk-success-soft);
  border-color: color-mix(in srgb, var(--sk-success) 50%, transparent);
}

.tpv2-body .item-card.compatible:hover {
  border-color: var(--success);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--sk-success) 20%, transparent);
}

.tpv2-body .item-card.compatible .item-icon {
  color: var(--success);
}

.tpv2-body .compatible-label {
  font-size: 0.65rem;
  margin-top: 0.25rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tpv2-body .compatible-label.ammo {
  background: var(--sk-success-soft);
  color: var(--sk-success-text);
}

.tpv2-body .compatible-label.mag {
  background: var(--sk-info-soft);
  color: var(--sk-info-text);
}

.tpv2-body .item-card .item-icon {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--primary);
}

@media (min-width: 640px) {
.tpv2-body .item-card .item-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
}

.tpv2-body .item-card .item-name {
  font-size: 0.65rem;
  word-break: break-word;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (min-width: 640px) {
.tpv2-body .item-card .item-name {
  font-size: 0.75rem;
  line-height: 1.3;
}
}

.tpv2-body .item-card .item-capacity {
  font-size: 0.6rem;
  color: var(--sk-info-text);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.tpv2-body .search-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: var(--text-primary);
  width: 100%;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.tpv2-body .search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.tpv2-body .search-wrapper {
  position: relative;
}

.tpv2-body .search-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.tpv2-body .slot-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.tpv2-body .slot-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.tpv2-body .slot-btn:hover {
  border-color: var(--primary);
}

.tpv2-body .slot-btn.active {
  background: var(--sk-warning-soft);
  border-color: var(--primary);
}

.tpv2-body .slot-btn.has-items {
  background: var(--sk-success-soft);
  border-color: color-mix(in srgb, var(--sk-success) 50%, transparent);
}

.tpv2-body .slot-btn.has-items .slot-count {
  background: var(--success);
  color: #fff;
}

.tpv2-body .slot-btn.has-items.active {
  background: var(--sk-warning-soft);
  border-color: var(--primary);
}

.tpv2-body .slot-btn .slot-icon {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.tpv2-body .slot-btn .slot-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tpv2-body .slot-btn .slot-count {
  font-size: 0.65rem;
  background: var(--primary);
  color: #fff;
  padding: 0.1rem 0.4rem;
  border-radius: 1rem;
  margin-top: 0.35rem;
  display: inline-block;
}

.tpv2-body .loadout-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.tpv2-body .loadout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  background: var(--sk-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.tpv2-body .loadout-item:last-child {
  margin-bottom: 0;
}

.tpv2-body .loadout-item .item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.tpv2-body .loadout-item .item-info .slot-tag {
  background: var(--sk-warning-soft);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
}

.tpv2-body .loadout-item .item-info .item-name {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpv2-body .loadout-item .remove-btn {
  background: var(--sk-danger-soft);
  border: 1px solid color-mix(in srgb, var(--sk-danger) 30%, transparent);
  color: var(--sk-danger-text);
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.tpv2-body .loadout-item .remove-btn:hover {
  background: var(--sk-danger-soft);
}

.tpv2-body .cargo-quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.tpv2-body .cargo-quantity-controls .qty-btn {
  background: var(--sk-border-2);
  border: 1px solid var(--sk-border-2);
  color: var(--text-secondary);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.15s;
  touch-action: manipulation;
}

.tpv2-body .cargo-quantity-controls .qty-btn:hover,
.tpv2-body .cargo-quantity-controls .qty-btn:active {
  background: var(--sk-border-2);
  color: var(--text-primary);
}

.tpv2-body .cargo-quantity-controls .qty-btn.plus {
  background: var(--sk-success-soft);
  border-color: color-mix(in srgb, var(--sk-success) 30%, transparent);
  color: var(--success);
}

.tpv2-body .cargo-quantity-controls .qty-btn.plus:hover,
.tpv2-body .cargo-quantity-controls .qty-btn.plus:active {
  background: var(--sk-success-soft);
}

.tpv2-body .cargo-quantity-controls .qty-btn.minus {
  background: var(--sk-warning-soft);
  border-color: color-mix(in srgb, var(--sk-warning) 30%, transparent);
  color: var(--sk-warning-text);
}

.tpv2-body .cargo-quantity-controls .qty-btn.minus:hover,
.tpv2-body .cargo-quantity-controls .qty-btn.minus:active {
  background: var(--sk-warning-soft);
}

.tpv2-body .cargo-quantity-controls .qty-count {
  min-width: 1.25rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--primary);
}

.tpv2-body .cargo-quantity-controls .remove-btn {
  margin-left: 0.15rem;
}

.tpv2-body .cargo-item-row {
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tpv2-body .cargo-item-row .item-info {
  flex: 1 1 auto;
  min-width: 100px;
}

.tpv2-body .cargo-item-row .item-info .item-name {
  font-size: 0.75rem;
  max-width: none;
}

.tpv2-body .cargo-item-row .item-info .slot-tag {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
}

@media (min-width: 640px) {
.tpv2-body .cargo-item-row {
  flex-wrap: nowrap;
}

.tpv2-body .cargo-item-row .item-info .item-name {
  font-size: 0.85rem;
}
}

.tpv2-body .preset-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.tpv2-body .preset-tab {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.85rem;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tpv2-body .preset-tab:hover {
  border-color: var(--primary);
}

.tpv2-body .preset-tab.active {
  background: var(--sk-warning-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.tpv2-body .preset-tab .close-tab {
  opacity: 0.5;
  font-size: 0.7rem;
}

.tpv2-body .preset-tab .close-tab:hover {
  opacity: 1;
  color: var(--danger);
}

.tpv2-body .add-preset-btn {
  background: var(--sk-success-soft);
  border: 1px dashed color-mix(in srgb, var(--sk-success) 50%, transparent);
  color: var(--sk-success-text);
}

.tpv2-body .btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
}

.tpv2-body .btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--sk-success) 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tpv2-body .help-tip {
  background: var(--sk-info-soft);
  border: 1px solid color-mix(in srgb, var(--sk-info) 30%, transparent);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.tpv2-body .help-tip i {
  color: var(--sk-info-text);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.tpv2-body .help-tip p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.tpv2-body .json-output {
  background: var(--sk-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
  color: var(--sk-success-text);
}

.tpv2-body .empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
}

.tpv2-body .empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.tpv2-body .empty-state p {
  font-size: 0.9rem;
}

.tpv2-body .template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.tpv2-body .template-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s;
}

.tpv2-body .template-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.tpv2-body .template-card .template-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.tpv2-body .template-card .template-name {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.tpv2-body .template-card .template-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.tpv2-body .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
  margin-bottom: 1rem;
}

.tpv2-body .back-link:hover {
  color: var(--primary);
}

.tpv2-body .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: var(--sk-warning-soft);
  border: 1px solid color-mix(in srgb, var(--sk-warning) 30%, transparent);
  border-radius: 2rem;
  font-size: 0.7rem;
  color: var(--primary);
}

.tpv2-body .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.tpv2-body .modal-overlay.hidden {
  display: none;
}

.tpv2-body .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tpv2-body .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.tpv2-body .modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.tpv2-body .modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.tpv2-body .modal-close:hover {
  color: var(--danger);
}

.tpv2-body .modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.tpv2-body .modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.tpv2-body .loadout-item.has-children {
  border-color: color-mix(in srgb, var(--sk-success) 30%, transparent);
  background: var(--sk-success-soft);
}

.tpv2-body .loadout-item .item-actions {
  display: flex;
  gap: 0.5rem;
}

.tpv2-body .loadout-item .add-child-btn {
  background: var(--sk-success-soft);
  border: none;
  color: var(--success);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.tpv2-body .loadout-item .add-child-btn:hover {
  background: var(--success);
  color: #fff;
}

.tpv2-body .children-count {
  font-size: 0.7rem;
  color: var(--success);
  margin-left: 0.5rem;
}

.tpv2-body .capacity-badge {
  font-size: 0.65rem;
  color: var(--text-secondary);
  background: var(--sk-border);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
}

.tpv2-body .loadout-item.has-children .capacity-badge {
  color: var(--success);
  background: var(--sk-success-soft);
}

.tpv2-body .children-container {
  margin-left: 1.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid color-mix(in srgb, var(--sk-success) 30%, transparent);
  margin-bottom: 0.5rem;
}

.tpv2-body .items-summary-panel {
  background: var(--sk-bg);
  border: 1px solid var(--sk-border-2);
  border-radius: 0.75rem;
  padding: 1rem;
}

.tpv2-body .items-summary-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}

.tpv2-body .summary-section {
  background: var(--sk-surface);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.tpv2-body .summary-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.tpv2-body .summary-section-header i {
  color: var(--primary);
}

.tpv2-body .summary-section-header.cargo-header i {
  color: var(--success);
}

.tpv2-body .summary-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tpv2-body .summary-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--sk-border-2);
  border: 1px solid var(--sk-border-2);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-primary);
}

.tpv2-body .summary-item.in-gear {
  background: var(--sk-warning-soft);
  border-color: color-mix(in srgb, var(--sk-warning) 30%, transparent);
}

.tpv2-body .summary-item.in-cargo {
  background: var(--sk-success-soft);
  border-color: color-mix(in srgb, var(--sk-success) 30%, transparent);
}

.tpv2-body .summary-item-count {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.7rem;
}

.tpv2-body .summary-empty {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.tpv2-body .gear-items-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tpv2-body .gear-section {
  background: var(--sk-surface);
  border: 1px solid var(--sk-border-2);
  border-radius: 0.5rem;
  overflow: hidden;
}

.tpv2-body .gear-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.6rem;
  background: var(--sk-warning-soft);
  border-bottom: 1px solid var(--sk-border-2);
  gap: 0.5rem;
}

.tpv2-body .gear-section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 0;
  flex: 1;
}

.tpv2-body .gear-section-title i {
  color: var(--primary);
  flex-shrink: 0;
}

.tpv2-body .gear-section-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpv2-body .gear-section-count {
  background: var(--primary);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 1rem;
  font-size: 0.65rem;
  font-weight: 600;
  flex-shrink: 0;
}

.tpv2-body .gear-section-items {
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tpv2-body .gear-child-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--sk-bg);
  border: 1px solid var(--sk-border-2);
  border-radius: 0.375rem;
  font-size: 0.8rem;
}

.tpv2-body .gear-child-name {
  flex: 1 1 auto;
  min-width: 80px;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpv2-body .gear-child-controls {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.tpv2-body .gear-child-btn {
  background: var(--sk-border-2);
  border: none;
  color: var(--text-secondary);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.15s;
  touch-action: manipulation;
}

.tpv2-body .gear-child-btn:hover,
.tpv2-body .gear-child-btn:active {
  background: var(--sk-border-2);
  color: var(--text-primary);
}

.tpv2-body .gear-child-btn.plus {
  background: var(--sk-success-soft);
  color: var(--success);
}

.tpv2-body .gear-child-btn.plus:hover,
.tpv2-body .gear-child-btn.plus:active {
  background: var(--sk-success-soft);
}

.tpv2-body .gear-child-btn.minus {
  background: var(--sk-danger-soft);
  color: var(--sk-danger-text);
}

.tpv2-body .gear-child-btn.minus:hover,
.tpv2-body .gear-child-btn.minus:active {
  background: var(--sk-danger-soft);
}

.tpv2-body .gear-child-count {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--primary);
}

.tpv2-body .gear-move-select {
  background: var(--bg-input);
  border: 1px solid color-mix(in srgb, var(--sk-info) 30%, transparent);
  color: var(--text-primary);
  padding: 0.3rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  cursor: pointer;
  width: 100%;
  max-width: none;
  margin-top: 0.3rem;
  flex-basis: 100%;
}

.tpv2-body .gear-empty-msg {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: italic;
  padding: 0.5rem;
  text-align: center;
}

.tpv2-body .no-gear-warning {
  background: var(--sk-warning-soft);
  border: 1px solid color-mix(in srgb, var(--sk-warning) 30%, transparent);
  border-radius: 0.5rem;
  padding: 0.75rem;
  text-align: center;
}

.tpv2-body .no-gear-warning i {
  color: var(--sk-warning-text);
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  display: block;
}

.tpv2-body .no-gear-warning p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0;
}

@media (min-width: 640px) {
.tpv2-body .gear-child-item {
  flex-wrap: nowrap;
}

.tpv2-body .gear-move-select {
  width: auto;
  max-width: 130px;
  margin-top: 0;
  flex-basis: auto;
}

.tpv2-body .gear-section-title {
  font-size: 0.8rem;
}

.tpv2-body .gear-child-name {
  font-size: 0.8rem;
}
}

.tpv2-body .child-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: var(--sk-success-soft);
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.tpv2-body .child-icon {
  color: var(--success);
  font-size: 0.65rem;
}

.tpv2-body .child-name {
  flex: 1;
  color: var(--text-secondary);
}

.tpv2-body .remove-child-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  font-size: 0.65rem;
  opacity: 0.6;
  transition: all 0.2s;
}

.tpv2-body .remove-child-btn:hover {
  color: var(--danger);
  opacity: 1;
}

@media (max-width: 768px) {
.tpv2-body .wizard-steps {
  gap: 0.25rem;
}

.tpv2-body .wizard-steps::before {
  left: 1.5rem;
  right: 1.5rem;
}

.tpv2-body .wizard-step .step-number {
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
}

.tpv2-body .wizard-step .step-label {
  font-size: 0.65rem;
  max-width: 60px;
}

.tpv2-body .item-grid {
  grid-template-columns: repeat(2, 1fr);
}

.tpv2-body .slot-selector {
  grid-template-columns: repeat(3, 1fr);
}

.tpv2-body .template-cards {
  grid-template-columns: 1fr;
}

.tpv2-body .category-tab {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
}
}

@media (max-width: 480px) {
.tpv2-body .slot-selector {
  grid-template-columns: repeat(2, 1fr);
}

.tpv2-body .item-grid {
  grid-template-columns: repeat(2, 1fr);
  max-height: 300px;
}

.tpv2-body .btn-primary,
.tpv2-body .btn-secondary,
.tpv2-body .btn-success {
  width: 100%;
  justify-content: center;
}
}

.tpv2-body .spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--sk-border);
}

.tpv2-body .footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: auto;
}
