:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --border: #2a3040;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --accent: #ff5a7a;
  --accent-2: #5ad1ff;
  --ok: #57d28b;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.brand .dot { color: var(--accent); }
.nav a { margin-left: 18px; color: var(--muted); font-size: 14px; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }

/* ---- hero (top) ---- */
.hero {
  padding: 72px 0 48px;
  text-align: center;
  background: radial-gradient(1200px 400px at 50% -50px, rgba(255, 90, 122, 0.18), transparent 70%);
}
.hero h1 { font-size: clamp(28px, 5vw, 48px); margin: 0 0 14px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

.stats { display: flex; gap: 28px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 26px; min-width: 130px; }
.stat .num { font-size: 28px; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 13px; }

/* ---- featured cards ---- */
.section-title { font-size: 20px; margin: 48px 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel-2); display: block; }
.card .body { padding: 12px 14px; }
.card .ttl { font-size: 14px; font-weight: 700; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .mk { font-size: 12px; color: var(--muted); }

/* ---- index toolbar ---- */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}
.search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  padding: 11px 8px;
  outline: none;
}
.search svg { width: 18px; height: 18px; fill: var(--muted); }
.select, .meta-line { color: var(--muted); font-size: 13px; }
.select select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
}

/* ---- table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.works { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.works thead th {
  position: sticky;
  top: 60px;
  background: var(--panel-2);
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.works thead th.sortable { cursor: pointer; }
.works thead th.sortable:hover { color: var(--text); }
.works thead th .arrow { opacity: 0.35; margin-left: 4px; }
.works thead th[data-dir] .arrow { opacity: 1; color: var(--accent); }
.works tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.works tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.works tbody tr:last-child td { border-bottom: 0; }

.thumb { width: 88px; height: 66px; border-radius: 8px; object-fit: cover; background: var(--panel-2); display: block; }
.cell-title { min-width: 240px; }
.cell-title .t { font-weight: 700; }
.cell-title .genres { margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.price { font-weight: 700; white-space: nowrap; }
.price .orig { color: var(--muted); text-decoration: line-through; font-weight: 400; font-size: 12px; margin-left: 6px; }
.rating { white-space: nowrap; }
.rating .star { color: #ffcc4d; }
.rating .cnt { color: var(--muted); font-size: 12px; }
.num-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.buy {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.buy:hover { text-decoration: none; filter: brightness(1.08); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 28px 0; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); }

/* ---- age gate ---- */
.agegate {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 12, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.agegate .box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 420px; text-align: center; }
.agegate h2 { margin: 0 0 12px; }
.agegate p { color: var(--muted); }
.agegate .row { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.agegate .no { background: transparent; border: 1px solid var(--border); color: var(--text); }

.hidden { display: none !important; }

@media (max-width: 640px) {
  .works thead th { top: 60px; }
  .thumb { width: 64px; height: 48px; }
}
