/* おくるん — Cyber / Cyan / Intelligence-agency inspired UI */
:root {
  --bg: #050a12;
  --bg2: #080f1b;
  --panel: rgba(10, 20, 34, .82);
  --panel-solid: #0b1626;
  --line: rgba(0, 229, 255, .18);
  --line-strong: rgba(0, 229, 255, .45);
  --cyan: #00e5ff;
  --cyan-dim: #12b8cc;
  --cyan-glow: rgba(0, 229, 255, .35);
  --text: #d9e6ee;
  --muted: #9db3c4;
  --faint: #6f8597;
  --ok: #37f0a5;
  --warn: #ffc14d;
  --danger: #ff4d6d;
  --magenta: #e4007f;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic Medium", "Yu Gothic", Meiryo, "Segoe UI", system-ui, sans-serif;
  --r: 12px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100svh; font-family: var(--sans); font-size: 15px; line-height: 1.7; color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0, 229, 255, .10), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(228, 0, 127, .07), transparent 60%),
    linear-gradient(var(--bg2), var(--bg));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body::before { /* グリッド */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(0, 229, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 80%);
}
body::after { /* 走査線 */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .18) 3px 4px);
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ロゴタイプ用フォント（自前配信・ひらがなサブセットのみ） */
@font-face { font-family: "Zen Kaku Gothic New"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/zen-kaku-500-hira.woff2") format("woff2"); unicode-range: U+3041-309F, U+30A0-30FF; }
@font-face { font-family: "Zen Kaku Gothic New"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/zen-kaku-700-hira.woff2") format("woff2"); unicode-range: U+3041-309F, U+30A0-30FF; }

/* ヘッダー */
:root { --neon-y: #f5ff5a; --neon-r: #ff2d55; }
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0 14px; border-bottom: 1px solid var(--line); position: relative; }
.hdr::after { /* 下端を流れるネオンライン */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--cyan) 20%, var(--neon-y) 45%, var(--neon-r) 60%, var(--cyan) 80%, transparent 100%);
  background-size: 220% 100%; animation: neon-sweep 4.5s linear infinite; opacity: .85; filter: drop-shadow(0 0 6px var(--cyan));
}
@keyframes neon-sweep { 0% { background-position: 120% 0 } 100% { background-position: -120% 0 } }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 5px 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 18px rgba(0, 229, 255, .25); }
.logo-chip img { height: 36px; width: auto; display: block; }
.brand-sep { width: 1px; height: 38px; background: linear-gradient(180deg, transparent, var(--cyan), transparent); opacity: .8; }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.brand .name { font-family: "Zen Kaku Gothic New", var(--sans); font-weight: 700; font-size: 27px; letter-spacing: .14em; color: #fff; text-shadow: 0 0 14px rgba(0, 229, 255, .55), 0 0 2px rgba(255,255,255,.6); position: relative; padding-bottom: 3px; }
.brand .name::after { content: ""; position: absolute; left: 0; right: .14em; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--neon-y), var(--neon-r), var(--cyan)); background-size: 300% 100%; animation: neon-slide 3s linear infinite; box-shadow: 0 0 10px var(--cyan); }
@keyframes neon-slide { 0% { background-position: 0% 0 } 100% { background-position: 300% 0 } }
.brand .tag { font-size: 11.5px; letter-spacing: .1em; color: var(--cyan); margin-top: 5px; }
.hdr .nav { display: flex; gap: 22px; margin-left: auto; margin-right: 22px; font-size: 14px; font-weight: 600; letter-spacing: .05em; }
.hdr .nav a { position: relative; color: #eaf6fa; padding: 10px 2px; text-decoration: none; }
.hdr .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; background: linear-gradient(90deg, var(--cyan), var(--neon-y), var(--neon-r), var(--cyan)); background-size: 300% 100%; animation: neon-slide 2s linear infinite; box-shadow: 0 0 10px var(--neon-y), 0 0 18px var(--neon-r); }
.hdr .nav a:hover::after, .hdr .nav a:focus-visible::after, .hdr .nav a[aria-current="page"]::after { transform: scaleX(1); }
.hdr .nav a:hover { color: #fff; text-shadow: 0 0 10px var(--cyan); }
.hdr .nav a[aria-current="page"] { color: #fff; }
.hdr .status { font-family: var(--mono); font-size: 12px; color: #d7eaf1; letter-spacing: .1em; display: flex; align-items: center; gap: 10px; }
.hdr .status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--neon-y); box-shadow: 0 0 12px var(--neon-y), 0 0 24px var(--neon-r); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .45; transform: scale(.75) } }
.hdr .who { color: #fff; }
.hdr button.link { background: none; border: 0; color: var(--neon-y); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; cursor: pointer; padding: 10px 0; text-shadow: 0 0 8px rgba(245,255,90,.6); }

/* ヒーロー */
.hero { padding: 44px 0 26px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: .02em; line-height: 1.25; }
.hero h1 em { font-style: normal; color: var(--cyan); text-shadow: 0 0 24px var(--cyan-glow); }
.hero p { margin: 0; color: var(--muted); max-width: 720px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge { font-size: 12px; letter-spacing: .04em; color: var(--cyan); border: 1px solid var(--line-strong); padding: 4px 10px; border-radius: 999px; background: rgba(0, 229, 255, .05); white-space: nowrap; }

/* モードタブ */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.tabs button[aria-pressed=true] { border-color: var(--cyan); background: rgba(0, 229, 255, .08); box-shadow: 0 0 22px rgba(0, 229, 255, .12); }
.tabs button[aria-pressed=true] b { color: var(--cyan); }
.tabs button { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-align: left; color: var(--muted); cursor: pointer; font: inherit; transition: .15s; }
.tabs button b { display: block; font-size: 16px; color: var(--text); letter-spacing: .06em; }
.tabs button small { font-size: 12px; }
.tabs button.on { border-color: var(--cyan); background: rgba(0, 229, 255, .08); box-shadow: 0 0 22px rgba(0, 229, 255, .12); }
.tabs button.on b { color: var(--cyan); }

/* パネル（HUD 風コーナー） */
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .02); }
.panel::before, .panel::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--cyan); opacity: .8; }
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: var(--r) 0 0 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 var(--r) 0; }
.panel + .panel { margin-top: 20px; }
.panel h2 { margin: 0 0 14px; font-size: 14px; letter-spacing: .1em; color: var(--cyan); display: flex; align-items: center; gap: 10px; font-weight: 700; }
.panel h2 .n { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; }
.panel h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.panel h2 .n { color: var(--faint); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .panel { padding: 20px 16px; } .hdr { flex-wrap: wrap; gap: 6px 16px; padding: 12px 0 10px; } .hdr .nav { margin: 0; width: 100%; gap: 14px; } .hdr .nav a { padding: 6px 0; } .hdr .status { display: none; } .logo-chip img { height: 28px; } .brand .name { font-size: 22px; } .brand-sep { height: 30px; } .hdr .status.who-on { display: flex; width: 100%; } .tabs { grid-template-columns: 1fr; } .hero { padding: 26px 0 18px; } }

/* フォーム */
label.f { display: block; margin-bottom: 14px; }
label.f > span, .lbl { display: block; font-size: 12px; color: var(--muted); letter-spacing: .08em; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 11px 13px; font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, .15); }
textarea { min-height: 90px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ferr { color: var(--danger); font-size: 13px; margin: 6px 0 0; }
.mono { font-family: var(--mono); }
.chk { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; cursor: pointer; }
.chk input { margin-top: 5px; accent-color: var(--cyan); width: 16px; height: 16px; }
.chk b { font-weight: 600; }
.chk small { display: block; color: var(--muted); font-size: 12px; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 8px; border: 1px solid var(--line-strong); background: rgba(0, 229, 255, .08); color: var(--cyan); font: inherit; font-weight: 700; letter-spacing: .06em; cursor: pointer; transition: .15s; }
@media (hover: hover) { .btn:hover { background: rgba(0, 229, 255, .16); box-shadow: 0 0 22px var(--cyan-glow); text-decoration: none; } }
.btn { white-space: nowrap; min-height: 44px; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.primary { background: linear-gradient(135deg, var(--cyan), #0aa5c2); color: #03121a; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 77, 109, .5); background: rgba(255, 77, 109, .06); }
.btn.danger:hover { box-shadow: 0 0 22px rgba(255, 77, 109, .35); }
.btn.sm { padding: 7px 12px; font-size: 13px; min-height: 36px; }
.btn.wide { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.pair { display: inline-flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* ドロップゾーン */
.drop.locked { opacity: .6; cursor: not-allowed; }
.drop { border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 34px 20px; text-align: center; cursor: pointer; transition: .15s; background: rgba(0, 229, 255, .03); position: relative; overflow: hidden; }
.drop:hover, .drop.over { background: rgba(0, 229, 255, .09); border-color: var(--cyan); box-shadow: inset 0 0 40px rgba(0, 229, 255, .08); }
.drop .ico { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--cyan); }
.drop b { display: block; font-size: 16px; }
.drop small { color: var(--muted); }
.drop input { display: none; }
.files { list-style: none; margin: 14px 0 0; padding: 0; }
.files li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: rgba(0, 0, 0, .25); font-size: 14px; }
.files li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li .sz { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.files li .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; min-width: 36px; min-height: 36px; }
.files li .rm:disabled { opacity: .3; cursor: not-allowed; }
.files li .rm:hover { color: var(--danger); }
.files li .bar { grid-column: 1 / -1; height: 3px; background: rgba(255, 255, 255, .06); border-radius: 2px; overflow: hidden; }
.files li .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: 0 0 10px var(--cyan); transition: width .2s; }
.files li.done .bar i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.total { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: .08em; }

/* 宛先チップ */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, .35); min-height: 48px; cursor: text; }
.chips:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, .15); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 229, 255, .12); border: 1px solid var(--line-strong); font-size: 13px; font-family: var(--mono); }
.chip.bad { background: rgba(255, 77, 109, .12); border-color: rgba(255, 77, 109, .5); color: var(--danger); }
.chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 16px; padding: 4px 6px; line-height: 1; opacity: .8; }
.chips input { flex: 1; min-width: 180px; background: none; border: 0; color: var(--text); font: inherit; font-size: 16px; outline: none; padding: 4px; }

/* 進捗・オーバーレイ */
.progress { margin-top: 18px; }
.progress .big { height: 10px; background: rgba(255, 255, 255, .06); border-radius: 6px; overflow: hidden; position: relative; }
.progress .big i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: 0 0 14px var(--cyan); transition: width .25s; }
.progress .meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: .08em; }

/* 結果・鍵表示 */
.keybox { border: 1px solid var(--line-strong); border-radius: 10px; padding: 16px 18px; background: rgba(0, 229, 255, .05); margin: 12px 0; }
.keybox .k { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }
.keybox .v { font-family: var(--mono); font-size: 24px; letter-spacing: .12em; color: var(--cyan); text-shadow: 0 0 18px var(--cyan-glow); word-break: break-all; margin: 4px 0; }
.keybox .v.sm { font-size: 14px; letter-spacing: 0; }
.keybox .warn { color: var(--warn); font-size: 12.5px; }
.callout { border-left: 3px solid var(--cyan); background: rgba(0, 229, 255, .06); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 14px; margin: 12px 0; }
.callout.warn { border-color: var(--warn); background: rgba(255, 193, 77, .07); }
.callout.danger { border-color: var(--danger); background: rgba(255, 77, 109, .07); }
.callout.ok { border-color: var(--ok); background: rgba(55, 240, 165, .07); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 12.5px; letter-spacing: .06em; }
.kv dd { margin: 0; word-break: break-all; }

/* テーブル */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th, table.t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: 12px; color: var(--muted); letter-spacing: .06em; font-weight: 600; white-space: nowrap; }
table.t td.mono, table.t .btn, table.t .pill { white-space: nowrap; }
table.t td.mono { font-family: var(--mono); font-size: 12.5px; }
.tscroll { overflow-x: auto; }
.pill { display: inline-block; font-size: 12px; letter-spacing: .04em; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--danger); } .pill.cy { color: var(--cyan); } .pill.mu { color: var(--muted); }

/* ステップ表示（ログイン） */
.steps { display: flex; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; color: var(--muted); margin-bottom: 18px; }
.steps span.on { color: var(--cyan); }
.steps span::before { content: "▸ "; }

/* トースト */
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: .2s; z-index: 50; background: var(--panel-solid); border: 1px solid var(--line-strong); color: var(--text); padding: 12px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: var(--danger); }

/* フッター */
.ftr { position: relative; z-index: 1; margin-top: 56px; padding: 26px 20px 34px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.ftr .in { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.ftr .orgs { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.ftr .orgs a { color: var(--text); }
.ftr .orgs a span { font-family: var(--mono); font-size: 11px; color: var(--cyan); margin-left: 8px; letter-spacing: .08em; }
.ftr .links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; letter-spacing: .04em; }
.ftr .links a { padding: 6px 0; }
.ftr .dev { width: 100%; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: #d7eaf1; }
.ftr .dev a { color: var(--neon-y); text-shadow: 0 0 8px rgba(245,255,90,.5); font-weight: 700; }
.ftr .copy { width: 100%; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }

.notice { font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
/* 汎用 */
.hide { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
noscript p { color: var(--warn); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.sec { margin-top: 26px; }
.terminal { font-family: var(--mono); font-size: 12.5px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; color: #9fd8e3; max-height: 260px; overflow: auto; white-space: pre-wrap; }
.terminal .ok { color: var(--ok); } .terminal .er { color: var(--danger); }
.lock { width: 64px; height: 64px; color: var(--cyan); filter: drop-shadow(0 0 14px var(--cyan-glow)); margin: 0 auto 8px; }
.qr { width: 160px; height: 160px; border-radius: 8px; border: 4px solid #fff; background: #fff; }
.cl h3 { font-family: var(--mono); color: var(--cyan); letter-spacing: .12em; font-size: 14px; margin: 22px 0 6px; }
.cl ul { margin: 0; padding-left: 20px; }
.cl li { margin: 3px 0; }

/* インラインスタイル代替（CSP style-src 'self' 準拠） */
.jc { justify-content: center; }
.m0 { margin: 0; }
.mt14 { margin-top: 14px; }
.mt8 { margin-top: 8px; }
.wauto { width: auto; }
.cl ol { margin: 0; padding-left: 22px; }
.cl ol li { margin: 6px 0; }
