/* ==========================================================================
   Seating planner (/bordsplacering, /en/wedding-seating-planner).
   The planner fills the first screen under the site header: a canvas with the venue drawn as a floor plan,
   floating glass panels on top (title, tools, guest list, zoom, popovers). Built by bordsplacering.js.
   Everything here is prefixed sp- and scoped so it cannot leak into site.css; the guide, tips and ad below
   the planner keep using verktyg.css.

   Contents: 1 tokens · 2 frame · 3 canvas and drawing · 4 controls · 5 title, top bar, rail · 6 fly-out
   7 guest list · 8 bottom bar · 9 popovers · 10 banners, toasts · 11 dialogs · 12 phones · 13 guide below
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
.sp-page {
  --sp-bg: #ebe5da;
  --sp-dot: rgba(112, 90, 64, .26);
  --sp-ink: #1f1c18;
  --sp-ink-2: #4b453d;
  --sp-muted: #7b7267;
  --sp-line: rgba(60, 45, 30, .11);
  --sp-line-2: rgba(60, 45, 30, .2);
  --sp-panel: rgba(255, 253, 250, .86);
  --sp-solid: #fffdfa;
  --sp-hover: rgba(60, 45, 30, .065);
  --sp-accent: #86c859;
  --sp-accent-2: #6db33d;
  --sp-accent-ink: #2f6a14;
  --sp-accent-soft: rgba(134, 200, 89, .22);
  --sp-rose: #e8909f;
  --sp-danger: #b3261e;
  --sp-wall: #3a332c;
  --sp-ribbon: linear-gradient(90deg, #e8909f, #f2a46f 22%, #e2bd50 42%, #8cc184 62%, #7fb0df 80%, #b29ae2);
  --sp-shadow: 0 1px 1px rgba(50, 35, 20, .04), 0 3px 8px rgba(50, 35, 20, .05), 0 14px 34px -14px rgba(50, 35, 20, .32);
  --sp-shadow-lg: 0 2px 6px rgba(50, 35, 20, .07), 0 30px 70px -20px rgba(40, 28, 16, .5);
  --sp-serif: "PT Serif", Georgia, serif;
  --sp-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sp-cta: "Cabin", "Inter", sans-serif;
}

/* 2. Frame: the first screen, under the absolutely positioned site header ---- */
.sp-app {
  position: relative; height: 100vh; height: 100dvh; min-height: 560px;
  background: var(--sp-bg); overflow: hidden; isolation: isolate;
  font-family: var(--sp-sans); color: var(--sp-ink);
}
.sp-stage { position: absolute; inset: var(--header-h) 0 0 0; overflow: hidden; }
.sp-app.is-full { position: fixed; inset: 0; z-index: 120; height: auto; min-height: 0; }
.sp-app.is-full .sp-stage { inset: 0; }
html.sp-locked, html.sp-locked body { overflow: hidden; }
:where(.sp-app) :is(p, ul, ol, pre, h2, h3) { margin: 0; }
:where(.sp-app) button { font: inherit; color: inherit; }
.sp-app :focus-visible { outline: 2.5px solid var(--sp-accent-2); outline-offset: 2px; }
.sp-noscript { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; z-index: 5; }
.sp-noscript p { background: #fff; padding: 16px 20px; border-radius: 14px; box-shadow: var(--sp-shadow); max-width: 420px; text-align: center; }
/* panels fade in once the script has built them, so nothing jumps on load */
.sp-app:not(.is-ready) .sp-glass { opacity: 0; }
.sp-glass {
  background: var(--sp-panel);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .78); border-radius: 18px;
  box-shadow: var(--sp-shadow), 0 0 0 .5px rgba(60, 45, 30, .1);
  transition: opacity .3s;
}
.sp-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; flex: none; }
.sp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); flex: none; }

/* 3. Canvas and drawing ----------------------------------------------------- */
.sp-canvas {
  position: absolute; inset: 0; touch-action: none;
  background-color: var(--sp-bg);
  background-image: radial-gradient(circle, var(--sp-dot) 1.1px, transparent 1.7px),
    radial-gradient(ellipse 85% 75% at 50% 45%, #f3eee6 0%, #e8e1d4 100%);
  background-size: var(--gs, 40px) var(--gs, 40px), 100% 100%;
  background-position: var(--gx, 0) var(--gy, 0), 0 0;
}
.sp-svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline: none; overflow: hidden;
}
:where(.sp-svg) text { font-family: var(--sp-sans); }
.sp-svg.is-panning, .sp-svg.is-panning * { cursor: grabbing !important; }
.sp-svg.is-space, .sp-svg.is-space * { cursor: grab !important; }
/* the floor: soft shadow, ivory floor with a metre grid, walls; only the walls react to the pointer */
.sp-floor * { pointer-events: none; }
.sp-halo { fill: none; stroke: #4a3520; stroke-opacity: .05; stroke-linejoin: round; }
.sp-walls { fill: none; stroke: var(--sp-wall); stroke-width: 14; stroke-linejoin: round; transition: stroke .2s; }
.sp-walls.is-sel { stroke: var(--sp-accent-ink); }
.sp-floor .sp-wall-hit { pointer-events: stroke; stroke: transparent; stroke-width: calc(20px / var(--k, 1)); stroke-linecap: round; }
.sp-floor .sp-wall-hit:hover { stroke: rgba(134, 200, 89, .38); }
.sp-gl1 { fill: none; stroke: rgba(130, 105, 75, .15); stroke-width: calc(1px / var(--k, 1)); }
.sp-gl5 { fill: none; stroke: rgba(130, 105, 75, .2); stroke-width: calc(1.3px / var(--k, 1)); }
.grid-off .sp-grid1 { display: none; }
/* tables */
.sp-item { cursor: move; outline: none; }
.sp-shadow { fill: rgba(70, 50, 30, .1); stroke: none; }
.sp-top { stroke-width: 2.2; }
.sp-cloth { fill: none; stroke-opacity: .14; stroke-width: 1.2; }
.sp-chair { stroke-width: 1.6; cursor: pointer; transition: stroke-width .12s, opacity .15s; }
.sp-chair:hover { stroke-width: 3.4; }
.sp-chair.is-target { fill: var(--sp-accent); stroke: var(--sp-accent-ink); stroke-width: 6; }
.sp-chair.is-lifted { opacity: .3; }
.sp-chair.is-flash { animation: sp-flash .9s ease-out; }
@keyframes sp-flash { 0% { stroke: var(--sp-accent); stroke-width: 14; } 100% { stroke-width: 1.6; } }
.sp-selring { fill: rgba(134, 200, 89, .08); stroke: var(--sp-accent-2); stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.sp-item:focus-visible .sp-top, .sp-item:focus-visible .sp-elbody { stroke: var(--sp-accent-2); stroke-width: 5; }
.sp-item.is-dragging { opacity: .9; }
.sp-item.is-held { opacity: .88; }
.sp-item.is-held .sp-top, .sp-item.is-held .sp-elbody { stroke: var(--sp-accent-2); stroke-width: 6; }
.sp-item.is-new { animation: sp-fade .45s ease-out; }
@keyframes sp-fade { from { opacity: 0; } }
.sp-names text { font-size: 15px; dominant-baseline: central; }
.sp-tname { font-family: var(--sp-serif); font-style: italic; text-anchor: middle; dominant-baseline: central; }
.sp-tcount { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-anchor: middle; dominant-baseline: central; fill: var(--sp-muted); }
.sp-tcount.is-full { fill: var(--sp-accent-ink); }
.sp-names, .sp-tname, .sp-tcount, .sp-ellabel, .sp-elicon { pointer-events: none; }
.lod-far .sp-names, .lod-far .sp-tcount { display: none; }
/* room items */
.sp-elbody { stroke-width: 2; }
.sp-door { fill: none; stroke-width: 2; }
.sp-hitbox { fill: transparent; stroke: none; }
.sp-opening { stroke: none; }
.sp-textbox { fill: transparent; stroke: transparent; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.sp-el-text:hover .sp-textbox, .sp-el-text.is-sel .sp-textbox { stroke: var(--sp-muted); }
.sp-elicon { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sp-ellabel { font-weight: 600; letter-spacing: 2.2px; text-anchor: middle; dominant-baseline: central; }
.sp-ellabel.is-text { font-family: var(--sp-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.sp-ghost { pointer-events: none; opacity: .72; }
/* screen-space overlay: dimension lines, handles, guides */
.sp-over { pointer-events: none; }
.sp-over .sp-h { pointer-events: all; cursor: pointer; }
.sp-hit { fill: transparent; stroke: none; }
.sp-hv { cursor: move !important; }
.sp-hv circle:not(.sp-hit) { fill: #fff; stroke: var(--sp-accent-ink); stroke-width: 2; }
.sp-hv:hover circle:not(.sp-hit) { fill: var(--sp-accent); }
.sp-hm { cursor: copy !important; }
.sp-hm circle:not(.sp-hit) { fill: rgba(255, 255, 255, .94); stroke: var(--sp-accent-2); stroke-width: 1.5; }
.sp-hm path { stroke: var(--sp-accent-ink); stroke-width: 1.6; stroke-linecap: round; }
.sp-hm:hover circle:not(.sp-hit) { fill: var(--sp-accent); }
.sp-knob > path { stroke: var(--sp-accent-2); stroke-width: 1.5; }
.sp-rot { cursor: grab !important; }
.sp-rot circle:not(.sp-hit) { fill: #fff; stroke: var(--sp-accent-2); stroke-width: 1.8; }
.sp-rot path { fill: none; stroke: var(--sp-accent-ink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.sp-rot:hover circle:not(.sp-hit) { fill: var(--sp-accent); }
.sp-rs { cursor: nwse-resize !important; }
.sp-rs[data-i="1"], .sp-rs[data-i="3"] { cursor: nesw-resize !important; }
.sp-rs rect:not(.sp-hit) { fill: #fff; stroke: var(--sp-accent-2); stroke-width: 1.8; }
.sp-dim path { stroke: rgba(90, 75, 58, .42); stroke-width: 1; fill: none; }
.sp-dim text {
  font-size: 11px; font-weight: 600; letter-spacing: .03em; fill: #6d6154; text-anchor: middle; dominant-baseline: central;
  paint-order: stroke; stroke: #ece6db; stroke-width: 6px; stroke-linejoin: round;
}
.sp-dim.is-on path { stroke: var(--sp-accent-ink); }
.sp-dim.is-on text { fill: var(--sp-accent-ink); }
.sp-guide { stroke: #e0607a; stroke-width: 1; stroke-dasharray: 4 4; fill: none; }
.sp-angle rect { fill: var(--sp-ink); }
.sp-angle text { fill: #fff; font-size: 11px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.is-placing .sp-svg .sp-table, .is-placing .sp-svg .sp-chair { cursor: copy; }
.is-guestdrag, .is-guestdrag * { cursor: grabbing !important; }
.is-adding, .is-adding * { cursor: copy !important; }
.sp-empty {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; margin: 0;
  padding: 12px 18px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--sp-ink-2);
  font-size: .92rem; pointer-events: none; box-shadow: var(--sp-shadow);
}
.sp-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* 4. Controls --------------------------------------------------------------- */
.sp-ibtn {
  appearance: none; border: 0; background: transparent; width: 38px; height: 38px; border-radius: 12px; padding: 0;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--sp-ink); flex: none;
  transition: background .15s, color .15s, transform .15s, opacity .15s;
}
.sp-ibtn:hover:not(:disabled) { background: var(--sp-hover); }
.sp-ibtn:active:not(:disabled) { transform: scale(.93); }
.sp-ibtn:disabled { opacity: .3; cursor: default; }
.sp-btn {
  appearance: none; border: 1px solid transparent; border-radius: 999px; padding: 9px 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .86rem/1.1 var(--sp-sans); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .2s, transform .15s, color .15s;
}
.sp-btn .sp-i { width: 18px; height: 18px; }
.sp-btn:disabled { opacity: .45; cursor: default; }
.sp-primary {
  background: var(--sp-accent); color: #10200a; font-family: var(--sp-cta); letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 18px -8px rgba(80, 150, 35, .8);
}
.sp-primary:hover:not(:disabled) { background: #94d167; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 26px -10px rgba(80, 150, 35, .85); }
.sp-primary:active:not(:disabled) { transform: none; }
.sp-primary.is-done { background: var(--sp-accent-ink); color: #fff; }
.sp-ghostbtn { background: rgba(255, 255, 255, .65); border-color: var(--sp-line-2); color: var(--sp-ink); }
.sp-ghostbtn:hover:not(:disabled) { background: #fff; border-color: rgba(60, 45, 30, .38); }
.sp-soft { background: rgba(60, 45, 30, .06); color: var(--sp-ink); }
.sp-soft:hover:not(:disabled) { background: rgba(60, 45, 30, .11); }
.sp-danger { color: var(--sp-danger) !important; }
.sp-danger-fill { background: var(--sp-danger); color: #fff; box-shadow: none; }
.sp-danger-fill:hover:not(:disabled) { background: #9a1f18; box-shadow: none; }
.sp-wide { width: 100%; }
.sp-spacer { flex: 1; }
.sp-muted { color: var(--sp-muted); font-size: .86rem; line-height: 1.5; }
.sp-small { font-size: .78rem; }
.sp-label { font: 600 .68rem/1.2 var(--sp-sans); letter-spacing: .11em; text-transform: uppercase; color: var(--sp-muted); }
.sp-in {
  width: 100%; min-width: 0; border: 1px solid var(--sp-line-2); border-radius: 12px; background: rgba(255, 255, 255, .88);
  padding: 9px 11px; font: 400 .92rem/1.3 var(--sp-sans); color: var(--sp-ink); transition: border-color .15s, box-shadow .15s;
}
.sp-in:focus { outline: none; border-color: var(--sp-accent-2); box-shadow: 0 0 0 3px var(--sp-accent-soft); background: #fff; }
.sp-in[type=number] { -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.sp-in[type=number]::-webkit-inner-spin-button, .sp-in[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sp-searchbox { position: relative; }
.sp-searchbox .sp-i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--sp-muted); pointer-events: none; }
.sp-searchbox .sp-in { padding-left: 35px; border-radius: 999px; }
.sp-field { display: flex; flex-direction: column; gap: 6px; }
.sp-field[hidden] { display: none !important; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sp-dims { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; max-width: 190px; }
.sp-dims span { color: var(--sp-muted); font-size: .85rem; }
.sp-dims .sp-in { text-align: center; padding: 8px 6px; }
.sp-switch { display: flex; align-items: center; gap: 10px; font-size: .88rem; cursor: pointer; position: relative; line-height: 1.3; }
.sp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sp-switch-ui { width: 36px; height: 21px; border-radius: 999px; background: rgba(60, 45, 30, .2); position: relative; transition: background .2s; flex: none; }
.sp-switch-ui::after { content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.sp-switch input:checked + .sp-switch-ui { background: var(--sp-accent-2); }
.sp-switch input:checked + .sp-switch-ui::after { transform: translateX(15px); }
.sp-switch input:focus-visible + .sp-switch-ui { outline: 2.5px solid var(--sp-accent-2); outline-offset: 2px; }
.sp-gchip {
  appearance: none; border: 1px solid var(--sp-line); background: rgba(255, 255, 255, .72); border-radius: 999px;
  padding: 5px 10px 5px 8px; font: 500 .76rem/1.1 var(--sp-sans); display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; color: var(--sp-ink-2); transition: background .15s, border-color .15s, color .15s; max-width: 100%;
}
.sp-gchip span { color: var(--sp-muted); font-variant-numeric: tabular-nums; }
.sp-gchip:hover { border-color: var(--sp-line-2); background: #fff; }
.sp-gchip.is-on { background: var(--sp-ink); color: #fff; border-color: var(--sp-ink); }
.sp-gchip.is-on span { color: rgba(255, 255, 255, .7); }
.sp-gchip.is-static { cursor: default; }
.sp-gchip .sp-i { width: 14px; height: 14px; }
.sp-gchip-new { border-style: dashed; }
.sp-gchip-edit { padding: 5px 8px; }
.sp-art { fill: #fff; stroke: var(--sp-ink); stroke-width: 1.4; display: block; }
.sp-art circle:not(.t) { fill: var(--c); }
.sp-linkbtn {
  appearance: none; border: 0; background: none; padding: 4px 0; display: inline-flex; align-items: center; gap: 7px;
  font: 500 .85rem var(--sp-sans); color: var(--sp-ink-2); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--sp-line-2); text-underline-offset: 3px;
}
.sp-linkbtn:hover { text-decoration-color: currentColor; }
.sp-linkbtn .sp-i { width: 17px; height: 17px; }
.sp-hint { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: rgba(134, 200, 89, .13); border-radius: 12px; font-size: .84rem; line-height: 1.45; color: var(--sp-ink-2); }
.sp-hint .sp-i { color: var(--sp-accent-ink); margin-top: 1px; }

/* 5. Title card, top bar, tool rail ---------------------------------------- */
.sp-title { position: absolute; top: 14px; left: 14px; z-index: 10; padding: 11px 16px 10px; width: min(330px, calc(100% - 560px)); min-width: 230px; }
.sp-h1 { margin: 0; font: 600 .66rem/1.25 var(--sp-sans); letter-spacing: .15em; text-transform: uppercase; color: var(--sp-accent-ink); }
.sp-ptitle-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 2px; }
.sp-ptitle {
  flex: 1 1 100%; min-width: 0; border: 0; background: transparent; padding: 2px 6px; margin: 0 -6px;
  font: italic 400 1.5rem/1.25 var(--sp-serif); color: var(--sp-ink); border-radius: 8px; transition: background .15s;
}
.sp-ptitle::placeholder { color: #b0a698; }
.sp-ptitle:hover { background: var(--sp-hover); }
.sp-ptitle:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--sp-accent-soft); }
.sp-datewrap { position: relative; display: inline-flex; margin: 0 -6px; border-radius: 8px; transition: background .15s; }
.sp-datewrap:hover { background: var(--sp-hover); }
.sp-datewrap:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--sp-accent-soft); }
.sp-datebtn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; font: 500 .8rem/1.2 var(--sp-sans); color: var(--sp-ink-2); }
.sp-datebtn .sp-i { width: 15px; height: 15px; color: var(--sp-muted); }
.sp-datebtn.is-empty { color: var(--sp-accent-ink); }
.sp-pdate { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer; font-size: 16px; }
.sp-pdate::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sp-savedmark { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; color: var(--sp-accent-ink); opacity: 0; transition: opacity .4s; margin-left: auto; }
.sp-savedmark .sp-i { width: 14px; height: 14px; stroke-width: 2.2; }
.sp-title.is-saved .sp-savedmark { opacity: 1; transition-duration: .1s; }
.sp-top { position: absolute; top: 14px; right: 14px; z-index: 10; display: flex; align-items: center; gap: 3px; padding: 6px; border-radius: 17px; }
.sp-sep { width: 1px; height: 22px; background: var(--sp-line-2); margin: 0 5px; flex: none; }
.sp-filebtn { padding: 8px 10px 8px 12px; border-color: transparent; background: transparent; }
.sp-filebtn .sp-chev { width: 16px; height: 16px; margin-left: -3px; opacity: .55; }
.sp-top .sp-primary { margin-left: 4px; padding: 10px 17px; }
.sp-menu {
  position: absolute; z-index: 20; min-width: 236px; padding: 6px; display: flex; flex-direction: column; gap: 1px;
  background: var(--sp-solid); animation: sp-drop .16s ease-out;
}
.sp-menu hr { border: 0; height: 1px; background: var(--sp-line); margin: 5px 6px; }
.sp-menuitem {
  appearance: none; border: 0; background: transparent; display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 9px 12px; border-radius: 10px; font: 500 .88rem var(--sp-sans); cursor: pointer; color: var(--sp-ink);
}
.sp-menuitem:hover, .sp-menuitem:focus-visible { background: var(--sp-hover); outline: none; }
.sp-menuitem .sp-i { width: 19px; height: 19px; color: var(--sp-ink-2); }
.sp-rail {
  position: absolute; left: 14px; top: max(122px, calc(50% - 176px)); z-index: 10; width: 78px;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-radius: 22px;
}
.sp-tool {
  appearance: none; border: 0; background: transparent; border-radius: 15px; padding: 8px 3px 7px; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer;
  font: 600 .7rem/1.1 var(--sp-sans); color: var(--sp-ink-2); transition: background .15s;
}
.sp-tool .sp-i {
  width: 42px; height: 42px; padding: 10px; border-radius: 13px; background: var(--c); color: var(--sp-ink);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
}
.sp-tool:hover .sp-i { transform: translateY(-1px) scale(1.05); }
.sp-tool.is-on { background: rgba(60, 45, 30, .07); }
.sp-tool.is-on .sp-i { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--sp-ink); }
.sp-tool-more { display: none; }
.sp-badge {
  position: absolute; top: 3px; right: 7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #e0607a; color: #fff; font: 700 .66rem/19px var(--sp-sans); text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* 6. Fly-out (tables / venue) ---------------------------------------------- */
.sp-fly {
  position: absolute; left: 102px; top: max(122px, calc(50% - 176px)); z-index: 14; width: 318px;
  max-height: calc(100% - 136px); overflow-y: auto; padding: 16px; border-radius: 22px; background: var(--sp-solid);
  animation: sp-slide .22s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain;
}
.sp-fly-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -4px -6px 6px 0; }
.sp-fly h2 { font: italic 400 1.35rem/1.2 var(--sp-serif); margin: 0; }
.sp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sp-card {
  appearance: none; border: 1px solid var(--sp-line); background: rgba(255, 255, 255, .8); border-radius: 16px;
  padding: 12px 8px 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: grab;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, border-color .2s, background .2s; touch-action: manipulation;
}
.sp-card:hover { transform: translateY(-2px); background: #fff; border-color: transparent; box-shadow: 0 12px 26px -14px rgba(50, 35, 20, .55); }
.sp-card:active { cursor: grabbing; }
.sp-card .sp-art { width: 66px; height: 49px; margin-bottom: 4px; }
.sp-card b { font: 600 .84rem/1.2 var(--sp-sans); text-align: center; }
.sp-card span { font-size: .74rem; color: var(--sp-muted); }
.sp-fly.is-dragging .sp-card { pointer-events: none; }
.sp-elgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.sp-elbtn {
  appearance: none; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 12px;
  border: 1px solid transparent; background: var(--c); color: var(--i); font: 600 .8rem/1.2 var(--sp-sans);
  cursor: grab; text-align: left; transition: border-color .15s, transform .15s; touch-action: manipulation;
}
.sp-elbtn:hover { border-color: currentColor; transform: translateY(-1px); }
.sp-elbtn .sp-i { width: 20px; height: 20px; }
.sp-fly-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sp-line); display: flex; flex-direction: column; gap: 10px; }
.sp-fly-sec h3 { font: 600 .68rem/1.2 var(--sp-sans); letter-spacing: .11em; text-transform: uppercase; color: var(--sp-muted); }

/* 7. Guest list -------------------------------------------------------------- */
.sp-guests {
  position: absolute; right: 14px; top: 78px; bottom: 14px; z-index: 12; width: 340px;
  display: flex; flex-direction: column; padding-top: 16px; border-radius: 22px; overflow: hidden; background: rgba(255, 253, 250, .92);
  transition: box-shadow .2s, transform .25s, opacity .25s;
}
.sp-guests > * { margin-inline: 16px; }
.sp-guests-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-right: 10px; }
.sp-guests h2 { font: italic 400 1.45rem/1.15 var(--sp-serif); margin: 0; }
.sp-guests-count { font-size: .78rem; color: var(--sp-muted); }
.sp-guests-progress { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--sp-ink-2); }
.sp-guests-progress.is-done { color: var(--sp-accent-ink); font-weight: 600; }
.sp-meter { display: block; height: 8px; border-radius: 999px; background: rgba(60, 45, 30, .08); overflow: hidden; }
.sp-meter i { display: block; height: 100%; border-radius: inherit; background: var(--sp-ribbon); background-size: 308px 100%; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.sp-guests-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sp-guests-actions .sp-btn { padding: 8px 11px; font-size: .79rem; }
.sp-guests-actions .sp-auto { background: linear-gradient(135deg, #f8d9df, #f8e9cc 55%, #dbeed5); }
.sp-guests-actions .sp-auto:hover:not(:disabled) { filter: saturate(1.3) brightness(.98); }
.sp-addrow { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.sp-guests .sp-searchbox { margin-top: 12px; }
.sp-guests .sp-searchbox[hidden], .sp-groupchips[hidden], .sp-tabs[hidden] { display: none !important; }
.sp-groupchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.sp-tabs { display: flex; gap: 2px; margin-top: 10px; padding: 3px; background: rgba(60, 45, 30, .06); border-radius: 12px; }
.sp-tab {
  flex: 1; appearance: none; border: 0; background: transparent; padding: 7px 4px; border-radius: 9px;
  font: 600 .76rem var(--sp-sans); color: var(--sp-muted); cursor: pointer; display: flex; justify-content: center; gap: 6px;
}
.sp-tab span { opacity: .75; font-variant-numeric: tabular-nums; }
.sp-tab.is-on { background: #fff; color: var(--sp-ink); box-shadow: 0 1px 3px rgba(50, 35, 20, .16); }
.sp-glist { list-style: none; margin: 8px 0 0; padding: 0 8px 12px; flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.sp-gh {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 7px; padding: 12px 8px 5px;
  font: 600 .68rem var(--sp-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--sp-muted);
  background: linear-gradient(rgba(255, 253, 250, .98) 75%, rgba(255, 253, 250, 0));
}
.sp-g { display: flex; align-items: center; border-radius: 12px; transition: background .12s; }
.sp-g:hover { background: rgba(60, 45, 30, .05); }
.sp-g-main {
  flex: 1; min-width: 0; appearance: none; border: 0; background: transparent; display: flex; align-items: center; gap: 9px;
  padding: 8px; text-align: left; cursor: grab; font: 400 .9rem/1.25 var(--sp-sans); color: var(--sp-ink);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border-radius: 12px;
}
.sp-g.is-seated .sp-g-main { cursor: pointer; }
.sp-g-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-g-where { font: italic 400 .8rem var(--sp-serif); color: var(--sp-muted); white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.sp-g-grip { color: var(--sp-muted); opacity: 0; transition: opacity .15s; }
.sp-g-grip .sp-i { width: 16px; height: 16px; }
.sp-g:hover .sp-g-grip { opacity: .75; }
.sp-g-edit { width: 32px; height: 32px; opacity: 0; }
.sp-g-edit .sp-i { width: 17px; height: 17px; }
.sp-g:hover .sp-g-edit, .sp-g-edit:focus-visible { opacity: .8; }
.sp-g.is-placing { background: var(--sp-accent-soft); box-shadow: inset 0 0 0 1.5px var(--sp-accent-2); }
.sp-gnone { padding: 18px 10px; color: var(--sp-muted); font-size: .88rem; text-align: center; }
.sp-gempty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 14px; text-align: center; }
.sp-gempty-art { width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, #f6d3da, #f7e6c4 50%, #d6e6f6); }
.sp-gempty-art .sp-i { width: 30px; height: 30px; }
.sp-gempty h3 { font: italic 400 1.3rem var(--sp-serif); margin-top: 4px; }
.sp-gempty p { color: var(--sp-ink-2); font-size: .88rem; line-height: 1.55; }
.sp-guests-foot { margin: 0; padding: 10px 16px 12px; font-size: .74rem; line-height: 1.4; color: var(--sp-muted); border-top: 1px solid var(--sp-line); }
.sp-guests.is-droptarget { box-shadow: var(--sp-shadow), 0 0 0 3px var(--sp-accent); }
@media (hover: none) { .sp-g-edit { opacity: .55; } }

/* 8. Bottom bar: zoom and the guest count ------------------------------------ */
.sp-bottom { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 10; height: 46px; pointer-events: none; transition: right .25s; }
.sp-bottom > * { pointer-events: auto; }
.has-guests .sp-bottom { right: 368px; }
.sp-zoom { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 1px; padding: 5px; border-radius: 16px; }
.sp-zoom .sp-ibtn { width: 34px; height: 34px; border-radius: 10px; }
.sp-zoom .sp-sep { height: 18px; margin: 0 3px; }
.sp-zoomval { appearance: none; border: 0; background: transparent; min-width: 54px; height: 34px; border-radius: 10px; font: 600 .8rem var(--sp-sans); font-variant-numeric: tabular-nums; cursor: pointer; }
.sp-zoomval:hover { background: var(--sp-hover); }
.sp-stats {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px; font-size: .82rem; color: var(--sp-ink-2); white-space: nowrap;
}
.sp-stat b { color: var(--sp-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.sp-dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--sp-muted); opacity: .55; flex: none; }
.sp-stat-progress { display: flex; align-items: center; gap: 9px; }
.sp-stat-progress .sp-meter { width: 88px; height: 6px; }
.sp-stat-progress .sp-meter i { background-size: 88px 100%; }
.sp-stat-progress.is-done { color: var(--sp-accent-ink); font-weight: 600; }
.sp-fab { display: none; }

/* 9. Popovers ---------------------------------------------------------------- */
.sp-pop {
  position: absolute; left: 0; top: 0; z-index: 16; width: 332px; max-height: calc(100% - 100px);
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: rgba(255, 253, 250, .97);
  animation: sp-pop-in .18s ease-out; outline: none;
}
.sp-pop-head { display: flex; align-items: center; gap: 4px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--sp-line); }
.sp-pop-head > .sp-ibtn:first-child { margin-left: -6px; }
.sp-pop-title {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 6px; margin-left: -4px; border-radius: 8px;
  font: italic 400 1.38rem/1.2 var(--sp-serif); color: var(--sp-ink);
}
.sp-pop-title:hover { background: var(--sp-hover); }
.sp-pop-title:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1px var(--sp-accent-2), 0 0 0 3px var(--sp-accent-soft); }
.sp-pop-kicker { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sp-pop-kicker span { font: 600 .66rem var(--sp-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sp-muted); }
.sp-pop-kicker b { font: italic 400 1.28rem/1.2 var(--sp-serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-pop-body { padding: 12px 16px 14px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.sp-pop-foot { display: flex; align-items: center; gap: 2px; padding: 8px 10px 10px 14px; border-top: 1px solid var(--sp-line); }
.sp-pop-foot .sp-btn { padding: 8px 12px; font-size: .8rem; }
.sp-shapes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.sp-shape { appearance: none; border: 1.5px solid transparent; background: rgba(60, 45, 30, .045); border-radius: 11px; padding: 6px 3px; cursor: pointer; transition: background .15s, border-color .15s; }
.sp-shape:hover { background: rgba(60, 45, 30, .09); }
.sp-shape.is-on { background: #fff; border-color: var(--sp-ink); }
.sp-shape .sp-art { width: 100%; height: 26px; }
.sp-stepper { display: grid; grid-template-columns: 34px 54px 34px; gap: 4px; align-items: center; }
.sp-stepper .sp-in { text-align: center; padding: 7px 4px; font-weight: 600; }
.sp-stepper .sp-ibtn, .sp-rotbtns .sp-ibtn { width: 34px; height: 34px; background: rgba(60, 45, 30, .055); }
.sp-stepper .sp-ibtn:hover:not(:disabled), .sp-rotbtns .sp-ibtn:hover { background: rgba(60, 45, 30, .11); }
.sp-rotbtns { display: flex; align-items: center; gap: 4px; }
.sp-rotbtns output { min-width: 44px; text-align: center; font: 600 .85rem var(--sp-sans); font-variant-numeric: tabular-nums; }
.sp-seats-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
.sp-seats { list-style: none; margin: -4px -8px 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sp-seats li { display: flex; align-items: center; }
.sp-seat {
  flex: 1; min-width: 0; appearance: none; border: 0; background: transparent; display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 10px; text-align: left; cursor: pointer; font: 400 .9rem/1.2 var(--sp-sans); color: var(--sp-ink);
}
.sp-seat:hover { background: rgba(60, 45, 30, .055); }
.sp-seat-n { width: 18px; text-align: right; font: 600 .72rem var(--sp-sans); color: var(--sp-muted); font-variant-numeric: tabular-nums; flex: none; }
.sp-seat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-seat-empty { display: flex; align-items: center; gap: 8px; color: var(--sp-accent-ink); font-size: .86rem; font-weight: 500; }
.sp-seat-empty .sp-i { width: 18px; height: 18px; padding: 2px; border-radius: 50%; border: 1.5px dashed currentColor; stroke-width: 2.2; }
.sp-seat-x { width: 30px; height: 30px; opacity: 0; }
.sp-seat-x .sp-i { width: 16px; height: 16px; }
.sp-seats li:hover .sp-seat-x, .sp-seat-x:focus-visible { opacity: .7; }
@media (hover: none) { .sp-seat-x { opacity: .55; } }
.sp-pick { gap: 8px; }
.sp-picks { display: flex; flex-direction: column; gap: 1px; max-height: min(44vh, 380px); overflow-y: auto; margin: 0 -10px; padding: 0 4px 2px; overscroll-behavior: contain; }
.sp-pick-group { margin: 9px 6px 3px; display: flex; align-items: center; gap: 6px; font: 600 .66rem var(--sp-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--sp-muted); }
.sp-pick-group:first-child { margin-top: 2px; }
.sp-pickrow {
  appearance: none; border: 0; background: transparent; display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 10px; text-align: left; cursor: pointer; font: 400 .92rem/1.2 var(--sp-sans); color: var(--sp-ink);
}
.sp-pickrow:hover, .sp-pickrow.is-hi { background: var(--sp-accent-soft); }
.sp-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-pick-where { font: italic 400 .8rem var(--sp-serif); color: var(--sp-muted); white-space: nowrap; }
.sp-pick-new { color: var(--sp-accent-ink); font-weight: 600; }
.sp-pick-new .sp-i { width: 18px; height: 18px; }
.sp-pick-empty { margin: 4px 6px 8px; color: var(--sp-ink-2); font-size: .88rem; line-height: 1.5; }
.sp-picks > .sp-btn { align-self: flex-start; margin: 0 6px 6px; }
.sp-guestcard { display: flex; flex-direction: column; gap: 12px; }
.sp-gchips { display: flex; flex-wrap: wrap; gap: 5px; }
.sp-where { display: flex; align-items: center; gap: 7px; margin: 0; }
.sp-where .sp-i { width: 16px; height: 16px; }
.sp-grouplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-grouprow { display: flex; align-items: center; gap: 6px; }
.sp-grouprow .sp-in { padding: 7px 10px; }
.sp-swatchbtn { appearance: none; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--sp-line-2); cursor: pointer; flex: none; padding: 0; transition: transform .15s; }
.sp-swatchbtn:hover { transform: scale(1.08); }
.sp-swatchbtn.is-on { box-shadow: 0 0 0 2px var(--sp-ink); }
.sp-groupcount { min-width: 22px; text-align: center; font-size: .8rem; }
.sp-palette { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px 34px; }

/* 10. Placing banner, welcome card, toasts ------------------------------------ */
.sp-banner {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 18; max-width: min(520px, calc(100% - 700px));
  min-width: 280px; display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 16px; border-radius: 999px;
  font: 600 .88rem/1.25 var(--sp-sans); background: #fff; box-shadow: var(--sp-shadow), 0 0 0 2px var(--sp-accent);
  animation: sp-drop .25s ease-out;
}
.sp-banner span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-banner .sp-btn { padding: 7px 13px; font-size: .8rem; }
.sp-welcome {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 15; width: min(580px, calc(100% - 240px));
  padding: 22px 24px 20px; border-radius: 24px; display: flex; flex-direction: column; gap: 16px; background: rgba(255, 253, 250, .94);
  animation: sp-rise .6s .35s both cubic-bezier(.2, .8, .2, 1); overflow: hidden;
}
.sp-welcome::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--sp-ribbon); }
.has-guests .sp-welcome { left: calc((100% - 354px) / 2); width: min(560px, calc(100% - 600px)); min-width: 380px; }
.sp-welcome h2 { font: italic 400 1.55rem/1.2 var(--sp-serif); margin: 0 34px 6px 0; }
.sp-welcome p { color: var(--sp-ink-2); line-height: 1.55; font-size: .93rem; }
.sp-welcome-x { position: absolute; top: 12px; right: 12px; }
.sp-toasts { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); z-index: 22; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 28px); }
.has-guests .sp-toasts { left: calc((100% - 354px) / 2); }
.sp-toast.sp-glass {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 14px;
  background: rgba(30, 26, 22, .92); color: #fff; border: 0; font-size: .87rem; line-height: 1.35;
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 14px 32px -12px rgba(0, 0, 0, .55); animation: sp-rise .25s ease-out;
}
.sp-toast:not(:has(button)) { padding-right: 16px; }
.sp-toast.is-err { background: #8f1d16; }
.sp-toast.is-out { opacity: 0; translate: 0 6px; transition: opacity .2s, translate .2s; }
.sp-toast-undo { appearance: none; border: 0; background: rgba(255, 255, 255, .15); color: #fff; padding: 6px 12px; border-radius: 999px; font: 600 .8rem var(--sp-sans); cursor: pointer; flex: none; }
.sp-toast-undo:hover { background: rgba(255, 255, 255, .26); }
.sp-ghostchip {
  position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 999px; background: #fff; color: #1f1c18; font: 600 .88rem/1.2 "Inter", system-ui, sans-serif;
  box-shadow: 0 16px 36px -10px rgba(40, 25, 10, .5), 0 0 0 1px rgba(60, 45, 30, .1); white-space: nowrap;
}
.sp-ghostchip .sp-dot { width: 12px; height: 12px; }
.sp-ghostchip[hidden] { display: none; }
@keyframes sp-pop-in { from { opacity: 0; scale: .97; } }
@keyframes sp-drop { from { opacity: 0; translate: 0 -6px; } }
@keyframes sp-rise { from { opacity: 0; translate: 0 10px; } }
@keyframes sp-slide { from { opacity: 0; translate: -8px 0; } }
@keyframes sp-sheet { from { translate: 0 40px; opacity: 0; } }
@keyframes sp-dlg { from { opacity: 0; translate: 0 14px; scale: .98; } }
@keyframes sp-bounce { 0% { scale: .4; } 60% { scale: 1.15; } 100% { scale: 1; } }

/* 11. Dialogs (import, templates, download, help, confirm) ---------------------- */
.sp-dialog {
  border: 0; padding: 0; border-radius: 26px; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  background: var(--sp-solid); color: var(--sp-ink); box-shadow: var(--sp-shadow-lg); overflow: hidden; font-family: var(--sp-sans);
}
.sp-dialog[open] { display: flex; animation: sp-dlg .3s cubic-bezier(.2, .8, .2, 1); }
.sp-dialog::backdrop { background: rgba(30, 22, 14, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sp-dlg-inner { position: relative; display: flex; flex-direction: column; width: 100%; max-height: calc(100dvh - 32px); min-height: 0; }
.sp-dlg-inner::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--sp-ribbon); z-index: 1; }
.sp-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 24px 18px 6px 26px; }
.sp-dlg-head h2 { font: italic 400 1.7rem/1.15 var(--sp-serif); margin: 0; letter-spacing: 0; }
.sp-dlg-kicker { font: 600 .68rem/1.2 var(--sp-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sp-accent-ink); margin: 0 0 4px; }
.sp-dlg-body { padding: 8px 26px 20px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.sp-dlg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px 18px 26px; border-top: 1px solid var(--sp-line); }
.sp-lede { color: var(--sp-ink-2); line-height: 1.55; }
/* import */
.sp-dialog-import { width: min(1000px, calc(100vw - 24px)); }
.sp-import { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sp-import-main, .sp-import-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sp-textarea { resize: vertical; min-height: 230px; font: 400 .92rem/1.6 var(--sp-sans); border-radius: 16px; padding: 12px 14px; }
.sp-imp-preview { display: flex; flex-direction: column; gap: 8px; }
.sp-imp-count { font-weight: 600; font-size: .92rem; }
.sp-imp-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-imp-groups:empty { display: none; }
.sp-imp-warn { padding: 9px 12px; border-radius: 12px; background: #fff3dc; color: #74480a; font-size: .84rem; line-height: 1.45; }
.sp-imp-mode { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.sp-radio { display: flex; gap: 9px; align-items: flex-start; font-size: .9rem; cursor: pointer; line-height: 1.35; }
.sp-radio input { margin: 2px 0 0; accent-color: var(--sp-accent-2); width: 16px; height: 16px; flex: none; }
.sp-radio em { font-style: normal; color: var(--sp-muted); }
.sp-howto { padding: 14px 16px; border-radius: 18px; background: rgba(60, 45, 30, .045); font-size: .86rem; line-height: 1.5; color: var(--sp-ink-2); display: flex; flex-direction: column; gap: 9px; }
.sp-example, .sp-prompt {
  padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--sp-line); color: var(--sp-ink);
  font: 400 .76rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
}
.sp-prompt { max-height: 230px; overflow: auto; }
.sp-ai {
  padding: 16px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; font-size: .86rem; line-height: 1.5;
  background: linear-gradient(135deg, #fdeef1 0%, #fcf3e2 50%, #edf6e8 100%); border: 1px solid rgba(232, 144, 159, .28);
}
.sp-ai p { color: var(--sp-ink-2); }
.sp-ai-head { display: flex; align-items: center; gap: 8px; }
.sp-ai-head h3 { font: italic 400 1.18rem var(--sp-serif); }
.sp-ai-head .sp-i { color: #c4607a; }
/* templates */
.sp-dialog-tpl { width: min(740px, calc(100vw - 24px)); }
.sp-tpls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sp-tpl {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 18px; cursor: pointer;
  border: 1.5px solid var(--sp-line); background: rgba(255, 255, 255, .7); transition: border-color .15s, box-shadow .15s, transform .2s;
}
.sp-tpl:hover { transform: translateY(-2px); background: #fff; }
.sp-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.sp-tpl:has(input:checked) { border-color: var(--sp-ink); background: #fff; box-shadow: 0 0 0 4px var(--sp-accent-soft); }
.sp-tpl:has(input:focus-visible) { outline: 2.5px solid var(--sp-accent-2); outline-offset: 2px; }
.sp-tpl-art { display: block; aspect-ratio: 3 / 2; border-radius: 12px; background: #f3eee5; padding: 8px; margin-bottom: 7px; }
.sp-tpl-art svg { width: 100%; height: 100%; fill: #fff; stroke: var(--sp-ink); stroke-width: 1.6; display: block; }
.sp-tpl:nth-child(1) .sp-tpl-art circle { fill: #f6c9d1; }
.sp-tpl:nth-child(2) .sp-tpl-art rect:not(:first-child) { fill: #d4e9cc; }
.sp-tpl:nth-child(3) .sp-tpl-art path { fill: #f7e1b5; }
.sp-tpl-room { fill: #fbf8f2 !important; stroke-dasharray: 4 3; }
.sp-tpl b { font-size: .92rem; }
.sp-tpl > span:last-child { font-size: .76rem; color: var(--sp-muted); line-height: 1.35; }
.sp-tpl-opts { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
.sp-field-inline { flex-direction: row; align-items: center; gap: 10px; }
.sp-field-inline .sp-in { width: 100px; }
/* download */
.sp-dialog-export { width: min(1000px, calc(100vw - 24px)); }
.sp-export { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, 1fr); gap: 24px; align-items: start; }
.sp-preview { background: linear-gradient(135deg, #ece5d9, #e2dacb); border-radius: 20px; padding: 22px; display: grid; place-items: center; min-height: 280px; }
.sp-preview-paper { display: inline-block; line-height: 0; background: #fff; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 16px 34px -14px rgba(50, 35, 20, .55); overflow: hidden; }
.sp-preview-paper canvas { display: block; max-width: 100%; max-height: 50vh; width: auto; height: auto; }
.sp-export-opts { display: flex; flex-direction: column; gap: 16px; }
.sp-export-opts [hidden] { display: none !important; }
.sp-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sp-kind { position: relative; cursor: pointer; }
.sp-kind input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.sp-kind > span {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; height: 100%; padding: 10px 10px 9px; border-radius: 14px;
  border: 1.5px solid var(--sp-line); background: rgba(255, 255, 255, .7); transition: border-color .15s, box-shadow .15s, background .15s;
}
.sp-kind .sp-i { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: #f6d3da; margin-bottom: 4px; }
.sp-kind:nth-child(2) .sp-i { background: #f7e6c4; }
.sp-kind:nth-child(3) .sp-i { background: #d8ecd2; }
.sp-kind b { font-size: .84rem; line-height: 1.2; }
.sp-kind em { font-style: normal; font-size: .72rem; color: var(--sp-muted); line-height: 1.25; }
.sp-kind:hover > span { background: #fff; }
.sp-kind input:checked + span { border-color: var(--sp-ink); background: #fff; box-shadow: 0 0 0 3px var(--sp-accent-soft); }
.sp-kind input:focus-visible + span { outline: 2.5px solid var(--sp-accent-2); outline-offset: 2px; }
.sp-card-info { margin: 0; }
.sp-seg { display: flex; gap: 2px; padding: 3px; background: rgba(60, 45, 30, .06); border-radius: 12px; }
.sp-seg label { flex: 1; position: relative; cursor: pointer; }
.sp-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sp-seg span { display: block; text-align: center; padding: 8px 8px; border-radius: 9px; font: 600 .8rem var(--sp-sans); color: var(--sp-muted); transition: background .15s, color .15s; }
.sp-seg input:checked + span { background: #fff; color: var(--sp-ink); box-shadow: 0 1px 3px rgba(50, 35, 20, .16); }
.sp-seg input:focus-visible + span { outline: 2.5px solid var(--sp-accent-2); outline-offset: 1px; }
.sp-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.sp-swatch { position: relative; cursor: pointer; display: block; }
.sp-swatch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.sp-swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #fff; background: var(--sw); box-shadow: 0 0 0 1px var(--sp-line-2); transition: transform .15s; }
.sp-swatch:hover span { transform: scale(1.08); }
.sp-swatch input:checked + span, .sp-swatch-custom.is-on span { box-shadow: 0 0 0 2px var(--sp-ink); }
.sp-swatch input:focus-visible + span { outline: 2.5px solid var(--sp-accent-2); outline-offset: 2px; }
.sp-swatch-custom:not(.is-on) span { background: conic-gradient(#e8909f, #f2a46f, #e2bd50, #8cc184, #7fb0df, #b29ae2, #e8909f); }
.sp-toggles { display: flex; flex-direction: column; gap: 11px; }
.sp-exp-save { margin: 0; }
.sp-done { gap: 20px; }
.sp-done-msg { display: flex; gap: 14px; align-items: flex-start; }
.sp-done-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--sp-accent); display: grid; place-items: center; flex: none; animation: sp-bounce .55s cubic-bezier(.2, 1.4, .4, 1); }
.sp-done-ic .sp-i { width: 24px; height: 24px; stroke-width: 2.5; color: #10200a; }
.sp-done-msg h3 { font: italic 400 1.45rem var(--sp-serif); margin-bottom: 4px; }
.sp-done-msg p { color: var(--sp-ink-2); line-height: 1.5; margin-bottom: 4px; }
.sp-ad { display: grid; grid-template-columns: 210px 1fr; border-radius: 20px; overflow: hidden; background: #1b1916; color: #fff; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.sp-ad:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); }
.sp-ad img { width: 100%; height: 100%; min-height: 170px; object-fit: cover; display: block; }
.sp-ad-text { padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.sp-ad-text .sp-dlg-kicker { color: var(--sp-accent); margin: 0; }
.sp-ad-text b { font: italic 400 1.28rem/1.25 var(--sp-serif); }
.sp-ad-text span { color: rgba(255, 255, 255, .76); font-size: .87rem; line-height: 1.5; }
.sp-ad-text .sp-ad-cta { color: var(--sp-accent); font-weight: 600; margin-top: 4px; }
/* help */
.sp-dialog-help { width: min(640px, calc(100vw - 24px)); }
.sp-helplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sp-helplist li { display: flex; gap: 14px; align-items: flex-start; }
.sp-help-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.sp-helplist li:nth-child(1) .sp-help-ic { background: #d6e6f6; }
.sp-helplist li:nth-child(2) .sp-help-ic { background: #f6d3da; }
.sp-helplist li:nth-child(3) .sp-help-ic { background: #f7e6c4; }
.sp-helplist li:nth-child(4) .sp-help-ic { background: #d8ecd2; }
.sp-helplist li:nth-child(5) .sp-help-ic { background: #e6def6; }
.sp-helplist b { display: block; font-size: .96rem; margin-bottom: 2px; }
.sp-helplist p { color: var(--sp-ink-2); font-size: .9rem; line-height: 1.5; }
.sp-keys { padding: 14px 16px; border-radius: 18px; background: rgba(60, 45, 30, .045); }
.sp-keys h3 { font: 600 .68rem var(--sp-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sp-muted); margin-bottom: 10px; }
.sp-keys ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: .85rem; }
.sp-keys li { display: flex; align-items: center; gap: 8px; }
.sp-keys kbd { font: 600 .74rem var(--sp-sans); padding: 3px 7px; border-radius: 6px; background: #fff; border: 1px solid var(--sp-line-2); border-bottom-width: 2px; white-space: nowrap; }
.sp-help-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }
.sp-link { display: inline-flex; align-items: center; gap: 7px; color: var(--sp-accent-ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.sp-link:hover { text-decoration: underline; }
.sp-link .sp-i { width: 17px; height: 17px; }
@media (hover: none) { .sp-keys { display: none; } }
/* confirm */
.sp-dialog-confirm { width: min(420px, calc(100vw - 24px)); }
.sp-dialog-confirm .sp-dlg-inner { padding: 26px 20px 18px 26px; gap: 20px; }
.sp-confirm-text { font-size: 1rem; line-height: 1.5; }
@media (max-width: 880px) {
  .sp-import, .sp-export { grid-template-columns: minmax(0, 1fr); }
  .sp-tpls { grid-template-columns: 1fr 1fr; }
}

/* Short screens: a more compact rail -------------------------------------- */
@media (min-width: 760px) and (max-height: 780px) {
  .sp-rail { top: max(116px, calc(50% - 150px)); }
  .sp-fly { top: max(116px, calc(50% - 150px)); max-height: calc(100% - 130px); }
  .sp-tool { padding: 5px 3px; gap: 3px; }
  .sp-tool .sp-i { width: 36px; height: 36px; padding: 8px; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  .sp-guests { width: 320px; }
  .has-guests .sp-bottom { right: 348px; }
  .has-guests .sp-stats { display: none; }
  .sp-title { width: min(300px, calc(100% - 420px)); min-width: 220px; }
  .sp-welcome, .has-guests .sp-welcome { left: 104px; right: 14px; width: auto; min-width: 0; max-width: 560px; transform: none; }
  .has-guests .sp-welcome { right: 354px; }
  .has-guests .sp-toasts { left: calc((100% - 354px) / 2 + 45px); }
}

/* 12. Phones: bars at the top and bottom, panels as sheets ------------------ */
@media (max-width: 759px) {
  .sp-title { top: 10px; left: 10px; width: auto; max-width: calc(100% - 150px); min-width: 0; padding: 8px 12px 8px; border-radius: 16px; }
  .sp-h1 { font-size: .58rem; letter-spacing: .12em; }
  .sp-ptitle { font-size: 1.12rem; }
  .sp-datewrap, .sp-savedmark { display: none; }
  .sp-top { top: 10px; right: 10px; padding: 4px; gap: 0; border-radius: 15px; }
  .sp-top .sp-sep, .sp-filebtn, .sp-fullbtn { display: none; }
  .sp-top .sp-ibtn { width: 36px; height: 36px; }
  .sp-top .sp-primary { padding: 9px 11px; margin-left: 2px; }
  .sp-top .sp-primary span { display: none; }
  .sp-rail {
    top: auto; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: auto;
    flex-direction: row; justify-content: space-between; padding: 5px; gap: 0; border-radius: 22px; z-index: 30;
  }
  .sp-tool { flex: 1; padding: 5px 0 4px; gap: 3px; font-size: .66rem; }
  .sp-tool .sp-i { width: 34px; height: 34px; padding: 7px; border-radius: 11px; }
  .sp-tool-help { display: none; }
  .sp-tool-more { display: flex; }
  .sp-badge { right: calc(50% - 26px); }
  .sp-bottom { display: none; }
  .sp-fab { display: grid; place-items: center; position: absolute; right: 12px; bottom: calc(94px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 50%; z-index: 11; padding: 0; border: 0; cursor: pointer; color: var(--sp-ink); }
  .sp-fly.is-sheet, .sp-guests.is-sheet, .sp-pop.is-sheet {
    left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 24px 24px 0 0;
    transform: none !important; animation: sp-sheet .3s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 -10px 40px -12px rgba(40, 25, 10, .4); border: 0;
  }
  .sp-fly.is-sheet::before, .sp-guests.is-sheet::before, .sp-pop.is-sheet::before {
    content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(60, 45, 30, .2);
  }
  .sp-fly.is-sheet { z-index: 41; max-height: 74%; padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .sp-guests.is-sheet { z-index: 40; height: 80%; padding-top: 22px; }
  .sp-guests.is-sheet .sp-guests-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .sp-guests.is-away { transform: translateY(calc(100% - 70px)); opacity: .45; pointer-events: none; }
  .sp-pop.is-sheet { z-index: 42; max-height: 76%; padding-top: 10px; }
  .sp-pop.is-sheet .sp-pop-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .sp-pop.is-sheet .sp-picks { max-height: 38vh; }
  .sp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-card { padding: 10px 4px; }
  .sp-card .sp-art { width: 54px; height: 40px; }
  .sp-card b { font-size: .76rem; }
  .sp-banner { top: 66px; min-width: 0; max-width: calc(100% - 20px); width: max-content; }
  .sp-welcome, .has-guests .sp-welcome { left: 10px; right: 10px; width: auto; min-width: 0; transform: none; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 18px 18px 16px; }
  .sp-welcome h2 { font-size: 1.3rem; }
  .sp-welcome .sp-btnrow .sp-btn { flex: 1 1 auto; }
  .sp-toasts, .has-guests .sp-toasts { left: 50%; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .sp-menu { min-width: 220px; }
  .sp-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 22px; }
  .sp-dlg-inner { max-height: calc(100dvh - 16px); }
  .sp-dlg-head { padding: 20px 12px 4px 20px; }
  .sp-dlg-head h2 { font-size: 1.45rem; }
  .sp-dlg-body { padding: 8px 20px 18px; }
  .sp-dlg-foot { padding: 12px 14px 14px 20px; }
  .sp-dlg-foot .sp-btn { flex: 1 1 auto; }
  .sp-ad { grid-template-columns: minmax(0, 1fr); }
  .sp-ad img { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
  .sp-textarea { min-height: 170px; }
  .sp-preview { padding: 14px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-app *, .sp-dialog, .sp-dialog * { animation: none !important; transition: none !important; }
}

/* 13. The guide below the planner -------------------------------------------- */
.sp-guide { padding-block: clamp(52px, 7vw, 100px) 24px; }
.sp-guide-intro { max-width: 780px; }
.sp-guide h2 { font-family: var(--sp-sans); font-weight: 400; letter-spacing: -0.025em; font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.1; margin: 0 0 18px; text-wrap: balance; }
.sp-guide .bp-lede { font-size: 1.08rem; line-height: 1.65; color: #333; margin: 0; }
.sp-steps { list-style: none; margin: 38px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sp-steps li { padding: 22px 20px 24px; border-radius: 22px; background: var(--c); display: flex; flex-direction: column; gap: 8px; }
.sp-steps li:nth-child(1) { --c: #fbe8ec; }
.sp-steps li:nth-child(2) { --c: #fdf1e2; }
.sp-steps li:nth-child(3) { --c: #ebf5e6; }
.sp-steps li:nth-child(4) { --c: #e7f0f9; }
.sp-steps b { font: italic 400 2.1rem/1 var(--sp-serif); color: var(--sp-ink); }
.sp-steps h3 { margin: 6px 0 0; font: 600 1.04rem/1.3 var(--sp-sans); letter-spacing: 0; }
.sp-steps p { margin: 0; color: #4a443c; line-height: 1.55; font-size: .94rem; }
.sp-guide .bp-promise { margin-top: 40px; padding-block: 0; }
.sp-guide .fb-slot { margin-top: 26px; }
@media (max-width: 960px) { .sp-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .sp-steps { grid-template-columns: minmax(0, 1fr); } }
