@font-face{font-family:Inter;src:url('/assets/fonts/inter-latin.woff2') format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:Inter;src:url('/assets/fonts/inter-latin-ext.woff2') format('woff2');font-weight:100 900;font-display:swap;unicode-range:U+0100-02BA,U+1E00-1EFF}
@font-face{font-family:Syne;src:url('/assets/fonts/syne-latin.woff2') format('woff2');font-weight:400 800;font-display:swap}

:root{
  color-scheme:light;
  --page:#f6f8fb;--panel:#fff;--line:#dbe3ed;--control:#bdcbdc;--ink:#18304b;--muted:#586b81;
  --blue:#1962c7;--blue-dark:#124d9f;--danger:#b3261e;
  --floor:#07091e;--slab:#10142e;--bay:#171c38;--bay-line:#2a3358;--block:#1d2444;--wall:#3a4468;--wall-light:#4a557c;--map-text:#aab4d2;
  --cyan:#23b9d6;--gold:#f5b83d;
  --header:118px;--panel-width:380px;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--panel);font-synthesis:none
}
*{box-sizing:border-box}
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
body{margin:0;font-size:14px;line-height:1.4}
h1,h2,h3,p,dl,dd{margin:0}
button,input{font:inherit;color:inherit}
button,a,input{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{cursor:pointer}
a{color:var(--blue);text-underline-offset:3px}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.parking-spot:focus-visible,.map-button:focus-visible{outline-color:#fff}
[hidden]{display:none!important}
.skip-link{position:fixed;top:-100px;left:16px;padding:12px;background:#fff;z-index:100;border:1px solid var(--blue);border-radius:6px}
.skip-link:focus{top:8px}

.app{position:fixed;inset:0 0 auto;height:var(--app-height,100dvh);display:flex;flex-direction:column;overflow:hidden;background:var(--floor)}

.top-bar{flex:none;height:var(--header);padding:10px 16px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'date brand' 'tabs tabs';align-items:center;gap:8px 12px;background:var(--panel);border-bottom:1px solid var(--line)}
.date-heading{grid-area:date;min-width:0}
#date-title{font:700 21px/1.15 Syne,Inter,sans-serif;letter-spacing:-.01em;white-space:nowrap}
#date-sub{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-block{grid-area:brand;justify-self:end;display:flex;align-items:center;gap:12px}
.brand,.brand img{display:block}
#page-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.map-stage{flex:1;min-height:0;position:relative}
.garage-map{position:absolute;inset:0;overflow:hidden;overflow:clip;touch-action:none;perspective:1100px;perspective-origin:50% 45%;cursor:grab;background:var(--floor)}
.garage-map.is-dragging{cursor:grabbing}
.plane{position:absolute;left:0;top:0;width:1100px;height:1050px;opacity:0;visibility:hidden;transition:transform .6s cubic-bezier(.2,.8,.2,1),transform-origin .6s cubic-bezier(.2,.8,.2,1),opacity .25s,visibility .25s}
.plane.is-active{opacity:1;visibility:visible}
.is-dragging .plane{transition:none}
.plane svg{position:absolute;left:0;top:0;pointer-events:none}

.map-shell{fill:var(--slab);stroke:var(--wall-light);stroke-width:3}
.map-ramp,.map-landmark{fill:var(--block);stroke:var(--wall);stroke-width:1.5}
.map-divider{fill:none;stroke:var(--wall);stroke-width:3}
.map-aisle{fill:none;stroke:var(--wall-light);stroke-width:2;stroke-dasharray:8 10}
.map-direction{fill:none;stroke:#7a86ad;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.map-bay{fill:var(--bay);stroke:var(--bay-line);stroke-width:1}
.map-label{fill:var(--map-text);text-anchor:middle;letter-spacing:.04em;font-family:Inter,sans-serif}
.map-route{fill:none;stroke:var(--gold);stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1}
.map-route.is-drawn{stroke-dashoffset:0;transition:stroke-dashoffset .9s ease-out .25s}

.parking-spot{position:absolute;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border-radius:4px;border:1.5px solid var(--spot-border);background:var(--spot-bg);color:var(--spot-ink);font-family:inherit;overflow:hidden}
.parking-spot,.parking-spot[data-state=free]{--spot-bg:#123a5c;--spot-border:var(--cyan);--spot-ink:#e8fbff;--spot-sub:#a8e6f3}
.parking-spot[data-state=selected]{--spot-bg:var(--cyan);--spot-border:#e8fbff;--spot-ink:var(--floor);--spot-sub:var(--floor)}
.parking-spot[data-state=mine]{--spot-bg:var(--gold);--spot-border:#ffe2a6;--spot-ink:var(--floor);--spot-sub:var(--floor)}
.parking-spot[data-state=reserved]{--spot-bg:#232a4d;--spot-border:#232a4d;--spot-ink:#98a3c2;--spot-sub:#b4bdd6}
.parking-spot[data-state=reserved][aria-pressed=true]{--spot-bg:#632533;--spot-border:#ff7685;--spot-ink:#fff4f5;--spot-sub:#ffd7dc}
.parking-spot[data-state=closed]{--spot-bg:var(--bay);--spot-border:var(--wall);--spot-ink:#98a3c2;--spot-sub:#98a3c2}
.spot-number{font:700 var(--spot-number)/1 Syne,Inter,sans-serif}
.spot-state{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--spot-label);font-weight:500;line-height:1.1;color:var(--spot-sub)}

.map-note{position:absolute;left:12px;right:12px;top:10px;color:var(--map-text);font-size:12px;pointer-events:none}
.map-controls{position:absolute;left:12px;bottom:12px;display:flex;align-items:flex-end;gap:8px}
.garage-tabs{grid-area:tabs;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.garage-tab{height:48px;padding:0 12px;display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:10px;color:var(--ink);text-align:left}
.garage-tab[aria-pressed=true]{background:var(--blue);border-color:var(--blue);color:#fff}
.garage-floor{flex:none;font:700 20px/1 Syne,Inter,sans-serif}
.garage-text{min-width:0;display:flex;flex-direction:column}
.garage-name{font-size:14px;font-weight:600;line-height:1.2}
.garage-free{font-size:12px;line-height:1.25;color:var(--muted);white-space:nowrap}
.garage-tab[aria-pressed=true] .garage-free{color:#fff}
.map-button{height:50px;padding:0 12px;background:#fff;border:0;border-radius:11px;box-shadow:0 1px 6px rgba(7,9,30,.45);color:var(--blue-dark);font-size:13px;font-weight:500;white-space:nowrap}

.day-dock{flex:none;padding:10px 0 calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;background:var(--panel);border-top:1px solid var(--line)}
.day-notice{padding:0 16px;display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:500}
.date-strip{display:flex;gap:8px;padding:0 16px;overflow-x:auto;scroll-snap-type:x proximity;scroll-padding-inline:16px;scrollbar-width:none}
.date-strip::-webkit-scrollbar{display:none}
.day-button{flex:0 0 58px;height:78px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;scroll-snap-align:start;background:#fff;border:1px solid var(--line);border-radius:10px;color:var(--ink)}
.day-button.weekend{background:var(--page);color:var(--muted)}
.day-button[aria-pressed=true]{background:var(--blue);border-color:var(--blue);color:#fff}
.day-name{font-size:12px;font-weight:500}
.day-number{font:700 20px/1 Syne,Inter,sans-serif}
.day-free{min-height:12px;font-size:12px;line-height:1;color:var(--blue-dark)}
.day-button.is-full:not([aria-pressed=true]){background:var(--page);color:var(--muted)}
.day-button.is-full:not([aria-pressed=true]) .day-free{color:var(--muted)}
.day-button[aria-pressed=true] .day-free{color:#fff}

.button{min-height:50px;padding:0 16px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:10px;font-size:15px;font-weight:600;text-decoration:none;text-align:center}
.button.primary{background:var(--blue);color:#fff}
.button.secondary{background:#fff;border-color:var(--control);color:var(--blue-dark)}
.button.light{min-height:48px;padding:0 28px;background:#fff;color:var(--floor)}
.button:disabled{opacity:.6;cursor:default}
.icon-button{flex:none;width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:transparent;border:0;color:var(--muted)}
.text-button{flex:none;height:44px;padding:0 10px;background:transparent;border:0;color:var(--blue-dark);font-weight:500}

.sheet{position:absolute;left:0;right:0;bottom:0;max-height:100%;overflow-y:auto;overscroll-behavior:contain;background:var(--panel);border-radius:16px 16px 0 0;box-shadow:0 -6px 24px rgba(7,9,30,.35);transform:translateY(105%);visibility:hidden;transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility .28s}
.sheet.is-open{transform:translateY(0);visibility:visible}
.sheet:focus{outline:0}
#booking-form{padding:16px 16px calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px}
.sheet-head{display:flex;align-items:center;gap:12px}
.sheet-number{flex:none;width:60px;height:60px;display:flex;align-items:center;justify-content:center;background:var(--blue);border-radius:10px;color:#fff;font:700 28px/1 Syne,Inter,sans-serif}
.sheet-number.is-muted{background:var(--muted)}
.sheet-title{flex:1;min-width:0}
.sheet-title h2{font-size:17px;font-weight:600}
.sheet-title p{color:var(--muted)}
.identity{display:flex;align-items:center;gap:12px;padding:10px 6px 10px 14px;background:var(--page);border-radius:10px}
.identity>div{flex:1;min-width:0;display:flex;flex-direction:column}
.identity-label,.identity-email{font-size:13px;color:var(--muted)}
.identity-email{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.identity strong{font-size:15px;font-weight:600}
.fields{display:flex;flex-direction:column;gap:10px}
.name-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
label{display:block;margin-bottom:5px;font-size:13px;font-weight:500}
input{width:100%;height:48px;padding:0 12px;background:#fff;border:1px solid var(--control);border-radius:8px;font-size:16px}
.field-hint{font-size:13px;color:var(--muted)}
.final-notice{font-size:13px}
.email-note{font-size:12px;color:var(--muted);text-align:center}
.error-message{font-size:14px;font-weight:500;color:var(--danger)}
#sheet-action{flex:none;position:sticky;bottom:0}

.success-panel{position:absolute;inset:0;display:flex;flex-direction:column;overflow-y:auto;background:var(--panel)}
.ticket{flex:1 0 auto;padding:24px 20px 22px;display:flex;flex-direction:column;justify-content:flex-end;gap:10px;background:var(--blue);color:#fff}
.ticket h2{font-size:15px;font-weight:600}
.ticket-number{font:700 136px/.9 Syne,Inter,sans-serif;letter-spacing:-.02em}
.ticket-where{margin-top:6px;font-size:20px;font-weight:600}
.ticket-details{flex:none;padding:16px 20px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px}
.summary{display:flex;flex-direction:column;gap:6px}
.summary>div{display:flex;justify-content:space-between;gap:12px}
.summary dt{color:var(--muted)}
.summary dd{font-weight:500;text-align:right;overflow-wrap:anywhere}
.receipt-notice{font-size:13px;color:var(--muted)}
.ticket-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ticket-actions .button{padding:0 6px;font-size:14px}

.page-message{position:absolute;left:12px;right:12px;top:calc(var(--header) + 8px);padding:10px 12px;background:#fff;border-radius:8px;color:var(--danger);font-weight:500;box-shadow:0 1px 6px rgba(7,9,30,.45)}

dialog{border:0;padding:0}
#guide-dialog{width:100%;max-width:none;height:100%;max-height:none;margin:0;background:var(--floor);color:#eef1f8}
#guide-dialog[open]{display:flex;flex-direction:column}
#guide-dialog::backdrop{background:var(--floor)}
#guide-title{flex:none;padding:16px;font-size:17px;font-weight:600}
.guide-figure{flex:1;min-height:0;margin:0;display:flex;flex-direction:column;gap:12px}
.guide-image-frame{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;touch-action:pinch-zoom}
#guide-image{width:100%;height:100%;object-fit:contain}
#guide-image-status{padding:16px}
#guide-caption{flex:none;padding:0 16px;font-size:15px}
.guide-controls{flex:none;padding:12px 16px calc(18px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:8px}
.guide-controls .icon-button{color:#eef1f8}
#guide-count{min-width:36px;text-align:center;font-weight:600}
#guide-original{flex:1;padding-left:8px;color:#eef1f8}

@media(min-width:900px){
  :root{--header:62px}
  .top-bar{padding:0 24px;grid-template-columns:minmax(0,1fr) minmax(0,420px) minmax(0,1fr);grid-template-areas:'date tabs brand'}
  .garage-tab{height:44px}
  .day-button{flex:1 0 58px}
  .day-dock{position:relative;z-index:2}
  .sheet{left:auto;top:var(--header);bottom:var(--dock,103px);width:var(--panel-width);max-height:none;border-radius:0;box-shadow:none;border-left:1px solid var(--line);transform:translateX(105%)}
  .sheet.is-open{transform:translateX(0)}
  .sheet.is-compact{top:calc(var(--header) + 16px);right:16px;bottom:auto;border:1px solid var(--line);border-radius:14px;transform:translateX(calc(100% + 32px))}
  .sheet.is-compact.is-open{transform:translateX(0)}
  .day-notice{flex-direction:row;align-items:center;justify-content:center;gap:16px}
  .day-notice .button{min-height:44px}
  .success-panel{inset:var(--header) 0 var(--dock,103px) auto;width:var(--panel-width);box-shadow:none;border-left:1px solid var(--line)}
  .ticket-number{font-size:104px}
  #guide-dialog{width:min(920px,92vw);height:min(760px,90vh);margin:auto;border-radius:14px}
  #guide-dialog::backdrop{background:rgba(7,9,30,.7)}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
