:root {
  --ink: #16324a;
  --muted: #5d7284;
  --line: #e4ebf1;
  --deep: #1f6feb;
  --bright: #4da3ff;
  --sky: #eef6fb;
  --azure: #d7ebf8;
  --cloud: #ffffff;
  --mist: #f6f8fb;
  --shadow: 0 8px 24px rgba(22, 50, 74, 0.08);
  --radius: 14px;
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--ink);
}

:lang(ar) { font-family: Cairo, Outfit, "Segoe UI", sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--ink); background: var(--mist); }
.sky { display: none; }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 0 0 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--deep); }

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #bde7ff 0%, #87ceeb 38%, #f2faff 100%);
}
.sky-clouds { background: linear-gradient(180deg, #d9f3ff 0%, #9fd8f5 46%, #f7fcff 100%); }
.sky-overcast { background: linear-gradient(180deg, #d5e6f0 0%, #b7d3e4 50%, #f4f8fb 100%); }
.sky-rain { background: linear-gradient(180deg, #c5dceb 0%, #8ebbd4 48%, #eef6fb 100%); }
.sky-after { background: linear-gradient(180deg, #e9f8ff 0%, #9ad8ff 36%, #f2faff 100%); }

.cloud {
  position: absolute;
  width: 180px;
  height: 54px;
  background: #fff;
  border-radius: 40px;
  opacity: 0.92;
  animation: drift 70s linear infinite;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud::before { width: 70px; height: 70px; top: -34px; left: 28px; }
.cloud::after { width: 96px; height: 84px; top: -46px; left: 70px; }
.c1 { top: 8%; inset-inline-start: -10%; }
.c2 { top: 18%; inset-inline-start: 30%; transform: scale(1.3); animation-duration: 95s; }
.c3 { top: 6%; inset-inline-start: 62%; transform: scale(0.8); animation-duration: 80s; }
.c4 { top: 28%; inset-inline-start: 78%; animation-duration: 110s; }
.sky-clear .c2, .sky-clear .c4, .sky-after .c3 { opacity: 0.35; }
.sky-overcast .cloud, .sky-rain .cloud { opacity: 0.75; filter: saturate(0.7); }
.sky-rain::after {
  content: "";
  position: absolute;
  inset: -20% 0 0;
  background-image: repeating-linear-gradient(100deg, transparent 0 14px, rgba(36, 121, 181, 0.18) 15px 16px);
  animation: rain 1.1s linear infinite;
}
.afterglow { display: none; }
.sky-after .afterglow {
  display: block;
  position: absolute;
  width: 70vw;
  height: 36vw;
  left: 15vw;
  top: 8vh;
  border-radius: 50%;
  border: 10px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 -8px 0 rgba(189, 231, 255, 0.35);
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(28vw); }
}
@keyframes rain { to { transform: translateY(18px); } }

@media (prefers-reduced-motion: reduce) {
  .cloud, .sky-rain::after { animation: none; }
}

#bar { position: relative; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(242, 250, 255, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 48px; height: 48px; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: 0.01em; }
.brand span { display: block; color: var(--muted); font-size: 0.82rem; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shell { width: min(1180px, calc(100% - 20px)); margin: 0 auto; padding: 12px 0 28px; }

.hero h1 { margin: 4px 0; font-size: 22px; line-height: 1.25; }
.lead { max-width: 40rem; color: var(--muted); font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.card, .listing, .search-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card, .search-card { padding: 12px; }
.card h2, .card h3 { margin: 0 0 8px; }
.muted { color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.stat {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--deep);
  font-weight: 600;
}

.btn, button, .quiet {
  min-height: 34px;
  border-radius: 10px;
  border: 0;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary { background: linear-gradient(180deg, #67c8ff, #2479b5); color: white; font-weight: 650; box-shadow: 0 8px 18px rgba(36, 121, 181, 0.22); }
.secondary { background: white; color: var(--deep); border: 1px solid var(--line); }
.quiet { background: transparent; color: var(--deep); min-height: 40px; }
.lang button, .sky-switch button { min-height: 36px; padding: 6px 10px; background: white; border: 1px solid transparent; border-radius: 999px; }
.lang button[aria-pressed="true"], .sky-switch button[aria-pressed="true"] { border-color: var(--deep); color: var(--deep); font-weight: 700; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #4db8ff;
  outline-offset: 2px;
}

.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field span { font-size: 0.92rem; }
input, select, textarea {
  min-height: 36px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  padding: 10px 12px;
}
textarea { min-height: 90px; resize: vertical; }
.wide { grid-column: 1 / -1; }

.listing { padding: 18px; display: grid; gap: 8px; }
.listing header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.route { font-size: 15px; font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { border-radius: 999px; padding: 4px 10px; background: #e7f4ff; color: var(--deep); font-size: 0.82rem; font-weight: 700; }
.badge.warn { background: #fff6df; color: #8a5a00; }
.badge.ok { background: #e5f7ef; color: #0f7a52; }
.price { font-size: 15px; font-weight: 700; color: var(--deep); }

.map-card svg { width: 100%; height: auto; display: block; background: linear-gradient(#e7f6ff, #f8fcff); border-radius: 18px; }
.map-card { padding: 12px; }

.alert, .oknote {
  padding: 12px 14px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--line);
}
.alert { background: #fff8f2; border-color: #f0d2b0; }
.table { width: 100%; border-collapse: collapse; background: white; border-radius: 18px; overflow: hidden; }
.table th, .table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.steps { display: flex; flex-direction: column; gap: 6px; }
.steps li { list-style: none; padding: 8px 10px; border-radius: 10px; background: #f4fbff; }
.steps li.on { background: #2479b5; color: white; }
.notes {
  position: absolute;
  inset-inline-end: 16px;
  top: 72px;
  width: min(360px, calc(100% - 32px));
  background: white;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 12px;
}
.notes p { margin: 8px 0; }
.footer { margin-top: 28px; color: var(--muted); }
.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.logo-grid img { width: 100%; border-radius: 18px; background: white; }
.choice { display: flex; gap: 8px; }
.choice label { flex: 1; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: white; }
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 18px; }
.activity-card { display: flex; flex-direction: column; gap: 8px; min-height: 220px; padding: 22px; border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(242,250,255,.88)); border: 1px solid rgba(255,255,255,.8); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.activity-card h2 { margin: 0; font-size: 1.7rem; }
.activity-icon { width: 84px; height: 64px; }
.activity-icon svg { width: 100%; height: 100%; }
.meter { height: 14px; background: white; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.live-map { height: 280px; border-radius: 14px; background: #e7f6ff; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 14px; gap: 10px; }
.brand img { width: 36px; height: 36px; }
.brand strong, .brand span { font-size: 13px; }
.icon-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 999px; background: #f3f6f9; color: var(--ink); position: relative; font-size: 16px; }
.icon-btn em { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; border-radius: 999px; background: #e23b3b; color: white; font-style: normal; font-size: 10px; line-height: 16px; }
.drawer { position: fixed; z-index: 20; top: 0; left: 0; bottom: 0; width: min(280px, 86vw); background: white; box-shadow: var(--shadow); padding: 64px 12px 16px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.drawer a, .drawer button { justify-content: flex-start; background: transparent; color: var(--ink); text-decoration: none; border-radius: 8px; }
.drawer a:hover, .drawer button:hover { background: #f3f6f9; }
.backdrop { position: fixed; inset: 0; z-index: 15; background: rgba(16, 32, 48, 0.28); min-height: 100%; border-radius: 0; }
.stage { position: relative; border-radius: 16px; overflow: hidden; height: 280px; background: #d7e6f2; }
.stage > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-copy { position: absolute; left: 16px; top: 16px; display: flex; gap: 8px; align-items: center; color: white; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.stage-copy img { width: 42px; height: 42px; background: white; border-radius: 10px; }
.stage-copy strong, .stage-copy span { display: block; }
.stage-copy strong { font-size: 18px; }
.stage-copy span { font-size: 13px; }
.finder { display: grid; grid-template-columns: 1.1fr 1.1fr 1.4fr auto auto; gap: 8px; align-items: end; margin: -28px 12px 14px; position: relative; background: white; border-radius: 16px; padding: 10px; box-shadow: var(--shadow); }
.finder label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.finder details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.finder summary { cursor: pointer; color: var(--deep); font-size: 13px; }
.photo-btn { min-height: 36px; justify-content: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--ink); cursor: pointer; }
.photo-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chat-photo { display: block; width: min(220px, 100%); margin-top: 8px; border-radius: 8px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { display: flex; flex-direction: column; min-height: 0; border-radius: 14px; overflow: hidden; background: white; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.tile img { width: 100%; height: 84px; object-fit: cover; display: block; }
.tile span { display: flex; flex-direction: column; padding: 8px 10px 10px; }
.tile small { color: var(--muted); font-size: 12px; }
.tile.promo { background: linear-gradient(180deg, #fff, #fff5f5); min-height: 0; justify-content: flex-end; }
.trust { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 12px 0 0; margin: 0; }
.trust li { background: white; border-radius: 999px; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.hint { margin: 8px 12px; color: var(--deep); font-size: 13px; }
.results { margin: 8px 0 14px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #4db8ff, #2479b5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

@media (max-width: 860px) {
  .grid-3, .grid-4, .split, .form-grid, .logo-grid, .activity-grid, .tiles { grid-template-columns: 1fr 1fr; }
  .finder, .finder details { grid-template-columns: 1fr; }
  .stage { height: 200px; }
}

:root { --navy: #0b2c5f; --red: #e10600; }
.topbar { background: white; }
.brand strong { color: var(--navy); }
.word-red { color: var(--red); font-weight: 800; letter-spacing: .04em; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; align-items: center; background: white; border-radius: 16px; padding: 14px; margin: 0 0 10px; }
.hero h1 { color: var(--navy); font-size: 22px; margin: 0 0 4px; }
.hero p { margin: 0; color: var(--muted); font-size: 13px; }
.hero img { width: 100%; height: 112px; object-fit: cover; object-position: center; border-radius: 12px; }
.checks { display: flex; gap: 10px; padding: 0; margin: 8px 0 0; list-style: none; color: #157347; font-size: 13px; }
.checks li::before { content: "✓ "; font-weight: 700; }
.missions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; align-items: stretch; }
.mission { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 84px; min-height: 84px; padding: 8px; border-radius: 12px; border: 2px solid var(--navy); background: var(--navy); color: white; font-weight: 700; font-size: 13px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; position: relative; }
.mission span { display: block; max-width: 100%; }
.mission.on { box-shadow: inset 0 0 0 2px white; outline: 3px solid var(--red); outline-offset: 1px; }
.mission .tick { position: absolute; top: 6px; right: 8px; font-style: normal; }
.places { display: grid; gap: 8px; }
.suggestions { display: grid; gap: 4px; }
.suggestions button, .goods-list button { justify-content: flex-start; background: white; color: var(--navy); border: 1px solid var(--line); text-align: left; }
.goods-list { display: grid; gap: 4px; max-height: 240px; overflow: auto; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.goods-list p { margin: 8px 0 2px; font-weight: 700; color: var(--navy); }
.pick-map, .live-map { height: 180px; border-radius: 12px; overflow: hidden; background: #eef2f6; }
.map-fallback { margin: 0; padding: 16px; color: var(--navy); }
.maplibregl-ctrl-attrib { font-size: 10px; background: rgba(255, 255, 255, .85); }
.maplibregl-ctrl-attrib a { color: #0b2c5f; }
.previews { display: flex; gap: 8px; flex-wrap: wrap; }
.previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.added { list-style: none; padding: 0; display: grid; gap: 6px; }
.added li { display: flex; gap: 8px; align-items: center; background: white; border-radius: 10px; padding: 6px 8px; }
.choice-line { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.gps, .swap { width: 100%; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; }
.glyph { width: 22px; height: 22px; flex: none; }
.trip { display: grid; gap: 8px; background: white; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.place { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.place span { display: flex; align-items: center; gap: 6px; color: var(--navy); font-size: 12px; font-weight: 700; }
.place input, .place select, .trip details input { width: 100%; border: 0; background: transparent; min-height: 32px; padding: 0; }
.kind-label { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--navy); }
.kind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kind-card { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 72px; height: auto; padding: 8px 6px; flex-direction: column; gap: 4px; border-radius: 12px; background: #f6f8fb; color: var(--navy); border: 1px solid var(--line); font-size: 12px; font-weight: 700; cursor: pointer; }
.kind-card.on { background: #eaf1ff; border-color: #2f6fed; color: #1d4e9c; }
.kind-card .tick { position: absolute; top: 4px; right: 6px; font-style: normal; color: #2f6fed; }
.trip .go { width: 100%; min-height: 42px; background: var(--navy); }
.trip details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trip summary { grid-column: 1 / -1; cursor: pointer; color: var(--navy); font-size: 13px; }
.danger, a.danger { background: var(--red); color: white; border: 0; border-radius: 12px; padding: 12px 14px; text-decoration: none; font-weight: 700; }
a.secondary { background: white; color: var(--navy); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; }
.formulas { display: grid; gap: 10px; }
.formula { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: white; }
.formula span { color: var(--muted); font-size: 13px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: white; border-top: 1px solid var(--line); }
.tabbar a { text-align: center; text-decoration: none; color: var(--muted); padding: 10px 4px; font-size: 12px; }
.tabbar a.on { color: var(--navy); font-weight: 700; }
.carrier-home .block { display: block; text-align: center; margin: 12px 0; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick a { background: white; border-radius: 12px; padding: 14px 8px; text-align: center; text-decoration: none; }
.filters { display: flex; gap: 8px; overflow: auto; margin: 8px 0; }
.filters a { white-space: nowrap; background: white; border-radius: 999px; padding: 8px 10px; text-decoration: none; color: var(--ink); }
.filters a.on { background: var(--navy); color: white; }
.demands { display: grid; gap: 10px; }
.demand { display: grid; grid-template-columns: 96px 1fr; gap: 10px; background: white; border-radius: 16px; padding: 10px; }
.demand img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.track { display: flex; gap: 6px; overflow: auto; list-style: none; padding: 0; }
.track li { min-width: 90px; font-size: 12px; color: var(--muted); }
.track li.on { color: var(--navy); font-weight: 700; }
.admin { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.admin-nav { display: flex; flex-direction: column; gap: 8px; background: var(--navy); color: white; border-radius: 16px; padding: 12px; }
.admin-nav a { color: white; text-decoration: none; font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; }
.shell { padding-bottom: 96px; }
.suggestions button, .goods-list button, .trip .secondary { width: 100%; }
@media (max-width: 860px) {
  .hero, .admin, .quick, .missions, .trip details { grid-template-columns: 1fr; }
  .kind-grid { grid-template-columns: 1fr 1fr; }
  .hero img { height: 88px; }
  .mission { height: 64px; min-height: 64px; flex-direction: row; }
  .demand { grid-template-columns: 1fr; }
  .demand img { width: 100%; height: 140px; }
}
