:root {
  --bg: #fff7d6;
  --card: #fffef7;
  --ink: #4a4020;
  --muted: #8c7b3e;
  --accent: #6fa33d;
  --accent-ink: #ffffff;
  --border: #f0e1a0;
  --btn-bg: #f5edc9;
  --btn-bg-hover: #ece0b0;
  --warn-bg: #fff3d1;
  --warn-border: #f0c869;
  --error-bg: #fdeceb;
  --error-border: #e2685c;
  --success: #4c8c2b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image: url("assets/t3_transport_app_background.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--ink);
  min-height: 100vh;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

header h1 {
  font-size: 22px;
  margin: 0 0 4px;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.step-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  background: var(--btn-bg);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
}

.btn:hover:not(:disabled) {
  background: var(--btn-bg-hover);
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filename {
  color: var(--muted);
  font-size: 13px;
}

.text-input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
}

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

.exclude-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exclude-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--btn-bg);
  border-radius: 6px;
  padding: 6px 8px 6px 12px;
  font-size: 14px;
}

.exclude-list li.exclude-empty {
  background: none;
  color: var(--muted);
  font-style: italic;
  padding-left: 0;
}

.exclude-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
}

.exclude-remove:hover {
  background: var(--btn-bg-hover);
  color: var(--accent);
}

.status {
  margin-top: 12px;
  font-size: 14px;
}

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

#warnings-section {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.warnings-header {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#warnings-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

#warnings-list li {
  margin-bottom: 4px;
}

.error-box {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  color: #7a2a22;
}

.app-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 8px;
  color: var(--muted);
}

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.4s ease;
}

#loading-screen[hidden] {
  display: none;
}

.loading-logo-wrap {
  position: relative;
  width: 240px;
  height: 240px;
}

.loading-logo-base,
.loading-logo-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loading-logo-fill {
  --progress: 0deg;
  -webkit-mask-image: conic-gradient(black var(--progress), transparent var(--progress));
  mask-image: conic-gradient(black var(--progress), transparent var(--progress));
}

.app {
  transition: opacity 0.4s ease;
}
