/* Font Inspector — Astro の CSS 処理を通さないよう public に置く */
:root {
  --fi-bg: #07080a;
  --fi-panel: #0e1014;
  --fi-line: #23262d;
  --fi-text: #d8dde6;
  --fi-dim: #7c8494;
  --fi-accent: #ffb000;
  --fi-accent2: #4fd1ff;
  --fi-bad: #ff5c5c;
  --fi-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.fi-dl details summary { cursor: pointer; color: var(--fi-text); }
.fi-dl details[open] summary { color: var(--fi-dim); }
body { margin: 0; background: var(--fi-bg); color: var(--fi-text); font: 14px/1.5 system-ui, sans-serif; }
.fi-header { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--fi-line); flex-wrap: wrap; }
.fi-title { font-family: var(--fi-mono); font-weight: 700; color: var(--fi-accent); letter-spacing: .08em; }
.fi-ver { color: var(--fi-dim); font-weight: 400; }
.fi-sub { color: var(--fi-dim); font-size: 12px; flex: 1; }
.fi-open { border: 1px solid var(--fi-accent); color: var(--fi-accent); padding: 4px 12px; border-radius: 4px; cursor: pointer; }
.fi-open:hover { background: var(--fi-accent); color: #000; }

.fi-app { display: flex; flex-direction: column; background: var(--fi-bg);
  margin-top: 50px; margin-bottom: 50px; height: calc(100vh - 110px); }   /* サイトのヘッダー/フッター分 */
html.is-embed .fi-app { margin: 0; height: 100vh; }                        /* iframe 埋め込み時は全面 */
.fi-main { display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px; flex: 1; min-height: 0; }
.fi-panel { overflow: auto; padding: 12px; border-right: 1px solid var(--fi-line); background: var(--fi-panel); }
.fi-center { background: var(--fi-bg); display: flex; flex-direction: column; padding: 0; }
.fi-right { border-right: 0; }
h3 { font: 700 12px var(--fi-mono); color: var(--fi-accent); letter-spacing: .1em; margin: 16px 0 6px; }
.fi-dim { color: var(--fi-dim); font-weight: 400; }
.fi-small { font-size: 12px; }

.fi-drop { border: 1px dashed var(--fi-dim); border-radius: 6px; padding: 18px 8px; text-align: center; color: var(--fi-dim); }
.fi-drop.over { border-color: var(--fi-accent); color: var(--fi-accent); }
.fi-drop-note { font-size: 11px; margin-top: 6px; }
.fi-row { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }

.fi-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 12px; }
.fi-dl dt { color: var(--fi-dim); }
.fi-dl dd { margin: 0; word-break: break-all; }

.fi-table { width: 100%; border-collapse: collapse; font: 12px var(--fi-mono); }
.fi-table th { text-align: left; color: var(--fi-dim); font-weight: 400; border-bottom: 1px solid var(--fi-line); padding: 2px 4px; }
.fi-table td { padding: 2px 4px; border-bottom: 1px solid #15181d; }
.fi-tables tbody tr { cursor: pointer; }
.fi-tables tbody tr:hover, .fi-tables tbody tr.active { background: #1b1f26; color: var(--fi-accent); }

button, input, select { background: #15181d; color: var(--fi-text); border: 1px solid var(--fi-line); border-radius: 4px; padding: 4px 8px; font: inherit; }
button { cursor: pointer; }
button:hover { border-color: var(--fi-accent); }
input:focus, select:focus { outline: 1px solid var(--fi-accent); }

.fi-tabs { display: flex; border-bottom: 1px solid var(--fi-line); background: var(--fi-panel); }
.fi-tab { border: 0; border-radius: 0; background: none; padding: 10px 16px; font: 700 12px var(--fi-mono); letter-spacing: .08em; color: var(--fi-dim); border-bottom: 2px solid transparent; }
.fi-tab.active { color: var(--fi-accent); border-bottom-color: var(--fi-accent); }
.fi-view { display: none; padding: 12px; overflow: auto; flex: 1; }
.fi-view.active { display: block; }
.fi-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.fi-wrap { flex-wrap: wrap; }
.fi-grow { flex: 1; min-width: 200px; }
#glyphSearch { width: 220px; }

.fi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px; }
.fi-cell { background: var(--fi-panel); border: 1px solid var(--fi-line); border-radius: 4px; cursor: pointer; padding: 4px 2px 2px; text-align: center; }
.fi-cell:hover { border-color: var(--fi-accent2); }
.fi-cell.active { border-color: var(--fi-accent); }
.fi-cell svg { width: 100%; height: 56px; display: block; }
.fi-cell svg path { fill: var(--fi-text); }
.fi-cell .gid { font: 10px var(--fi-mono); color: var(--fi-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-cell .gid.has-prog { color: var(--fi-accent); }

.fi-big { background: #000; border: 1px solid var(--fi-line); border-radius: 4px; }
.fi-big svg { width: 100%; height: 300px; display: block; }
.fi-big svg circle:active { cursor: grabbing; }
.fi-big svg { touch-action: none; }
.fi-warn { font-size: 12px; background: #2a1f00; border: 1px solid #6b5000; color: #ffd27a; border-radius: 4px; padding: 6px 8px; margin-top: 6px; }
.fi-editbar { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 6px; }
.fi-check { font-size: 12px; color: var(--fi-dim); display: block; margin: 6px 0; }

.fi-shape { background: #000; border: 1px solid var(--fi-line); border-radius: 4px; margin-bottom: 8px; overflow-x: auto; }
.fi-shape svg { display: block; height: 160px; }

.fi-note { font-size: 13px; color: var(--fi-dim); margin-bottom: 10px; }
.fi-note b { color: var(--fi-text); }
.fi-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 12px; }
.fi-card { background: var(--fi-panel); border: 1px solid var(--fi-line); border-radius: 4px; padding: 6px 10px; }
.fi-card .k { font-size: 11px; color: var(--fi-dim); }
.fi-card .v { font: 700 18px var(--fi-mono); color: var(--fi-accent2); }
.fi-sub-tab.active { border-color: var(--fi-accent); color: var(--fi-accent); }

.fi-fnindex { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.fi-fnindex a { font: 11px var(--fi-mono); color: var(--fi-accent2); border: 1px solid var(--fi-line); border-radius: 3px; padding: 1px 6px; text-decoration: none; }
.fi-fnindex a:hover { border-color: var(--fi-accent2); }

.fi-asm { font: 12px/1.55 var(--fi-mono); }
.fi-asm-small { font-size: 11px; max-height: 40vh; overflow-y: auto; overflow-x: hidden; }
.fi-asm-small .ln > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.fi-asm .ln { display: grid; grid-template-columns: 5em 1fr; white-space: pre; }
.fi-asm .ln:hover { background: #15181d; }
.fi-asm .pc { color: #4a5160; }
.fi-asm .mn { color: var(--fi-text); }
.fi-asm .mn.push { color: #6f7a8c; }
.fi-asm .mn.flow { color: var(--fi-accent); }
.fi-asm .mn.def { color: #ff5ec8; font-weight: 700; }
.fi-asm .arg { color: var(--fi-accent2); }
.fi-asm .cm { color: #4a5160; }
.fi-asm a { color: #ff5ec8; }
.fi-asm .err { color: var(--fi-bad); }
.fi-asm .flash { background: #332600; }

.fi-hex { font: 12px/1.5 var(--fi-mono); color: var(--fi-text); margin: 0; }
.fi-hex .o { color: #4a5160; }
.fi-hex .a { color: var(--fi-dim); }

.fi-status { flex: none; height: 26px; padding: 4px 12px; font: 12px var(--fi-mono); color: var(--fi-dim); background: var(--fi-panel); border-top: 1px solid var(--fi-line); }
.fi-status.err { color: var(--fi-bad); }

.fi-axis { font-size: 12px; margin-bottom: 6px; }
.fi-axis input { width: 100%; padding: 0; }

@media (max-width: 1000px) {
  .fi-app { height: auto; }
  .fi-main { grid-template-columns: 1fr; height: auto; }
  .fi-panel { border-right: 0; border-bottom: 1px solid var(--fi-line); }
  .fi-view { min-height: 60vh; }
}
