:root {
  --blue: #1F3BE0;
  --blue-deep: #1830B8;
  --peach: #FFB59A;
  --peach-soft: #FFE6DA;
  --ink: #16181D;
  --muted: #5B5F69;
  --paper: #F6F3EC;
  --card: #FFFFFF;
  --line: #16181D;
  --stage: #FFE9DE;
  --head: 'Chivo', 'Arial Black', sans-serif;
  --body: 'Atkinson Hyperlegible', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font: 400 17px/1.5 var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-bottom: 2px solid var(--line); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand b { display: block; font: 900 24px/1 var(--head); color: var(--blue); letter-spacing: -0.01em; }
.brand small { display: block; font: 700 14px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.link-btn { background: none; border: 2px solid var(--line); border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 15px; }
.link-btn:hover { background: var(--ink); color: var(--paper); }

/* layout */
/* desktop: the form scrolls on the left, the 3D house stays whole on the right */
.layout { display: grid; grid-template-columns: minmax(360px, 460px) 1fr; height: calc(100vh - 82px); min-height: 620px; }
.panel { padding: 40px 36px 48px; border-right: 2px solid var(--line); overflow-y: auto; overscroll-behavior: contain; }
.eyebrow { margin: 0 0 10px; font: 700 14px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
h1 { font: 900 clamp(34px, 3.2vw, 46px)/1.04 var(--head); letter-spacing: -0.02em; margin: 0 0 14px; }
.lede { margin: 0 0 30px; color: var(--muted); }

/* steps */
.steps { display: grid; gap: 26px; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { display: flex; align-items: center; gap: 10px; font: 900 20px/1.2 var(--head); padding: 0; margin-bottom: 14px; }
.n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 900 15px/1 var(--head); flex: none; }

.unit-switch { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.unit-switch input, .types input { position: absolute; opacity: 0; pointer-events: none; }
.unit-switch span { display: block; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer; }
.unit-switch input:checked + span { background: var(--blue); color: #fff; }
.unit-switch input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.size-row { display: flex; align-items: center; gap: 16px; }
input[type=range] { flex: 1; appearance: none; height: 10px; border-radius: 99px; background: linear-gradient(var(--blue), var(--blue)) 0/var(--fill, 30%) 100% no-repeat, #E3DED3; border: 2px solid var(--line); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--peach); border: 3px solid var(--ink); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--peach); border: 3px solid var(--ink); cursor: grab; }
.size-box { display: flex; align-items: baseline; gap: 6px; border: 2px solid var(--line); border-radius: 12px; padding: 6px 12px; background: var(--card); }
.size-box input { width: 70px; border: 0; background: none; font: 900 22px/1 var(--head); text-align: right; -moz-appearance: textfield; }
.size-box input::-webkit-inner-spin-button { appearance: none; }
.size-box input:focus { outline: none; }
.size-box:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.size-box span { font-weight: 700; font-size: 15px; color: var(--muted); }

.counters { display: grid; gap: 10px; }
.counter { display: grid; grid-template-columns: 1fr 44px 56px 44px; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; }
.c-label { font-weight: 700; }
.counter button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); font: 900 22px/1 var(--head); display: grid; place-items: center; }
.counter button:hover:not(:disabled) { background: var(--peach); }
.counter button:disabled { opacity: .3; cursor: default; }
.counter output { text-align: center; font: 900 26px/1 var(--head); }
.counter.bump output { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.35); color: var(--blue); } }

.types { display: grid; gap: 10px; }
.types label { display: grid; grid-template-columns: 26px 1fr auto; gap: 14px; align-items: center; border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card); cursor: pointer; transition: background .15s; }
.types label:hover { background: var(--peach-soft); }
.types .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.types .dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: transparent; }
.types input:checked + .dot::after { background: var(--blue); }
.types label:has(input:checked) { background: var(--blue); color: #fff; border-color: var(--blue); }
.types label:has(input:checked) .dot { border-color: #fff; }
.types label:has(input:checked) .dot::after { background: var(--peach); }
.types label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.types b { display: block; font: 900 18px/1.2 var(--head); }
.types small { display: block; font-size: 15px; opacity: .8; }
.types .from { font: 900 16px/1 var(--head); white-space: nowrap; }

/* stage and ticket */
.stage-wrap { position: relative; background: var(--stage); overflow: hidden; }
.stage { position: relative; height: 100%; }
.recenter { position: absolute; z-index: 2; left: 20px; bottom: 20px; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px; }
.recenter:hover { background: var(--peach); }
.stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.stage canvas:focus { outline: none; }
.stage canvas:active { cursor: grabbing; }
.drag-hint { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); margin: 0; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.75); font-size: 14px; font-weight: 700; pointer-events: none; transition: opacity .6s; }
.drag-hint.gone { opacity: 0; }
.no-webgl { display: grid; place-items: center; height: 100%; padding: 30px; text-align: center; color: var(--muted); }

.ticket { position: absolute; z-index: 2; right: 28px; bottom: 28px; width: 350px; background: var(--blue); color: #fff; border-radius: 20px; padding: 22px 22px 18px; border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--ink); }
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.t-label { white-space: nowrap; font: 700 14px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--peach); }
.t-time { font-size: 14px; font-weight: 700; text-align: right; }
.t-price { font: 900 64px/1 var(--head); letter-spacing: -0.02em; margin: 12px 0 16px; font-variant-numeric: tabular-nums; }
.t-lines { list-style: none; padding: 12px 0 0; margin: 0 0 16px; font-size: 15px; border-top: 3px dotted rgba(255,255,255,.45); }
.t-lines li { display: flex; justify-content: space-between; padding: 3px 0; }
.t-lines li span:last-child { font-family: var(--head); font-weight: 700; font-variant-numeric: tabular-nums; }
.book-btn { display: block; width: 100%; padding: 16px 20px; border-radius: 14px; border: 2px solid var(--ink); background: var(--peach); color: var(--ink); font: 900 20px/1 var(--head); box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.book-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.book-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.book-btn:disabled { opacity: .6; cursor: progress; }
.t-note { margin: 10px 0 0; font-size: 14px; text-align: center; opacity: .85; }
.t-note.dark { color: var(--muted); opacity: 1; }

.mobile-bar { display: none; }
.foot { border-top: 2px solid var(--line); padding: 22px 32px; font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot p { margin: 0; }
.foot a { color: var(--blue); font-weight: 700; }

/* booking dialog */
dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 2px solid var(--line); border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
dialog::backdrop { background: rgba(22, 24, 29, .55); }
dialog form { position: relative; }
.bk-body, .bk-done { padding: 30px 30px 26px; }
.close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font: 900 22px/1 var(--head); }
h2 { font: 900 32px/1.05 var(--head); margin: 0 0 8px; letter-spacing: -0.01em; }
.bk-summary { font-family: var(--head); margin: 0 0 22px; display: inline-block; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.bk-sec { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.bk-sec legend { font-size: 18px; }
.bk-sec label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.bk-sec label em { font-weight: 400; color: var(--muted); }
.bk-sec input:not([type=radio]), .bk-sec select, .bk-sec textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-size: 16px; font-weight: 400; }
.bk-sec input[aria-invalid=true], .bk-sec textarea[aria-invalid=true] { border-color: #C8321E; background: #FFF4F1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* booking calendar: month grid on the left, start times on the right */
.picker { display: grid; grid-template-columns: 1fr 190px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.cal { padding: 16px 16px 12px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head b { font: 900 18px/1 var(--head); }
.cal-head b span { color: var(--muted); font-weight: 700; }
.cal-nav { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; font: 900 22px/1 var(--head); color: var(--ink); }
.cal-nav:hover:not(:disabled) { background: var(--paper); }
.cal-nav:disabled { opacity: .25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.cal-day { aspect-ratio: 1; border: 0; border-radius: 10px; background: #E9E6F7; font: 700 16px/1 var(--head); color: var(--ink); position: relative; }
.cal-day:hover:not(:disabled) { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-day:disabled { background: none; color: #A3A6AE; font-weight: 400; cursor: default; }
.cal-day.today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; }
.cal-day[aria-pressed=true] { background: var(--blue); color: #fff; }
.times { border-left: 2px solid var(--line); padding: 16px 14px; display: flex; flex-direction: column; min-height: 0; }
.times-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.times-head b { font: 900 17px/1 var(--head); white-space: nowrap; }
.times-head b span { font-weight: 700; color: var(--muted); }
.fmt { display: inline-flex; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.fmt button { border: 0; background: none; padding: 4px 7px; font-size: 14px; font-weight: 700; }
.fmt button[aria-pressed=true] { background: var(--ink); color: #fff; }
.times-list { display: grid; gap: 8px; align-content: start; overflow-y: auto; max-height: 410px; padding: 2px; }
.times-empty { margin: 0; color: var(--muted); font-size: 15px; }
.time { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); font: 700 16px/1 var(--head); font-variant-numeric: tabular-nums; }
.time i { width: 8px; height: 8px; border-radius: 50%; background: #2DBE7E; }
.time:hover { background: var(--peach-soft); }
.time[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; }
.time[aria-pressed=true] i { background: var(--peach); }
.invalid-group { border-color: #C8321E; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #FFF4F1; border: 2px solid #C8321E; color: #8E1F10; font-weight: 700; font-size: 15px; }
.book-btn.wide { margin-top: 4px; }
.bk-done { text-align: center; padding: 50px 30px 34px; }
.bk-done h2 { margin-top: 16px; }
.bk-done p { color: var(--muted); margin: 0 auto 24px; max-width: 420px; }
.bk-done .book-btn { max-width: 280px; margin: 0 auto; }

/* phones and small tablets */
@media (max-width: 900px) {
  .top { padding: 12px 16px; }
  .brand b { font-size: 20px; }
  .brand small { font-size: 14px; letter-spacing: .06em; }
  .brand svg { width: 38px; height: 38px; }
  .link-btn { padding: 8px 12px; font-size: 14px; }
  .layout { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .stage-wrap { order: -1; border-bottom: 2px solid var(--line); }
  .stage { position: relative; height: 46vh; min-height: 300px; }
  .ticket { display: none; }
  .panel { border-right: 0; padding: 26px 16px 120px; overflow: visible; }
  .recenter { left: auto; right: 12px; bottom: 12px; padding: 7px 12px; }
  .drag-hint .long { display: none; }
  .drag-hint { top: auto; bottom: 12px; left: 12px; transform: none; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--blue); color: #fff; border-top: 2px solid var(--line); }
  .mobile-bar small { display: block; font-size: 14px; color: var(--peach); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
  .mobile-bar b { font: 900 32px/1 var(--head); }
  .mobile-bar button { border: 2px solid var(--ink); border-radius: 12px; background: var(--peach); color: var(--ink); padding: 14px 16px; font: 900 17px/1 var(--head); }
  .foot { padding: 18px 16px 110px; }
  .bk-body, .bk-done { padding: 24px 16px 20px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .picker { grid-template-columns: 1fr; }
  .times { border-left: 0; border-top: 2px solid var(--line); }
  .times-list { grid-template-columns: repeat(3, 1fr); max-height: none; }
  h2 { font-size: 27px; padding-right: 40px; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .brand small { font-size: 14px; letter-spacing: .02em; text-transform: none; font-weight: 700; }
  .link-btn { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
