/* Aidem components. Colours, type and motion come from tokens.css only. */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/vendor/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/vendor/fonts/onest-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/vendor/fonts/onest-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/vendor/fonts/onest-latin.woff2) format("woff2"); 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; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap; src: url(/vendor/fonts/unbounded-latin-700.woff2) format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-16); line-height: var(--lh-body); color: var(--ink); background: var(--bg); caret-color: var(--sky); accent-color: var(--ink); }
::selection { background: var(--gold); color: var(--on-gold); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
button, a, [role="button"], .chip, .seg { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-xs { width: 15px; height: 15px; }

/* Type */
.title-1 { font-size: var(--fs-28); line-height: var(--lh-tight); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.title-2 { font-size: var(--fs-24); line-height: var(--lh-tight); font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.title-3 { font-size: var(--fs-17); line-height: var(--lh-snug); font-weight: 650; }
.lead { font-size: var(--fs-17); color: var(--ink-2); text-wrap: pretty; }
.prose { color: var(--ink-2); text-wrap: pretty; display: grid; gap: var(--s-3); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: var(--fs-15); color: var(--ink-3); }
.meta .icon { color: var(--ink-3); }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.fine { font-size: var(--fs-13); line-height: 1.45; color: var(--ink-3); text-wrap: pretty; }
.block-title { font-size: var(--fs-17); font-weight: 650; margin: var(--s-6) 0 var(--s-3); }
.link { color: var(--sky-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; display: inline-flex; align-items: center; gap: 4px; }
.link .icon { width: 14px; height: 14px; }

/* Buttons */
.btn { --btn-h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--btn-h); padding: 0 var(--s-5); border-radius: var(--r-md);
  font-weight: 600; font-size: var(--fs-16); text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-gold { background: var(--gold); color: var(--on-gold); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.btn-quiet { background: var(--surface-3); color: var(--ink); }
.btn-sm { --btn-h: 38px; padding: 0 var(--s-3); font-size: var(--fs-15); border-radius: var(--r-sm); }
.btn-xl { --btn-h: 58px; width: 100%; font-size: var(--fs-17); border-radius: var(--r-lg); }
.btn-block { width: 100%; margin-top: var(--s-3); }
.btn .icon { width: 20px; height: 20px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--r-pill); color: var(--ink); background: var(--surface-3); transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-on { color: var(--red); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--sky)); }
  .btn-gold:hover { background: var(--gold-strong); }
  .btn-quiet:hover, .icon-btn:hover { background: color-mix(in srgb, var(--surface-3) 80%, var(--ink) 8%); }
}

/* Segmented control (time) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: var(--r-md); }
.seg { min-height: 52px; border-radius: 12px; display: grid; place-content: center; justify-items: center; line-height: 1.05; font-weight: 650; font-size: var(--fs-20); color: var(--ink-2);
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast), transform var(--t-press) var(--ease-out); }
.seg small { font-size: var(--fs-12); font-weight: 500; color: var(--ink-3); }
.seg[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg[aria-checked="true"] small { color: var(--ink-2); }
.seg:active { transform: scale(.96); }
.segmented-sm .seg { min-height: 40px; font-size: var(--fs-15); font-weight: 600; }

/* Search field */
.search-field { position: relative; display: flex; align-items: center; background: var(--surface-3); border-radius: var(--r-md); min-height: 52px; padding-left: 44px; }
.search-field .search-icon { position: absolute; left: 14px; color: var(--ink-3); }
.field-input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; font-size: var(--fs-16); outline: none; color: var(--ink); padding-right: var(--s-3); }
.field-input::placeholder { color: var(--ink-3); opacity: 1; }
.field-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-field:focus-within { box-shadow: 0 0 0 2px var(--sky); background: var(--surface); }
.mic { position: relative; border-radius: 50%; background: var(--gold); color: var(--on-gold); }
.search-field .mic { margin-right: 6px; width: 42px; height: 42px; flex: none; }
.mic.is-listening { background: var(--red); color: #fff; }
.mic.is-listening::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--red); animation: mic-pulse 1.2s ease-out infinite; pointer-events: none; }
.mic.is-thinking { background: var(--surface); color: var(--gold-ink); }
.mic.is-thinking::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--gold); animation: spin .8s linear infinite; pointer-events: none; }
@keyframes mic-pulse { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mic.is-listening::after, .mic.is-thinking::after { animation: none; } }
.start-row { display: grid; gap: var(--s-2); }
.start-note { color: var(--ink-3); }
.start-note.is-warn { color: var(--amber); }
.start-private-note { margin: var(--s-2) 0 0; }
.start-icon.is-here { background: var(--sky); color: #fff; }
.start-locate { justify-self: start; }
.field { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
.field-label { font-size: var(--fs-13); color: var(--ink-3); font-weight: 500; }

/* Chips */
.chip-row { display: flex; gap: var(--s-2); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--s-4); margin-inline: calc(var(--s-4) * -1); padding: 2px var(--s-4);
  scrollbar-width: none; touch-action: pan-x; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent); }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 8px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-strong);
  font-size: var(--fs-15); font-weight: 550; color: var(--ink); scroll-snap-align: start; position: relative; transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-press) var(--ease-out); }
.chip:not(:has(img)) { padding-left: 14px; }
.chip::after { content: ""; position: absolute; inset: -3px 0; }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 650; }
.chip-art { width: 24px; height: 24px; }
.chip-toggle .status-dot { background: var(--green); }

/* Rows and lists */
.list { display: grid; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: 10px var(--s-4); text-align: left; width: 100%; color: var(--ink); position: relative; }
.list-row + .list-row::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; border-top: 1px solid var(--line); }
.list-row:active:not(.is-static) { background: var(--surface-2); }
.list-row.is-current strong { color: var(--sky-ink); }
.row-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); }
.row-icon.is-sky { background: var(--sky-soft); color: var(--sky-ink); }
.row-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-text small { font-size: var(--fs-13); color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-chevron { color: var(--ink-3); width: 18px; height: 18px; }
.row-check { color: var(--sky-ink); }
.row-button { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 60px; padding: 8px var(--s-3) 8px 8px; border-radius: var(--r-md); background: var(--surface); text-align: left; border: 1px solid var(--line); }
.row-button .row-text small { font-size: var(--fs-12); }
.start-icon { background: var(--ink); color: var(--gold); }
@media (hover: hover) and (pointer: fine) { .list-row:hover:not(.is-static), .row-button:hover { background: var(--surface-2); } }

/* Status (opening hours) */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); font-weight: 550; color: var(--ink-3); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status-good { color: var(--green); }
.status-bad { color: var(--red); }
.status-warn { color: var(--amber); }
.status-muted .status-dot { background: var(--ink-3); opacity: .5; }

/* Disclosure */
.disclosure { margin-top: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); }
.disclosure > summary { list-style: none; display: flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-4); cursor: pointer; font-weight: 600; font-size: var(--fs-15); color: var(--ink-2); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-2px); transition: transform var(--t-fast) var(--ease-out); }
.disclosure[open] > summary::after { transform: rotate(-135deg); }
.disclosure > :not(summary) { padding: 0 var(--s-4) var(--s-4); }
.disclosure .count { margin-left: 2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-3); display: inline-grid; place-items: center; font-size: var(--fs-12); }
.bullets { display: grid; gap: var(--s-2); }
.bullets li { position: relative; padding-left: 16px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }

/* Banner and cards */
.banner { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--sky-soft); color: var(--ink); font-size: var(--fs-15); }
.banner > span { flex: 1; }
.banner.is-good { background: var(--green-soft); }
.ai-card { border-radius: var(--r-lg); padding: 14px var(--s-4) 10px; background: linear-gradient(180deg, var(--gold-soft), color-mix(in srgb, var(--gold-soft) 35%, var(--surface))); display: grid; gap: var(--s-2); }
.ai-card.is-quiet { background: var(--surface-2); }
/* After a language switch the tip is asked for again; the old words stay faded until the new ones come. */
.ai-card.is-updating .ai-text { opacity: .45; transition: opacity var(--t-fast); }
.ai-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); font-weight: 700; color: var(--gold-ink); }
.ai-label .icon { width: 16px; height: 16px; }
.ai-text { font-size: var(--fs-17); line-height: 1.45; text-wrap: pretty; }

/* Time ring */
.ring-wrap { position: relative; flex: none; }
.time-ring .ring-track { stroke: var(--surface-3); }
.ring-there { stroke: var(--ring-there); }
.ring-visit { stroke: var(--ring-visit); }
.ring-back { stroke: var(--ring-back); }
.ring-reserve { stroke: var(--ring-reserve); }
.ring-progress { stroke: var(--ink); opacity: .9; }
.ring-head { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.ring-live .ring-seg { opacity: .35; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring-center strong { font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.02em; }
.ring-center span { font-size: var(--fs-13); color: var(--ink-3); }

/* Legend */
.legend { display: grid; gap: 6px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: var(--s-2); font-size: var(--fs-15); color: var(--ink-2); }
.legend strong { color: var(--ink); font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-there .legend-dot { background: var(--ring-there); }
.legend-visit .legend-dot { background: var(--ring-visit); }
.legend-back .legend-dot { background: var(--ring-back); }
.legend-reserve .legend-dot { background: var(--ring-reserve); }

/* Toasts */
.toasts { position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); transform: translateX(-50%); z-index: 60; display: grid; gap: var(--s-2); width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s-3); padding: 12px var(--s-4); border-radius: var(--r-md); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-2);
  font-size: var(--fs-15); font-weight: 550; opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); }
.toast.is-in { opacity: 1; transform: none; }
.toast > span { flex: 1; }
.toast-action { color: var(--gold); font-weight: 700; padding: 6px 4px; }

/* Skeleton */
.sk { display: block; background: linear-gradient(90deg, var(--surface-3) 0, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.ai-card:not(.is-open) .ai-text { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-more { justify-self: start; font-weight: 650; font-size: var(--fs-15); color: var(--gold-ink); padding: 4px 0; min-height: 32px; }
.row-text > .status { justify-self: start; font-size: var(--fs-13); }
