﻿:root {
  --max: 1200px;
  --radius: 14px;

  --pageBg: #f8fafc;
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --focus: rgba(59, 130, 246, 0.35);

  --hotBg: #fff1f2;
  --hotLine: #fecaca;

  --amazon: #f59e0b;
  --amazonInk: #111827;
  --dmm: #111a2e;
  --dmmInk: #ffffff;
  --dlsite: #2464ec;
  --dlsiteInk: #ffffff;

  --barBg: #0b1220;
  --barInk: #ffffff;
  --barLink: rgba(255, 255, 255, 0.88);
  --barLinkHover: #ffffff;

  --markBg: #0a0a0a;
  --markInk: #ffffff;
  --markRing: rgba(255, 255, 255, 0.8);
  --markRingW: 3px;
}

html[data-mode="dark"] {
  --pageBg: #070b12;
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.52);
  --focus: rgba(59, 130, 246, 0.45);
  --hotBg: rgba(251, 113, 133, 0.12);
  --hotLine: rgba(251, 113, 133, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--pageBg);
  color: var(--text);
}

a {
  color: inherit;
}

.bar {
  width: 100%;
  background: var(--barBg);
  color: var(--barInk);
}

.barInner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 14px;
}

.siteHeader .barInner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--markBg);
  color: var(--markInk);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 1000;
  border: var(--markRingW) solid var(--markRing);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}

.brandText {
  font-size: 16px;
  line-height: 1.2;
}

.headerNav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.headLink {
  color: var(--barLink);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.headLink:hover {
  color: var(--barLinkHover);
  border-color: rgba(255, 255, 255, 0.3);
}

.headLink.is-active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
}

.siteFooter .barInner {
  padding: 14px;
}

.footNav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.footNav a {
  color: var(--barLink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 2px 0;
}

.footNav a:hover {
  color: var(--barLinkHover);
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

.footSep {
  opacity: 0.55;
}

.copy {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.85;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px;
}

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
}

.modePanel {
  margin-bottom: 12px;
}

.tabsRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabBtn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.tabBtn[aria-selected="true"] {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px var(--focus);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.titleRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}

.pageTitle {
  margin: 0;
  font-size: 22px;
}

.pageLead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.catalogLayout {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 980px) {
  .catalogLayout {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}

.pcTitle {
  display: none;
}

@media (min-width: 980px) {
  .pcTitle {
    display: block;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 1000;
  }
}

.filter-details summary {
  font-size: 14px;
  font-weight: 1000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  color: var(--text);
}

.filter-details summary::-webkit-details-marker {
  display: none;
}

.filter-details summary::after {
  content: "▼";
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s;
}

.filter-details[open] summary::after {
  transform: rotate(180deg);
}

.filter-content {
  margin-top: 10px;
}

@media (min-width: 980px) {
  .filter-details summary {
    display: none;
  }

  .filter-content {
    margin-top: 0;
  }
}

.sec {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.sec:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 1000;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.chip:hover {
  border-color: #93c5fd;
}

.chip.is-active {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px var(--focus);
}

.row {
  display: flex;
  gap: 8px;
}

.select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
}

.select:focus {
  box-shadow: 0 0 0 4px var(--focus);
  border-color: #93c5fd;
  outline: none;
}

.results {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rTop {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.productList {
  display: flex;
  flex-direction: column;
}

.productCard {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 980px) {
  .productCard {
    grid-template-columns: 112px 1fr auto;
    align-items: center;
  }
}

.thumbWrap {
  width: 112px;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.1);
}

.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbPlaceholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 8px;
}

.name {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.kpi {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.end {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.end.hot {
  border-color: var(--hotLine);
  background: var(--hotBg);
}

.subInfo {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.buy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

@media (min-width: 980px) {
  .buy {
    align-items: flex-end;
  }
}

.variantList {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.variantItem {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--muted);
  min-width: 220px;
}

.variantTitle {
  font-weight: 800;
  color: var(--text);
  margin-right: 6px;
}

.storeBtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 220px;
  padding: 0 46px 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 1000;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.14);
  user-select: none;
  color: inherit;
}

.storeBtn:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus), 0 10px 26px rgba(2, 6, 23, 0.14);
}

html[data-mode="dark"] .storeBtn {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

.storeBtn .label {
  margin: 0;
  font-size: 14px;
  font-weight: 1000;
}

.storeBtn .pr {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 1000;
  opacity: 0.85;
  background: transparent;
  padding: 0;
  border: none;
}

.storeBtnSmall {
  min-width: 0;
  height: 34px;
  padding: 0 34px 0 12px;
  font-size: 12px;
}

.storeBtnSmall .label {
  font-size: 12px;
}

.storeBtnSmall .pr {
  right: 8px;
  font-size: 10px;
}

.bAmazon {
  background: var(--amazon);
  color: var(--amazonInk);
  border-color: rgba(17, 24, 39, 0.14);
}

.bDMM {
  background: var(--dmm);
  color: var(--dmmInk);
}

.bDLsite {
  background: var(--dlsite);
  color: var(--dlsiteInk);
}

.emptyState {
  margin: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.hero {
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(36, 100, 236, 0.12), rgba(17, 26, 46, 0.1));
}

.hero .pageTitle {
  margin-bottom: 6px;
}

.quickLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quickLink {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
}

.quickLink:hover {
  border-color: #93c5fd;
}

.categoryGrid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  .categoryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .categoryGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.categoryCard {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.categoryCard h3 {
  margin: 0;
}

.categoryCard p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.articleList {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .articleList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.articleCard {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.articleCard h3 {
  margin: 0;
  font-size: 18px;
}

.articleCard p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.articleMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.staticContent {
  line-height: 1.8;
}

.staticContent h2,
.staticContent h3 {
  margin-top: 0;
}

.staticContent .title {
  margin-top: 0;
  margin-bottom: 12px;
}

.staticContent .lead {
  margin: 0;
}

.staticContent .secTitle {
  margin-top: 16px;
  margin-bottom: 8px;
}

.staticContent .p {
  margin: 0;
}

.staticContent .list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.staticContent .sep {
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.linkBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
}

.linkBtn:hover {
  border-color: #93c5fd;
}

.toTop {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}

html[data-mode="dark"] .toTop {
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.52);
}

.toTop.is-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toTop:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus), 0 12px 30px rgba(0, 0, 0, 0.18);
}

@supports (padding: max(0px)) {
  .toTop {
    bottom: calc(14px + env(safe-area-inset-bottom));
    right: calc(14px + env(safe-area-inset-right));
  }
}
