/* Reservation page: a booking sidebar beside the 3D map stage. */

.reserve-page { background: radial-gradient(ellipse at 30% 0%, #1d1610 0%, var(--ink) 60%); min-height: 100vh; }

.app {
  display: grid;
  grid-template-columns: minmax(360px, 430px) 1fr;     /* RTL: the sidebar sits on the right */
  height: 100vh; height: 100dvh;
  padding-top: var(--bar-h);
}

/* ---------------------------------------------------------------- sidebar */
.side {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 26px 40px;
  border-inline-end: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(21, 17, 13, 0.96), rgba(11, 9, 7, 0.96));
  scrollbar-width: thin; scrollbar-color: rgba(215, 180, 108, 0.3) transparent;
}
.side-head h1 { margin: 0; font-size: 28px; font-weight: 900; line-height: 1.4; }
.steps { list-style: none; margin: 12px 0 18px; padding: 0; display: flex; gap: 6px; }
.steps li {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--faint); padding-top: 8px; border-top: 2px solid rgba(255, 255, 255, 0.08);
  transition: color 0.3s, border-color 0.3s;
}
.steps b {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; background: rgba(255, 255, 255, 0.06); color: var(--muted);
}
.steps li.on { color: var(--cream); border-top-color: var(--gold); }
.steps li.on b { background: var(--gold); color: #1b1307; }
.steps li.past { color: var(--muted); border-top-color: var(--gold-lo); }

.label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.field { margin-bottom: 16px; }
.field.two { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.dates { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(215, 180, 108, 0.25) transparent; }
.chip {
  flex: none; scroll-snap-align: start;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 40px; min-width: 64px; padding: 6px 12px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.03);
  cursor: pointer; line-height: 1.35; font-size: 14px; color: var(--cream);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.chip small { font-size: 11.5px; color: var(--muted); }
.chip:hover { border-color: var(--line); background: rgba(215, 180, 108, 0.08); }
.chip[aria-checked="true"] { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b1307; border-color: transparent; font-weight: 700; }
.chip[aria-checked="true"] small { color: #3d2c10; }
.chip:disabled, .chip.taken { opacity: 0.38; cursor: not-allowed; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.35); }
.chip.taken[aria-checked="true"] { opacity: 0.7; }
.dates .chip { min-width: 74px; }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-soft); }
.seg button {
  border: 0; background: none; cursor: pointer; padding: 7px 16px; border-radius: 9px; font-size: 14px; line-height: 1.35;
  display: flex; flex-direction: column; align-items: center; color: var(--muted);
}
.seg button small { font-size: 11px; }
.seg button[aria-checked="true"] { background: rgba(215, 180, 108, 0.16); color: var(--gold-hi); font-weight: 700; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.stepper button { width: 40px; height: 42px; border: 0; background: none; cursor: pointer; font-size: 20px; color: var(--gold-hi); }
.stepper button:disabled { color: var(--faint); cursor: default; }
.stepper output { min-width: 34px; text-align: center; font-weight: 700; font-size: 17px; }

/* ---------------------------------------------------------------- list of platforms */
.panel { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.panel-title { margin: 0; font-size: 18px; font-weight: 700; }
.panel-sub { margin: 2px 0 12px; color: var(--muted); font-size: 13.5px; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pitem {
  width: 100%; display: grid; grid-template-columns: 88px 1fr auto; gap: 12px; align-items: center;
  padding: 8px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.02);
  cursor: pointer; text-align: start; transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.pitem img { width: 88px; height: 55px; object-fit: cover; border-radius: 9px; background: var(--ink-3); }
.pitem b { display: block; font-size: 15px; line-height: 1.5; }
.pitem small { color: var(--muted); font-size: 12.5px; }
.pitem:hover, .pitem.hot { border-color: var(--line); background: rgba(215, 180, 108, 0.07); }
.status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status.free { color: #c9f1cf; background: rgba(143, 207, 154, 0.12); }
.status.taken { color: #c9b9a6; background: rgba(255, 255, 255, 0.06); }
.status.unknown { color: var(--muted); background: rgba(255, 255, 255, 0.04); }
.pitem.is-taken img { filter: grayscale(0.8) brightness(0.7); }

/* ---------------------------------------------------------------- platform details + form */
.detail-head h2 { margin: 0; font-size: 30px; font-weight: 900; line-height: 1.35; }
.detail-head h2:focus { outline: none; }
.detail-head .kicker { margin-bottom: 2px; }
.cap { margin: 4px 0 0; color: var(--gold-hi); font-size: 14px; font-weight: 500; }
.summary { color: var(--muted); font-size: 15px; margin: 12px 0 10px; }
.features { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.features li { font-size: 12.5px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold-hi); }
.menu-link {
  display: flex; align-items: center; gap: 12px; margin: -4px 0 18px; padding: 10px 14px; border-radius: 14px;
  text-decoration: none; background: rgba(215, 180, 108, 0.07); border: 1px solid var(--line);
  transition: background-color 0.2s, border-color 0.2s;
}
.menu-link:hover { background: rgba(215, 180, 108, 0.14); border-color: var(--gold); }
.menu-link svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-link span { display: flex; flex-direction: column; line-height: 1.5; }
.menu-link b { font-size: 14px; }
.menu-link small { font-size: 12px; color: var(--muted); }
.slot-strip { margin-bottom: 18px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line-soft); }
.slot-strip .label b { color: var(--cream); font-weight: 700; }
.slot-note { margin: 10px 0 0; font-size: 13px; color: #f0c39a; }

.form .row { margin-bottom: 14px; }
.form .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form label small { color: var(--faint); }
.form input, .form select, .form textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.04);
  font-size: 15px; transition: border-color 0.2s, background-color 0.2s;
}
.form textarea { resize: vertical; min-height: 64px; line-height: 1.7; }
.form select {
  appearance: none; padding-inline-end: 38px;
  background: rgba(255, 255, 255, 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23d7b46c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left 14px center / 12px 8px;
}
.form select option { background: #1a1510; color: var(--cream); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); background-color: rgba(215, 180, 108, 0.06); }
.form .bad input, .form .bad select { border-color: #e0706a; }
.err { margin: 6px 0 0; font-size: 12.5px; color: #f09a92; min-height: 0; }
.err:empty { display: none; }
.recap { margin: 6px 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(215, 180, 108, 0.08); border: 1px solid var(--line); font-size: 14px; line-height: 1.8; }
.recap b { color: var(--gold-hi); }
.submit { width: 100%; min-height: 52px; font-size: 16px; }
.submit.busy { opacity: 0.7; pointer-events: none; }
.fine { font-size: 12.5px; color: var(--faint); margin: 10px 0 0; text-align: center; }
.fine a { text-decoration: none; color: var(--muted); }

/* ---------------------------------------------------------------- done */
.done-panel { text-align: center; padding-top: 28px; }
.done-mark svg { width: 64px; height: 64px; margin: 0 auto 10px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.done-mark circle { stroke: var(--line); }
.done-mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: tick 0.7s 0.2s ease forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.done-panel h2 { margin: 0; font-size: 26px; font-weight: 900; }
.done-panel h2:focus { outline: none; }
.ticket { margin: 18px 0; text-align: start; border: 1px dashed var(--line); border-radius: 16px; padding: 6px 16px; background: rgba(215, 180, 108, 0.05); }
.ticket div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.ticket div:last-child { border-bottom: 0; }
.ticket dt { color: var(--muted); font-size: 14px; }
.ticket dd { margin: 0; font-weight: 700; }
.ticket .code dd { color: var(--gold-hi); letter-spacing: 0.08em; font-size: 18px; font-family: ui-monospace, Consolas, "Courier New", monospace; direction: ltr; }
.app[data-mode="done"] .controls { display: none; }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- stage */
.stage-area {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden;
  padding: clamp(10px, 1.6vw, 26px);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(215, 180, 108, 0.08), transparent 60%),
    #0a0806;
}
.stage-cap { display: flex; align-items: baseline; gap: 14px; width: 100%; max-width: calc((100dvh - var(--bar-h) - 2 * clamp(10px, 1.6vw, 26px) - 56px) * var(--ar, 1.6)); color: var(--muted); font-size: 13.5px; }
.stage-cap .kicker { margin: 0; }
.stage {
  --ar: 1.6;
  position: relative; overflow: hidden; border-radius: 22px;
  width: min(100%, calc((100dvh - var(--bar-h) - 2 * clamp(10px, 1.6vw, 26px) - 56px) * var(--ar)));
  aspect-ratio: var(--ar);
  background: #120e0a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);
  transition: aspect-ratio 0.6s ease;
}
.layer { position: absolute; inset: 0; }
.fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-layer { transform-origin: 50% 50%; transition: transform 1.05s cubic-bezier(0.6, 0, 0.25, 1), opacity 0.5s ease; }
.map-layer video { opacity: 0; transition: opacity 0.6s ease; }
.map-layer video.on { opacity: 1; }
.plat-layer { opacity: 0; visibility: hidden; transition: opacity 0.55s ease, visibility 0s 0.55s; }
.plat-layer video { opacity: 0; transition: opacity 0.4s ease; }
.plat-layer video.on { opacity: 1; }
.fly-layer { opacity: 0; transition: opacity 0.25s ease; pointer-events: none; }
.fly-layer.on { opacity: 1; }

.app[data-mode="platform"] .plat-layer, .app[data-mode="done"] .plat-layer { opacity: 1; visibility: visible; transition: opacity 0.55s ease, visibility 0s; }

/* hotspots */
.spots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.spot path { fill: rgba(241, 220, 170, 0.06); stroke: var(--gold-hi); stroke-width: 2.2; vector-effect: non-scaling-stroke; transition: fill 0.25s, stroke 0.25s, opacity 0.25s; filter: drop-shadow(0 0 6px rgba(215, 180, 108, 0.55)); }
.spot.taken path { fill: rgba(0, 0, 0, 0.35); stroke: rgba(255, 255, 255, 0.45); stroke-dasharray: 5 5; filter: none; }
.spot.hot path { fill: rgba(241, 220, 170, 0.22); stroke-width: 3; }
.spot.taken.hot path { fill: rgba(0, 0, 0, 0.2); }
.spot path { animation: breathe 3.2s ease-in-out infinite; }
.spot.taken path, .spot.hot path { animation: none; }
@keyframes breathe { 50% { fill: rgba(241, 220, 170, 0.14); } }

.tags { position: absolute; inset: 0; }
.tag {
  --lift: 0px;
  position: absolute; translate: -50% calc(-100% - var(--lift));
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(12, 9, 6, 0.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; line-height: 1.5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, background-color 0.2s, border-color 0.2s;
}
.tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: calc(7px + var(--lift)); background: var(--gold); }
.tag em { display: none; font-style: normal; }
.num { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 7px; border-radius: 50%; font-style: normal; font-size: 11.5px; font-weight: 700; background: rgba(215, 180, 108, 0.16); color: var(--gold-hi); vertical-align: 1px; }
.tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.tag small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.tag:hover, .tag.hot { transform: translateY(-3px); background: rgba(30, 22, 12, 0.92); border-color: var(--gold); }
.tag.taken { color: var(--muted); }
.tag.taken i { background: #8b7f72; box-shadow: none; }
.tag.taken::after { background: rgba(255, 255, 255, 0.4); }

.legend {
  position: absolute; bottom: 14px; inset-inline-start: 14px; z-index: 4;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px;
  background: rgba(10, 8, 6, 0.72); border: 1px solid var(--line-soft); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity 0.3s;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.free { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot.taken { background: #8b7f72; }
.legend-hint { color: var(--gold-hi); }
.app:not([data-mode="map"]) .legend, .app:not([data-mode="map"]) .tags, .app:not([data-mode="map"]) .spots { opacity: 0; pointer-events: none; visibility: hidden; }

.back {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(10, 8, 6, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.back svg { width: 18px; height: 18px; }
.back:hover { border-color: var(--gold); color: var(--gold-hi); }

.plat-caption {
  position: absolute; inset: auto 0 0 0; padding: 60px 22px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.plat-caption b { font-size: clamp(20px, 2.4vw, 30px); font-weight: 900; }
.plat-caption span { color: var(--muted); font-size: 14px; }

.offline {
  position: absolute; top: 14px; left: 50%; translate: -50% 0; z-index: 6; width: min(520px, calc(100% - 28px));
  padding: 10px 16px; border-radius: 14px; font-size: 13.5px; text-align: center;
  background: rgba(60, 24, 18, 0.88); border: 1px solid rgba(240, 154, 146, 0.4);
}
.offline a { text-decoration: none; font-weight: 700; }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 920px) {
  .app { display: flex; flex-direction: column; height: auto; min-height: 100dvh; }
  .side { display: contents; }
  /* the map first, then when and how many, then the list or the form */
  .side-head { order: 1; padding: 14px 16px 10px; }
  .stage-area { order: 2; padding: 0; background: none; }
  .controls { order: 3; padding: 16px 16px 0; }
  .panel { order: 4; margin: 0 16px; padding-bottom: 36px; }
  .side-head h1 { font-size: 22px; }
  .steps { margin: 8px 0 0; }
  .chips.times { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .tag:not(.taken) em { color: var(--gold-hi); }
  .stage { width: 100%; border-radius: 0; box-shadow: none; }
  .stage-cap { display: none; }
  /* phones: numbered pins; the list under the map carries the same numbers */
  .tag { width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 50%; font-size: 12px; gap: 0; }
  .tag i, .tag span, .tag small { display: none; }
  .tag em { display: inline; }
  .tag.taken { background: rgba(40, 36, 32, 0.85); }
  .legend { bottom: 8px; inset-inline-start: 8px; font-size: 11.5px; gap: 10px; padding: 5px 10px; }
  .legend .legend-hint { display: none; }
  .back { top: 10px; inset-inline-start: 10px; }
  .app[data-mode="done"] .controls { display: none; }
}
@media (max-width: 520px) {
  .form .row.two { grid-template-columns: 1fr; }
  .pitem { grid-template-columns: 72px 1fr auto; }
  .pitem img { width: 72px; height: 45px; }
}
