:root {
  color-scheme: light;
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  background: #f4f6f8;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 32px;
}

.workspace {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 8px 12px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: #ffffff;
  color: #4d5b6b;
  text-align: center;
  font-size: 14px;
}

.status-pill.busy {
  border-color: #2b8a7e;
  color: #16675d;
}

.converter-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(26, 36, 50, 0.08);
}

.input-panel,
.progress-panel {
  padding: 18px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 18px;
  border: 1px dashed #aeb9c7;
  border-radius: 8px;
  background: #fafbfc;
  cursor: pointer;
  text-align: center;
}

.drop-zone.dragging {
  border-color: #2b8a7e;
  background: #eef8f6;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #e6edf4;
  color: #2b3a4a;
  font-size: 25px;
}

.drop-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.drop-name {
  display: block;
  max-width: 100%;
  color: #657180;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.settings-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.settings-grid label {
  display: grid;
  gap: 6px;
}

.settings-grid span {
  color: #4f5d6b;
  font-size: 13px;
  font-weight: 600;
}

.settings-grid input,
.settings-grid select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #ffffff;
  color: #17202a;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

button {
  height: 42px;
  border: 1px solid #1e6d63;
  border-radius: 6px;
  background: #24786d;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  border-color: #cbd5df;
  background: #ffffff;
  color: #374555;
}

button:disabled {
  border-color: #d6dde6;
  background: #e9edf2;
  color: #8b96a4;
  cursor: default;
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24786d, #4b8fcb);
  transition: width 140ms ease;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.stats div {
  min-width: 0;
  padding: 4px 0 4px 12px;
  border-left: 3px solid #d7dee8;
}

.stats dt {
  margin-bottom: 6px;
  color: #657180;
  font-size: 12px;
  font-weight: 700;
}

.stats dd {
  margin: 0;
  color: #17202a;
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.log {
  min-height: 190px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #101820;
  color: #e6edf4;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13px;
}

.log div + div {
  margin-top: 8px;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .converter-grid,
  .stats {
    grid-template-columns: 1fr;
  }
}
