:root {
  --bg: #07111f;
  --panel: rgba(15, 23, 42, 0.84);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefc;
  --muted: #9fb0c9;
  --accent: #60a5fa;
  --accent-2: #22c55e;
  --warn: #f87171;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #0f1f3a, var(--bg) 55%);
}
.bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(96,165,250,.14), transparent 35%), linear-gradient(320deg, rgba(34,197,94,.10), transparent 35%);
  pointer-events: none;
}
.container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px 110px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.hero, .quick-presets, .form-panel, .result-panel, .notice-bar { padding: 24px; }
.hero, .quick-presets, .notice-bar { margin-bottom: 24px; }
.notice-bar p { margin: 0; color: var(--muted); }
.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1, .section-head h2 {
  margin: 10px 0 14px;
  line-height: 1.15;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.section-head h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.lead, .muted { color: var(--muted); line-height: 1.8; }
.hero-points, .summary, .store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-points span, .badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
}
.badge.highlight {
  color: #dbeafe;
  border-color: rgba(96,165,250,.35);
  background: rgba(96,165,250,.14);
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.preset-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.28);
}
.preset-card h3 { margin-top: 0; }
.preset-button, button, .ghost-button {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
}
button, .preset-button {
  width: 100%;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--accent), #818cf8);
  color: white;
  font-weight: 800;
}
.ghost-button {
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
}
.ghost-button.danger { border-color: rgba(248,113,113,.35); color: #fecaca; }
.grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}
.panel-head, .panel-actions, .toolbar, .share-actions {
  display: flex;
  gap: 10px;
}
.panel-head { justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-actions { flex-wrap: wrap; }
.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
label { display: block; margin-bottom: 16px; }
label span, summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
}
select, .share-actions input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  font: inherit;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
}
.help-inline {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,.35);
  background: rgba(96,165,250,.10);
  color: #dbeafe;
  font-weight: 800;
}
.parts-group {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.25);
}
.parts-group summary { cursor: pointer; margin-bottom: 10px; }
.mini-info, .estimate-box, .adbox, .share-box, .warning-box, .ok-box, .case-preview {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
}
.mini-info {
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid var(--line);
}
.estimate-box, .ok-box {
  border: 1px solid rgba(34,197,94,.28);
  background: rgba(34,197,94,.08);
}
.warning-box {
  border: 1px solid rgba(248,113,113,.30);
  background: rgba(248,113,113,.08);
}
.warning-box.subtle {
  border-color: rgba(251,191,36,.25);
  background: rgba(251,191,36,.08);
}
.estimate-box p {
  margin: 8px 0 6px;
  font-size: 1.6rem;
  font-weight: 800;
  color: #dcfce7;
}
.share-box, .case-preview {
  border: 1px solid rgba(96,165,250,.28);
  background: rgba(96,165,250,.08);
}
.case-preview img {
  display: block;
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
}
.parts {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.part {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.28);
}
.part .label { color: var(--muted); font-size: 0.95rem; }
.part .name { font-weight: 700; margin-bottom: 6px; }
.part .price { color: #bfdbfe; font-size: 0.95rem; margin-bottom: 10px; }
.store-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(96,165,250,.35);
  background: rgba(96,165,250,.08);
  color: #dbeafe;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}
.adbox {
  background: rgba(34,197,94,.08);
  border: 1px dashed rgba(34,197,94,.35);
}
.floating-total {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 24px));
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(96,165,250,.28);
  box-shadow: var(--shadow);
  z-index: 20;
  font-weight: 800;
  text-align: center;
}
.toast {
  position: fixed;
  top: 18px;
  right: 18px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(96,165,250,.32);
  box-shadow: var(--shadow);
  z-index: 30;
}
@media (max-width: 920px) {
  .grid, .preset-grid, .part, .toolbar { grid-template-columns: 1fr; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .share-actions { flex-direction: column; }
  .floating-total {
    bottom: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
  }
}

.card-like { margin-top: 18px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(96,165,250,.25); background: rgba(96,165,250,.08); }
.used-badges { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 14px; }
.used-badges span { padding:6px 10px; border-radius:999px; background:rgba(34,197,94,.10); border:1px solid rgba(34,197,94,.28); color:#dcfce7; font-size:.9rem; }
.used-button { display:inline-flex; align-items:center; justify-content:center; padding:12px 14px; border-radius:12px; background:linear-gradient(90deg, #22c55e, #16a34a); color:white; text-decoration:none; font-weight:800; }
.accent-price { color:#dcfce7; font-weight:800; }
.comparison-box { margin-top:18px; padding:14px 16px; border-radius:16px; border:1px solid var(--line); background: rgba(2,6,23,.28); }
.comparison-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:12px; }
.comparison-grid > div { padding:14px; border-radius:14px; border:1px solid var(--line); background: rgba(15,23,42,.5); }
.comparison-grid h4 { margin:0 0 8px; }
.comparison-grid p { margin:0 0 6px; font-size:1.2rem; font-weight:800; }
.power-box { margin-top:18px; padding:14px 16px; border-radius:16px; border:1px solid rgba(96,165,250,.25); background: rgba(96,165,250,.08); }
.power-stats { display:flex; flex-wrap:wrap; gap:10px; margin:10px 0; color: var(--muted); }
.meter { height:12px; border-radius:999px; background: rgba(15,23,42,.9); overflow:hidden; border:1px solid var(--line); }
.meter-fill { height:100%; background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444); }
.floating-total { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.floating-total button { width:auto; margin:0; padding:10px 12px; }
@media (max-width: 920px) { .comparison-grid { grid-template-columns:1fr; } .floating-total { padding:12px 14px; } }
