/* Appily Thirtyfour — Serpentine Route track & support (unique winding path layout) */

.page-route-map {
  --route-cream: #FEF7ED;
  --route-warm: #FFF9F3;
  --route-ink: #2C2416;
  --route-muted: #6B5E52;
  --route-line: #E8DFD4;
  --route-terra: #C84B31;
  --route-olive: #5A7247;
  --route-sage: #52796F;
  --route-gold: #D4A017;
  background: var(--route-warm);
}

.a34-route {
  padding: 0 0 3.5rem;
}

/* ── Hero ── */
.a34-route-hero {
  position: relative;
  padding: 2.25rem 0 2rem;
  overflow: hidden;
}

.a34-route-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(200, 75, 49, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(90, 114, 71, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, var(--route-cream) 0%, var(--route-warm) 100%);
  pointer-events: none;
}

.a34-route-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.a34-route-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--route-olive);
}

.a34-route-hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--route-ink);
}

.a34-route-hero h1 em {
  font-style: italic;
  color: var(--route-terra);
}

.a34-route-lede {
  margin: 0;
  max-width: 50ch;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--route-muted);
}

.a34-route-badge {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--route-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  box-shadow: 0 12px 32px rgba(44, 36, 22, 0.08);
  transition: border-color 0.3s;
}

.a34-route-badge-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed var(--route-line);
  animation: a34-route-spin 24s linear infinite;
}

@keyframes a34-route-spin {
  to { transform: rotate(360deg); }
}

.a34-route-badge strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--route-ink);
  line-height: 1;
}

.a34-route-badge span:last-child {
  margin-top: 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--route-muted);
  max-width: 8ch;
  line-height: 1.25;
}

.a34-route-badge.is-found {
  border-color: var(--route-olive);
}

.a34-route-badge.is-found strong {
  color: var(--route-olive);
}

.a34-route-badge.is-miss {
  border-color: #c44540;
}

.a34-route-badge.is-miss strong {
  color: #c44540;
  font-size: 1.1rem;
}

/* ── Shell layout ── */
.a34-route-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 0.5rem;
}

/* Lookup ticket */
.a34-route-ticket {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--route-line);
  box-shadow: 0 16px 40px rgba(44, 36, 22, 0.08);
  overflow: hidden;
}

.a34-route-ticket-notch {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--route-terra) 0,
    var(--route-terra) 14px,
    var(--route-olive) 14px,
    var(--route-olive) 28px
  );
}

.a34-route-ticket-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1.35rem 1.35rem 0;
}

.a34-route-ticket-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.a34-route-ticket-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--route-ink);
}

.a34-route-ticket-head p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--route-muted);
  line-height: 1.45;
}

.a34-route-form {
  padding: 1.15rem 1.35rem 1rem;
}

.a34-route-field {
  display: block;
  margin-bottom: 0.85rem;
}

.a34-route-field span {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--route-muted);
}

.a34-route-field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--route-line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--route-ink);
  background: var(--route-warm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.a34-route-field input:focus {
  outline: none;
  border-color: var(--route-olive);
  box-shadow: 0 0 0 3px rgba(90, 114, 71, 0.15);
}

.a34-route-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.a34-route-form-actions .btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.a34-route-ticket-foot {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1.35rem;
  background: var(--route-cream);
  border-top: 1px dashed var(--route-line);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--route-muted);
}

/* ── Serpentine map ── */
.a34-route-map {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--route-line);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 12px 36px rgba(44, 36, 22, 0.06);
  min-height: 480px;
}

.a34-route-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--route-line);
}

.a34-route-map-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--route-ink);
}

.a34-route-map-state {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--route-cream);
  color: var(--route-muted);
}

.a34-route-map-state.is-found {
  background: rgba(90, 114, 71, 0.12);
  color: var(--route-olive);
}

.a34-route-map-state.is-miss {
  background: rgba(196, 69, 64, 0.1);
  color: #c44540;
}

/* Serpentine path */
.a34-route-serpentine {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1.5rem;
  position: relative;
  --a34-progress: 0;
}

.a34-route-serpentine::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 28px;
  bottom: 28px;
  width: 4px;
  transform: translateX(-50%);
  background: var(--route-line);
  border-radius: 999px;
  z-index: 0;
}

.a34-route-serpentine.is-found::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 28px;
  width: 4px;
  height: calc(var(--a34-progress) * 25%);
  max-height: calc(100% - 56px);
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--route-olive), var(--route-sage));
  border-radius: 999px;
  z-index: 1;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.a34-route-node {
  position: relative;
  z-index: 2;
  display: flex;
  margin-bottom: 1.75rem;
}

.a34-route-node:last-child {
  margin-bottom: 0;
}

.a34-route-node.side-left {
  justify-content: flex-start;
  padding-right: 52%;
}

.a34-route-node.side-right {
  justify-content: flex-end;
  padding-left: 52%;
}

.a34-route-node-card {
  position: relative;
  max-width: 240px;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: var(--route-warm);
  border: 2px solid var(--route-line);
  border-radius: 14px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.a34-route-node.side-right .a34-route-node-card {
  padding: 0.85rem 2.75rem 0.85rem 1rem;
  text-align: right;
}

.a34-route-node-glyph {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--route-line);
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--route-muted);
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.a34-route-node.side-right .a34-route-node-glyph {
  left: auto;
  right: -18px;
}

.a34-route-node.is-done .a34-route-node-glyph {
  background: var(--route-olive);
  border-color: var(--route-olive);
  color: #fff;
}

.a34-route-node.is-current .a34-route-node-glyph {
  background: var(--route-terra);
  border-color: var(--route-terra);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(200, 75, 49, 0.2);
  animation: a34-route-pulse 1.8s ease-in-out infinite;
}

.a34-route-node.is-done .a34-route-node-card {
  border-color: rgba(90, 114, 71, 0.35);
  background: rgba(90, 114, 71, 0.06);
}

.a34-route-node.is-current .a34-route-node-card {
  border-color: var(--route-terra);
  box-shadow: 0 8px 24px rgba(200, 75, 49, 0.12);
}

.a34-route-node.is-muted .a34-route-node-glyph {
  opacity: 0.5;
}

.a34-route-node.is-muted .a34-route-node-card {
  opacity: 0.55;
}

@keyframes a34-route-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(200, 75, 49, 0.2); }
  50% { box-shadow: 0 0 0 10px rgba(200, 75, 49, 0.08); }
}

.a34-route-node-card strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--route-ink);
  margin-bottom: 0.15rem;
}

.a34-route-node-card small {
  display: block;
  font-size: 0.72rem;
  color: var(--route-muted);
}

/* Receipt card */
.a34-route-receipt {
  margin-top: 0.5rem;
  padding: 1.25rem;
  background: var(--route-ink);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
}

.a34-route-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.a34-route-receipt-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--route-gold);
}

.a34-route-receipt-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(90, 114, 71, 0.35);
  color: #b8d4a8;
}

.a34-route-receipt-id {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

.a34-route-receipt-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 0 0 1.15rem;
}

.a34-route-receipt-meta div {
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.a34-route-receipt-meta dt {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.15rem;
}

.a34-route-receipt-meta dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.a34-route-receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.a34-route-receipt-actions .btn {
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.a34-route-receipt-actions .btn-soft {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Alerts */
.a34-route-alert {
  margin-top: 0.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  text-align: center;
}

.a34-route-alert strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.a34-route-alert p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
}

.a34-route-alert.is-idle {
  background: var(--route-cream);
  border: 1px dashed var(--route-line);
  color: var(--route-muted);
}

.a34-route-alert.is-idle strong {
  color: var(--route-ink);
}

.a34-route-alert.is-miss {
  background: rgba(196, 69, 64, 0.08);
  border: 1px solid rgba(196, 69, 64, 0.2);
  color: #8b3a36;
}

.a34-route-alert-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--route-terra) !important;
}

/* Quick chips */
.a34-route-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
  justify-content: center;
}

.a34-route-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  background: #fff;
  border: 1px solid var(--route-line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--route-ink) !important;
  text-decoration: none !important;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.a34-route-chip:hover {
  border-color: var(--route-olive);
  box-shadow: 0 4px 16px rgba(44, 36, 22, 0.08);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.a34-route-chip span:first-child {
  font-size: 1rem;
  opacity: 0.7;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .a34-route-hero-inner {
    grid-template-columns: 1fr;
  }

  .a34-route-badge {
    justify-self: start;
  }

  .a34-route-shell {
    grid-template-columns: 1fr;
  }

  .a34-route-ticket {
    position: static;
  }

  .a34-route-node.side-left,
  .a34-route-node.side-right {
    padding-left: 3rem;
    padding-right: 0;
    justify-content: flex-start;
  }

  .a34-route-node.side-right .a34-route-node-card {
    text-align: left;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
  }

  .a34-route-node.side-right .a34-route-node-glyph {
    right: auto;
    left: -18px;
  }

  .a34-route-serpentine::before,
  .a34-route-serpentine.is-found::after {
    left: 18px;
    transform: none;
  }

  .a34-route-receipt-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .a34-route-map {
    padding: 1.15rem;
  }

  .a34-route-chips {
    flex-direction: column;
    align-items: stretch;
  }

  .a34-route-chip {
    justify-content: center;
  }
}
