:root {
  color-scheme: dark;
  --bg: #0a0c0f;
  --panel: #12161c;
  --line: #2a313c;
  --text: #e8ecef;
  --muted: #9aa3ad;
  --gold: #c9a227;
  --sale: #e85d4f;
  --rwa: #3dd68c;
  --font: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2330 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--gold);
}

.masthead {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 15, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.masthead__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.comic-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.comic-link:hover {
  text-decoration: underline;
}

.comic-banner {
  max-width: 1120px;
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold);
  background: rgba(201, 162, 39, 0.08);
  border-radius: 4px;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.comic-banner__thumb {
  border: 2px solid var(--gold);
  image-rendering: pixelated;
  flex-shrink: 0;
}
.comic-banner a {
  font-weight: 600;
}

.masthead__tools {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.lang {
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  color: var(--muted);
  gap: 0.2rem;
}

select,
.search {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font: inherit;
}

.search {
  min-width: min(280px, 70vw);
}

.promo {
  margin: 0;
  padding: 0.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(90deg, #1e2530, #2a2038, #1e2530);
  color: var(--gold);
  font-size: 0.9rem;
}

.catalog {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem;
}

.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin: 0 0 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: #3d4654;
}

.card__media {
  aspect-ratio: 4 / 3;
  background: #0d1014;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.dek {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.body {
  margin: 0;
  font-size: 0.85rem;
  color: #c5cbd3;
}

.meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.price {
  font-weight: 600;
  color: var(--text);
}

.price--sale {
  color: var(--sale);
}

.price--was {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.35rem;
}

.pill {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}

.pill--rwa {
  background: rgba(61, 214, 140, 0.15);
  color: var(--rwa);
  border: 1px solid rgba(61, 214, 140, 0.35);
}

.pill--sale {
  background: rgba(232, 93, 79, 0.12);
  color: var(--sale);
  border: 1px solid rgba(232, 93, 79, 0.3);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #181d24;
  color: var(--text);
}

.btn--primary {
  border-color: rgba(201, 162, 39, 0.5);
  color: var(--gold);
}

.fallback-note {
  font-size: 0.7rem;
  color: #6b7580;
  font-style: italic;
}

.footer {
  max-width: 1120px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footnote {
  font-size: 0.75rem;
  opacity: 0.8;
}

html[dir="rtl"] .masthead__inner {
  flex-direction: row-reverse;
}

@media (max-width: 640px) {
  .masthead__inner {
    flex-direction: column;
    align-items: stretch;
  }
}