/* «Карта цен всего мира» — full-screen map screen and the home banner globe (src/world-map.js).
   Coin tokens only (colours, spacing, radii); the map itself is an OpenFreeMap vector basemap. */
.am-screen{position:absolute;inset:0;z-index:30;overflow:hidden;background:radial-gradient(120% 80% at 50% 55%,#1d3a63 0%,#0e1f3a 45%,#060d1c 100%);font-family:'Euclid Circular A',sans-serif;color:var(--theme-text-primary)}
.am-screen .am-icon-btn{font:inherit;color:inherit;border:0;padding:0;cursor:pointer}
.am-screen .am-icon-btn{background:none}

/* Map */
.am-screen .am-map-wrap,.am-screen .am-map{position:absolute;inset:0}
.am-map{background:transparent;font-family:inherit}
.am-map .maplibregl-ctrl-attrib{font-size:9px;line-height:12px;background:color-mix(in srgb,var(--theme-bg-island) 85%,transparent);color:var(--theme-text-secondary)}
.am-map .maplibregl-ctrl-attrib a{color:inherit}
.am-map .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show){background:none}
.am-map .maplibregl-ctrl-attrib-button{background-color:var(--theme-bg-island);border-radius:var(--radius-rounding)}
.am-map .maplibregl-canvas{outline:none}
/* Top (Figma 08-Travel 14825:62672): a card with the route and trip details, then the filters. */
.am-top{position:absolute;left:0;right:0;top:0;z-index:600;display:flex;flex-direction:column;gap:var(--space-base-s);padding:34px var(--space-base-l) 0;pointer-events:none}
.am-top>*{pointer-events:auto}
.am-search{display:flex;align-items:center;gap:var(--space-base-l);padding:var(--space-base-m) var(--space-base-l);border-radius:24px;background:var(--theme-bg-island)}
.am-screen .am-icon-btn{width:24px;height:24px;flex:none;display:grid;place-items:center;position:relative}
.am-screen .am-icon-btn::before{content:'';position:absolute;inset:-10px} /* 44px tap area */
.am-chevron{display:block;width:24px;height:24px;background:var(--theme-icon-secondary);-webkit-mask:url(../assets/world/chevron.svg) center/24px 24px no-repeat;mask:url(../assets/world/chevron.svg) center/24px 24px no-repeat}
.am-search__text{min-width:0;display:flex;flex-direction:column;gap:4px}
.am-search__text p{margin:0;display:flex;align-items:center;gap:var(--space-base-m);min-width:0}
.am-search__route b{font-size:17px;line-height:22px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.am-search__dir{width:24px;height:24px;flex:none;background:var(--theme-icon-disabled);-webkit-mask:url(../assets/world/direction.svg) center/24px 24px no-repeat;mask:url(../assets/world/direction.svg) center/24px 24px no-repeat}
.am-search__sub{font-size:14px;line-height:18px;color:var(--theme-text-secondary);white-space:nowrap}
.am-filters{display:flex;align-items:center;gap:var(--space-base-s);margin:0 calc(-1 * var(--space-base-l));padding:0 var(--space-base-l);overflow-x:auto;scrollbar-width:none}
.am-filters::-webkit-scrollbar{display:none}
.am-filters>*{flex:none}
/* Neutral segmented control: tertiary track, white active segment with accent text and icon. */
.am-seg{display:flex;height:34px;padding:2px;border-radius:var(--radius-island);background:var(--theme-bg-tertiary)}
.av-app .am-seg__item,.am-seg__item{display:flex;align-items:center;gap:var(--space-base-xs);height:100%;padding:0 var(--space-base-l);border:0;border-radius:14px;background:transparent;font:inherit;font-size:14px;line-height:18px;color:var(--theme-text-secondary);cursor:pointer;white-space:nowrap;transition:background .2s,color .2s}
.av-app .am-seg__item.is-on,.am-seg__item.is-on{background:var(--theme-bg-island);color:var(--theme-text-accent)}
.am-seg__icon{display:block;width:16px;height:16px}
.am-seg__icon svg{display:block}

.am-origin{display:block;width:16px;height:16px;border-radius:var(--radius-rounding);background:var(--theme-bg-accent);border:3px solid var(--theme-bg-island);box-shadow:0 0 0 6px color-mix(in srgb,var(--theme-bg-accent) 25%,transparent)}

.am-empty{position:absolute;left:var(--space-base-l);right:var(--space-base-l);top:50%;z-index:600;margin:0;padding:var(--space-base-m);border-radius:var(--radius-island);background:var(--theme-bg-island);text-align:center;font-size:14px;line-height:18px;color:var(--theme-text-secondary)}

/* City sheet */
@keyframes am-up{from{transform:translateY(40px);opacity:0}}


/* Space behind the globe: the repeated star tile follows the globe (--sx / --sy); a few stars glint softly. */
.am-space{position:absolute;inset:0;pointer-events:none;background-repeat:repeat;background-size:512px 512px;background-position:var(--sx,0) var(--sy,0)}
.am-space__glint{position:absolute;width:2px;height:2px;border-radius:var(--radius-rounding);background:#fff;opacity:0;box-shadow:0 0 4px 1px rgba(255,255,255,.55);animation:am-glint 3s ease-in-out forwards}
@keyframes am-glint{0%,100%{opacity:0;transform:scale(.5)}45%{opacity:.8;transform:scale(1)}}

/* Pins (Figma 14826:63166 / 14826:63204). Always white: they sit on the colourful globe in both themes.
   Big: a 48px bubble (flag or photo, name), an accent chip with a white rim on its top right, a tail under the flag.
   Small: just the flag in a white circle. */
.am-pin{position:absolute;padding:0;border:0;background:none;cursor:pointer;font:inherit;text-align:left;color:var(--primitive-colors-primary-black8-main)}
.am-pin__face{display:block;width:32px;height:32px;flex:none}
.am-pin__face>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:var(--radius-rounding)}
.am-pin__flag{display:grid;place-items:center;width:100%;height:100%;font-size:24px;line-height:1}
.am-pin__flagimg{display:block;width:32px;height:32px}
/* Click squircle (the kit's flag mask) for the few flags taken from circle-flags. */
.am-pin__flagimg.is-alt,.am-sheet__flag.is-alt{clip-path:path('M32 16C32 22.1333 22.1333 32 16 32C9.86667 32 0 22.1333 0 16C0 9.86667 9.86667 0 16 0C22.1333 0 32 9.86667 32 16Z')}
.am-sheet__flag.is-alt{transform:scale(3);width:32px!important;height:32px!important}
.am-pin--big{display:flex;align-items:center;gap:var(--space-base-s);height:48px;padding:var(--space-base-s) var(--space-base-l) var(--space-base-s) var(--space-base-s);border-radius:var(--radius-continent);background:var(--primitive-colors-primary-white-main);filter:drop-shadow(0 8px 8px rgba(0,0,0,.08))}
.am-pin--big b{font-size:17px;line-height:22px;font-weight:500;white-space:nowrap}
.am-pin__tail{position:absolute;left:41px;top:48px;width:21.65px;height:8.4px;background:var(--primitive-colors-primary-white-main);-webkit-mask:url(../assets/world/pin-tail.svg) 0 0/100% 100% no-repeat;mask:url(../assets/world/pin-tail.svg) 0 0/100% 100% no-repeat}
/* Chip: Regular/8 (11/14), small enough not to cover the bubble. */
.am-pin__chip{position:absolute;right:1px;top:-13.5px;display:inline-flex;align-items:center;gap:4px;padding:2px var(--space-base-xs) 3px;border:2px solid var(--primitive-colors-primary-white-main);border-radius:var(--radius-chips);background:var(--theme-bg-accent);font-size:12.5px;line-height:16px;font-weight:400;color:var(--theme-text-always-white);white-space:nowrap}
.am-pin__chip svg,.am-pin__chip img{display:block;width:12px;height:12px}
.am-pin--small{padding:var(--space-base-s);border-radius:var(--radius-rounding);background:var(--primitive-colors-primary-white-main)}
.am-pin.is-on.am-pin--big{background:var(--theme-bg-accent);color:var(--theme-text-always-white)}
.am-pin.is-on .am-pin__tail{background:var(--theme-bg-accent)}

/* Light-blue glow around the globe (like Mapbox's atmosphere): a ring sized to the globe's radius (--glow-r, set from
   the zoom), fading out as the globe flattens into a map. */
.am-glow{position:absolute;left:50%;top:50%;width:calc(var(--glow-r) * 2.6);height:calc(var(--glow-r) * 2.6);translate:-50% -50%;border-radius:50%;pointer-events:none;opacity:var(--glow-o,1);
 background:radial-gradient(closest-side,rgba(170,215,255,0) 66%,rgba(200,230,255,.55) 74%,rgba(215,238,255,.95) 76.8%,rgba(140,195,255,.5) 82%,rgba(90,150,255,.15) 91%,rgba(90,150,255,0) 100%)}

/* The app's button reset (.av-app :where(button)) clears Coin chip fill, padding and colour: restore them for the map
   filters (island-coloured chips float over the map; the active one is accent). */
.av-app .am-filters .cds-chips--medium{height:34px;padding:0 var(--space-base-l);font-size:14px;line-height:18px}
.av-app .am-filters .cds-chips--ocean{background:var(--theme-bg-island);color:var(--theme-text-secondary)}
.av-app .am-filters .cds-chips--active{background:var(--component-chips-active-bg);color:var(--component-chips-active-text)}

/* City sheet: flag instead of a photo; weather glyph colours */
.am-sheet__photo--flag{display:grid;place-items:center;font-size:72px;line-height:1;background:var(--theme-bg-ocean)}
.am-sheet__photo .am-sheet__flag{width:96px;height:96px;object-fit:contain}
.am-pin__sky{display:inline-flex;align-items:center;gap:3px;font-weight:600}
.am-pin__sky.is-sun svg{color:var(--theme-text-attention)}
.am-pin__sky.is-cloud svg{color:var(--theme-icon-secondary)}
.am-pin__sky.is-snow svg{color:var(--theme-icon-accent)}

/* Loading: a plain spinner on the space background until the globe is drawn, then a short fade. */
.am-loading{position:absolute;inset:0;z-index:550;display:grid;place-items:center;background:radial-gradient(120% 80% at 50% 55%,#1d3a63 0%,#0e1f3a 45%,#060d1c 100%);transition:opacity .45s ease,visibility .45s}
.am-loading.is-done{opacity:0;visibility:hidden}
.am-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(255,255,255,.18);border-top-color:#fff;animation:am-spin .8s linear infinite}
@keyframes am-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.am-spinner{animation-duration:2.4s}}
/* Figma 14950:39771 — calendar on the right of the search card. */
.am-search__text{flex:1}
.am-calendar{display:block;width:24px;height:24px;background:var(--theme-icon-accent);-webkit-mask:url(../assets/world/calendar.svg) center/24px 24px no-repeat;mask:url(../assets/world/calendar.svg) center/24px 24px no-repeat}
/* City sheet (Figma 14953:40351). */
.am-sheet{position:absolute;left:0;right:0;bottom:0;z-index:700;display:flex;flex-direction:column;gap:var(--space-base-xl);padding:var(--space-base-l) 0 48px;border-radius:var(--radius-continent) var(--radius-continent) 24px 24px;background:var(--theme-bg-island);box-shadow:0 -8px 30px rgba(20,20,20,.18);overflow:clip;animation:am-up .28s cubic-bezier(.2,.8,.2,1)}
@media (prefers-reduced-motion:reduce){.am-sheet{animation:none}}
.am-sheet__body{display:flex;flex-direction:column;gap:var(--space-base-l);padding:0 var(--space-base-l)}
.am-sheet__photo{height:128px;border-radius:var(--radius-island);overflow:hidden}
.am-sheet__photo img{width:100%;height:100%;object-fit:cover;display:block}
.am-sheet__head{display:flex;flex-direction:column;gap:2px}
.am-sheet__head h2{margin:0;font-size:17px;line-height:22px;font-weight:600;color:var(--theme-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.am-sheet__head p{margin:0;font-size:14px;line-height:18px;color:var(--theme-text-secondary)}
.am-facts{display:flex;gap:var(--space-base-s);margin-top:calc(var(--space-base-m) - var(--space-base-l))}
.am-fact{display:flex;align-items:center;gap:var(--space-base-s);padding:var(--space-base-xs) var(--space-base-m);border-radius:12px;background:var(--theme-bg-ocean);flex:none;min-width:0}
.am-fact--wide{flex:1 1 0}
.am-fact--wide small{width:0;min-width:100%}
.am-fact__text{display:flex;flex-direction:column;min-width:0}
.am-fact small{font-size:11px;line-height:14px;color:var(--theme-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.am-fact b{font-size:14px;line-height:18px;font-weight:600;color:var(--theme-text-primary);white-space:nowrap}
.am-fact__icon{width:20px;height:20px;flex:none;background:var(--theme-icon-accent);-webkit-mask:var(--i) center/20px 20px no-repeat;mask:var(--i) center/20px 20px no-repeat}
.am-fact__icon--price{--i:url(../assets/world/sheet-price.svg)}
.am-fact__icon--sun{--i:url(../assets/world/sheet-sun.svg)}
.am-fact__icon--time{--i:url(../assets/world/sheet-time.svg)}
.am-sheet__about{margin:0;font-size:14px;line-height:18px;color:var(--theme-text-secondary)}
.am-sheet__actions{display:flex;gap:var(--space-base-s);padding:0 var(--space-base-l)}
.am-sheet__actions>*{flex:1;min-width:126px}
.am-sheet .cds-button{border-radius:var(--radius-island);height:48px}
/* Arrow between the cities: one way → one arrow, round trip → two (Figma 14953:40307). */
.am-search__dir.is-round{-webkit-mask-image:url(../assets/world/direction-round.svg);mask-image:url(../assets/world/direction-round.svg)}
.am-search__sub{gap:var(--space-base-s)}
.am-search__meta{display:inline-flex;align-items:center;gap:4px}
.am-search__ic{display:block;width:16px;height:16px;flex:none;color:var(--theme-text-secondary)}
.am-search__ic svg{display:block}
.am-search__ic--cal{background:var(--theme-text-secondary);-webkit-mask:url(../assets/world/sub-calendar.svg) center/16px 16px no-repeat;mask:url(../assets/world/sub-calendar.svg) center/16px 16px no-repeat}
