/* WASABI 作戦モード */
:root {
  --bg: #020a0b;
  --card: rgba(3, 18, 18, 0.88);
  --line: rgba(124, 255, 178, 0.22);
  --phosphor: #7cffb2;
  --ink: #d8ffe9;
  --soft: #a9d9c2;
  --muted: #8fbfa8;
  --amber: #ffb020;
  --red: #ff4d6a;
  --cyan: #5cc8ff;
  --lv: var(--phosphor);
  --font-dot: 'DotGothic16', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --font-jp: 'Zen Kaku Gothic New', system-ui, sans-serif;
}
body[data-level='warn'] { --lv: var(--amber); }
body[data-level='alert'] { --lv: var(--red); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(ellipse 80% 70% at 50% 30%, #0a1e1c, #041011 55%, #020a0b); background-attachment: fixed; color: var(--ink); font-family: var(--font-jp); }
a { color: var(--phosphor); }
a:hover { color: var(--ink); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: default; }
.mono, code, pre { font-family: var(--font-mono); }
.sub { font-size: 11px; color: var(--muted); }
.sub.ok { color: var(--phosphor); }
.sub.warn { color: var(--amber); }
.amber { color: var(--amber) !important; }
h1, h2, h3 { margin: 0; font-family: var(--font-dot); font-weight: 400; color: var(--phosphor); }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

.obar { position: sticky; top: 0; z-index: 5; min-height: 56px; padding: 8px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border-bottom: 1px solid rgba(255, 176, 32, 0.35); background: rgba(20, 14, 2, 0.75); backdrop-filter: blur(4px); }
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.logo-main { font-family: var(--font-dot); font-size: 22px; letter-spacing: 0.12em; color: var(--phosphor); }
.logo-sub { font-family: var(--font-dot); font-size: 15px; color: var(--amber); }
.hint { font-size: 11px; color: var(--soft); }
.ostatus { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; font-family: var(--font-mono); }
.pill { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 14px; border: 1px solid rgba(124, 255, 178, 0.4); color: var(--soft); }
.level { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 4px; border: 1px solid var(--lv); background: color-mix(in srgb, var(--lv) 14%, transparent); color: var(--lv); }
.level b { font-family: var(--font-dot); font-size: 15px; font-weight: 400; }
.level span { font-size: 11px; }

.gate { min-height: calc(100vh - 56px); display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(420px, 100%); padding: 28px 24px; border-radius: 12px; background: var(--card); border: 1px solid rgba(255, 176, 32, 0.45); display: flex; flex-direction: column; gap: 14px; }
.gate-card h1 { font-size: 26px; color: var(--amber); }
.gate-card p { margin: 0; line-height: 1.7; }
.err { color: var(--red); font-size: 13px; min-height: 1em; }
.back { font-size: 13px; }

.primary { min-height: 52px; padding: 0 16px; border-radius: 8px; border: none; background: linear-gradient(180deg, #ffc24d, #e08a00); color: #1a1000; font-weight: 700; font-size: 16px; box-shadow: 0 0 20px rgba(255, 176, 32, 0.35); }
.primary:hover { filter: brightness(1.08); }
.ghost { min-height: 44px; padding: 0 14px; border-radius: 6px; border: 1px solid rgba(124, 255, 178, 0.35); background: transparent; color: var(--soft); font-size: 13px; }
.ghost:hover:not(:disabled) { border-color: var(--phosphor); color: var(--ink); }
.wide { width: 100%; }
.mini { min-height: 30px; padding: 0 10px; border-radius: 4px; border: 1px solid rgba(124, 255, 178, 0.3); background: transparent; color: var(--soft); font-size: 11px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--soft); }
.field input { height: 44px; padding: 0 12px; border-radius: 6px; border: 1px solid rgba(124, 255, 178, 0.3); background: #010607; color: var(--ink); font: inherit; font-size: 15px; }

.app { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) minmax(280px, 364px); gap: 16px; padding: 16px 20px 32px; align-items: start; }
.col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card { padding: 16px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.card.act { border-color: rgba(255, 176, 32, 0.5); }
.empty { color: var(--muted); font-size: 13px; }
.note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.note code { color: var(--soft); }

.q-list { display: flex; flex-direction: column; gap: 8px; }
.q-item { width: 100%; padding: 12px 14px; text-align: left; border-radius: 6px; border: 1px solid rgba(124, 255, 178, 0.18); background: rgba(3, 18, 18, 0.6); display: flex; flex-direction: column; gap: 5px; }
.q-item.on { border-color: var(--c); background: rgba(255, 255, 255, 0.05); }
.q-item.done { opacity: 0.6; }
.q-top { display: flex; gap: 8px; align-items: center; }
.q-top .sub:last-child { margin-left: auto; }
.sev { padding: 1px 8px; border-radius: 3px; border: 1px solid var(--c); color: var(--c); font-family: var(--font-dot); font-size: 12px; }
.q-title { font-weight: 700; font-size: 15px; }
.q-sub { font-family: var(--font-mono); font-size: 11px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-state { font-size: 11px; color: var(--phosphor); }

.detail { gap: 16px; }
.detail-body { padding: 20px 22px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; min-height: 360px; }
.d-head { display: flex; flex-direction: column; gap: 4px; padding-left: 12px; border-left: 3px solid var(--c); }
.d-title { font-family: var(--font-jp); font-weight: 900; font-size: 24px; color: var(--ink); }
.d-subject { color: var(--c); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tile { padding: 10px 12px; border-radius: 6px; background: rgba(124, 255, 178, 0.05); border: 1px solid rgba(124, 255, 178, 0.14); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font-family: var(--font-mono); font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bars { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.brow-h { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.brow-h .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 5px; border-radius: 3px; background: rgba(124, 255, 178, 0.08); overflow: hidden; }
.track i { display: block; height: 5px; background: var(--amber); border-radius: 3px; }
.verdict { margin: 4px 0 0; color: var(--phosphor); font-size: 13px; font-weight: 500; }
.verdict.bad { color: var(--red); }
.logs { display: flex; flex-direction: column; gap: 6px; }
.logs code { display: block; padding: 8px 10px; border-radius: 4px; background: #010607; border: 1px solid rgba(124, 255, 178, 0.12); font-size: 11px; color: var(--soft); white-space: nowrap; overflow-x: auto; }
.raw { margin: 0; padding: 10px; background: #010607; border-radius: 4px; font-size: 11px; overflow-x: auto; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.mrow { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 4px; border: 1px solid rgba(124, 255, 178, 0.15); background: transparent; text-align: left; font-size: 12px; }

.live { padding: 14px 16px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.live-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.live-list li { display: grid; grid-template-columns: 64px 130px 70px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 11px; }
.live-list .ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.tag { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.cat-SECRET .tag { color: var(--amber); } .cat-EXPLOIT .tag { color: #ff4d8d; } .cat-RECON .tag { color: var(--cyan); }
.cat-BRUTE .tag { color: #b07cff; } .cat-SSH_OK .tag { color: var(--red); } .cat-VISIT .tag, .cat-FRIEND .tag { color: var(--phosphor); }
.linkish { padding: 0; border: none; background: none; color: var(--ink); text-align: left; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish:hover { color: var(--phosphor); text-decoration: underline; }

.segwrap { display: flex; flex-direction: column; gap: 6px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 44px; padding: 0 6px; border-radius: 6px; border: 1px solid rgba(124, 255, 178, 0.25); background: transparent; color: var(--soft); font-size: 13px; }
.seg button[aria-pressed='true'] { border-color: var(--amber); background: rgba(255, 176, 32, 0.18); color: #ffe2a8; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ok-box { margin: 0; padding: 12px; border-radius: 8px; border: 1px solid var(--phosphor); background: rgba(124, 255, 178, 0.1); }
.kv { display: flex; flex-direction: column; gap: 6px; }
.kv-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-family: var(--font-mono); }
.rules { display: flex; flex-direction: column; gap: 12px; }
.rule { display: flex; flex-direction: column; gap: 6px; }
.rule b { display: block; font-size: 13px; }
.rule .seg button { min-height: 36px; font-size: 12px; }
.bans { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.bans li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: 12px; padding-bottom: 6px; border-bottom: 1px solid rgba(124, 255, 178, 0.08); }
.bans li .sub { grid-column: 1; }
.bans li .mini { grid-row: 1 / span 2; grid-column: 2; }
.sensors { display: flex; flex-wrap: wrap; gap: 6px 12px; font-family: var(--font-mono); font-size: 12px; }
.sensor.ok { color: var(--phosphor); }
.sensor.bad { color: var(--amber); }
.sensor small { color: var(--muted); }

.toast { position: fixed; z-index: 9; left: 50%; bottom: 24px; transform: translate(-50%, 10px); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 8px; background: rgba(2, 16, 15, 0.95); border: 1px solid var(--phosphor); font-size: 14px; opacity: 0; pointer-events: none; transition: 0.3s; }
.toast.bad { border-color: var(--red); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .app { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
  .side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  .hint { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 32px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .live-list li { grid-template-columns: 56px minmax(0, 1fr) 56px; }
  .live-list .ln { grid-column: 1 / -1; }
  .side { display: flex; }
  .act { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6); }
  .ostatus .clock { display: none; }
}

/* 身元 // 逆探知 */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.guide { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 14px; border: 1px solid rgba(124, 255, 178, 0.35); color: var(--soft); text-decoration: none; font-family: var(--font-jp); }
.fox { width: 16px; height: 16px; flex: none; }
.idp { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 8px; border: 1px solid rgba(124, 255, 178, 0.22); background: rgba(3, 18, 18, 0.6); }
.idp.imp { border-color: rgba(214, 58, 58, 0.55); background: linear-gradient(120deg, rgba(214, 58, 58, 0.08), rgba(3, 18, 18, 0.6) 50%); }
.id-verdict { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
.id-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.id-who b { color: var(--c); font-size: 17px; }
.id-fox { width: 34px; height: 34px; }
.id-conf { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.id-conf b { font-family: var(--font-dot); font-weight: 400; color: var(--amber); }
.id-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.id-ua { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; padding: 6px 8px; border-radius: 4px; background: #010607; border: 1px solid rgba(124, 255, 178, 0.12); }
.id-ua code { font-size: 11px; color: var(--ink); word-break: break-all; }
.id-ua .sub { flex: none; }
.id-os { margin: 0; font-size: 12px; color: var(--soft); }
.id-os.bad b { color: #ff9b9b; }
.id-sig { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 6px; font-size: 12px; opacity: 0.55; }
.id-sig .mark { grid-row: span 2; color: var(--muted); font-family: var(--font-mono); }
.id-sig.on { opacity: 1; }
.id-sig.on .mark { color: #ff9b9b; font-weight: 700; }
.id-sig.on b { color: #ffb3b3; }
.id-box.l1 { padding: 10px; border-radius: 6px; border: 1px dashed rgba(124, 255, 178, 0.25); }
.id-fp { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 12px; }
.id-fp b { color: var(--soft); font-weight: 500; }
.id-group { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 600px) {
  .id-fp { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
