:root {
  color-scheme: light;
  --bg: #fff8e8;
  --ink: #26313d;
  --muted: #687485;
  --panel: #ffffff;
  --line: #e7dcc1;
  --accent: #ff4f87;
  --accent-2: #18a8a8;
  --accent-3: #ffbf2e;
  --danger: #6f111b;
  --shadow: 0 18px 40px rgba(38, 49, 61, 0.12);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 191, 46, 0.35), transparent 22rem),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 52%, #ffffff 100%);
  color: var(--ink);
  letter-spacing: 0;
}

body.truth {
  --bg: #f0f0ed;
  --ink: #161616;
  --muted: #606060;
  --panel: #fbfbf8;
  --line: #c9c6bd;
  --accent: #191919;
  --accent-2: #7b1219;
  --accent-3: #d8d3c6;
  background: linear-gradient(180deg, #f9f9f6 0%, #e5e2da 100%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 44px;
  border: 0;
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  width: 100%;
}

.site-shell {
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(231, 220, 193, 0.8);
  backdrop-filter: blur(16px);
}

.truth .topbar {
  background: rgba(242, 242, 238, 0.9);
  border-bottom-color: #bbb6aa;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--accent), var(--accent-3), var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.truth .brand-mark {
  border-radius: 4px;
  background: #161616;
}

.nav {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px) 34px;
}

.hero-copy {
  max-width: 760px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
}

.truth .kicker {
  border-radius: 3px;
  background: #fff;
  color: var(--danger);
}

h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.45rem, 8vw, 6.8rem);
  line-height: 0.94;
}

.hero-lead {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: clamp(1.2rem, 3.2vw, 2rem);
  font-weight: 900;
}

.hero-text {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 79, 135, 0.24);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.truth .primary-button,
.truth .ghost-button {
  border-radius: 4px;
  box-shadow: none;
}

.hero-media {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-media img {
  height: 100%;
  min-height: 340px;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  max-width: 190px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.5;
}

.truth .hero-badge {
  border-radius: 3px;
  color: #fff;
  background: rgba(22, 22, 22, 0.88);
}

.section {
  padding: 34px clamp(16px, 4vw, 48px);
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
}

.section-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.series-grid,
.case-grid,
.news-grid,
.faq-grid,
.category-grid,
.owner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.series-card,
.case-card,
.news-card,
.faq-card,
.owner-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(38, 49, 61, 0.08);
}

.truth .series-card,
.truth .case-card,
.truth .news-card,
.truth .faq-card,
.truth .owner-card {
  border-radius: 3px;
  box-shadow: none;
}

.series-card {
  display: flex;
  flex-direction: column;
}

.series-thumb {
  aspect-ratio: 4 / 3;
  background: #fff;
}

.series-thumb img {
  height: 100%;
  object-fit: cover;
}

.series-body,
.case-card,
.news-card,
.faq-card,
.owner-card {
  padding: 16px;
}

.series-meta,
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff1bc;
  color: #735500;
  font-size: 0.76rem;
  font-weight: 900;
}

.truth .pill {
  border-radius: 2px;
  background: #e5e0d5;
  color: #111;
}

.series-card h3,
.case-card h3,
.owner-card h3,
.news-card h3,
.faq-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.series-card p,
.case-card p,
.owner-card p,
.news-card p,
.faq-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.item-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.item-button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 7px;
  border-radius: 8px;
  background: #f9fbff;
  color: var(--ink);
  text-align: left;
}

.truth .item-button {
  border-radius: 3px;
  background: #f1f0ec;
}

.item-button img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.truth .item-button img {
  border-radius: 2px;
  filter: saturate(0.5);
}

.item-button strong,
.item-button small {
  display: block;
  overflow-wrap: anywhere;
}

.item-button small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.price {
  color: var(--accent-2);
  font-weight: 900;
}

.categories {
  background: rgba(255, 255, 255, 0.42);
}

.category-tile {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent-2);
  font-weight: 900;
}

.truth .category-tile {
  border-radius: 3px;
  color: var(--danger);
  background: #f8f8f4;
}

.howto {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.step span {
  color: var(--accent);
  font-weight: 900;
}

.step h3 {
  margin: 8px 0;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.owner-card img,
.case-card img {
  margin-bottom: 12px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
}

.share-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #161616;
  color: #fff;
}

.share-panel p {
  max-width: 680px;
  margin: 0;
  color: #ded8ce;
  line-height: 1.7;
}

.shop-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.shop-info dl {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  margin: 0;
}

.shop-info dt {
  color: var(--muted);
  font-weight: 900;
}

.shop-info dd {
  margin: 0;
}

.site-footer {
  padding: 28px clamp(16px, 4vw, 48px) 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.debug-panel {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 25;
  display: flex;
  gap: 8px;
  opacity: 0.28;
  transition: opacity 0.2s ease;
}

.debug-panel:focus-within,
.debug-panel:hover {
  opacity: 1;
}

.debug-panel button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 22, 25, 0.66);
}

.modal {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  width: min(920px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-visual {
  position: relative;
  min-height: 300px;
  background: #fff;
}

.modal-visual button {
  width: 100%;
  height: 100%;
  min-height: 300px;
  padding: 0;
  background: #fff;
}

.modal-visual img {
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.modal-body {
  padding: 20px;
}

.modal-close {
  float: right;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--ink);
  font-size: 1.4rem;
}

.modal h2 {
  margin: 6px 0 10px;
}

.code-line {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 800;
}

.tag-button,
.hidden-link {
  min-height: 44px;
  padding: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
}

.secret-lock {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f4ee;
}

.secret-lock strong {
  color: var(--danger);
}

.case-flash {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #7b1219;
  border-radius: 4px;
  color: #7b1219;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 900;
}

#noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, rgba(0, 0, 0, 0.16) 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 0, 0, 0.14) 0 2px, transparent 2px 5px),
    rgba(10, 9, 8, 0.92);
  color: #f2e9dc;
}

#noise-overlay.is-active {
  display: grid;
  animation: noise-shift 0.14s steps(2) infinite;
}

.noise-card {
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid rgba(126, 18, 25, 0.9);
  background: rgba(8, 8, 8, 0.82);
  text-align: center;
  transform: skewX(-1deg);
}

.noise-card strong {
  display: block;
  margin: 9px 0;
  color: #b51d2c;
  font-size: 1.45rem;
}

.noise-card small,
.noise-kicker {
  color: #c6b9a5;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

@keyframes noise-shift {
  0% { filter: contrast(1.2) brightness(1); }
  50% { filter: contrast(1.6) brightness(0.88); transform: translateX(1px); }
  100% { filter: contrast(1.1) brightness(1.08); transform: translateX(-1px); }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .modal,
  .shop-info {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 260px;
  }

  .hero-media img {
    min-height: 260px;
  }

  .howto {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .debug-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .debug-panel {
    left: 10px;
  }

  .item-button {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .price {
    grid-column: 2;
  }
}
