:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22d3ee;
  --error: #ef4444;
  --border: #374151;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header { padding: 24px 16px; text-align: center; }
.app-header h1 { margin: 0; font-weight: 800; letter-spacing: .02em; }
.subtitle { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }

.container { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; display: grid; gap: 20px; }

.uploader, .output {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.input-label { display: block; font-weight: 600; margin-bottom: 8px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  transition: border-color .2s ease, background-color .2s ease;
  outline: none;
}
.dropzone:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34,211,238,.3); }
.dropzone.dragover { background: rgba(34,211,238,.06); border-color: var(--accent); }
.drop-title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.drop-sub, .drop-note { margin: 6px 0 0; color: var(--muted); }

.hidden-input { position: absolute; left: -9999px; width: 1px; height: 1px; }

.status { margin-top: 14px; display: grid; gap: 6px; }
.progress-row { display: flex; align-items: center; gap: 8px; }
progress { width: 100%; height: 14px; }
.progress-pct { min-width: 3ch; text-align: right; color: var(--muted); }
.current-file { min-height: 1.2em; color: var(--muted); }

.errors { margin-top: 10px; color: var(--error); line-height: 1.6; }
.errors .item { display: block; }

.output h2 { margin-top: 0; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.toolbar button {
  background: #1f2937;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.toolbar button:disabled { opacity: .5; cursor: not-allowed; }
.toolbar .lang-note { margin-left: auto; color: var(--muted); }

.result {
  width: 100%;
  background: #0b1220;
  color: #eaeef7;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Source Code Pro", "Noto Sans Mono CJK JP", monospace;
  line-height: 1.5;
}

.app-footer { text-align: center; color: var(--muted); padding: 12px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

