/* ============================================
   ある失踪事件について
   マンガの線 × グレーのトーン × 手書きの調査メモ
   ミントは「あの子の髪」にだけ使う（原作でも唯一の色）
   ============================================ */

:root {
  --ink: #1d1d1d;
  --paper: #fbfbf8;
  --tone: #bdbdbd;       /* 壁の灰色（原作のトーン） */
  --tone-l: #e7e7e3;
  --tone-d: #6f6f6f;
  --night: #3b3b3b;      /* 夜の場面 */
  --night-d: #262626;
  --sub: #5a5a5a;        /* 白地の小さい文字（白との比 7:1） */
  --mint: #5fd0b0;       /* あの子の髪。ほかには使わない */
  --line-w: 3px;
  --hand: "Klee One", "Zen Maru Gothic", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.02em;
  min-height: 100vh;
}

/* 背景はうっすらトーンの網点（原作の空・壁の質感） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(rgba(0,0,0,0.07) 1px, transparent 1.4px) 0 0 / 6px 6px,
    linear-gradient(180deg, #ececea 0%, var(--paper) 260px);
  pointer-events: none;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px 140px;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- ヘッダー ---------- */

.kb-head {
  position: relative;
  text-align: center;
  padding: 34px 0 18px;
}

.kb-kicker {
  display: inline-block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: var(--sub);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 0 10px;
  margin-bottom: 8px;
}

.kb-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.kb-title .hl {
  background: linear-gradient(transparent 58%, var(--tone) 58%, var(--tone) 92%, transparent 92%);
  padding: 0 6px;
}

.kb-sub {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--sub);
  letter-spacing: 0.12em;
}

/* ---------- アプリ枠 = 大きな1コマ ---------- */

.app-frame {
  background: #fff;
  border: 3.5px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}

/* ---------- 友人のひとこと（丸い吹き出し＝人の声） ---------- */

.friend-bar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, var(--tone-l) 0%, #fff 100%);
  border-bottom: 2px dashed #cfcfcb;
}

.friend-face {
  flex-shrink: 0;
  width: 70px;
}

.friend-face svg { display: block; width: 100%; height: auto; }

.bubble {
  position: relative;
  flex: 1;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background: #fff;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 2;
  min-height: 66px;
}

/* しっぽ（左向き） */
.bubble::before,
.bubble::after {
  content: "";
  position: absolute;
  top: 22px;
  border-style: solid;
}
.bubble::before {
  left: -16px;
  border-width: 9px 16px 9px 0;
  border-color: transparent var(--ink) transparent transparent;
}
.bubble::after {
  left: -11px;
  top: 25px;
  border-width: 6px 12px 6px 0;
  border-color: transparent #fff transparent transparent;
}

.bubble .sys {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--sub);
  letter-spacing: 0.04em;
}

/* ---------- 検索 ---------- */

.kb-search {
  display: flex;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: var(--line-w) solid var(--ink);
}

.kb-search input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 11px 18px;
  border: var(--line-w) solid var(--ink);
  border-radius: 999px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.kb-search input::placeholder { color: #6a6a6a; font-weight: 500; }
.kb-search input:focus { box-shadow: 0 0 0 4px var(--tone-l); }

.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 10px 24px;
  border: var(--line-w) solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-block;
  line-height: 1.6;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--tone-l); }
/* 最後のページの下のボタン。折り返しても上下左右がくっつかないように間を空ける */
.report-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; margin-top: 22px; }

/* ---------- 資料の目録 ---------- */

.index-sec { padding: 18px 22px 6px; }

.sec-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  padding: 1px 12px;
  margin-bottom: 10px;
}

.file-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-bottom: 16px;
}

.file-tab {
  position: relative;
  font-family: inherit;
  text-align: left;
  border: 3px solid var(--ink);
  border-radius: 4px 14px 4px 4px;
  background: #fff;
  padding: 10px 12px 10px;
  cursor: pointer;
  color: var(--ink);
  line-height: 1.5;
  transition: transform 0.1s;
  box-shadow: 3px 3px 0 var(--tone);
}
.file-tab:hover { transform: translateY(-2px); background: var(--tone-l); }
.file-tab.on { background: var(--tone-l); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tone); }

.file-tab .no {
  display: block;
  font-family: Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--sub);
}
.file-tab .nm { display: block; font-size: 0.9rem; font-weight: 900; letter-spacing: 0.06em; }

.file-tab.locked {
  cursor: default;
  color: #777;
  background:
    repeating-linear-gradient(135deg, #f3f3f1 0 8px, #fff 8px 16px);
  box-shadow: none;
  border-style: dashed;
}
.file-tab.locked:hover { transform: none; }
.file-tab.locked .nm { color: #6a6a6a; font-weight: 700; font-size: 0.8rem; }

.file-tab.fresh { animation: tab-in 0.9s ease; }
@keyframes tab-in {
  0% { transform: scale(0.94); background: var(--ink); color: #fff; }
  60% { transform: scale(1.03); }
  100% { transform: none; }
}

@media (max-width: 560px) {
  .file-tabs { gap: 7px; }
  .file-tab { padding: 8px 8px; }
  .file-tab .nm { font-size: 0.8rem; }
}

/* ---------- 資料（書類） ---------- */

.file-view { padding: 4px 22px 26px; }

.doc {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  animation: appear 0.35s ease;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.doc-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 2.5px solid var(--ink);
  background: var(--tone-l);
}
.doc-head .no {
  font-family: Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  background: var(--ink);
  color: #fff;
  padding: 0 10px;
  border-radius: 3px;
}
.doc-head h3 { font-size: 1.1rem; font-weight: 900; letter-spacing: 0.08em; }
.doc-head .by { margin-left: auto; font-size: 0.7rem; color: var(--sub); letter-spacing: 0.08em; }

.doc-body { padding: 20px 20px 24px; }
.doc-body > p { font-size: 0.92rem; margin-bottom: 1em; }

.kw {
  font-weight: 900;
  background:
    linear-gradient(transparent 55%, var(--tone) 55%, var(--tone) 94%, transparent 94%);
  padding: 0 3px;
}

/* 事実の表と証明写真 */
.fact-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: start;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  border-top: 2px solid var(--ink);
  font-size: 0.86rem;
}
.facts dt, .facts dd { padding: 6px 8px; border-bottom: 1.5px solid #cfcfcb; line-height: 1.7; }
.facts dt { font-weight: 900; font-size: 0.74rem; letter-spacing: 0.1em; color: var(--sub); white-space: nowrap; }

@media (max-width: 560px) {
  .fact-grid { grid-template-columns: 1fr; }
  .fact-grid .photo.clip { max-width: 170px; margin: 0 auto; }
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 6px;
  font-size: 0.9rem;
}
.st-val b { font-weight: 900; }
.status-line.moved .st-val { font-weight: 900; }
.status-line .was { text-decoration: line-through; text-decoration-thickness: 2px; color: #777; margin-right: 6px; font-size: 0.8rem; }

.sub-h {
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin: 22px 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--ink);
}

/* 気になっていること（押すと入力欄に入る） */
.leads { list-style: none; margin: 4px 0 6px; }
.leads li { margin-bottom: 6px; }
.lead {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: none;
  border-bottom: 2px dashed var(--tone);
  padding: 2px 4px 2px 1.4em;
  cursor: pointer;
  position: relative;
  width: 100%;
}
.lead { display: flex; align-items: flex-start; gap: 8px; padding-left: 2px; }
.lead .mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border: 2.5px solid var(--tone);
  border-radius: 4px;
  position: relative;
}
.lead.done .mark { border-color: var(--ink); }
.lead.done .mark::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -2px;
  width: 8px;
  height: 13px;
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
  transform: rotate(40deg);
}
.lead.done .lead-t { color: #4a4a4a; }
.lead:hover { background: var(--tone-l); border-bottom-style: solid; }
.leads-note { font-size: 0.72rem; color: var(--sub); margin-top: 6px; }

/* 友人の言葉（資料の中に置く分） */
.friend-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 12px;
}
.friend-line .fl-face { flex-shrink: 0; width: 40px; }
.friend-line .fl-face svg { display: block; width: 100%; height: auto; }
.friend-line .fl-say {
  position: relative;
  flex: 1;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.8;
  animation: pop 0.28s ease;
}
.friend-line .fl-say::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 11px;
  border-style: solid;
  border-width: 6px 11px 6px 0;
  border-color: transparent var(--ink) transparent transparent;
}
.friend-line[hidden] { display: none; }

/* 何かが増えたときだけ、まわりを暗くして、そこを浮かび上がらせる */
.spot-wait, .leads li.spot-wait .lead { opacity: 0; }
.spot-dim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(20,20,20,0.5);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.spot-dim.on { opacity: 1; }
.spot {
  position: relative;
  z-index: 60;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 22px 10px #fff;
}
.lit, .leads li.lit .lead {
  animation: lead-in 0.7s ease;
}
@keyframes lead-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ② 集めた情報（写真は押すと大きく見られる） */
.mem-h {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 20px 0 6px;
  padding-left: 10px;
  border-left: 4px solid var(--ink);
}
.ev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 12px 0 8px;
}
@media (max-width: 560px) {
  .ev-grid { grid-template-columns: 1fr; gap: 22px; }
}
.ev-item { position: relative; display: flex; flex-direction: column; }
.ev-item .photo { transform: rotate(-0.6deg); padding-bottom: 7px; }
.ev-item:nth-child(2) .photo { transform: rotate(0.8deg); }
.ev-item .photo .frame { aspect-ratio: 4 / 3; }
.ev-item .photo figcaption { display: none; }
.ev-open {
  position: absolute;
  inset: -6px;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  border-radius: 8px;
  cursor: zoom-in;
}
.ev-open:hover { background: rgba(0,0,0,0.05); }
.ev-open:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.ev-foot {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ev-name { font-size: 0.82rem; font-weight: 900; letter-spacing: 0.08em; }
.ev-hint { font-size: 0.7rem; color: var(--sub); }
.ev-more { font-family: var(--hand); font-size: 0.9rem; }
.ev-badge {
  position: absolute;
  top: -11px;
  left: -9px;
  z-index: 4;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
  padding: 2px 9px;
  transform: rotate(-3deg);
}
.ev-item.again .photo { box-shadow: 3px 3px 0 var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .ev-item.again .photo { animation: ev-pulse 2.6s ease-in-out infinite; }
  @keyframes ev-pulse {
    0%, 100% { box-shadow: 3px 3px 0 var(--tone); }
    50% { box-shadow: 3px 3px 0 var(--ink); }
  }
}

/* 写真を大きく見る小窓 */
/* 裏返せる写真 */
.flip { perspective: 1600px; }
.flip-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(.3,.7,.3,1);
}
.flip.on .flip-inner { transform: rotateY(180deg); }
.flip .face { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flip .face.back { position: absolute; inset: 0; transform: rotateY(180deg); }
.flip-btn { display: block; margin: 10px auto 2px; font-size: 0.82rem; padding: 6px 22px; }
.zoom-card { max-width: 640px; }
.zoom-photo { margin: 0 auto 14px; max-width: 520px; transform: none; }
.zoom-card .friend-line { margin: 0 0 14px; }
.hotspot {
  position: absolute;
  z-index: 3;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
}
.hotspot:hover, .hotspot:focus-visible {
  background: rgba(255,255,255,0.2);
  outline: 2.5px dashed var(--ink);
  outline-offset: -4px;
}
.zoom-note { font-size: 0.74rem; color: var(--sub); text-align: center; margin: 0 0 10px; }
.zoom-note.big-hint { margin: 8px 0 0; }
/* スマホの縦向きでは、広げても幅がほとんど変わらないので、案内は出さない（押せば広がる） */
@media (max-width: 600px) { .zoom-note.big-hint { display: none; } }
.can-big { cursor: zoom-in; }
.can-big:focus-visible { outline: 2.5px dashed var(--ink); outline-offset: 3px; }
/* 写真だけを画面いっぱいに（小窓より手前） */
.big-wrap {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15,15,15,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: zoom-out;
  animation: fade-in 0.2s ease;
}
.big-wrap:focus { outline: none; }
.big-wrap img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 70px);
  width: auto;
  height: auto;
  background: #fff;
}
.big-note { color: #d8d8d4; font-size: 0.78rem; margin: 12px 0 0; }
.pop-todo {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1.5px dashed #cfcfcb;
  font-size: 0.68rem;
  color: #777;
}

/* 小窓（聞いた話を、まとめて見せる） */
.pop-wrap {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20,20,20,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  animation: fade-in 0.22s ease;
}
.pop-card {
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 3.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.35);
  animation: pop-in 0.26s ease;
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}
.pop-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 2.5px solid var(--ink);
  background: var(--tone-l);
}
.pop-head .no {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  background: var(--ink);
  color: #fff;
  border-radius: 3px;
  padding: 0 9px;
  line-height: 1.9;
}
.pop-head h3 { font-size: 1.02rem; font-weight: 900; letter-spacing: 0.08em; }
.pop-body { padding: 16px 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pop-body .photo.wide { margin: 0 auto 16px; transform: none; max-width: 400px; }
.pop-body .friend-line { margin: 12px 0; }
.pop-body .quote {
  border-left: 4px solid var(--tone);
  background: #fbfbf8;
  padding: 10px 14px;
  margin: 12px 0 12px 50px;
  font-size: 0.9rem;
}
.pop-body .quote .who {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--sub);
  margin-bottom: 2px;
}
.pop-foot {
  padding: 12px 18px 16px;
  border-top: 2px dashed #cfcfcb;
  text-align: center;
}

@media (max-width: 560px) {
  .pop-wrap { padding: 12px 8px; }
  .pop-card { max-height: 92vh; }
  .pop-body { padding: 14px 12px 16px; }
  .pop-body .quote { margin-left: 0; }
}

/* 写真（画像が無いときの線画も同じ枠に入る） */
.photo {
  position: relative;
  background: #fff;
  border: 2.5px solid var(--ink);
  padding: 7px 7px 0;
  box-shadow: 3px 3px 0 var(--tone);
}
.photo .frame { position: relative; overflow: hidden; border: 1.5px solid var(--ink); background: var(--tone-l); }
.photo .frame > svg, .photo .frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  font-size: 0.68rem;
  color: var(--sub);
  line-height: 1.6;
  padding: 5px 2px 6px;
  letter-spacing: 0.04em;
}
.photo.clip::before {
  /* クリップ */
  content: "";
  position: absolute;
  top: -12px;
  left: 18px;
  width: 14px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: transparent;
  z-index: 2;
}
.photo.small { float: right; width: 170px; margin: 8px 0 4px 16px; transform: rotate(1.5deg); }
@media (max-width: 560px) { .photo.small { float: none; margin: 10px 0 4px auto; } }
.photo.wide { margin: 18px 0 8px; transform: rotate(-0.6deg); }

/* 画像が無いときの印 */
.photo figcaption .todo { display: block; color: #777; font-size: 0.62rem; }
.kari {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
  padding: 1px 6px;
  max-width: calc(100% - 12px);
}

/* 手書きのメモ（付箋） */
.memo {
  position: relative;
  font-family: var(--hand);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.9;
  background: #fff;
  border: 2px solid var(--ink);
  padding: 14px 18px 12px;
  margin: 18px auto 6px;
  max-width: 440px;
  box-shadow: 3px 3px 0 var(--tone);
}
.memo::before {
  /* マスキングテープ */
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 70px;
  height: 18px;
  margin-left: -35px;
  background: rgba(150,150,150,0.45);
  transform: rotate(-3deg);
}
.memo.tilt-l { transform: rotate(-1deg); }
.memo.big { font-size: 1.08rem; }
.memo .kw { font-family: inherit; }

/* ---------- 資料2：壁の写真と調査ノート ---------- */

.wallshot {
  position: relative;
  margin: 6px 0 20px;
  border: 2.5px solid var(--ink);
  background: #fff;
  padding: 7px;
  box-shadow: 3px 3px 0 var(--tone);
}
.wallshot svg, .wallshot img { display: block; width: 100%; height: auto; border: 1.5px solid var(--ink); }
.wallshot figcaption { font-size: 0.68rem; color: var(--sub); padding-top: 5px; }

.note-lead { font-size: 0.9rem; margin-bottom: 8px; }

.notebook {
  border: 2.5px solid var(--ink);
  border-radius: 3px 3px 10px 10px;
  background:
    linear-gradient(90deg, transparent 38px, rgba(0,0,0,0.12) 38px, rgba(0,0,0,0.12) 40px, transparent 40px),
    repeating-linear-gradient(180deg, #fff 0 31px, #dcdcd8 31px 32px);
  padding: 8px 0 4px;
}

.nb-page {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 16px 18px 16px 52px;
  border-bottom: 2px dashed #bdbdb8;
}
.nb-page:last-child { border-bottom: none; }

.nb-sym {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 2px solid var(--ink);
}
.nb-sym svg { display: block; width: 100%; height: 100%; }

.nb-notes { font-family: var(--hand); font-weight: 600; font-size: 1rem; line-height: 2; }
.nb-notes p + p { margin-top: 4px; }
.nb-notes .side {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.86rem;
  color: #444;
  border-bottom: 2px solid var(--ink);
  transform: rotate(-1.5deg);
}
.nb-notes .side::before { content: "←  "; }


@media (max-width: 560px) {
  .notebook {
    background:
      linear-gradient(90deg, transparent 20px, rgba(0,0,0,0.12) 20px, rgba(0,0,0,0.12) 22px, transparent 22px),
      repeating-linear-gradient(180deg, #fff 0 31px, #dcdcd8 31px 32px);
  }
  .nb-page { grid-template-columns: 78px 1fr; gap: 10px; padding: 16px 10px 14px 30px; }
  .nb-notes { font-size: 0.9rem; line-height: 1.85; }
  .nb-notes .side { font-size: 0.8rem; }
}

/* 見つけた、の入口 */
.found-box {
  margin: 22px 0 4px;
  text-align: center;
  border: 2.5px dashed var(--ink);
  border-radius: 10px;
  padding: 16px 14px 18px;
  background: #fff;
}
.found-box p { font-size: 0.8rem; color: var(--sub); margin-bottom: 10px; }
.found-box .manga-link { margin-bottom: 14px; }
.found-box .manga-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 18px;
}
.found-box .manga-link a:hover { background: var(--tone-l); }

/* 第〇話の照合 */
.ep-form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-weight: 900;
}
.ep-form .ttl { font-size: 0.8rem; letter-spacing: 0.04em; width: 100%; }
.ep-form input {
  width: 4.6em;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
  padding: 6px 8px;
  border: var(--line-w) solid var(--ink);
  border-radius: 8px;
  outline: none;
}
.ep-form input:focus { box-shadow: 0 0 0 4px var(--tone-l); }

.ep-ask { font-family: var(--hand); font-weight: 600; font-size: 1.05rem !important; color: var(--ink) !important; margin-bottom: 6px !important; }
.ep-msg { min-height: 1.9em; font-size: 0.82rem; margin-top: 8px; color: var(--ink); font-weight: 700; }

/* ---------- 記号をはめる ---------- */

.puzzle {
  margin-top: 22px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  padding: 18px 16px 20px;
  animation: appear 0.35s ease;
}
.puzzle h4 { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.08em; margin-bottom: 4px; }
.puzzle .how { font-size: 0.8rem; color: var(--sub); margin-bottom: 14px; }
.puzzle .how.hand { font-family: var(--hand); font-weight: 600; font-size: 1rem; color: var(--ink); min-height: 1.9em; }

/* 壁（ここに式を組み直す） */
.slot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  background:
    radial-gradient(rgba(0,0,0,0.10) 1px, transparent 1.4px) 0 0 / 5px 5px,
    var(--tone);
  border: 2.5px solid var(--ink);
  border-radius: 4px;
}
.slot {
  position: relative;
  width: 74px;
  height: 74px;
  flex-shrink: 1;
  min-width: 0;
  border: 2.5px dashed rgba(29,29,29,0.55);
  border-radius: 6px;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 6px;
  font-family: inherit;
}
.slot svg { display: block; width: 100%; height: 100%; }
.slot.filled { border-style: solid; border-color: var(--ink); background: rgba(255,255,255,0.7); }
.slot.ready { background: rgba(255,255,255,0.85); box-shadow: 0 0 0 3px #fff; }
.slot.ok::after {
  content: "";
  position: absolute;
  right: -7px;
  top: -7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px #fff;
}

.shake { animation: shake 0.42s ease; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.pool {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.tile {
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
  box-shadow: 0 3px 0 var(--tone);
  transition: transform 0.08s;
}
.tile svg { display: block; width: 100%; height: 100%; max-width: 100%; }
.tile:hover { background: var(--tone-l); }
.tile.sel { background: var(--ink); transform: translateY(2px); box-shadow: 0 1px 0 var(--tone); }
.tile.sel svg { stroke: #fff; }
.tile.used { opacity: 0.22; cursor: default; box-shadow: none; }
.tile.used:hover { background: #fff; }

.puzzle-msg { min-height: 2em; text-align: center; font-size: 0.84rem; font-weight: 700; margin-top: 12px; }

@media (max-width: 560px) {
  .slot-row { gap: 4px; padding: 12px 6px; }
  .slot { width: 58px; height: 58px; padding: 4px; }
  .pool { gap: 7px; }
  .tile { padding: 5px; }
}

/* 重なっていく図 */
.fig-stage {
  margin: 18px auto 0;
  max-width: 460px;
}
.fig-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig-stage .sym-g { transition: transform 1.5s cubic-bezier(.55,.05,.3,1); }

/* 最後の問い */
.ask {
  margin-top: 16px;
  text-align: center;
  animation: appear 0.4s ease;
}
.ask .q { font-size: 1.05rem; font-weight: 900; letter-spacing: 0.06em; margin-bottom: 10px; }
.ask form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.ask input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 16px;
  border: var(--line-w) solid var(--ink);
  border-radius: 999px;
  outline: none;
}
.ask input:focus { box-shadow: 0 0 0 4px var(--tone-l); }

/* 答えたときの友人の返事（入力欄のすぐ下） */
.ask-reply {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 440px;
  margin: 16px auto 0;
  text-align: left;
}
.ask-reply[hidden] { display: none; }
.ask-reply .ar-face { flex-shrink: 0; width: 44px; }
.ask-reply .ar-face svg { display: block; width: 100%; height: auto; }
.ask-reply .ar-say {
  position: relative;
  flex: 1;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.8;
}
.ask-reply .ar-say::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 12px;
  border-style: solid;
  border-width: 7px 12px 7px 0;
  border-color: transparent var(--ink) transparent transparent;
}
.ask-reply.pop .ar-say { animation: pop 0.28s ease; }

/* ---------- 浮いているボタン・フッター ---------- */

.guide-btn {
  position: fixed;
  right: 18px;
  bottom: 72px;
  z-index: 30;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 8px 18px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.guide-btn:hover { background: var(--tone-l); }

/* 一杯おごる（右下。行き詰まったときのヒント） */
.drink-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 7px 18px 7px 14px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.2);
  cursor: pointer;
}
.drink-btn:hover { background: #3a3a3a; }
.drink-btn svg { display: block; }
.drink-n {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0 7px;
  line-height: 1.6;
}


/* おごった小窓のグラス。酒が減っていく */
.drink-glass { display: block; width: 84px; margin: 2px auto 10px; }
.drink-glass .drain { transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  .drink-glass .drain { animation: drain 1.6s ease-in-out 0.5s forwards; }
  @keyframes drain { to { transform: translateY(34px); } }
}

.drink-warn {
  margin: 4px 0 2px 50px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
  border: 2px dashed var(--ink);
  border-radius: 6px;
  padding: 5px 10px;
  display: inline-block;
}

/* 友人の顔の赤み（何杯か飲むと出る） */
.blush { opacity: 0; transition: opacity 0.8s ease; }
body.tipsy .blush { opacity: 1; }

.sound-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 30;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.sound-btn:hover { background: var(--tone-l); }
.sound-btn svg { display: block; }
.sound-btn .snd-off { display: none; }
.sound-btn.muted .snd-on { display: none; }
.sound-btn.muted .snd-off { display: block; }
.sound-btn.muted { background: #efefec; }

.kb-foot {
  margin-top: 40px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--sub);
  line-height: 2;
}
.kb-foot .credit { display: block; margin-top: 10px; font-size: 0.7rem; letter-spacing: 0.04em; }
.kb-foot a { color: var(--sub); text-underline-offset: 2px; }
.kb-foot .again {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sub);
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.kb-foot .wall-line { display: block; margin: 0 auto 12px; max-width: 320px; }

@media (max-width: 600px) {
  .kb-title { font-size: 1.4rem; letter-spacing: 0.08em; }
  .friend-bar { padding: 16px 14px 14px; gap: 12px; }
  .friend-face { width: 54px; }
  .bubble { font-size: 0.88rem; padding: 10px 14px; border-radius: 20px; }
  .kb-search { padding: 14px; gap: 8px; }
  .kb-search .btn { padding: 10px 16px; }
  .wrap { padding-left: 10px; padding-right: 10px; }
  .index-sec { padding-left: 12px; padding-right: 12px; }
  .file-view { padding: 4px 8px 20px; }
  .doc-head { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .doc-body { padding: 14px 12px 20px; }
  .memo { padding: 12px 14px 10px; }
  .puzzle { padding: 14px 10px 16px; }
  .guide-btn { right: 12px; bottom: 62px; font-size: 0.72rem; padding: 7px 14px; }
  .sound-btn { left: 12px; bottom: 12px; width: 46px; height: 46px; }
}

/* ============================================
   導入（ニュース → 夜のバー）と、終幕
   ============================================ */

.scene {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--night-d);
  color: #fff;
  animation: fade-in 0.8s ease;
  outline: none;
}
.scene.out { animation: fade-out 0.7s ease forwards; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }

.scene .skip {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 5;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ddd;
  background: transparent;
  border: 2px solid #888;
  border-radius: 999px;
  padding: 2px 14px;
  cursor: pointer;
}
.scene .skip:hover { color: #fff; border-color: #fff; }

.scene .tap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: 0.74rem;
  color: #bbb;
  letter-spacing: 0.2em;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.scene .tap.show { opacity: 1; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* ニュースの切り抜き */
.news {
  width: min(460px, calc(100vw - 32px));
  background: #f4f2ea;
  color: var(--ink);
  font-family: "Zen Old Mincho", "Yu Mincho", serif;
  padding: 20px 22px 22px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.35);
  transform: rotate(-1.4deg);
  animation: news-in 0.9s ease;
}
@keyframes news-in { from { opacity: 0; transform: rotate(-4deg) translateY(20px); } }
.news .paper {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  border-bottom: 3px double var(--ink);
  padding-bottom: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}
.news .paper b { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.14em; }
.news h2 { font-size: 1.35rem; font-weight: 900; line-height: 1.5; letter-spacing: 0.04em; margin-bottom: 8px; }
.news p { font-size: 0.86rem; line-height: 1.95; text-indent: 1em; }

/* バーの場面 */
.bar {
  position: relative;
  width: min(760px, 100vw);
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}
.bar-art {
  position: absolute;
  inset: 0;
}
.bar-art { background: #7b7b7b; }
.bar-art img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 48%; }

/* 吹き出しは下寄せ（上の看板にかぶらないように。絵の看板は上から2〜4割のところにある） */
.bar-talk {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 60px 16px 96px;
}

/* 縦書きの吹き出し（原作と同じ） */
.v-bubble {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 50% / 34%;
  padding: 36px 26px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.75;
  white-space: pre-line;
  max-height: 64vh;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.35);
  animation: pop 0.28s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(0.92); } }

.bar-go {
  position: relative;
  z-index: 3;
  text-align: center;
  padding-bottom: 54px;
}
.bar-go .btn { background: #fff; color: var(--ink); border-color: #fff; }
.bar-go .btn:hover { background: var(--tone-l); }

@media (max-width: 600px) {
  .v-bubble { font-size: 1rem; padding: 28px 20px; }
}

/* ---------- 終幕 ---------- */

.finale .stage {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
/* 文字の枠は高さを固定。台詞の長さが変わっても、上の絵は動かない */
.finale .line-box {
  width: 100%;
  height: 8.6em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.finale .fig-card {
  width: min(360px, 74vw, 46vh);
  background: #fff;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 rgba(0,0,0,0.4);
}
.finale .fig-card svg { display: block; width: 100%; height: auto; }
.map-layer { opacity: 0; transition: opacity 2.2s ease; }
.map-layer.on { opacity: 1; }

.finale .line {
  min-height: 5.2em;
  max-width: 520px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 2;
  white-space: pre-line;
  padding: 0 8px;
}
.finale .line.say {
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 26px;
  padding: 12px 22px;
  min-height: 0;
  animation: pop 0.28s ease;
}
.finale .line.wind {
  font-family: var(--hand);
  font-size: 2rem;
  letter-spacing: 0.3em;
  color: #eee;
  animation: wind 3.4s ease forwards;
}
@keyframes wind {
  0% { opacity: 0; transform: translateX(-40px); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(60px); }
}

/* 記録の書き換え */
.rec-card {
  width: min(420px, calc(100vw - 40px));
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 16px 20px 18px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.4);
  animation: pop 0.3s ease;
}
.rec-card .rc-head { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.14em; color: var(--sub); border-bottom: 2px solid var(--ink); padding-bottom: 4px; margin-bottom: 12px; }
.rec-card .from { font-size: 1rem; font-weight: 700; position: relative; display: inline-block; }
.rec-card .from::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 52%;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s ease;
}
.rec-card.strike .from::after { transform: scaleX(1); }
.rec-card .arrow { font-size: 1rem; margin: 4px 0 2px 1em; opacity: 0; transition: opacity 0.4s; }
.rec-card .to {
  font-family: var(--hand);
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.6s;
}
.rec-card .note { font-family: var(--hand); font-size: 0.9rem; opacity: 0; transition: opacity 0.6s 0.5s; margin-top: 12px; }
.rec-card { position: relative; }
/* 書き足した一文を、ペンでぐるっと囲む（判子は使わない：友人の手帳なので） */
.rec-card .to { position: relative; display: inline-block; padding: 4px 14px; }
.rec-card .pen-ring {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}
.rec-card .pen-ring path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rec-card.write .arrow, .rec-card.write .to, .rec-card.write .note { opacity: 1; }

/* 記号が重なったあとの友人のセリフ（図のすぐ下） */
.fig-talk { max-width: 520px; margin: 6px auto 0; text-align: left; }
.fig-talk .friend-line { margin: 8px 0; }

/* マンガを4コマずつめくって読む（導入・終幕・読み返し） */
.reader {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  text-align: center;
  outline: none;
  cursor: pointer;
  animation: fade-in 0.8s ease;
}
.rd-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 12px 8px;
  background: linear-gradient(var(--night-d) 70%, transparent);
}
.rd-prev {
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ddd;
  background: transparent;
  border: 2px solid #888;
  border-radius: 999px;
  padding: 2px 14px;
  cursor: pointer;
}
.rd-prev:disabled { opacity: 0; pointer-events: none; }
.rd-count { font-size: 0.74rem; color: #bbb; letter-spacing: 0.12em; margin-right: 72px; }
.rd-view { padding: 4px 12px 0; }
.rd-img, .rd-missing {
  display: block;
  width: 100%;
  /* 4コマ1枚が画面の約1.7倍の長さに収まる幅（＝1枚を2回のタップで読み切れる） */
  max-width: min(560px, 58vh);
  height: auto;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,0.4);
  animation: fade-in 0.45s ease;
}
/* 大ゴマは画面いっぱいに（横にも縦にも収める） */
.rd-img.full, .rd-missing.full {
  width: auto;
  max-width: min(100%, 1000px);
  max-height: calc(100vh - 160px);
}
/* 余った1ページ（上下2コマ）は、1回のタップで全体が見えるように縦横に収める */
.rd-img.page, .rd-missing.page {
  width: auto;
  max-width: min(100%, 560px);
  max-height: calc(100vh - 160px);
}
.reader.is-full .rd-view { min-height: calc(100vh - 130px); display: flex; align-items: center; justify-content: center; }
.reader.is-full .rd-foot { padding: 6px 0 10px; }
.rd-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sub);
  font-size: 0.8rem;
  border: 3px solid var(--ink);
}
.rd-foot { padding: 12px 0 22px; }
.rd-foot [hidden] { display: none !important; }   /* .btn の表示指定より優先して隠す */
.rd-hint { font-size: 0.74rem; color: #bbb; letter-spacing: 0.14em; animation: blink 1.6s ease-in-out infinite; }
.rd-foot .btn.nudge { animation: shake 0.4s ease; }
@media (max-width: 760px) {
  .rd-view { padding: 4px 8px 0; }
}
.scene .skip { z-index: 5; }

/* 書き下ろしマンガ（マンガが無いときの代わりの枠） */
.finale .manga {
  max-height: calc(100vh - 90px);
  max-width: calc(100vw - 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.finale .manga img,
.finale .manga .ph {
  display: block;
  max-height: calc(100vh - 90px);
  max-width: calc(100vw - 24px);
  animation: fade-in 0.8s ease;
}
.finale .manga .ph {
  height: calc(100vh - 110px);
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
}
.finale .manga .ph .big { font-size: 1.1rem; font-weight: 900; letter-spacing: 0.1em; }
.finale .manga .ph .small { font-size: 0.78rem; color: var(--sub); }
.finale .manga .ph .panels {
  width: 70%;
  display: grid;
  grid-template-rows: 1fr 1.4fr 1fr;
  gap: 8px;
  flex: 1;
  max-height: 60%;
}
.finale .manga .ph .panels span { border: 2.5px solid var(--ink); background: var(--tone-l); }

/* 「動きを減らす」設定（iPhone の「視差効果を減らす」など）のとき。
   移動・拡大・揺れは止めて「ふわっと出る」に置き換える。暗転などの明るさの変化はそのまま残す。
   点滅はさせずに表示したまま。読む時間（セリフの間隔など）は縮めない（app.js も同じ）。
   ※ 全部の動きを0.01秒にすると、点滅がちらつき、演出も消えてしまう */
@media (prefers-reduced-motion: reduce) {
  @keyframes tab-in { 0% { background: var(--ink); color: #fff; } }
  @keyframes appear { from { opacity: 0; } to { opacity: 1; } }
  @keyframes lead-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes pop-in { from { opacity: 0; } }
  @keyframes news-in { from { opacity: 0; } }
  @keyframes pop { from { opacity: 0; } }
  @keyframes shake { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
  @keyframes wind { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
  .scene .tap.show, .rd-hint { animation: none; }
  .fig-stage .sym-g, .flip-inner { transition: none; }
}

/* 友人の顔（ミヤギ先生の絵）。丸く切り抜いて、酔ったときの赤みは絵の上に重ねる */
.face-img { position: relative; display: block; }
.face-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: #fff;
  box-sizing: border-box;
}
.face-img svg.blush { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
