:root {
  --fondo: #f6f1e8;          /* the warm sand paper behind everything */
  --carta: #fffdf9;          /* the deck panel */
  --bordo: rgba(70, 52, 30, 0.09);
  --linea: #e4dacb;          /* the thin lines of the deck */
  --testo: #26211b;
  --testo-2: #7a7064;
  --testo-3: #b0a596;
  --accento: #e2674b;        /* the coral: the chosen sunbed, its parasol, Reserve */
  --accento-2: #f19a83;      /* the lighter coral of the parasol's alternate panels */
  --accento-tenue: #fbe6de;  /* the soft coral on the chosen sunbed */
  --acqua: #e2f0ef;          /* the pool, a very soft blue that stays in the tone */
  --acqua-2: #d1e6e5;
  --preso: #ece5da;          /* a sunbed already taken */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.4vh, 26px) 10px;
}

/* ---- the panel ---- */
.deck {
  position: relative;
  --w: min(94vw, 680px);
  width: var(--w);
  max-height: 100%;
  background: var(--carta);
  border-radius: clamp(14px, 2.4vh, 20px);
  padding: clamp(10px, 2vh, 18px) clamp(10px, 2.2vw, 18px);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.4vh, 12px);
  box-shadow:
    0 0 0 1px var(--bordo),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 4px rgba(70, 52, 30, 0.04),
    0 12px 28px -8px rgba(70, 52, 30, 0.12),
    0 34px 60px -26px rgba(70, 52, 30, 0.16);
}

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: clamp(11px, 1.5vh, 13px); }
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 640; font-stretch: 108%; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg { width: 17px; height: 17px; fill: none; stroke: var(--accento); stroke-width: 1.5; stroke-linecap: round; }
.top__meta { display: inline-flex; gap: 10px; color: var(--testo-2); white-space: nowrap; }
.top__free { color: var(--testo); font-weight: 560; display: inline-block; }

/* ---- the map ---- */
.map {
  position: relative;
  height: min(calc(100vh - 150px), calc(var(--w) * 0.64));
  min-height: 0;
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(255, 255, 255, 0.7), transparent 70%),
    #f8f3ea;
  box-shadow: inset 0 0 0 1px rgba(70, 52, 30, 0.06);
  overflow: hidden;
}
@media (max-aspect-ratio: 3/4) {
  .map { height: min(calc(100vh - 160px), calc(var(--w) * 1.5)); }
}
.plan { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }

.plan text { font-family: "Mona Sans Variable", system-ui, sans-serif; }
.pool__label { font-size: 6.6px; letter-spacing: 0.12em; fill: #8db3b2; font-weight: 560; }
.deck__label { font-size: 6.6px; letter-spacing: 0.12em; fill: var(--testo-3); font-weight: 560; }
.wave { fill: none; stroke: #fff; stroke-width: 0.8; stroke-linecap: round; }

.bed { cursor: pointer; outline: none; }
.bed--taken { cursor: default; }
.bed__body { fill: var(--carta); stroke: #d8ccba; stroke-width: 0.7; transition: fill 0.25s, stroke 0.25s; }
.bed__pillow { fill: #efe7da; transition: fill 0.25s; }
.bed__slat { stroke: #e6dccd; stroke-width: 0.5; }
.bed--taken .bed__body { fill: var(--preso); stroke: #e2d9cb; }
.bed--taken .bed__pillow { fill: #e3dacd; }
.bed--taken .bed__slat { stroke: #e3dacd; }
.bed--on .bed__body { fill: var(--accento-tenue); stroke: var(--accento); }
.bed--on .bed__pillow { fill: var(--accento); }
.bed--on .bed__slat { stroke: #f3c2b4; }
.bed:focus-visible .bed__body { stroke: var(--accento); stroke-width: 1.2; }
.cab__roof { fill: none; stroke: #e2d7c6; stroke-width: 0.5; }
.bed--on .cab__roof { stroke: #f0b8a8; }

.umb__panel { stroke: rgba(255, 255, 255, 0.75); stroke-width: 0.45; stroke-linejoin: round; }
.umb__rim { fill: none; stroke: rgba(150, 60, 40, 0.35); stroke-width: 0.5; }
.umb__top { fill: #fffdf9; stroke: rgba(150, 60, 40, 0.4); stroke-width: 0.5; }

/* ---- the price label ---- */
.tip {
  position: absolute;
  left: 0; top: 0;
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 9px 5px;
  border-radius: 9px;
  background: var(--carta);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 0 1px var(--bordo), 0 4px 10px -2px rgba(70, 52, 30, 0.16), 0 10px 22px -10px rgba(70, 52, 30, 0.2);
}
.tip b { font-weight: 660; letter-spacing: -0.01em; }
.tip span { color: var(--testo-2); font-size: 11px; }
.tip::after {
  content: ""; position: absolute; left: var(--cx, 50%); bottom: -4px; width: 8px; height: 8px; margin-left: -4px;
  background: var(--carta); transform: rotate(45deg); border-radius: 1.5px;
  box-shadow: 1px 1px 0 0 var(--bordo);
}
.tip--below::after { bottom: auto; top: -4px; box-shadow: -1px -1px 0 0 var(--bordo); }

.pointer { position: absolute; z-index: 3; left: 0; top: 0; width: 18px; height: 18px; pointer-events: none; opacity: 0; filter: drop-shadow(0 1.5px 2px rgba(40, 30, 20, 0.25)); }
.pointer path { fill: #1e1a16; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }

/* ---- the booking bar ---- */
.bar { display: flex; align-items: center; gap: clamp(8px, 2vw, 16px); padding: 2px 2px 0; }
.bar__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.bar__line { display: block; position: relative; overflow: hidden; height: 1.3em; font-size: clamp(12px, 1.7vh, 14px); font-weight: 600; letter-spacing: -0.01em; }
.bar__line > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__line--soft { font-size: clamp(11px, 1.5vh, 12.5px); font-weight: 450; color: var(--testo-2); }

.total { font-size: clamp(17px, 2.6vh, 22px); font-weight: 660; font-stretch: 104%; letter-spacing: -0.02em; display: inline-flex; align-items: center; line-height: 1.15em; }
.roll { display: inline-flex; height: 1.15em; line-height: 1.15em; overflow: hidden; }
.roll .d { display: inline-block; overflow: hidden; height: 1.15em; width: 0.62em; text-align: center; }
.roll .d__col { display: flex; flex-direction: column; }
.roll .d__col span { height: 1.15em; display: block; }

.go { position: relative; height: clamp(34px, 5vh, 40px); padding: 0 clamp(14px, 2.4vw, 20px); color: #fff; font-weight: 620; font-size: clamp(12px, 1.7vh, 14px); white-space: nowrap; display: grid; place-items: center; }
.go__bg { position: absolute; inset: 0; border-radius: 999px; background: var(--accento); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 4px 12px -4px rgba(226, 103, 75, 0.55); transition: background 0.3s, box-shadow 0.3s; }
.go:disabled { cursor: default; }
.go:disabled .go__bg { background: #e6ddd0; box-shadow: none; }
.go:disabled .go__label { color: #a99d8d; }
.go__label, .go__done { position: relative; grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 5px; }
.go__done { opacity: 0; }
.go__done svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.go--done .go__bg { background: #2a241e; box-shadow: 0 4px 12px -5px rgba(30, 24, 18, 0.5); }

@media (hover: hover) {
  .go:not(:disabled):hover .go__bg { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 6px 16px -4px rgba(226, 103, 75, 0.6); }
}
@media (max-width: 380px) {
  .top__meta > span:first-child { display: none; }
}
