:root {
  --bg: #130d08;
  --panel: rgba(34, 22, 13, 0.88);
  --panel-solid: #21150d;
  --panel-2: #2f1e11;
  --text: #fff7e8;
  --muted: #d6bea0;
  --gold: #f2b84b;
  --gold-2: #ffd88a;
  --line: rgba(242, 184, 75, 0.28);
  --danger: #ffb199;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(242, 184, 75, 0.18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(143, 84, 32, 0.28), transparent 32rem),
    linear-gradient(135deg, #120b06 0%, #26170c 48%, #120b06 100%);
  min-height: 100vh;
}

.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 330px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero-text, .hero-card, .controls-card, .list-panel, .detail-panel, dialog {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border-radius: 26px;
}

.hero-text {
  padding: clamp(24px, 4vw, 42px);
}

.eyebrow {
  color: var(--gold-2);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-size: 0.82rem;
}

h1 {
  font-size: clamp(2.25rem, 7vw, 5.2rem);
  line-height: 0.92;
  margin: 0 0 16px;
  letter-spacing: -0.06em;
}

.tagline {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.55;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button, .chip, .text-button, .note-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 850;
}

.primary {
  background: linear-gradient(135deg, var(--gold), #d88420);
  color: #1a0f07;
}

.secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.hero-card {
  padding: 24px;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-card img {
  width: min(210px, 58vw);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.38));
}

.hero-card strong { display: block; margin-top: 10px; font-size: 1.15rem; }
.hero-card span { color: var(--muted); }

.controls-card {
  padding: 18px;
  margin-bottom: 18px;
}

.search-row {
  display: grid;
  gap: 8px;
}

.search-row label {
  font-weight: 850;
  color: var(--gold-2);
}

input[type="search"] {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  padding: 0 16px;
  font-size: 1rem;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 184, 75, 0.16);
}

.filter-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-wrap {
  display: contents;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 750;
}

.chip.active {
  background: var(--gold);
  color: #1a0f07;
  border-color: transparent;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.text-button {
  color: var(--gold-2);
  background: transparent;
  font-weight: 800;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.list-panel {
  padding: 12px;
  max-height: calc(100vh - 230px);
  overflow: auto;
  position: sticky;
  top: 14px;
}

.tuning-list {
  display: grid;
  gap: 10px;
}

.tuning-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  border-radius: 18px;
  padding: 13px;
  cursor: pointer;
}

.tuning-card:hover, .tuning-card.active {
  border-color: var(--gold);
  background: rgba(242, 184, 75, 0.10);
}

.tuning-card strong {
  display: block;
  font-size: 1rem;
}

.tuning-card span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
}

.category-pill {
  display: inline-flex;
  margin-top: 8px;
  color: #1a0f07;
  background: var(--gold-2);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 850;
}

.detail-panel {
  padding: clamp(20px, 4vw, 34px);
  min-height: 420px;
}

.empty-state {
  min-height: 330px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-header h2 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1;
  margin: 0 0 8px;
  letter-spacing: -0.04em;
}

.favorite-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.08);
  color: var(--gold-2);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 850;
  white-space: nowrap;
}

.notes-box {
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  margin: 16px 0;
}

.notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
}

.note-button {
  border-radius: 14px;
  min-width: 58px;
  min-height: 52px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #f5dfb2, #b97b32);
  color: #140c05;
  box-shadow: inset 0 1px rgba(255,255,255,0.55), 0 8px 14px rgba(0,0,0,0.22);
  font-weight: 950;
}

.detail-description {
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.05rem;
}

.safety {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 177, 153, 0.35);
  background: rgba(255, 177, 153, 0.08);
  color: var(--danger);
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

footer {
  color: var(--muted);
  text-align: center;
  padding: 22px 0 4px;
}

dialog {
  color: var(--text);
  max-width: min(560px, calc(100% - 24px));
  padding: 24px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

@media (max-width: 860px) {
  .hero, .catalog-layout {
    grid-template-columns: 1fr;
  }

  .list-panel {
    position: static;
    max-height: 52vh;
  }

  .summary-row, .detail-header {
    align-items: stretch;
    flex-direction: column;
  }
}
