:root {
  --red: #e01822;
  --deep-red: #6f1115;
  --yellow: #ffd22e;
  --gold: #b88b22;
  --ink: #1e1e1e;
  --muted: #686868;
  --line: #dedede;
  --paper: #fff;
  --soft: #f6f6f2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
}
body.mode-truth {
  --red: #781117;
  --yellow: #c4a941;
  --gold: #7f6828;
  --ink: #191716;
  --muted: #55504d;
  --line: #c9c1b8;
  --paper: #eeeae3;
  --soft: #ded8ce;
}
body.overlay-open { overflow: hidden; }
a { color: inherit; }
img {
  display: block;
  width: 100%;
  min-height: 160px;
  object-fit: cover;
  background: linear-gradient(135deg, #eee, #d8d8d8);
}
button, input {
  font: inherit;
}
button, .cta-strip a {
  border: 0;
  background: var(--yellow);
  color: #201600;
  font-weight: 800;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.8rem 1rem;
}
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topline {
  background: var(--red);
  color: #fff;
  text-align: center;
  font-weight: 800;
  padding: 0.45rem;
  font-size: 0.9rem;
}
.header-main {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--red);
  text-decoration: none;
  white-space: nowrap;
}
.logo img {
  width: 80px;
  min-height: 34px;
  aspect-ratio: 3 / 1;
}
.site-search input, .apply-form input {
  width: 100%;
  border: 2px solid var(--line);
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  background: #fff;
}
.phone-box {
  text-align: right;
  line-height: 1.2;
}
.phone-box strong {
  display: block;
  color: var(--red);
  font-size: 1.55rem;
}
.phone-box span, .phone-box small { display: block; }
.admin-tools {
  display: flex;
  gap: 0.35rem;
}
.admin-tools button {
  background: #ececec;
  color: #333;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
}
.global-nav {
  background: #2d2d2d;
  color: #fff;
  display: flex;
  gap: 0.2rem;
  justify-content: center;
  overflow-x: auto;
}
.global-nav a {
  text-decoration: none;
  padding: 0.7rem 1rem;
  white-space: nowrap;
  font-weight: 700;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  min-height: 560px;
  background: linear-gradient(90deg, var(--red), #a81218);
  color: #fff;
}
.hero-copy {
  padding: clamp(2rem, 5vw, 5rem);
  align-self: center;
}
.eyebrow {
  font-weight: 900;
  color: var(--yellow);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.08;
  margin: 0.25rem 0 1rem;
}
.hero-copy p {
  max-width: 720px;
  font-size: 1.1rem;
}
.hero-media img {
  height: 100%;
  min-height: 560px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 2rem;
}
.hero-stats div {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 0.9rem;
  border-radius: 6px;
}
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-size: 1.5rem; color: var(--yellow); }
.cta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--red);
  max-width: 1180px;
  margin: -2rem auto 0;
  position: relative;
  z-index: 2;
  border-radius: 8px;
  overflow: hidden;
}
.cta-strip a {
  text-align: center;
  text-decoration: none;
  border-radius: 0;
  padding: 1.2rem;
}
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1rem;
}
.band {
  max-width: none;
  padding-left: max(1rem, calc((100vw - 1180px) / 2));
  padding-right: max(1rem, calc((100vw - 1180px) / 2));
  background: var(--soft);
}
.section-head {
  margin-bottom: 1.5rem;
}
.section-head p {
  color: var(--red);
  font-weight: 900;
  margin: 0;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin: 0.1rem 0;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.categories { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.card-body { padding: 1rem; }
.card h3, .case-card h3, .three-cols h3 { margin: 0 0 0.45rem; }
.price {
  color: var(--red);
  font-weight: 900;
}
.text-link {
  padding: 0;
  background: transparent;
  color: var(--red);
  border-radius: 0;
  text-decoration: underline;
  font-weight: 700;
}
.reveal-note, .owner-box, .search-panel, .case-card {
  border: 1px solid var(--deep-red);
  background: #fff8f4;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}
.feature-list, .tag-row, .reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
}
.feature-list span, .tag-row span, .reason-list li {
  list-style: none;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-weight: 800;
}
.compact span { font-size: 0.9rem; padding: 0.45rem 0.65rem; }
.three-cols, .review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.three-cols article, blockquote {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.2rem;
  border-radius: 8px;
}
.reason-list li {
  flex: 1 1 260px;
}
.faq-list {
  display: grid;
  gap: 0.75rem;
}
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
}
.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.case-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.case-card dl div {
  background: rgba(0,0,0,0.04);
  padding: 0.7rem;
  border-radius: 6px;
}
.case-card dt {
  font-size: 0.82rem;
  color: var(--muted);
}
.case-card dd {
  margin: 0;
  font-weight: 900;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}
.mini-grid figure {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
}
.mini-grid img {
  aspect-ratio: 4 / 3;
  min-height: 90px;
}
.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 2rem;
  align-items: center;
  background: var(--red);
  color: #fff;
  max-width: none;
  padding-left: max(1rem, calc((100vw - 1180px) / 2));
  padding-right: max(1rem, calc((100vw - 1180px) / 2));
}
.apply-form {
  display: grid;
  gap: 0.75rem;
}
.form-message {
  min-height: 1.5rem;
  font-weight: 800;
}
.share-section button {
  background: #111;
  color: #fff;
}
.site-footer {
  background: #242424;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(210, 210, 210, 0.16) 0px,
      rgba(110, 110, 110, 0.22) 1px,
      rgba(185, 185, 185, 0.16) 2px,
      rgba(90, 90, 90, 0.18) 3px
    ),
    linear-gradient(180deg, rgba(120,120,120,0.18), rgba(165,165,165,0.18));
  backdrop-filter: grayscale(1) contrast(1.3) brightness(0.7);
}
.noise-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.noise-layer,
.noise-flash,
.noise-message,
.noise-sub,
.noise-help {
  position: absolute;
}
.noise-layer {
  inset: -8%;
  pointer-events: none;
  z-index: 1;
}
.noise-layer-1 {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(240,240,240,0.18) 0px,
      rgba(70,70,70,0.24) 1px,
      rgba(200,200,200,0.18) 2px,
      rgba(90,90,90,0.22) 3px,
      rgba(170,170,170,0.14) 4px
    );
  mix-blend-mode: screen;
}
.noise-layer-2 {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.03) 0px,
      rgba(0,0,0,0.08) 2px,
      rgba(255,255,255,0.03) 4px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.08) 0px,
      rgba(0,0,0,0.12) 2px,
      rgba(255,255,255,0.06) 4px,
      rgba(0,0,0,0.08) 6px
    );
  mix-blend-mode: overlay;
}
.noise-layer-3 {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0.16) 14%,
      rgba(0,0,0,0.12) 28%,
      rgba(255,255,255,0.10) 44%,
      rgba(0,0,0,0.10) 62%,
      rgba(255,255,255,0.12) 78%,
      rgba(255,255,255,0) 100%
    );
  opacity: 0.55;
  filter: blur(0.4px);
}
.noise-flash {
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0.16) 25%,
      rgba(255,255,255,0) 52%,
      rgba(255,255,255,0.12) 76%,
      rgba(255,255,255,0) 100%
    );
  opacity: 0;
}
.noise-message {
  z-index: 10;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(88vw, 760px);
  padding: 0 16px;
  text-align: center;
  white-space: nowrap;
  color: #7c0606;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.65;
  pointer-events: none;
  text-shadow:
    0 0 1px rgba(255,255,255,0.45),
    0 0 3px rgba(255,255,255,0.25),
    0 0 4px rgba(0,0,0,1),
    0 0 10px rgba(0,0,0,0.98),
    0 0 18px rgba(0,0,0,0.95),
    0 3px 6px rgba(60,0,0,0.95),
    0 0 16px rgba(120,0,0,0.7);
}
.noise-message::before,
.noise-message::after {
  content: "サイトが改変されました。";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.noise-message::before {
  color: rgba(255, 220, 220, 0.22);
  transform: translate(2px, 0);
  mix-blend-mode: screen;
}
.noise-message::after {
  color: rgba(50, 0, 0, 0.42);
  transform: translate(-2px, 1px);
}
.noise-sub {
  z-index: 10;
  top: calc(50% + 5.6rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(86vw, 680px);
  color: #231716;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255,255,255,0.9);
  pointer-events: none;
}
.noise-help {
  z-index: 10;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  color: #251d1d;
  font-size: 0.9rem;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255,255,255,0.9);
  pointer-events: none;
}
.noise-overlay.is-active .noise-layer-1 {
  animation: staticBandA 0.08s steps(2, end) infinite;
}
.noise-overlay.is-active .noise-layer-2 {
  animation: staticBandB 0.11s steps(3, end) infinite;
}
.noise-overlay.is-active .noise-layer-3 {
  animation: rollingBand 0.28s linear infinite;
}
.noise-overlay.is-active .noise-flash {
  animation: flashSweep 0.32s linear infinite;
}
@keyframes staticBandA {
  0% {
    opacity: 0.95;
    transform: translateY(-8px) scaleY(1.04);
  }
  50% {
    opacity: 0.7;
    transform: translateY(5px) scaleY(1.01);
  }
  100% {
    opacity: 0.92;
    transform: translateY(-3px) scaleY(1.05);
  }
}
@keyframes staticBandB {
  0% {
    opacity: 0.65;
    transform: translateX(-10px);
  }
  50% {
    opacity: 0.45;
    transform: translateX(12px);
  }
  100% {
    opacity: 0.7;
    transform: translateX(-6px);
  }
}
@keyframes rollingBand {
  0% { transform: translateY(-24%); }
  100% { transform: translateY(24%); }
}
@keyframes flashSweep {
  0% {
    opacity: 0;
    transform: translateY(-18%);
  }
  35% { opacity: 0.42; }
  100% {
    opacity: 0;
    transform: translateY(18%);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .noise-overlay.is-active .noise-layer-1,
  .noise-overlay.is-active .noise-layer-2,
  .noise-overlay.is-active .noise-layer-3,
  .noise-overlay.is-active .noise-flash {
    animation: none;
  }
}
@media (max-width: 860px) {
  .header-main {
    grid-template-columns: 1fr;
  }
  .phone-box { text-align: left; }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-media img, .hero { min-height: auto; }
  .card-grid, .categories, .three-cols, .review-grid, .case-card dl, .final-cta {
    grid-template-columns: 1fr;
  }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .noise-message {
    white-space: normal;
    letter-spacing: 0.08em;
    line-height: 1.5;
  }
  .noise-sub {
    top: calc(50% + 6.8rem);
    font-size: 1rem;
  }
  .global-nav { justify-content: flex-start; }
  .hero-stats, .cta-strip, .option-grid {
    grid-template-columns: 1fr;
  }
  .logo {
    font-size: 1.25rem;
  }
  .phone-box strong {
    font-size: 1.25rem;
  }
}
