/* رحلتي — blue & white theme */
@font-face { font-family: Readex; src: url(vendor/readex-arabic.woff2) format('woff2'); font-weight: 160 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: Readex; src: url(vendor/readex-latin-ext.woff2) format('woff2'); font-weight: 160 700; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Readex; src: url(vendor/readex-latin.woff2) format('woff2'); font-weight: 160 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --b950: #041633; --b900: #06214a; --b800: #0a3a7a; --b700: #0d4fa3; --b600: #1565d8; --b500: #2a7ff0;
  --b400: #5aa2ff; --b300: #8cc0ff; --b200: #bcd8ff; --b100: #e3efff; --b50: #f3f8ff;
  --ink: #0b1f3a; --muted: #5d7190; --line: #dbe7f7; --white: #fff; --ok: #12b886; --warn: #ff8a3d;
  --grad: linear-gradient(135deg, #2a7ff0 0%, #0d4fa3 55%, #06214a 100%);
  --grad-soft: linear-gradient(135deg, #f3f8ff, #e3efff);
  --shadow: 0 10px 30px -10px rgba(6, 33, 74, .35), 0 2px 6px rgba(6, 33, 74, .08);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sheet-h: 150px;
  --top: env(safe-area-inset-top, 0px);
  --bot: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--b50); color: var(--ink);
  font-family: Readex, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif; font-size: 15px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.hidden { display: none !important; }

/* ---------- splash ---------- */
#splash { position: fixed; inset: 0; z-index: 9999; background: var(--grad); display: grid; place-items: center; color: #fff;
  transition: opacity .6s var(--ease), transform .6s var(--ease); }
#splash.out { opacity: 0; transform: scale(1.08); pointer-events: none; }
#splash .logo { width: 108px; height: 108px; border-radius: 32px; background: rgba(255,255,255,.14); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); animation: float 2.4s ease-in-out infinite; }
#splash .logo svg { width: 64px; height: 64px; }
#splash .needle { transform-origin: 32px 32px; animation: spin 2.2s var(--ease) infinite; }
#splash h1 { margin: 22px 0 4px; font-size: 30px; font-weight: 700; letter-spacing: .5px; text-align: center; }
#splash p { margin: 0; opacity: .8; text-align: center; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes spin { 0% { transform: rotate(0); } 60% { transform: rotate(380deg); } 100% { transform: rotate(360deg); } }

/* ---------- map ---------- */
#map { position: fixed; inset: 0; z-index: 0; background: #dfeaf7; }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 9px; background: rgba(255,255,255,.6) !important; }
.leaflet-control-zoom { display: none; }

/* user dot */
.medot { position: relative; width: 22px; height: 22px; }
.medot .dot { position: absolute; inset: 3px; border-radius: 50%; background: var(--b600); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(13,79,163,.55); }
.medot .halo { position: absolute; inset: -14px; border-radius: 50%; background: rgba(42,127,240,.35); animation: halo 2s ease-out infinite; }
.medot .cone { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from -28deg, rgba(42,127,240,.45), rgba(42,127,240,0) 56deg, transparent 0); transform: rotate(var(--hd, 0deg)); }
.medot.has-heading .cone { opacity: 1; }
.medot.sim .dot { background: var(--warn); }
.medot.sim .halo { background: rgba(255,138,61,.35); }
@keyframes halo { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.acc-circle { fill: rgba(42,127,240,.08); stroke: rgba(42,127,240,.35); stroke-width: 1; }

/* route */
.route-casing { stroke: #fff; }
.route-line { stroke: var(--b600); filter: drop-shadow(0 2px 3px rgba(13,79,163,.35)); }
.route-line.draw { animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.route-ants { stroke: #fff; stroke-dasharray: 2 14; animation: ants 1.2s linear infinite; opacity: .95; }
@keyframes ants { to { stroke-dashoffset: -16; } }
.back-line { stroke: var(--warn); stroke-dasharray: 6 8; animation: ants 1s linear infinite; }

/* stop pins */
.pin { position: relative; width: 44px; height: 54px; animation: drop .7s var(--spring) both; animation-delay: var(--d, 0ms); transform-origin: 50% 100%; }
.pin .head { position: absolute; top: 0; left: 4px; width: 36px; height: 36px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg);
  background: var(--grad); box-shadow: 0 6px 14px -4px rgba(6,33,74,.6); border: 2.5px solid #fff; }
.pin .em { position: absolute; top: 5px; left: 0; width: 44px; text-align: center; font-size: 17px; line-height: 26px; }
.pin .no { position: absolute; top: -6px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--b700);
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 2px 6px rgba(6,33,74,.25); }
.pin .shadow { position: absolute; bottom: 2px; left: 15px; width: 14px; height: 5px; border-radius: 50%; background: rgba(6,33,74,.3); filter: blur(1px); }
.pin.next .head { animation: bob 1.4s ease-in-out infinite; }
.pin.next::after { content: ""; position: absolute; left: 7px; top: 3px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--b500); animation: ring 1.6s ease-out infinite; }
.pin.done .head { background: #fff; border-color: var(--b500); }
.pin.done .no { background: var(--ok); color: #fff; }
@keyframes drop { 0% { transform: translateY(-60px) scale(.6); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes bob { 50% { transform: rotate(-45deg) translate(3px, -3px); } }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

/* POIs */
.poi { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 17px; box-shadow: 0 4px 12px -3px rgba(6,33,74,.45);
  border: 2px solid var(--b200); animation: pop .5s var(--spring) both; animation-delay: var(--d, 0ms); overflow: hidden; }
.poi.wiki { width: 44px; height: 44px; border: 3px solid #fff; outline: 2px solid var(--b500); }
.poi img { width: 100%; height: 100%; object-fit: cover; }
.poi.hl { border-color: var(--b600); outline: 3px solid rgba(42,127,240,.35); transform: scale(1.1); }
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.leaflet-popup-content-wrapper { border-radius: 16px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 12px 14px; font-family: inherit; font-size: 14px; line-height: 1.6; direction: rtl; text-align: right; min-width: 180px; }
.leaflet-popup-content b { color: var(--b800); }
.leaflet-popup-content .pk { color: var(--muted); font-size: 12px; }
.leaflet-popup-content a { color: var(--b600); }

/* radar */
.radar { width: 240px; height: 240px; border-radius: 50%; pointer-events: none; position: relative; }
.radar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(42,127,240,.5);
  background: conic-gradient(from 0deg, rgba(42,127,240,.0), rgba(42,127,240,.38) 70deg, transparent 72deg); animation: sweep 1.4s linear infinite; }
.radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--b400); animation: ring 1.4s ease-out infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* ---------- top bar ---------- */
.glass { background: rgba(255,255,255,.86); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
.topbar { position: fixed; z-index: 500; top: calc(var(--top) + 10px); inset-inline: 10px; height: 58px; border-radius: 20px; display: flex; align-items: center; gap: 10px;
  padding: 0 8px; box-shadow: var(--shadow); animation: slideDown .7s var(--ease) both .2s; }
.topbar .ib { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: var(--b700); transition: background .2s, transform .2s; }
.topbar .ib:active { transform: scale(.9); background: var(--b100); }
.topbar .ib svg { width: 22px; height: 22px; }
.topbar .ttl { flex: 1; min-width: 0; line-height: 1.25; }
.topbar .ttl small { display: block; color: var(--muted); font-size: 11px; }
.topbar .ttl b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--b900); }
.gps { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: var(--b50); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.gps i { width: 8px; height: 8px; border-radius: 50%; background: #9fb2cc; }
.gps.on { color: var(--b700); background: var(--b100); }
.gps.on i { background: var(--b500); box-shadow: 0 0 0 0 rgba(42,127,240,.6); animation: blip 1.6s infinite; }
.gps.err { color: #c92a2a; background: #fff0f0; } .gps.err i { background: #e03131; }
.gps.sim { color: #b35100; background: #fff3e8; } .gps.sim i { background: var(--warn); }
@keyframes blip { 70% { box-shadow: 0 0 0 7px rgba(42,127,240,0); } 100% { box-shadow: 0 0 0 0 rgba(42,127,240,0); } }
@keyframes slideDown { from { transform: translateY(-120%); opacity: 0; } }

/* ---------- walking HUD ---------- */
.hud { position: fixed; z-index: 450; top: calc(var(--top) + 76px); inset-inline: 10px; border-radius: 20px; padding: 12px 14px; color: #fff;
  background: var(--grad); box-shadow: var(--shadow); display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  animation: slideDown .6s var(--spring) both; overflow: hidden; padding-inline-end: 36px; }
.hud .arrow { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.hud .arrow svg { width: 30px; height: 30px; transition: transform .6s var(--ease); }
.hud .nx small { display: block; opacity: .75; font-size: 11px; }
.hud .nx b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .dist { text-align: center; line-height: 1.1; white-space: nowrap; min-width: 64px; }
.hud .nx { min-width: 0; }
.hud .dist b { display: block; font-size: 22px; font-weight: 700; }
.hud .dist small { opacity: .8; font-size: 11px; }
.hud .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.hud .bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #fff, var(--b200)); transition: width .8s var(--ease); }
.hud .x { position: absolute; top: 6px; left: 8px; color: #fff; opacity: .7; font-size: 18px; padding: 4px; }

.banner { position: fixed; z-index: 440; inset-inline: 22px; top: calc(var(--top) + 212px); border-radius: 16px; padding: 10px 14px; background: #fff; color: var(--ink);
  border-inline-start: 5px solid var(--warn); box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; font-size: 14px; animation: slideDown .5s var(--spring) both; }
.banner.info { border-color: var(--b500); top: calc(var(--top) + 78px); }
.banner button { margin-inline-start: auto; padding: 6px 12px; border-radius: 10px; background: var(--b100); color: var(--b700); font-weight: 600; font-size: 13px; white-space: nowrap; }

/* ---------- floating buttons ---------- */
.fabs { position: fixed; z-index: 400; left: 12px; top: calc(var(--top) + 84px); display: flex; flex-direction: column; gap: 10px; transition: top .4s var(--ease); }
body.walking .fabs { top: calc(var(--top) + 222px); }
.fab { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; box-shadow: var(--shadow); color: var(--b700); font-size: 20px;
  transition: transform .25s var(--spring), background .2s; animation: pop .6s var(--spring) both .5s; }
.fab:active { transform: scale(.88); }
.fab svg { width: 22px; height: 22px; }
.fab.on { background: var(--b600); color: #fff; }
.fab.sim-on { background: var(--warn); color: #fff; }

.around { position: fixed; z-index: 420; left: 50%; bottom: calc(var(--sheet-h) + 16px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 8px 22px 8px 8px; border-radius: 40px; background: var(--grad); color: #fff; font-weight: 700; font-size: 16px; box-shadow: 0 14px 30px -8px rgba(6,33,74,.6);
  transition: bottom .45s var(--ease), transform .25s var(--spring), opacity .3s; animation: rise .8s var(--spring) both .6s; }
.around:active { transform: translateX(-50%) scale(.94); }
.around .ic { position: relative; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 22px; }
.around .ic::before, .around .ic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); animation: ring 2.2s ease-out infinite; }
.around .ic::after { animation-delay: 1.1s; }
.around.busy { opacity: .85; pointer-events: none; }
.around.busy .ic { animation: spinIc 1s linear infinite; }
body.sheet-full .around { opacity: 0; pointer-events: none; }
@keyframes rise { from { transform: translate(-50%, 140%); opacity: 0; } }
@keyframes spinIc { to { transform: rotate(360deg); } }

/* ---------- bottom sheet ---------- */
.sheet { position: fixed; z-index: 600; left: 0; right: 0; bottom: 0; height: var(--sheet-h); background: #fff; border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 40px -12px rgba(6,33,74,.35); display: flex; flex-direction: column; transition: height .45s var(--ease); padding-bottom: var(--bot);
  animation: sheetIn .8s var(--ease) both .3s; }
.sheet.dragging { transition: none; }
@keyframes sheetIn { from { transform: translateY(100%); } }
.grip { padding: 10px 0 4px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.grip i { width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.tabs { position: relative; display: flex; margin: 0 14px; padding: 4px; border-radius: 16px; background: var(--b50); touch-action: none; }
.tabs button { position: relative; z-index: 1; flex: 1; height: 40px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); transition: color .3s; }
.tabs button.on { color: var(--b700); }
.tabs .ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; width: calc((100% - 8px) / 3); right: 4px; border-radius: 12px; background: #fff;
  box-shadow: 0 3px 10px -3px rgba(6,33,74,.25); transition: transform .45s var(--spring); }
.tabs[data-tab="route"] .ink { transform: translateX(-100%); }
.tabs[data-tab="notes"] .ink { transform: translateX(-200%); }
.tabs button.pulse { animation: tabPulse .9s var(--spring); }
@keyframes tabPulse { 30% { transform: scale(1.12); color: var(--b600); } }
.tabs .badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 4px; border-radius: 9px; background: var(--b600); color: #fff; font-size: 11px; }
.panes { position: relative; flex: 1; min-height: 0; }
.pane { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transform: translateX(-24px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.pane.on { opacity: 1; transform: none; pointer-events: auto; }
#pane-route, #pane-notes { transform: translateX(24px); }
#pane-route.on, #pane-notes.on { transform: none; }

/* chat */
body.sheet-peek #msgs, body.sheet-peek #chips { display: none; }
body.sheet-peek .composer { border-top: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 14px 6px; overscroll-behavior: contain; }
.msg { display: flex; gap: 8px; margin-bottom: 12px; animation: msgIn .5s var(--spring) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.msg .av { flex: none; width: 32px; height: 32px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 15px; box-shadow: 0 4px 10px -4px rgba(6,33,74,.6); }
.msg .bub { max-width: 86%; padding: 10px 14px; border-radius: 18px; line-height: 1.75; font-size: 14.5px; word-wrap: break-word; }
.msg.ai .bub { background: var(--b50); border: 1px solid var(--line); border-start-start-radius: 6px; }
.msg.me { flex-direction: row-reverse; }
.msg.me .bub { background: var(--grad); color: #fff; border-start-end-radius: 6px; box-shadow: 0 8px 18px -10px rgba(6,33,74,.7); }
.msg.ev { justify-content: center; }
.msg.ev .pill { padding: 6px 14px; border-radius: 20px; background: var(--b100); color: var(--b700); font-size: 13px; font-weight: 600; }
.bub p { margin: 0 0 8px; } .bub p:last-child { margin: 0; }
.bub ul, .bub ol { margin: 4px 0 8px; padding-inline-start: 20px; }
.bub li { margin: 2px 0; }
.bub b { color: var(--b800); }
.bub b.pl { cursor: pointer; border-bottom: 1.5px dashed var(--b400); }
.msg.me .bub b { color: #fff; }
.bub a { color: var(--b600); }
.bub .err { color: #c92a2a; font-size: 13px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tool { padding: 3px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 12px; animation: pop .4s var(--spring) both; }
.tool.live { color: var(--b700); border-color: var(--b200); background: linear-gradient(90deg, #fff, var(--b100), #fff); background-size: 200% 100%; animation: pop .4s var(--spring) both, shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.typing { display: inline-flex; gap: 4px; padding: 6px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--b400); animation: dots 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-6px); opacity: 1; } }
.caret::after { content: ""; display: inline-block; width: 7px; height: 15px; margin-inline-start: 2px; vertical-align: -2px; border-radius: 2px; background: var(--b500); animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.cards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -14px 4px; padding-inline: 14px; scroll-snap-type: x mandatory; }
.cards::-webkit-scrollbar { display: none; }
.pc { flex: none; width: 150px; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 16px -10px rgba(6,33,74,.5);
  scroll-snap-align: start; text-align: start; animation: cardIn .5s var(--spring) both; animation-delay: var(--d, 0ms); transition: transform .2s; }
.pc:active { transform: scale(.96); }
.pc .im { height: 84px; background: var(--grad-soft) center/cover; display: grid; place-items: center; font-size: 30px; }
.pc .tx { padding: 8px 10px; }
.pc b { display: block; font-size: 13px; line-height: 1.35; color: var(--b900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc small { color: var(--muted); font-size: 11px; }
@keyframes cardIn { from { opacity: 0; transform: translateX(-30px) scale(.9); } }

.welcome { text-align: center; padding: 18px 10px 6px; animation: msgIn .6s var(--spring) both; }
.welcome .big { font-size: 46px; display: inline-block; animation: wave 2s ease-in-out infinite; transform-origin: 70% 80%; }
.welcome h3 { margin: 6px 0 4px; color: var(--b900); font-size: 18px; }
.welcome p { margin: 0 auto; max-width: 300px; color: var(--muted); font-size: 14px; line-height: 1.7; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 8px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 18px; border: 1.5px solid var(--b200); background: #fff; color: var(--b700); font-size: 13px; font-weight: 500;
  animation: pop .45s var(--spring) both; animation-delay: var(--d, 0ms); transition: background .2s, transform .2s; }
.chip:active { transform: scale(.94); background: var(--b100); }

.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; max-height: 120px; min-height: 46px; padding: 11px 16px; border-radius: 23px; border: 1.5px solid var(--line); background: var(--b50);
  outline: none; line-height: 1.5; transition: border-color .2s, background .2s, box-shadow .2s; }
.composer textarea:focus { border-color: var(--b400); background: #fff; box-shadow: 0 0 0 4px rgba(42,127,240,.12); }
.composer .send { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(6,33,74,.8);
  transition: transform .25s var(--spring), opacity .2s; }
.composer .send:active { transform: scale(.85); }
.composer .send:disabled { opacity: .45; }
.composer .send svg { width: 20px; height: 20px; transform: scaleX(-1); }

/* route pane */
.rscroll { flex: 1; overflow-y: auto; padding: 14px; overscroll-behavior: contain; }
.empty { text-align: center; color: var(--muted); padding: 30px 20px; line-height: 1.8; }
.empty .big { font-size: 52px; display: block; animation: float 2.4s ease-in-out infinite; }
.rhead { border-radius: 20px; padding: 16px; color: #fff; background: var(--grad); box-shadow: var(--shadow); position: relative; overflow: hidden; animation: msgIn .5s var(--spring) both; }
.rhead::after { content: ""; position: absolute; width: 180px; height: 180px; left: -60px; top: -80px; border-radius: 50%; background: rgba(255,255,255,.08); }
.rhead h3 { margin: 0 0 4px; font-size: 18px; }
.rhead p { margin: 0; opacity: .85; font-size: 13px; line-height: 1.7; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: rgba(255,255,255,.14); border-radius: 14px; padding: 8px; text-align: center; }
.stat b { display: block; font-size: 20px; }
.stat small { opacity: .8; font-size: 11px; }
.ractions { display: flex; gap: 8px; margin: 12px 0 4px; }
.btn { flex: 1; height: 48px; border-radius: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .2s var(--spring); }
.btn:active { transform: scale(.95); }
.btn.pri { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(6,33,74,.8); }
.btn.sec { background: var(--b100); color: var(--b700); }
.btn.warn { background: #fff3e8; color: #b35100; }
.tl { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; top: 18px; bottom: 18px; right: 19px; width: 3px; border-radius: 2px; background: linear-gradient(var(--b300), var(--b100)); }
.tl li { position: relative; display: flex; gap: 12px; padding: 8px 0; animation: msgIn .5s var(--spring) both; animation-delay: var(--d, 0ms); cursor: pointer; }
.tl .n { position: relative; z-index: 1; flex: none; width: 41px; height: 41px; border-radius: 50%; background: #fff; border: 3px solid var(--b500); display: grid; place-items: center; font-size: 18px; transition: all .3s; }
.tl li.done .n { background: var(--ok); border-color: var(--ok); }
.tl li.next .n { box-shadow: 0 0 0 0 rgba(42,127,240,.6); animation: blip 1.6s infinite; background: var(--b600); border-color: var(--b600); }
.tl .c { flex: 1; min-width: 0; background: var(--b50); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; transition: background .2s; }
.tl li:active .c { background: var(--b100); }
.tl .c b { color: var(--b900); }
.tl .c p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.tl .meta { display: flex; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--b700); font-weight: 600; }
.tl .leg { font-size: 11.5px; color: var(--muted); margin: -2px 54px 0 0; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 900; background: rgba(4,22,51,.4); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 901; top: 0; bottom: 0; right: 0; width: min(330px, 86vw); background: #fff; transform: translateX(105%); transition: transform .45s var(--ease);
  display: flex; flex-direction: column; padding-top: var(--top); box-shadow: -10px 0 40px rgba(6,33,74,.3); }
.drawer.on { transform: none; }
.drawer .dh { padding: 22px 18px 16px; background: var(--grad); color: #fff; }
.drawer .dh h2 { margin: 0; font-size: 22px; }
.drawer .dh p { margin: 4px 0 0; opacity: .8; font-size: 13px; }
.drawer .list { flex: 1; overflow-y: auto; padding: 10px; }
.trip-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border-radius: 14px; text-align: start; transition: background .2s; animation: msgIn .4s var(--spring) both; animation-delay: var(--d, 0ms); }
.trip-it:active, .trip-it.on { background: var(--b100); }
.trip-it .ti { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--b100); display: grid; place-items: center; font-size: 18px; }
.trip-it.on .ti { background: var(--grad); }
.trip-it .tt { flex: 1; min-width: 0; }
.trip-it b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--b900); }
.trip-it small { color: var(--muted); font-size: 12px; }
.trip-it .del { padding: 8px; opacity: .5; }
.drawer .df { padding: 12px; display: grid; gap: 8px; border-top: 1px solid var(--line); }

/* ---------- toast & confetti ---------- */
.toast { position: fixed; z-index: 2000; top: calc(var(--top) + 76px); left: 50%; transform: translate(-50%, -30px) scale(.9); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 16px; background: var(--b900); color: #fff;
  box-shadow: var(--shadow); font-size: 14px; max-width: 90vw; transition: transform .5s var(--spring), opacity .3s; text-align: center; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.confetti { position: fixed; z-index: 1999; top: -12px; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; animation: fall var(--t, 2.4s) cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes fall { to { transform: translate(var(--x, 0), 105vh) rotate(var(--r, 540deg)); opacity: .9; } }
.arrive-pop { position: fixed; z-index: 1998; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.4); opacity: 0; padding: 22px 28px; border-radius: 26px; background: #fff;
  box-shadow: 0 30px 60px -20px rgba(6,33,74,.6); text-align: center; animation: bigPop 2.6s var(--spring) forwards; pointer-events: none; }
.arrive-pop .e { font-size: 46px; } .arrive-pop b { display: block; color: var(--b900); font-size: 18px; margin-top: 4px; } .arrive-pop small { color: var(--muted); }
@keyframes bigPop { 12% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 80% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -60%) scale(.9); opacity: 0; } }

/* ---------- wide screens: side panel ---------- */
@media (min-width: 900px) {
  .sheet { left: auto; top: 0; width: 420px; height: 100% !important; border-radius: 0; animation: none; box-shadow: -10px 0 40px -12px rgba(6,33,74,.35); }
  .grip { display: none; }
  .tabs { margin-top: 14px; }
  .topbar { inset-inline-start: 432px; inset-inline-end: auto; width: min(520px, calc(100vw - 460px)); right: 432px; }
  .hud, .banner { right: 432px; left: auto; width: min(520px, calc(100vw - 460px)); }
  .around { left: calc((100vw - 420px) / 2); bottom: 26px !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- offline ---------- */
.net { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 12px; background: #fff3e8; color: #b35100; font-size: 11px; font-weight: 700; white-space: nowrap; animation: pop .4s var(--spring); }
.msg .q { display: block; margin-top: 4px; font-size: 11px; opacity: .85; }
.msg.me.queued .bub { background: linear-gradient(135deg, #7da9e6, #4f7fbf); }
.msg.ai.local .bub { background: #fff; border: 1.5px dashed var(--b200); }
.msg .src { display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 10px; background: var(--b100); color: var(--b700); font-size: 11px; font-weight: 600; }
.guide h4 { margin: 0 0 4px; color: var(--b900); font-size: 15px; }
.guide .gl { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: var(--b50); font-size: 13px; }
.more { margin-top: 8px; padding: 7px 14px; border-radius: 14px; background: var(--b600); color: #fff; font-size: 13px; font-weight: 600; }

.ocard { margin-top: 14px; border-radius: 20px; padding: 14px; border: 1.5px solid var(--b200); background: linear-gradient(160deg, #fff, var(--b50)); animation: msgIn .5s var(--spring) both .1s; }
.ocard h4 { margin: 0 0 4px; color: var(--b900); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ocard p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.ocard.ready { border-color: #a6e3cb; background: linear-gradient(160deg, #fff, #effbf5); }
.seg { display: flex; gap: 6px; margin-bottom: 10px; }
.seg button { flex: 1; height: 38px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .2s; }
.seg button.on { border-color: var(--b500); color: var(--b700); background: var(--b100); }
.osteps { list-style: none; margin: 4px 0 0; padding: 0; }
.osteps li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--muted); }
.osteps li.on { color: var(--b800); font-weight: 600; }
.osteps li.ok { color: #0c8a5f; }
.osteps .ic { width: 22px; text-align: center; }
.osteps li.on .ic::after { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--b200); border-top-color: var(--b600); animation: spinIc .8s linear infinite; }
.pbar { height: 8px; border-radius: 4px; background: var(--b100); overflow: hidden; margin: 2px 0 6px 30px; }
.pbar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; transition: width .3s; position: relative; overflow: hidden; }
.pbar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: shimmer 1.2s linear infinite; background-size: 200% 100%; }
.ostat { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ostat span { padding: 4px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--b800); }

/* ---------- notebook ---------- */
.nhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nhead h3 { margin: 0; flex: 1; color: var(--b900); font-size: 17px; }
.nhead .btn { flex: none; height: 40px; padding: 0 14px; font-size: 14px; }
.nfilter { display: flex; gap: 6px; margin-bottom: 12px; }
.nfilter button { padding: 6px 12px; border-radius: 14px; background: var(--b50); border: 1.5px solid var(--line); font-size: 12.5px; color: var(--muted); font-weight: 600; transition: all .2s; }
.nfilter button.on { background: var(--b600); border-color: var(--b600); color: #fff; }
.ngroup { margin-bottom: 14px; }
.ngroup > b { display: block; margin: 0 4px 6px; font-size: 12.5px; color: var(--muted); }
.note { display: flex; gap: 10px; width: 100%; text-align: start; padding: 12px; margin-bottom: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 6px 16px -12px rgba(6,33,74,.5); animation: msgIn .45s var(--spring) both; animation-delay: var(--d, 0ms); transition: transform .2s; }
.note:active { transform: scale(.98); }
.note .ni { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--b100); }
.note .nt { flex: 1; min-width: 0; }
.note .nt b { display: block; color: var(--b900); font-size: 14px; }
.note .nt p { margin: 3px 0 0; color: var(--ink); font-size: 13px; line-height: 1.65; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.note .nm { margin-top: 6px; font-size: 11px; color: var(--muted); display: flex; gap: 8px; }
.note.fresh { animation: msgIn .45s var(--spring) both, glow 2s ease-out .4s; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(42,127,240,.55); } 100% { box-shadow: 0 0 0 14px rgba(42,127,240,0); } }

.modal { position: fixed; inset: 0; z-index: 1500; background: rgba(4,22,51,.45); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.mcard { width: min(520px, 100%); max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 26px 26px 0 0; padding: 18px 16px calc(16px + var(--bot)); animation: sheetIn .45s var(--ease); }
@media (min-width: 600px) { .modal { align-items: center; } .mcard { border-radius: 26px; } }
.mcard h3 { margin: 0 0 12px; color: var(--b900); }
.mcard label { display: block; margin-bottom: 10px; }
.mcard label span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.mcard input, .mcard textarea { width: 100%; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--b50); outline: none; resize: vertical; line-height: 1.6; }
.mcard input:focus, .mcard textarea:focus { border-color: var(--b400); background: #fff; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.kinds button { padding: 6px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 12.5px; color: var(--muted); }
.kinds button.on { border-color: var(--b500); background: var(--b100); color: var(--b700); font-weight: 600; }
.scope { display: flex; gap: 6px; margin-bottom: 14px; }
.scope button { flex: 1; height: 38px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; color: var(--muted); font-weight: 600; }
.scope button.on { border-color: var(--b500); background: var(--b100); color: var(--b700); }
.macts { display: flex; gap: 8px; }
.macts .warn { flex: none; width: 52px; }
.dstore { font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- restaurants ---------- */
.fcards { display: flex; gap: 12px; overflow-x: auto; margin: 0 -14px 8px; padding: 2px 14px 12px; scroll-snap-type: x mandatory; }
.fcards::-webkit-scrollbar { display: none; }
.fc { position: relative; flex: none; width: 230px; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--line); text-align: start;
  box-shadow: 0 12px 26px -16px rgba(6,33,74,.7); scroll-snap-align: start; animation: cardIn .55s var(--spring) both; animation-delay: var(--d, 0ms); transition: transform .2s; }
.fc:active { transform: scale(.97); }
.fc .ph { position: relative; height: 128px; background: var(--grad); display: grid; place-items: center; font-size: 44px; overflow: hidden; }
.fc .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fadeIn .5s; }
.fc .ph::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(4,22,51,.55)); }
.fc .rk { position: absolute; z-index: 1; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--b700); font-weight: 700; display: grid; place-items: center; font-size: 13px; box-shadow: var(--shadow); }
.fc .rt { position: absolute; z-index: 1; bottom: 8px; right: 10px; color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.fc .bd { padding: 10px 12px 12px; }
.fc .bd b { display: block; color: var(--b900); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc .cz { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 6px; }
.fc .cz span, .fsheet .cz span { padding: 2px 8px; border-radius: 9px; background: var(--b100); color: var(--b700); font-size: 11px; font-weight: 600; }
.fc .cz span.ok, .fsheet .cz span.ok { background: #e6f7ef; color: #0c8a5f; }
.fc .why { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc .ac { display: flex; gap: 6px; margin-top: 10px; }
.fc .ac a, .fc .ac span { flex: 1; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.fc .ac a { background: var(--b100); color: var(--b700); }
.fc .ac span { background: var(--grad); color: #fff; }
.foodpin { width: 38px; height: 38px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); background: #fff; border: 3px solid var(--b600); box-shadow: 0 6px 14px -4px rgba(6,33,74,.6);
  display: grid; place-items: center; animation: pop .5s var(--spring) both; animation-delay: var(--d, 0ms); }
.foodpin span { transform: rotate(45deg); font-size: 16px; font-weight: 700; color: var(--b700); }
.go-line { stroke: var(--b500); stroke-dasharray: 1 10; animation: ants .8s linear infinite; }

.mcard.food { padding: 0; overflow: hidden auto; }
.fsheet .hero { position: relative; height: 210px; background: var(--grad); display: grid; place-items: center; font-size: 64px; }
.fsheet .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fsheet .hero::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(4,22,51,.75)); }
.fsheet .hero h3 { position: absolute; z-index: 1; bottom: 12px; right: 16px; left: 50px; margin: 0; color: #fff; font-size: 21px; text-shadow: 0 2px 6px rgba(0,0,0,.4); text-align: start; }
.fsheet .x { position: absolute; z-index: 2; top: 12px; left: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 16px; }
.fsheet .in { padding: 14px 16px calc(16px + var(--bot)); }
.fsheet .cz { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fsheet .cz span { font-size: 12px; padding: 4px 10px; }
.fsheet .sec { margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; background: var(--b50); animation: msgIn .45s var(--spring) both; animation-delay: var(--d, 0ms); }
.fsheet .sec h4 { margin: 0 0 6px; font-size: 14px; color: var(--b900); }
.fsheet .sec p { margin: 0; font-size: 13.5px; line-height: 1.75; }
.fsheet .sec ul { margin: 0; padding-inline-start: 18px; font-size: 13.5px; line-height: 1.75; }
.fsheet .sec.warn { background: #fff5ec; } .fsheet .sec.warn h4 { color: #b35100; }
.fsheet .sec.tip { background: #eefaf4; } .fsheet .sec.tip h4 { color: #0c8a5f; }
.fsheet .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.fsheet .acts .btn { height: 46px; font-size: 14px; text-decoration: none; }
.fsheet .acts .btn.pri { grid-column: 1 / -1; }

.srcs-h { margin-top: 8px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.bub ul.srcs { margin: 2px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.bub ul.srcs a { color: var(--b500); }
.fc .ph:nth-child(n) { background: linear-gradient(135deg, #5aa2ff, #0d4fa3 60%, #06214a); }

/* chat: no entry animation for history, "jump to new" button */
.msg.old { animation: none; }
#pane-chat { position: absolute; }
.jump { position: absolute; z-index: 5; left: 50%; bottom: 128px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 8px 16px; border-radius: 18px;
  background: var(--b600); color: #fff; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); transition: all .3s var(--spring); }
.jump.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
body.sheet-peek .jump { display: none; }

/* ---------- Claude status ---------- */
.brain { position: relative; display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px; border-radius: 12px; background: var(--b50); font-size: 11px; font-weight: 700; color: var(--b700); white-space: nowrap; transition: all .3s var(--ease); }
.brain i { font-style: normal; font-size: 16px; line-height: 1; }
.brain::after { content: ""; position: absolute; top: 5px; left: 5px; width: 8px; height: 8px; border-radius: 50%; background: #12b886; border: 2px solid #fff; }
.brain.busy { background: var(--grad); color: #fff; padding: 0 10px; box-shadow: 0 6px 16px -6px rgba(13,79,163,.8); }
.brain.busy i { animation: think 1.1s ease-in-out infinite; }
.brain.busy::after { background: #fff; animation: blip 1.2s infinite; }
.brain.down { background: #fff0f0; color: #c92a2a; }
.brain.down::after { background: #e03131; }
@keyframes think { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.18) rotate(-8deg); } 60% { transform: scale(1.05) rotate(6deg); } }
.bub .wait { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: #fff7e6; color: #8a5300; font-size: 12.5px; animation: pop .4s var(--spring); }
.trip-it .live { font-size: 12px; color: var(--b600); font-weight: 700; }
.topbar .ttl { min-width: 60px; }

/* ---------- custom views ---------- */
.vw { margin-top: 10px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #fff; animation: msgIn .5s var(--spring) both; position: relative; }
.vh { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 6px; background: var(--b50); border-bottom: 1px solid var(--line); }
.vh b { flex: 1; font-size: 12.5px; color: var(--b800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx { width: 30px; height: 30px; border-radius: 10px; background: #fff; color: var(--b700); font-size: 16px; box-shadow: 0 2px 6px rgba(6,33,74,.12); }
.vw iframe { display: block; width: 100%; height: 160px; border: 0; background: #fff; transition: height .35s var(--ease); }
.vw.clipped::after { content: "⤢ كبّر لتشوف الكل"; position: absolute; bottom: 0; inset-inline: 0; padding: 18px 0 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--b700);
  background: linear-gradient(transparent, #fff 60%); pointer-events: none; }
.msg.ai .bub:has(.vw) { max-width: 94%; width: 94%; }
.modal.full { align-items: stretch; }
.vfull { width: 100%; height: 100%; background: #fff; display: flex; flex-direction: column; animation: sheetIn .45s var(--ease); padding-top: var(--top); }
.vfh { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--b50); }
.vfh b { flex: 1; color: var(--b900); }
.vfh button { width: 38px; height: 38px; border-radius: 12px; background: #fff; font-size: 16px; box-shadow: var(--shadow); }
.vfb { flex: 1; min-height: 0; }
.vfb iframe { width: 100%; height: 100%; border: 0; display: block; padding: 6px; }
/* ---------- place links + details ---------- */
.bub b.place { color: var(--b700); border-bottom: 1.5px dashed var(--b400); cursor: pointer; }
.bub b.place::after { content: " ›"; font-size: 11px; opacity: .6; }
.fsheet .hero h3 small { display: block; font-size: 13px; font-weight: 500; opacity: .85; }
.fsheet .hero.shimmer { background: linear-gradient(110deg, #2a7ff0 30%, #5aa2ff 50%, #2a7ff0 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel { height: 58px; border-radius: 16px; margin-bottom: 10px; background: linear-gradient(110deg, var(--b50) 30%, #fff 50%, var(--b50) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel.s2 { height: 40px; width: 70%; } .skel.s3 { height: 46px; }
.fsheet .muted { color: var(--muted); } .fsheet .small { font-size: 12.5px; }
#placeModal { z-index: 1600; }

/* ---------- photos ---------- */
.composer .cam { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--b100); font-size: 20px; display: grid; place-items: center; transition: transform .25s var(--spring), background .2s; }
.composer .cam:active { transform: scale(.85); }
.composer .cam.on { background: var(--b600); box-shadow: 0 0 0 4px rgba(42,127,240,.2); }
.attach { padding: 8px 12px 0; border-top: 1px solid var(--line); animation: msgIn .35s var(--spring) both; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.th { position: relative; flex: none; width: 74px; height: 74px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); animation: pop .4s var(--spring) both; animation-delay: var(--d, 0ms); }
.th img { width: 100%; height: 100%; object-fit: cover; }
.th button { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(4,22,51,.65); color: #fff; font-size: 12px; }
.achips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; }
.achips::-webkit-scrollbar, .thumbs::-webkit-scrollbar { display: none; }
.achips .chip { padding: 6px 12px; font-size: 12.5px; }
body.sheet-peek .attach { display: none; }
.pics { display: grid; gap: 4px; margin: -4px -8px 8px; border-radius: 14px; overflow: hidden; }
.pics.n1 { grid-template-columns: 1fr; } .pics.n2, .pics.n4 { grid-template-columns: 1fr 1fr; } .pics.n3 { grid-template-columns: 1fr 1fr 1fr; }
.pics img { width: 100%; height: 100%; max-height: 120px; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; display: block; }
.pics.n1 img { aspect-ratio: 16 / 10; max-height: 170px; }
.msg.me .bub:has(.pics) { min-width: 200px; }
.imgview { position: relative; width: 100%; height: 100%; background: #000; display: grid; place-items: center; animation: fadeIn .25s; }
.imgview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.imgview button { position: absolute; top: calc(var(--top) + 12px); left: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 16px; z-index: 1; }
