:root {
  --paper: #f5f2ea;
  --white: #ffffff;
  --ink: #1c2c27;
  --muted: #66726e;
  --green: #2f6654;
  --green-deep: #123f33;
  --mint: #dcebe4;
  --line: #d5dcd7;
  --cream: #ebe6d9;
  --card: #fdfbf3;
  --gold: #a3823a;
  --gold-deep: #7a611f;
  --blood: #5a0808;
  --black: #080304;
  --ash: #d8c5bd;
  --shadow: 0 20px 60px rgba(18, 45, 36, .15);
  --shadow-soft: 0 18px 44px -22px rgba(18, 45, 36, .38);
  --shadow-lift: 0 26px 58px -20px rgba(18, 45, 36, .5);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --serif: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Zen Kaku Gothic New", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.8; -webkit-font-smoothing: antialiased; }
body.mutation-running { overflow: hidden; }
body.mutation-running > :not(.mutation-overlay) { pointer-events: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
a[href], button:not(:disabled), summary, select, input[type="checkbox"], input[type="radio"], .consent, [role="button"]:not([aria-disabled="true"]), .active-hotspot { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, blockquote, dl, dd { margin-top: 0; }
h1, h2, h3, .section-heading > p, .eyebrow { text-wrap: balance; word-break: auto-phrase; }
p, blockquote, dd, figcaption, button, .quote-action, .story-body, .dialog-copy { line-break: strict; text-wrap: pretty; word-break: auto-phrase; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #ad2c22; outline-offset: 4px; }
.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; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 9999; padding: 10px 16px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

/* 公開施設の共通ヘッダー。 */
.top-notice { min-height: 36px; padding: 5px 5%; background: var(--green-deep); color: #fff; font-size: .78rem; text-align: center; }
.top-notice p { margin: 0; }
.top-notice a { text-decoration: underline; text-underline-offset: 3px; }
.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 10px max(5vw, 24px); background: rgba(245, 242, 234, .96); border-bottom: 1px solid rgba(47, 102, 84, .15); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: block; width: 44px; height: 44px; }
.brand strong { display: block; font-family: var(--serif); font-weight: 600; letter-spacing: .06em; }
.brand small { display: block; color: var(--muted); font-size: .58rem; letter-spacing: .18em; }
.site-header nav { display: flex; align-items: center; gap: clamp(13px, 2vw, 30px); font-size: .81rem; }
.site-header nav a { display: flex; align-items: center; min-height: 44px; }
.nav-contact { padding: 0 18px; background: var(--green); color: #fff; }
.nav-reset { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.nav-reset span { font-size: 1.05rem; line-height: 1; }
.nav-reset:hover, .nav-reset:focus-visible { color: var(--green); border-color: var(--green); }
.menu-button { display: none; width: 48px; height: 48px; padding: 12px; border: 0; background: transparent; }
.menu-button span:not(.sr-only) { display: block; height: 1px; margin: 5px 0; background: currentColor; }

/* ファーストビュー。 */
.hero { position: relative; min-height: clamp(620px, 82vh, 860px); overflow: hidden; color: #fff; }
.hero > img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 43, 34, .86), rgba(11, 43, 34, .48) 46%, rgba(11, 43, 34, .06) 78%); }
.hero-copy { position: relative; z-index: 1; width: min(720px, 88%); padding-top: clamp(130px, 18vh, 200px); margin-left: max(8vw, 32px); }
.eyebrow, .section-heading > p { font-size: .72rem; font-weight: 700; letter-spacing: .22em; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.hero h1 { margin: .25em 0 .4em; font-family: var(--serif); font-size: clamp(3rem, 6.2vw, 6rem); font-weight: 500; line-height: 1.35; letter-spacing: .06em; }
.kinetic-heading { overflow: hidden; }
.kinetic-line { display: block; opacity: 0; transform: translateY(.4em); animation: kinetic-line-rise .85s cubic-bezier(.2, .7, .25, 1) forwards; }
.kinetic-line:nth-child(2) { animation-delay: .16s; }
@keyframes kinetic-line-rise { to { opacity: 1; transform: translateY(0); } }
.hero-copy > p:not(.eyebrow) { font-size: clamp(.95rem, 1.35vw, 1.12rem); }
.primary-button { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 14px 30px; border: 0; border-radius: 999px; background: #fff; color: var(--green-deep); font-weight: 700; letter-spacing: .05em; box-shadow: var(--shadow-soft); transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease; }
.primary-button:hover, .primary-button:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.submit-button { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 28px; border: 1px solid #fff; background: #fff; color: var(--green-deep); font-weight: 700; letter-spacing: .05em; }

/* セクション共通レイアウト。 */
.section { padding: clamp(76px, 10vw, 140px) max(6vw, 24px); }
.section-heading { margin-bottom: clamp(38px, 5vw, 68px); }
.section-heading > p { margin-bottom: 8px; color: var(--green); }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; line-height: 1.45; letter-spacing: .04em; }
.section-heading > span { display: block; margin-top: 12px; color: var(--muted); font-size: .8rem; }
.section-heading.light, .section-heading.light > p { color: #fff; }
.section-heading.light > span { color: rgba(255, 255, 255, .7); }
.intro-grid { display: grid; grid-template-columns: minmax(280px, .9fr) 1.1fr; gap: clamp(40px, 8vw, 120px); max-width: 1200px; }
.lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.5vw, 2.1rem); line-height: 1.8; }
.intro-copy { color: var(--muted); }

/* 実績表示。均等な罫線グリッドではなく、定着率を大きく見せるbento配置にする。 */
.results { background: var(--paper); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto; gap: 18px; }
.metric-tile { position: relative; padding: clamp(26px, 3vw, 40px); border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-soft); }
.metric-tile--lg { grid-column: 1 / 3; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; background: var(--green-deep); color: #fff; }
.metric-tile--sm { grid-column: 3; }
.metric-tile p { margin-bottom: 8px; font-size: .8rem; color: var(--muted); }
.metric-tile--lg p { color: rgba(255, 255, 255, .74); }
.metric-tile strong { display: block; font-family: var(--serif); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-tile--lg strong { font-size: clamp(3.4rem, 6.4vw, 6rem); }
.metric-tile--sm strong { font-size: clamp(2rem, 3.4vw, 2.6rem); }
.metric-tile strong small { font-size: .32em; font-weight: 500; }
.metric-tile span { display: block; margin-top: 10px; font-size: .72rem; color: var(--muted); }
.metric-tile--lg span { color: rgba(255, 255, 255, .68); }
.calculation-note { margin: 22px 0 0; color: var(--muted); font-size: .72rem; text-align: right; }

/* 証言と改変1の常時赤黒表示。角丸カード＋アクセントバーのbentoスタイル。 */
.voices { background: var(--cream); }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.voice-card { position: relative; padding: 30px 28px 26px; border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-soft); transition: transform .3s ease, box-shadow .3s ease; }
.voice-card:hover, .voice-card:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.voice-card::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 3px; background: var(--green); }
.voice-card:nth-child(2)::before { background: var(--gold); }
.voice-card:nth-child(3)::before { background: var(--green-deep); }
.quote-action { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; font-family: var(--serif); font-size: 1.05rem; line-height: 1.85; cursor: default; }
.quote-action--first { cursor: pointer; }
.quote-grid footer { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: .78rem; }
.voice-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--cream); font-family: var(--serif); font-size: .82rem; color: var(--green-deep); }
.blood-copy { display: inline-block; min-height: 44px; padding: 7px 1px; color: #b51e1e; }
body:not([data-state="normal"]) .quote-action--first { cursor: default; }
.quote-action.active-hotspot { cursor: pointer; }

/* 就職事例と通常モーダル。 */
.stories { background: #fff; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 34px); }
.story-card { background: var(--paper); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.story-card:hover, .story-card:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.portrait { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e6eae7; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.story-body { padding: 26px; }
.tag, .company-type { margin-bottom: 9px; color: var(--green); font-size: .7rem; font-weight: 700; letter-spacing: .13em; }
.story-body h3, .partner-grid h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; line-height: 1.6; }
.story-body > p:not(.tag), .partner-grid article > p:not(.company-type) { color: var(--muted); font-size: .86rem; }
.text-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 6px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }

/* 支援工程。罫線ストライプではなく、丸みのある独立したステップカードを並べる。 */
.program { background: var(--paper); }
.process-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 0; margin: 0; list-style: none; }
.process-list:has(.final-process:not([hidden])) { grid-template-columns: repeat(6, 1fr); }
.process-list li { position: relative; min-height: 220px; padding: 28px 22px; border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-soft); overflow: hidden; }
.process-list li > span { display: block; margin-bottom: 32px; color: var(--green); font-family: var(--serif); font-size: .9rem; }
.process-list h3 { position: relative; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.process-list p { position: relative; color: var(--muted); font-size: .78rem; }
#adaptive-step.active-hotspot { cursor: pointer; }
#adaptive-step.active-hotspot::before { content: ""; position: absolute; inset: 18% -10% 6%; opacity: 0; background: repeating-linear-gradient(90deg, transparent 0 35px, rgba(15, 8, 7, .3) 36px 44px, transparent 45px 70px); transform: rotate(-7deg); }
#adaptive-step.anomaly-pulse::before { opacity: .8; }
#adaptive-step.anomaly-pulse .step-number { color: #080304; text-shadow: 0 0 4px #080304; }
#adaptive-step.anomaly-pulse p { text-shadow: 2px 0 8px #5a0808; color: #5a2522; }
#adaptive-step.anomaly-pulse h3::after { content: "固定"; position: absolute; left: 3.2em; color: rgba(78, 0, 0, .62); transform: translateX(3px); }

/* 配置先企業。 */
.partners { background: #fff; }
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.partner-grid article { padding: 30px; border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-soft); transition: transform .3s ease, box-shadow .3s ease; }
.partner-grid article:hover, .partner-grid article:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

/* 問い合わせと最終接続画面。 */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 1050px; margin: auto; }
.faq details { border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-soft); padding: 0 26px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 70px; cursor: pointer; font-family: var(--serif); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; color: var(--green); font-family: var(--sans); font-size: 1.4rem; transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--muted); }
.contact { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(40px, 8vw, 120px); background: var(--green-deep); color: #fff; }
.contact-intro > p { color: rgba(255, 255, 255, .72); }
.contact-intro dl div { display: grid; grid-template-columns: 100px 1fr; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .8rem; }
.contact form { position: relative; padding: clamp(24px, 4vw, 50px); border-radius: var(--radius-lg); background: #fff; color: var(--ink); box-shadow: var(--shadow-lift); }
.field { margin-bottom: 24px; }
.field label { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.field textarea { resize: vertical; }
.field-error { min-height: 1.3em; margin: 4px 0 0; color: #8d0909; font-size: .74rem; }
.consent { display: flex; align-items: flex-start; gap: 10px; min-height: 52px; margin-bottom: 16px; padding: 10px 0; font-size: .8rem; }
.consent input { flex: 0 0 auto; width: 21px; height: 21px; }
.consent span { display: block; min-height: 44px; }
.consent.active-hotspot { cursor: pointer; }
.consent.anomaly-pulse::before { content: "個人情報の取り扱いに同意する"; position: absolute; color: rgba(15, 5, 5, .42); transform: translate(31px, -2px); }
.consent.anomaly-pulse input { accent-color: #5a0808; box-shadow: inset 0 0 0 20px rgba(90, 8, 8, .68); }
.consent.anomaly-pulse span { background: linear-gradient(90deg, currentColor 0 24%, transparent 24% 30%, currentColor 30% 70%, transparent 70% 73%, currentColor 73%); background-clip: text; -webkit-background-clip: text; color: transparent; }
#contact-form.form-anomaly { filter: brightness(.45); }
.submit-button { width: 100%; border: 0; border-radius: 999px; background: var(--green); color: #fff; box-shadow: var(--shadow-soft); transition: transform .25s ease, box-shadow .25s ease; }
.submit-button:hover, .submit-button:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.form-status { min-height: 1.4em; margin: 12px 0 0; font-size: .78rem; }
.admin-gate { grid-column: 1 / -1; width: min(900px, 100%); margin: 0 auto; padding: clamp(38px, 7vw, 80px); border: 1px solid #5a0808; border-radius: var(--radius-md); background: #080304; text-align: center; }
.admin-kicker { color: #b88d84; font: 700 .75rem/1.5 ui-monospace, Consolas, monospace; letter-spacing: .22em; }
.admin-gate h2 { color: var(--ash); font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3.2rem); }
.admin-gate > p:not(.admin-kicker) { color: #b9a7a0; }
.admin-connect { position: relative; display: flex; align-items: center; justify-content: center; width: clamp(320px, 38vw, 480px); min-height: 72px; margin: 42px auto 0; overflow: hidden; border: 1px solid #6d1010; background: #050303; color: var(--ash); font-weight: 700; letter-spacing: .12em; }
.admin-connect::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(141, 9, 9, .14) 4px 5px); animation: slow-scan 7s linear infinite; pointer-events: none; }

/* anomaly-6で表示する内部記録。 */
.internal-record { background: #17100f; color: var(--ash); }
.subject-record { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #5d302b; }
.subject-record div { padding: 20px; border-right: 1px solid #5d302b; border-bottom: 1px solid #5d302b; }
.subject-record dt { color: #9b7a72; font-size: .72rem; letter-spacing: .12em; }
.subject-record dd { font-family: var(--serif); font-size: 1.2rem; }
.record-archive { margin-top: 55px; }
.record-archive h3 { font-family: var(--serif); font-weight: 500; }
.archive-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.archive-buttons button { min-height: 58px; padding: 10px; border: 1px solid #67342f; background: #080304; color: var(--ash); text-align: left; }

/* 共通フッター。 */
.site-footer { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 30px; padding: 60px max(6vw, 24px) 30px; background: #102e25; color: #fff; }
.footer-brand { margin-bottom: 20px; }
.footer-brand .brand-mark { filter: brightness(1.7) saturate(1.15); }
.footer-brand small, .site-footer > div > p { color: rgba(255, 255, 255, .6); }
.site-footer nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; font-size: .78rem; }
.fiction-notice { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .72); font-size: .76rem; }
.fiction-notice strong { color: #fff; letter-spacing: .08em; }
.footer-reset { grid-column: 1 / -1; display: flex; justify-content: center; padding: 24px; border: 1px solid rgba(216, 197, 189, .28); border-radius: var(--radius-md); background: rgba(8, 3, 4, .24); }
.footer-reset button { min-width: 280px; min-height: 54px; padding: 10px 20px; border: 1px solid #a76860; border-radius: 999px; background: #080304; color: #ead8d1; font-weight: 700; letter-spacing: .06em; }
.footer-reset button:hover { background: #260806; }

/* インタビュー、拡大写真、企業情報のダイアログ。 */
dialog { color: inherit; }
.story-dialog, .company-dialog, .lightbox, .diary-dialog { width: min(1040px, 94vw); max-height: 92vh; padding: 0; border: 0; background: #fff; box-shadow: var(--shadow); }
.story-dialog, .company-dialog, .lightbox { border-radius: var(--radius-lg); overflow: hidden; }
.story-dialog::backdrop, .company-dialog::backdrop, .lightbox::backdrop { background: rgba(8, 20, 16, .78); backdrop-filter: blur(4px); }
.dialog-shell { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.dialog-shell.compact { display: block; max-width: 680px; margin: auto; }
.dialog-close { position: absolute; top: 10px; right: 10px; z-index: 5; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); font-size: 1.7rem; }
.dialog-image { position: relative; min-height: 520px; background: #e7ebe8; }
.dialog-image img { width: 100%; height: 100%; object-fit: cover; }
.zoom-button { position: absolute; left: 20px; bottom: 20px; min-height: 48px; padding: 8px 16px; border: 0; background: rgba(255, 255, 255, .94); }
.dialog-copy { padding: clamp(36px, 5vw, 68px); }
.dialog-copy h2 { font-family: var(--serif); font-weight: 500; line-height: 1.5; }
.dialog-copy blockquote { padding: 18px 0; border-block: 1px solid var(--line); font-family: var(--serif); }
.lightbox { width: min(1320px, 97vw); background: #080807; color: #fff; }
.lightbox-shell { position: relative; }
.lightbox-target { position: relative; display: block; width: 100%; min-height: 44px; padding: 0; overflow: hidden; border: 0; background: #080807; }
.lightbox-target img { width: 100%; max-height: 84vh; object-fit: contain; transition: filter var(--stare-shift-duration, 35ms) linear, transform var(--stare-shift-duration, 35ms) linear; }
.lightbox-shell > p { margin: 0; padding: 10px; color: #aaa; text-align: center; font-size: .72rem; }
.lightbox-target.active-hotspot { cursor: pointer; }
.lightbox-target::before { content: ""; position: absolute; inset: 0; z-index: 2; opacity: 0; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(90, 8, 8, .72) 6px 7px, rgba(0, 0, 0, .5) 8px 9px); pointer-events: none; }
.lightbox-target::after { content: ""; position: absolute; right: 7%; bottom: 5%; z-index: 1; width: 12%; height: 58%; border-radius: 44% 44% 12% 12%; opacity: 0; background: rgba(4, 2, 2, .78); filter: blur(7px); pointer-events: none; }
.lightbox-target.anomaly-pulse::before, .lightbox-target.anomaly-pulse::after { opacity: .85; }
.lightbox-target.anomaly-pulse img { filter: contrast(1.22) brightness(.72) saturate(.55); }
.lightbox-target.stare-jumpscare img { filter: contrast(1.72) saturate(.32) brightness(.68); transform: scale(2.25); transform-origin: 50% 24%; }
.company-dialog table { width: 100%; margin-top: 26px; border-collapse: collapse; }
.company-dialog th, .company-dialog td { padding: 14px 9px; border-top: 1px solid var(--line); text-align: left; }
.company-dialog td { text-align: right; }
#work-hours-row.active-hotspot { cursor: pointer; }
#company-table.anomaly-pulse { background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(61, 0, 0, .25) 7px 8px); box-shadow: inset 0 0 0 2px rgba(89, 4, 4, .44); }
#company-table.anomaly-pulse #work-hours-value { text-shadow: 5px 2px 0 rgba(90, 8, 8, .65); }
#company-table.anomaly-pulse #recovered-label { display: inline-block; color: #4d0505; transform: scale(1.16); }

/* サイト改変の3,500ms全画面演出。 */
.mutation-overlay { --glitch-grain-opacity: .72; --glitch-grain-speed: .13s; --glitch-scan-speed: .3s; --glitch-fracture-speed: .22s; --glitch-breathe-speed: 2.4s; --glitch-block-1-speed: .43s; --glitch-block-2-speed: .71s; --glitch-block-3-speed: .56s; --glitch-residual-speed: 2.8s; --glitch-jumpscare-speed: 120ms; position: fixed; inset: 0; z-index: 1000; display: none; overflow: hidden; background: rgba(8, 3, 4, .95); pointer-events: all; }
.mutation-overlay.active { display: block; }
.mutation-overlay.active.visible .mutation-message { opacity: 1; }
.mutation-grain { position: absolute; inset: -40%; width: 180%; height: 180%; opacity: var(--glitch-grain-opacity); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.95'/%3E%3C/svg%3E"); mix-blend-mode: screen; animation: violent-noise var(--glitch-grain-speed) steps(2) infinite; }
.mutation-scanlines { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .82) 3px 5px, rgba(141, 9, 9, .18) 5px 6px); animation: fast-scan var(--glitch-scan-speed) linear infinite; }
.mutation-fracture { position: absolute; inset: -10%; background: linear-gradient(175deg, transparent 0 22%, rgba(141, 9, 9, .7) 23%, #080304 24% 28%, transparent 29% 56%, rgba(61, 0, 0, .8) 57%, transparent 59%); animation: fracture var(--glitch-fracture-speed) steps(2) infinite; }
.mutation-fracture::before, .mutation-fracture::after { position: absolute; inset: 18% 7%; display: none; overflow: hidden; color: rgba(216, 197, 189, .2); font: 700 clamp(1rem, 3vw, 2.4rem)/1.7 ui-monospace, Consolas, monospace; letter-spacing: .14em; white-space: pre-wrap; pointer-events: none; }
.mutation-fracture::before { content: "VOICE // RECORD // VOICE\A RECORD // VOICE // RECORD\A VOICE // RECORD // VOICE"; transform: translateX(-5px); text-shadow: 7px 0 rgba(141, 9, 9, .75), -6px 0 rgba(27, 87, 83, .46); }
.mutation-fracture::after { content: "RECORD // VOICE // RECORD\A VOICE // RECORD // VOICE"; transform: translate(8px, 24%); text-shadow: -8px 0 rgba(141, 9, 9, .62), 5px 0 rgba(48, 95, 91, .4); }
.mutation-block { position: absolute; z-index: 2; display: none; width: 48vw; height: 18vh; opacity: .72; background: linear-gradient(90deg, rgba(61, 0, 0, .9), rgba(8, 3, 4, .28), rgba(141, 9, 9, .65)); mix-blend-mode: screen; pointer-events: none; }
.mutation-block--1 { top: 14%; left: -12%; clip-path: inset(18% 0 32% 0); }
.mutation-block--2 { top: 47%; right: -8%; width: 64vw; clip-path: inset(37% 0 10% 0); }
.mutation-block--3 { bottom: 4%; left: 16%; width: 73vw; clip-path: inset(8% 0 55% 0); }
.mutation-message { position: absolute; top: 50%; left: 50%; z-index: 4; width: min(620px, calc(100% - 34px)); padding: 24px; background: rgba(8, 3, 4, var(--msg-bg-alpha, .88)); backdrop-filter: contrast(var(--msg-backdrop-contrast, 1)) saturate(var(--msg-backdrop-saturate, 1)); -webkit-backdrop-filter: contrast(var(--msg-backdrop-contrast, 1)) saturate(var(--msg-backdrop-saturate, 1)); color: var(--ash); text-align: center; transform: translate(-50%, -50%); text-shadow: 3px 0 #3d0000; opacity: 0; clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); animation: torn-edge var(--tear-speed, 2.6s) steps(1) infinite; transition: opacity var(--msg-fade-duration, .3s) ease var(--msg-fade-delay, 0s); }
.mutation-message p { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(1.75rem, 5vw, 3.4rem); letter-spacing: .14em; }
.mutation-message strong { display: block; color: #e0beb6; font: 700 clamp(.78rem, 1.4vw, 1.05rem)/1.5 ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.mutation-message span { color: #e6c7be; font-size: 1.25em; }
/* 識別子本体は保護対象外の疑似要素だけで、輪郭の色ズレ二重像を表現する。 */
.mutation-message::before, .mutation-message::after { content: ""; position: absolute; inset: 0; opacity: 0; border: 1px solid transparent; clip-path: inherit; pointer-events: none; }
.mutation-message::before { border-color: rgba(216, 52, 42, .75); }
.mutation-message::after { border-color: rgba(48, 130, 122, .6); animation-direction: reverse; }
.mutation-overlay.slow .mutation-grain { opacity: .28; animation-duration: 1.1s; }
.mutation-overlay.slow .mutation-scanlines { opacity: .45; animation-duration: 2.4s; }
.mutation-overlay.slow .mutation-fracture { opacity: .22; animation-duration: 1.6s; }
.mutation-overlay.stage-1 { --glitch-grain-opacity: .28; --glitch-grain-speed: .42s; --glitch-scan-speed: .24s; }
.mutation-overlay.stage-1.slow .mutation-grain { opacity: .15; }
.mutation-overlay.stage-2 { --glitch-grain-opacity: .48; --glitch-grain-speed: .24s; }
.mutation-overlay.stage-2 .mutation-fracture::before, .mutation-overlay.stage-2 .mutation-fracture::after, .mutation-overlay.stage-6 .mutation-fracture::before, .mutation-overlay.stage-6 .mutation-fracture::after { display: block; }
.mutation-overlay.stage-3 .mutation-grain, .mutation-overlay.stage-3 .mutation-fracture, .mutation-overlay.stage-6 .mutation-grain, .mutation-overlay.stage-6 .mutation-fracture { animation-name: violent-noise, glitch-breathe; animation-duration: var(--glitch-grain-speed), var(--glitch-breathe-speed); animation-timing-function: steps(2), ease-in-out; animation-iteration-count: infinite; }
.mutation-overlay.stage-3 .mutation-fracture, .mutation-overlay.stage-6 .mutation-fracture { animation-name: fracture, glitch-breathe; animation-duration: var(--glitch-fracture-speed), var(--glitch-breathe-speed); }
.mutation-overlay.stage-4 .mutation-block, .mutation-overlay.stage-6 .mutation-block { display: block; }
.mutation-overlay.stage-4 .mutation-block--1, .mutation-overlay.stage-6 .mutation-block--1 { animation: block-shift-1 var(--glitch-block-1-speed) steps(2) infinite; }
.mutation-overlay.stage-4 .mutation-block--2, .mutation-overlay.stage-6 .mutation-block--2 { animation: block-shift-2 var(--glitch-block-2-speed) steps(3) infinite; }
.mutation-overlay.stage-4 .mutation-block--3, .mutation-overlay.stage-6 .mutation-block--3 { animation: block-shift-3 var(--glitch-block-3-speed) steps(2) infinite; }
.mutation-overlay.stage-4.slow .mutation-block { opacity: .22; }
.mutation-overlay.stage-5, .mutation-overlay.stage-6 { --glitch-grain-opacity: .82; --glitch-grain-speed: .1s; --glitch-scan-speed: .19s; --glitch-fracture-speed: .16s; background: rgba(2, 1, 1, .985); }
.mutation-overlay.stage-5 .mutation-fracture, .mutation-overlay.stage-6 .mutation-fracture { background-color: rgba(30, 0, 0, .72); filter: contrast(1.45) saturate(.62); }
.mutation-overlay.stage-6.slow .mutation-grain { opacity: .42; animation-duration: .72s, var(--glitch-breathe-speed); }
.mutation-overlay.stage-6.slow .mutation-fracture { opacity: .48; animation-duration: .8s, var(--glitch-breathe-speed); }
.mutation-overlay.stage-6.slow .mutation-block { opacity: .44; animation-duration: calc(var(--glitch-block-1-speed) * 2); }

/* サイト改変ウインドウ自体も、改変が進むほど輪郭の色ズレと崩れが激しくなる。 */
.mutation-overlay.stage-1 .mutation-message { --msg-fade-duration: .6s; --msg-fade-delay: .35s; --tear-amp: 1.5px; --tear-speed: 2.6s; --msg-bg-alpha: .85; text-shadow: 2px 0 #3d0000; }
.mutation-overlay.stage-2 .mutation-message { --msg-fade-duration: .45s; --msg-fade-delay: .26s; --tear-amp: 3px; --tear-speed: 2s; --msg-bg-alpha: .76; --msg-backdrop-contrast: 1.15; text-shadow: 3px 1px #3d0000, -1px 0 rgba(48, 130, 122, .3); }
.mutation-overlay.stage-2 .mutation-message::before, .mutation-overlay.stage-2 .mutation-message::after { opacity: .3; }
.mutation-overlay.stage-3 .mutation-message { --msg-fade-duration: .32s; --msg-fade-delay: .18s; --tear-amp: 5px; --tear-speed: 1.4s; --msg-bg-alpha: .65; --msg-backdrop-contrast: 1.3; --msg-backdrop-saturate: .7; text-shadow: 4px 1px #3d0000, -2px -1px rgba(48, 130, 122, .35); }
.mutation-overlay.stage-3 .mutation-message::before, .mutation-overlay.stage-3 .mutation-message::after { opacity: .5; transform: translate(2px, -1px); }
.mutation-overlay.stage-3 .mutation-message::after { transform: translate(-2px, 1px); }
.mutation-overlay.stage-4 .mutation-message { --msg-fade-duration: .22s; --msg-fade-delay: .1s; --tear-amp: 7px; --tear-speed: .9s; --msg-bg-alpha: .52; --msg-backdrop-contrast: 1.45; --msg-backdrop-saturate: .55; text-shadow: 5px 2px #3d0000, -3px -1px rgba(48, 130, 122, .4); }
.mutation-overlay.stage-4 .mutation-message::before, .mutation-overlay.stage-4 .mutation-message::after,
.mutation-overlay.stage-5 .mutation-message::before, .mutation-overlay.stage-5 .mutation-message::after,
.mutation-overlay.stage-6 .mutation-message::before, .mutation-overlay.stage-6 .mutation-message::after { opacity: .8; animation: message-ghost-shift .5s steps(2) infinite; }
.mutation-overlay.stage-4 .mutation-message::after, .mutation-overlay.stage-5 .mutation-message::after, .mutation-overlay.stage-6 .mutation-message::after { animation-direction: reverse; }
.mutation-overlay.stage-5 .mutation-message { --msg-fade-duration: .15s; --msg-fade-delay: .05s; --tear-amp: 9px; --tear-speed: .55s; --msg-bg-alpha: .4; --msg-backdrop-contrast: 1.6; --msg-backdrop-saturate: .4; text-shadow: 6px 2px #3d0000, -4px -2px rgba(48, 130, 122, .45), 0 0 14px rgba(216, 52, 42, .5); box-shadow: 0 0 30px rgba(61, 0, 0, .45); }
.mutation-overlay.stage-5 .mutation-message::before, .mutation-overlay.stage-5 .mutation-message::after { animation-duration: .32s; clip-path: polygon(0 0, 100% 4%, 97% 40%, 100% 62%, 0 58%, 4% 22%); }
.mutation-overlay.stage-6 .mutation-message { --msg-fade-duration: .1s; --msg-fade-delay: 0s; --tear-amp: 11px; --tear-speed: .32s; --msg-bg-alpha: .28; --msg-backdrop-contrast: 1.8; --msg-backdrop-saturate: .3; text-shadow: 7px 2px #3d0000, -5px -2px rgba(48, 130, 122, .5), 0 0 20px rgba(216, 52, 42, .65); box-shadow: 0 0 42px rgba(61, 0, 0, .6); }
.mutation-overlay.stage-6 .mutation-message::before, .mutation-overlay.stage-6 .mutation-message::after { animation-duration: .18s; clip-path: polygon(3% 0, 100% 8%, 96% 48%, 100% 100%, 0 92%, 6% 44%); }

.residual-glitch { --glitch-residual-speed: 2.8s; --glitch-residual-peak: .62; position: fixed; inset: 0; z-index: 900; display: none; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(61, 0, 0, .32) 5px 7px), radial-gradient(circle at 50% 40%, transparent, rgba(8, 3, 4, .72)); mix-blend-mode: multiply; pointer-events: none; }
.residual-glitch.active { display: block; animation: residual-fade var(--glitch-residual-speed) ease-out forwards; }
.jumpscare-flash { --glitch-jumpscare-speed: 120ms; position: fixed; inset: 0; z-index: 1600; display: none; place-items: center; overflow: hidden; background: #080304; pointer-events: none; }
.jumpscare-flash.active { display: grid; }
.jumpscare-flash img { --glitch-jumpscare-face-zoom: 2.25; width: 100vw; height: 100vh; max-height: none; object-fit: cover; object-position: 50% 24%; filter: contrast(1.58) saturate(.44) brightness(.72); transform-origin: 50% 24%; }
.jumpscare-flash.active img { animation: jumpscare-pop var(--glitch-jumpscare-speed) linear both; }

/* 日記ウィンドウは段階に応じて腐食する。 */
.diary-dialog { width: min(720px, 92vw); background: transparent; overflow: visible; }
.diary-dialog::backdrop { background: rgba(4, 2, 2, .88); backdrop-filter: blur(5px); }
.diary-window { position: relative; max-height: 86vh; overflow: auto; border: 4px ridge #8e806c; background: #eee3c9; color: #17120e; box-shadow: 0 25px 80px #000; }
.diary-window::after { content: ""; position: absolute; inset: 0; border: 8px solid transparent; pointer-events: none; }
.diary-titlebar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding-left: 16px; border-bottom: 1px solid #8e806c; background: #d4c7aa; font: 700 .8rem/1.5 ui-monospace, Consolas, monospace; }
.diary-titlebar button { width: 48px; height: 48px; border: 0; border-left: 1px solid #8e806c; background: #e7dbc0; font-size: 1.5rem; }
.diary-content { padding: clamp(28px, 6vw, 56px); }
.diary-id { font: 700 .72rem/1.5 ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.diary-date { color: #5c4e40; font-size: .8rem; }
.diary-content h2 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 500; }
.diary-content #diary-body { font-family: var(--serif); font-size: clamp(.98rem, 2vw, 1.12rem); line-height: 2.05; }
.diary-window[data-stage="3"], .diary-window[data-stage="4"] { border-color: #49100d; background: #b6a58d; color: #2b0806; }
.diary-window[data-stage="3"]::after, .diary-window[data-stage="4"]::after { border-color: rgba(61, 0, 0, .38); filter: blur(3px); }
.diary-window[data-stage="5"], .diary-window[data-stage="6"] { border-color: #6d0909; background: #080304; color: #b3261e; }
.diary-window[data-stage="5"]::after, .diary-window[data-stage="6"]::after { border-color: rgba(141, 9, 9, .55); filter: blur(5px); }
.diary-window[data-stage="5"] .diary-titlebar, .diary-window[data-stage="6"] .diary-titlebar { border-color: #6d0909; background: #170505; }
.diary-window[data-stage="5"] .diary-titlebar button, .diary-window[data-stage="6"] .diary-titlebar button { border-color: #6d0909; background: #080304; color: #b3261e; }
.diary-window[data-stage="6"] #diary-body { font-family: ui-monospace, Consolas, monospace; line-height: 1.7; letter-spacing: .08em; }

/* anomaly-6では施設骨格を残して内部記録へ変質させる。 */
body[data-state="anomaly-6"], body[data-state="truth-unlocked"] { --paper: #d9d0c5; --cream: #cbc0b3; --card: #cbc0b3; --ink: #2c2220; --muted: #62524d; --green: #67342f; --green-deep: #211817; --gold: #7a5a2a; --line: #ad9d96; }
body[data-state="anomaly-6"] .site-header, body[data-state="truth-unlocked"] .site-header { background: rgba(217, 208, 197, .96); }
body[data-state="anomaly-6"] .hero-shade, body[data-state="truth-unlocked"] .hero-shade { background: linear-gradient(90deg, rgba(8, 3, 4, .9), rgba(61, 0, 0, .48), rgba(8, 3, 4, .2)); }
body[data-state="anomaly-6"] .story-card, body[data-state="truth-unlocked"] .story-card { background: #bfb2a5; }
body[data-state="anomaly-6"] .site-footer, body[data-state="truth-unlocked"] .site-footer { background: #080304; }

/* 5〜7秒間隔の一時演出。 */
.unified-pulse { color: #080304; text-shadow: 4px 1px 0 rgba(90, 8, 8, .6); line-height: 1.18 !important; transform: translateX(3px); background: linear-gradient(90deg, currentColor 0 33%, transparent 33% 37%, currentColor 37% 71%, transparent 71% 75%, currentColor 75%); background-clip: text; -webkit-background-clip: text; }

@keyframes violent-noise { 0% { transform: translate(0); } 25% { transform: translate(4%, -3%); } 50% { transform: translate(-3%, 5%); } 75% { transform: translate(5%, 2%); } 100% { transform: translate(-4%, -3%); } }
@keyframes fast-scan { to { transform: translateY(10px); } }
@keyframes slow-scan { to { transform: translateY(20px); } }
@keyframes fracture { 0% { transform: translateX(-3%) skewX(2deg); } 50% { transform: translateX(4%) skewX(-3deg); } 100% { transform: translateX(-1%); } }
@keyframes glitch-breathe { 0%, 100% { opacity: .72; } 50% { opacity: .48; } }
@keyframes block-shift-1 { 0%, 100% { transform: translate(0); } 35% { transform: translate(42vw, -3vh); } 70% { transform: translate(11vw, 7vh); } }
@keyframes block-shift-2 { 0%, 100% { transform: translate(0); } 28% { transform: translate(-38vw, 4vh); } 68% { transform: translate(-8vw, -8vh); } }
@keyframes block-shift-3 { 0%, 100% { transform: translate(0); } 42% { transform: translate(15vw, -34vh); } 76% { transform: translate(-25vw, -9vh); } }
@keyframes residual-fade { 0% { opacity: var(--glitch-residual-peak, .62); } 70% { opacity: calc(var(--glitch-residual-peak, .62) * .39); } 100% { opacity: 0; } }
@keyframes message-ghost-shift { 0% { transform: translate(0); } 30% { transform: translate(3px, -2px); } 60% { transform: translate(-3px, 2px); } 100% { transform: translate(2px, 1px); } }
/* 改変ウインドウの箱そのものを、直線の縁を持つ「窓」ではなく紙が裂けたような輪郭にする。tear-ampが0の時は通常の矩形のまま。 */
@keyframes torn-edge {
  0%, 46% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
  50% { clip-path: polygon(0% 0%, 45% 0%, calc(50% + var(--tear-amp, 0px)) calc(var(--tear-amp, 0px) * 1.6), 55% 0%, 100% 0%, 100% 45%, calc(100% - var(--tear-amp, 0px)) 50%, 100% 55%, 100% 100%, 55% 100%, calc(45% - var(--tear-amp, 0px)) calc(100% - var(--tear-amp, 0px)), 45% 100%, 0% 100%, 0% 55%, var(--tear-amp, 0px) 50%, 0% 45%); }
  54%, 96% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
  100% { clip-path: polygon(0% calc(var(--tear-amp, 0px) * 1.4), calc(100% - var(--tear-amp, 0px)) 0%, 100% 0%, 100% 100%, var(--tear-amp, 0px) 100%, 0% calc(100% - var(--tear-amp, 0px) * 1.2)); }
}
@keyframes jumpscare-pop { 0% { transform: scale(calc(var(--glitch-jumpscare-face-zoom) + .16)); filter: contrast(1.75) saturate(.25) brightness(.58); } 100% { transform: scale(var(--glitch-jumpscare-face-zoom)); filter: contrast(1.58) saturate(.44) brightness(.72); } }

@media (max-width: 980px) {
  .site-header nav { position: absolute; top: 76px; left: 0; right: 0; display: none; padding: 15px 24px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-header nav.open { display: grid; }
  .nav-reset { justify-self: start; }
  .menu-button { display: block; }
  .intro-grid, .contact { grid-template-columns: 1fr; }
  .metric-grid, .quote-grid, .story-grid, .partner-grid { grid-template-columns: 1fr; }
  .metric-tile--lg, .metric-tile--sm { grid-column: 1; grid-row: auto; }
  .process-list, .process-list:has(.final-process:not([hidden])) { grid-template-columns: 1fr; }
  .process-list li { min-height: 0; display: grid; grid-template-columns: 55px 1fr; column-gap: 16px; }
  .process-list li > span { margin-bottom: 0; }
  .dialog-shell { grid-template-columns: 1fr; }
  .dialog-image { min-height: 360px; max-height: 52vh; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-reset button { width: 100%; min-width: 0; }
  .subject-record, .archive-buttons { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .top-notice { font-size: .67rem; }
  .site-header { padding: 8px 16px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: .84rem; }
  .hero { min-height: 680px; }
  .hero-shade { background: linear-gradient(0deg, rgba(11, 43, 34, .88), rgba(11, 43, 34, .3)); }
  .hero-copy { width: auto; padding-top: 245px; margin: 0 22px; }
  .hero h1 { font-size: 2.65rem; }
  .section { padding: 72px 20px; }
  .section-heading h2 { font-size: 2rem; }
  .metric-grid strong { font-size: 3.7rem; }
  .quote-grid { gap: 12px; }
  .story-body { padding: 22px; }
  .contact form { padding: 24px 18px; }
  .admin-connect { width: 100%; }
  .story-dialog, .company-dialog, .lightbox { width: 100vw; max-height: 100vh; }
  .story-dialog-shell { min-height: 100vh; }
  .dialog-copy { padding: 34px 22px; }
  .subject-record, .archive-buttons { grid-template-columns: 1fr; }
  .mutation-message { padding: 24px 14px; }
  .jumpscare-flash img { --glitch-jumpscare-face-zoom: 1.65; }
  .lightbox-target.stare-jumpscare img { transform: scale(1.65); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .kinetic-line { opacity: 1; transform: none; }
  .mutation-overlay.active { display: block; background: rgba(61, 0, 0, .94); }
  .mutation-overlay .mutation-grain, .mutation-overlay .mutation-fracture { display: none; }
  .mutation-overlay .mutation-scanlines { background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(8, 3, 4, .35) 4px 6px); }
  .mutation-overlay .mutation-block { display: none; }
  .residual-glitch.active { display: block; opacity: .2; background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(61, 0, 0, .28) 6px 8px); }
  .jumpscare-flash.active { display: grid; background: #080304; }
  .jumpscare-flash.active img { filter: contrast(1.28) saturate(.62); transform: scale(var(--glitch-jumpscare-face-zoom)); }
  .lightbox-target.stare-jumpscare img { filter: contrast(1.32) saturate(.62); transform: scale(2.25); }
}

@media (max-width: 560px) and (prefers-reduced-motion: reduce) {
  .lightbox-target.stare-jumpscare img { transform: scale(1.65); }
}

/* 内部管理認証ページ。 */
.access-page { min-height: 100vh; background: #080304; color: var(--ash); font-family: ui-monospace, Consolas, monospace; }
.access-page::before { content: ""; position: fixed; inset: 0; opacity: .22; background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(141, 9, 9, .18) 4px 5px); pointer-events: none; }
.access-shell { position: relative; display: grid; place-items: center; min-height: 100vh; padding: 74px 20px; }
.access-system { position: absolute; top: 22px; left: 24px; color: #77534e; font-size: .68rem; letter-spacing: .15em; }
.access-panel { width: min(640px, 100%); padding: clamp(32px, 7vw, 72px); border: 1px solid #5f100d; background: rgba(8, 3, 4, .92); box-shadow: 0 0 90px rgba(61, 0, 0, .24); }
.access-mark { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 30px; border: 1px solid #8d0909; border-radius: 50%; color: #a96359; font-family: var(--serif); }
.access-panel h1 { margin-bottom: 20px; color: #dcc8c1; font-size: clamp(1.55rem, 5vw, 2.7rem); line-height: 1.25; letter-spacing: .08em; }
.access-panel > p:not(.access-mark) { color: #a18d87; font-family: var(--sans); }
.access-panel form { margin-top: 40px; }
.access-panel label { display: block; margin-bottom: 8px; color: #b38d85; font-size: .72rem; letter-spacing: .15em; }
.access-panel input { width: 100%; min-height: 62px; padding: 10px 14px; border: 1px solid #5f100d; border-radius: 0; background: #030202; color: #e0cbc4; font-size: 1.25rem; letter-spacing: .18em; }
.access-panel form button { width: 100%; min-height: 62px; margin-top: 14px; border: 1px solid #74110d; background: #200504; color: #dcc8c1; font-weight: 700; letter-spacing: .12em; }
.access-error { min-height: 1.6em; margin-top: 12px; color: #be4a3c; font-family: var(--sans); }
.access-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 28px; color: #957d77; font-family: var(--sans); font-size: .8rem; text-decoration: underline; text-underline-offset: 4px; }
.access-overlay { position: fixed; inset: 0; z-index: 1200; display: none; overflow: hidden; background: #080304; }
.access-overlay.active { display: block; }
.access-noise { position: absolute; inset: -40%; width: 180%; height: 180%; opacity: .68; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: screen; animation: violent-noise .16s steps(2) infinite; }
.access-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .82) 3px 5px, rgba(141, 9, 9, .2) 5px 6px); animation: fast-scan .35s linear infinite; }
.access-message { --tear-amp: 13px; --tear-speed: .24s; position: absolute; top: 50%; left: 50%; z-index: 2; width: min(680px, calc(100% - 32px)); padding: 38px 20px; background: rgba(8, 3, 4, .2); backdrop-filter: contrast(1.9) saturate(.28); -webkit-backdrop-filter: contrast(1.9) saturate(.28); text-align: center; transform: translate(-50%, -50%); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); animation: torn-edge var(--tear-speed) steps(1) infinite; transition: opacity .5s ease; }
.access-message strong { display: block; color: #e1c6bd; font-size: clamp(2rem, 7vw, 4.8rem); letter-spacing: .12em; text-shadow: 3px 0 #3d0000, -2px 0 rgba(48, 130, 122, .3); }
.access-message p { margin: 12px 0 0; color: #ba8980; font-family: var(--sans); }
.access-log { min-height: 1px; margin-top: 22px; text-align: left; font: .78rem/1.9 ui-monospace, Consolas, monospace; }
.access-log p { margin: 0 0 6px; color: #93726a; }
.access-log p::before { content: "> "; color: #7c2822; }

/* 認証通過後、violent な走査ノイズを鎮めて「記録に接続された静けさ」へ移す。 */
.access-overlay.settled .access-noise { opacity: .12; animation-duration: 1.4s; }
.access-overlay.settled .access-scan { opacity: .28; animation-duration: 2.2s; }
.access-overlay.final .access-message { opacity: .18; }
.access-overlay.final .access-noise, .access-overlay.final .access-scan { opacity: 0; transition: opacity .6s ease; }

@media (prefers-reduced-motion: reduce) {
  .access-overlay.active { background: #3d0000; }
  .access-noise { display: none; }
  .access-scan { background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(8, 3, 4, .4) 4px 6px); }
  .access-message strong { text-shadow: none; }
}

/* 識別文字と日記本文をすべての追加演出から保護する。 */
#mutation-letter, .diary-window, #diary-body {
  filter: none !important;
  clip-path: none !important;
  animation: none !important;
}
/* 改変ウインドウ自体（.mutation-message）はtorn-edge演出のためclip-path/animationを許可するが、
   裂け目の深さ（--tear-amp）は常にpaddingより小さく抑えてあり、内側の識別文字までは届かない。 */
.mutation-message { filter: none !important; }
