:root {
  --bg: #15140f;
  --bg-panel: #1c1b15;
  --line: #33321f;
  --text: #ece7d6;
  --text-dim: #a7a289;
  --accent: #e2a640;
  --accent-dim: #6b5427;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: repeating-linear-gradient(
    to bottom,
    var(--accent) 0px, var(--accent) 2px,
    transparent 2px, transparent 10px
  );
  opacity: 0.55;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.head h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.head .sub {
  color: var(--text-dim);
  margin: 0 0 40px;
  font-size: 15px;
  line-height: 1.6;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  margin-bottom: 24px;
}

.panel.hidden { display: none; }

.dropzone {
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent-dim);
  background: rgba(226, 166, 64, 0.04);
}

.drop-main {
  margin: 0 0 6px;
  font-size: 15px;
}

.drop-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
}

.drop-file {
  margin: 14px 0 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

.row { margin-top: 20px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.minmax {
  display: flex;
  align-items: center;
  gap: 8px;
}

.minmax input {
  width: 88px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 13px;
}

.minmax input:focus { outline: 1px solid var(--accent); }

.btn {
  border: none;
  border-radius: 3px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 22px;
}

.btn.primary {
  background: var(--accent);
  color: #201803;
}

.btn.primary:disabled {
  background: var(--accent-dim);
  color: #3a300f;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  margin-top: 0;
}

.btn.small { padding: 6px 12px; font-size: 12px; }

.status {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-dim);
  min-height: 1em;
}

.status.error { color: #e2704a; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 650;
}

.hint {
  font-size: 12px;
  color: var(--text-dim);
}

.segments {
  display: flex;
  flex-direction: column;
  max-height: 480px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.segment {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.segment:first-child { border-top: none; }

.seg-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seg-speaker {
  font-weight: 650;
  font-size: 13px;
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--sans);
  width: 100%;
  cursor: text;
}

.seg-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.seg-text {
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  border-radius: 2px;
  padding: 2px 4px;
  margin: -2px -4px;
}

.seg-text:focus {
  background: rgba(226, 166, 64, 0.06);
}

.next-hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

.summary {
  font-size: 14.5px;
  line-height: 1.75;
}

.summary h2 {
  font-size: 15px;
  color: var(--accent);
  margin: 22px 0 8px;
}

.summary h2:first-child { margin-top: 0; }

.summary ul { padding-left: 20px; margin: 8px 0; }
.summary table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13.5px; }
.summary th, .summary td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.summary th { color: var(--text-dim); font-weight: 600; }
