/* 『個人情報』たたき台
   デザイン方針：ゲーム画面ではなく「実在のPC画面」に見せる。
   OS標準のウィンドウ枠・ボタン・フォントを使い、地味で実在寄りに統一する。 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1b1b1b; --ink2: #5a5a5a; --line: #a6a6a6; --line-soft: #d6d6d6;
  --dlg: #f0f0f0; --accent: #0078d7; --accent-dark: #005a9e;
  --danger: #c42b1c;
  --q0: #8a8a8a; --q1: #2b5fc7; --q2: #a67c00;
}
html, body { height: 100%; }
body {
  font-family: "Yu Gothic UI", "Segoe UI", Meiryo, "Hiragino Kaku Gothic ProN", sans-serif;
  background: #111; color: var(--ink); overflow: hidden;
  -webkit-user-select: none; user-select: none; font-size: 14px;
}
input, textarea { user-select: text; -webkit-user-select: text; font: inherit; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ===== ステージ（PC画面そのもの） ===== */
#stage { position: fixed; inset: 0; display: flex; flex-direction: column; }
#wallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 70% -10%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 15% 110%, rgba(30,70,50,.35), transparent 60%),
    linear-gradient(160deg, #7ba7cc 0%, #5b8ab5 40%, #476f96 75%, #3c5f80 100%);
}
/* デスクトップアイコン */
#deskIcons { position: absolute; top: 12px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.desk-icon { width: 84px; text-align: center; color: #fff; cursor: pointer; padding: 7px 2px 5px; border: 1px solid transparent; border-radius: 2px; }
.desk-icon:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); }
.desk-icon:active { background: rgba(255,255,255,.28); }
.di-img { font-size: 30px; line-height: 1.1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.di-label { font-size: 11px; text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 6px rgba(0,0,0,.5); margin-top: 3px; line-height: 1.3; }

/* ===== ウィンドウ（OS標準風） ===== */
.screen { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; justify-content: center; padding: 14px; min-height: 0; }
.win {
  background: var(--dlg); border: 1px solid #6e6e6e;
  box-shadow: 0 4px 24px rgba(0,0,0,.45);
  width: min(1180px, 97vw); height: 100%; max-height: calc(100dvh - 72px);
  display: flex; flex-direction: column; overflow: hidden; border-radius: 4px;
}
.win-titlebar {
  background: #fff; border-bottom: 1px solid var(--line-soft);
  padding: 0 0 0 10px; height: 34px; font-size: 12.5px; display: flex; align-items: center; gap: 7px; flex: none;
}
.win-appicon { font-size: 14px; }
.win-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #222; }
.titlebar-right { margin-left: auto; color: var(--ink2); font-size: 12px; padding-right: 8px; }
.win-captions { margin-left: auto; display: flex; align-self: stretch; }
.titlebar-right + .win-captions { margin-left: 0; }
.win-captions span { width: 44px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #333; cursor: pointer; }
.win-captions span:hover { background: #e5e5e5; }
.win-captions .cap-close:hover { background: #e81123; color: #fff; }

/* ===== タスクバー ===== */
#taskbar {
  position: relative; z-index: 4; height: 44px; flex: none;
  background: rgba(24,24,24,.96); color: #eee; display: flex; align-items: stretch;
  font-size: 13px;
}
.tb-start { width: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tb-start:hover { background: rgba(255,255,255,.12); }
.tb-winlogo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 17px; height: 17px; }
.tb-winlogo i { background: #fff; display: block; }
.tb-search { width: 220px; background: #fff; color: #666; display: flex; align-items: center; padding: 0 12px; font-size: 12.5px; margin: 5px 4px 5px 0; }
.tb-apps { display: flex; align-items: center; gap: 2px; padding: 0 6px; }
.tb-app { width: 40px; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 17px; cursor: pointer; border-bottom: 2px solid transparent; }
.tb-app:hover { background: rgba(255,255,255,.12); }
.tb-center { flex: 1; display: flex; align-items: center; justify-content: center; color: #bdbdbd; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.tb-tray { display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.tb-tray-icons { font-size: 12px; color: #ddd; letter-spacing: 2px; }
.tb-clock { font-size: 12px; text-align: center; line-height: 1.25; white-space: pre; }

/* ===== 標準ボタン ===== */
.btn {
  font: inherit; font-size: 13px; padding: 6px 18px; min-height: 30px;
  background: #e1e1e1; border: 1px solid #adadad; color: #111; cursor: pointer; border-radius: 2px;
}
.btn:hover { background: #e5f1fb; border-color: var(--accent); }
.btn:active { background: #cce4f7; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-plain { background: #e1e1e1; }
.btn-primary { background: var(--accent); border-color: var(--accent-dark); color: #fff; }
.btn-primary:hover { background: #1683dd; border-color: var(--accent-dark); }
.btn-primary:active { background: var(--accent-dark); }
.btn-danger { background: #e1e1e1; border-color: var(--danger); color: var(--danger); font-weight: 600; }
.btn-danger:hover { background: #fdecea; border-color: var(--danger); }
.btn-block { width: 100%; margin-top: 12px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn-disconnect { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; background: #e1e1e1; border: 1px solid #888; }
.btn-disconnect:hover { background: #fdecea; border-color: var(--danger); color: var(--danger); }

/* ===== グループボックス（OS標準の区切り） ===== */
.group-box { border: 1px solid var(--line-soft); background: #fafafa; padding: 12px 14px; position: relative; }
.group-title { font-size: 12px; font-weight: 600; color: #333; margin-bottom: 8px; }
.group-box .group-title:not(:first-child) { margin-top: 14px; }
.grow { flex: 1; }

/* ===== フォルダ（ハブ） ===== */
.folder-path { background: #fff; border-bottom: 1px solid var(--line-soft); padding: 6px 12px; font-size: 12px; color: var(--ink2); flex: none; }
.hub-body { display: flex; gap: 12px; padding: 12px; overflow: auto; min-height: 0; background: #fff; flex: 1; }
.hub-left { width: 360px; flex: none; display: flex; flex-direction: column; gap: 12px; }
.hub-right { flex: 1; min-width: 0; display: flex; }
.status-table { border-collapse: collapse; font-size: 13px; width: 100%; }
.status-table th { text-align: left; font-weight: 500; color: var(--ink2); padding: 3px 8px 3px 0; width: 110px; }
.status-table td { padding: 3px 0; font-weight: 600; }
.map-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.map-cell { aspect-ratio: 1; background: #dde3e8; border-radius: 1px; }
.map-cell.lit { background: #e8a33d; box-shadow: 0 0 5px rgba(232,163,61,.7); }
.map-note { font-size: 11.5px; color: var(--ink2); margin-top: 6px; }
.tools-mini-list { font-size: 13px; line-height: 1.7; }
.folder-btns { display: flex; gap: 8px; margin-top: 12px; }
.folder-btns .btn { flex: 1; }
.ranking-list { font-size: 13px; display: flex; flex-direction: column; }
.rank-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; border-bottom: 1px solid #e6e6e6; }
.rank-row:nth-child(odd) { background: #f7f9fb; }
.rank-row .r-pos { font-weight: 600; color: var(--ink2); width: 26px; text-align: right; }
.rank-row .r-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .r-money { font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-row .r-meta { font-size: 11.5px; color: var(--ink2); }
.rank-row .r-end { font-size: 11px; padding: 0 7px; border: 1px solid var(--line-soft); border-radius: 99px; color: var(--ink2); background: #fff; }
.rank-row .r-end.arrested { color: var(--danger); border-color: #e5b4b0; }
.rank-empty { color: var(--ink2); font-size: 12.5px; padding: 6px 0; }

/* ===== ブラウザ ===== */
.browser-win { background: #fff; }
.browser-tabstrip { background: #dee1e6; display: flex; align-items: flex-end; padding: 6px 8px 0; gap: 4px; flex: none; }
.browser-tab {
  background: #fff; border-radius: 8px 8px 0 0; padding: 7px 12px; font-size: 12.5px;
  display: flex; align-items: center; gap: 8px; width: 250px; color: #333;
}
.tab-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-close { color: #777; border-radius: 50%; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; }
.tab-close:hover { background: #e8eaed; color: #111; }
.browser-tab-new { padding: 5px 10px; color: #555; font-size: 14px; cursor: pointer; border-radius: 50%; }
.browser-caps { margin-left: auto; align-self: stretch; display: flex; }
.browser-caps span { width: 44px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #333; cursor: pointer; }
.browser-caps span:hover { background: rgba(0,0,0,.08); }
.browser-caps .cap-close:hover { background: #e81123; color: #fff; }
.browser-toolbar { display: flex; gap: 4px; align-items: center; padding: 6px 10px; background: #fff; flex: none; }
.tb-btn { font: inherit; width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; cursor: pointer; font-size: 15px; color: #444; flex: none; }
.tb-btn:hover { background: #eef0f2; }
.url-wrap { flex: 1; display: flex; align-items: center; gap: 7px; background: #f1f3f4; border-radius: 99px; padding: 0 14px; height: 32px; border: 1px solid transparent; }
.url-wrap:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.url-lock { font-size: 11px; }
#urlBar { flex: 1; border: none; outline: none; font-size: 13px; background: transparent; min-width: 0; color: #222; }
.bookmarks-bar { display: flex; gap: 16px; align-items: center; padding: 5px 14px; background: #fff; border-bottom: 1px solid #e3e5e8; font-size: 12px; color: #444; flex: none; }
.bm { cursor: pointer; white-space: nowrap; }
.bm:hover { text-decoration: underline; }
.bm-right { margin-left: auto; color: var(--ink2); }
.bm-right b { color: var(--danger); font-variant-numeric: tabular-nums; }
.alert-bar { height: 4px; background: #eee; flex: none; }
#alertFill { height: 100%; width: 0%; background: #d9a514; transition: width .3s; }
.site-view { flex: 1; overflow: auto; background: #fff; min-height: 0; }
.browser-bottom { flex: none; border-top: 1px solid var(--line-soft); background: var(--dlg); padding: 8px 10px; display: flex; gap: 10px; align-items: stretch; }
.op-log { flex: 1; height: 72px; overflow: auto; font-family: Consolas, "Courier New", monospace; font-size: 11px; background: #fff; border: 1px solid var(--line); color: #333; padding: 6px 9px; line-height: 1.6; }
.op-log .log-warn { color: #9a6b00; }
.op-log .log-bad { color: var(--danger); }
.op-log .log-good { color: #177245; }
.browser-actions { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 230px; }
.exploit-state { font-size: 12px; color: var(--ink2); text-align: center; }
.exploit-state.open { color: #177245; font-weight: 700; }

/* ブラウザのスタートページ（新しいタブ） */
.startpage { padding: 34px 40px; }
.startpage h2 { font-size: 20px; font-weight: 500; color: #333; margin-bottom: 4px; }
.startpage .sp-sub { font-size: 13px; color: #777; margin-bottom: 22px; }
.sp-section { font-size: 12.5px; font-weight: 600; color: #555; margin: 18px 0 10px; }
.target-list { display: flex; flex-direction: column; border: 1px solid #e0e0e0; }
.target-row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; background: #fff; border-bottom: 1px solid #e8e8e8; }
.target-row:last-child { border-bottom: none; }
.target-row.playable { cursor: pointer; }
.target-row.playable:hover { background: #f0f6fd; }
.target-row.locked { opacity: .55; background: #fafafa; }
.target-logo { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; border-radius: 4px; }
.target-main { flex: 1; min-width: 0; }
.target-name { font-weight: 600; font-size: 15px; }
.target-name .t-done { font-size: 11px; color: #177245; border: 1px solid #9fd4ba; border-radius: 99px; padding: 0 7px; margin-left: 8px; font-weight: 500; }
.target-desc { font-size: 12px; color: var(--ink2); margin-top: 2px; }
.target-meta { display: flex; gap: 14px; font-size: 12px; margin-top: 5px; color: var(--ink2); flex-wrap: wrap; }
.target-meta b { color: var(--ink); font-weight: 600; }
.target-go { font-size: 13px; color: var(--accent); white-space: nowrap; }

/* ほのぼの商店（少し古い小さい通販サイト） */
.shop-site { color: #333; background: #fff; font-size: 13px; }
.shop-head { background: #fdf3e3; border-bottom: 3px solid #d9a05a; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.shop-logo { font-size: 20px; font-weight: 700; color: #9c5a13; letter-spacing: .05em; }
.shop-logo small { display: block; font-size: 10px; font-weight: 400; color: #a58a68; letter-spacing: 0; }
.shop-nav { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; }
.shop-nav a { color: #1a56c4; text-decoration: underline; cursor: pointer; }
.shop-body-wrap { display: flex; }
.shop-side { width: 168px; flex: none; border-right: 1px solid #e8dcc4; padding: 14px 12px; background: #fffaf1; }
.shop-side h4 { font-size: 12px; color: #9c5a13; border-bottom: 1px solid #e8dcc4; padding-bottom: 5px; margin-bottom: 8px; }
.shop-side ul { list-style: none; font-size: 12.5px; line-height: 2.0; }
.shop-side ul a { color: #1a56c4; text-decoration: underline; cursor: pointer; }
.shop-side .side-note { font-size: 11px; color: #999; margin-top: 14px; line-height: 1.7; }
.shop-main { padding: 16px 20px; flex: 1; min-width: 0; }
.shop-main h2 { font-size: 16px; margin-bottom: 8px; color: #333; border-left: 4px solid #d9a05a; padding-left: 8px; }
.shop-main p { font-size: 12.5px; line-height: 1.85; }
.goods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin-top: 10px; }
.goods { border: 1px solid #e0d4bd; background: #fff; }
.goods-img { height: 70px; background: #f4efe6; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #a08b76; border-bottom: 1px solid #eee2cc; text-align: center; padding: 4px; }
.goods-body { padding: 7px 9px; font-size: 12px; }
.goods-name { font-weight: 600; }
.goods-price { color: #b3541e; font-weight: 700; margin-top: 2px; }
.order-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.order-table th, .order-table td { border: 1px solid #e0d4bd; padding: 6px 10px; text-align: left; }
.order-table th { background: #fdf3e3; width: 120px; font-weight: 600; }
.site-note { margin-top: 14px; font-size: 11px; color: #999; line-height: 1.7; border-top: 1px dotted #ccc; padding-top: 8px; }
.csv-btn { margin-top: 12px; font: inherit; font-size: 12.5px; padding: 6px 14px; border: 1px solid #b8a888; background: #f5efe0; cursor: pointer; border-radius: 2px; }
.csv-btn:hover { background: #efe6cf; }
.other-banner { background: #fdf0ef; border: 1px solid #e5b4b0; color: #8c2b21; padding: 8px 11px; font-size: 12px; margin-bottom: 12px; line-height: 1.6; }
.site-error { padding: 36px 22px; text-align: center; color: #666; }
.site-error .err-code { font-size: 28px; font-weight: 700; color: #bbb; }
.mypage-links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mypage-links button { font: inherit; font-size: 12.5px; padding: 6px 14px; border: 1px solid #b8a888; background: #fff; cursor: pointer; border-radius: 2px; }
.mypage-links button:hover { background: #fdf3e3; }
.shop-foot { border-top: 1px solid #e8dcc4; padding: 10px 20px; font-size: 11px; color: #999; text-align: center; }

/* ===== 抽出（転送モニタ＝地味な道具） ===== */
.extract-body { display: flex; gap: 12px; padding: 12px; min-height: 0; flex: 1; background: #fff; }
.ext-left { flex: 1.5; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ext-right { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 250px; }
.counters { display: flex; gap: 12px; }
.counter { flex: 1; background: #fff; border: 1px solid var(--line); box-shadow: inset 0 0 0 1px #fff, inset 2px 2px 4px rgba(0,0,0,.06); padding: 10px 14px; }
.counter-label { font-size: 11.5px; color: var(--ink2); }
.counter-line { display: flex; align-items: baseline; gap: 8px; }
.counter-value { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: .01em; }
.counter-sub { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.stream-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: #333; }
.stream-legend { font-weight: 400; color: var(--ink2); font-size: 11.5px; }
.lg { display: inline-block; width: 9px; height: 9px; margin: 0 3px 0 8px; }
.lg0 { background: var(--q0); } .lg1 { background: var(--q1); } .lg2 { background: var(--q2); }
.stream-view { flex: 1; background: #fff; border: 1px solid var(--line); box-shadow: inset 2px 2px 4px rgba(0,0,0,.06); overflow: hidden; padding: 6px 9px; font-family: Consolas, "Courier New", monospace; font-size: 11px; line-height: 1.75; color: #333; min-height: 80px; }
.srow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .sq { display: inline-block; width: 8px; height: 8px; margin-right: 7px; }
.sq0 { background: var(--q0); } .sq1 { background: var(--q1); } .sq2 { background: var(--q2); }
.srow.q2 { font-weight: 700; }
.ext-log { height: 78px; overflow: auto; background: #fafafa; border: 1px solid var(--line-soft); padding: 6px 9px; font-size: 12px; line-height: 1.65; color: var(--ink2); }
.ext-log .ev-warn { color: var(--danger); font-weight: 600; }
.det-bar { height: 18px; background: #e6e6e6; border: 1px solid var(--line); margin-top: 4px; }
#detFill { height: 100%; width: 0%; background: #5aa15f; transition: width .15s linear, background .3s; }
.det-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: 5px; font-size: 12.5px; }
.det-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.speed-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.speed-btn.active { background: var(--accent); border-color: var(--accent-dark); color: #fff; }
.speed-note { font-size: 12px; color: var(--ink2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.event-banner { border: 1px solid #d9c27a; background: #fdf6da; padding: 9px 11px; font-size: 12.5px; line-height: 1.6; color: #5c4a08; }
.event-banner.bad { background: #fdf0ef; border-color: #e5b4b0; color: #8c2b21; }
.cut-progress { position: relative; height: 28px; background: #e6e6e6; border: 1px solid var(--line); overflow: hidden; }
.cut-progress #cutFill { height: 100%; width: 0%; background: var(--accent); }
.cut-progress span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; }
.ext-hint { font-size: 11.5px; color: var(--ink2); text-align: center; }

/* ===== ニュース（精算） ===== */
.news-win { background: #fff; }
.news-topbar { display: flex; gap: 18px; padding: 7px 22px; background: #26355c; color: #cfd9ec; font-size: 12px; flex: none; }
.news-topbar span { cursor: pointer; }
.news-top-right { margin-left: auto; }
.news-masthead { padding: 12px 22px 8px; border-bottom: 1px solid #ddd; flex: none; }
.news-logo { font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif; font-size: 25px; font-weight: 800; color: #16233f; }
.news-body { padding: 14px 22px 20px; overflow: auto; min-height: 0; }
.news-crumb { font-size: 11.5px; color: #888; margin-bottom: 8px; }
.news-body h1 { font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif; font-size: clamp(18px, 2.4vw, 25px); line-height: 1.5; margin-bottom: 8px; color: #111; }
.news-meta { font-size: 12px; color: #888; display: flex; gap: 14px; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 12px; }
.news-lead { font-size: 13.5px; line-height: 1.9; font-weight: 600; }
.news-text { font-size: 13px; line-height: 1.95; color: #333; margin-top: 8px; }
.settle-flex { display: flex; gap: 22px; margin-top: 18px; align-items: flex-start; }
.settle-main { flex: 1; min-width: 0; }
.private-box { border: 1px solid var(--line-soft); background: #fafafa; padding: 14px 16px; }
.settle-h { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: #222; }
.settle-side .settle-h { margin-top: 16px; }
.settle-side .settle-h:first-child { margin-top: 0; }
.settle-table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.settle-table th, .settle-table td { border: 1px solid #ccc; padding: 6px 11px; text-align: right; font-variant-numeric: tabular-nums; }
.settle-table th:first-child, .settle-table td:first-child { text-align: left; }
.settle-table thead th { background: #efefef; font-weight: 600; }
.settle-table tfoot td { font-weight: 700; background: #f7f7f7; }
.settle-run { font-size: 12.5px; line-height: 1.85; margin-top: 12px; color: #333; }
.news-actions { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; }
.settle-side { width: 240px; flex: none; border-left: 1px solid #eee; padding-left: 18px; }
.related { list-style: none; font-size: 12px; line-height: 1.6; color: #1a56c4; }
.related li { padding: 5px 0; border-bottom: 1px dotted #ddd; cursor: pointer; }
.related li:hover { text-decoration: underline; }

/* ===== ショップ ===== */
.shop-win { background: #fff; }
.shop-note { padding: 10px 16px 0; font-size: 12px; color: var(--ink2); }
.shop-list { display: flex; gap: 12px; padding: 14px 16px; overflow: auto; }
.shop-card { flex: 1; border: 1px solid var(--line-soft); background: #fff; padding: 14px; display: flex; flex-direction: column; gap: 7px; }
.shop-card:hover { border-color: var(--accent); }
.shop-name { font-weight: 700; font-size: 15px; }
.shop-sys { font-size: 11px; color: var(--ink2); }
.shop-desc { font-size: 12px; line-height: 1.7; color: var(--ink2); flex: 1; }
.shop-level { display: flex; gap: 4px; }
.lv-dot { width: 22px; height: 7px; background: #e0e0e0; }
.lv-dot.on { background: var(--accent); }
.shop-price { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.shop-actions { padding: 0 16px 14px; display: flex; justify-content: flex-end; }

/* ===== ラン終了 ===== */
.runend-win { background: #fff; }
.runend-body { padding: 20px 24px; overflow: auto; }
.runend-summary { font-size: 14px; line-height: 2.0; }
.runend-summary .big { font-size: 22px; font-weight: 800; }
.name-label { display: block; margin: 16px 0; font-size: 12.5px; color: var(--ink2); }
.name-label input { display: block; margin-top: 6px; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); width: min(340px, 90%); background: #fff; }

/* ===== 生活感ファイル ===== */
.flavor-win { width: min(560px, 94vw); height: auto; max-height: calc(100dvh - 72px); }
.flavor-body { padding: 16px 20px; overflow: auto; background: #fff; font-size: 13px; line-height: 1.9; white-space: pre-wrap; }
.flavor-body .photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; white-space: normal; }
.photo-cell { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 11px; color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* ===== モーダル（OSダイアログ風） ===== */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(20,20,20,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border: 1px solid #6e6e6e; box-shadow: 0 8px 32px rgba(0,0,0,.5); padding: 20px 22px; width: min(600px, 94vw); max-height: 92dvh; overflow: auto; border-radius: 4px; }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.modal-desc { font-size: 12.5px; color: var(--ink2); line-height: 1.8; }
.music-choices { display: flex; gap: 10px; margin-top: 14px; }
.music-card { flex: 1; border: 1px solid var(--line); border-radius: 2px; padding: 13px 14px; cursor: pointer; background: #fff; text-align: left; font: inherit; }
.music-card:hover { background: #e5f1fb; border-color: var(--accent); }
.music-genre { font-size: 11px; font-weight: 700; color: var(--accent-dark); letter-spacing: .06em; }
.music-name { font-size: 15px; font-weight: 700; margin-top: 3px; }
.music-mood { font-size: 12px; color: var(--ink2); margin-top: 3px; line-height: 1.6; }
.modal-btns { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }

/* ===== 逮捕ムービー ===== */
#arrestOverlay { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; align-items: center; justify-content: center; }
#arrestVideo { width: 100%; height: 100%; object-fit: contain; }

/* ===== 強制横画面：縦持ち時は画面ごと90度回転して常に横画面表示にする ===== */
/* 『クルマを壊すオンライン』（game_template.html）と同方式：
   縦ビューポートではルート要素を width:100vh / height:100vw にして
   transform-origin:bottom left ＋ top:-100vw で置き、rotate(90deg) で回す。
   ブラウザ自体が回転しなくても、端末を横に倒せば正立した横画面になる。 */
@media (orientation: portrait) {
  #stage {
    inset: auto;
    left: 0; top: -100vw; top: -100dvw;
    width: 100vh; width: 100dvh;
    height: 100vw; height: 100dvw;
    transform: rotate(90deg); transform-origin: bottom left;
  }
  /* 回転後の座標系では、見かけの幅＝物理vh／見かけの高さ＝物理vw。
     vw・dvh 基準で書かれた寸法は vh・vw へ読み替える */
  .win { width: min(1180px, 97vh); max-height: calc(100vw - 72px); }
  .flavor-win { width: min(560px, 94vh); max-height: calc(100vw - 72px); }
  /* #stage の外にある全画面要素（モーダル／逮捕ムービー）も同じ回転で揃える */
  .modal, #arrestOverlay {
    inset: auto;
    left: 0; top: -100vw; top: -100dvw;
    width: 100vh; width: 100dvh;
    height: 100vw; height: 100dvw;
    transform: rotate(90deg); transform-origin: bottom left;
  }
  .modal-box { width: min(600px, 94vh); max-height: 92vw; }
  .news-body h1 { font-size: clamp(18px, 2.4vh, 25px); }
  /* 回転表示時の見かけの高さは物理幅ぶん（スマホで約400px）しかないため、
     「小さい横画面」向けの詰め調整も portrait 側で併用する
     （@media (max-height:500px) は物理の高さで判定され、縦持ちでは発火しない） */
  .counter-value { font-size: 25px; }
  .hub-left { width: 310px; }
  .desk-icon { width: 66px; padding: 4px 2px 3px; } .di-img { font-size: 23px; }
  .op-log { height: 54px; }
  .ext-log { height: 56px; }
  .startpage { padding: 20px 24px; }
}

/* ===== 小さい横画面（スマホ横持ち） ===== */
@media (max-height: 500px) {
  .win { max-height: calc(100dvh - 56px); }
  .counter-value { font-size: 25px; }
  .hub-left { width: 310px; }
  .desk-icon { width: 66px; padding: 4px 2px 3px; } .di-img { font-size: 23px; }
  .op-log { height: 54px; }
  .ext-log { height: 56px; }
  .startpage { padding: 20px 24px; }
}
