:root {
  /* Core Plum & Lilac Palette */
  --ink: #260e23;
  --plum: #2e102b;
  --plum-hover: #481a43;
  --plum-light: #5e2857;
  --muted: #6e566b;
  --muted-light: #8e778b;
  
  /* Tinted Backgrounds (No harsh white) */
  --canvas: #f6edf5;
  --canvas-warm: #fcf4f8;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --surface-alt: #f1e4f0;
  --line: #dfcadd;
  --line-focus: #9e6496;
  
  /* Warm Accents */
  --amber: #d96f3b;
  --amber-soft: #fff3ec;
  --amber-border: #f5d4c2;
  --success: #1f7a4e;
  --success-bg: #eaf8f0;

  /* Typography */
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadow Elevation */
  --shadow-sm: 0 2px 8px rgba(46, 16, 43, 0.05);
  --shadow-md: 0 8px 24px -4px rgba(46, 16, 43, 0.08), 0 2px 6px rgba(46, 16, 43, 0.04);
  --shadow-lg: 0 16px 40px -8px rgba(46, 16, 43, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--canvas);
  /* Creative dot-matrix grid pattern overlay */
  background-image: 
    radial-gradient(rgba(46, 16, 43, 0.08) 1.2px, transparent 1.2px),
    radial-gradient(rgba(46, 16, 43, 0.04) 1.2px, transparent 1.2px);
  background-size: 24px 24px, 12px 12px;
  background-position: 0 0, 12px 12px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Ambient Glow Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.glow-1 {
  width: 380px;
  height: 380px;
  background: #ecd3eb;
  top: -80px;
  left: -80px;
}

.glow-2 {
  width: 320px;
  height: 320px;
  background: #fae0d4;
  bottom: 5%;
  right: -60px;
}

.glow-3 {
  width: 250px;
  height: 250px;
  background: #e2cce4;
  top: 40%;
  left: 60%;
}

main {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--canvas-warm);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

/* Header & Branding */
header {
  padding: 28px 24px 22px;
  background: linear-gradient(180deg, rgba(246, 237, 245, 0.95) 0%, rgba(252, 244, 248, 0.8) 100%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-top {
  margin-bottom: 14px;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--plum);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--plum);
  color: white;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(46, 16, 43, 0.2);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--plum);
  line-height: 1.15;
}

.brand p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}

/* Notice Banner */
.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 24px;
  background: var(--amber-soft);
  color: #72341b;
  font-size: 12.5px;
  line-height: 1.45;
  border-bottom: 1px solid var(--amber-border);
}

.notice-icon {
  font-size: 16px;
}

/* Screens */
.screen {
  padding: 28px 24px 44px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-header {
  margin-bottom: 22px;
}

.step-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 4px;
}

h2 {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--plum);
}

/* Form Elements */
.input-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.8;
}

input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

input:focus {
  outline: none;
  border-color: var(--plum);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(46, 16, 43, 0.08);
}

/* Location Share Button */
.location {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  margin: 18px 0 24px;
  background: var(--surface);
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.location:hover {
  background: var(--surface-hover);
  border-color: var(--line-focus);
  transform: translateY(-1px);
}

.loc-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--plum);
}

.loc-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  background: var(--surface-alt);
  color: var(--muted);
  border-radius: 6px;
  font-weight: 600;
}

/* Primary Action Buttons */
button {
  font-family: var(--font-sans);
  cursor: pointer;
}

.primary {
  width: 100%;
  min-height: 52px;
  background: var(--plum);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(46, 16, 43, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary .arrow {
  font-family: var(--font-mono);
  transition: transform 0.2s ease;
}

.primary:hover {
  background: var(--plum-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 16, 43, 0.35);
}

.primary:hover .arrow {
  transform: translateX(4px);
}

.primary:active {
  transform: translateY(0);
}

.primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Navigation Back Button */
.back {
  background: none;
  border: none;
  color: var(--plum-light);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.back:hover {
  color: var(--plum);
  transform: translateX(-3px);
}

.muted {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: -12px;
  margin-bottom: 22px;
}

/* Route Result Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--line-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.service {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--plum);
  background: var(--surface-alt);
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.fare {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--plum);
}

.times {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 10px 0 6px;
  letter-spacing: -0.02em;
}

.times small {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}

.route {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

.board {
  background: var(--surface-alt);
  border-left: 4px solid var(--plum);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin: 14px 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.details {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--plum);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s ease;
}

.details:hover {
  background: var(--surface-alt);
  border-color: var(--plum-light);
}

.directions {
  margin: 10px 0;
  padding: 12px 14px;
  background: var(--surface-alt);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
  border: 1px solid var(--line);
}

.select {
  width: 100%;
  background: var(--plum);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 700;
  margin-top: 10px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.select:hover {
  background: var(--plum-hover);
  transform: translateY(-1px);
}

/* Journey Stepper Timeline */
.journey {
  position: relative;
  margin: 20px 0 28px;
  padding-left: 32px;
}

.journey::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--plum) 0%, var(--line-focus) 100%);
}

.step {
  position: relative;
  padding-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}

.step::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--plum);
  left: -28px;
  top: 3px;
  box-shadow: 0 0 0 3px rgba(46, 16, 43, 0.1);
}

.step:last-child {
  padding-bottom: 0;
}

.step strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.empty {
  padding: 32px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 14.5px;
}

.hidden {
  display: none !important;
}

/* Desktop Polish */
@media (min-width: 661px) {
  body {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  
  main {
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
  }
}
