/* Calmia — the "Get the Calmia app" sheet (BOOKING_APP_INSTALL_R1; R1_1: the picture guide for iPhone / iPad — the step icons, the green "Open as Web App" switch, the
   tip, the Copy-the-link button, the ANIMATED ARROW pinned at the browser's Share / ••• / ⋮ button, the sheet docked to the top while that button is at the bottom; the
   admin too). One sheet for the website (tokens.css + site.css), the booking pages (book.css: its own tokens, dark too) and the admin (style.css). Every colour reads
   the page's token with a fallback, so the sheet looks right on all three. Above the website's sheets (41) / toast (50), the booking page's fixed footer (6) and the
   admin's popup (65). Mobile first; on a desk it sits as a centred card. No external request: the app icon is /static/icon-192.png. */
.ai-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(32, 58, 76, .45); opacity: 0; pointer-events: none; transition: opacity 260ms; }
.ai-scrim.on { opacity: 1; pointer-events: auto; }
.ai-scrim[hidden], .ai-sheet[hidden], .ai-pointer[hidden], .ai-status[hidden] { display: none; }
.ai-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 92vh; overflow: auto; -webkit-overflow-scrolling: touch; box-sizing: border-box;
  background: var(--card-2, var(--card, #fff)); color: var(--ink, #203a4c); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(32, 58, 76, .18);
  padding: 8px 20px calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform 420ms cubic-bezier(.2, .8, .2, 1);
  font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
.ai-sheet.on { transform: none; }
/* R1_1: docked to the TOP while the arrow points at a button at the bottom of the screen (Safari's Share / •••) */
.ai-sheet.ai-top { bottom: auto; top: 0; border-radius: 0 0 18px 18px; box-shadow: 0 6px 24px rgba(32, 58, 76, .18); padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 18px; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); transform: translateY(-100%); }
.ai-sheet.ai-top.on { transform: none; }
.ai-sheet.ai-top .ai-grab { display: none; }
.ai-sheet * { box-sizing: border-box; }
.ai-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong, var(--line, #c9d3d0)); margin: 4px auto 12px; }
.ai-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted, #5f7682); font-size: 26px; line-height: 1; cursor: pointer; }
.ai-sheet.ai-top .ai-x { top: calc(8px + env(safe-area-inset-top, 0px)); }
.ai-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 32px; }
.ai-app { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.ai-sheet h2 { margin: 2px 0 4px; font: 600 1.2rem/1.25 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--ink, #203a4c); }
.ai-lead { margin: 0; color: var(--muted, #5f7682); font-size: .95rem; }
.ai-steps { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; gap: 12px; }
.ai-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: .97rem; counter-increment: ai-step; }
.ai-steps b { font-weight: 650; color: var(--ink, #203a4c); }
.ai-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--card-2, #fff); border: 1px solid var(--line-strong, var(--line, #c9d3d0)); display: inline-grid; place-items: center; color: var(--brand, var(--primary, var(--accent, #3368a0))); position: relative; }
.ai-ic::after { content: counter(ai-step); position: absolute; left: -8px; top: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand, var(--primary, var(--accent, #3368a0))); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ai-svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ai-svg .ai-fill { fill: currentColor; stroke: none; }
.ai-svg .ai-toggle-track { fill: #34c759; stroke: #34c759; }
.ai-svg .ai-toggle-knob { fill: #fff; stroke: none; }
.ai-t { padding-top: 6px; }
.ai-tip { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--off, var(--soft, #eceee9)); color: var(--muted, #5f7682); font-size: .86rem; }
.ai-tip b { font-weight: 650; color: var(--ink, #203a4c); }
.ai-acts { display: flex; gap: 10px; margin-top: 16px; }
.ai-btn { flex: 1; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong, var(--line, #c9d3d0)); background: var(--card-2, var(--card, #fff)); color: var(--brand, var(--primary, var(--accent, #3368a0))); font: 600 1rem system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; cursor: pointer; }
.ai-btn.ai-primary { background: var(--brand, var(--primary, var(--accent, #3368a0))); border-color: var(--brand, var(--primary, var(--accent, #3368a0))); color: #fff; }
.ai-btn.ai-copy { display: block; width: 100%; margin-top: 14px; }
.ai-btn:disabled { opacity: .6; cursor: default; }
.ai-status { margin: 8px 0 0; font-size: .86rem; color: var(--muted, #5f7682); text-align: center; }
.ai-fine { margin: 12px 0 0; font-size: .8rem; color: var(--muted, #5f7682); }
/* R1_1: the animated arrow at the browser's own button (fixed, above the scrim); the label in the brand colour */
.ai-pointer { position: fixed; z-index: 72; display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; width: 112px; color: #fff; text-align: center; pointer-events: none; animation: ai-nudge-down 1.2s ease-in-out infinite; }
.ai-pointer .ai-svg { width: 46px; height: 46px; stroke-width: 2.6; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.ai-pointer-label { padding: 6px 12px; border-radius: 999px; background: var(--brand, var(--primary, var(--accent, #3368a0))); color: #fff; font: 600 14px/1.2 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.ai-pointer[data-at="bottom-center"] { left: calc(50% - 56px); bottom: max(4px, env(safe-area-inset-bottom, 0px)); }
.ai-pointer[data-at="bottom-right"] { right: max(4px, env(safe-area-inset-right, 0px)); bottom: max(4px, env(safe-area-inset-bottom, 0px)); }
.ai-pointer[data-at="top-right"] { right: max(4px, env(safe-area-inset-right, 0px)); top: max(4px, env(safe-area-inset-top, 0px)); flex-direction: column; animation-name: ai-nudge-up; }
.ai-pointer[data-at="top-right"] .ai-svg { transform: rotate(180deg); }
/* BOOKING_APP_POLISH_R1: Safari 27's ≡ sits inside the address bar, at about 29 % of the width (the back button left of it, the tabs button at the right) */
.ai-pointer[data-at="bottom-pill-left"] { left: calc(29% - 56px); bottom: max(4px, env(safe-area-inset-bottom, 0px)); }
/* BOOKING_APP_POLISH_R1: the compact Safari guide at the top — a small head, tight steps, one small line; Safari's own menu rises from the bottom without covering it */
.ai-sheet.ai-compact { padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; max-height: 50vh; max-height: 50dvh; }
.ai-sheet.ai-compact .ai-x { top: calc(4px + env(safe-area-inset-top, 0px)); right: 6px; width: 32px; height: 32px; font-size: 22px; }
.ai-sheet.ai-compact .ai-head { gap: 10px; align-items: center; padding-right: 30px; }
.ai-sheet.ai-compact .ai-app { width: 32px; height: 32px; border-radius: 8px; }
.ai-sheet.ai-compact h2 { margin: 0; font-size: 1rem; line-height: 1.2; }
.ai-sheet.ai-compact .ai-steps { margin: 10px 0 0; gap: 7px; }
.ai-sheet.ai-compact .ai-steps li { gap: 10px; font-size: .88rem; line-height: 1.3; }
.ai-sheet.ai-compact .ai-ic { width: 28px; height: 28px; border-radius: 8px; }
.ai-sheet.ai-compact .ai-ic::after { left: -6px; top: -6px; width: 15px; height: 15px; font-size: 9.5px; }
.ai-sheet.ai-compact .ai-svg { width: 18px; height: 18px; }
.ai-sheet.ai-compact .ai-t { padding-top: 5px; }
.ai-small { margin: 8px 0 0; font-size: .76rem; line-height: 1.3; color: var(--muted, #5f7682); }
@keyframes ai-nudge-down { 50% { transform: translateY(8px); } }
@keyframes ai-nudge-up { 50% { transform: translateY(-8px); } }
@media (min-width: 700px) {
  .ai-sheet, .ai-sheet.ai-top { left: 50%; right: auto; bottom: auto; top: 50%; width: min(460px, calc(100vw - 32px)); border-radius: 18px; padding: 10px 24px 22px; transform: translate(-50%, -50%) translateY(24px); opacity: 0; transition: transform 320ms cubic-bezier(.2, .8, .2, 1), opacity 320ms; }
  .ai-sheet.on, .ai-sheet.ai-top.on { transform: translate(-50%, -50%); opacity: 1; }
  .ai-sheet.ai-top .ai-x { top: 10px; }
  .ai-sheet.ai-compact { max-height: none; padding: 12px 18px 16px; }
  .ai-grab { display: none; }
  .ai-acts { justify-content: flex-end; }
  .ai-btn { flex: 0 0 auto; }
  .ai-btn.ai-copy { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .ai-sheet, .ai-scrim { transition: none; } .ai-pointer { animation: none; } }
