:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101418;
  color: #f6f0e8;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(16, 20, 24, 0.72), #101418 36rem),
    url("https://images.unsplash.com/photo-1514933651103-005eec06c04b?auto=format&fit=crop&w=1800&q=82") center top / cover fixed;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar,
.status-band,
.action-panel,
.settings-strip {
  background: rgba(16, 20, 24, 0.84);
  border: 1px solid rgba(246, 240, 232, 0.16);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-radius: 8px 8px 0 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: #c7f0c2;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-button,
.stop-check {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid rgba(246, 240, 232, 0.24);
  border-radius: 8px;
  background: #263039;
  color: #f6f0e8;
  cursor: pointer;
}

.icon-button:disabled,
.stop-check:disabled,
.primary-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-button.danger {
  background: #43252b;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.status-band > div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.label,
dt {
  display: block;
  margin-bottom: 6px;
  color: #aeb7bd;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.status-band strong {
  display: block;
  font-size: 1.08rem;
}

.status-link {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid rgba(246, 240, 232, 0.2);
  border-radius: 8px;
  background: #22313a;
  color: #f6f0e8;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.status-link:focus-visible,
.status-link:hover {
  border-color: rgba(255, 224, 100, 0.7);
  outline: 0;
}

.action-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
}

.primary-action {
  min-height: 64px;
  border: 0;
  border-radius: 8px;
  background: #ffe064;
  color: #17140b;
  font-weight: 900;
  cursor: pointer;
}

.manual-mark,
.settings-strip label,
.edit-row label {
  display: grid;
  gap: 8px;
  color: #aeb7bd;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

input {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(246, 240, 232, 0.18);
  border-radius: 8px;
  background: #171e24;
  color: #f6f0e8;
  padding: 0 12px;
}

.settings-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stop-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  min-width: 0;
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-left: 5px solid #8ab4f8;
  border-radius: 8px;
  background: rgba(16, 20, 24, 0.9);
}

.stop-card.is-next {
  border-left-color: #ffe064;
  box-shadow: 0 0 0 1px rgba(255, 224, 100, 0.28);
}

.stop-card.is-reached {
  border-left-color: #74d99f;
  opacity: 0.72;
}

.stop-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.stop-main h2 {
  font-size: 1.1rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.stop-main p,
.travel-note {
  color: #aeb7bd;
}

.app-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-links a {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(246, 240, 232, 0.2);
  border-radius: 8px;
  background: #22313a;
  color: #f6f0e8;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.app-links a:focus-visible,
.app-links a:hover {
  border-color: rgba(255, 224, 100, 0.7);
  outline: 0;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0;
}

.time-grid div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 850;
}

.edit-row {
  display: grid;
  grid-template-columns: minmax(160px, 240px);
  gap: 10px;
}

.travel-note {
  font-size: 0.92rem;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 10px;
  }

  .topbar,
  .action-panel,
  .status-band,
  .settings-strip,
  .timeline {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: start;
  }

  .status-band {
    display: grid;
  }

  .timeline {
    gap: 10px;
  }

  .time-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
