/* DigitalInbjudan – Bordsplacering */

.seating {
  --st-panel-w: 264px;
  --st-inspector-w: 292px;
  display: grid;
  grid-template-columns: var(--st-panel-w) minmax(0, 1fr) var(--st-inspector-w);
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 176px);
  min-height: 600px;
}
.seating__tabs { display: none; }
.dashboard:has(.dashboard-view--seating:not([hidden])) { padding-left: 22px; padding-right: 22px; }
.seating:fullscreen { height: 100vh; padding: 14px; background: var(--ivory); }
.seating:fullscreen .seating__tabs { margin-bottom: 0; }

.st-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 253, 249, .83);
  box-shadow: var(--shadow-sm);
}
.st-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.st-panel__head h2 { margin: 4px 0 0; color: var(--espresso); font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.st-count { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--ivory-deep); color: var(--muted); font-family: var(--sans); font-size: .7rem; font-weight: 600; vertical-align: middle; }

.st-sync { display: flex; align-items: center; gap: 7px; color: var(--success); font-size: .68rem; font-weight: 600; letter-spacing: .03em; }
.st-sync svg { width: 13px; height: 13px; }

.st-progress__bar { height: 6px; overflow: hidden; border-radius: 99px; background: var(--ivory-deep); }
.st-progress__bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--sage), #6f8a75); transition: width .4s var(--ease); }
.st-progress__text { margin-top: 6px; color: var(--muted); font-size: .68rem; }

.st-search { flex: 0 0 auto; min-width: 0; margin: 2px 0 0; }
.st-search input { width: 100%; }

.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { padding: 6px 11px; border: 1px solid var(--border); border-radius: 99px; background: transparent; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .02em; transition: background .2s, color .2s, border-color .2s; }
.st-chip:hover { border-color: var(--gold); color: var(--espresso); }
.st-chip.is-active { border-color: var(--sage); background: var(--sage); color: var(--ivory); }

.st-hint { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--butter); color: #5b4a1e; font-size: .68rem; line-height: 1.45; }

.st-guestlist { display: grid; gap: 12px; min-height: 0; padding-bottom: 8px; }
.st-guestlist__empty { padding: 30px 12px; color: var(--muted); font-size: .76rem; text-align: center; }
.st-guestlist__empty svg { width: 26px; height: 26px; margin: 0 auto 10px; color: var(--gold); }
.st-group { display: grid; gap: 5px; }
.st-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 4px 4px 2px; }
.st-group__name { overflow: hidden; color: var(--espresso-soft); font-size: .66rem; font-weight: 600; letter-spacing: .09em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.st-group__meta { flex: 0 0 auto; color: var(--muted); font-size: .64rem; }
.st-group__meta em { color: var(--warning); font-style: normal; }

.st-guest {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  cursor: grab;
  transition: transform .18s var(--ease), box-shadow .18s, border-color .18s, background .18s;
  user-select: none;
  touch-action: pan-y;
}
.st-guest:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.st-guest.is-picked { border-color: var(--gold); background: #fbf3e4; box-shadow: 0 0 0 3px rgba(169, 133, 82, .22); }
.st-guest.is-seated { background: var(--ivory); cursor: pointer; }
.st-guest.is-seated .st-guest__avatar { background: var(--sage); color: var(--ivory); }
.st-guest.is-dragging { opacity: .35; }
.st-guest__avatar { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--ivory-deep); color: var(--espresso); font-size: .66rem; font-weight: 600; letter-spacing: .03em; }
.st-guest.is-maybe .st-guest__avatar { box-shadow: inset 0 0 0 2px var(--butter), inset 0 0 0 3px #c9b36a; }
.st-guest__body { display: grid; min-width: 0; gap: 1px; }
.st-guest__name { overflow: hidden; color: var(--espresso); font-size: .8rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.st-guest__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: .64rem; }
.st-guest__meta svg { width: 11px; height: 11px; }
.st-guest__need { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; overflow: hidden; color: var(--warning); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.st-guest__edit { position: absolute; top: 50%; right: 8px; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: transparent; color: var(--muted); opacity: 0; transform: translateY(-50%); transition: opacity .2s; }
.st-guest__edit svg { width: 13px; height: 13px; }
.st-guest:hover .st-guest__edit, .st-guest__edit:focus-visible { opacity: 1; }

/* Scen */
.st-stage { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: #f3eee6; box-shadow: var(--shadow-sm); }
.st-toolbar { position: absolute; z-index: 5; top: 14px; right: 14px; left: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.st-toolbar__group { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 253, 249, .9); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); pointer-events: auto; }
.st-btn { min-height: 38px; padding: 8px 16px; font-size: .72rem; white-space: nowrap; }
.st-tool { display: inline-flex; min-height: 38px; white-space: nowrap; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: transparent; color: var(--espresso); font-size: .72rem; font-weight: 600; transition: background .2s; }
.st-tool:hover { background: var(--ivory-deep); }
.st-tool:disabled { opacity: .35; cursor: default; }
.st-tool:disabled:hover { background: transparent; }
.st-tool svg { width: 16px; height: 16px; }
.st-tool--icon { width: 38px; padding: 0; justify-content: center; }

.st-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: grab; }
.st-canvas:active { cursor: grabbing; }
.st-svg { display: block; width: 100%; height: 100%; touch-action: none; }
/* touch-action arvs inte - utan detta tar webblasaren over nyp- och draggester i SVG:n. */
.st-svg * { touch-action: none; }

.st-room__floor { fill: #fbf8f2; stroke: rgba(67, 51, 40, .18); stroke-width: 2; }
.st-room__label { fill: rgba(67, 51, 40, .38); font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: .02em; pointer-events: none; }

.st-table, .st-obj { cursor: grab; }
.st-table.is-locked, .st-obj.is-locked { cursor: default; }
.st-table__body { stroke: #4b3c31; stroke-width: 1.8; filter: url(#stShadow); transition: stroke .15s; }
.st-table__body--row { stroke: rgba(75, 60, 49, .5); stroke-width: 2; stroke-dasharray: 4 6; filter: none; }
.st-table:hover .st-table__body { stroke: var(--gold); }
.st-table.is-selected .st-table__body { stroke: #a98554; stroke-width: 2.2; }
.st-table__name { fill: var(--espresso); font-family: var(--serif); font-size: 21px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.st-table__cap { fill: var(--muted); font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.st-obj__shape { stroke: rgba(75, 60, 49, .35); stroke-width: 1.4; }
.st-obj__shape--text { fill: transparent; stroke: transparent; }
.st-obj:hover .st-obj__shape { stroke: var(--gold); }
.st-obj.is-selected .st-obj__shape { stroke: #a98554; stroke-width: 2; }
.st-obj--text.is-selected .st-obj__shape { stroke-dasharray: 4 4; }
.st-obj__label { fill: var(--espresso); font-family: var(--sans); font-weight: 500; letter-spacing: .08em; text-anchor: middle; dominant-baseline: middle; text-transform: uppercase; pointer-events: none; }
.st-obj--text .st-obj__label { font-family: var(--serif); font-weight: 600; letter-spacing: 0; text-transform: none; }

.st-seat { cursor: pointer; }
.st-seat__ring { fill: #fff; stroke: rgba(75, 60, 49, .55); stroke-width: 1.4; stroke-dasharray: 3 3; transition: fill .15s, stroke .15s; }
.st-seat.is-taken .st-seat__ring { fill: var(--sage); stroke: var(--sage-deep); stroke-dasharray: none; }
.st-seat.is-maybe .st-seat__ring { fill: #8e9b7c; }
.st-seat.is-unknown .st-seat__ring { fill: var(--blush); stroke: var(--danger); stroke-dasharray: none; }
.st-seat.is-taken { cursor: grab; }
.st-seat__label { fill: var(--muted); font-family: var(--sans); font-size: 10px; font-weight: 600; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.st-seat.is-taken .st-seat__label { fill: var(--ivory); }
.st-seat__need { fill: var(--gold-soft); stroke: #fff; stroke-width: 1.2; }
.st-seat__name { fill: var(--espresso-soft); font-family: var(--sans); font-size: 9px; font-weight: 500; text-anchor: middle; pointer-events: none; opacity: .9; }
.st-svg.is-zoomed-out .st-seat__name { display: none; }
.st-seat:hover .st-seat__ring, .st-seat.is-hover .st-seat__ring { stroke: #a98554; stroke-width: 2.4; }
.st-seat.is-hover .st-seat__ring { fill: #fbf3e4; }
.st-seat.is-hover.is-taken .st-seat__ring { fill: #6a7d6d; }
.st-seat.is-selected .st-seat__ring { stroke: #a98554; stroke-width: 2.6; filter: url(#stGlow); }
.st-seat.is-target .st-seat__ring { stroke: #a98554; fill: #fbf3e4; animation: st-pulse 1.2s ease-in-out infinite; }
@keyframes st-pulse { 0%, 100% { stroke-width: 1.4; } 50% { stroke-width: 3; } }

.st-handles__box { fill: none; stroke: #a98554; stroke-width: 1.2; stroke-dasharray: 6 5; pointer-events: none; }
.st-handles__stem { stroke: #a98554; stroke-width: 1.2; }
.st-handle__dot { fill: #fffdf9; stroke: #a98554; stroke-width: 1.5; transition: fill .15s ease; }
.st-handle__hit { r: 11; }
.st-handle path { stroke: #805d33; stroke-linecap: round; stroke-linejoin: round; }
.st-handle--rotate { cursor: crosshair; }
.st-handle:hover .st-handle__dot, .st-handle:active .st-handle__dot { fill: #f1e7bd; }
/* Med finger behovs storre traffytor an med mus. */
@media (pointer: coarse) {
  .st-handle__hit { r: 20; }
  .st-handle--corner .st-handle__dot { r: 8; }
}

.st-zoom { position: absolute; z-index: 5; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 253, 249, .92); box-shadow: var(--shadow-sm); }
.st-zoom button { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: transparent; color: var(--espresso); }
.st-zoom button:hover { background: var(--ivory-deep); }
.st-zoom button svg { width: 14px; height: 14px; }
.st-zoom span { min-width: 44px; color: var(--muted); font-size: .66rem; font-weight: 600; text-align: center; }

.st-status { position: absolute; z-index: 5; bottom: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 253, 249, .92); color: var(--muted); font-size: .66rem; font-weight: 600; letter-spacing: .03em; box-shadow: var(--shadow-sm); transition: color .2s; }
.st-status svg { width: 13px; height: 13px; }
.st-status.is-ok { color: var(--success); }
.st-status.is-dirty { color: var(--warning); }
.st-status.is-busy { color: var(--muted); }
.st-status.is-busy svg { animation: st-spin 1.1s linear infinite; }
.st-status.is-error { color: var(--danger); }
@keyframes st-spin { to { transform: rotate(360deg); } }

.st-empty { position: absolute; z-index: 4; top: 50%; left: 50%; width: min(90%, 360px); padding: 30px 24px; border: 1px solid var(--border); border-radius: 22px; background: rgba(255, 253, 249, .96); box-shadow: var(--shadow-md); text-align: center; transform: translate(-50%, -50%); }
.st-empty > span { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: var(--ivory-deep); color: var(--gold); }
.st-empty h3 { margin: 0; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.st-empty p { margin: 8px 0 18px; color: var(--muted); font-size: .78rem; }

.st-quickbar {
  position: absolute;
  z-index: 6;
  right: 12px;
  bottom: 62px;
  left: 12px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 253, 249, .94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}
@media (max-width: 999px) { .st-quickbar.is-visible { display: flex; } }
.st-quickbar__all {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--ivory);
  font-size: .72rem;
  font-weight: 600;
}
.st-quickbar__all svg { width: 15px; height: 15px; }
.st-quickbar__list {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.st-quickbar__list::-webkit-scrollbar { display: none; }
.st-qguest {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 4px 13px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--espresso);
  font-size: .74rem;
  font-weight: 500;
  transition: border-color .18s ease, background .18s ease;
}
.st-qguest .st-guest__avatar { width: 28px; height: 28px; font-size: .58rem; }
.st-qguest:hover { border-color: var(--gold); }
.st-qguest.is-picked { border-color: var(--gold); background: #fbf3e4; box-shadow: 0 0 0 3px rgba(169, 133, 82, .22); }
.st-qguest__need { width: 12px; height: 12px; color: var(--warning); }

.st-sheet-grab { display: none; }

.st-dragghost { position: fixed; z-index: 900; top: 0; left: 0; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--gold); border-radius: 999px; background: var(--paper); color: var(--espresso); font-size: .74rem; font-weight: 500; box-shadow: var(--shadow-md); pointer-events: none; will-change: transform; }
.st-dragghost.is-remove { border-color: var(--danger); color: var(--danger); }
.st-dragghost .st-guest__avatar { width: 26px; height: 26px; font-size: .58rem; }
body.st-dragging { cursor: grabbing; user-select: none; }
body.st-dragging * { cursor: grabbing !important; }

/* Inspektor */
.st-field { display: grid; gap: 6px; margin-top: 12px; }
.st-field label, .st-toggle span { color: var(--espresso-soft); font-size: .7rem; font-weight: 600; letter-spacing: .03em; }
.st-field input[type="text"], .st-field input[type="number"], .st-field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--paper);
  font-size: .8rem;
}
.st-field input:focus, .st-field select:focus { border-color: var(--gold); outline: 0; box-shadow: 0 0 0 3px rgba(169, 133, 82, .18); }
.st-field input[type="range"] { width: 100%; accent-color: var(--sage); }
.st-range-row { display: flex; align-items: center; gap: 10px; }
.st-range-row output { min-width: 36px; color: var(--muted); font-size: .7rem; font-weight: 600; text-align: right; }
.st-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-stepper { display: grid; grid-template-columns: 40px 1fr 40px; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--paper); }
.st-stepper button { background: var(--ivory); color: var(--espresso); font-size: 1rem; font-weight: 500; }
.st-stepper button:hover { background: var(--ivory-deep); }
.st-stepper input { min-height: 40px; border: 0; background: transparent; text-align: center; font-size: .9rem; font-weight: 600; -moz-appearance: textfield; }
.st-stepper input::-webkit-inner-spin-button, .st-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.st-toggle { display: flex; align-items: center; gap: 9px; margin-top: 14px; cursor: pointer; }
.st-toggle input { width: 16px; height: 16px; accent-color: var(--sage); }
.st-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.st-swatch { width: 26px; height: 26px; border: 1px solid var(--border-strong); border-radius: 50%; transition: transform .15s, box-shadow .15s; }
.st-swatch:hover { transform: scale(1.08); }
.st-swatch.is-active { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold); }

.st-capacity { display: grid; gap: 6px; margin-top: 4px; color: var(--muted); font-size: .68rem; }
.st-capacity__bar { height: 6px; overflow: hidden; border-radius: 99px; background: var(--ivory-deep); }
.st-capacity__bar span { display: block; height: 100%; border-radius: 99px; background: var(--sage); }

.st-inspector__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.st-inspector__actions--stack { grid-template-columns: 1fr; margin-top: 12px; }
.st-inspector__actions .button { min-height: 42px; padding: 8px 12px; font-size: .7rem; }
.button--danger { border-color: rgba(153, 73, 63, .3); background: transparent; color: var(--danger); }
.button--danger:hover { background: var(--blush); }

.st-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.st-stat { padding: 12px 12px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); }
.st-stat strong { display: block; color: var(--espresso); font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.st-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: .64rem; letter-spacing: .04em; text-transform: uppercase; }
.st-stat--warn { border-color: rgba(116, 85, 31, .35); background: var(--butter); }
.st-stat--warn strong { color: var(--warning); }
.st-notice { display: flex; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--blush); color: var(--danger); font-size: .7rem; line-height: 1.4; }
.st-notice svg { flex: 0 0 auto; width: 15px; height: 15px; }

.st-section { margin-top: 18px; }
.st-section h3, .st-tips h3 { margin: 0 0 8px; color: var(--muted); font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.st-action { display: flex; width: 100%; align-items: center; gap: 11px; padding: 10px 12px; margin-top: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); text-align: left; transition: border-color .2s, transform .2s var(--ease); }
.st-action:hover { border-color: var(--gold); transform: translateX(2px); }
.st-action svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--gold); }
.st-action strong { display: block; color: var(--espresso); font-size: .76rem; font-weight: 600; }
.st-action small { display: block; color: var(--muted); font-size: .64rem; }
.st-tips { margin-top: 20px; }
.st-tips ul { margin: 0; padding-left: 16px; color: var(--muted); font-size: .7rem; line-height: 1.6; }
kbd { padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--paper); font: inherit; font-size: .62rem; }

.st-seatcard { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--paper); }
.st-seatcard__avatar { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--sage); color: var(--ivory); font-size: .74rem; font-weight: 600; }
.st-seatcard--free .st-seatcard__avatar { background: var(--ivory-deep); color: var(--muted); border: 1px dashed var(--border-strong); }
.st-seatcard--unknown .st-seatcard__avatar { background: var(--blush); color: var(--danger); }
.st-seatcard strong { display: block; color: var(--espresso); font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.1; }
.st-seatcard p { margin: 3px 0 0; color: var(--muted); font-size: .7rem; }
.st-seatcard__need { display: inline-flex !important; align-items: center; gap: 4px; margin-top: 6px !important; padding: 3px 8px; border-radius: 99px; background: var(--butter); color: var(--warning) !important; font-weight: 500; }
.st-seatcard__need svg { width: 11px; height: 11px; }
.st-seatcard + .button { margin-top: 10px; }

.st-pick { display: flex; width: 100%; align-items: center; gap: 10px; padding: 7px 9px; margin-top: 5px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); text-align: left; transition: border-color .2s, background .2s; }
.st-pick:hover { border-color: var(--gold); background: #fbf3e4; }
.st-pick strong { display: block; color: var(--espresso); font-size: .76rem; font-weight: 500; }
.st-pick small { display: block; overflow: hidden; color: var(--muted); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }

/* Palett */
.st-palette { width: min(94vw, 760px); }
.st-palette__title { margin: 0 0 10px; color: var(--muted); font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.st-palette__title + .st-palette__grid { margin-bottom: 24px; }
.st-palette__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-palette__grid--objects { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.st-palette__item { display: grid; gap: 4px; justify-items: center; padding: 12px 10px 12px; border: 1px solid var(--border); border-radius: 18px; background: var(--paper); text-align: center; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.st-palette__item:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.st-palette__item > span { color: var(--espresso); font-size: .76rem; font-weight: 600; }
.st-palette__item small { color: var(--muted); font-size: .62rem; }
.st-palette__item--object { padding: 12px 8px; }
.st-palette__swatch { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 4px; border: 1px solid var(--border); border-radius: 14px; color: var(--espresso-soft); }
.st-palette__swatch svg { width: 20px; height: 20px; }
.st-preview { width: 100%; height: auto; }
.st-preview__body { fill: #fffdf9; stroke: #4b3c31; stroke-width: 2.2; }
.st-preview__body--row { fill: none; stroke: rgba(75, 60, 49, .5); stroke-dasharray: 4 6; }
.st-preview__seat { fill: #fff; stroke: rgba(75, 60, 49, .6); stroke-width: 2; stroke-dasharray: 4 4; }

.st-guest-delete { margin-right: auto; color: var(--danger); }

/* Responsivt */
@media (max-width: 1560px) {
  .seating { --st-panel-w: 250px; --st-inspector-w: 280px; }
  .st-tool span { display: none; }
  .st-tool { width: 38px; padding: 0; justify-content: center; }
}
/* Pa mobil ska ritningen fylla skarmen utan att sidan under scrollar. */
@media (max-width: 999px) {
  .dashboard:has(.dashboard-view--seating:not([hidden])) {
    display: flex;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    padding-bottom: 14px;
    overflow: hidden;
  }
  .dashboard:has(.dashboard-view--seating:not([hidden])) .dashboard-header { margin-bottom: 14px; }
  .dashboard:has(.dashboard-view--seating:not([hidden])) .dashboard-header h1 { font-size: clamp(1.7rem, 7.5vw, 2.3rem); }
  .dashboard-view--seating:not([hidden]) { display: flex; flex: 1; min-height: 0; }
  .dashboard-view--seating > div { display: flex; flex: 1; min-height: 0; }

  /* Notiser hamnar hogst upp sa att de inte tacker panelen eller snabbraden. */
  .toast-region { top: 74px; right: 12px; bottom: auto; left: 12px; width: auto; }
}
@media (max-width: 900px) {
  .dashboard:has(.dashboard-view--seating:not([hidden])) { height: calc(100dvh - 64px); }
}
/* Pa riktigt sma skarmar vager ritytan tyngre an rubriken. */
@media (max-width: 560px) {
  .dashboard:has(.dashboard-view--seating:not([hidden])) .dashboard-header { min-height: 0; margin-bottom: 10px; }
  .dashboard:has(.dashboard-view--seating:not([hidden])) .dashboard-header .eyebrow { display: none; }
  .dashboard:has(.dashboard-view--seating:not([hidden])) .dashboard-header h1 { font-size: 1.5rem; }
}

@media (max-width: 999px) {
  .seating { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); width: 100%; min-width: 0; height: 100%; min-height: 0; }
  .seating__tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--paper); }
  .seating__tab { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 600; }
  .seating__tab svg { width: 15px; height: 15px; }
  .seating__tab.is-active { background: var(--espresso); color: var(--ivory); }
  .seating__panel, .seating__stage, .seating__inspector { display: none; grid-row: 2; }
  .seating[data-tab="guests"] .seating__panel { display: flex; }
  .seating[data-tab="stage"] .seating__stage { display: flex; }
  .seating[data-tab="inspector"] .seating__inspector { display: flex; }

  /* Egenskaperna som panel underifran, sa att ritningen syns medan man redigerar. */
  .seating[data-tab="stage"] .seating__inspector {
    position: fixed;
    z-index: 120;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    max-height: min(62dvh, 480px);
    padding: 6px 16px 22px;
    border-width: 1px 0 0;
    border-radius: 26px 26px 0 0;
    background: var(--paper);
    box-shadow: 0 -16px 46px rgba(45, 34, 25, .2);
    transform: translateY(103%);
    transition: transform .3s var(--ease);
    overscroll-behavior: contain;
  }
  .seating.is-sheet-open[data-tab="stage"] .seating__inspector { transform: translateY(0); }
  .seating[data-tab="stage"] .st-sheet-grab {
    display: block;
    position: sticky;
    z-index: 2;
    top: 0;
    width: 100%;
    padding: 8px 0 10px;
    background: var(--paper);
  }
  .st-sheet-grab span { display: block; width: 44px; height: 4px; margin: 0 auto; border-radius: 99px; background: var(--border-strong); }
  .seating.is-sheet-open[data-tab="stage"] .st-quickbar,
  .seating.is-sheet-open[data-tab="stage"] .st-zoom,
  .seating.is-sheet-open[data-tab="stage"] .st-status { display: none; }

  /* En rad verktyg: text doljs och export samlas under "..." */
  .st-toolbar { flex-wrap: nowrap; gap: 6px; }
  .st-toolbar__group { flex: 0 0 auto; padding: 5px; }
  .st-toolbar__group--export { display: none; }
  .st-toolbar__group--center { margin-left: auto; }
  .st-btn { padding: 8px 13px; }
  .st-quickbar { bottom: 58px; }
}
.st-toolbar__group--more { position: relative; }
@media (min-width: 1000px) { .st-toolbar__group--more { display: none; } }
.st-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 2px;
  width: max-content;
  min-width: 216px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}
.st-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--espresso);
  font-size: .78rem;
  font-weight: 500;
  text-align: left;
}
.st-menu button:hover { background: var(--ivory); }
.st-menu svg { width: 16px; height: 16px; color: var(--gold); }

@media (max-width: 560px) {
  .st-toolbar { right: 10px; left: 10px; gap: 6px; }
  .st-toolbar__group { padding: 4px; gap: 4px; }
  .st-btn { min-height: 34px; padding: 7px 11px; font-size: .68rem; }
  .st-tool { min-height: 34px; }
  .st-tool--icon { width: 34px; }
  .st-quickbar { right: 10px; left: 10px; padding: 6px; }
  .st-quickbar__all { min-height: 34px; padding: 5px 11px; }
  .st-qguest { min-height: 34px; padding: 3px 11px 3px 3px; }
  .st-qguest .st-guest__avatar { width: 26px; height: 26px; }
  .dashboard:has(.dashboard-view--seating:not([hidden])) { padding-right: 12px; padding-left: 12px; }
  .st-btn { font-size: .68rem; }
  .st-status { max-width: calc(100% - 226px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .st-status span { overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
  .st-seat.is-target .st-seat__ring { animation: none; }
  .st-guest, .st-action, .st-palette__item { transition: none; }
}
@media print {
  .seating { display: none; }
}

/* Under 380 px far bara ikonen plats i knappen. */
@media (max-width: 380px) {
  .st-btn span { display: none; }
  .st-btn { width: 34px; padding: 0; justify-content: center; }
}
