/* 画面とキーボードが一度に見えるよう、低い画面では幅を抑える */
/* オープニングのスタイルが style.css にあった頃、その .cap の指定がこのページにも当たっていた（intro.css へ移したあとも見た目を変えないよう、その分を残す） */
.cap { --blur: 6px; font-size: clamp(1.1rem, 2.4vw, 1.4rem); line-height: 1.75; }
.cap + .cap { margin-top: .45em; }
.cap.em { font-size: clamp(1.45rem, 4.6vw, 2.1rem); line-height: 1.5; }
.cap.big { font-size: clamp(1.55rem, 5.4vw, 2.5rem); line-height: 1.45; }
.cap.sub { font-family: var(--font-body); font-weight: 400; font-size: clamp(.95rem, 2vw, 1.1rem); line-height: 1.85; color: var(--ink-2); margin-top: .9em; letter-spacing: .05em; }
.cf-stage { --stage-w: min(880px, max(460px, (100vh - 240px) * 1.5)); }
@supports (height: 100svh) { .cf-stage { --stage-w: min(880px, max(460px, (100svh - 240px) * 1.5)); } }
.deskwrap { max-width: var(--stage-w); margin: 0 auto; }

/* デスクトップ（固定色のモック画面） */
.screen { position: relative; aspect-ratio: 16 / 10; border: 12px solid #1b1b1b; border-radius: 14px 14px 4px 4px; overflow: hidden; user-select: none; color-scheme: light; background: linear-gradient(160deg, #1d4e6e 0%, #24506b 40%, #3a3f63 100%); font-family: var(--font-body); }
.screen :focus-visible { outline: 2px solid #ffd34d; outline-offset: 2px; }
/* 暗い配色では、モニターの黒い枠が背景に溶けるため、細い輪郭を足す */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .screen { box-shadow: 0 0 0 1px rgba(255,255,255,.14); } }
:root[data-theme="dark"] .screen { box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
.stand { width: 22%; height: 22px; margin: 0 auto; background: linear-gradient(#2a2a2a, #1b1b1b); clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); }
.wallicon { position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: rgba(255,255,255,.85); font-size: .6rem; width: 64px; text-align: center; letter-spacing: 0; word-break: keep-all; pointer-events: none; }
.wallicon .g { width: 34px; height: 28px; border-radius: 5px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); }

/* ブラウザの窓 */
.browser { position: absolute; left: 7%; top: 6%; right: 7%; bottom: 46px; background: #fff; color: #222; border-radius: 10px 10px 0 0; box-shadow: 0 24px 50px -20px rgba(0,0,0,.6); display: flex; flex-direction: column; overflow: hidden; }
.b-tabs { background: #dfe1e5; display: flex; align-items: flex-end; padding: 6px 8px 0; gap: 4px; flex: none; }
.b-tab { background: #fff; border-radius: 8px 8px 0 0; padding: 6px 8px 6px 10px; font-size: clamp(.75rem, 1.3vw, .78rem); display: flex; align-items: center; gap: 8px; max-width: 240px; min-width: 0; }
.b-tab .fav { width: 12px; height: 12px; border-radius: 3px; background: #1f7a4d; flex: none; }
.b-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-x { appearance: none; position: relative; border: 0; background: transparent; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: .85rem; line-height: 20px; padding: 0; color: #444; flex: none; }
@media (hover: hover) { .b-x:hover { background: #ddd; } }
.b-x.nudge { animation: nudge 1.1s ease infinite; }
@keyframes nudge { 50% { background: #d4442c; color: #fff; } }
.b-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #e5e5e5; background: #fff; flex: none; }
.b-bar .lock { width: 13px; height: 13px; flex: none; color: #555; }
.b-addr { flex: 1; min-width: 0; background: #f1f3f4; border-radius: 999px; padding: 3px 12px; font-family: var(--mono); font-size: .75rem; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-page { flex: 1; overflow: hidden; position: relative; background: #fff; }

/* 配送確認ページ */
/* 収まらないときは上から表示し、ページの中を送れるようにする（上下の余白は前後の空要素が受け持つ） */
.track { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(10px, 2.4vh, 20px); padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.track::before, .track::after { content: ""; margin: auto; }
.track .brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; letter-spacing: .12em; color: #1f7a4d; font-size: clamp(.82rem, 2vw, 1rem); }
.track .brand .mk { width: 22px; height: 22px; border-radius: 6px; background: #1f7a4d; display: grid; place-items: center; }
.track .brand .mk svg { width: 14px; height: 14px; fill: #fff; }
.track .q { font-size: clamp(.8rem, 1.7vw, .9rem); color: #444; margin: 0; }
.track .q b { font-family: var(--mono); font-weight: 400; }
/* 汎用デザインの確認ボックス（実在サービスのロゴは使わない） */
.captcha { background: #f6f7f8; border: 1px solid #d4d6da; border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cb { appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 14px; font: inherit; color: #222; }
.cb .box { width: 26px; height: 26px; border: 2px solid #b7bbc0; border-radius: 4px; background: #fff; flex: none; display: grid; place-items: center; transition: background .2s; }
.cb .box svg { width: 18px; height: 18px; stroke: #1f7a4d; stroke-width: 3; fill: none; stroke-dasharray: 26; stroke-dashoffset: 26; }
.cb.spin .box { background: #fff; }
/* くるくると印は同じ位置に重ねる（並べるとずれる） */
.cb .box > svg, .cb .box::after { grid-area: 1 / 1; }
.cb.spin .box > svg { visibility: hidden; }
.cb.spin .box::after { content: ""; width: 18px; height: 18px; border: 3px solid #c7cacf; border-top-color: #1f7a4d; border-radius: 50%; animation: sp .7s linear infinite; }
.cb.done .box svg { animation: tick .4s ease forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
@keyframes sp { to { transform: rotate(360deg); } }
.cb .lbl { font-size: clamp(.82rem, 1.7vw, .9rem); }
.captcha .mini { margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #9aa0a6; font-size: .62rem; white-space: nowrap; flex: none; }
.captcha .mini .sh { width: 20px; height: 20px; border-radius: 4px; background: #e4e7ea; }

/* 追加の確認（攻撃者の指示） */
.verify { background: #fff; border: 1px solid #d4d6da; border-radius: 8px; padding: 14px 16px; max-width: 340px; text-align: left; box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.verify h5 { margin: 0 0 8px; font-family: var(--font-head); font-size: clamp(.82rem, 1.7vw, .86rem); color: #222; display: flex; align-items: center; gap: 6px; }
.verify h5 .w { color: #c99700; }
.verify ol { margin: 0; padding-left: 1.4em; font-size: clamp(.76rem, 1.5vw, .8rem); color: #444; line-height: 1.85; }
.verify ol b { font-family: var(--mono); font-weight: 400; background: #eef0f2; border-radius: 3px; padding: 0 5px; }

/* タスクバー */
.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: rgba(22,26,34,.92); display: flex; align-items: center; gap: 8px; padding: 0 10px; color: #e6e8ec; }
.tb-start { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; flex: none; color: #cfd3da; }
.tb-start svg { width: 15px; height: 15px; }
.tb-spacer { flex: 1; }
.tb-tray { appearance: none; border: 0; background: transparent; color: #e6e8ec; cursor: pointer; width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; position: relative; }
@media (hover: hover) { .tb-tray:hover { background: rgba(255,255,255,.12); } }
.tb-tray svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tb-badge { position: absolute; top: 1px; right: 1px; min-width: 14px; height: 14px; border-radius: 999px; background: #d4442c; color: #fff; font-family: var(--mono); font-size: .56rem; line-height: 14px; text-align: center; padding: 0 2px; display: none; }
.tb-badge.on { display: block; animation: pop .4s cubic-bezier(.3,1.6,.5,1) both; }
.tb-badge.pulse { box-shadow: 0 0 0 0 rgba(212,68,44,.7); animation: pop .4s cubic-bezier(.3,1.6,.5,1) both, ring 1.6s ease-out infinite; }
@keyframes ring { to { box-shadow: 0 0 0 8px rgba(212,68,44,0); } }
@keyframes pop { from { transform: scale(0); } }
.tb-time { font-family: var(--mono); font-size: .66rem; color: #cfd3da; min-width: 3.2em; text-align: center; }

/* 紙片がクリップボードへ吸い込まれる */
.slip { position: absolute; z-index: 20; width: 54px; height: 34px; background: #fff; border: 1px solid #cfd3da; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.3); pointer-events: none; display: grid; align-content: center; gap: 3px; padding: 5px; }
.slip i { height: 2px; background: #c7cacf; border-radius: 2px; display: block; }
.slip i:nth-child(2) { width: 70%; }

/* クリップボードの中身パネル */
.overlay { position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 16px; }
.overlay.on { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.clip-card { background: #fff; color: #222; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.45); width: min(420px, 100%); max-height: 100%; overflow: auto; }
.clip-card .t { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #eee; font-family: var(--font-head); font-weight: 700; font-size: .84rem; }
.clip-card .t svg { width: 16px; height: 16px; fill: none; stroke: #555; stroke-width: 1.7; }
.clip-card .t .x { margin-left: auto; appearance: none; border: 0; background: transparent; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; font-size: 1rem; color: #444; }
@media (hover: hover) { .clip-card .t .x:hover { background: #eee; } }
.clip-card .b { padding: 14px; }
.clip-card .cmd { font-family: var(--mono); font-size: .72rem; line-height: 1.8; background: #15181d; color: #e9eaec; border-radius: 8px; padding: 12px 14px; word-break: break-all; white-space: pre-wrap; }
.clip-card .cmd .danger { color: #ff9b8f; }
.clip-card .cmd .decoy { color: #7fd0a4; }
.clip-card .ann { margin: 12px 0 0; border-left: 2px solid var(--accent, #c03a22); padding: 2px 0 2px 14px; font-size: .78rem; line-height: 1.8; color: #444; }
.clip-card .ann b { color: #c0392b; font-weight: 700; }
.clip-card .empty { font-size: .8rem; color: #888; text-align: center; padding: 10px 0; }
.clip-card .f { padding: 0 14px 14px; text-align: right; }

/* ファイル名を指定して実行（Windows 風ダイアログ） */
.run-card { background: #f0f0f0; color: #1b1b1b; border: 1px solid #a9b2bd; border-radius: 6px 6px 4px 4px; box-shadow: 0 18px 44px rgba(0,0,0,.5); width: min(400px, 100%); overflow: hidden; }
.run-card .t { background: linear-gradient(#f7f8fa, #e7eaee); padding: 7px 12px; font-size: .78rem; font-weight: 700; border-bottom: 1px solid #d4d8dd; }
.run-card .b { padding: 14px 16px; display: flex; gap: 12px; }
.run-card .ic { width: 34px; height: 34px; flex: none; }
.run-card .b p { margin: 0 0 10px; font-size: .74rem; line-height: 1.6; color: #333; }
.run-card label { display: block; font-size: .72rem; color: #333; margin: 8px 0 4px; }
.run-card .line { display: flex; align-items: center; gap: 6px; }
.run-card .line .nm { font-size: .72rem; color: #333; }
.run-card input { flex: 1; min-width: 0; font-family: var(--mono); font-size: .76rem; padding: 5px 7px; border: 1px solid #7f9db9; border-radius: 2px; background: #fff; color: #1b1b1b; }
.run-card input:focus { outline: 1px solid #2f6fde; }
.run-card .f { padding: 4px 16px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.run-card .f button { appearance: none; font: inherit; font-size: .74rem; padding: 5px 16px; border: 1px solid #a9b2bd; border-radius: 3px; background: linear-gradient(#fdfdfd, #e9edf1); color: #1b1b1b; cursor: pointer; min-width: 74px; }
@media (hover: hover) { .run-card .f button:hover:not(:disabled) { border-color: #2f6fde; } }
.run-card .f button.p { font-weight: 700; }
.run-card .f button:disabled { color: #9aa0a6; cursor: default; }

/* 感染時の黒い窓 */
.console { position: absolute; inset: 0; z-index: 40; background: #05070a; color: #8af0b0; font-family: var(--mono); font-size: .7rem; line-height: 1.8; padding: 16px; display: none; }
.console.on { display: block; }
.console.flash { animation: cflash .32s steps(1) 1; }
@keyframes cflash { 0% { opacity: 1; } 100% { opacity: 1; } }

/* 情報が飛んでいく：左下の「あなたのパソコン」から、右上の「攻撃者のサーバー」へ */
.exfil { position: absolute; inset: 0; z-index: 42; background: rgba(8,10,14,.96); color: #e9eaec; display: none; align-items: center; justify-content: center; padding: 18px; text-align: center; }
.exfil.on { display: flex; }
.exfil .flow { position: relative; width: 100%; max-width: 400px; height: 190px; }
.exfil .node { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .64rem; letter-spacing: .06em; color: #b4b9c0; white-space: nowrap; }
.exfil .node.pc { left: 0; bottom: 0; }
/* サーバーの名前は箱の上に置き、飛んでくる項目と重ならないようにする */
.exfil .node.srv { right: 0; top: 0; color: #ff9b8f; flex-direction: column-reverse; }
.exfil .ico { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; }
.exfil .pc .ico { border: 1px solid #4a4e57; color: #cfd3da; }
.exfil .srv .ico { border: 1px dashed #ff9b8f; }
.exfil .ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.exfil .srv.hit .ico { animation: hit .35s ease; }
@keyframes hit { 50% { transform: scale(1.18); background: rgba(255,155,143,.18); } }
.exfil .loot { position: absolute; left: 62px; bottom: 30px; background: #1d1f24; border: 1px solid #3a3d44; border-radius: 8px; padding: 7px 11px; font-size: .68rem; white-space: nowrap; display: flex; align-items: center; gap: 7px; opacity: 0; }
.exfil .loot .d { width: 7px; height: 7px; border-radius: 2px; background: #ff9b8f; flex: none; }
/* 行き先（--dx, --dy）は、スクリプトがサーバーの位置から計算する */
.exfil .loot.go { animation: fly 1.1s cubic-bezier(.5,0,.6,1) forwards; }
@keyframes fly { 0% { opacity: 0; transform: translate(0,0) scale(1); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 200px), var(--dy, -120px)) scale(.4); } }
/* 動きを減らす設定では、飛ばさずに、上から順に「パソコン → 盗まれたもの → サーバー」と並べて見せる */
.exfil.still .flow { height: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.exfil.still .node, .exfil.still .loot { position: static; }
.exfil.still .ico { width: 40px; height: 40px; }
.exfil.still .loot.go { opacity: 1; animation: none; }

/* 結末・3日後 */
.after { position: absolute; inset: 0; z-index: 50; background: #faf3d6; color: #1b1b1b; display: none; flex-direction: column; align-items: center; text-align: center; padding: 20px; overflow-y: auto; }
.after::before, .after::after { content: ""; flex: 1 0 0; }
.after.on { display: flex; animation: fadeIn .35s ease; }
.after:focus { outline: none; }
.after .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; color: #8a5a10; margin-bottom: 6px; }
.after .big { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.2rem, 3.4vw, 1.7rem); line-height: 1.5; margin-bottom: 10px; }
.after .big:focus { outline: none; }
.after.bad .big { color: #c0392b; }
.after.good .big { color: #1a6e51; }
.after p { color: #4f4f4f; font-size: .9rem; max-width: 30em; margin: 0 0 8px; line-height: 1.85; }
/* 3日後のログイン再現 */
.after .mini-login { background: #fff; border: 1px solid #e2ded5; border-radius: 12px; padding: 16px 18px; max-width: 320px; margin: 4px 0 14px; box-shadow: 0 10px 30px -18px rgba(0,0,0,.4); }
.after .mini-login .u { display: flex; align-items: center; gap: 10px; font-size: .82rem; }
.after .mini-login .av { width: 30px; height: 30px; border-radius: 50%; background: #d7e4f3; flex: none; }
.after .mini-login .ok { color: #1a6e51; font-weight: 700; font-size: .8rem; margin: 10px 0 2px; }
.after .mini-login .no { color: #c0392b; font-family: var(--mono); font-size: .68rem; }
.after .cal { display: flex; gap: 6px; font-family: var(--mono); margin-bottom: 4px; }
.after .cal span { display: inline-block; padding: 6px 8px; border-radius: 8px; background: #1b1b1b; color: #fff; animation: flip .5s ease both; }
.after .cal span:nth-child(2) { animation-delay: .12s; }
@keyframes flip { from { transform: rotateX(90deg); } }
/* 回避できた結末の印 */
.after .ok-ic { width: 46px; height: 46px; margin-bottom: 6px; flex: none; animation: okPop .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes okPop { from { transform: scale(.3); opacity: 0; } }
/* 見つけた結末（CYH.ends の小さな札） */
.after .ends-card { max-width: 380px; }
.after .ends-card .ec-btns { position: static; background: none; padding: 0; margin-top: 12px; }
/* 結末の文章が長く画面の中で送る場合も、「もう一度」は下端に見えたままにする */
.after .btns { margin-top: 18px; position: sticky; bottom: -20px; padding: 10px 0 14px; width: 100%; display: flex; justify-content: center; background: linear-gradient(rgba(247,245,240,0), #faf3d6 12px); }
.after .btn.line { color: #1b1b1b; border-color: #1b1b1b; background: transparent; }
.after .btn.line:hover { background: #1b1b1b; color: #faf3d6; }
@media (max-width: 600px) {
  .after { padding: 10px 14px; }
  /* 結末が画面の中に収まるよう、狭い画面では日めくりを省き、ログインの再現を詰める */
  .after .cal { display: none; }
  .after .mini-login { padding: 10px 14px; margin: 2px 0 8px; }
  .after .mini-login .av { width: 24px; height: 24px; }
  .after .mini-login .ok { margin-top: 6px; }
  .after .big { font-size: 1.15rem; }
  .after p { font-size: .86rem; margin-bottom: 6px; line-height: 1.75; }
  .after .btns { bottom: -10px; margin-top: 8px; padding-top: 8px; }
}

/* 画面下のキーボード（実際の操作部） */
.keys { display: flex; justify-content: center; gap: 10px; max-width: var(--stage-w); margin: 18px auto 0; flex-wrap: wrap; }
.key { appearance: none; border: 1px solid var(--line); border-bottom-width: 4px; background: var(--surface); color: var(--ink); border-radius: 10px; padding: 12px 18px; min-height: 48px; font-family: var(--mono); font-size: .9rem; cursor: pointer; min-width: 84px; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; display: inline-flex; align-items: center; gap: 6px; justify-content: center; transition: transform .08s, border-color .2s, background .2s; }
.key:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.key:disabled { opacity: .4; cursor: default; }
.key.cue { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); animation: cue 1.3s ease infinite; }
@keyframes cue { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
.choice { display: flex; justify-content: center; gap: 10px; max-width: var(--stage-w); margin: 12px auto 0; flex-wrap: wrap; }
.choice .btn { min-height: 48px; flex: 1 1 0; max-width: 260px; padding-inline: 10px; letter-spacing: 0; white-space: nowrap; font-size: .9rem; }
.choice .btn[hidden] { display: none; }
.choice .doubt { background: #c0392b; border-color: #c0392b; color: #fff; animation: cue 1.3s ease infinite; }
.clip-card .f { padding: 0 16px 14px; display: flex; justify-content: center; }
.after .score { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 2px 0 10px; }
.after .score span { background: #fff; border: 1px solid #e2ded5; border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 700; }
.after .score .z { color: #1a6e51; } .after .score .x { color: #c0392b; }
.after .stampx { display: inline-block; border: 3px solid #c0392b; color: #c0392b; border-radius: 8px; padding: 2px 14px; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; transform: rotate(-8deg); margin-bottom: 8px; animation: stampIn .4s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes stampIn { from { transform: rotate(-8deg) scale(2.2); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.screen.shake { animation: shake .4s ease; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@media (prefers-reduced-motion: reduce) { .choice .doubt, .after .stampx, .screen.shake { animation: none; } }
.keys-hint { max-width: var(--stage-w); margin: 10px auto 0; }

/* 指で操作する端末：タブの「×」、トレイのアイコン、窓のボタンを指で押せる大きさにする */
@media (pointer: coarse) {
  .cb { min-height: 44px; }
  .b-tab { padding: 3px 4px 3px 10px; }
  .b-x { width: 38px; height: 38px; line-height: 38px; font-size: 1rem; }
  .b-x::before { content: ""; position: absolute; inset: -3px; }
  .taskbar { height: 50px; }
  .browser { bottom: 56px; }
  .tb-tray { width: 44px; height: 44px; }
  .tb-tray svg { width: 20px; height: 20px; }
  .tb-badge { top: 3px; right: 3px; }
  .clip-card .t { padding-block: 6px; }
  .clip-card .t .x { width: 44px; height: 44px; margin-right: -8px; }
  .run-card .f button { min-height: 44px; }
  /* 画面の中で読ませる文字は、指で操作する端末では 12px 以上にする */
  .clip-card .cmd, .run-card .b p, .run-card .line .nm, .run-card .f button, .exfil .loot, .exfil .node, .after .tag, .after .mini-login .no { font-size: .78rem; }
  /* iOS で入力欄に触れたとき、画面が拡大されないよう 16px 以上にする */
  .run-card input { font-size: 16px; padding: 6px 8px; }
  .after .btn { min-height: 44px; }
}

/* 縦長の画面（スマートフォンの縦持ち）：モニターの台を外し、ブラウザを画面いっぱいに広げて縦長に見せる。
   キーの段と一緒に、ヘッダーの下に収まる高さにする */
@media (orientation: portrait) and (max-width: 700px) {
  .wrap.cf-pad { padding-inline: 12px; }
  .deskwrap { max-width: none; }
  /* キーの下の説明（2行まで）も、ヘッダーの下に収まる高さにする */
  .screen { aspect-ratio: auto; height: clamp(340px, 100vh - 194px, 760px); height: clamp(340px, 100svh - 194px, 760px); border-width: 6px; border-radius: 14px; }
  .stand, .wallicon { display: none; }
  .browser { left: 0; right: 0; top: 0; border-radius: 0; box-shadow: none; }
  /* 間隔は前後の空要素にも付くため、gap ではなく各要素の上の余白で取る */
  .track { padding: 10px 12px; gap: 0; }
  .track .q, .track .captcha, .track .verify { margin-top: 10px; }
  .captcha { padding: 10px 12px; gap: 10px; max-width: 100%; }
  .cb { gap: 10px; text-align: left; }
  .keys { max-width: none; margin-top: 10px; gap: 8px; flex-wrap: nowrap; }
  .key { flex: 1 1 0; min-width: 0; padding: 12px 6px; font-size: .86rem; }
  .keys-hint { max-width: none; margin-top: 8px; }
}
@media (orientation: portrait) and (max-width: 360px) { .cb .lbl { font-size: .78rem; } }
/* タブレットの縦持ち：16:10 では低すぎるため、4:3 にする */
@media (orientation: portrait) and (min-width: 701px) {
  .screen { aspect-ratio: 4 / 3; }
}
/* 横持ちのスマートフォン：高さが足りないため、キーを画面の右に縦に並べる */
@media (orientation: landscape) and (max-height: 500px) {
  .cf-stage { display: grid; grid-template-columns: minmax(0, 1fr) 176px; grid-template-rows: auto 1fr; column-gap: 14px; }
  .deskwrap { grid-row: 1 / -1; max-width: none; margin: 0; }
  .screen { aspect-ratio: auto; height: max(240px, 100vh - 100px); height: max(240px, 100svh - 100px); border-width: 6px; border-radius: 12px; }
  .stand, .wallicon { display: none; }
  /* ページの部分が低くなりすぎないよう、スマートフォンのブラウザのように、タブとアドレスを一列にまとめる */
  .browser { left: 0; right: 0; top: 0; bottom: 44px; border-radius: 0; box-shadow: none; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .b-page { grid-column: 1 / -1; }
  .b-tabs { padding: 4px 0 0 6px; }
  .b-tab { max-width: 200px; padding: 2px 2px 2px 10px; }
  .b-x { width: 32px; height: 32px; line-height: 32px; }
  .b-x::before { inset: -6px; }
  .b-bar { background: #dfe1e5; border-bottom: 0; padding: 4px 8px 0 6px; }
  .b-addr { background: #fff; }
  .taskbar { height: 44px; }
  /* 最初に押す「私はロボットではありません」が、ページを送らなくても見えるようにする */
  .track { padding: 6px 14px; gap: 0; }
  .track .brand { display: none; }
  .track .q { line-height: 1.6; }
  .captcha { padding: 6px 12px; margin-top: 8px; }
  .verify { margin-top: 8px; padding: 10px 14px; }
  .verify h5 { margin-bottom: 4px; }
  .verify ol { line-height: 1.6; }
  /* 説明の文が増えても、キーの位置は動かさない。説明も画面の下端で切れないよう、キーを詰める */
  .keys { grid-row: 1; flex-direction: column; flex-wrap: nowrap; margin: 16px 0 0; max-width: none; gap: 8px; }
  .key { min-height: 44px; padding-block: 8px; }
  .keys-hint { grid-row: 2; align-self: start; margin: 10px 0 0; max-width: none; text-align: left; line-height: 1.7; }
  .after { padding: 10px 16px; }
  .after .big { font-size: 1.1rem; margin-bottom: 4px; }
  .after p { font-size: .84rem; line-height: 1.7; }
  .after .btns { bottom: -10px; margin-top: 8px; }
  .after .cal { display: none; }
  .after .mini-login { padding: 8px 14px; margin: 2px 0 6px; }
  .exfil { padding: 10px; }
  .exfil .flow { height: 150px; }
  .exfil .ico { width: 40px; height: 40px; }
  .exfil .loot { left: 48px; bottom: 24px; }
  .exfil.still .flow { gap: 4px; }
  .after .ends-card { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .b-x.nudge, .cb.spin .box::after, .tb-badge.pulse, .key.cue, .exfil .loot.go, .exfil .srv.hit .ico, .after .cal span, .after .ok-ic, .after.on, .overlay.on { animation: none; }
  .cb.spin .box::after { border-top-color: #1f7a4d; }
  .tb-badge.pulse { box-shadow: none; }
  .key.cue { box-shadow: 0 0 0 3px var(--accent-soft); }
  .exfil .loot.go { opacity: 1; }
}

/* 見分け方のカード */
.signs { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .signs { grid-template-columns: 1fr 1fr; } }
.signs div { background: var(--bg); padding: clamp(22px, 3vw, 32px); }
.signs h3 { font-size: 1.02rem; margin-bottom: 8px; }
.signs p { color: var(--ink-2); font-size: .92rem; }

/* いろいろな顔（4つの亜種） */
.faces { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 640px) { .faces { grid-template-columns: 1fr 1fr; } }
.face { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
/* ミニ画面は 16:9 を基本に、文字が収まらないときは縦に伸ばす。見出しは画面の下に置き、文字に重ねない */
.face .pic { position: relative; overflow: hidden; color-scheme: light; display: flex; flex-direction: column; }
.face .pic > div:first-child { position: relative; inset: auto; aspect-ratio: 16 / 9; flex: 1 0 auto; }
.face .pic .cap { background: #2b2f36; color: #fff; font-size: .75rem; padding: 4px 10px; font-family: var(--mono); letter-spacing: .04em; }
.face .flip { appearance: none; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; padding: 14px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (hover: hover) { .face .flip:hover { background: var(--bg-2); } }
.face .flip .q { font-family: var(--font-head); font-weight: 700; font-size: .96rem; }
.face .flip .mk { font-family: var(--mono); color: var(--ink-3); flex: none; }
.face .ans { padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .4s ease, padding .4s ease; }
.face.open .ans { max-height: 320px; padding: 0 16px 16px; }
.face.open .flip .mk { color: var(--accent); }
.face .ans .verdict { color: var(--danger); font-family: var(--font-head); font-weight: 700; font-size: .9rem; margin: 4px 0 6px; }
.face .ans p { color: var(--ink-2); font-size: .88rem; margin: 0; }
@media (prefers-reduced-motion: reduce) { .face .ans { transition: none; } }
/* 亜種のミニ画面（固定色） */
.m-bsod { position: absolute; inset: 0; background: #0a63c4; color: #fff; padding: 12px 14px; font-family: "Segoe UI", var(--font-body); }
.m-bsod .face-ic { font-size: 1.6rem; }
.m-bsod .msg { font-size: .78rem; line-height: 1.6; margin-top: 4px; }
.m-bsod .msg b { font-family: var(--mono); font-weight: 400; background: rgba(255,255,255,.2); border-radius: 3px; padding: 0 4px; }
.m-wp { position: absolute; inset: 0; background: #f4f6f8; color: #23282d; }
.m-wp .bar { background: #1d2327; color: #fff; font-size: .75rem; padding: 5px 10px; }
.m-wp .body { padding: 12px 14px; }
.m-wp .warn { background: #fff; border-left: 4px solid #d63638; border-radius: 3px; padding: 8px 10px; font-size: .78rem; line-height: 1.6; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.m-wp .warn b { font-family: var(--mono); font-weight: 400; }
.m-doc { position: absolute; inset: 0; background: #e9ebee; display: grid; place-items: center; }
.m-doc { padding: 14px 0; }
/* 窓は文書の行に重ねて置き、文字が増えた分だけ文書の紙が伸びる */
.m-doc .sheet { background: #fff; width: 72%; min-height: 78%; padding-bottom: 14px; border-radius: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.2); position: relative; overflow: hidden; }
.m-doc .sheet .ln { display: block; height: 5px; background: #e2e4e8; border-radius: 3px; margin: 10px 14px; }
.m-doc .sheet .ln:first-child { margin-top: 16px; width: 50%; background: #cfd3d8; }
.m-doc .modal { position: relative; margin: -12px 10% 0; background: #fff; border: 1px solid #c9ccd1; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.3); padding: 10px 12px; font-size: .75rem; line-height: 1.6; color: #23282d; }
.m-doc .modal b { font-family: var(--mono); font-weight: 400; background: #eef0f2; border-radius: 3px; padding: 0 4px; }
.m-mac { position: absolute; inset: 0; background: linear-gradient(160deg, #3a3f52, #23262f); display: grid; place-items: center; }
.m-mac .win { background: #ecedef; width: 80%; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.4); color: #23262f; }
.m-mac .win .tt { background: #dcdee1; padding: 5px 10px; display: flex; gap: 5px; }
.m-mac .win .tt i { width: 9px; height: 9px; border-radius: 50%; background: #c6c8cb; }
.m-mac .win .tt i:first-child { background: #ff5f57; } .m-mac .win .tt i:nth-child(2) { background: #febc2e; } .m-mac .win .tt i:nth-child(3) { background: #28c840; }
.m-mac { padding: 14px 0; }
.m-mac .win .in { padding: 10px 12px; font-size: .75rem; line-height: 1.6; }
.m-mac .win .in b { font-family: var(--mono); font-weight: 400; background: #fff; border: 1px solid #d4d6da; border-radius: 3px; padding: 0 4px; }

/* 押してしまったら */
.acts { display: grid; gap: 16px; counter-reset: a; }
@media (min-width: 760px) { .acts { grid-template-columns: repeat(3, 1fr); } }
.acts .card { border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 28px); background: var(--surface); position: relative; }
.acts .card .n { counter-increment: a; font-family: var(--mono); font-size: .82rem; color: var(--accent); }
.acts .card .n::before { content: counter(a, decimal-leading-zero); }
.acts .card h3 { font-size: 1.04rem; margin: 6px 0 8px; }
.acts .card p { color: var(--ink-2); font-size: .9rem; margin: 0; }

/* 元は style 属性だった指定（CSP の style-src に 'unsafe-inline' を付けないため、ここへ移した） */
.run-main { flex: 1; min-width: 0; }
