/* Character forge — neon cyberpunk chrome */

.chargen-page {
  max-width: 1280px;
  position: relative;
}

/* ── Thin wide step banner (not a giant square box) ── */
.cg-step-banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(232, 121, 249, 0.35);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.45);
  height: 108px;
  max-height: 120px;
  background: #0a0610;
}
.cg-step-banner-media {
  position: absolute;
  inset: 0;
}
.cg-step-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  filter: contrast(1.06) saturate(1.12);
}
.cg-step-banner-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 6, 14, 0.92) 0%,
    rgba(8, 6, 14, 0.75) 38%,
    rgba(8, 6, 14, 0.25) 70%,
    transparent 100%
  );
}
.cg-hero-scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
}
.cg-hero-chroma {
  pointer-events: none;
  position: absolute;
  inset: 0;
  box-shadow:
    inset 2px 0 0 rgba(0, 255, 255, 0.12),
    inset -2px 0 0 rgba(255, 0, 128, 0.12);
}
.cg-step-banner-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: min(560px, 70%);
}
.cg-step-banner-copy h2 {
  margin: 0 0 2px;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #f0abfc, #5eead4, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}
.cg-step-label {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5eead4;
  letter-spacing: 0.04em;
}
.cg-step-banner-copy #mode-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}
.cg-kicker {
  margin: 0 0 2px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #c084fc;
  font-weight: 700;
}

/* legacy class kept for other pages */
.cg-hero { display: none; }

/* ── Steps ── */
.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(30, 20, 40, 0.9), rgba(12, 10, 20, 0.95));
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.wizard-step {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(100, 80, 120, 0.5);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.wizard-step:hover {
  color: #f5d0fe;
  border-color: rgba(232, 121, 249, 0.5);
  transform: translateY(-1px);
}
.wizard-step.active {
  border-color: #2dd4bf;
  color: #5eead4;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(232, 121, 249, 0.12));
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.25);
}

/* ── Layout ── */
.wizard-layout {
  display: grid;
  grid-template-columns: 1fr min(360px, 100%);
  gap: 18px;
  align-items: start;
}

.wizard-panel {
  display: none;
  border-radius: 12px !important;
  border-color: rgba(139, 92, 246, 0.25) !important;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(232, 121, 249, 0.08), transparent),
    var(--bg-card) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.wizard-panel.active {
  display: block;
  animation: cgFade 0.25s ease;
}
@keyframes cgFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.wizard-panel .card-title {
  color: #e9d5ff;
  letter-spacing: 0.03em;
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(10, 8, 16, 0.7);
  border: 1px solid rgba(167, 139, 250, 0.2);
}
.wizard-nav .btn-primary {
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.2);
}

/* Settings */
.setting-cards {
  display: grid;
  gap: 12px;
}
.setting-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(100, 80, 130, 0.45);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  margin: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.setting-card:hover {
  border-color: rgba(232, 121, 249, 0.45);
}
.setting-card:has(input:checked) {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.4), 0 0 24px rgba(45, 212, 191, 0.12);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(232, 121, 249, 0.08));
}
.setting-card input {
  margin-top: 4px;
  accent-color: #2dd4bf;
}

/* Forms — characteristics use dedicated stat blocks, not raw inputs */
.stat-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.skill-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 480px;
  overflow: auto;
  padding-right: 4px;
}
@media (min-width: 720px) {
  .skill-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.skill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(80, 60, 100, 0.45);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.88rem;
  min-height: 56px;
}
.skill-row:hover {
  border-color: rgba(94, 234, 212, 0.35);
}
/* Never let global .stack-form input { width:100% } wreck steppers */
.skill-row .stepper,
.stat-step-block .stepper,
.talent-row .stepper {
  flex-shrink: 0;
}
.wizard-panel .stepper input.stepper-input,
.skill-row input.stepper-input,
.stat-step-block input.stepper-input {
  display: inline-block !important;
  width: 3rem !important;
  max-width: 3rem !important;
  min-width: 2.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}
.check-inline {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.cg-inline-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.custom-gear-box {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(232, 121, 249, 0.4);
  background: rgba(88, 28, 135, 0.12);
}

.equip-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.equip-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(100, 80, 130, 0.4);
  border-radius: 10px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(45, 212, 191, 0.04));
  font-size: 0.88rem;
}
.equip-notes {
  font-size: 0.8rem;
  margin-top: 4px;
}
.tag-strain {
  color: #f9a8d4 !important;
  border-color: rgba(244, 114, 182, 0.5) !important;
  background: rgba(244, 114, 182, 0.12) !important;
}

/* ── Live preview sidebar ── */
.sheet-preview {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(232, 121, 249, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: #0a0812;
}
.preview-art {
  position: relative;
  height: 160px;
  overflow: hidden;
}
.preview-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  filter: saturate(1.1);
}
.preview-panel {
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  background: linear-gradient(180deg, #14101c, #0c0a12) !important;
}
.preview-panel .card-title {
  color: #5eead4;
}
#preview-body .stat-strip {
  margin: 10px 0;
}
#preview-body .stat-cell .val {
  color: #f0abfc;
}

/* ── Pick cards: horizontal — full face visible, no crop-to-death ── */
.pick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 10px 0 14px;
}
@media (min-width: 700px) {
  .pick-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.pick-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  text-align: left;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(100, 80, 130, 0.45);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  font: inherit;
  min-height: 132px;
}
.pick-card:hover {
  border-color: rgba(94, 234, 212, 0.45);
}
.pick-card.selected {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.45), 0 0 18px rgba(45, 212, 191, 0.12);
}
.pick-card.locked {
  opacity: 0.75;
  cursor: default;
}
.pick-card-art {
  position: relative;
  width: 112px;
  min-height: 132px;
  align-self: stretch;
  overflow: hidden;
  background: #0a0e14;
}
.pick-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.pick-card-art-zoom {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.pick-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-width: 0;
}
.pick-card-title {
  font-size: 1.02rem;
  color: #e2e8f0;
}
.pick-card-meta {
  font-size: 0.72rem;
  color: #5eead4;
  font-weight: 600;
}
.pick-card-stats {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
}
.pick-card-sum {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mono {
  font-family: var(--mono);
}

/* Selected detail: large portrait + text side by side */
.detail-panel {
  margin-top: 12px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background: rgba(8, 12, 18, 0.9);
  font-size: 0.9rem;
  overflow: hidden;
}
.detail-panel-inner {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 0;
}
@media (max-width: 560px) {
  .detail-panel-inner {
    grid-template-columns: 1fr;
  }
}
.detail-panel-art {
  position: relative;
  background: #0a0e14;
  min-height: 240px;
  cursor: zoom-in;
}
.detail-panel-art img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  max-height: 320px;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.detail-panel-copy {
  padding: 14px 16px;
}
.detail-panel h4 {
  margin: 0 0 8px;
  color: #5eead4;
}
.detail-panel p {
  margin: 0 0 8px;
}
.detail-panel p:last-child {
  margin-bottom: 0;
}
.detail-panel ul.compact {
  margin: 0;
  padding-left: 1.1rem;
}

/* Full-image lightbox */
.pick-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 12px;
}
.pick-lightbox[hidden] {
  display: none !important;
}
.pick-lightbox img {
  max-width: min(920px, 96vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}
.pick-lightbox-cap {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.95rem;
}
.pick-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.help-box {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(88, 28, 135, 0.14);
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.help-box h4 {
  margin: 0 0 8px;
  color: #e9d5ff;
  font-size: 0.95rem;
}
.help-box p {
  margin: 0 0 8px;
}
.help-box ul {
  margin: 0 0 8px;
  padding-left: 1.2rem;
}
.help-box li {
  margin-bottom: 4px;
}

/* Touch-friendly steppers — self-contained, ignore stack-form rules */
.stepper {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  flex-shrink: 0;
  width: auto;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border, #2a3d5c);
  overflow: hidden;
  background: var(--bg-deep, #070b12);
  box-sizing: border-box;
}
.stepper-btn {
  box-sizing: border-box;
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(45, 212, 191, 0.14);
  color: #5eead4;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.stepper-btn:hover:not(:disabled) {
  background: rgba(45, 212, 191, 0.3);
}
.stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.stepper-input,
input.stepper-input[type="number"] {
  box-sizing: border-box !important;
  display: block !important;
  width: 3rem !important;
  min-width: 3rem !important;
  max-width: 3rem !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-left: 1px solid var(--border, #2a3d5c) !important;
  border-right: 1px solid var(--border, #2a3d5c) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #e2e8f0 !important;
  font-family: var(--mono) !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 40px !important;
  text-align: center !important;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stat-step-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(80, 60, 100, 0.4);
  background: rgba(0, 0, 0, 0.25);
}
.stat-step-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  font-weight: 600;
}
.skill-name-btn {
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 4px 0;
  min-height: 40px;
}
.skill-name-btn:hover {
  color: #5eead4;
}
.skill-row.is-career {
  border-color: rgba(45, 212, 191, 0.35);
}
.skill-row.open,
.talent-row.open {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25);
}
.career-dot {
  color: #2dd4bf;
}
.portrait-preview-wrap {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(232, 121, 249, 0.35);
  margin-bottom: 8px;
}
.portrait-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 960px) {
  .cg-step-banner {
    height: 96px;
  }
  .cg-step-banner-copy {
    max-width: 85%;
  }
  .wizard-layout {
    grid-template-columns: 1fr;
  }
  .sheet-preview {
    position: static;
  }
  .preview-art {
    height: 120px;
  }
  .pick-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .pick-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 120px;
  }
  .pick-card-art {
    width: 96px;
    min-height: 120px;
  }
}
