:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1a202c;
  --muted: #5a6573;
  --line: #d8dee6;
  --accent: #2b6cb0;
  --accent-soft: #e8f1fb;
  --success: #276749;
  --danger: #c53030;
  --shadow: 0 12px 32px rgba(26, 32, 44, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Yu Gothic UI", "Meiryo UI", "Segoe UI", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shell {
  width: min(560px, calc(100% - 48px));
  padding: 28px 0 16px;
  text-align: center;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.panel {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone {
  width: 100%;
  min-height: 280px;
  border: 2px dashed var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 20px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.01);
}

.drop-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.45;
  font-weight: 700;
}

.status-view {
  width: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hidden {
  display: none !important;
}

.status-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

.status-title.success {
  color: var(--success);
}

.status-title.error {
  color: var(--danger);
}

.status-file,
.status-detail {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-line;
}

.error-detail {
  color: var(--text);
  font-size: 18px;
}

.hint {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.ghost-button,
.primary-button {
  appearance: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  padding: 10px 22px;
  cursor: pointer;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
}

.ghost-button:hover,
.primary-button:hover {
  filter: brightness(0.98);
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #fff;
  margin-top: 8px;
  box-shadow: 0 8px 18px rgba(43, 108, 176, 0.22);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.bar {
  width: min(360px, 100%);
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e6edf5;
  overflow: hidden;
}

.bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.16s ease;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #d5e4f5;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

button:focus-visible,
.dropzone:focus-visible {
  outline: 3px solid rgba(43, 108, 176, 0.35);
  outline-offset: 3px;
}
