:root {
  color-scheme: dark;
  --bg: #10131a;
  --panel: #191e29;
  --panel-light: #222938;
  --text: #f2f4f8;
  --muted: #9da6b8;
  --accent: #a9e86d;
  --accent-dark: #2e4e22;
  --border: #30394b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 50% -20%, #263326 0, var(--bg) 46rem);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.container { width: min(900px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 40px; }
.hero { margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 52px); letter-spacing: -.04em; }
.subtitle { margin: 10px 0 0; color: var(--muted); }
.search-panel { padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: color-mix(in srgb, var(--panel) 92%, transparent); box-shadow: 0 18px 60px #0003; }
.search-box { display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid #49556b; border-radius: 12px; background: #11151e; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #a9e86d22; }
.search-icon { color: var(--accent); font-size: 28px; transform: rotate(-20deg); }
input { width: 100%; padding: 15px 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 17px; }
kbd { padding: 2px 7px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.translation-choice { display: flex; align-items: center; gap: 8px; }
select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-light); color: var(--text); }
.results { display: grid; gap: 10px; margin-top: 24px; }
.directory { margin-top: 18px; overflow: hidden; border: 1px solid #4a5870; border-radius: 16px; background: #151b27; box-shadow: 0 12px 34px #0004, inset 0 1px #ffffff0b; }
.directory > summary { padding: 16px 18px; border-bottom: 1px solid transparent; background: linear-gradient(90deg, #263246, #1c2533); cursor: pointer; color: var(--text); font-weight: 700; user-select: none; }
.directory > summary::marker { color: var(--accent); }
.directory > summary span { margin-left: 8px; }
.directory > summary span::before { content: "▦"; display: inline-block; margin-right: 9px; color: var(--accent); font-size: 17px; transform: translateY(1px); }
.directory[open] > summary { border-bottom-color: #4a5870; }
.directory > summary + .directory-content { border-top: 0; }
.directory-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; padding: 14px; background: #10151f; }
.directory-group { overflow: hidden; border: 1px solid #46546c; border-radius: 11px; background: #1a2230; box-shadow: 0 3px 10px #0003; }
.directory-group > summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 650; list-style-position: inside; }
.directory-group > summary::marker { color: var(--accent); }
.directory-group > summary em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; }
.directory-group[open] > summary { border-bottom: 1px solid #303b4f; background: #222b3a; color: var(--accent); }
.directory-list { display: grid; max-height: 310px; gap: 2px; margin: 0; padding: 8px 10px; overflow-y: auto; list-style: none; }
.directory-item { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.directory-item:hover { background: #a9e86d18; color: var(--accent); }
.directory-item small { flex: 0 1 48%; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.directory-item span { overflow-wrap: anywhere; }
.result, .empty { padding: 16px 18px; border: 1px solid var(--border); border-radius: 13px; background: var(--panel); }
.result { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.result:hover { border-color: #66768e; background: var(--panel-light); }
.result-title { margin: 0; font-size: 17px; font-weight: 650; }
.result-key { margin-top: 3px; color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.button { display: inline-block; padding: 7px 11px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; white-space: nowrap; }
.button.primary { background: var(--accent); color: #172312; font-weight: 700; }
.button.secondary { border: 1px solid var(--border); }
.empty { color: var(--muted); text-align: center; }
.notice { margin-top: 28px; padding: 18px 20px; border: 1px solid #39465b; border-left: 3px solid var(--accent); border-radius: 12px; background: #171d28; color: #9da6b8; font-size: 12px; }
.notice h2 { margin: 0 0 9px; color: var(--text); font-size: 14px; }
.notice p { margin: 6px 0 0; }
.notice a { color: var(--accent); }
@media (max-width: 620px) { .container { padding-top: 40px; } .toolbar, .result { align-items: stretch; flex-direction: column; } .actions { justify-content: flex-start; } }
