/* Event Planner. Loaded only on /event-planner (and /event-planner-view), after styles.css.
   It reads like a product configurator: a white page, the 3D space as the one bold thing on a quiet
   studio backdrop, frosted controls floating over it, and plain, roomy steps beside it. Only
   transform and opacity animate; colours change on hover without a transition. */

.pl-page,
.pl-viewer {
  --pl-ink: #1D1D1F;
  --pl-ink-2: #6E6E73;
  --pl-ink-3: #86868B;
  --pl-well: #F5F5F7;
  --pl-line: #D2D2D7;
  --pl-hair: rgba(0, 0, 0, 0.08);
  /* White text on the button green passes contrast; the brighter green marks what's chosen */
  --pl-accent: #017A58;
  --pl-accent-hover: #01845E;
  --pl-accent-bright: #02A677;
  --pl-accent-tint: #E9F6F1;
  --pl-red: #D70015;
  --pl-glass-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.22);
  --pl-ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --spring: cubic-bezier(0.2, 0.85, 0.25, 1.05);
  --ok: #02A677;
  --warn: #E89400;
  --error: #E3262F;
  /* Holds the planner's bottom margin, so the page's white runs down to the footer */
  display: flow-root;
  background: var(--white);
  color: var(--pl-ink);
}
.pl-page:lang(ar) * { letter-spacing: 0; }

/* The site's header turns to white glass on this page, to match it */
body:has(.pl-page) .nav.scrolled {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Frosted glass, for everything that floats over the 3D */
.pl-empty,
.pl-views,
.pl-selection {
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--pl-glass-shadow);
}

/* ——— Intro ——— */
.pl-intro {
  padding: clamp(116px, 9.6vw, 148px) 0 clamp(28px, 3vw, 44px);
  text-align: center;
}
.pl-title {
  max-width: 17ch;
  margin: 0 auto;
  color: var(--pl-ink);
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}
.pl-lede {
  max-width: 50ch;
  margin: 16px auto 0;
  color: var(--pl-ink-2);
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

/* Until planner.js starts, nothing shows, so nothing half-works (without JavaScript, the page's
   <noscript> shows the details form on its own) */
.pl-app { display: none; }
/* The steps run down the page beside the 3D, which stays in view as they scroll */
.pl-app.is-live {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(350px, 29vw, 430px);
  align-items: start;
  gap: clamp(20px, 2.4vw, 44px);
  max-width: 1640px;
  margin: 0 auto clamp(80px, 9vw, 136px);
  padding: 0 clamp(16px, 2.4vw, 40px);
}
.pl-app.is-flat { grid-template-columns: 1fr; max-width: 720px; }
/* Below the fixed header when the page jumps to it */
.pl-app, .pl-stage { scroll-margin-top: 96px; }

/* ——— The stage: a studio sweep, lit from the front ——— */
.pl-stage {
  position: sticky;
  top: 105px;
  isolation: isolate;
  height: min(82vh, 860px);
  min-height: 580px;
  min-width: 0;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 50% 38%, #FFFFFF 0%, #F5F5F7 56%, #EAEAEE 100%);
  outline: none;
}
.pl-stage:focus-visible { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--pl-accent-bright); }
.pl-app.is-flat .pl-stage { position: relative; top: 0; height: auto; min-height: 0; }
.pl-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.pl-canvas.is-over-game { cursor: grab; }
.pl-canvas.is-dragging { cursor: grabbing; }

.pl-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  color: var(--pl-ink-2);
  font-size: 15px;
  text-align: center;
}
.pl-loading::before {
  content: "";
  width: 26px;
  height: 26px;
  border: 2.5px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--pl-ink-2);
  border-radius: 50%;
  animation: pl-spin 0.9s linear infinite;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }
.pl-nogl { padding: 32px; color: var(--pl-ink-2); font-size: 16px; line-height: 1.5; text-align: center; }
.pl-loading[hidden], .pl-nogl[hidden], .pl-empty[hidden] { display: none; }

/* Where the chosen game's tools appear, which it never shares the stage with */
.pl-empty {
  position: absolute;
  inset-block-end: 18px;
  inset-inline: 0;
  width: fit-content;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--pl-ink);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

/* Measurements on the space's edges. Solid, not frosted: they move with every frame. */
.pl-labels { position: absolute; inset: 0; pointer-events: none; }
.pl-measure {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 4px 12px -6px rgba(0, 0, 0, 0.25);
  color: var(--pl-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.pl-measure--ceiling { color: var(--pl-accent); }
.pl-measure[hidden] { display: none; }

/* Views: one frosted capsule in the corner */
.pl-views {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
}
.pl-views[hidden] { display: none; }
.pl-view {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pl-ink);
  font: 500 13px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-view:hover { background: rgba(0, 0, 0, 0.06); }
.pl-view:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 1px; }
.pl-view:active { background: rgba(0, 0, 0, 0.1); transform: scale(0.96); }

/* The chosen game's tools: a frosted bar along the bottom of the stage */
.pl-selection {
  position: absolute;
  inset-block-end: 18px;
  inset-inline: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin: 0 auto;
  padding: 6px;
  border-radius: 999px;
  animation: pl-rise 0.5s var(--spring);
}
.pl-selection[hidden] { display: none; }
@keyframes pl-rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.pl-selection-name {
  max-width: 240px;
  overflow: hidden;
  padding: 0 12px 0 14px;
  color: var(--pl-ink);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-tool {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--pl-ink);
  font: 500 13px/1 var(--font);
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pl-tool:hover { background: rgba(0, 0, 0, 0.09); }
.pl-tool:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; }
.pl-tool:active { transform: scale(0.92); }
.pl-tool-text { padding: 0 15px; }
.pl-tool-divider { width: 1px; height: 22px; margin: 0 4px; background: rgba(0, 0, 0, 0.12); }
.pl-tool-remove { background: transparent; color: var(--pl-red); }
.pl-tool-remove:hover { background: rgba(215, 0, 21, 0.08); }
.pl-tool-done { background: var(--pl-accent); color: var(--white); }
.pl-tool-done:hover { background: var(--pl-accent-hover); }
[dir="rtl"] .pl-tool[data-turn] svg { transform: scaleX(-1); }

/* ——— The steps beside it ——— */
.pl-panel { position: relative; min-width: 0; padding: 0 4px; }

/* The steps: a mark for each on a track that fills as the visitor goes. Steps done have a tick and
   go back; steps not reached yet are greyed out and wait. */
/* It stays under the header while the step scrolls */
.pl-steps-bar {
  position: sticky;
  top: 89px;
  z-index: 2;
  padding: 14px 0 16px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.pl-steps { --at: 0; position: relative; }
.pl-steps-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.pl-step { display: flex; justify-content: center; }
/* From the first mark's middle to the last one's */
.pl-steps-track {
  position: absolute;
  top: 13px;
  inset-inline: calc(100% / 6);
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--pl-line);
}
.pl-steps-fill {
  display: block;
  height: 100%;
  background: var(--pl-accent-bright);
  transform: scaleX(calc(var(--at) / 2));
  transform-origin: left center;
  transition: transform 0.6s var(--pl-ease);
}
[dir="rtl"] .pl-steps-fill { transform-origin: right center; }
.pl-step-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0 8px 2px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--pl-ink-2);
  font: 500 13px/1.2 var(--font);
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-step-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--pl-line);
}
.pl-step-mark > *,
.pl-step-mark::after { grid-area: 1 / 1; }
.pl-step-mark svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.45s var(--spring);
}
/* Here now: a green ring round a dot */
.pl-step[data-state="current"] .pl-step-mark { box-shadow: inset 0 0 0 2px var(--pl-accent-bright); }
.pl-step[data-state="current"] .pl-step-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pl-accent-bright);
}
.pl-step[data-state="current"] .pl-step-button { color: var(--pl-ink); font-weight: 600; cursor: default; }
/* Done: filled, with a tick */
.pl-step[data-state="done"] .pl-step-mark { background: var(--pl-accent-bright); box-shadow: none; }
.pl-step[data-state="done"] .pl-step-mark svg { opacity: 1; transform: none; }
/* Reached before, then gone back from: a green ring, to go forward again */
.pl-step[data-state="open"] .pl-step-mark { box-shadow: inset 0 0 0 2px var(--pl-accent-bright); }
.pl-step[data-state="later"] .pl-step-button { color: var(--pl-ink-3); cursor: default; }
.pl-step:is([data-state="done"], [data-state="open"]) .pl-step-button:hover { color: var(--pl-ink); }
.pl-step:is([data-state="done"], [data-state="open"]) .pl-step-button:hover .pl-step-name { text-decoration: underline; text-underline-offset: 3px; }
.pl-step-button:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; }
.pl-step-button:not(:disabled):active { transform: scale(0.94); }

.pl-tab { padding-top: 6px; }
.pl-tab[hidden] { display: none; }
.pl-tab:not([hidden]) { animation: pl-in 0.5s var(--pl-ease) both; }
@keyframes pl-in { from { opacity: 0; transform: translateY(8px); } }

/* Headings open with the step's name, then ask its question in grey */
.pl-h {
  margin: 14px 0 10px;
  color: var(--pl-ink-3);
  font-size: clamp(24px, 1.9vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  text-wrap: balance;
}
.pl-h-lead { color: var(--pl-ink); }
/* Each step's heading takes the focus when the step opens */
.pl-h:focus { outline: none; }
.pl-hint { color: var(--pl-ink-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.pl-label { display: block; margin-bottom: 12px; color: var(--pl-ink); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.pl-fieldset { min-width: 0; margin: 30px 0 0; padding: 0; border: 0; }
.pl-fieldset .pl-hint { margin: -6px 0 14px; }

/* The end of each step: Back, and the main button filling the rest */
.pl-step-nav { display: flex; gap: 10px; margin-top: 30px; }
.pl-step-nav .pl-cta { flex: 1; }
.pl-back {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 50px;
  padding-block: 0;
  padding-inline: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--pl-well);
  color: var(--pl-ink);
  font: 500 17px/1.2 var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .pl-back svg { transform: scaleX(-1); }
.pl-back:hover { background: #E8E8ED; }
.pl-back:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 3px; }
.pl-back:active { transform: scale(0.97); }

/* The step's main button: a pill */
.pl-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--pl-accent);
  color: var(--white);
  font: 500 17px/1.2 var(--font);
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-cta:hover { background: var(--pl-accent-hover); color: var(--white); }
.pl-cta:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 3px; }
.pl-cta:active { transform: scale(0.98); }

/* Kinds of space: option tiles, outlined in green when chosen */
.pl-space-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl-choice {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 92px;
  padding: 16px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--pl-line);
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pl-choice:hover { box-shadow: inset 0 0 0 1px var(--pl-ink-3); }
.pl-choice:active { transform: scale(0.98); }
.pl-choice:has(input:focus-visible) { outline: 2px solid var(--pl-accent-bright); outline-offset: 3px; }
.pl-choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--pl-accent-bright); }
.pl-choice-name { color: var(--pl-ink); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.pl-choice-hint { color: var(--pl-ink-2); font-size: 13px; line-height: 1.4; }

/* Sizes */
.pl-sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.pl-ceiling { grid-column: 1 / -1; }
.pl-ceiling[hidden] { display: none; }
.pl-sizes + .pl-hint { margin-top: 10px; font-size: 13px; }
.pl-number { display: grid; gap: 8px; color: var(--pl-ink); font-size: 15px; font-weight: 600; }
.pl-number-field { position: relative; display: block; }
.pl-number-field input {
  width: 100%;
  height: 52px;
  padding: 0 40px 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--pl-line);
  color: var(--pl-ink);
  font: 500 17px var(--font);
  -moz-appearance: textfield;
  appearance: textfield;
}
.pl-number-field input::-webkit-inner-spin-button,
.pl-number-field input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.pl-number-field input:hover { box-shadow: inset 0 0 0 1px var(--pl-ink-3); }
.pl-number-field input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--pl-accent-bright), 0 0 0 4px rgba(2, 166, 119, 0.16); }
.pl-number-field input:active { box-shadow: inset 0 0 0 2px var(--pl-accent-bright); }
.pl-number-field > span { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--pl-ink-2); font-size: 15px; font-weight: 500; pointer-events: none; }

/* Age groups */
.pl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-chip { position: relative; cursor: pointer; }
.pl-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pl-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--pl-line);
  color: var(--pl-ink);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.3s var(--spring);
}
.pl-chip:hover span { box-shadow: inset 0 0 0 1px var(--pl-ink-3); }
.pl-chip:active span { transform: scale(0.95); }
.pl-chip input:focus-visible + span { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; }
.pl-chip input:checked + span { background: var(--pl-accent-tint); box-shadow: inset 0 0 0 2px var(--pl-accent-bright); color: #01563F; font-weight: 600; }

/* The age filter, and the way to see what it hides */
.pl-ages { margin-top: 26px; }

/* The kind of game: one at a time, so the chosen one fills like a tab */
.pl-kinds { margin-top: 22px; }
.pl-kind input:checked + span { background: var(--pl-accent); box-shadow: none; color: var(--white); font-weight: 600; }
.pl-kind:hover input:checked + span { background: var(--pl-accent-hover); }
.pl-filter-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--pl-well);
  color: var(--pl-ink);
  font-size: 14px;
  line-height: 1.5;
}
.pl-filter-note[hidden] { display: none; }
.pl-show-all {
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--pl-accent);
  font: 600 14px var(--font);
  cursor: pointer;
}
.pl-show-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.pl-show-all:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; }
.pl-show-all:active { opacity: 0.7; }

/* Games: grey tiles with the model on a white plate */
.pl-games { display: grid; gap: 12px; margin-top: 20px; }
.pl-game {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border-radius: 20px;
  background: var(--pl-well);
}
.pl-game-image {
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 330;
  border-radius: 12px;
  background: var(--white);
  object-fit: contain;
}
.pl-game-body { display: grid; gap: 4px; min-width: 0; }
.pl-game-name { color: var(--pl-ink); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.pl-game-blurb { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: var(--pl-ink-2); font-size: 13px; line-height: 1.45; }
.pl-game-facts { margin-top: 2px; color: var(--pl-ink); font-size: 13px; line-height: 1.5; }
.pl-game-estimate { color: var(--pl-ink-2); }
.pl-game-note { display: flex; align-items: flex-start; gap: 6px; color: var(--pl-ink-2); font-size: 12.5px; line-height: 1.45; }
.pl-game-note svg { flex: none; width: 13px; height: 13px; margin-top: 0.15em; fill: var(--pl-accent-bright); }
.pl-add {
  justify-self: start;
  min-height: 32px;
  margin-top: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--pl-accent);
  color: var(--white);
  font: 500 14px/1 var(--font);
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-add:hover { background: var(--pl-accent-hover); }
.pl-add:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; }
.pl-add:active { transform: scale(0.95); }
.pl-game[hidden] { display: none; }
/* Games the supplier is bringing in */
.pl-game-soon {
  justify-self: start;
  margin-bottom: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pl-accent-tint);
  color: #01563F;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.pl-game.is-unsuited .pl-game-image { opacity: 0.5; }
.pl-game-unsuited { color: #8A5A00; font-size: 12.5px; font-weight: 600; }
.pl-game-unsuited[hidden] { display: none; }

/* What's in the plan: a grouped list, a hairline between rows */
.pl-plan-heading { margin-top: 34px; }
.pl-plan { display: grid; overflow: hidden; padding: 0; border-radius: 16px; background: var(--pl-well); list-style: none; }
.pl-plan:empty { display: none; }
.pl-plan-item {
  --dot: var(--ok);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2px;
  padding-block: 4px;
  padding-inline: 4px 8px;
}
.pl-plan-item + .pl-plan-item::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 40px 0; height: 1px; background: var(--pl-hair); }
.pl-plan-item[data-level="warn"] { --dot: var(--warn); }
.pl-plan-item[data-level="error"] { --dot: var(--error); }
.pl-plan-item.is-selected { background: var(--pl-accent-tint); }
.pl-plan-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--pl-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-plan-select:hover .pl-plan-name { text-decoration: underline; text-decoration-color: var(--pl-line); text-underline-offset: 3px; }
.pl-plan-select:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: -2px; }
.pl-plan-select:active { transform: scale(0.99); }
.pl-plan-dot { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 18%, transparent); }
.pl-plan-name { overflow: hidden; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }
.pl-plan-status { color: var(--pl-ink-2); font-size: 13px; line-height: 1.4; }
.pl-plan-item[data-level="error"] .pl-plan-status { color: #C4141C; }
.pl-plan-item[data-level="warn"] .pl-plan-status { color: #8A5A00; }
.pl-plan-turn,
.pl-plan-remove {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pl-ink-2);
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-plan-turn svg,
.pl-plan-remove svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pl-plan-turn:hover { background: rgba(0, 0, 0, 0.06); color: var(--pl-ink); }
.pl-plan-remove { color: var(--pl-red); }
.pl-plan-remove:hover { background: rgba(215, 0, 21, 0.08); }
.pl-plan-turn:focus-visible, .pl-plan-remove:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 1px; }
.pl-plan-turn:active, .pl-plan-remove:active { transform: scale(0.9); }
[dir="rtl"] .pl-plan-turn svg { transform: scaleX(-1); }
.pl-plan-empty { padding: 16px 18px; border-radius: 16px; background: var(--pl-well); color: var(--pl-ink-2); font-size: 15px; line-height: 1.5; }
.pl-plan-empty[hidden] { display: none; }

/* The summary before sending: rows, like an order summary */
.pl-summary { margin-top: 20px; padding: 2px 18px; border-radius: 16px; background: var(--pl-well); }
.pl-summary dl { display: grid; }
.pl-summary dt { padding-top: 14px; color: var(--pl-ink-2); font-size: 13px; font-weight: 500; }
.pl-summary dd { margin: 0; padding: 3px 0 14px; border-bottom: 1px solid var(--pl-hair); color: var(--pl-ink); font-size: 16px; line-height: 1.5; }
.pl-summary dd:last-child { border-bottom: 0; }
.pl-summary-list { display: grid; gap: 4px; padding-inline-start: 18px; }
.pl-summary-list.is-issues li::marker { color: var(--warn); }
.pl-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pl-accent);
  font: 500 15px var(--font);
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-copy svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pl-copy:hover .pl-copy-text { text-decoration: underline; text-underline-offset: 3px; }
.pl-copy:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; }
.pl-copy:active { transform: scale(0.97); }

/* ——— The details that go with the plan, at the end of the send step ——— */
.pl-form { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--pl-hair); }
.pl-form-heading { margin-bottom: 4px; }
.pl-field { display: block; min-width: 0; margin: 22px 0 0; padding: 0; border: 0; }
.pl-field-label { display: block; margin-bottom: 8px; padding: 0; color: var(--pl-ink); font-size: 14px; font-weight: 500; }
/* How many people: four even choices in a row */
.pl-form .pl-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.pl-form .pl-chip span { justify-content: center; width: 100%; padding: 0 8px; white-space: nowrap; }
.pl-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--pl-line);
  color: var(--pl-ink);
  font: 400 16px/1.4 var(--font);
}
textarea.pl-input { min-height: 104px; padding: 12px 16px; resize: vertical; }
.pl-input::placeholder { color: var(--pl-ink-3); }
.pl-input:hover { box-shadow: inset 0 0 0 1px var(--pl-ink-3); }
.pl-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--pl-accent-bright); }
/* Arabic: phone numbers and emails read left to right, from the field's right */
[dir="rtl"] .pl-input[dir="ltr"] { text-align: right; }
/* Only for bots: off screen, and out of the tab order */
.pl-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pl-consent { margin-top: 14px; color: var(--pl-ink-2); font-size: 13px; line-height: 1.5; text-align: center; }
.pl-consent a { color: var(--pl-accent); text-decoration: underline; text-underline-offset: 2px; }
.pl-consent a:hover { color: var(--pl-accent-hover); }
.pl-consent a:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; border-radius: 2px; }

/* Sent, or ready in the visitor's email app */
.pl-done {
  margin-top: 34px;
  padding: 30px 22px;
  border-radius: 20px;
  background: var(--pl-accent-tint);
  text-align: center;
  outline: none;
}
.pl-done-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--pl-accent-bright); }
.pl-done-mark svg { width: 28px; height: 28px; fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pl-done-title { margin: 14px 0 6px; color: var(--pl-ink); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; text-wrap: balance; }
.pl-done .pl-cta { margin-top: 20px; }
.pl-done-help { margin-top: 14px; font-size: 14px; }
.pl-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--pl-accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.pl-link:hover { color: var(--pl-accent-hover); }
.pl-link:focus-visible { outline: 2px solid var(--pl-accent-bright); outline-offset: 2px; border-radius: 2px; }
.pl-link:active { transform: scale(0.97); }

/* ——— Phones and tablets: the stage on top, the steps below ——— */
@media (max-width: 999px) {
  .pl-app.is-live { grid-template-columns: 1fr; gap: 0; padding: 0 12px; }
  .pl-stage { position: relative; top: 0; height: 62svh; min-height: 360px; max-height: 640px; border-radius: 24px; }
  .pl-panel { padding: 0 8px 8px; }
  .pl-steps-bar { top: 83px; margin: 0 -20px; padding: 14px 20px 12px; }
  .pl-selection { inset-inline: 10px; inset-block-end: 10px; max-width: calc(100% - 20px); border-radius: 24px; }
  .pl-selection-name { flex-basis: 100%; max-width: none; padding: 6px 8px 4px; text-align: center; }
  .pl-views { inset-block-start: 10px; inset-inline-end: 10px; }
  .pl-empty { inset-block-end: 12px; }
  .pl-view { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
}
@media (max-width: 420px) {
  .pl-space-types { grid-template-columns: 1fr; }
  .pl-choice { min-height: 0; }
  .pl-game { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-selection, .pl-tab:not([hidden]) { animation: none; }
  .pl-steps-fill, .pl-step-mark svg { transition: none; }
  .pl-loading::before { animation-duration: 2.4s; }
}

/* Arabic: numbers and their unit keep their order; the unit sits on the field's left */
[dir="rtl"] .pl-number-field input { padding: 0 16px 0 40px; text-align: right; }
[dir="rtl"] .pl-number-field > span { right: auto; left: 16px; }

/* ——— /event-planner-view: the stage alone, filling the frame the admin tool shows it in ——— */
.pl-viewer { margin: 0; overflow: hidden; }
.pl-viewer .pl-app.is-live { display: block; max-width: none; margin: 0; padding: 0; }
.pl-viewer .pl-stage { position: fixed; inset: 0; height: auto; min-height: 0; max-height: none; border-radius: 0; }
.pl-viewer .pl-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--pl-accent-bright); }
