:root {
  --night: #071411;
  --night-2: #0b1c17;
  --surface: #10251f;
  --surface-2: #173129;
  --glass: rgba(255, 255, 255, 0.055);
  --paper: #f3f0e7;
  --white: #fbfff9;
  --ink: #12201b;
  --muted: #90a39b;
  --lime: #d9ff5a;
  --mint: #91f0c2;
  --coral: #ff6846;
  --sky: #8ed8ff;
  --line: rgba(255, 255, 255, 0.1);
  --dark-line: rgba(18, 32, 27, 0.14);
}

[hidden] { display: none !important; }

.noscript-note {
  margin: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 104, 70, 0.45);
  border-radius: 14px;
  background: rgba(255, 104, 70, 0.12);
  color: #ffd8cf;
}

.editor-invalid {
  width: min(620px, calc(100% - 24px));
  margin: 15vh auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
}

.editor-invalid a { color: var(--lime); }

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
.photo-picker:focus-within {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.app-background {
  min-height: 100svh;
  padding: clamp(12px, 3vw, 36px);
  background:
    radial-gradient(circle at 8% 3%, rgba(217, 255, 90, 0.18), transparent 22rem),
    radial-gradient(circle at 94% 24%, rgba(255, 104, 70, 0.14), transparent 28rem),
    linear-gradient(145deg, #06110e, #0a211a 55%, #06130f);
}

.app-shell {
  position: relative;
  width: min(1080px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--night-2);
  background-size: 24px 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
}

.app-header {
  min-height: 88px;
  padding: 16px clamp(18px, 4vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 20, 17, 0.7);
  backdrop-filter: blur(18px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--white);
  text-decoration: none;
}

.app-brand__mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 255, 90, 0.72);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(217, 255, 90, 0.18), rgba(145, 240, 194, 0.04));
  box-shadow: inset 0 0 18px rgba(217, 255, 90, 0.08);
  transform: rotate(-4deg);
}

.app-brand__mark::before,
.app-brand__mark::after,
.app-brand__mark i {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.app-brand__mark::before {
  width: 17px;
  height: 17px;
  border: 1px solid var(--lime);
}

.app-brand__mark::after {
  width: 5px;
  height: 5px;
  background: var(--lime);
  box-shadow: 0 0 16px var(--lime);
}

.app-brand__mark i {
  inset: 6px;
  border: 1px dashed rgba(217, 255, 90, 0.28);
  animation: orbit 10s linear infinite;
}

.app-brand strong,
.app-brand small { display: block; }

.app-brand strong {
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 900;
}

.app-brand small {
  margin-top: 3px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.63rem;
  font-weight: 800;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trip-chip,
.live-state {
  min-height: 34px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: rgba(251, 255, 249, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.61rem;
  font-weight: 850;
}

.trip-chip i,
.live-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(145, 240, 194, 0.8);
}

.refresh-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  color: var(--white);
  cursor: pointer;
  font-size: 1.15rem;
}

.refresh-button:disabled { opacity: 0.6; }

.spin {
  display: inline-block;
  animation: spin 0.75s linear infinite;
}

.status-card {
  position: relative;
  min-height: 225px;
  margin: clamp(14px, 2.5vw, 24px);
  padding: clamp(28px, 6vw, 58px);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.48), transparent 13rem),
    linear-gradient(120deg, var(--lime), #bdf678 46%, #ffd06d 100%);
  color: var(--ink);
  isolation: isolate;
}

.status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  background-image: radial-gradient(circle, var(--ink) 1px, transparent 1.2px);
  background-size: 17px 17px;
  mask-image: linear-gradient(90deg, transparent, #000 55%);
}

.status-card__glow {
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(18, 32, 27, 0.17);
  border-radius: 50%;
}

.status-card__glow::before,
.status-card__glow::after {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid rgba(18, 32, 27, 0.14);
  border-radius: 50%;
}

.status-card__glow::after { inset: 92px; }

.status-card__copy { position: relative; z-index: 1; }

.status-label {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(18, 32, 27, 0.64);
  text-transform: uppercase;
  letter-spacing: 0.105em;
  font-size: 0.65rem;
  font-weight: 900;
}

.status-label__pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255, 104, 70, 0.65);
  animation: signal 2s ease-out infinite;
}

.status-card h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 5.6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 790;
  text-wrap: balance;
}

.route-emblem {
  position: relative;
  z-index: 1;
  min-width: 118px;
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(18, 32, 27, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  font-size: 0.68rem;
  font-weight: 950;
}

.route-emblem i { color: var(--coral); font-style: normal; }

.metric-grid {
  margin: 0 clamp(14px, 2.5vw, 24px) clamp(22px, 4vw, 36px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.6vw, 14px);
}

.metric {
  min-height: 156px;
  padding: clamp(17px, 3vw, 27px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.metric__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.61rem;
  font-weight: 850;
}

.metric__top i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--mint);
  font-style: normal;
}

.metric__value {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.metric__value strong {
  font-size: clamp(2.7rem, 7vw, 5.1rem);
  line-height: 0.85;
  letter-spacing: -0.075em;
  font-weight: 780;
}

.metric__value span {
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.69rem;
  font-weight: 900;
}

.live-hub,
.photo-gallery {
  margin: 0 clamp(14px, 2.5vw, 24px) clamp(22px, 4vw, 36px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(10, 28, 23, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  scroll-margin-top: 14px;
}

.section-heading,
.photo-gallery__header {
  min-height: 96px;
  padding: 20px clamp(18px, 4vw, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-kicker,
.photo-gallery__header > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6rem;
  font-weight: 900;
}

.section-heading h2,
.photo-gallery__header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.live-state--active {
  border-color: rgba(217, 255, 90, 0.28);
  color: var(--lime);
}

.live-state--active i {
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(217, 255, 90, 0.5);
  animation: signal 1.8s ease-out infinite;
}

.live-state--checking i { animation: blink 1s ease-in-out infinite; }

.live-state--inactive i,
.live-state--missing i,
.live-state--unknown i {
  background: var(--coral);
  box-shadow: none;
}

.tracker-tabs {
  margin: 0 clamp(14px, 3vw, 24px);
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.tracker-tabs button {
  min-height: 72px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(251, 255, 249, 0.48);
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.tracker-tabs button:hover { color: var(--white); }

.tracker-tabs button.is-selected {
  background: var(--surface-2);
  color: var(--white);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.tracker-tabs button:active { transform: scale(0.985); }

.tracker-tabs strong,
.tracker-tabs small { display: block; }

.tracker-tabs strong { margin-bottom: 2px; font-size: 0.86rem; }
.tracker-tabs small { color: var(--muted); font-size: 0.65rem; }

.provider-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.provider-dot--active,
.provider-dot--ready {
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 0 15px rgba(217, 255, 90, 0.72);
}

.provider-dot--inactive,
.provider-dot--missing,
.provider-dot--unknown { border-color: var(--coral); }
.provider-dot--checking { animation: blink 1s ease-in-out infinite; }

.tracker-context {
  padding: 18px clamp(18px, 4vw, 30px);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
}

.tracker-context span {
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.59rem;
  font-weight: 900;
}

.tracker-context p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: right;
}

.tracker-stage {
  position: relative;
  height: clamp(430px, 62vw, 650px);
  margin: 0 clamp(14px, 3vw, 24px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(145, 240, 194, 0.08), transparent 15rem),
    #06120f;
}

.tracker-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: radial-gradient(circle, var(--mint) 1px, transparent 1px);
  background-size: 20px 20px;
}

.tracker-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--paper);
}

.tracker-frame--life360 {
  left: 50%;
  width: 94.34%;
  height: 94.34%;
  transform: translateX(-50%) scale(1.06);
  transform-origin: top center;
}

.tracker-empty {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

.tracker-empty__orbit {
  position: relative;
  width: 98px;
  height: 98px;
  margin-bottom: 25px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(145, 240, 194, 0.35);
  border-radius: 50%;
  animation: orbit 14s linear infinite;
}

.tracker-empty__orbit::before,
.tracker-empty__orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.tracker-empty__orbit::before {
  inset: 18px;
  border: 1px solid rgba(145, 240, 194, 0.3);
}

.tracker-empty__orbit::after {
  width: 11px;
  height: 11px;
  top: -5px;
  background: var(--coral);
  box-shadow: 0 0 18px rgba(255, 104, 70, 0.72);
}

.tracker-empty__orbit i {
  width: 19px;
  height: 19px;
  border: 2px solid var(--lime);
  border-radius: 6px 50% 50%;
  transform: rotate(45deg);
}

.tracker-empty strong {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: -0.04em;
}

.tracker-empty p {
  max-width: 420px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.tracker-empty small {
  margin-top: 14px;
  color: rgba(251, 255, 249, 0.45);
  font-size: 0.66rem;
}

.tracker-empty__link {
  margin-top: 22px;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--lime);
  box-shadow: 0 12px 28px rgba(217, 255, 90, 0.12);
  color: #06120f;
  font-size: 0.75rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tracker-empty__link:hover {
  box-shadow: 0 15px 34px rgba(217, 255, 90, 0.2);
  transform: translateY(-2px);
}

.tracker-empty__link:focus-visible {
  outline: 3px solid rgba(251, 255, 249, 0.9);
  outline-offset: 3px;
}

.tracking-gate {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100% - 34px));
  max-height: calc(100% - 28px);
  margin: 0;
  padding: clamp(26px, 5vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(217, 255, 90, 0.16);
  border-radius: 24px;
  background: rgba(16, 37, 31, 0.88);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  color: var(--white);
  text-align: center;
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%);
  overflow-y: auto;
}

.tracking-gate__lock {
  position: relative;
  width: 74px;
  height: 74px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--lime);
  border-radius: 25px 22px 27px 21px;
  background: rgba(217, 255, 90, 0.06);
  transform: rotate(-3deg);
}

.tracking-gate__lock::before {
  content: "";
  position: absolute;
  width: 39px;
  height: 39px;
  border: 1px dashed rgba(217, 255, 90, 0.42);
  border-radius: 50%;
  animation: orbit 12s linear infinite;
}

.tracking-gate__lock i {
  width: 19px;
  height: 19px;
  border: 2px solid var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(217, 255, 90, 0.2);
}

.tracking-gate__lock i::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  background: var(--lime);
  transform: translate(-50%, -50%);
}

.tracking-gate__eyebrow {
  margin-bottom: 7px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.58rem;
  font-weight: 900;
}

.tracking-gate > strong {
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  letter-spacing: -0.045em;
}

.tracking-gate > p {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.8rem;
}

.tracking-gate__form {
  width: 100%;
  padding: 5px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.22);
}

.tracking-gate__form input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--white);
  outline: none;
}

.tracking-gate__form input::placeholder { color: rgba(251, 255, 249, 0.35); }

.tracking-gate__form button {
  min-height: 48px;
  padding: 11px 17px;
  border: 0;
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}

.tracking-gate__form button:disabled,
.tracking-gate__form input:disabled { opacity: 0.48; }

.tracking-gate > small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.65rem;
}

.tracking-gate .tracking-gate__error { color: #ffab96; }

.tracker-footer {
  min-height: 68px;
  padding: 13px clamp(18px, 4vw, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.68rem;
}

.tracker-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delay-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.tracker-footer a {
  min-height: 36px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

/* Photo stories */
.photo-gallery__counter {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(251, 255, 249, 0.66);
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

.photo-gallery__scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.photo-gallery__scroller::-webkit-scrollbar { display: none; }

.photo-slide {
  position: relative;
  min-width: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #06120f;
}

.photo-slide__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.photo-slide__image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.52));
  pointer-events: none;
}

.photo-slide__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-slide figcaption {
  min-height: 76px;
  padding: 15px clamp(18px, 4vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-top: 1px solid var(--line);
}

.photo-slide figcaption span {
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.6rem;
  font-weight: 900;
}

.photo-slide figcaption strong {
  font-size: 1rem;
  font-weight: 650;
}

.photo-gallery__controls {
  min-height: 54px;
  padding: 7px 12px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.photo-gallery__controls button {
  width: 44px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--glass);
  color: var(--white);
  cursor: pointer;
}

.photo-gallery__controls button:disabled { cursor: default; opacity: 0.25; }

.photo-gallery__controls > span {
  color: rgba(251, 255, 249, 0.4);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.57rem;
  font-weight: 850;
}

.load-error {
  width: calc(100% - 48px);
  margin: 0 24px 24px;
  padding: 13px;
  border: 1px solid rgba(255, 104, 70, 0.38);
  border-radius: 13px;
  background: rgba(255, 104, 70, 0.12);
  color: #ffc0af;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.app-footer {
  min-height: 90px;
  padding: 20px clamp(20px, 4vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: rgba(251, 255, 249, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.57rem;
  font-weight: 800;
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legal-links a {
  color: rgba(251, 255, 249, 0.58);
  text-decoration: none;
}

.legal-links a:hover { color: var(--lime); }

.legal-page {
  min-height: 100svh;
  padding: clamp(18px, 5vw, 58px);
  background:
    radial-gradient(circle at 8% 3%, rgba(217, 255, 90, 0.16), transparent 22rem),
    linear-gradient(145deg, #06110e, #0a211a 55%, #06130f);
}

.legal-card {
  width: min(820px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.38);
}

.legal-card__top {
  padding: clamp(22px, 5vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  color: var(--white);
}

.legal-card__top span {
  display: block;
  margin-bottom: 5px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6rem;
  font-weight: 900;
}

.legal-card__top h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.legal-card__top a {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.72rem;
  white-space: nowrap;
}

.legal-card__content {
  padding: clamp(24px, 6vw, 48px);
  font-size: 0.92rem;
  line-height: 1.68;
}

.legal-card__content section + section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--dark-line);
}

.legal-card__content h2 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  letter-spacing: -0.025em;
}

.legal-card__content p { margin: 0 0 12px; }
.legal-card__content p:last-child { margin-bottom: 0; }
.legal-card__content address { font-style: normal; }
.legal-card__content a { color: #174f3c; font-weight: 750; }
.legal-card__content ul { margin: 10px 0 0; padding-left: 20px; }
.legal-card__content li + li { margin-top: 5px; }
.legal-note { color: #586a63; font-size: 0.78rem; }

.app-nav { display: none; }

/* Secret editor */
.editor-shell {
  min-height: 100svh;
  padding: clamp(16px, 4vw, 42px);
  background:
    radial-gradient(circle at 10% 4%, rgba(217, 255, 90, 0.14), transparent 24rem),
    var(--night);
  color: var(--ink);
}

.editor {
  width: min(780px, 100%);
  margin: 0 auto;
}

.editor__topbar {
  padding: 16px 0 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  color: var(--white);
}

.editor__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.64rem;
  font-weight: 900;
}

.editor__topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.editor__back {
  min-height: 40px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass);
  color: rgba(251, 255, 249, 0.75);
  text-decoration: none;
  font-size: 0.72rem;
  white-space: nowrap;
}

.editor-form {
  overflow: hidden;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.quick-field {
  padding: clamp(24px, 5vw, 38px);
  background: linear-gradient(125deg, var(--lime), #f3cf66);
}

.quick-field__label-row {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quick-field__label-row label { margin: 0; }

.quick-field__label-row span {
  padding: 6px 8px;
  border: 1px solid rgba(18, 32, 27, 0.2);
  border-radius: 999px;
  color: rgba(18, 32, 27, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.55rem;
  font-weight: 900;
  white-space: nowrap;
}

.quick-field label,
.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.64rem;
  font-weight: 900;
}

.quick-field input,
.field input {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(18, 32, 27, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  outline: none;
}

.quick-field input:focus,
.field input:focus {
  border-color: var(--surface);
  box-shadow: 0 0 0 3px rgba(16, 37, 31, 0.12);
}

.quick-password {
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid rgba(18, 32, 27, 0.16);
}

.quick-password small {
  display: block;
  margin-top: 8px;
  color: rgba(18, 32, 27, 0.58);
  font-size: 0.65rem;
  line-height: 1.4;
}

.photo-upload {
  padding: clamp(24px, 5vw, 38px);
  border-top: 1px solid var(--dark-line);
  background: #faf7ee;
}

.photo-upload__heading {
  margin-bottom: 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.photo-upload__heading h2,
.editor-section h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  letter-spacing: -0.04em;
}

.photo-upload__heading span {
  color: #c84d30;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.6rem;
  font-weight: 900;
}

.photo-picker {
  min-height: 118px;
  margin-bottom: 16px;
  padding: 19px;
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  border: 1.5px dashed rgba(16, 37, 31, 0.38);
  border-radius: 17px;
  background: rgba(16, 37, 31, 0.045);
  color: var(--surface);
  cursor: pointer;
}

.photo-picker > span {
  width: 46px;
  height: 46px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--surface);
  color: var(--lime);
  font-size: 1.35rem;
}

.photo-picker strong { align-self: end; }
.photo-picker small { align-self: start; color: rgba(18, 32, 27, 0.55); }

.photo-meta-grid {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 13px;
}

.photo-upload__button,
.save-button {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--white);
  cursor: pointer;
  font-weight: 900;
}

.photo-upload__button {
  width: 100%;
  margin-top: 16px;
  background: var(--coral);
  color: var(--ink);
}

.photo-upload__button:disabled,
.save-button:disabled { cursor: default; opacity: 0.46; }

.photo-manager {
  margin-top: 19px;
  border-top: 1px solid var(--dark-line);
}

.photo-manager summary {
  padding: 17px 0 5px;
  color: var(--surface);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 850;
}

.photo-manager__grid {
  padding-top: 13px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.photo-manager figure {
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dark-line);
  border-radius: 13px;
  background: var(--white);
}

.photo-manager__image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(18, 32, 27, 0.06);
}

.photo-manager img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-manager figcaption {
  padding: 9px;
  display: grid;
  gap: 7px;
  color: var(--surface);
}

.photo-manager figcaption > strong {
  font-size: 0.67rem;
  font-weight: 900;
}

.photo-manager figcaption input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid rgba(18, 32, 27, 0.18);
  border-radius: 9px;
  background: #faf7ee;
  color: var(--ink);
  font-size: 0.68rem;
  outline: none;
}

.photo-manager figcaption input:focus {
  border-color: var(--surface);
  box-shadow: 0 0 0 2px rgba(16, 37, 31, 0.1);
}

.photo-manager__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
}

.photo-manager button {
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 850;
}

.photo-manager__save { background: var(--surface); color: var(--white); }
.photo-manager__delete { background: transparent; color: #a63d25; }
.photo-manager button:disabled { cursor: default; opacity: 0.5; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.editor-section {
  padding: clamp(22px, 5vw, 36px);
  border-top: 1px solid var(--dark-line);
}

.editor-section h2 { margin-bottom: 18px; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.editor-section--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { min-width: 0; }

.editor-actions {
  position: sticky;
  bottom: 10px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--dark-line);
  background: rgba(243, 240, 231, 0.92);
  backdrop-filter: blur(12px);
}

.save-button { flex: 1; }
.save-status { color: var(--surface); font-size: 0.77rem; font-weight: 850; }

.editor-alert {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.editor-alert--error { background: #ffd1c5; color: #681f0b; }
.editor-footnote { margin: 18px 0 0; color: rgba(251, 255, 249, 0.45); font-size: 0.67rem; text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes signal {
  0% { box-shadow: 0 0 0 0 currentColor; }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (max-width: 760px) {
  .app-background { padding: 0; }
  .app-shell { min-height: 100svh; border: 0; border-radius: 0; }
  .app-header { min-height: 76px; padding: 13px 16px; }
  .app-brand__mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px; }
  .app-brand strong { font-size: 0.69rem; }
  .app-brand small { font-size: 0.57rem; }
  .trip-chip { display: none; }
  .status-card { min-height: 210px; margin: 12px; padding: 27px 23px; grid-template-columns: 1fr; }
  .status-card h1 { font-size: clamp(2.2rem, 11vw, 3.5rem); }
  .route-emblem { display: none; }
  .metric-grid { margin: 0 12px 22px; gap: 7px; }
  .metric { min-height: 128px; padding: 14px 12px; border-radius: 17px; }
  .metric__top { letter-spacing: 0.055em; font-size: 0.52rem; }
  .metric__top i { width: 24px; height: 24px; border-radius: 8px; }
  .metric__value { display: block; }
  .metric__value strong { display: block; font-size: clamp(2.35rem, 12vw, 3.7rem); }
  .metric__value span { display: block; margin-top: 7px; font-size: 0.58rem; }
  .live-hub,
  .photo-gallery { margin: 0 12px 22px; border-radius: 22px; }
  .section-heading,
  .photo-gallery__header { min-height: 86px; padding: 17px; }
  .live-state { padding-inline: 10px; }
  .tracker-tabs { margin-inline: 10px; }
  .tracker-tabs button { min-height: 68px; padding: 10px; }
  .tracker-context { padding: 16px; display: block; }
  .tracker-context p { margin-top: 5px; text-align: left; line-height: 1.45; }
  .tracker-stage { height: min(62svh, 590px); min-height: 430px; margin-inline: 10px; border-radius: 16px; }
  .tracker-stage--life360 { height: min(72svh, 680px); }
  .tracker-frame--life360 {
    width: 89.29%;
    height: 89.29%;
    transform: translateX(-50%) scale(1.12);
  }
  .tracker-footer { padding-inline: 16px; }
  .photo-slide__image { aspect-ratio: 4 / 5; }
  .app-footer { padding-bottom: 102px; display: grid; gap: 7px; }
  .legal-links { flex-wrap: wrap; }
  .legal-card__top { align-items: flex-start; flex-direction: column; }
  .app-nav {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(330px, calc(100% - 28px));
    min-height: 67px;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(11, 28, 23, 0.9);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
  }
  .app-nav a {
    min-height: 51px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 16px;
    color: var(--muted);
    text-decoration: none;
  }
  .app-nav a:nth-child(2) { background: var(--lime); color: var(--ink); }
  .app-nav span { font-size: 1.05rem; }
  .app-nav small { font-size: 0.57rem; font-weight: 850; }
  .field-grid,
  .editor-section--split { grid-template-columns: 1fr; }
  .editor-section--split { gap: 20px; }
}

@media (max-width: 430px) {
  .status-card h1 { font-size: 2.35rem; }
  .metric__top i { display: none; }
  .metric__value strong { font-size: 2.45rem; }
  .tracker-tabs small { display: none; }
  .tracker-tabs button { min-height: 58px; }
  .tracker-footer { align-items: flex-start; flex-direction: column; }
  .tracker-footer a { align-self: stretch; justify-content: center; }
  .tracking-gate { width: calc(100% - 20px); padding: 25px 16px; }
  .tracking-gate__form { grid-template-columns: 1fr; }
  .tracking-gate__form button { width: 100%; }
  .photo-manager__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
