/* v12 redesign: icons, top bar, bottom sheets, place page, Explore rows, guide menu, road trip steps, loading placeholders. */
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ico.filled { fill: currentColor; }
.tabbar a .tab-ico { width: 24px; height: 24px; opacity: .75; }
.tabbar a.active .tab-ico { opacity: 1; stroke-width: 2.4; }
.tabbar a { font-size: .72rem; min-height: 48px; }

/* top bar */
.back-btn, .prefs-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 40px; justify-content: center; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-weight: 700; padding: 0 12px; }
.back-btn { display: none; padding: 0; border: 0; margin-inline-end: 2px; }
.back-btn .ico { width: 24px; height: 24px; }
html[dir="rtl"] .back-btn .ico { transform: scaleX(-1); }
body.inner-page .back-btn { display: inline-flex; }
@media (max-width: 1049px) { body.inner-page .brand span { display: none; } }

/* bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 30, .45); z-index: 3000; animation: le-fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3001; max-height: 85vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 20px 20px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.25); animation: le-up .22s ease-out; }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 24px; border-radius: 20px; animation: none; } }
.sheet h2 { margin: 0 44px 12px 0; font-size: 1.25rem; }
html[dir="rtl"] .sheet h2 { margin: 0 0 12px 44px; }
.sheet-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sand-2); color: var(--ink); display: grid; place-items: center; }
body.sheet-open { overflow: hidden; }
.sheet-label { margin: 16px 0 6px; font-weight: 700; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-opt { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sand); color: var(--ink); font-weight: 600; }
.lang-opt.on { border-color: var(--nile-2); outline: 2px solid var(--nile-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg.wide { display: flex; }
.seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; background: transparent; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.seg-btn.on { background: var(--nile); color: #fff; }
.filter-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin-bottom: 8px; }
.filter-form label.check { flex-direction: row; align-items: center; font-weight: 500; min-height: 44px; margin: 0; }
.filter-form select { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); padding: 0 10px; background: var(--card); color: var(--ink); font: inherit; }
@keyframes le-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes le-fade { from { opacity: 0; } }

/* bigger tap targets and better contrast */
:root { --muted: #535c68; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --muted: #b3bac4; } }
:root[data-theme="dark"] { --muted: #b3bac4; }
.chip { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; }
.btn { min-height: 44px; }
.small-btn { min-height: 40px; }
.detail-hero .meta a.pill { padding: 6px 12px; min-height: 34px; }
.fav { min-width: 44px; min-height: 44px; }
.section-head a { padding: 8px 0; }

/* place page */
.info-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.info-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; font-weight: 600; font-size: .9rem; }
.info-chip.ok { background: rgba(29,107,49,.85); }
.info-chip.no { background: rgba(143,44,25,.85); }
.place-tabs { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 400; display: flex; gap: 4px; margin: 14px 0; padding: 4px; background: var(--sand-2); border-radius: 999px; }
.ptab { flex: 1; min-width: 0; padding: 0 6px; min-height: 42px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 700; font-size: .92rem; }
.ptab.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.action-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 1150; display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr; gap: 6px; padding: 8px 10px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .78rem; }
.act .ico { width: 22px; height: 22px; }
.act.primary { background: var(--nile-2); border-color: var(--nile-2); color: #fff; flex-direction: row; gap: 8px; font-size: .95rem; }
.act[aria-pressed="true"] { color: #c0392b; }
body:has(.action-bar) main { padding-bottom: calc(var(--tabbar-h) + 100px + env(safe-area-inset-bottom)); }
@media (min-width: 1050px) {
  .action-bar { position: sticky; top: 72px; bottom: auto; max-width: 620px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 18px; }
  body:has(.action-bar) main { padding-bottom: 48px; }
}
.more-list { display: flex; flex-direction: column; gap: 8px; }
.more-list .btn { justify-content: flex-start; width: 100%; }
.more-sheet h2 { margin-bottom: 12px; }

/* compact rows (Explore, Saved) */
.rows { display: grid; gap: 10px; }
@media (min-width: 760px) { .rows { grid-template-columns: 1fr 1fr; } }
.row-card { position: relative; display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.row-link { display: flex; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.row-art { position: relative; flex: none; width: 96px; min-height: 96px; background: var(--c); display: grid; place-items: center; font-size: 2rem; }
.row-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.row-body { padding: 10px 50px 10px 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
html[dir="rtl"] .row-body { padding: 10px 0 10px 50px; }
/* Names wrap to two lines instead of being cut off (matters most with larger text). */
.row-body h3 { font-size: 1rem; margin: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
.row-alt { font-family: Cairo, sans-serif; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: .82rem; color: var(--muted); }
.row-fav { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 6px; border: 0; background: transparent; font-size: 1.2rem; border-radius: 50%; }
.more-btn { display: flex; margin: 18px auto; }
.page-head.compact { padding-top: 18px; }
.page-head.compact h1 { margin-bottom: 2px; }
.tool-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0 6px; }
.sort-label { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.sort-label select { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .88rem; min-height: 38px; }
.tool-bar .seg { margin-inline-start: auto; }
.guide-hits { margin: 8px 0; }
.small-head { font-size: 1rem; margin: 0 0 4px; }
.explore-map { height: 65vh; }

/* home */
.cat-rows { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 132px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: none; }
.cat-rows::-webkit-scrollbar { display: none; }
.cat-rows .cat { scroll-snap-align: start; padding: 12px; min-height: 104px; }
@media (min-width: 1050px) { .cat-rows { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; } }
.itin-scroller { grid-auto-columns: minmax(250px, 290px); }
.month-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.month-card .go, .guide-tile .go { color: var(--accent); font-weight: 700; font-size: .9rem; }
.guide-promo { background: var(--card); color: var(--ink); border: 1px solid var(--line); }

/* guide menu */
.guide-menu { display: grid; gap: 12px; }
@media (min-width: 760px) { .guide-menu { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1050px) { .guide-menu { grid-template-columns: 1fr 1fr 1fr; } }
.guide-tile { position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 44px 16px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: inherit; min-height: 88px; }
html[dir="rtl"] .guide-tile { padding: 16px 16px 16px 44px; }
.guide-tile .ic { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; background: var(--sand-2); display: grid; place-items: center; font-size: 1.6rem; }
.guide-tile strong { font-size: 1.08rem; }
.guide-tile .ico.go { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; }
html[dir="rtl"] .guide-tile .ico.go { transform: translateY(-50%) scaleX(-1); }

/* road trip steps */
.steps { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 400; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin: 10px 0; background: var(--sand); scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: none; }
.step.on { background: var(--nile); border-color: var(--nile); color: #fff; }
.step.done { color: #2e7d3e; }

/* loading placeholders */
.skeleton { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--sand-2) 25%, var(--line) 50%, var(--sand-2) 75%); background-size: 200% 100%; animation: le-shimmer 1.2s infinite linear; }
.skeleton.line { height: 12px; margin: 6px 0; width: 80%; }
.skeleton.line.short { width: 50%; }
.skeleton.wx { flex: 1; height: 86px; }
.skeleton.row { height: 56px; margin: 8px 0; }
@keyframes le-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .sheet, .sheet-backdrop { animation: none; } }
@media (max-width: 759px) { .page-head.compact p { display: none; } .page-head.compact { padding-top: 12px; } }
.cat-rows { grid-auto-columns: 116px; }
.cat-rows .cat { min-height: 88px; padding: 10px; gap: 2px; }
.cat-rows .cat .ic { font-size: 1.5rem; }
.cat-rows .cat strong { font-size: .9rem; line-height: 1.2; }

/* v12.1 fixes: nothing may push the page wider than the phone; header and tab bar stay above maps */
.topbar, .tabbar { z-index: 1200; }
main { overflow-x: clip; }
.guide-grid > *, .history-tl .panel, .sign-grid > * { min-width: 0; }
.god-glyph { overflow-wrap: anywhere; word-break: break-all; font-size: 2rem; }
.history-tl .chips, .god .chips { flex-wrap: wrap; overflow: visible; }
[hidden] { display: none !important; }
/* road trip stop list mirrored for Arabic */
html[dir="rtl"] .timeline:not(.inner) { border-left: 0; border-right: 3px solid var(--line); padding: 0 18px 0 0; }
html[dir="rtl"] .timeline li::before { left: auto; right: -26px; }
html[dir="rtl"] .timeline li.stop::before { right: -27px; }
#trip-form { scroll-margin-top: 80px; }

/* City & district guides */
.city-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.city-tile { position: relative; display: grid; gap: 3px; padding: 12px 36px 12px 14px; border: 1px solid var(--line, #e5ddd0); border-radius: 14px; background: var(--card, #fff); color: inherit; text-decoration: none; min-width: 0; }
.city-tile strong { font-size: 1.05rem; }
.city-tile .go { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); opacity: .5; }
[dir="rtl"] .city-tile { padding: 12px 14px 12px 36px; }
[dir="rtl"] .city-tile .go { transform: translateY(-50%) scaleX(-1); }
.district-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.district-list .district { margin: 0; min-width: 0; }
.district h3 { margin: 0 0 4px; font-size: 1rem; }
.district p { margin: 0; }
.city-page .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Exchange rate board */
.small-h { font-size: 1rem; margin: 0 0 10px; }
.fx-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.fx-cell { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg, transparent); color: inherit; font: inherit; text-align: start; cursor: pointer; min-width: 0; }
.fx-cell span { font-size: .85rem; opacity: .75; }
.fx-cell bdi { font-weight: 700; font-size: 1.05rem; }
.fx-cell.on { border-color: var(--nile-2); box-shadow: 0 0 0 2px var(--nile-2) inset; }
.fx-result { text-align: center; font-size: 1.4rem; }
#fx-chips { margin: 10px 0; flex-wrap: wrap; }
#fx-map { margin-bottom: 10px; }
.fx-all { place-items: center; text-align: center; font-weight: 600; color: var(--accent); }
#fx-out .trip-list li > a.btn, #mq-out .trip-list li > a.btn, #fac-out .trip-list li > a.btn { flex: none; width: auto; min-width: 0; }
#fx-out .trip-list li > span, #mq-out .trip-list li > span, #fac-out .trip-list li > span { flex: 1; min-width: 0; }

/* SOS, Today card, Good to know */
.sos-btn { margin-inline-start: auto; margin-inline-end: 8px; background: #c0392b; color: #fff; border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-weight: 800; font-size: .85rem; letter-spacing: .03em; cursor: pointer; }
.topbar .prefs-btn { margin-inline-start: 0; }
.sos-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.sos-call { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: #fdecea; color: #8e1b10; text-decoration: none; border: 1px solid #f5c2bb; }
.sos-call span { font-size: 1.6rem; font-weight: 800; }
.sos-chip { color: #c0392b; font-weight: 700; }
.today-card { display: grid; gap: 10px; }
.today-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.today-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.today-fact { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--sand, #f3ead9); color: inherit; text-decoration: none; font-size: .9rem; }
.today-links { flex-wrap: wrap; }
.good-to-know { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.good-to-know h3 { margin: 0 0 6px; font-size: 1rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sos-call { background: #3a1714; color: #ffb4a8; border-color: #5c2620; } }
:root[data-theme="dark"] .sos-call { background: #3a1714; color: #ffb4a8; border-color: #5c2620; }
.today-card .fact-box { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 4px; } .today-card .fact-box p { margin: 0; }

/* Search suggestions, welcome, offline bar */
form.has-sugg { position: relative; }
.sugg-box { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 1100; background: var(--card); color: var(--ink, inherit); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 6px; max-height: 60vh; overflow: auto; text-align: start; }
.sugg-h { margin: 6px 10px 2px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }
.sugg { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.sugg:hover, .sugg:focus { background: var(--sand, rgba(0,0,0,.05)); }
.sugg .ic { font-size: 1.2rem; width: 26px; text-align: center; }
.sugg strong { display: block; }
.sugg small { opacity: .7; }
.sugg-all { width: 100%; margin-top: 4px; padding: 10px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; text-align: start; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.lang-pick { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.lang-pick.on { border-color: var(--nile-2); box-shadow: 0 0 0 2px var(--nile-2) inset; }
.offline-bar { position: fixed; inset-inline: 10px; bottom: calc(var(--tabbar-h, 64px) + 10px + env(safe-area-inset-bottom)); z-index: 1300; background: #2b2b2b; color: #fff; padding: 10px 14px; border-radius: 12px; font-size: .85rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* My trip planner */
.trip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.day-place { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-place .move-day { font-size: .78rem; padding: 2px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: inherit; max-width: 96px; }
.travel-hop { display: block; margin: 2px 0 10px; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--line); color: var(--accent); text-decoration: none; font-size: .9rem; font-weight: 600; }

/* Dark mode: map popups and controls follow the theme, and the map itself is dimmed for night use. */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--ink); }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--card); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.6); } }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-container { background: var(--sand-2); } }
:root[data-theme="dark"] .leaflet-container { background: var(--sand-2); }

/* Save feedback (with Undo) and back-to-top */
.snack { position: fixed; inset-inline: 12px; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); z-index: 1300; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #1d2733; color: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.3); transform: translateY(20px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease; }
.snack.on { transform: none; opacity: 1; pointer-events: auto; }
.snack button { flex: none; border: 0; background: transparent; color: #8fd6ee; font: inherit; font-weight: 800; padding: 6px 4px; cursor: pointer; }
body:has(.action-bar) .snack { bottom: calc(var(--tabbar-h) + 92px + env(safe-area-inset-bottom)); }
.to-top { position: fixed; inset-inline-end: 14px; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); z-index: 1100; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .2s ease, transform .2s ease; cursor: pointer; }
.to-top .ico { transform: rotate(90deg); }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
body:has(.action-bar) .to-top { bottom: calc(var(--tabbar-h) + 92px + env(safe-area-inset-bottom)); }
body:has(.snack.on) .to-top { opacity: 0; pointer-events: none; }
@media (min-width: 1050px) { .snack { inset-inline: auto 24px; width: 380px; bottom: 24px; } .to-top { bottom: 24px; } body:has(.action-bar) .to-top, body:has(.action-bar) .snack { bottom: 24px; } }
#app .filters { transition: transform .22s ease; }
#app .filters.tuck { transform: translateY(calc(-100% - 60px)); }
.prefs-aa { width: 18px; height: 18px; opacity: .85; }

/* ---------- Spacing fixes (phone and web) ---------- */
/* Hero: even gaps between the search box, "Surprise me" and the event banner; less empty space under it on phones. */
.hero .search { margin-bottom: 14px; padding-block: 6px; padding-inline: 18px 6px; }
.hero .surprise-btn { margin: 0 0 12px; }
.event-banner { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; line-height: 1.4; border-radius: 16px; padding: 9px 14px; }
@media (max-width: 599px) {
  .hero { padding-bottom: 92px; }
  .hero svg { height: 104px; }
}
.search { padding-block: 6px; padding-inline: 18px 6px; }
/* Categories: a grid that fits the screen instead of a strip cut off at the edges. */
.cat-rows { grid-auto-flow: row; grid-template-rows: none; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: visible; padding-bottom: 0; }
.cat-rows .cat { min-height: 0; padding: 10px 6px 8px; align-items: center; text-align: center; gap: 2px; border-top-width: 3px; }
.cat-rows .cat .ic { font-size: 1.45rem; }
.cat-rows .cat strong { font-size: .8rem; line-height: 1.25; }
.cat-rows .cat small { font-size: .68rem; }
@media (min-width: 600px) { .cat-rows { grid-template-columns: repeat(6, minmax(0, 1fr)); } .cat-rows .cat strong { font-size: .9rem; } }
@media (min-width: 1050px) { .cat-rows { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } .cat-rows .cat { padding: 14px 10px; } }
/* Panels stacked one after another get room between them. */
.wrap > .panel + .panel, .wrap > .panel + section, .wrap > section + .panel, .wrap > .panel + .section { margin-top: 14px; }
.prefs-aa { width: auto; height: auto; font-weight: 800; font-size: .8rem; opacity: .85; letter-spacing: -.02em; }
.event-banner .eb-ic { font-size: 1.3rem; flex: none; }
.event-banner .eb-text { display: grid; gap: 1px; min-width: 0; }
.event-banner .eb-text small { font-weight: 600; font-size: .8rem; opacity: .9; }
.event-banner .eb-go { flex: none; margin-inline-start: 6px; font-weight: 800; }
/* My trip buttons: two short ones side by side, the long one on its own row. */
.trip-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trip-actions .btn { justify-content: center; text-align: center; white-space: normal; margin: 0; }
.trip-actions #offline-days { grid-column: 1 / -1; }
.trip-actions:not(:has(.set-date)) #share-days { grid-column: 1 / -1; }
.city-page .page-head .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.city-page .page-head .actions .btn { justify-content: center; text-align: center; white-space: normal; margin: 0; }
/* Any drop-down without its own style looks like the rest of the app (lowest priority, so styled ones keep theirs). */
:where(#app) select { font: inherit; font-size: .95rem; color: var(--ink); background-color: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; min-height: 40px; }
:where(#app) .filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 14px; }
:where(#app) .filter-row label { display: inline-flex; align-items: center; gap: 8px; }
.hero .surprise-btn, .hero .event-banner { vertical-align: middle; }

/* Optional account */
.acc-banner { display: block; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line); background: var(--card); color: var(--accent); font-weight: 700; text-decoration: none; }
.acc-banner.on { border-style: solid; color: var(--ink); font-weight: 600; }
.account-page .panel + .panel, .account-page .panel + details, .account-page p + .panel { margin-top: 14px; }
.acc-box { display: grid; gap: 12px; max-width: 520px; }
.google-btn { justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; min-height: 46px; }
.google-btn:hover { background: #f8f9fa; }
.acc-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acc-form { display: grid; gap: 12px; }
.acc-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.acc-form input { font: inherit; font-weight: 400; width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sand); color: var(--ink); }
.acc-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.acc-form .pw { position: relative; display: block; }
/* The email and password boxes are left-to-right in every language, so the eye button sits on their right. */
.acc-form .pw input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font-size: 1.05rem; }
.pw-toggle[aria-pressed="true"] { background: var(--sand-2); }
.acc-msg:empty { display: none; }
.acc-msg { margin: 0; }
.acc-submit { justify-content: center; min-height: 46px; }
.btn.loading { opacity: .65; pointer-events: none; }
.acc-tabs { margin: 0; }
.acc-me { display: flex; align-items: center; gap: 14px; max-width: 520px; }
.acc-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--nile-2); color: #fff; font-size: 1.4rem; font-weight: 800; }
.acc-who { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.acc-actions { margin-top: 8px; }
.acc-danger summary { cursor: pointer; color: #b3261e; font-weight: 700; }
.danger-btn { background: #b3261e; border-color: #b3261e; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .acc-danger summary { color: #ff8a80; } }
:root[data-theme="dark"] .acc-danger summary { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ok { color: #7fd38f; } }
:root[data-theme="dark"] .ok { color: #7fd38f; }
.seo-links { text-align: center; font-size: .78rem; color: var(--muted); padding: 0 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); margin-top: -40px; }
.seo-links a { color: var(--muted); }
body:has(.action-bar) .seo-links { padding-bottom: calc(var(--tabbar-h) + 110px + env(safe-area-inset-bottom)); }
