:root {
  --primary: #d97706;
  --primary-hover: #b45309;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
}

.app-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-bar {
  display: flex;
  justify-content: flex-end;
}

.lang-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  background: var(--card-bg);
  color: var(--text);
}

main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
header {
  text-align: center;
  padding: 12px 0 4px;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

header h1 span {
  color: var(--primary);
}

header p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Search Card */
.search-card {
  background: var(--card-bg);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.input-group input[type="text"] {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.input-wrapper {
  position: relative;
}
.btn-field-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.btn-field-clear:hover {
  color: var(--text);
  background: var(--border);
}

.input-group input[type="text"]:focus {
  border-color: var(--primary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.btn-submit {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

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

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

.dropdown {
  list-style: none;
  position: absolute;
  z-index: 10;
  top: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dropdown li {
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.dropdown li:hover {
  background: var(--bg);
}

.error {
  color: #b00020;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Route Card */
.route-card {
  background: var(--card-bg);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.route-header {
  margin-bottom: 12px;
}

.route-header h2 {
  font-size: 1.1rem;
}

.route-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.map-preview {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.map-preview img {
  width: 100%;
  height: auto;
  display: block;
}

/* Timeline Legs */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

.timeline-step .map-preview {
  margin-bottom: 0;
}

.step-desc {
  font-size: 0.88rem;
  line-height: 1.4;
}

/* Footer */
footer {
  margin-top: 8px;
  padding: 4px 0 12px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer-brand {
  margin-bottom: 8px;
}