:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #152236;
  --muted: #62738a;
  --brand: #0b4f8f;
  --brand-dark: #062f5e;
  --accent: #ef6b2d;
  --border: #dbe4ef;
  --danger: #7c0606;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}
body.truth-mode {
  --bg: #090909;
  --panel: #141414;
  --text: #e8e1dc;
  --muted: #a49a95;
  --brand: #2b0505;
  --brand-dark: #100000;
  --accent: #9e1111;
  --border: #3b2020;
  background: radial-gradient(circle at 50% 0%, #2a0b0b 0%, #080808 42%, #000 100%);
}

button, input { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
body.truth-mode .site-header { background: rgba(13,0,0,.9); }
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-logo { width: 150px; height: 38px; object-fit: contain; border-radius: 4px; background: #0b4f8f; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; }
.brand-text small { color: var(--muted); font-size: .68rem; letter-spacing: .08em; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ghost-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 700;
  font-size: .78rem;
  cursor: pointer;
}
.ghost-btn:disabled {
  cursor: wait;
  opacity: .62;
}
.danger-btn {
  border-color: rgba(124,6,6,.35);
  color: var(--danger);
}
body.truth-mode .danger-btn {
  border-color: rgba(217,61,61,.45);
  color: #ff7777;
}

.section { max-width: 1180px; margin: 0 auto; padding: 58px 18px; }
.section-dark { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; }
.hero { position: relative; min-height: 470px; display: grid; place-items: center; overflow: hidden; }
.hero-image-wrap { position: absolute; inset: 0; opacity: .38; }
.hero-image { width: 100%; height: 100%; object-fit: cover; }
.hero-copy { position: relative; max-width: 880px; padding: 34px 18px; text-align: center; }
.hero-copy h1 { margin: 6px 0 16px; font-size: clamp(2.4rem, 7vw, 5.8rem); line-height: 1.08; letter-spacing: .04em; }
.hero-copy p { font-size: clamp(1rem, 2vw, 1.25rem); }
.eyebrow { color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: .18em; margin: 0 0 8px; }
.section-dark .eyebrow { color: #ffb36f; }

.news h2, .section h2 { font-size: clamp(1.6rem, 3vw, 2.55rem); line-height: 1.25; margin: 0 0 20px; }
.news-list { display: grid; gap: 10px; }
.news-item { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.news-date { color: var(--brand); font-weight: 900; }
body.truth-mode .news-date { color: #d94242; }
.split, .support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.rounded-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); box-shadow: 0 12px 36px rgba(0,0,0,.12); background: #d9e1ea; }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 22px; }
.section-head p { max-width: 440px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(12, 31, 58, .08); }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #dde5ef; }
.card-body { padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { color: var(--muted); margin: 0 0 14px; }
.card button { border: 0; border-radius: 10px; background: var(--brand); color: #fff; padding: 10px 13px; font-weight: 900; cursor: pointer; }
body.truth-mode .card button { background: #641111; }

.detail-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 18px 48px rgba(0,0,0,.1); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.detail-panel img { width: 100%; border-radius: 16px; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--border); background: #dce3ec; }
.detail-panel h2 { margin-top: 0; }
.detail-panel .meta { color: var(--muted); font-weight: 800; }
.detail-panel .note { background: rgba(239,107,45,.1); border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 8px; }
.clickable-text { color: var(--brand); font-weight: 900; text-decoration: underline; cursor: pointer; }
body.truth-mode .clickable-text { color: #d93d3d; }
.back-side { margin-top: 14px; padding: 14px; border: 1px dashed var(--border); background: rgba(11,79,143,.06); border-radius: 12px; cursor: pointer; }
body.truth-mode .back-side { background: rgba(120,0,0,.12); }

.search-section { text-align: center; background: var(--brand-dark); color: #fff; max-width: none; padding-left: max(18px, calc((100vw - 1180px) / 2)); padding-right: max(18px, calc((100vw - 1180px) / 2)); }
.search-form { display: flex; gap: 10px; justify-content: center; max-width: 680px; margin: 24px auto 0; }
.search-form input { flex: 1; min-width: 0; padding: 14px; border: 0; border-radius: 10px; }
.search-form button, .share-button { border: 0; border-radius: 10px; padding: 14px 18px; background: var(--accent); color: #fff; font-weight: 900; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; }
.search-result { margin-top: 14px; color: #ffe4d2; font-weight: 800; min-height: 28px; }
.share-section { text-align: center; }
.share-section { border-top: 1px solid var(--border); }
.site-footer { background: #071d38; color: #fff; padding: 34px 18px; text-align: center; }
body.truth-mode .site-footer { background: #050000; }
.fiction-note { color: rgba(255,255,255,.72); font-size: .86rem; }

.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));
}
.noise-overlay.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.noise-layer, .noise-flash, .noise-message { 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.00) 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.00) 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;
opacity: 1;
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-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%); } }
.demo-trigger { position: fixed; right: 20px; bottom: 20px; z-index: 100; border: 0; border-radius: 12px; padding: 12px 16px; background: #4f8d5b; color: #fff; font-weight: 700; cursor: pointer; }

@media (max-width: 860px) {
  .header-inner { align-items: flex-start; }
  .brand-logo { width: 118px; }
  .brand-text small { display: none; }
  .split, .support-grid, .detail-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .news-item { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
  .demo-trigger { display: none; }
}
@media (max-width: 760px) { .noise-message { white-space: normal; letter-spacing: 0.08em; line-height: 1.5; } }
