/* Tiny Tel Aviv — quiet, rounded, floating UI over the map */
:root {
  --paper: rgba(250, 249, 246, .86);
  --paper-solid: #faf9f6;
  --ink: #16191d;
  --muted: #6b7076;
  --line: rgba(20, 24, 28, .08);
  --hover: rgba(20, 24, 28, .07);
  --active: rgba(20, 24, 28, .13);
  --accent: #e8572a;
  --focus: #f5a623;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 22px rgba(0, 0, 0, .12);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #2a6ea8; color: var(--ink); font: 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: inherit; text-decoration: underline; text-decoration-color: rgba(20, 24, 28, .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

/* the shared surface: frosted off-white pill */
.pill { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }

/* top corner: name + credit */
.corner { position: fixed; top: 14px; inset-inline-start: 14px; z-index: 10; display: grid; gap: 8px;
  justify-items: start; max-width: min(640px, calc(100vw - 28px)); pointer-events: none; }
.corner > * { pointer-events: auto; }
.brand { padding: 9px 20px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.credit { padding: 7px 16px; font-size: 13px; color: #3c4146; border-radius: 16px; }
.credit bdi, .credit a { white-space: nowrap; }

/* bottom dock: search + toolbar */
.dock { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 10;
  width: min(560px, calc(100vw - 24px)); display: grid; gap: 10px; }
.searchbar { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 20px; height: 56px; }
.searchbar svg { width: 22px; height: 22px; flex: none; }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 18px;
  -webkit-appearance: none; appearance: none; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar:focus-within { box-shadow: var(--shadow), 0 0 0 3px rgba(245, 166, 35, .55); }
.searchbar input::-webkit-search-cancel-button { display: none; }

#results { position: absolute; inset-inline: 0; bottom: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--paper-solid); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  max-height: 52vh; overflow: auto; }
#results li { padding: 9px 12px; border-radius: 12px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
#results li[aria-selected="true"], #results li:hover { background: var(--hover); }
#results li[aria-disabled="true"] { color: var(--muted); cursor: default; background: none; }
#results .en { font-size: 13px; color: var(--muted); }
#results .k { font-size: 12px; color: var(--muted); margin-inline-start: auto; }

.toolbar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 18px; height: 60px; }
[dir="rtl"] .toolbar { padding: 6px 18px 6px 8px; }
.status { font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 8px; min-width: 0; }
.sep { width: 1px; height: 28px; background: var(--line); margin: 0 6px; flex: none; }
.toolbar .status { margin-inline-end: auto; }
.ib { width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center;
  cursor: pointer; flex: none; transition: background .15s; }
.ib:hover { background: var(--hover); }
.ib:active, .ib[aria-pressed="true"] { background: var(--active); }
.searchbar svg, .ib svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ib svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ib.txt { font-weight: 700; font-size: 14px; }

/* transient bits */
.hint { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); padding: 10px 18px; z-index: 11; font-size: 14px; }
.toast { position: fixed; bottom: 160px; left: 50%; transform: translateX(-50%); padding: 10px 18px; z-index: 30;
  max-width: 90vw; font-size: 14px; }
.unclean { position: fixed; bottom: 14px; inset-inline-end: 14px; z-index: 12; padding: 8px 14px; cursor: pointer; font-size: 13px; }

/* dialogs share the look */
dialog { border: 1px solid var(--line); border-radius: 24px; padding: 22px 24px; max-width: min(480px, 94vw);
  background: var(--paper-solid); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(20, 24, 28, .25); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
dialog h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.01em; }
fieldset { border: 0; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
legend { font-weight: 600; margin-bottom: 6px; }
fieldset label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; }
fieldset label:has(input:checked) { border-color: var(--ink); }
input[type=radio] { accent-color: var(--ink); margin: 0; }
label.block { display: grid; gap: 6px; margin: 12px 0; font-size: 14px; color: #3c4146; }
textarea, dialog input[type=text] { width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; resize: vertical; }
.row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.row button { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.row button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.muted { color: var(--muted); } .small { font-size: 12px; }

/* map pin */
.pin { width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--accent); background: rgba(255, 255, 255, .35);
  box-shadow: 0 0 0 3px #fff, 0 3px 10px rgba(0, 0, 0, .35); animation: ping 1.6s ease-out 2; pointer-events: none; }
@keyframes ping { 0% { transform: scale(2.2); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }

body.clean .ui { display: none !important; }

@media (max-width: 600px) {
  .corner { top: 10px; inset-inline-start: 10px; gap: 6px; }
  .brand { font-size: 17px; padding: 7px 16px; }
  .credit { font-size: 11px; padding: 6px 12px; }
  .dock { bottom: 10px; gap: 8px; }
  .searchbar { height: 50px; padding: 0 16px; }
  .searchbar input { font-size: 16px; }   /* >= 16px: no iOS zoom on focus */
  .toolbar { height: 54px; padding-inline: 6px; justify-content: space-between; }
  .status, .sep { display: none; }
  .ib { width: 42px; height: 42px; }
  .toast { bottom: 140px; }
}
@media (prefers-reduced-motion: reduce) { .pin { animation: none; } }
