/* ═══════════════════════════════════════════════════
   Design System — Apple-inspired × NEWARE Yellow
   ═══════════════════════════════════════════════════ */
:root {
  --accent: #f8b500;
  --accent-dark: #d99e00;
  --accent-soft: rgba(240,177,0,0.10);
  --accent-glow: rgba(240,177,0,0.25);
  --ink: #1f1d1d;
  --ink-2: #424245;
  --ink-3: #6e6e73;
  --ink-4: #86868b;
  --line: #d2d2d7;
  --bg: #f5f5f7;
  --bg-white: #ffffff;
  --radius: 0.28rem;
  --radius-sm: 0.12rem;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow: 0 2px 6px rgba(0,0,0,0.04);
  --shadow-hover: 0 2px 12px rgba(0,0,0,0.06);
  --green: #34c759;
  --green-soft: rgba(52,199,89,0.12);
}
div::-webkit-scrollbar { width: auto !important}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.04rem;
}
button:focus-visible, .scenario-card:focus-visible, .voltage-card:focus-visible, .current-chip:focus-visible, .result-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.06rem;
}

/* ═══════════════════════════════════════════════════
   §1.5  Selector Trigger Button
   ═══════════════════════════════════════════════════ */
.selector-trigger-wrap {
  margin-top: 0.4rem;
  display: flex;
  justify-content: center;
}
.selector-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0.16rem 0.4rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 60%, #f5d060 100%);
  color: var(--ink);
  font-size: 1.2em;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.35s var(--ease);
}
.selector-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.1rem 0.32rem rgba(240,177,0,0.40);
}
.selector-trigger-btn:active {
  transform: translateY(0);
}
.selector-trigger-btn svg {
  transition: transform 0.3s var(--ease);
}
.selector-trigger-btn:hover svg {
  transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════
   §2  Product Finder — Full Modal
   ═══════════════════════════════════════════════════ */

/* Modal Overlay */
.selector-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 0.16rem;
  animation: overlayFadeIn 0.3s var(--ease) both;
}
.selector-modal-overlay.visible {
  display: flex;
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Container */
.selector-mian{
   border-radius: var(--radius);
  box-shadow: 0 0.24rem 0.8rem rgba(0,0,0,0.22), 0 0.1rem 0.24rem rgba(0,0,0,0.12);
  width: 65vw;
  max-height: 92vh;
 overflow: hidden;
}
.selector-modal {
  background: var(--bg-white);
  border-radius: var(--radius);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.45s var(--ease-spring) both;
  padding: clamp(0.4rem, 4vw, 0.6rem);
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Close Button */
.selector-modal-close {
  position: absolute;
  top: 0.16rem;
  right: 0.16rem;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--ink-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
  z-index: 10;
}
.selector-modal-close:hover {
  background: var(--line);
  color: var(--ink);
  transform: rotate(90deg);
}

/* Modal Title */
.selector-modal-title {
  text-align: center;
  margin-bottom: 0.28rem;
}
.selector-modal-title h2 {
  font-size: clamp(0.24rem, 3vw, 0.28rem);
  font-family: OpenSans-bold;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.selector-modal-title p {
  margin-top: 0.06rem;
  font-size: 1em;
  color: var(--ink-3);
}

/* Finder card wrapper inside modal — remove shadow/bg since modal already provides */
.finder-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  position: relative;
  overflow: visible;
}

.finder {
  position: relative;
  padding: 0;
}

/* ─── Step Indicator ─── */
.steps-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  margin-bottom: 0.48rem;
  position: relative;
}
.step-node {
  display: flex; align-items: center; gap: 0.12rem;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 0.36rem; height: 0.36rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1em; font-family: OpenSans-bold;
  background: var(--bg);
  color: var(--ink-4);
  border: 2px solid var(--line);
  transition: all 0.5s var(--ease);
  flex-shrink: 0;
}
.step-label {
  font-size: 1em; font-family: OpenSans-bold;
  color: var(--ink-4);
  transition: color 0.4s var(--ease);
  white-space: nowrap;
}
.step-line {
  width: clamp(0.32rem, 6vw, 0.8rem); height: 2px;
  background: var(--line);
  margin: 0 0.12rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.step-line::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%; background: var(--accent);
  transition: width 0.6s var(--ease);
}
.step-line.filled::after { width: 100%; }

.step-node.active .step-num {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent);
  box-shadow: 0 0 0 0.06rem var(--accent-soft);
}
.step-node.active .step-label { color: var(--ink); }

.step-node.done .step-num {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.step-node.done .step-label { color: var(--ink-2); }

/* ═══════════════════════════════════════════════════
   §3  Step Sections
   ═══════════════════════════════════════════════════ */
.step-section {
  display: none;
  animation: stepReveal 0.55s var(--ease) both;
}
.step-section.visible { display: block; }

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

.step-header {
  text-align: center;
  margin-bottom: 0.36rem;
}
.step-header h2 {
  font-size: clamp(0.28rem, 3.5vw, 0.36rem);
  font-family: OpenSans-bold;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.step-header p {
  margin-top: 0.12rem;
  font-size: 1.05em;
  color: var(--ink-3);
}

/* ═══════════════════════════════════════════════════
   §3a  Scenario Cards (Step 1) — Cell / Module / Pack
   ═══════════════════════════════════════════════════ */
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.24rem;
  max-width: 100%;
  margin: 0 auto;
}
.scenario-card {
  position: relative;
  padding: 0.4rem 0.32rem;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--bg-white);
  cursor: pointer;
  text-align: center;
  transition: all 0.4s var(--ease);
  overflow: hidden;
}
.scenario-card::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent-soft);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  border-radius: inherit;
}
.scenario-card:hover {
  border-color: rgba(240,177,0,0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.scenario-card:hover::before { opacity: 1; }
.scenario-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.04rem var(--accent-soft), var(--shadow);
}
.scenario-card.selected::before { opacity: 1; }

.scenario-icon {
  position: relative;
  width: 0.8rem;height: 0.8rem;
  margin: 0 auto 0.24rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.24rem;
  background: linear-gradient(135deg, var(--accent-soft), rgba(240,177,0,0.05));
  transition: transform 0.4s var(--ease-spring);
}
.scenario-card:hover .scenario-icon { transform: scale(1.08); }
.scenario-icon svg { width: 0.5rem; height: 0.5rem; }

.scenario-card h3 {
  position: relative;
  font-size: 1.5em; font-family: OpenSans-bold;
  letter-spacing: -0.01em;
  margin-bottom: 0.06rem;
}
.scenario-card .sc-en {
  position: relative;
  font-size: 0.85em; color: var(--ink-4);
  
  margin-bottom: 0.12rem;
}
.scenario-card .sc-desc {
  position: relative;
  font-size: 1em; color: var(--ink-3);
  line-height: 1.6;
}
.scenario-card .sc-check {
  position: absolute; top: 0.16rem; right: 0.16rem;
  width: 0.28rem; height: 0.28rem; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.5);
  transition: all 0.35s var(--ease-spring);
}
.scenario-card.selected .sc-check { opacity: 1; transform: scale(1); }
.sc-check svg { width: 0.16rem; height: 0.16rem; }



/* ═══════════════════════════════════════════════════
   §3b  Voltage Selector (Step 2)
   ═══════════════════════════════════════════════════ */
.voltage-grid {
  display: flex;
  justify-content: center;
  gap: 0.16rem;
  flex-wrap: wrap;
  max-width: 100%;
  margin: 0 auto;
}
.voltage-card {
  position: relative;
  width: 2rem;
  padding: 0.24rem;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--bg-white);
  cursor: pointer;
  text-align: center;
  transition: all 0.35s var(--ease);
}
.voltage-card:hover {
  border-color: rgba(240,177,0,0.5);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.voltage-card.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), rgba(240,177,0,0.03));
  box-shadow: 0 0 0 0.04rem var(--accent-soft);
}
.voltage-value {
  font-size: 2.25em; font-family: OpenSans-bold;
  color: var(--ink);
  line-height: 1;
  transition: color 0.3s;
}
.voltage-card.selected .voltage-value { color: var(--accent-dark); }

.voltage-desc {
  margin-top: 0.12rem;
  font-size: 0.85em; color: var(--ink-3);
  line-height: 1.5;
}
.voltage-count {
  display: inline-flex;
  align-items: center; gap: 0.04rem;
  margin-top: 0.12rem;
  padding: 0.06rem 0.16rem; border-radius: 999px;
  font-size: 0.85em; font-family: OpenSans-bold;
  color: var(--ink-4);
  background: var(--bg);
}

/* ═══════════════════════════════════════════════════
   §3c  Current Range (Step 3)
   ═══════════════════════════════════════════════════ */
.current-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(1.4rem, 1fr));
  gap: 0.16rem;
  max-width: 100%;
  margin: 0 auto;
  justify-content: center;
}
.current-chip {
  position: relative;
  padding: 0.18rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--bg-white);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s var(--ease);
}
.current-chip:hover {
  border-color: rgba(240,177,0,0.45);
  transform: translateY(-2px);
  box-shadow: 0 0 0.16rem rgba(0,0,0,0.06);
}
.current-chip.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.current-val {
  font-size: 1.75em; font-family: OpenSans-bold;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.current-chip.selected .current-val { color: var(--accent-dark); }
.current-models {
  margin-top: 0.04rem;
  font-size: 0.85em; color: var(--ink-4);
}

/* ═══════════════════════════════════════════════════
   §4  Result Panel — Inside Modal
   ═══════════════════════════════════════════════════ */
.result-panel {
  display: none;
  margin-top: 0;
  animation: resultReveal 0.5s var(--ease) both;
}
.result-panel.visible { display: block; }

@keyframes resultReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-header {
  text-align: center;
  margin-bottom: 0.24rem;
}
.result-header h2 {
  font-size: clamp(0.24rem, 3vw, 0.28rem);
  font-family: OpenSans-bold;
  letter-spacing: -0.02em;
}
.result-header .result-sub {
  margin-top: 0.06rem;
  font-size: 1em; color: var(--ink-3);
}
.result-tags {
  display: flex; justify-content: center; gap: 0.1rem;
  margin-top: 0.12rem; flex-wrap: wrap;
}
.result-tag {
  display: inline-flex; align-items: center; gap: 0.06rem;
  padding: 0.06rem 0.16rem; border-radius: 999px;
  font-size: 0.85em; font-family: OpenSans-bold;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
#resultSub{max-width:640px ;margin: 0 auto;}

/* ─── Minimal Result Cards ─── */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.8rem, 1fr));
  gap: 0.16rem;
}
.result-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  padding: 0.18rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-align: left;
}
.result-card:hover {
  border-color: rgba(240,177,0,0.5);
  transform: translateY(-2px);
  box-shadow: 0 0.04rem 0.16rem rgba(0,0,0,0.06);
}
.result-card.copied {
  border-color: var(--green) !important;
  background: var(--green-soft) !important;
}
.result-card .rc-model {
  font-size: 1.05em;
  font-family: OpenSans-bold;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  word-break: break-all;
}
.result-card .rc-specs {
  margin-top: 0.06rem;
  font-size: 0.85em;
  color: var(--ink-3);
  
}
.result-card .rc-hint {
  margin-top: 0.12rem;
  padding-top: 0.1rem;
  border-top: 1px solid var(--bg);
  font-size: 0.75em;
  color: var(--ink-4);
  line-height: 1.5;
}
.result-card .rc-copy-badge {
  position: absolute;
  top: 0.12rem;
  right: 0.12rem;
  padding: 0.06rem 0.12rem;
  border-radius: 999px;
  font-size: 0.75em;
  font-family: OpenSans-bold;
  background: var(--green);
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s var(--ease-spring);
  pointer-events: none;
}
.result-card.copied .rc-copy-badge {
  opacity: 1;
  transform: scale(1);
}

.result-modal-footer {
  margin-top: 0.24rem;
  display: flex;
  justify-content: center;
  gap: 0.16rem;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════
   §5  Custom Solution CTA
   ═══════════════════════════════════════════════════ */
.custom-cta {
  padding: clamp(48px, 6vw, 0.8rem) 0;
}
.custom-card {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--ink) 0%, #2a3646 100%);
  color: #f4f6f9;
  padding: clamp(0.36rem, 5vw, 0.56rem) clamp(.28rem, 4vw, 0.48rem);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.32rem;
  flex-wrap: wrap;
}
.custom-card::before {
  content: "";
  position: absolute; right: -0.8rem; top: -0.8rem;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: rgba(240,177,0,0.12);
}
.custom-card::after {
  content: "";
  position: absolute; left: -0.4rem; bottom: -.6rem;
  width:1.8rem; height: 1.8rem; border-radius: 50%;
  background: rgba(240,177,0,0.06);
}
.custom-text { position: relative; flex: 1; min-width: 2.8rem; }
.custom-text h3 {
  font-size: clamp(0.24rem, 3vw, 0.32rem);
  font-family: OpenSans-bold;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.custom-text p {
  margin-top: 0.12rem;
  font-size: 1.05em; color: #aeb7c4;
  max-width: 6rem;
  line-height: 1.6;
}
.custom-actions {
  position: relative;
  flex-shrink: 0;
  display: flex; gap: 0.16rem;
  flex-wrap: wrap;
}
.btn-cta-primary {
  display: inline-flex; align-items: center; gap: 0.1rem;
  padding: 0.16rem 0.32rem; border-radius: 999px;
  font-size: 1.05em; font-family: OpenSans-bold;
  background: var(--accent); color: var(--ink);
  border: none; cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.btn-cta-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 0.1rem 0.24rem rgba(240,177,0,0.35);
  text-decoration: none;
}
.btn-cta-ghost {
  display: inline-flex; align-items: center; gap: 0.1rem;
  padding: 0.16rem 0.32rem; border-radius: 999px;
  font-size: 1.05em; font-family: OpenSans-bold;
  background: transparent;
  color: #f4f6f9;
  border: 1.5px solid rgba(255,255,255,0.2);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.btn-cta-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════
   §6  Footer
   ═══════════════════════════════════════════════════ */
.site-footer {
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85em;
  color: var(--ink-4);
}
.site-footer a { color: var(--ink-3); }
.site-footer a:hover { color: var(--accent-dark); }

/* ═══════════════════════════════════════════════════
   §7  Back / Reset Controls
   ═══════════════════════════════════════════════════ */
.step-controls {
  display: flex;
  justify-content: center;
  gap: 0.16rem;
  margin-top: 0.32rem;
}
.ctrl-btn {
  display: inline-flex; align-items: center; gap: 0.06rem;
  padding: 0.12rem 0.24rem; border-radius: 999px;
  font-size: 1em; 
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border: none;
}
.ctrl-back {
  background: var(--bg);
  color: var(--ink-3);
}
.ctrl-back:hover { background: var(--line); color: var(--ink); }
.ctrl-reset {
  background: transparent;
  color: var(--ink-4);
  border: 1.5px solid var(--line);
}
.ctrl-reset:hover { border-color: var(--ink-4); color: var(--ink-2); }

/* ═══════════════════════════════════════════════════
   §8  Animations & Scroll Reveal
   ═══════════════════════════════════════════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(0.24rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════
   §9  Responsive
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .scenario-grid { grid-template-columns: 1fr; max-width: 400px; }
  .scenario-grid .scenario-card:nth-child(3) { max-width: none; }
  .voltage-grid { flex-direction: column; align-items: center; }
  .voltage-card { width: 100%; max-width: 2.8rem; }
  .current-grid { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
  .step-label { display: none; }
  .step-line { width: 0.32rem; margin: 0 0.1rem; }
  .topnav-links { gap: 0.16rem; }
  .topnav-links a { font-size: 0.85em; }
  .custom-card { flex-direction: column; text-align: center; }
  .custom-actions { justify-content: center; }
}
@media (max-width: 480px) {
  .current-grid { grid-template-columns: 1fr 1fr; gap: 0.1rem; }
  .current-chip { padding: 0.16rem 0.12rem; }
  .current-val { font-size: 1.5em; }
}

/* ─── Body scroll lock when modal open ─── */
body.modal-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   §10  Print
   ═══════════════════════════════════════════════════ */
@media print {
  .topnav, .custom-cta, .step-controls { display: none; }
  .finder-card { box-shadow: none; border: 1px solid #ddd; }
  .scenario-card, .voltage-card, .current-chip, .result-card {
    break-inside: avoid;
  }
}
