:root {
  --bg: #fefcf6;
  --paper: #ffffff;
  --ink: #1d1c2c;
  --muted: #6b6a7a;
  --accent: #e94560;
  --accent-dark: #c0344b;
  --soft: #f2efe6;
  --line: #e2dfd3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

header {
  text-align: center;
  padding: 3.5rem 1rem 1.5rem;
}

h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0.4rem 0 0;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.hint {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.block-label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.block-label:last-child { margin-bottom: 0; }

.block-label input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.12s ease;
}

.block-label input:focus {
  outline: none;
  border-color: var(--accent);
}

.home-row { display: inline-flex; align-items: center; gap: 0.4rem; }
.home-icon { font-size: 1.1rem; }

.dest-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem;
  background: var(--soft);
  border-radius: 10px;
}

.dest-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 4px;
}

.dest-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dest-fields input {
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.dest-fields input:focus {
  outline: none;
  border-color: var(--accent);
}

.remove-dest {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0 0.4rem;
  line-height: 1;
  margin-top: 2px;
}

.remove-dest:hover { color: var(--accent); }

.ghost-btn {
  display: inline-block;
  background: transparent;
  border: 1.5px dashed var(--line);
  color: var(--muted);
  padding: 0.65rem 1.1rem;
  border-radius: 9px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.12s ease;
}

.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.actions { text-align: center; margin-top: 1.75rem; }

.primary-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, transform 0.05s ease;
}

.primary-btn:hover { background: var(--accent-dark); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn[disabled] {
  background: var(--muted);
  cursor: not-allowed;
}

.fineprint {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.hidden { display: none !important; }

.progress-card { text-align: center; }
.progress-bar {
  height: 14px;
  background: var(--soft);
  border-radius: 99px;
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid var(--line);
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s ease;
}

#progress-message {
  margin: 0.5rem 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.result-card { text-align: center; }
.download-btn { margin: 0.8rem 0.4rem 0.4rem; }

.error-card { border-color: var(--accent); }
.error-card h2 { color: var(--accent); }

footer {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  .card { padding: 1.1rem; }
  header { padding: 2rem 1rem 1rem; }
}
