:root {
  --bg: #fff7ef;
  --card: #ffffff;
  --text: #112130;
  --subtle: #5b6572;
  --line: #f2d7b9;
  --accent: #ff8a00;
  --accent-2: #58d3d1;
  --accent-3: #ffd253;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 100% -10%, #ffd253 0 28%, transparent 29%),
    radial-gradient(circle at -10% 100%, #58d3d1 0 22%, transparent 23%),
    linear-gradient(180deg, #ff9500 0%, #ff8300 40%, var(--bg) 100%);
}

.shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 14px 40px;
}

.panel {
  background: var(--card);
  border: 1px solid #ffd3a3;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 14px 30px rgba(84, 48, 0, 0.14);
}

h1 {
  margin: 0;
  font-size: 1.65rem;
}

.lede {
  margin: 8px 0 0;
  color: #4d5767;
  line-height: 1.5;
}

.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #fff3df;
  border: 1px solid #f2d7b9;
  border-radius: 12px;
  color: #6b5a3f;
  font-size: 0.85rem;
  line-height: 1.45;
}

.disclaimer-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d08a2a;
}

.disclaimer-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.actions {
  margin-top: 16px;
}

.stacked-form {
  display: grid;
  gap: 10px;
}

.stacked-form label {
  font-size: 0.9rem;
  color: var(--subtle);
}

.stacked-form input,
.stacked-form select,
.stacked-form button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

.drop-area {
  display: grid;
  gap: 4px;
  justify-items: center;
  align-items: center;
  text-align: center;
  border: 2px dashed #ffb15c;
  border-radius: 12px;
  padding: 16px;
  background: #fff7ec;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.drop-area.is-dragover {
  border-color: #3fbfbc;
  background: #ecffff;
}

.drop-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffe2bd;
  color: #9e5600;
}

.drop-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.drop-title {
  font-weight: 600;
}

.drop-area.has-file {
  border-color: #4fbab8;
  background: #f0fffe;
}

.drop-area.has-file .drop-title {
  color: #0f6f6c;
  word-break: break-all;
}

.drop-subtitle,
.drop-file {
  color: var(--subtle);
  font-size: 0.85rem;
}

.drop-area.has-file .drop-icon {
  background: #cdf3f1;
  color: #0f6f6c;
}

.stacked-form button {
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.stacked-form button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.status-card {
  margin-top: 14px;
  border: 1px solid #ffd7aa;
  border-radius: 12px;
  padding: 14px;
  background: #fffaf4;
}

#statusText {
  margin: 0;
  font-weight: 600;
}

#progressText {
  margin: 6px 0 0;
  color: var(--subtle);
}

.progress-track {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: #f5e2ca;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a00 0%, #ffc15e 100%);
  transition: width 0.28s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill.is-working::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: progressShimmer 1.1s linear infinite;
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 0.72rem;
  padding: 8px 6px;
  border-radius: 999px;
  border: 1px solid #f3d6b4;
  background: #fff;
  color: #a06b2f;
}

.step-icon {
  width: 14px;
  height: 14px;
  color: currentColor;
  display: inline-flex;
}

.step-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.step-label {
  line-height: 1;
}

.step-dot.is-active {
  border-color: #f3a14a;
  background: #ffeedb;
  color: #9e5600;
  font-weight: 600;
  position: relative;
}

.step-dot.is-active .step-icon {
  animation: stepPulse 1.1s ease-in-out infinite;
}

@keyframes stepPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.55; }
}

.step-dot.is-done {
  border-color: #76ccc9;
  background: #ebffff;
  color: #137c78;
}

.summary-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  color: #1f2937;
  display: grid;
  gap: 8px;
}

.summary-list li {
  margin: 0;
  border: 1px solid #f0d6b8;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  font-weight: 500;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px auto 0;
  width: fit-content;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.download-btn:hover {
  background: #e67a00;
}

.download-btn.is-used {
  background: #e3e8ee;
  color: #4a5563;
  pointer-events: none;
}

.download-btn.is-used .btn-icon {
  color: #4a5563;
}

.btn-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.btn-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.download-btn[hidden] {
  display: none !important;
}

.download-note,
.field-note {
  margin: 8px 0 0;
  color: #6b5b46;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 720px) {
  .shell {
    padding: 36px 20px 60px;
  }

  .panel {
    padding: 24px;
  }
}

.site-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 0.82rem;
  text-shadow: 0 1px 2px rgba(120, 60, 0, 0.25);
}

.footer-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff3b5c;
}

.footer-heart svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  animation: heartPulse 1.4s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
