/* 画面全体を覆う。iOS のツールバーの出入りに合わせて高さが変わるよう dvh を使い、切り欠きなどの安全領域を避ける */
/* オープニングのスタイルが style.css にあった頃、その .lk-tag span の指定がこのページにも当たっていた（intro.css へ移したあとも見た目を変えないよう、その分を残す） */
.lk-tag span { display: inline-block; }
.sim-overlay { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 300; background: #0b0c0e; color: #e8e8e8; display: none; flex-direction: column; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); overscroll-behavior: contain; }
.sim-overlay.on { display: flex; }
body.sim-open, html:has(body.sim-open) { overflow: hidden; }
.sim-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #1b1b1b; border-bottom: 1px solid #2e2e2e; font-size: .8rem; }
.sim-bar .lbl { color: #e3c27a; letter-spacing: .08em; }
.sim-bar .exit { margin-left: auto; white-space: nowrap; appearance: none; border: 1px solid #555; background: transparent; color: #eee; border-radius: 999px; padding: 4px 16px; min-height: 44px; cursor: pointer; font: inherit; }
@media (hover: hover) { .sim-bar .exit:hover { border-color: #fff; } }
.screen { flex: 1; position: relative; overflow: hidden; background: radial-gradient(120% 80% at 85% 0%, rgba(255,214,150,.55), transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(40,90,140,.9), transparent 60%), linear-gradient(160deg, #3f6f9a, #8fb8cf 60%, #d9c7a8); transition: background 1.2s; font-family: var(--font-body); }
.screen::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: 38px; height: 38%; background: radial-gradient(60% 100% at 30% 100%, rgba(30,60,80,.55), transparent 70%), radial-gradient(50% 90% at 80% 100%, rgba(20,45,65,.5), transparent 70%); pointer-events: none; }
.screen.infected { background: radial-gradient(circle at 50% 40%, #4a0c10, #16070a 55%, #0b0c0e); }
.screen.infected::before { display: none; }
.wp-msg { position: absolute; inset: 0 0 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; font-family: var(--mono); color: rgba(255,255,255,.88); padding: 0 24px; pointer-events: none; }
.wp-msg b { font-size: clamp(1.1rem, 3vw, 2rem); color: #ff5a5a; }
.wp-msg span { font-size: .85rem; }
.icons { position: absolute; left: 12px; top: 12px; display: grid; grid-template-rows: repeat(5, auto); grid-auto-flow: column; gap: 10px 6px; }
.dicon { width: 84px; text-align: center; color: #fff; font-size: .74rem; text-shadow: 0 1px 3px rgba(0,0,0,.8); background: none; border: 0; border-radius: 6px; font-family: inherit; padding: 4px 2px; line-height: 1.35; word-break: break-all; }
.dicon .i { display: block; width: 46px; height: 46px; margin: 0 auto 3px; position: relative; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.dicon .i svg, .win svg, .taskbar svg, .rnote svg, .leak svg, .attach svg { display: block; width: 100%; height: 100%; }
.dicon .badge { position: absolute; right: -6px; top: -4px; background: #d4442c; color: #fff; font-size: .62rem; border-radius: 99px; padding: 0 6px; text-shadow: none; border: 2px solid #fff; }
.dicon.clickable { cursor: pointer; }
@media (hover: hover) { .dicon.clickable:hover { background: rgba(255,255,255,.18); } }
.dicon.clickable .i { animation: callme 1.2s ease-in-out 4; }
.dicon:focus-visible { outline-color: #fff; }
@keyframes callme { 50% { transform: translateY(-4px); } }
.dicon.locked .dn { color: #ffb3b3; }
.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 38px; background: rgba(16,18,24,.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #ddd; font-size: .78rem; }
.tb-start { width: 24px; height: 24px; flex: none; }
.tb-os { font-weight: 700; letter-spacing: .04em; }
.tb-search { background: rgba(255,255,255,.1); border-radius: 99px; padding: 3px 40px 3px 12px; color: #aaa; }
.tb-apps { display: flex; gap: 8px; }
.tb-apps > svg, .tb-run { width: 22px; height: 22px; flex: none; }
.tb-run { position: relative; }
.tb-run::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -5px; height: 2px; background: #f04a4a; border-radius: 2px; }
.tb-tray { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-wifi { width: 18px; height: 18px; color: #ddd; }
.taskbar .clock { font-family: var(--mono); }
.taskbar .net { color: #e3c27a; white-space: nowrap; }
.taskbar .net:empty { display: none; }
@media (max-width: 600px) { .tb-os, .tb-search, .tb-apps > svg:nth-child(n+2) { display: none; } }
.win { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); width: min(92vw, 620px); max-height: calc(100% - 80px); overflow: auto; overscroll-behavior: contain; background: #fff; color: #1b1b1b; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: winIn .25s ease; }
@keyframes winIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.97); } }
/* ナレーションと重なるときは、窓をナレーションの上に置く（高さは JS が決める） */
.win.above { top: 8px; transform: translateX(-50%); animation: none; }
.win .wt { background: linear-gradient(#f7f7f8, #ececee); padding: 7px 10px; font-size: .8rem; border-bottom: 1px solid #dcdcdf; position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; }
.win .wt .wi { width: 18px; height: 18px; flex: none; }
.win .wt .wtt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win .wctl { display: flex; gap: 6px; }
.win .wctl i { width: 11px; height: 11px; border-radius: 50%; background: #c9c9cf; }
.win .wctl i:last-child { background: #e0625a; }
.win .wt:focus-visible { outline-offset: -3px; }
.win .wb { padding: 20px; font-size: .9rem; line-height: 1.85; }
.win .wb p { margin-bottom: 1em; }
.win .btn { font-size: .86rem; padding: 9px 18px; min-height: 44px; }
.win .btn.line { color: #1b1b1b; border-color: #1b1b1b; }
.win .btn:not(.line) { background: #1b1b1b; color: #fff; border-color: #1b1b1b; }
.win .btn.accent { background: #d4442c; border-color: #d4442c; }
/* 窓の中身が長く、窓の中で送る場合も、操作ボタンは窓の下端に見えたままにする */
.win .wb > .btns:last-child, .win #chatAct { position: sticky; bottom: 0; z-index: 1; background: linear-gradient(rgba(255,255,255,0), #fff 12px); }
.win .wb > .btns:last-child { padding-top: 12px; }
.win #chatAct:not(:empty) { padding-top: 2px; }
.attach { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #ccc; border-radius: 6px; padding: 6px 12px 6px 8px; background: #f7f7f7; font-size: .85rem; }
.attach .ai { width: 24px; height: 24px; flex: none; }
.macro-bar { background: #fff4cc; border: 1px solid #e3c35a; padding: 8px 12px; border-radius: 4px; font-size: .84rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.macro-bar .mb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.macro-bar button { background: #fff; color: #1b1b1b; border: 1px solid #999; border-radius: 3px; padding: 5px 12px; min-height: 44px; cursor: pointer; font: inherit; }
@media (hover: hover) { .macro-bar button:hover { border-color: #1b1b1b; } }
.macro-bar button:disabled { cursor: default; opacity: .5; }
.doc-blur { filter: blur(4px); user-select: none; color: #777; font-size: .8rem; margin-top: 12px; }
.files { font-family: var(--mono); font-size: .78rem; background: #111316; color: #b9c2b0; border-radius: 6px; padding: 12px; height: 220px; overflow: hidden; line-height: 1.8; }
#flist { background: #fafbfc; border: 1px solid #e3e5e8; color: #1b1b1b; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; align-content: start; font-family: var(--font-body); line-height: 1.3; height: 260px; }
.ft { text-align: center; padding: 4px 2px; border-radius: 6px; font-size: .66rem; word-break: break-all; }
.ft .fi { display: block; width: 40px; height: 40px; margin: 0 auto 4px; }
.ft.enc { background: #fdecec; animation: encIn .35s ease; }
.ft.enc .fn { color: #7a1f1f; }
@keyframes encIn { from { transform: scale(.9); background: #f04a4a; } }
.files .x { color: #f07468; }
.ft .x { color: #c0392b; }
.files.dlog { height: auto; min-height: 150px; }
.enc-count { font-family: var(--mono); font-size: .95rem; color: #c0392b; margin-top: 10px; }
.rnote { --rp: clamp(20px, 4vw, 36px); position: absolute; top: 16px; bottom: 54px; left: max(16px, calc(50% - 400px)); right: max(16px, calc(50% - 400px)); overflow: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #2a0709, #120607 40%, #0e0e10); border: 2px solid #b3161b; border-radius: 10px; box-shadow: 0 0 0 1px #000, 0 30px 90px rgba(180,20,25,.35); color: #eee; padding: var(--rp); padding-top: 0; font-family: var(--mono); animation: winIn .3s ease; }
.rn-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 0 calc(-1 * var(--rp)) 18px; padding: 8px 12px; background: #b3161b; color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.rn-logo { width: 20px; height: 20px; flex: none; }
.rn-lang { margin-left: auto; font-weight: 400; background: rgba(0,0,0,.25); border-radius: 3px; padding: 1px 8px; }
.rn-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rn-lock { width: clamp(44px, 9vw, 72px); height: clamp(44px, 9vw, 72px); flex: none; color: #f04a4a; filter: drop-shadow(0 0 12px rgba(240,74,74,.5)); }
.rnote h2 { color: #ff5a5a; font-family: var(--mono); font-size: clamp(1.05rem, 3.4vw, 1.5rem); line-height: 1.45; letter-spacing: .02em; margin: 0; }
.rnote p { font-size: .86rem; line-height: 1.9; color: #ccc; }
.rn-timers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 10px; }
.rn-timers > div { border: 1px solid #5a1a1c; background: rgba(0,0,0,.35); border-radius: 6px; padding: 8px 10px; text-align: center; }
.rn-timers .tl { display: block; font-size: .72rem; color: #e3a9a9; }
.rnote .timer { font-size: clamp(1.3rem, 4.6vw, 2.1rem); color: #e3c27a; text-align: center; letter-spacing: .06em; margin: 2px 0 0; }
.rnote .timer.t2 { color: #ff8a7a; }
.rnote .price { text-align: center; }
.rnote .price b { color: #ff5a5a; font-size: 1.4rem; }
.rn-perks { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.rn-perks li { margin: 0; font-size: .72rem; border: 1px dashed #6a5a3a; color: #e3c27a; border-radius: 99px; padding: 2px 10px; }
.rnote .rn-warn { text-align: center; font-size: .78rem; color: #999; }
/* 訓練の声：物語の外から語りかける、紙の付箋のような枠 */
.sky { font-family: var(--font-body); background: #faf3d6; color: #1b1b1b; border: 2px dashed #b08a2e; border-radius: 6px; padding: 10px 14px; margin: 0 0 4px; box-shadow: 0 6px 18px rgba(0,0,0,.4); animation: skyIn .4s ease; }
@keyframes skyIn { from { opacity: 0; transform: translateY(8px); } }
.sky .sk { display: block; font-size: .7rem; letter-spacing: .2em; color: #7a5a10; font-weight: 700; margin-bottom: 2px; }
.rnote .sky p { color: #1b1b1b; font-size: .86rem; line-height: 1.7; margin: 0; }
/* 選択肢は脅迫文の下端に固定し、文章が長く脅迫文の中で送る場合も常に見えるようにする */
.rnote .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; position: sticky; bottom: calc(-1 * var(--rp)); padding: 12px 0 var(--rp); margin-bottom: calc(-1 * var(--rp)); background: linear-gradient(rgba(14,14,16,0), #0e0e10 12px); }
.rnote .acts button:last-of-type:nth-of-type(odd), .rnote .acts .sky { grid-column: 1 / -1; }
.rnote .acts button { appearance: none; border: 1px solid #444; background: #17181b; color: #eee; padding: 12px 14px; min-height: 48px; border-radius: 6px; cursor: pointer; font-family: var(--font-body); font-size: .92rem; line-height: 1.45; text-align: left; }
@media (hover: hover) { .rnote .acts button:hover { border-color: #f04a4a; } }
/* 試した選択肢の印：正しい初動は緑の✓、効果のないものは赤の× */
.rnote .acts button.r-ok, .rnote .acts button.r-ng { position: relative; }
.rnote .acts button.r-ok { border-color: #3f9f78; }
.rnote .acts button.r-ng { border-color: #7a2e2a; color: #b5b5b5; }
.rnote .acts button.r-ok::after, .rnote .acts button.r-ng::after { position: absolute; top: -8px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 .72rem/1 var(--mono); color: #0e0e10; }
.rnote .acts button.r-ok::after { content: "\2713"; content: "\2713" / ""; background: #6fd3a6; }
.rnote .acts button.r-ng::after { content: "\2715"; content: "\2715" / ""; background: #f07468; }
.narr { position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%); width: min(92vw, 560px); background: rgba(250,248,244,.97); color: #1b1b1b; border-radius: 10px; padding: 16px 20px; font-size: .9rem; line-height: 1.85; box-shadow: 0 14px 40px rgba(0,0,0,.35); z-index: 5; animation: narrIn .35s ease; }
@keyframes narrIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.narr .k { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: #666; margin-bottom: 4px; }
.narr p { margin-bottom: .6em; }
.narr .btn { font-size: .82rem; padding: 6px 18px; min-height: 44px; background: #1b1b1b; color: #fff; border-color: #1b1b1b; }
.chat-h { display: flex; align-items: center; gap: 10px; background: #1a1b1f; color: #eee; border-radius: 6px 6px 0 0; padding: 8px 12px; font-size: .8rem; line-height: 1.4; }
.chat-h .av { width: 30px; height: 30px; flex: none; }
.chat-h small { display: block; color: #8fd3a6; font-size: .7rem; }
.chat { background: #111; padding: 12px; border-radius: 0 0 6px 6px; }
.chat .typing { display: flex; align-items: center; gap: 6px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #999; animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .2; } }
/* チャットの中では送らない（送るのは窓だけにして、入れ子のスクロールを作らない） */
.chat { display: flex; flex-direction: column; gap: 8px; }
.chat .m { max-width: 86%; padding: 8px 12px; border-radius: 10px; line-height: 1.7; font-size: .88rem; }
.chat .them { background: #26282c; color: #eee; align-self: flex-start; }
.chat .me { background: #2b59c3; color: #fff; align-self: flex-end; }
.chat .sys { align-self: center; color: #999; font-size: .76rem; }
.wallet { font-family: var(--mono); background: #f3f3f3; padding: 8px 10px; border-radius: 4px; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar2 { height: 6px; background: #e6e6e6; border-radius: 99px; overflow: hidden; margin: 12px 0; }
.bar2 span { display: block; height: 100%; width: 0; background: #2b59c3; transition: width .3s; }
.leak { background: #050506; color: #ccc; font-family: var(--mono); font-size: .82rem; padding: 0 0 14px; border-radius: 6px; overflow: hidden; border: 1px solid #222; }
.lk-url { display: flex; align-items: center; gap: 6px; background: #1a1a1d; color: #9a9a9a; font-size: .72rem; padding: 6px 10px; }
.lk-url svg { width: 12px; height: 12px; color: #8fd3a6; }
.lk-head { text-align: center; padding: 18px 12px 4px; }
.lk-logo { display: block; font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 700; color: #ff3b3b; letter-spacing: .02em; text-shadow: 0 0 18px rgba(255,59,59,.45); }
.lk-logo sup { font-size: .45em; color: #fff; margin-left: 4px; }
.lk-sub { display: block; letter-spacing: .5em; color: #fff; font-size: .78rem; }
.lk-tag { text-align: center; font-size: .66rem; color: #777; margin: 8px 12px 14px; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 0 12px; }
.leak .row { border: 1px solid #2c2c30; background: #0f0f12; padding: 10px; border-radius: 4px; display: flex; flex-direction: column; gap: 4px; margin: 0; }
.leak .row .vn { color: #fff; font-weight: 700; word-break: break-all; }
.leak .row .vd { font-size: .72rem; color: #8a8a8a; }
.leak .row.you { border-color: #c0392b; box-shadow: 0 0 0 1px #c0392b inset; }
.leak .pub { color: #fff; background: #8a1c1c; border-radius: 3px; padding: 1px 8px; align-self: flex-start; font-size: .76rem; }
.leak .pub.done { background: #333; color: #ff7a7a; }
.leak .pub.cd { background: transparent; border: 1px solid #555; color: #e3c27a; }
.leak .row.you.out .pub { background: #ff3b3b; color: #000; font-weight: 700; }
/* 収まらないときは上から表示し、送れるようにする（上下の余白は前後の空要素が受け持つ） */
.ending { position: absolute; inset: 0; background: #0b0c0e; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px; animation: fadeIn 1.6s ease; overflow: auto; overscroll-behavior: contain; }
.ending::before, .ending::after { content: ""; margin: auto; }
@keyframes fadeIn { from { opacity: 0; } }
.ending h2 { font-size: clamp(1.5rem, 5vw, 2.4rem); line-height: 1.7; color: #fff; }
.ending .sum { font-family: var(--mono); font-size: .86rem; color: #f07468; line-height: 2.1; margin: 28px 0; }
.ending p { color: #bbb; max-width: 32em; font-size: .92rem; }
/* 結末：この回の判断の振り返り */
.ending .ch-h { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: #8a8a8a; margin: 0 0 10px; }
.ending .choices { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 36em; }
.ending .choices li { margin: 0; border: 1px solid #444; border-radius: 999px; padding: 4px 14px; font-size: .84rem; line-height: 1.6; color: #ddd; }
.ending .choices li.ok { border-color: #3f9f78; }
.ending .choices li.ng { border-color: #7a2e2a; }
.ending .choices .cm { font-family: var(--mono); margin-right: 6px; }
.ending .choices .ok .cm { color: #6fd3a6; }
.ending .choices .ng .cm { color: #f07468; }
.ending .btn { background: #eee; color: #111; border-color: #eee; min-height: 44px; }
/* 結末のボタンは、文章が長く送る場合も下端に見えたままにする */
.ending.ending { padding-bottom: 0; }
.ending > .btns { position: sticky; bottom: 0; margin-bottom: 0; padding: 14px 0 16px; justify-content: center; background: linear-gradient(rgba(11,12,14,0), #0b0c0e 14px); align-self: stretch; }
.ending .btn.line { background: transparent; color: #eee; }
/* 見つけた結末（CYH.ends）。暗い画面の中に置く */
.ending .ends-card { max-width: 36em; margin: 4px auto 0; }
.glitch { animation: glitch .25s steps(2) 6; }
@keyframes glitch { 0% { transform: translate(2px, -1px); } 50% { transform: translate(-3px, 2px); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .glitch, .win, .rnote, .narr, .ending, .dicon.clickable .i, .ft.enc, .ft.ok, .ft.back, .sky, .dots i, .rewind { animation: none; } .screen { transition: none; } }
/* 時間の巻き戻し：画面が走査線ごと揺れ、左上に巻き戻しの印を出す */
.rewind { animation: rewind .5s steps(3) infinite; }
.rewind::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 2px, transparent 2px 5px); pointer-events: none; z-index: 50; }
@keyframes rewind { 0% { transform: translateX(3px); filter: hue-rotate(0deg) saturate(1.4); } 50% { transform: translateX(-4px) skewX(-1deg); filter: hue-rotate(40deg) saturate(.6); } 100% { transform: none; } }
.rw-badge { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; font-family: var(--mono); font-size: 1rem; letter-spacing: .12em; color: #fff; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 4px 14px; white-space: nowrap; }
.rw-fade { animation: fadeIn .8s ease; }
.ft.back { animation: encIn .35s ease reverse; }
/* 復元のための窓（情シス、警察、No More Ransom、復号ツール） */
/* 社内チャット（業務用チャットの見た目） */
.win .wb:has(> .biz) { padding: 0; }
.biz { display: flex; min-height: 320px; background: #fff; color: #1d1c1d; }
.biz-side { flex: 0 0 170px; background: #3f2b5c; color: #d9cfe6; padding: 12px 0; font-size: .8rem; line-height: 1.5; }
.biz-side p { margin: 0; padding: 4px 14px; }
.biz-side .biz-ws { color: #fff; font-weight: 700; font-size: .86rem; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 8px; }
.biz-side .biz-sec { font-size: .7rem; opacity: .7; margin-top: 8px; }
.biz-side .on { background: #1164a3; color: #fff; }
.biz-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2bac76; margin-right: 6px; }
.biz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.biz-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #e3e3e6; font-size: .86rem; line-height: 1.3; }
.biz-head small { display: block; color: #616061; font-size: .72rem; }
.biz-av { flex: none; width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: .84rem; background: #e8912d; color: #fff; }
.biz-av.it { background: #2f7a5a; }
.biz-log { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.bm { display: flex; gap: 10px; align-items: flex-start; }
.bm-c { min-width: 0; font-size: .88rem; line-height: 1.7; }
.bm-c p { margin: 0; }
.bm-h b { margin-right: 8px; }
.bm-h time { color: #616061; font-size: .72rem; }
.biz-typing { margin: 0; color: #616061; font-size: .76rem; display: flex; align-items: center; gap: 6px; }
.biz-comp { margin: 0 14px 12px; border: 1px solid #c9c9cc; border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; color: #8a8a8d; font-size: .82rem; }
.biz-comp i { font-style: normal; background: #e3e3e6; color: #8a8a8d; border-radius: 4px; padding: 2px 10px; font-size: .74rem; }
.win .wb:has(> .biz) #chatAct { padding: 0 14px 12px; }
@media (max-width: 600px) { .biz-side { display: none; } }
/* 警察とのメール */
.mail-h { margin: 0 0 12px; border-bottom: 1px solid #e3e3e6; font-size: .82rem; }
.mail-h div { display: flex; gap: 10px; padding: 5px 0; border-top: 1px solid #f0f0f2; }
.mail-h div:first-child { border-top: 0; }
.mail-h dt { flex: 0 0 3.5em; color: #666; }
.mail-h dd { margin: 0; min-width: 0; word-break: break-all; }
.mail-b { font-size: .88rem; }
.mail-st { font-weight: 700; color: #2a8f6a; }
.mail-list { list-style: none; margin: 0; padding: 0; border: 1px solid #e3e3e6; border-radius: 6px; font-size: .82rem; }
.mail-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 12px; border-top: 1px solid #e3e3e6; }
.mail-list li:first-child { border-top: 0; }
.mail-list li span { grid-column: 1; color: #555; }
.mail-list li time { grid-row: 1; grid-column: 2; color: #777; font-size: .74rem; }
.mail-list li.new { background: #eef4fc; border-left: 4px solid #2b6cb0; }
.mail-list li.new b, .mail-list li.new span { color: inherit; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .biz { background: #1a1d21; color: #d1d2d3; }
  :root:not([data-theme="light"]) .biz-side { background: #19171d; }
  :root:not([data-theme="light"]) .biz-head, :root:not([data-theme="light"]) .mail-h, :root:not([data-theme="light"]) .mail-h div, :root:not([data-theme="light"]) .mail-list, :root:not([data-theme="light"]) .mail-list li { border-color: #3a3d42; }
  :root:not([data-theme="light"]) .biz-head small, :root:not([data-theme="light"]) .bm-h time, :root:not([data-theme="light"]) .biz-typing { color: #a0a2a6; }
  :root:not([data-theme="light"]) .biz-comp { border-color: #50535a; color: #8f9196; }
  :root:not([data-theme="light"]) .biz-comp i { background: #2c2f34; color: #8f9196; }
  :root:not([data-theme="light"]) .win:has(.biz), :root:not([data-theme="light"]) .win:has(.mail) { background: #1a1d21; color: #e3e3e3; }
  :root:not([data-theme="light"]) .win:has(.biz) .wt, :root:not([data-theme="light"]) .win:has(.mail) .wt { background: #2a2d32; color: #e3e3e3; border-color: #3a3d42; }
  :root:not([data-theme="light"]) .win:has(.biz) #chatAct, :root:not([data-theme="light"]) .win:has(.mail) #chatAct, :root:not([data-theme="light"]) .win:has(.mail) .wb > .btns:last-child, :root:not([data-theme="light"]) .win .mail > .btns { background: linear-gradient(rgba(26,29,33,0), #1a1d21 12px); }
  :root:not([data-theme="light"]) .win:has(.biz) .btn:not(.line), :root:not([data-theme="light"]) .win:has(.mail) .btn:not(.line) { background: #e3e3e3; color: #1a1d21; border-color: #e3e3e3; }
  :root:not([data-theme="light"]) .mail-h dt, :root:not([data-theme="light"]) .mail-list li span, :root:not([data-theme="light"]) .mail-list li time { color: #a0a2a6; }
  :root:not([data-theme="light"]) .mail-list li.new { background: #1f2c3d; }
  :root:not([data-theme="light"]) .mail-st { color: #6fd3a6; }
}
:root[data-theme="dark"] .biz { background: #1a1d21; color: #d1d2d3; }
:root[data-theme="dark"] .biz-side { background: #19171d; }
:root[data-theme="dark"] .biz-head, :root[data-theme="dark"] .mail-h, :root[data-theme="dark"] .mail-h div, :root[data-theme="dark"] .mail-list, :root[data-theme="dark"] .mail-list li { border-color: #3a3d42; }
:root[data-theme="dark"] .biz-head small, :root[data-theme="dark"] .bm-h time, :root[data-theme="dark"] .biz-typing { color: #a0a2a6; }
:root[data-theme="dark"] .biz-comp { border-color: #50535a; color: #8f9196; }
:root[data-theme="dark"] .biz-comp i { background: #2c2f34; color: #8f9196; }
:root[data-theme="dark"] .win:has(.biz), :root[data-theme="dark"] .win:has(.mail) { background: #1a1d21; color: #e3e3e3; }
:root[data-theme="dark"] .win:has(.biz) .wt, :root[data-theme="dark"] .win:has(.mail) .wt { background: #2a2d32; color: #e3e3e3; border-color: #3a3d42; }
:root[data-theme="dark"] .win:has(.biz) #chatAct, :root[data-theme="dark"] .win:has(.mail) #chatAct, :root[data-theme="dark"] .win:has(.mail) .wb > .btns:last-child, :root[data-theme="dark"] .win .mail > .btns { background: linear-gradient(rgba(26,29,33,0), #1a1d21 12px); }
:root[data-theme="dark"] .win:has(.biz) .btn:not(.line), :root[data-theme="dark"] .win:has(.mail) .btn:not(.line) { background: #e3e3e3; color: #1a1d21; border-color: #e3e3e3; }
:root[data-theme="dark"] .mail-h dt, :root[data-theme="dark"] .mail-list li span, :root[data-theme="dark"] .mail-list li time { color: #a0a2a6; }
:root[data-theme="dark"] .mail-list li.new { background: #1f2c3d; }
:root[data-theme="dark"] .mail-st { color: #6fd3a6; }
.win .mail > .btns { position: sticky; bottom: 0; z-index: 1; padding-top: 12px; margin-top: 0; background: linear-gradient(rgba(255,255,255,0), #fff 12px); }

.nmr { border: 1px solid #c9d3df; border-radius: 6px; padding: 14px; background: #f6f9fc; }
.nmr-url { font-family: var(--mono); font-size: .76rem; color: #555; margin: 0 0 10px; word-break: break-all; }
.nmr h3 { font-size: 1rem; margin: 0 0 6px; color: #1d3b66; }
.nmr .up { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: .84rem; }
.nmr .up span { border: 1px dashed #9aa8b8; border-radius: 6px; padding: 6px 10px; background: #fff; word-break: break-all; }
.nmr .hit { border-left: 4px solid #2a8f6a; background: #eaf7f0; padding: 8px 12px; margin-top: 10px; font-size: .86rem; }
.ft.ok { background: #e8f6ee; animation: encIn .35s ease reverse; }
.ending.good { background: #0b1210; }
.ending.good .sum { color: #6fd3a6; }
.ending .note { border: 1px solid #3a4a44; border-radius: 8px; padding: 12px 16px; text-align: left; margin-top: 16px; }
.ending.good > .btns { background: linear-gradient(rgba(11,18,16,0), #0b1210 14px); }
/* 振り返りの後の「もう一つの結末」への入口 */
.rw-panel { max-width: 720px; }

/* 指で操作する端末：ボタンを指で押せる大きさにする */
@media (pointer: coarse) {
  .sim-bar { padding-block: 4px; }
  .sim-bar .exit { min-height: 44px; }
  .macro-bar button, .win .btn, .narr .btn, .ending .btn { min-height: 48px; }
}
/* スマートフォンの縦持ち：窓と脅迫文を画面いっぱいに使い、文字を詰める */
@media (max-width: 600px) {
  .win { width: calc(100% - 16px); max-height: calc(100% - 60px); transform: translate(-50%, -52%); }
  .win .wb { padding: 16px; }
  .rnote { top: 8px; left: 8px; right: 8px; bottom: 46px; --rp: 16px; }
  .rn-timers { margin: 12px 0 6px; gap: 6px; }
  .icons { grid-template-rows: repeat(4, auto); }
  .rnote h2 { margin-bottom: 12px; }
  .rnote p { font-size: .84rem; line-height: 1.75; }
  .rnote .timer { margin: 0; }
  .rnote .acts { margin-top: 16px; }
  .rnote .acts button { font-size: .86rem; padding: 10px 12px; }
  .narr { width: calc(100% - 16px); bottom: 46px; padding: 14px 16px; line-height: 1.75; }
}
/* 特に低いスマートフォン（iPhone SE など）：脅迫文の金額まで、選択肢の上に見えるよう詰める */
@media (max-width: 600px) and (max-height: 600px) {
  .rnote h2 { font-size: 1rem; margin-bottom: 8px; }
  .rnote p { font-size: .8rem; line-height: 1.65; }
  .rnote .timer { font-size: 1.2rem; margin: 0; }
  .rnote .acts { margin-top: 10px; }
  .rnote .acts button { padding: 8px 10px; min-height: 44px; }
}
/* タブレットの縦持ち：脅迫文の下に大きな空きが出ないよう、上下の中央にそろえる */
@media (orientation: portrait) and (min-width: 601px) {
  .rnote { display: flex; flex-direction: column; }
  .rnote::before, .rnote::after { content: ""; margin-block: auto; }
}
/* 横持ちのスマートフォン：高さが足りないため、アイコンを横に並べ、脅迫文は文章と選択肢を左右に分ける */
@media (orientation: landscape) and (max-height: 500px) {
  .icons { grid-template-rows: none; grid-auto-flow: column; gap: 8px; left: 12px; top: 10px; }
  .win { max-height: calc(100% - 52px); transform: translate(-50%, -52%); }
  .win .wt { padding-block: 6px; }
  .win .wb { padding: 14px 20px; line-height: 1.7; }
  .files, #flist { height: 130px; }
  .rnote { top: 8px; left: 8px; right: 8px; bottom: 46px; --rp: 18px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 20px; align-items: start; }
  .rnote > :not(.acts) { grid-column: 1; }
  .rnote h2 { margin-bottom: 10px; font-size: 1.2rem; }
  .rnote p { font-size: .84rem; line-height: 1.7; }
  .rnote .timer { margin: 0; font-size: 1.3rem; }
  .rn-bar { grid-column: 1 / -1 !important; }
  .rnote .acts { grid-column: 2; grid-row: 2 / span 7; top: 0; bottom: auto; margin: 0; padding: 0; background: none; }
  .rnote .acts button { font-size: .86rem; padding: 8px 12px; min-height: 44px; }
  .narr { bottom: 46px; padding: 12px 18px; line-height: 1.7; }
  .ending { padding: 16px 24px; }
  .ending h2 { font-size: 1.35rem; line-height: 1.5; }
  .ending .sum { margin: 10px 0; line-height: 1.8; font-size: .82rem; }
  .ending p { font-size: .86rem; line-height: 1.7; margin-bottom: 0; }
  .ending .btns { margin-top: 14px; }
  .ending .ch-h { margin-bottom: 6px; }
  .ending .choices { margin-bottom: 10px; gap: 6px; }
  .ending .choices li { font-size: .78rem; padding: 2px 12px; }
}
/* 低い画面の結末：見出しから二つのボタンまでが、なるべく一画面に収まるよう詰める */
@media (orientation: portrait) and (max-height: 720px) {
  .ending { padding: 16px 20px; }
  .ending h2 { font-size: 1.4rem; line-height: 1.55; }
  .ending .sum { margin: 14px 0; line-height: 1.8; font-size: .8rem; }
  .ending p { font-size: .86rem; line-height: 1.75; margin-bottom: 0; }
  .ending .btns { margin-top: 16px; gap: 10px; }
  .ending .btn { padding-block: 10px; }
  .ending .ch-h { margin-bottom: 6px; }
  .ending .choices { margin-bottom: 14px; gap: 6px; }
  .ending .choices li { font-size: .8rem; padding: 2px 12px; }
}

/* 元は style 属性だった指定（CSP の style-src に 'unsafe-inline' を付けないため、ここへ移した） */
.sim-ttl { font-size: 1.3rem; margin-bottom: 16px; }
/* 元は ransomware-sim.js が style 属性で付けていた指定 */
.btns.jc-center { justify-content: center; }
.win .wb .mail-from { font-size: .8rem; color: #666; margin: 0; }
.win .wb .mail-subj { font-weight: 700; }
.win .wb .doc-lock { margin-top: 16px; font-weight: 700; }
.win .wb .loading { color: #666; font-size: .84rem; }
.win .wb .irrev { font-size: .8rem; color: #a33; margin-top: 10px; }
.win .wb .conf { font-size: .82rem; color: #666; }
.win .wb .onion { font-family: var(--mono); text-align: center; padding: 30px 0 10px; }
.win .wb .onion span { font-size: .8rem; color: #666; }
.win .wb .sh-st { font-size: .84rem; color: #555; margin: 8px 0 6px; }
