/* ===== 二体目 固有のスタイル（style.css の後に読み込む） ===== */
:root { --accent: #b3263a; --moon: #cfd8ea; }
body { background: #04060b; }
.scene-photo { position: absolute; inset: 0; background: center / cover no-repeat; transition: transform 3.5s cubic-bezier(.2, .6, .2, 1); }
#stage.fx-zoom #bg .bg-layer:last-child .scene-photo { transform: scale(2.4); }
.scene-photo.night::after, .scene-photo.moonlit::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(40, 60, 110, 0) 30%, rgba(5, 8, 20, .55)); }
.scene-photo.dusty::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .55)); }
.scene-photo.vhs { filter: saturate(.75) contrast(1.05) blur(.4px); }
.scene-photo.vhs::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); }

/* 着信画面は nitaime-call.css */
.photo-bubble img { width: 100%; display: block; border-radius: 12px; }

/* タイトル */
.t-pre { font-family: var(--gothic); letter-spacing: .3em; font-size: 13px; color: #9aa4b8; margin: 0 0 8px; }
.t-main { letter-spacing: .25em; }
.t-sub { font-size: clamp(14px, 1.8vw, 20px); letter-spacing: .25em; color: var(--moon); }
.title-note { line-height: 1.8; }

/* 資料 */
.thread { background: #f4f4f1; font-family: var(--gothic); color: #222; }
.thread-title { font-weight: 700; color: #0b5c9e; border-bottom: 1px solid #ccc; padding-bottom: 8px; margin-bottom: 10px; }
.res { margin: 0 0 12px; font-size: 14px; }
.res b { color: #2a7a2a; margin-right: 6px; }
.res p { margin: 4px 0 0 1.2em; line-height: 1.6; }
.res.ghost p { font-family: var(--mincho); color: #555; letter-spacing: .15em; }
.nodate { font-size: 11px; color: #999; margin-left: 1.2em; }
.broadcast { background: #111; color: #ddd; }
.crt { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: #000; }
.crt img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) contrast(1.1) blur(.5px); }
.crt::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .6)); }
.telop { position: absolute; left: 4%; right: 4%; bottom: 8%; background: rgba(0, 0, 60, .75); color: #fff; font-family: var(--gothic); font-weight: 700; padding: 6px 10px; font-size: clamp(13px, 2.4vw, 18px); z-index: 1; }
.live { position: absolute; right: 4%; top: 5%; background: #c00; color: #fff; font-family: var(--gothic); font-size: 13px; padding: 2px 8px; z-index: 1; }
.broadcast .caption { font-size: 13px; color: #999; margin: 10px 0 4px; }
.broadcast .voice { line-height: 1.9; }
.broadcast .cut { color: #888; font-size: 13px; }
.record { background: #efe9d9; }
.record table { width: 100%; border-collapse: collapse; font-size: 16px; }
.record th, .record td { border: 1px solid #a89c80; padding: 8px 10px; text-align: left; vertical-align: top; }
.record th { width: 5em; background: #e2d8bf; }
.red { color: var(--accent); font-weight: 700; }
.hand { font-family: "Klee One", var(--mincho); color: #1b2a6b; line-height: 1.9; }
.memo { max-width: 360px; margin: 0 auto; background: #fbf8ef repeating-linear-gradient(transparent 0 31px, #c9d6e8 31px 32px); padding: 26px 26px 30px; transform: rotate(-1.5deg); }
.pencil { font-family: "Klee One", var(--mincho); color: #555; font-size: 24px; letter-spacing: .2em; line-height: 2; margin: 0 0 14px; }
.pencil.small { font-size: 17px; color: #777; }
.note p { margin: 0 0 10px; }
.stitch { font-size: 34px; color: var(--accent); letter-spacing: .5em; text-align: center; font-family: "Klee One", var(--mincho); }
.crayon { font-family: "Klee One", var(--mincho); font-size: 26px; color: #c8641e; text-align: center; line-height: 1.6; }
.crayon span { display: block; font-size: 18px; color: #6d3fa0; }
.receipt { background: #f3ecd8; border: 1px solid #b5a57e; }
.receipt .head { text-align: center; font-weight: 700; letter-spacing: .5em; border-bottom: 2px double #8a7a55; padding-bottom: 6px; }
.receipt .org { text-align: right; font-size: 14px; color: #555; }

/* 謎1：動画サイト */
.otube { display: flex; align-items: center; gap: 14px; padding: 8px 4px 12px; font-family: var(--gothic); }
.otube-logo { font-weight: 700; font-size: 20px; color: #ddd; }
.otube-logo b { background: var(--accent); color: #fff; padding: 0 5px; border-radius: 4px; margin-left: 2px; }
.otube-search { flex: 1; background: #222; border: 1px solid #444; border-radius: 999px; padding: 6px 14px; color: #bbb; font-size: 14px; }
.vplayer { background: #000; border-radius: 8px; overflow: hidden; }
.vscreen { position: relative; aspect-ratio: 4 / 3; max-height: 46vh; margin: 0 auto; background: #000; overflow: hidden; }
.vscreen::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px); }
.vimg { position: absolute; inset: 0; background: center / cover no-repeat; filter: saturate(.6) contrast(1.1) blur(.6px) sepia(.2); }
.vsub, .vtext { position: absolute; color: #f2f2f2; font-family: var(--mincho); text-align: center; z-index: 2; }
.vsub { left: 0; right: 0; bottom: 10%; font-size: clamp(15px, 3vw, 22px); text-shadow: 0 0 6px #000; }
.vtext { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: clamp(14px, min(3.6vw, 5.5vh), 28px); letter-spacing: .15em; }
.vtel { margin-top: 18px; font-family: var(--gothic); font-size: clamp(22px, 5vw, 40px); letter-spacing: .2em; }
.vhidden { position: absolute; inset: 0; background: #f3f0e6; color: #222; display: flex; align-items: center; justify-content: center; text-align: center; font-family: "Klee One", var(--mincho); font-size: clamp(18px, min(5vw, 7.5vh), 44px); letter-spacing: .2em; line-height: 1.7; }
.vblack { position: absolute; inset: 0; background: #000; }
.vctrl { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #111; }
.vctrl button { background: #2a2a2a; color: #eee; border: 1px solid #444; border-radius: 6px; padding: 6px 10px; font-family: var(--gothic); min-width: 42px; }
.vseek { flex: 1; min-width: 60px; accent-color: var(--accent); }
.vtime { font-family: monospace; font-size: 13px; color: #bbb; min-width: 4.5em; text-align: right; }
.pz .vtitle { font-family: var(--gothic); font-size: 17px; margin: 12px 0 2px; letter-spacing: 0; }
.vmeta { font-size: 12px; color: #999; margin: 0 0 10px; }
.comments p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: #ccc; }
.comments b { display: block; font-size: 12px; color: #8ab; }

/* 謎2：地図 */
.map-wrap { display: grid; grid-template-columns: 1fr 15em; gap: 12px; align-items: start; }
.kmap { width: 100%; height: auto; display: block; border-radius: 8px; }
.kmap text { font-family: var(--gothic); font-size: 24px; fill: #333; paint-order: stroke; stroke: #e9e6dc; stroke-width: 4px; }
.kmap .area { font-size: 30px; fill: #7a7466; font-weight: 700; letter-spacing: 4px; }
.kmap .home { font-size: 18px; fill: #c0392b; font-weight: 700; }
.kmap .pin { cursor: pointer; outline: none; }
.kmap .pin:hover circle:nth-child(2), .kmap .pin:focus circle:nth-child(2) { fill: #ffe9a8; }
.kmap .pin.on circle:nth-child(2) { fill: #c0392b; stroke: #fff; }
.kmap .pin .num { fill: #fff; stroke: none; font-size: 17px; font-weight: 700; }
.calllog { list-style: none; margin: 0; padding: 12px 14px; background: #1e2028; border-radius: 8px; font-size: 14px; line-height: 2; color: #ddd; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button { padding: 10px 18px; background: #f3eddb; color: #2a2620; border: 2px solid transparent; font-family: var(--mincho); font-size: 17px; border-radius: 6px; }

/* 謎3：記録 */
.rec { width: 100%; border-collapse: collapse; font-size: 14px; background: #efe9d9; color: #2a2620; }
.rec th, .rec td { border: 1px solid #a89c80; padding: 6px 8px; }
.rec th { background: #e2d8bf; }
.rec tr.dim td { color: #999; }
.pz-record { overflow-x: auto; }

/* 謎4：部屋 */
.room-wrap { position: relative; border-radius: 8px; overflow: hidden; }
.room-wrap img { width: 100%; display: block; }
.pz .spot, .spot { position: absolute; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50% !important; border: 2px solid rgba(255, 240, 200, .9); background: rgba(255, 240, 200, .18); animation: spotPulse 1.8s infinite; cursor: pointer; padding: 0; }
.spot span { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--gothic); font-size: 12px; color: #fff; background: rgba(0, 0, 0, .65); padding: 2px 8px; border-radius: 999px; }
.spot.up span { top: auto; bottom: 58px; }
.spot.seen { animation: none; border-color: rgba(255, 255, 255, .4); background: rgba(0, 0, 0, .3); }
@keyframes spotPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 240, 200, .6); } 70% { box-shadow: 0 0 0 16px rgba(255, 240, 200, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 240, 200, 0); } }
.room-doc { margin-top: 12px; min-height: 2em; }
.room-doc .paper { padding: 16px 20px; }
.room-q label { display: block; margin: 8px 0; font-family: var(--gothic); }
.room-q select { font: inherit; padding: 6px 10px; margin-left: 6px; }
.room-q .check, .pz-record .final-form button { padding: 9px 22px; background: var(--ink); color: #111; border: none; border-radius: 6px; font-family: var(--gothic); font-weight: 700; margin-top: 6px; }

/* 最終 */
.callbox { display: inline-block; font-family: var(--gothic); background: #141822; border: 1px solid #3a4152; border-radius: 999px; padding: 6px 18px; color: #bbb; margin-bottom: 14px; }
.callbox b { color: #fff; letter-spacing: .1em; }

@media (max-width: 760px) {
  .map-wrap { grid-template-columns: 1fr; }
  .spot { width: 44px; height: 44px; }
  .spot span { top: 46px; font-size: 11px; }
  .spot.up span { top: auto; bottom: 46px; }
  .kmap text { font-size: 30px; }
  .kmap .pin .num { font-size: 20px; }
  /* 未返却記録：細い列の表をやめ、一件ずつの記録カードにする */
  .rec, .rec tbody { display: block; }
  .rec tr:first-child { display: none; }
  .rec tr { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 10px 12px; border-bottom: 1px solid #a89c80; }
  .rec td { border: none; padding: 0; font-size: 13px; }
  .rec td[data-l]::before { content: attr(data-l) "："; color: #8a7d62; font-size: 11px; }
  .rec .r-no { width: 100%; font-weight: 700; font-size: 15px; }
  .rec .r-note { width: 100%; }
}
@media (max-height: 500px) {
}

/* 横向きスマホ：写真や動画が画面の高さに収まる大きさに */
@media (max-height: 500px) {
  .room-wrap { max-width: calc((100vh - 150px) * 1.5); margin: 0 auto; }
}
