:root { --ink: #0b1020; --plate: #f3c613; --yellow: #ffd21f; --il: #1f4fa8; --paper: #ffffff; --muted: #5b6275; --line: #e3e5ec; --ig: #3d6bff; --panel: 420px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--ink); font-family: Rubik, Heebo, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
a { color: var(--il); }

/* the top: the name and how many cars; under it the road to Jerusalem (a tap opens the map) */
#bar { position: fixed; top: calc(env(safe-area-inset-top) + 8px); inset-inline: 10px; max-width: 520px; margin: 0 auto; z-index: 2; display: block; text-align: start; background: #0b1020cc; color: #fff; border: 1px solid #ffffff26; border-radius: 14px; padding: 8px 12px 9px; font: inherit; cursor: pointer; backdrop-filter: blur(8px); }
#bar .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#bar .brand { font-size: 18px; font-weight: 900; letter-spacing: -0.2px; white-space: nowrap; }
#bar .count { font-size: 13px; font-weight: 700; white-space: nowrap; }
#bar .track { position: relative; display: block; height: 5px; margin: 7px 0 5px; background: #ffffff2e; border-radius: 3px; overflow: hidden; }
#bar .track i { position: absolute; inset-block: 0; right: 0; background: var(--yellow); border-radius: 3px; min-width: 5px; }
#bar .ptext { display: block; font-size: 12px; opacity: 0.85; }
.mini-plate { display: inline-block; font-family: 'Barlow Condensed', Rubik, sans-serif; background: var(--plate); color: var(--ink); font-weight: 800; font-size: 15px; padding: 1px 8px 1px 6px; border-radius: 5px; border: 2px solid var(--ink); border-left: 10px solid var(--il); direction: ltr; white-space: nowrap; vertical-align: middle; }

/* labels that float over cars */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.tag { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 800; box-shadow: 0 3px 10px #0006; transition: opacity 0.2s; }
.tag::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 10px; background: var(--ink); }
.tag.head { background: #fff; pointer-events: auto; cursor: pointer; }
.tag.head::before { content: '🔒 '; }
.tag.me { background: #3dd68c; font-size: 15px; }
.tag.near { background: #fff; font-weight: 700; font-size: 12px; }
.tag.found { font-size: 15px; }
.tag.today { background: #ff8a3d; color: #fff; border-color: #fff; pointer-events: auto; cursor: pointer; font-size: 14px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { margin-top: -4px; } }
.tag.dim { opacity: 0; }

/* the map's credit (OpenStreetMap, ODbL): in the corner on wide screens, in the windows everywhere */
#osm { display: none; position: fixed; bottom: 6px; left: 8px; z-index: 2; font-size: 11px; color: #fff; opacity: 0.75; text-decoration: none; text-shadow: 0 1px 3px #000a; }
.credit { margin: 6px 0 0; } .credit a { color: var(--muted); }
.og #osm { display: none !important; }

/* day or night */
#sky { position: fixed; top: calc(env(safe-area-inset-top) + 88px); left: 12px; z-index: 2; width: 42px; height: 42px; padding: 0; border-radius: 50%; background: #0b1020cc; border: 1px solid #ffffff26; font-size: 20px; backdrop-filter: blur(8px); box-shadow: 0 4px 14px #0005; }
#inapp:not([hidden]) ~ #sky, #sky:has(~ #inapp:not([hidden])) { top: calc(env(safe-area-inset-top) + 150px); }
.og #sky { display: none; }

#loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--ink); color: #fff; z-index: 10; transition: opacity 0.6s; }
#loading div { text-align: center; } #loading b { display: block; font-size: 24px; margin-bottom: 6px; } #loading span { opacity: 0.7; }
#loading.gone { opacity: 0; pointer-events: none; }
#inapp { position: fixed; top: calc(env(safe-area-inset-top) + 92px); inset-inline: 12px; margin: 0; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: 8px 12px 8px 40px; font-size: 13px; font-weight: 700; z-index: 4; }
#inapp .x { top: 50%; transform: translateY(-50%); inset-inline-end: 6px; width: 26px; height: 26px; font-size: 13px; }

/* the sheet: search, today, the follow button; or a car's card */
#sheet { position: fixed; bottom: 0; inset-inline: 0; margin: 0 auto; max-width: 520px; max-height: 78vh; overflow: auto; background: var(--paper); border-radius: 18px 18px 0 0; padding: 8px 16px calc(env(safe-area-inset-bottom) + 14px); box-shadow: 0 -8px 30px #0005; z-index: 3; overscroll-behavior: contain; }
#grab { display: block; width: 64px; height: 20px; margin: -4px auto 4px; padding: 0; background: none; border-radius: 10px; cursor: pointer; touch-action: none; }
#grab::before { content: ''; display: block; width: 40px; height: 4px; margin: 0 auto; border-radius: 2px; background: #d5d8e0; }
#sheet.min #home .field, #sheet.min #suggest, #sheet.min #follow, #sheet.min .foot, #sheet.min #card > :not(.card-head):not(.x) { display: none !important; }
.findhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
#find label { display: block; font-weight: 900; font-size: 20px; }
#mycar { background: #3dd68c; color: var(--ink); padding: 6px 12px; font-size: 14px; border-radius: 999px; }
.field { display: flex; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 12px; padding: 4px; }
.field:focus-within { box-shadow: 0 0 0 3px #3d6bff59; }
:focus-visible { outline: 3px solid var(--ig); outline-offset: 2px; }
.field input:focus-visible { outline: 0; }
.field input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 8px 4px; direction: rtl; unicode-bidi: plaintext; text-align: right; min-width: 0; }
button, .btn { background: var(--ink); color: #fff; border: 0; border-radius: 10px; font: inherit; font-weight: 800; padding: 11px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.light, button.light { background: #eef0f5; color: var(--ink); }
button.link { background: none; color: var(--il); padding: 6px 2px; font-weight: 700; text-decoration: underline; }
button:disabled { opacity: 0.55; }
#suggest { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; max-height: 180px; overflow: auto; }
#suggest li { padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; direction: ltr; text-align: right; }
#suggest li:last-child { border-bottom: 0; } #suggest li.on, #suggest li:hover { background: #f4f5f8; }
#suggest li.none { direction: rtl; text-align: right; background: #fffdf3; } #suggest li.none b { display: block; } #suggest li.none small { color: var(--muted); }
#follow { background: var(--ig); width: 100%; margin-top: 10px; font-size: 16px; padding: 13px 16px; }
#howfollow { background: var(--ig); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 2px 0; font-size: 13px; }
.foot a { color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.foot a b { color: var(--ink); }
.foot .link { flex: none; padding: 4px 0; }

/* a car's card */
#card { border: 2px solid var(--ink); border-radius: 14px; padding: 12px; background: #fffdf3; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; cursor: pointer; }
.card-head .who { min-width: 0; }
.card-name { font-weight: 900; font-size: 17px; overflow-wrap: anywhere; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.plate { display: inline-flex; align-items: center; background: var(--plate); border: 3px solid var(--ink); border-radius: 7px; overflow: hidden; direction: ltr; flex: none; }
.plate i { background: var(--il); color: #fff; font-style: normal; font-weight: 800; font-size: 11px; padding: 3px 6px; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.plate i::before { content: ''; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #ff6a13; }
.plate b { font-family: 'Barlow Condensed', Rubik, sans-serif; font-size: 28px; font-weight: 600; padding: 0 10px; letter-spacing: 0.5px; white-space: nowrap; }
.plate.blank { background: #fff; border-style: dashed; } .plate.blank i { display: none; } .plate.blank b { color: var(--muted); font-size: 15px; font-family: Rubik, sans-serif; font-weight: 700; padding: 8px 14px; }
.more { font-size: 12px; color: var(--muted); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips span { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; line-height: 1.3; }
.chips span b { font-weight: 800; }
.rows { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.7; }
.rows b { font-weight: 700; }
.badge { display: inline-block; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 1px 8px; margin-inline-start: 4px; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.card-actions .grow { flex: 1; }
.mini-actions { display: flex; gap: 6px; margin-top: 8px; }
.mini-actions button { flex: 1; background: #eef0f5; color: var(--ink); padding: 9px 6px; font-size: 13px; }
.x { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: #eef0f5; color: var(--ink); font-size: 16px; }
#card { position: relative; }
.card-head { padding-inline-end: 34px; }
.chev { font-size: 12px; color: var(--muted); white-space: nowrap; }
.steps2 { margin: 10px 0 0; padding-inline-start: 20px; font-size: 14px; line-height: 1.6; }
.lead { margin: 0 0 10px; font-weight: 800; font-size: 16px; line-height: 1.45; }
.intro { margin: 10px 0 0; font-size: 14px; font-weight: 700; line-height: 1.45; background: #fff3c4; border-radius: 8px; padding: 8px 10px; }
.btn.follow { background: var(--ig); }
.small { font-size: 12px; color: var(--muted); line-height: 1.5; }
bdi { unicode-bidi: isolate; }
.collapsed .fold { display: none; }

/* modals */
.modal { position: fixed; inset: 0; background: #0b1020b3; display: grid; place-items: center; padding: 16px; z-index: 5; }
.modal .panel { background: #fff; border-radius: 16px; padding: 18px; max-width: 440px; width: 100%; max-height: 92vh; overflow: auto; }
.modal h2 { margin: 0 0 8px; }
.steps { list-style: none; padding: 0; margin: 4px 0 12px; } .steps li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 15px; line-height: 1.45; }
.steps li span { font-size: 22px; line-height: 1; margin-top: 2px; } .steps li b { display: block; }
.modal .close { margin-top: 12px; width: 100%; }
.q { font-weight: 800; margin: 12px 0 4px; }
.demo { background: #f4f5f8; border-radius: 8px; padding: 6px 8px; }
details { margin-top: 10px; } summary { cursor: pointer; font-weight: 700; color: var(--il); }
#sealhash { display: block; direction: ltr; font-size: 11px; background: #f4f5f8; padding: 8px; border-radius: 8px; word-break: break-all; }
.clue { background: #fff7cc; border-inline-start: 4px solid var(--yellow); padding: 8px 10px; font-size: 14px; }
.map-panel canvas { width: 100%; height: auto; display: block; border-radius: 12px; }
.maphere { margin: 10px 2px 6px; font-weight: 800; color: var(--ink); }
.lic-panel { padding: 12px; } #licimg canvas { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto 10px; border-radius: 12px; }
/* a message: just under the top bar, over the picture */
#toast { position: fixed; top: calc(env(safe-area-inset-top) + 92px); left: 0; right: 0; margin-inline: auto; width: max-content; max-width: min(90vw, 440px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; border: 1px solid #ffffff2e; font-weight: 700; line-height: 1.4; z-index: 9; text-align: center; box-shadow: 0 6px 24px #0008; }

/* a wide screen: the sheet becomes a panel on the right, the road to Jerusalem sits over the picture */
@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  :root { --panel: min(420px, 44vw); }
  #toast { top: 96px; right: calc(var(--panel) + 32px); }
  #sky { top: 16px; left: 16px; }
  #osm { display: block; }
  #sheet { inset-inline: 16px auto; top: 16px; bottom: auto; margin: 0; width: var(--panel); max-width: none; max-height: calc(100vh - 32px); border-radius: 18px; }
  #grab { display: none; }
  #bar { top: 16px; inset-inline: calc(var(--panel) + 32px) auto; width: 380px; max-width: none; margin: 0; }
}

/* what's new today */
.news { list-style: none; padding: 0; margin: 6px 0 4px; }
.news li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.news li:last-child { border-bottom: 0; }
.news li span { font-size: 24px; } .news li p { flex: 1; margin: 0; font-size: 15px; line-height: 1.45; }
.news li button { flex: none; padding: 8px 14px; }

/* once, on a phone: how to move the map */
#hint { position: fixed; inset: auto 16px 42%; z-index: 4; display: grid; gap: 10px; pointer-events: none; transition: opacity 0.4s; }
#hint div { display: flex; align-items: center; gap: 12px; background: #0b1020e6; color: #fff; border-radius: 14px; padding: 12px 14px; font-weight: 700; }
#hint span { font-size: 28px; } #hint p { margin: 0; }
#hint .g1 { animation: pan 1.6s ease-in-out infinite; } #hint .g2 { animation: pinch 1.6s ease-in-out infinite; }
@keyframes pan { 50% { transform: translateX(-12px); } } @keyframes pinch { 50% { transform: scale(0.8) rotate(-12deg); } }
#hint.off { opacity: 0; }

/* the shared link's picture (?og) */
#ogtitle { display: none; }
.og #sheet, .og #bar, .og #hint, .og .modal, .og #inapp, .og #tags { display: none !important; }
.og #ogtitle { display: block; position: fixed; top: 40px; inset-inline-start: 56px; z-index: 3; color: #fff; text-shadow: 0 4px 18px #000a; }
.og #ogtitle b { display: block; font-size: 96px; font-weight: 900; letter-spacing: -1px; }
.og #ogtitle span { display: inline-block; margin-top: 6px; font-size: 38px; font-weight: 800; background: var(--yellow); color: var(--ink); padding: 4px 16px; border-radius: 12px; text-shadow: none; }

/* the system asks for less motion: labels and hints hold still */
@media (prefers-reduced-motion: reduce) {
  .tag.today, #hint span { animation: none !important; }
  #loading, .tag, #hint { transition: none; }
}
