/* ===== 管理バー（ゲーム外の層。仮想OSとはデザインを分ける） ===== */
:root{
  --mg-bg:#1c1d1f; --mg-fg:#ecebe6; --mg-line:#3a3c40; --mg-accent:#f2c14e;
  --os-font:"Segoe UI Variable Text","Segoe UI","Yu Gothic UI","Meiryo UI",system-ui,sans-serif;
  --win-bg:#f3f3f3; --win-line:#a7adb3; --accent:#0a5fc2;
  --sel:#cce8ff; --sel-line:#99d1ff; --hover:#e5f3ff; --muted:#5f6368;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#111;overflow:hidden}
body{display:flex;flex-direction:column}
button{font:inherit;color:inherit}

#mgmt{height:36px;flex:none;display:flex;align-items:center;gap:6px;padding:0 10px;
  background:var(--mg-bg);color:var(--mg-fg);border-bottom:2px solid var(--mg-accent);
  font:12.5px/1 "BIZ UDGothic","Yu Gothic UI","Meiryo",sans-serif;user-select:none;position:relative;z-index:20}
.mg-badge{background:var(--mg-accent);color:#1c1d1f;font-weight:700;padding:4px 8px;border-radius:3px;letter-spacing:.04em;white-space:nowrap}
.mg-title{font-weight:700;letter-spacing:.06em;white-space:nowrap}
.mg-spacer{flex:1}
.mg-btn{background:transparent;border:1px solid var(--mg-line);border-radius:4px;padding:6px 10px;cursor:pointer;white-space:nowrap}
.mg-btn:hover{background:#2b2d31}
.mg-btn:focus-visible{outline:2px solid var(--mg-accent);outline-offset:1px}
.mg-toast{color:var(--mg-accent);margin-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}

/* ゲーム層のモーダル（導入・記録・設定） */
#overlay{position:fixed;inset:0;z-index:50;background:rgba(10,10,12,.72);display:flex;align-items:center;justify-content:center;padding:16px}
#overlay[hidden]{display:none}
.ov-card{background:#fbfaf7;color:#1c1d1f;border-radius:6px;max-width:760px;width:100%;max-height:calc(100vh - 40px);overflow:auto;
  padding:28px 30px;font:14px/1.8 "BIZ UDGothic","Yu Gothic UI","Meiryo",sans-serif;box-shadow:0 20px 60px rgba(0,0,0,.5);border-top:6px solid var(--mg-accent)}
.ov-card h1{font-size:22px;margin:0 0 6px;letter-spacing:.06em}
.ov-card h2{font-size:15px;margin:22px 0 6px;border-bottom:1px solid #ddd;padding-bottom:4px}
.ov-card p{margin:8px 0}
.ov-card .lead{font-size:16px}
.ov-card .note{color:#666;font-size:12.5px}
.ov-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px;flex-wrap:wrap}
.ov-btn{border:1px solid #bbb;background:#fff;border-radius:4px;padding:8px 18px;cursor:pointer}
.ov-btn.primary{background:#1c1d1f;color:#fff;border-color:#1c1d1f}
.ov-btn:focus-visible{outline:2px solid var(--mg-accent);outline-offset:2px}
.ov-table{border-collapse:collapse;width:100%;font-size:13px}
.ov-table td,.ov-table th{border-bottom:1px solid #e3e1db;padding:5px 6px;text-align:left;vertical-align:top}
.ov-table th{white-space:nowrap;color:#555;font-weight:600}
.disc-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;font-size:13px}
.disc-list li{padding:6px 8px;border:1px solid #e3e1db;border-radius:4px;line-height:1.5}
.disc-list li.got{border-color:#1c1d1f;background:#fff}
.disc-list li.no{color:#9a978f}
.disc-id{font-family:Consolas,monospace;font-size:11px;color:#888;margin-right:6px}
.result-wrap canvas{width:100%;height:auto;border:1px solid #ddd;border-radius:4px;display:block}
.set-row{display:flex;align-items:center;gap:10px;margin:10px 0}
.set-row label{min-width:9em}

/* ===== ゲーム内PC ===== */
#game{position:relative;flex:1;overflow:hidden;outline:none;background:#000;isolation:isolate;z-index:0}
#screen{position:absolute;inset:0;overflow:hidden;font:13px/1.35 var(--os-font);color:#1b1b1b;user-select:none;cursor:default}
#wallpaper{position:absolute;inset:0;
  background:
   radial-gradient(60% 70% at 18% 22%, rgba(214,240,222,.95) 0, rgba(214,240,222,0) 60%),
   radial-gradient(55% 60% at 82% 78%, rgba(64,132,140,.85) 0, rgba(64,132,140,0) 65%),
   radial-gradient(40% 50% at 70% 25%, rgba(150,205,190,.8) 0, rgba(150,205,190,0) 70%),
   linear-gradient(140deg,#cfe8da 0%,#8fc4bf 45%,#3f7690 100%)}
#wallpaper::after{content:"";position:absolute;right:9%;top:16%;width:34vmin;height:34vmin;border-radius:0 70% 0 70%;
  border:2px solid rgba(255,255,255,.35);transform:rotate(-18deg)}
#wallpaper::before{content:"";position:absolute;right:calc(9% + 17vmin);top:16%;width:2px;height:48vmin;background:rgba(255,255,255,.25);transform-origin:top;transform:rotate(-63deg)}

#desktop{position:absolute;left:0;top:0;right:0;bottom:48px;padding:6px 4px;outline:none;
  display:grid;grid-auto-flow:column;grid-template-rows:repeat(auto-fill,92px);grid-auto-columns:86px;gap:2px;align-content:start}
#desktop.no-shell{display:none}
.ditem{position:relative;width:82px;height:90px;display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 2px 2px;
  border:1px solid transparent;border-radius:3px;color:#fff;text-align:center}
.ditem .ico{width:42px;height:42px;position:relative;flex:none}
.ditem .lbl{font-size:12px;line-height:1.3;text-shadow:0 0 3px rgba(0,0,0,.9),0 1px 2px rgba(0,0,0,.7);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-all;max-width:80px}
.ditem:hover{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.22)}
.ditem.sel{background:rgba(255,255,255,.3);border-color:rgba(255,255,255,.55)}
.ditem.sel .lbl{-webkit-line-clamp:5}
#desktop:focus .ditem.focus{outline:1px dotted rgba(255,255,255,.9);outline-offset:-2px}
.cut{opacity:.5}
.drop-hover{background:rgba(0,120,215,.28)!important;border-color:rgba(0,120,215,.7)!important}
.ico svg{width:100%;height:100%;display:block}
.ico .lnk{position:absolute;left:-2px;bottom:-2px;width:45%;height:45%}

/* 範囲選択 */
.marquee{position:absolute;border:1px solid #0078d7;background:rgba(0,120,215,.18);pointer-events:none;z-index:5}

/* ===== ウインドウ ===== */
#windows{position:absolute;inset:0;pointer-events:none}
.win{position:absolute;display:flex;flex-direction:column;background:var(--win-bg);pointer-events:auto;
  border:1px solid var(--win-line);border-radius:8px;box-shadow:0 4px 14px rgba(0,0,0,.18);overflow:hidden;min-width:220px}
.win.active{box-shadow:0 10px 32px rgba(0,0,0,.32);border-color:#7d8389}
.win.max{border-radius:0;border-width:0}
.win.minimized{display:none}
.win.dialog{background:#fff;border-radius:8px}
.tb{height:32px;flex:none;display:flex;align-items:center;background:#eef0f2;padding-left:10px;gap:8px}
.win.active .tb{background:#e3e7ea}
.tb .ticon{width:16px;height:16px;flex:none}
.tb .ttl{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:#444}
.win.active .tb .ttl{color:#111}
.tbb{width:46px;height:32px;border:0;background:transparent;display:flex;align-items:center;justify-content:center;cursor:default}
.tbb:hover{background:rgba(0,0,0,.07)}
.tbb.close:hover{background:#c42b1c;color:#fff}
.tbb svg{width:10px;height:10px}
.wbody{flex:1;display:flex;flex-direction:column;min-height:0;position:relative;background:#fff}
.rh{position:absolute;z-index:3}
.rh.n{top:-3px;left:6px;right:6px;height:6px;cursor:ns-resize}
.rh.s{bottom:-3px;left:6px;right:6px;height:6px;cursor:ns-resize}
.rh.e{right:-3px;top:6px;bottom:6px;width:6px;cursor:ew-resize}
.rh.w{left:-3px;top:6px;bottom:6px;width:6px;cursor:ew-resize}
.rh.ne{right:-3px;top:-3px;width:10px;height:10px;cursor:nesw-resize}
.rh.nw{left:-3px;top:-3px;width:10px;height:10px;cursor:nwse-resize}
.rh.se{right:-3px;bottom:-3px;width:12px;height:12px;cursor:nwse-resize}
.rh.sw{left:-3px;bottom:-3px;width:10px;height:10px;cursor:nesw-resize}
.win.max .rh{display:none}
.blocker{position:absolute;inset:0;z-index:50;background:transparent}
.win.flash .tb{animation:flash .12s 3 alternate}
@keyframes flash{to{background:#fff}}

/* ===== ダイアログ ===== */
.dlg{padding:18px 22px 0;display:flex;gap:16px;font-size:13px;background:#fff;flex:1}
.dlg .dico{width:32px;height:32px;flex:none}
.dlg h3{margin:0 0 8px;font-size:15px;font-weight:600;color:#1a3a73}
.dlg p{margin:0 0 8px;white-space:pre-wrap;word-break:break-all}
.dlg .detail{display:flex;gap:10px;align-items:center;margin:8px 0;padding:8px;border:1px solid #e6e6e6;border-radius:4px}
.dlg .detail .ico{width:36px;height:36px;flex:none}
.dlg .detail small{color:#555;display:block;line-height:1.5}
.dlg-cmp{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.dlg-cmp > div{border:1px solid #e6e6e6;border-radius:4px;padding:8px;line-height:1.55}
.dlg-cmp b{display:block;font-size:12px;color:#1a3a73}
.dlg-foot{display:flex;justify-content:flex-end;gap:8px;padding:14px 16px;background:#f3f3f3;border-top:1px solid #e5e5e5;align-items:center;flex-wrap:wrap}
.dlg-foot label{margin-right:auto;font-size:12px;display:flex;gap:6px;align-items:center}
.btn{min-width:88px;height:30px;padding:0 12px;border:1px solid #c8c8c8;border-radius:4px;background:#fdfdfd;cursor:default}
.btn:hover{background:#f0f0f0}
.btn.default{background:var(--accent);color:#fff;border-color:#08519f}
.btn.default:hover{background:#0b6ad6}
.btn:focus-visible{outline:2px solid #111;outline-offset:1px}
.btn:disabled{opacity:.5}
.field{width:100%;height:30px;border:1px solid #c8c8c8;border-bottom-color:#888;border-radius:4px;padding:0 8px;font:13px var(--os-font);background:#fff}
.field:focus{outline:none;border-bottom:2px solid var(--accent)}
.progress{height:14px;border:1px solid #bbb;border-radius:7px;overflow:hidden;background:#eee;margin:10px 0}
.progress > i{display:block;height:100%;background:#06b025;width:0;transition:width .12s linear}

/* ===== コンテキストメニュー ===== */
#menus{position:absolute;inset:0;pointer-events:none;z-index:9500}
.menu{position:absolute;pointer-events:auto;min-width:210px;background:#f9f9f9;border:1px solid #c6c6c6;border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.2);padding:4px;font-size:12.5px;outline:none}
.mi{display:flex;align-items:center;gap:10px;height:30px;padding:0 10px;border-radius:4px;white-space:nowrap}
.mi .k{margin-left:auto;color:#777;font-size:11.5px;padding-left:20px}
.mi.bold{font-weight:600}
.mi.on,.mi:hover{background:#e8e8e8}
.mi.dis{color:#aaa;background:none!important}
.msep{height:1px;background:#e0e0e0;margin:4px 6px}

/* ===== タスクバー・スタート ===== */
#taskbar{position:absolute;left:0;right:0;bottom:0;height:48px;z-index:9000;display:flex;align-items:center;justify-content:center;gap:4px;
  background:rgba(236,240,243,.9);backdrop-filter:blur(18px);border-top:1px solid rgba(0,0,0,.1)}
#taskbar.no-shell{display:none}
.tbtn{height:40px;min-width:40px;max-width:170px;padding:0 8px;display:flex;align-items:center;gap:6px;border:0;border-radius:5px;background:transparent;position:relative;cursor:default}
.tbtn:hover{background:rgba(255,255,255,.7)}
.tbtn .ico{width:24px;height:24px;flex:none}
.tbtn .tl{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tbtn.run::after{content:"";position:absolute;bottom:2px;left:50%;width:6px;height:3px;margin-left:-3px;border-radius:2px;background:#8a8a8a}
.tbtn.act{background:rgba(255,255,255,.85)}
.tbtn.act::after{width:16px;margin-left:-8px;background:var(--accent)}
.tray{position:absolute;right:8px;top:0;bottom:0;display:flex;align-items:center;gap:10px;font-size:12px;text-align:right}
.tray .clock{line-height:1.3}
.tb-sep{width:1px;height:24px;background:rgba(0,0,0,.12);margin:0 4px}
#startmenu{position:absolute;bottom:56px;left:50%;width:560px;max-width:calc(100% - 16px);transform:translateX(-50%);z-index:9100;
  background:rgba(242,244,246,.97);backdrop-filter:blur(20px);border:1px solid #c9ccd0;border-radius:10px;box-shadow:0 14px 40px rgba(0,0,0,.28);padding:22px 26px 0}
#startmenu[hidden]{display:none}
.sm-search{margin-bottom:16px}
.sm-head{font-weight:600;font-size:13px;margin:4px 0 10px}
.sm-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;min-height:170px;align-content:start}
.sm-app{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 2px;border-radius:5px;font-size:11.5px;text-align:center;border:0;background:transparent}
.sm-app:hover,.sm-app:focus-visible{background:rgba(255,255,255,.9);outline:none}
.sm-app .ico{width:32px;height:32px}
.sm-foot{display:flex;align-items:center;justify-content:space-between;margin:18px -26px 0;padding:12px 26px;background:rgba(0,0,0,.04);border-top:1px solid #dcdfe2;border-radius:0 0 10px 10px}
.sm-user{display:flex;align-items:center;gap:8px}
.sm-avatar{width:30px;height:30px;border-radius:50%;background:#5c8f7b;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}
.sm-power{width:34px;height:34px;border:0;border-radius:5px;background:transparent}
.sm-power:hover{background:rgba(0,0,0,.07)}

/* ===== ファイル管理 ===== */
.ex-tool{display:flex;align-items:center;gap:4px;padding:6px 8px;background:#f7f7f7;border-bottom:1px solid #e6e6e6}
.ib{width:30px;height:28px;border:0;border-radius:4px;background:transparent;display:flex;align-items:center;justify-content:center}
.ib:hover:not(:disabled){background:#e6e6e6}
.ib:disabled{opacity:.35}
.ib svg{width:14px;height:14px}
.ex-addr{flex:1}
.ex-cmd{display:flex;align-items:center;gap:2px;padding:4px 8px;border-bottom:1px solid #e6e6e6;background:#fbfbfb;flex-wrap:wrap}
.cb{height:30px;padding:0 9px;border:0;border-radius:4px;background:transparent;display:flex;align-items:center;gap:6px;font-size:12.5px}
.cb:hover:not(:disabled){background:#ececec}
.cb:disabled{opacity:.38}
.cb svg{width:16px;height:16px}
.cb-sep{width:1px;height:22px;background:#ddd;margin:0 4px}
.ex-main{flex:1;display:flex;min-height:0}
.ex-nav{width:178px;flex:none;border-right:1px solid #ececec;overflow:auto;padding:6px 4px;background:#fff}
.nv{display:flex;align-items:center;gap:7px;height:28px;padding:0 8px;border-radius:4px;white-space:nowrap;overflow:hidden;font-size:12.5px;border:1px solid transparent}
.nv .ico{width:16px;height:16px;flex:none}
.nv:hover{background:#f0f0f0}
.nv.cur{background:#e3eef9}
.nv.sub{padding-left:22px}
.nv-sep{height:1px;background:#eee;margin:6px 4px}
.ex-list{flex:1;overflow:auto;position:relative;outline:none;background:#fff}
.lh{position:sticky;top:0;z-index:2;display:flex;background:#fff;border-bottom:1px solid #eee;height:28px;align-items:center;padding-left:6px}
.lh > div{padding:0 8px;font-size:12px;color:#444;white-space:nowrap;overflow:hidden;border-right:1px solid #eee;height:100%;display:flex;align-items:center}
.lh > div:hover{background:#f3f3f3}
.lr{display:flex;align-items:center;height:28px;margin:0 4px;padding-left:2px;border:1px solid transparent;border-radius:3px;white-space:nowrap}
.lr > div{padding:0 8px;overflow:hidden;text-overflow:ellipsis;font-size:12.5px}
.lr .c-name{display:flex;align-items:center;gap:7px}
.lr .ico{width:18px;height:18px;flex:none;position:relative}
.lr .c-dim{color:#666}
.lr:hover{background:var(--hover)}
.lr.sel{background:var(--sel);border-color:var(--sel-line)}
.ex-list:focus .lr.focus{outline:1px dotted #333;outline-offset:-2px}
.c-name{width:var(--w-name,280px);flex:none}
.c-a{width:150px;flex:none}
.c-b{width:130px;flex:none}
.c-c{width:90px;flex:none;text-align:right;justify-content:flex-end}
.lr .c-c{text-align:right}
.ex-empty{color:#777;text-align:center;padding:30px;font-size:12.5px}
.ex-status{height:24px;flex:none;display:flex;align-items:center;gap:16px;padding:0 12px;font-size:12px;color:#444;border-top:1px solid #eee;background:#fff}
.drives{display:flex;flex-wrap:wrap;gap:10px;padding:14px}
.drv{width:260px;display:flex;gap:10px;align-items:center;padding:8px;border:1px solid transparent;border-radius:4px}
.drv .ico{width:40px;height:40px;flex:none}
.drv .bar{height:12px;background:#e6e6e6;border:1px solid #bbb;margin:4px 0}
.drv .bar i{display:block;height:100%;background:#26a0da}
.drv .bar i.full{background:#da2626}
.drv small{color:#666}
.drv:hover{background:var(--hover)}
.drv.sel{background:var(--sel);border-color:var(--sel-line)}
.rn{position:absolute;z-index:4;height:24px;font:12.5px var(--os-font);border:1px solid #0078d7;padding:0 4px;outline:none;background:#fff;color:#000}
.ditem .rn{position:static;width:84px;height:auto;min-height:20px;text-align:center;resize:none;overflow:hidden;font-size:12px}

/* ===== テキスト編集 ===== */
.ed-menu{display:flex;gap:2px;padding:4px 6px;background:#f7f7f7;border-bottom:1px solid #e6e6e6}
.ed-mb{height:28px;padding:0 10px;border:0;border-radius:4px;background:transparent;font-size:12.5px}
.ed-mb:hover,.ed-mb.on{background:#e6e6e6}
.ed-area{flex:1;border:0;outline:none;resize:none;padding:16px 22px;font:15px/1.75 "Yu Gothic UI","Meiryo UI","BIZ UDGothic",sans-serif;color:#111;
  background:#fff;white-space:pre-wrap;user-select:text;cursor:text}
.ed-area::selection{background:#bcd8f5}
.ed-status{height:26px;flex:none;display:flex;align-items:center;gap:0;font-size:12px;color:#444;border-top:1px solid #eee;background:#f7f7f7}
.ed-status > span{padding:0 12px;border-right:1px solid #e1e1e1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ed-status > span:last-child{border-right:0}
.ed-status .flag{color:#8a4b00}

/* ===== 写真 ===== */
.ph{flex:1;display:flex;align-items:center;justify-content:center;background:#202020;min-height:0;color:#ddd;font-size:13px;padding:10px;text-align:center}
.ph canvas{max-width:100%;max-height:100%}

/* ===== タスク管理 ===== */
.tm-head{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid #e6e6e6;background:#f7f7f7}
.tm-head b{font-size:14px;flex:1}
.tm-list{flex:1;overflow:auto;outline:none}
.tm-row{display:flex;align-items:center;height:28px;padding:0 10px;border-bottom:1px solid #f2f2f2;white-space:nowrap}
.tm-row > div{overflow:hidden;text-overflow:ellipsis;font-size:12.5px}
.tm-row .n{flex:1;display:flex;align-items:center;gap:8px}
.tm-row .n .ico{width:16px;height:16px;flex:none}
.tm-row .s{width:80px;color:#666}
.tm-row .c{width:56px;text-align:right}
.tm-row .m{width:86px;text-align:right}
.tm-row:hover{background:var(--hover)}
.tm-row.sel{background:var(--sel)}
.tm-grp{padding:10px 10px 4px;font-weight:600;font-size:12.5px;color:#333}
.tm-th{position:sticky;top:0;background:#fff;border-bottom:1px solid #ddd;color:#555;font-weight:600}
.tm-th:hover{background:#fff}
.tm-foot{display:flex;justify-content:flex-end;gap:8px;padding:8px 12px;border-top:1px solid #e6e6e6;background:#f7f7f7}

/* ===== ドラッグ表示・起動画面 ===== */
#dragghost{position:absolute;z-index:9800;pointer-events:none;display:flex;align-items:flex-start;gap:4px}
#dragghost[hidden]{display:none}
#dragghost .gi{width:44px;height:44px;opacity:.75;position:relative}
#dragghost .gc{position:absolute;right:-6px;top:-6px;background:var(--accent);color:#fff;border-radius:9px;font-size:11px;padding:1px 6px}
#dragghost .gb{margin-top:34px;background:#fff;border:1px solid #bbb;border-radius:3px;padding:2px 7px;font-size:12px;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.2)}
#dragghost .gb.no{color:#999}
#boot{position:absolute;inset:0;z-index:9900;background:#000;color:#ddd;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;font-size:15px}
#boot[hidden]{display:none}
.boot-logo{width:70px;height:70px}
.spin{width:30px;height:30px;border-radius:50%;border:3px solid rgba(255,255,255,.2);border-top-color:#fff;animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.boot-btn{background:transparent;border:1px solid #666;color:#eee;border-radius:50%;width:64px;height:64px;font-size:22px;cursor:pointer}
.boot-btn:hover{background:#222}
.rs-panel{background:#0b3f73;position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:#fff}
.rs-panel ul{margin:0;padding:0;list-style:none;min-width:320px}
.rs-panel li{display:flex;align-items:center;gap:10px;padding:8px 10px;background:rgba(255,255,255,.08);margin:4px 0}
.rs-panel .ico{width:24px;height:24px}
.rs-panel .btn{min-width:150px}

@media (max-width:760px){
  .mg-title{display:none}
  .mg-btn{padding:6px 6px}
  .ex-nav{display:none}
}
.drives .lh{width:100%}

/* ===================== やらかし強化版（2026-10-01） ===================== */
#stage{flex:1;display:flex;min-height:0;position:relative}
#game{min-width:0}
.mg-strong{border-color:#8a6a1e;color:var(--mg-accent)}
.mg-toast{max-width:24vw}

/* 被害メーター */
.mg-meter{display:flex;align-items:baseline;gap:10px;margin-left:6px;padding:4px 10px;border:1px solid #4a3a1c;border-radius:4px;white-space:nowrap;position:relative;background:#232120}
.mg-meter .m-lbl{color:#e0564b;font-weight:700}
.mg-meter b{color:var(--mg-accent);font-size:14px;font-family:"BIZ UDGothic",Consolas,monospace}
.mg-meter.hit{animation:mhit .7s ease-out}
@keyframes mhit{0%{background:#6b1f19;border-color:#e0564b}100%{background:#232120}}
.m-delta{position:absolute;left:50%;top:100%;transform:translate(-50%,4px);font-style:normal;color:#ffd2cc;background:#3a1512;border:1px solid #8a2d25;border-radius:3px;padding:3px 10px;opacity:0;pointer-events:none;white-space:nowrap;z-index:30}
.m-delta.pop{animation:dpop 2.8s ease-out}
@keyframes dpop{0%{opacity:0;transform:translate(-50%,0)}8%{opacity:1;transform:translate(-50%,6px)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,10px)}}

/* 右のパネル：お題と始末書 */
#mgSide{display:none}
#side{width:316px;flex:none;display:flex;flex-direction:column;background:#232427;color:#ecebe6;border-left:2px solid #111;font:12.5px/1.5 "BIZ UDGothic","Yu Gothic UI","Meiryo",sans-serif;min-height:0}
.sd-todo{flex:1 1 62%;overflow:auto;padding:12px 12px 10px;min-height:0}
.sd-head{display:flex;justify-content:space-between;align-items:baseline;font-size:14px}
.sd-head span{color:var(--mg-accent);font-weight:700}
.sd-bar{height:4px;background:#3a3c40;border-radius:2px;margin:6px 0 10px;overflow:hidden}
.sd-bar i{display:block;height:100%;background:var(--mg-accent);width:0;transition:width .4s}
.td-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.td{display:flex;gap:8px;align-items:flex-start;padding:7px 8px;border:1px solid #3a3c40;border-radius:5px;background:#2a2b2f}
.td-box{width:18px;height:18px;flex:none;border:1.5px solid #77787c;border-radius:3px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;margin-top:1px;color:#1c1d1f}
.td.ever .td-box{border-color:#a8842c}
.td.done .td-box{background:var(--mg-accent);border-color:var(--mg-accent)}
.td.done{opacity:.6}
.td-t{flex:1;min-width:0}
.td-title{font-weight:700}
.td-star{color:#e0564b;font-size:10.5px;letter-spacing:1px}
.td small{display:block;color:#a6a49d;font-size:11.5px;line-height:1.45;margin-top:2px}
.td-go{flex:none;align-self:center;border:1px solid #55575c;background:#1c1d1f;color:#ecebe6;border-radius:4px;padding:4px 8px;font:inherit;font-size:11.5px;cursor:pointer;white-space:nowrap}
.td-go:hover,.td-go:focus-visible{border-color:var(--mg-accent);color:var(--mg-accent);outline:none}
.td.flash{animation:tdf 1.6s ease-out}
@keyframes tdf{0%{background:#6b5617;border-color:var(--mg-accent)}100%{background:#2a2b2f}}
.td.fix{padding:5px 8px}
.td.fix .td-title{font-weight:400}
.sd-sub{margin:14px 0 6px;color:#a6a49d;font-size:12px}
.sd-report{flex:1 1 38%;min-height:150px;padding:0 12px 12px;display:flex;flex-direction:column}
.sd-paper{flex:1;min-height:0;background:#fbfaf6;color:#1c1d1f;border-radius:3px;padding:10px 12px;display:flex;flex-direction:column;box-shadow:0 2px 8px rgba(0,0,0,.4);font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","BIZ UDPMincho",serif}
.sd-ptitle{text-align:center;font-weight:700;letter-spacing:.5em;font-size:15px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px}
#reportList{list-style:none;margin:0;padding:0;overflow:auto;flex:1;font-size:12px;line-height:1.6}
#reportList li{padding:3px 2px;border-bottom:1px dotted #d6d3cb}
#reportList li time{color:#888;margin-right:6px;font-family:Consolas,monospace;font-size:11px}
#reportList li.fix{color:#2e6b3a}
#reportList li.empty{color:#999;border:0}
#reportList li.flash{animation:rpf 1.8s ease-out}
@keyframes rpf{0%{background:#ffe08a}100%{background:transparent}}
@media (max-width:1400px){ .mg-title{display:none} }
@media (max-width:1100px){
  #mgSide{display:inline-block}
  #side{position:absolute;right:0;top:0;bottom:0;z-index:40;transform:translateX(100%);transition:transform .2s;box-shadow:-8px 0 24px rgba(0,0,0,.4)}
  body.side-open #side{transform:none}
  .mg-meter span:not(.m-lbl):nth-child(3){display:none}
}

/* その後カード */
#after{position:absolute;inset:0;z-index:99990;display:flex;align-items:center;justify-content:center;background:rgba(10,10,12,.55);cursor:pointer;padding:16px}
#after[hidden]{display:none}
.af-card{width:min(580px,100%);background:#fbfaf6;color:#1c1d1f;border-radius:6px;padding:22px 28px 14px;border-top:6px solid #c9463d;box-shadow:0 24px 60px rgba(0,0,0,.5);font-family:"BIZ UDGothic","Yu Gothic UI","Meiryo",sans-serif}
#after.in .af-card{animation:afin .3s cubic-bezier(.2,.9,.3,1.25)}
@keyframes afin{from{transform:translateY(14px) scale(.96);opacity:0}to{transform:none;opacity:1}}
.af-top{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;color:#c9463d;font-weight:700}
.af-star{letter-spacing:2px;white-space:nowrap}
.af-time{margin-top:16px;color:#777;font-size:15px}
.af-text{margin-top:6px;font-size:23px;line-height:1.6;font-weight:700;white-space:pre-line;font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","BIZ UDPMincho",serif}
.af-dmg{margin-top:16px;padding-top:10px;border-top:1px solid #e3e1db;color:#c9463d;font-weight:700;font-size:13px}
.af-skip{margin-top:4px;text-align:right;color:#999;font-size:11px}

/* 通知（右下） */
#toasts{position:absolute;right:12px;bottom:58px;z-index:9050;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}
.toast{pointer-events:auto;width:340px;display:flex;gap:10px;padding:12px 14px;background:rgba(249,249,249,.98);border:1px solid #c9ccd0;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.22);font-size:12.5px;animation:tsin .2s ease-out}
@keyframes tsin{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
.toast > .ico{width:28px;height:28px;flex:none}
.ts-body{flex:1;min-width:0}
.ts-title{display:block;font-size:13px}
.ts-text{color:#444;margin:2px 0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ts-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ts-count{color:#666;font-size:12px}
.ts-act{min-width:96px}

/* メール */
.ml-main{flex:1;display:flex;min-height:0}
.ml-fold{width:180px;flex:none;border-right:1px solid #ececec;padding:8px 6px;overflow:auto;background:#fff}
.ml-me{font-size:11px;color:#666;padding:2px 8px 8px;word-break:break-all}
.ml-n{color:var(--accent);font-size:12px}
.ml-list{width:300px;flex:none;border-right:1px solid #ececec;overflow:auto;outline:none;background:#fff}
.ml-row{padding:8px 10px;border-bottom:1px solid #f0f0f0;border-left:3px solid transparent}
.ml-row:hover{background:var(--hover)}
.ml-row.sel{background:var(--sel)}
.ml-row.unread{border-left-color:var(--accent)}
.ml-row.unread .ml-who,.ml-row.unread .ml-l2{font-weight:700}
.ml-l1{display:flex;gap:6px;font-size:12.5px}
.ml-who{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ml-date{color:#777;font-size:11.5px;margin-left:auto;white-space:nowrap}
.ml-l2{font-size:12.5px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:4px}
.ml-clip svg{width:12px;height:12px;display:block}
.ml-draft{color:#c42b1c;flex:none}
.ml-read{flex:1;overflow:auto;padding:14px 18px;background:#fff;user-select:text;min-width:0}
.ml-read h2{font-size:17px;margin:0 0 10px}
.ml-hd{font-size:12.5px;color:#444;margin:2px 0;display:flex;gap:4px;flex-wrap:wrap}
.ml-hd .ml-date{margin-left:auto}
.ml-text{white-space:pre-wrap;margin-top:14px;font-size:13.5px;line-height:1.7;border-top:1px solid #eee;padding-top:12px}
.ml-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff8e1;border:1px solid #f0d58c;border-radius:4px;padding:8px 10px;margin-bottom:12px;font-size:12.5px}
.ml-atts{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.ml-atts[hidden]{display:none}
.ml-att{display:inline-flex;align-items:center;gap:6px;border:1px solid #d6d6d6;border-radius:4px;padding:4px 8px;font-size:12px;background:#fafafa}
.ml-att .ico{width:16px;height:16px}
.ml-compose{flex:1;display:flex;flex-direction:column;min-height:0;background:#fff}
.ml-send{display:inline-flex;align-items:center;gap:6px}
.ml-send svg{width:14px;height:14px;display:block}
.mailtips{background:#fff4ce;border-bottom:1px solid #f0d58c;padding:6px 12px;font-size:12.5px;color:#5c4400;line-height:1.6}
.mailtips[hidden]{display:none}
.ml-form{display:grid;grid-template-columns:52px 1fr;gap:6px 8px;padding:10px 12px 6px;align-items:center}
.ml-form > label{font-size:12.5px;color:#555;text-align:right}
.ml-compose > .ml-atts{padding:0 12px;margin:0 0 6px}
.ml-body{flex:1;border:0;border-top:1px solid #eee;outline:none;resize:none;padding:12px 16px;font:14px/1.7 "Yu Gothic UI","Meiryo UI",sans-serif;user-select:text;min-height:80px}
.ml-status{height:24px;flex:none;display:flex;align-items:center;padding:0 12px;font-size:11.5px;color:#666;border-top:1px solid #eee;background:#f7f7f7}
.rc-wrap{position:relative;min-width:0}
.rc{display:flex;flex-wrap:wrap;gap:4px;align-items:center;min-height:30px;border:1px solid #c8c8c8;border-bottom-color:#888;border-radius:4px;padding:2px 4px;background:#fff;cursor:text}
.rc:focus-within{border-bottom:2px solid var(--accent)}
.rc-in{flex:1;min-width:80px;border:0;outline:none;font:13px var(--os-font);height:24px;background:transparent}
.rc-chip{display:inline-flex;align-items:center;gap:2px;background:#e8eef7;border:1px solid #c5d3e8;border-radius:12px;padding:1px 4px 1px 9px;font-size:12px;white-space:nowrap}
.rc-chip.ext{background:#fdecea;border-color:#f3b5ae}
.rc-chip.grp{background:#fff4ce;border-color:#ecd27a;font-weight:700}
.rc-x{border:0;background:transparent;width:18px;height:18px;border-radius:9px;line-height:1;cursor:pointer;color:#555;padding:0}
.rc-x:hover{background:rgba(0,0,0,.1)}
.rc-sug{position:absolute;left:0;right:0;top:100%;z-index:10;background:#fff;border:1px solid #c8c8c8;border-radius:4px;box-shadow:0 6px 18px rgba(0,0,0,.18);margin-top:2px}
.rc-sug[hidden]{display:none}
.rc-opt{padding:5px 10px;display:flex;flex-direction:column}
.rc-opt small{color:#666}
.rc-opt.on,.rc-opt:hover{background:var(--hover)}
.ap{display:flex;flex-direction:column;gap:8px;margin:0 0 4px}
.ap-top{display:flex;gap:6px;align-items:center}
.ap-loc{flex:1}
.ap-list{height:240px;overflow:auto;border:1px solid #d6d6d6;border-radius:4px;outline:none}
.ap-list:focus{border-color:var(--accent)}
.ap-row{display:flex;align-items:center;gap:8px;padding:4px 8px;font-size:12.5px}
.ap-row .ico{width:18px;height:18px;flex:none;position:relative}
.ap-row span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ap-row small{color:#777}
.ap-row:hover{background:var(--hover)}
.ap-row.sel{background:var(--sel)}
.ap-name{display:flex;align-items:center;gap:8px;font-size:12.5px}
.ap-name span{white-space:nowrap}
select.field{padding:0 6px}

/* セットアップ・広告・クリーナー・PDF変換 */
.ins{flex:1;display:grid;grid-template-columns:150px 1fr;grid-template-rows:1fr auto;min-height:0;background:#fff}
.ins-side{background:linear-gradient(160deg,#1f6fd1,#123f7a);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:12px}
.ins-side .ico{width:56px;height:56px}
.ins-side b{font-size:16px}
.ins-main{padding:18px 22px;overflow:auto;font-size:13px;min-height:0}
.ins-main h3{margin:0 0 10px;font-size:15px;color:#1a3a73}
.ins-main p{margin:0 0 8px}
.ins-foot{grid-column:1 / 3}
.ins-eula{width:100%;height:140px;font:12px/1.6 var(--os-font);resize:none;border:1px solid #ccc;padding:6px;margin-bottom:6px;user-select:text}
.ins-radio{display:flex;gap:8px;align-items:flex-start;margin:8px 0}
.ins-radio small{display:block;color:#666;font-size:12px}
.ins-opts{margin:6px 0 0 24px;padding:8px 10px;border:1px solid #e3e3e3;border-radius:4px;background:#fafafa}
.ins-check{display:flex;gap:8px;align-items:center;margin:4px 0;font-size:12.5px}
.ins-line{font-size:12px;color:#555}
.ad{flex:1;display:flex;flex-direction:column;background:#fff;min-height:0}
.ad-head{display:flex;justify-content:space-between;align-items:center;color:#fff;padding:6px 12px;font-weight:700}
.ad-head small{font-weight:400;font-size:11px;border:1px solid rgba(255,255,255,.7);border-radius:3px;padding:0 4px}
.ad-body{padding:12px 14px;display:flex;flex-direction:column;gap:6px;flex:1;overflow:auto}
.ad-body b{font-size:15px}
.ad-body p{margin:0;white-space:pre-line;font-size:12.5px;color:#444}
.ad-btn{align-self:flex-start;margin-top:auto;color:#fff;border:0;border-radius:4px;padding:7px 16px;font-weight:700;cursor:pointer}
.ad-item{padding:8px 4px;border-bottom:1px solid #f0f0f0;font-size:13px;color:#1f4fa0}
.win.active .tb .ttl{color:#111}
.cl{flex:1;display:flex;flex-direction:column;background:#fff;min-height:0}
.cl-head{display:flex;gap:12px;align-items:center;background:#b3261e;color:#fff;padding:14px 16px}
.cl-head .ico{width:40px;height:40px}
.cl-head b{display:block;font-size:16px}
.cl-head small{opacity:.85}
.cl-res{padding:16px 20px;display:flex;flex-direction:column;gap:10px;font-size:13px;overflow:auto}
.cl-big{font-size:15px}
.cl-big b{font-size:30px;color:#b3261e}
.cl-tbl{border-collapse:collapse;width:100%}
.cl-tbl td{border-bottom:1px solid #eee;padding:4px 6px}
.cl-tbl td:last-child{text-align:right;color:#b3261e;font-weight:700}
.cl-fix{align-self:center;background:#ff8a00;color:#fff;border:0;border-radius:6px;padding:10px 28px;font-size:15px;font-weight:700;cursor:pointer}
.cl-res > small{text-align:center;color:#777}
.pdfc{flex:1;display:flex;flex-direction:column;background:#fff}
.pdfc-nag{background:#fdecea;color:#8a1c14;padding:8px 12px;font-size:12.5px}
.pdfc-drop{flex:1;margin:16px;border:2px dashed #ccc;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#777}
.pdfc-drop .ico{width:48px;height:48px}

/* フォーマット・設定 */
.fm{flex:1;display:flex;flex-direction:column;gap:8px;padding:14px 16px;background:#fff;font-size:12.5px;min-height:0}
.fm-row{display:flex;flex-direction:column;gap:3px}
.fm-chk{display:flex;gap:6px;align-items:center}
.fm-state{font-size:12px;color:#8a4b00;min-height:16px}
.fm-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:auto}
.st{flex:1;display:flex;min-height:0;background:#f3f3f3}
.st-nav{width:210px;flex:none;padding:12px 8px;display:flex;flex-direction:column;gap:2px}
.st-user{display:flex;gap:10px;align-items:center;padding:6px 8px 14px}
.st-user small{display:block;color:#666;font-size:11px}
.st-main{flex:1;overflow:auto;padding:16px 22px;outline:none}
.st-main h2{font-size:18px;margin:4px 0 14px}
.st-app,.st-drv{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid #e5e5e5;border-radius:6px;padding:10px 12px;margin-bottom:6px}
.st-app .ico{width:30px;height:30px;flex:none}
.st-drv .ico{width:34px;height:34px;flex:none}
.st-app-n{flex:1;min-width:0}
.st-app-n small{display:block;color:#666;font-size:11.5px}
.st-drv .bar{height:10px;background:#e6e6e6;border-radius:5px;overflow:hidden;margin:5px 0}
.st-drv .bar i{display:block;height:100%;background:#26a0da}
.st-drv .bar i.full{background:#da2626}
.st-drv small{color:#666}

/* 始末書（結果画面） */
.rp-paper{background:#fff;border:1px solid #ddd;box-shadow:0 2px 10px rgba(0,0,0,.08);padding:26px 34px;margin:10px 0 6px;font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","BIZ UDPMincho",serif;line-height:1.9}
.rp-date,.rp-from,.rp-end{text-align:right}
.rp-to{margin-top:6px}
.rp-from{margin-top:6px}
.rp-seal{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:2px solid #c62828;border-radius:50%;color:#c62828;font-size:11px;font-weight:700;margin-left:10px;vertical-align:middle}
.rp-paper h2{text-align:center;font-size:24px;letter-spacing:.3em;border:0;margin:18px 0}
.rp-ki{text-align:center;margin:8px 0}
.rp-paper ol{margin:0;padding-left:1.6em}
.rp-paper time{color:#888;margin-right:8px;font-family:Consolas,monospace;font-size:12px}
.rp-fix{margin-top:12px;font-size:13px;color:#2e6b3a}
.rp-fix ul{margin:4px 0;padding-left:1.4em}
.rp-dmg{margin:14px 0 6px;padding:8px 12px;background:#fdf3f2;border-left:4px solid #c9463d;font-family:"BIZ UDGothic","Yu Gothic UI",sans-serif;font-size:13px;line-height:1.6}
.rp canvas{width:100%;height:auto;border:1px solid #ddd;border-radius:4px;display:block}

/* ===================== ヒント（2026-10-02） ===================== */
#gamecol{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}
#gamecol > #game{flex:1}
.mg-hint{border-color:#2f8f5a;color:#8fe6b6;font-weight:700}
.mg-hint:hover{background:#1d4a35}
.mg-hint.on{background:#2f8f5a;color:#fff}
#guide{flex:none;display:flex;align-items:center;gap:10px;padding:7px 10px;background:#173a2a;color:#eaf7ef;border-bottom:2px solid #2f8f5a;font:13px/1.5 "BIZ UDGothic","Yu Gothic UI","Meiryo",sans-serif;min-height:52px}
#guide[hidden]{display:none}
.gd-tag{flex:none;background:#2f8f5a;color:#fff;font-weight:700;border-radius:3px;padding:3px 8px}
.gd-main{flex:1;min-width:0}
.gd-top{display:flex;gap:10px;align-items:baseline;font-size:11.5px;color:#a8d8bd;min-width:0}
.gd-title{font-weight:700;color:#d6f2e1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gd-step{white-space:nowrap}
.gd-text{font-size:14px;font-weight:700;color:#fff}
.gd-text.flash{animation:gdf .9s ease-out}
@keyframes gdf{0%{color:#ffe08a}100%{color:#fff}}
#guide.done .gd-text{color:#ffe08a}
.gd-act,.gd-next,.gd-close{flex:none;border:1px solid #4d9b72;background:#1d4a35;color:#eaf7ef;border-radius:4px;padding:5px 10px;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
.gd-act{background:#f2c14e;color:#1c1d1f;border-color:#f2c14e;font-weight:700}
.gd-close{width:30px;padding:5px 0;font-size:15px;line-height:1}
.gd-act:hover,.gd-next:hover,.gd-close:hover{filter:brightness(1.15)}
.gd-act[hidden],.gd-next[hidden]{display:none}
#spot{position:fixed;inset:0;z-index:45;pointer-events:none}
#spot[hidden]{display:none}
.sp-ring{position:fixed;border:3px solid #3ddc84;border-radius:8px;animation:spr 1.1s ease-in-out infinite}
@keyframes spr{0%,100%{box-shadow:0 0 0 2px rgba(61,220,132,.35),0 0 10px rgba(61,220,132,.6)}50%{box-shadow:0 0 0 7px rgba(61,220,132,.18),0 0 26px rgba(61,220,132,.95)}}
.sp-lbl{position:fixed;background:#173a2a;color:#fff;border:1px solid #3ddc84;border-radius:4px;padding:3px 9px;font:700 12.5px "BIZ UDGothic","Yu Gothic UI","Meiryo",sans-serif;white-space:nowrap;box-shadow:0 4px 12px rgba(0,0,0,.35)}
#spot.covered .sp-ring{border-style:dashed}
.td-btns{flex:none;align-self:center;display:flex;flex-direction:column;gap:4px}
.td-btns .td-go{align-self:stretch}
.td-hint{border:1px solid #2f8f5a;background:#173a2a;color:#9be3bb;border-radius:4px;padding:3px 8px;font:inherit;font-size:11.5px;cursor:pointer;white-space:nowrap}
.td-hint:hover,.td-hint:focus-visible{background:#1f5c3c;color:#fff;outline:none}
.td-hint.on{background:#2f8f5a;color:#fff}
.td.guiding{border-color:#3ddc84;box-shadow:0 0 0 1px #3ddc84 inset}
.tb-empty{flex:1;align-self:stretch}
@media (max-width:1100px){ .gd-next{display:none} }
