/* オープニングのスタイルが style.css にあった頃、その .ph の指定がこのページにも当たっていた（intro.css へ移したあとも見た目を変えないよう、その分を残す） */
.ph { position: relative; width: min(88%, 300px); height: 118%; margin: 14px auto 0; border-radius: 42px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 0 7px var(--bg-2), 0 0 0 8px var(--line), 0 40px 70px -40px rgba(0, 0, 0, .35); font-family: var(--font-body); font-weight: 400; text-align: left; line-height: 1.5; letter-spacing: .02em; }
.sim { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
/* タブレットの縦向きから、金額を電話の横に並べ、増えていく残高を同時に見られるようにする */
@media (min-width: 760px) { .sim { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 40px; } }
@media (min-width: 900px) { .sim { grid-template-columns: 420px 1fr; gap: 64px; } }
.phone { background: #1b1b1b; border-radius: 36px; padding: 12px; max-width: 420px; width: 100%; margin: 0 auto; }
.ph { background: #b9cde4; border-radius: 26px; height: clamp(420px, calc(100vh - 112px), 640px); height: clamp(420px, calc(100svh - 112px), 640px); display: flex; flex-direction: column; overflow: hidden; }
.ph-top { background: #24324a; color: #fff; padding: 12px 16px; font-size: .86rem; font-weight: 700; line-height: 1.6; flex: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ph-top small { font-weight: 400; opacity: .8; font-size: .8rem; white-space: nowrap; }
.mini { display: none; flex: none; flex-wrap: nowrap; justify-content: space-between; gap: 0 12px; padding: 4px 14px; background: #1b2638; color: #c9d3e3; font-size: .75rem; line-height: 1.8; }
.mini span { white-space: nowrap; }
.mini b { font-family: var(--mono); font-weight: 400; }
.mini span:first-child b { color: #ff8f7e; } .mini span:last-child b { color: #7fe0b0; }
@media (max-width: 759px) { .mini { display: flex; } }
/* 実機のスマートフォンでは、端末の枠を省き、画面の幅と高さいっぱいに表示する */
@media (max-width: 600px) {
  .sim > .phone { width: auto; max-width: none; margin: 0 -8px; padding: 0; background: none; border-radius: 22px; box-shadow: 0 0 0 1px rgba(128, 128, 128, .3), 0 24px 48px -32px rgba(0, 0, 0, .45); }
  .ph { border-radius: 22px; height: clamp(420px, calc(100vh - 88px), 640px); height: clamp(420px, calc(100svh - 88px), 640px); }
  .log { padding: 12px 10px; }
  .msg { max-width: 88%; }
  .mini { padding: 4px 12px; }
}
/* 金額が7桁になっても1行に収め、会話の欄が途中で縮まないようにする */
@media (max-width: 360px) { .mini { gap: 0 8px; padding-inline: 10px; letter-spacing: 0; } }
/* 横向きのスマートフォンでは高さが足りないため、画面を横に広げる */
@media (orientation: landscape) and (max-height: 560px) {
  .sim > .phone { max-width: 620px; padding: 6px; border-radius: 30px; }
  .ph { border-radius: 24px; height: max(240px, calc(100vh - 92px)); height: max(240px, calc(100svh - 92px)); }
}
.log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 82%; animation: rise .3s ease both; position: relative; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.msg .who { font-size: .75rem; color: #3d4c63; margin: 0 0 2px 4px; }
.msg .bub { background: #fff; color: #1b1b1b; border-radius: 4px 16px 16px 16px; padding: 9px 12px; font-size: .86rem; line-height: 1.7; }
.msg.me { align-self: flex-end; }
.msg.me .bub { background: #8de07d; border-radius: 16px 4px 16px 16px; }
.msg.sys { align-self: center; max-width: 92%; }
.msg.sys .bub { background: rgba(36, 50, 74, .55); color: #fff; font-size: .78rem; border-radius: 99px; padding: 4px 14px; }
.msg .shot { margin-top: 6px; background: #f3f6f2; border-radius: 8px; padding: 8px; font-family: var(--mono); font-size: .75rem; color: #1e7a5a; }
.msg .shot svg { width: 100%; height: 40px; display: block; }
.ad { background: #fff; border-radius: 12px; overflow: hidden; font-size: .84rem; color: #1b1b1b; }
.ad .im { height: 110px; background: linear-gradient(135deg, #1f3b63, #b7791f); color: #fff; display: flex; align-items: flex-end; padding: 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.ad .tx { padding: 10px 12px; }
.ad .sp { font-size: .75rem; color: #666; }
.typing .bub { color: #888; letter-spacing: .2em; animation: typing 1s ease-in-out infinite; }
@keyframes typing { 50% { color: #c4c4c4; } }
@media (prefers-reduced-motion: reduce) { .msg, .replies button, .typing .bub { animation: none; } }
.flag-mark { display: none; margin-top: 4px; font-size: .75rem; color: #fff; background: #c0392b; border-radius: 4px; padding: 2px 8px; width: fit-content; }
.reveal-flags .msg[data-flag] .bub { box-shadow: 0 0 0 2px #c0392b; }
.reveal-flags .msg[data-flag] .flag-mark { display: block; }
.replies { flex: none; padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; background: #eef2f7; min-height: 64px; }
.replies button { appearance: none; min-height: 44px; border: 1px solid #24324a; background: #fff; color: #24324a; border-radius: 99px; padding: 8px 16px; font: inherit; font-size: .86rem; line-height: 1.6; cursor: pointer; touch-action: manipulation; animation: rise .3s ease both; }
@media (hover: hover) { .replies button:hover { background: #24324a; color: #fff; } }
@media (hover: none) { .replies button:active { background: #dfe6f0; } }
/* 電話の画面はどちらのテーマでも明るい色のため、フォーカスの枠は固定の濃い赤にする */
.replies:focus { outline: none; }
.replies:focus-visible { outline: 2px solid #c03a22; outline-offset: -4px; border-radius: 0 0 26px 26px; }
.replies button:focus-visible { outline-color: #c03a22; }
.money { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.money > div { background: var(--surface); padding: 24px; }
.money .k { font-size: .82rem; color: var(--ink-3); }
.money .v { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.3; font-variant-numeric: tabular-nums; }
.money .paid .v { color: var(--danger); }
.money .fake .v { color: var(--ok); }
.money .fake .note2 { font-size: .78rem; color: var(--ink-3); }
.result { margin-top: 32px; }
.result .big { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.5; margin-bottom: 12px; }
.result.good .big { color: var(--ok); }
.result.bad .big { color: var(--danger); }
/* 結末に、会話に出てきた詐欺のサインを並べる。まだ見ていないサインは伏せておく */
.sg-head { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 10px; font-size: .86rem; color: var(--ink-2); }
.sg-head b { font-family: var(--mono); font-weight: 400; color: var(--danger); }
.sgs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sgs li { margin: 0; }
.sg { appearance: none; display: inline-flex; align-items: center; min-height: 36px; border: 1px solid transparent; border-radius: 6px; padding: 4px 12px; font: inherit; font-size: .82rem; line-height: 1.5; }
button.sg { background: #c0392b; color: #fff; cursor: pointer; touch-action: manipulation; animation: rise .3s ease both; }
@media (hover: hover) { button.sg:hover { background: #a32e22; } }
button.sg:active { transform: scale(.97); }
.sg.past { border-color: var(--danger); color: var(--danger); background: transparent; }
.sg.unk { min-width: 64px; justify-content: center; border: 1px dashed var(--line); color: var(--ink-3); background: transparent; font-family: var(--mono); }
@media (pointer: coarse) { .sg { min-height: 44px; } }
.sgs li:nth-child(2) .sg { animation-delay: .05s; } .sgs li:nth-child(3) .sg { animation-delay: .1s; } .sgs li:nth-child(4) .sg { animation-delay: .15s; } .sgs li:nth-child(5) .sg { animation-delay: .2s; } .sgs li:nth-child(6) .sg { animation-delay: .25s; } .sgs li:nth-child(7) .sg { animation-delay: .3s; } .sgs li:nth-child(8) .sg { animation-delay: .35s; } .sgs li:nth-child(9) .sg { animation-delay: .4s; }
/* サインを押すと、会話の中の該当する発言を光らせる */
.msg.flash .bub { animation: flash 1.4s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px #c0392b, 0 0 0 10px rgba(192, 57, 43, .3); } }
.result .btns { margin-top: 24px; }
@media (prefers-reduced-motion: reduce) { button.sg, .msg.flash .bub { animation: none; } .msg.flash .bub { box-shadow: 0 0 0 4px #c0392b; } }
