:root {
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
  }

  html { -webkit-text-size-adjust: 100%; }

  html, body {

    overscroll-behavior-y: none;
  }

  body {
    font-feature-settings: 'cv02','cv03','cv04';

    -webkit-tap-highlight-color: transparent;

    overflow-x: hidden;
  }

  button, a, label, select, input, textarea, summary, [role="button"] {
    touch-action: manipulation;
  }

  @media (max-width: 767px) {
    input, select, textarea, .field {
      font-size: 16px !important;
      line-height: 1.35;
    }
  }

  @media (max-width: 767px) {
    .tap { min-height: 44px; }
  }

  .scroll-y { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .scroll-x { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

  .modal-panel {
    max-height: 92vh;
    max-height: 92dvh;
    padding-bottom: var(--safe-b);
  }

  #toastHost { bottom: calc(1.25rem + var(--safe-b)); }

  .burger { position: relative; display: block; width: 20px; height: 14px; }
  .burger i {
    position: absolute; left: 0; display: block; height: 2px; width: 100%;
    background: currentColor; border-radius: 2px;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1),
                opacity .18s ease,
                width .32s cubic-bezier(.4, 0, .2, 1);
  }
  .burger i:nth-child(1) { top: 0; }
  .burger i:nth-child(2) { top: 6px; }
  .burger i:nth-child(3) { top: 12px; }
  [aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  [aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; width: 0; }
  [aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .mobile-nav {
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .mobile-nav.is-open { opacity: 1; visibility: visible; }

  .mobile-nav .m-link,
  .mobile-nav .m-foot {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s cubic-bezier(.32, .72, 0, 1),
                transform .45s cubic-bezier(.32, .72, 0, 1);
  }
  .mobile-nav .m-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
    color: #111111;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.3;
  }
  .mobile-nav .m-link-arrow {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: #6B7280;
    opacity: .5;
    transition: transform .2s ease, color .2s ease;
  }
  .mobile-nav .m-link:hover .m-link-arrow,
  .mobile-nav .m-link:focus-visible .m-link-arrow {
    color: #E63946;
    transform: translateX(3px);
  }
  .mobile-nav.is-open .m-link,
  .mobile-nav.is-open .m-foot { opacity: 1; transform: none; }
  .mobile-nav.is-open .m-link:nth-child(1) { transition-delay: .06s; }
  .mobile-nav.is-open .m-link:nth-child(2) { transition-delay: .12s; }
  .mobile-nav.is-open .m-link:nth-child(3) { transition-delay: .18s; }
  .mobile-nav.is-open .m-link:nth-child(4) { transition-delay: .24s; }
  .mobile-nav.is-open .m-foot { transition-delay: .3s; }

  .m-foot { padding-bottom: calc(1.25rem + var(--safe-b)); }

  @media (prefers-reduced-motion: reduce) {
    .burger i,
    .mobile-nav,
    .mobile-nav .m-link,
    .mobile-nav .m-foot,
    .mobile-nav .m-link-arrow { transition-duration: .01ms; }
  }

  @media (orientation: landscape) {
    .modal-panel { padding-left: var(--safe-l); padding-right: var(--safe-r); }
  }

  .brand-script {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    letter-spacing: -.01em;
  }

  .no-scrollbar::-webkit-scrollbar { display: none; }
  .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

  .review-card {
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  }
  .review-card:hover {
    border-color: rgba(0,0,0,.1);
    box-shadow: 0 10px 24px -16px rgba(17,17,17,.18);
    transform: translateY(-3px);
  }
  .review-avatar {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: #E63946;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
  }
  .review-avatar-warm,
  .review-avatar-cool { background: #E63946; }
  .review-name { color: #111827; font-size: 1rem; font-weight: 700; line-height: 1.35; }
  .review-meta {
    color: #9CA3AF;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
  }
  .review-verified {
    color: #527064;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 0;
    text-transform: none;
  }
  .review-stars { display: inline-flex; gap: 1px; color: #F59E0B; }
  .review-stars svg { width: 12px; height: 12px; fill: currentColor; }
  .review-quote {
    color: #374151;
    font-size: .875rem;
    line-height: 1.5;
  }
  .review-trust {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    color: #92400E;
  }
  .review-trust > span:last-child > span { color: #92400E; opacity: .8; }
  @media (max-width: 639px) {
    .reviews-rail {
      display: flex;
      margin-right: -1rem;
      overflow-x: auto;
      padding-right: 1rem;
      padding-bottom: .5rem;
      scroll-snap-type: x mandatory;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .reviews-rail::-webkit-scrollbar { display: none; }
    .reviews-rail > .review-card {
      width: min(86vw, 21rem);
      flex: 0 0 min(86vw, 21rem);
      scroll-snap-align: start;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .review-card { transition: none; }
  }

  body.is-locked {
    position: fixed;
    inset: 0;
    width: 100%;
    overflow: hidden;
  }

  .rail {
    display: flex; gap: .5rem; overflow-x: auto; scroll-behavior: smooth;
    padding-block: .125rem;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .rail > * { scroll-snap-align: start; }
  @media (min-width: 768px) {
    .rail { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  }

  .sheet-panel {
    max-height: min(88vh, 88dvh);
    padding-bottom: calc(1.25rem + var(--safe-b));
    animation: sheetUp .28s cubic-bezier(.32, .72, 0, 1) both;
  }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
  @media (min-width: 640px) {
    .sheet-panel { animation: fadeUp .25s ease-out both; padding-bottom: 1.25rem; }
  }

  #spinStage img { -webkit-user-drag: none; user-select: none; }
  #spinStage.is-dragging { cursor: grabbing; }

  .flabel {
    display: block; margin-bottom: .35rem;
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: #6B7280;
  }
  .field {
    width: 100%; border: 1px solid #E5E7EB; border-radius: .75rem;
    background: #fff; padding: .7rem .85rem;
    font: inherit; font-size: .875rem; color: #111111;
  }
  .field:focus { outline: none; border-color: #E63946; box-shadow: 0 0 0 3px rgba(230,57,70,.15); }
  .field[aria-invalid="true"] { border-color: #E63946; background: #FDECEE; }
  .field::placeholder { color: #9CA3AF; }
  .ferror { display: none; margin-top: .3rem; font-size: 11px; font-weight: 600; color: #E63946; }
  .ferror.is-shown { display: block; }

  .seg { display: inline-flex; width: 100%; gap: .5rem; }
  .seg input { position: absolute; opacity: 0; pointer-events: none; }
  .seg label {
    flex: 1; text-align: center; cursor: pointer;
    border: 1px solid #E5E7EB; border-radius: .75rem; background: #fff;
    padding: .6rem .5rem; font-size: .8125rem; font-weight: 600; color: #4B5563;
    transition: all .15s ease;
  }
  .seg label:hover { border-color: #111111; color: #111111; }
  .seg input:checked + label { background: #E63946; border-color: #E63946; color: #fff; }
  .seg input:focus-visible + label { box-shadow: 0 0 0 3px rgba(230,57,70,.35); }

  .sid-host { min-height: 320px; }
  .sid-host smart-camera-web,
  .sid-host smileid-consent { display: block; width: 100%; }
  .sid-host video, .sid-host canvas { max-width: 100%; border-radius: .75rem; }

  @keyframes wzIn  { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
  @keyframes wzOut { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
  .wz-panel.is-forward { animation: wzIn  .28s cubic-bezier(.22,.61,.36,1) both; }
  .wz-panel.is-back    { animation: wzOut .28s cubic-bezier(.22,.61,.36,1) both; }

  .seg-3 label { padding-left: .25rem; padding-right: .25rem; font-size: .75rem; }

  .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
  .cal-dow {
    text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: #9CA3AF; padding-bottom: .4rem;
  }
  .cal-day {
    position: relative; aspect-ratio: 1 / 1; width: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: .8125rem; font-weight: 600; color: #111111;
    border: 1px solid transparent; border-radius: .5rem;
    background: transparent; cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .cal-day:hover:not(:disabled) { background: #F1F3F5; }
  .cal-day:focus-visible { outline: none; box-shadow: 0 0 0 2px #E63946; }
  .cal-day:disabled { color: #D1D5DB; cursor: not-allowed; }

  .cal-day.is-taken {
    color: #9CA3AF;
    text-decoration: line-through;
    background: repeating-linear-gradient(
      -45deg, transparent, transparent 3px, #F1F3F5 3px, #F1F3F5 6px);
  }

  .cal-day.is-toosoon { color: #D1D5DB; background: transparent; text-decoration: none; }
  .cal-day.is-today { border-color: #111111; }

  .cal-day.in-range { background: rgba(230,57,70,.12); border-radius: 0; }

  .cal-day.is-edge { background: #E63946; color: #fff; }
  .cal-day.is-edge:hover { background: #C42B37; }
  .cal-day.edge-start.has-range { border-radius: .5rem 0 0 .5rem; }
  .cal-day.edge-end.has-range   { border-radius: 0 .5rem .5rem 0; }
  .cal-day.is-empty { visibility: hidden; cursor: default; }

  @keyframes shimmer { 100% { transform: translateX(100%); } }
  .skeleton { position: relative; overflow: hidden; background: #EEF0F2; }
  .skeleton::after {
    content: ''; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
    animation: shimmer 1.4s infinite;
  }

  #brandAnchor {
    height: 38px; aspect-ratio: 1010 / 679;
  }
  @media (min-width: 640px) { #brandAnchor { height: 44px; } }

  #heroBrand {
    width: clamp(152px, 40vw, 300px); aspect-ratio: 1010 / 679;
  }

  .footer-brand-logo {
    display: block;
    width: 72px;
    height: auto;
    object-fit: contain;
  }

  #brandFloat {
    position: fixed; top: 0; left: 0; z-index: 45;
    pointer-events: none; transform-origin: left top;
    will-change: transform; backface-visibility: hidden;
  }
  #brandFloat.is-measuring { visibility: hidden; }
  #brandFloat img { display: block; width: 100%; height: 100%; object-fit: contain; }

  @media (prefers-reduced-motion: reduce) {
    #heroBrand { display: none; }
    #brandFloat { will-change: auto; }
  }

  #conciergeBtn { bottom: calc(1.25rem + var(--safe-b)); right: calc(1.25rem + var(--safe-r)); }
  #conciergeBtn.is-hidden,
  body.is-locked #conciergeBtn { opacity: 0; visibility: hidden; transform: scale(.85); pointer-events: none; }

  .cx-panel {
    display: flex; flex-direction: column;
    height: 100vh; height: 100dvh;
    padding-bottom: var(--safe-b);
    animation: sheetUp .28s cubic-bezier(.22,.61,.36,1) both;
  }
  @media (min-width: 640px) {
    .cx-panel {
      height: min(34rem, calc(100dvh - 7rem));
      border-radius: 1.25rem;
      animation: fadeUp .24s ease-out both;
    }
  }

  .cx-bubble { max-width: 88%; border-radius: 1rem; padding: .6rem .85rem; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
  .cx-bubble.is-them { background: #F1F3F5; color: #111111; border-bottom-left-radius: .3rem; }
  .cx-bubble.is-me { background: #111111; color: #fff; border-bottom-right-radius: .3rem; }

  @keyframes cxDot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
  .cx-typing i { display: block; width: 6px; height: 6px; border-radius: 9999px; background: #6B7280; animation: cxDot 1.2s infinite; }
  .cx-typing i:nth-child(2) { animation-delay: .18s; }
  .cx-typing i:nth-child(3) { animation-delay: .36s; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  }
