/* =========================================================================
   Planer wesela (dla-par-mlodych.html) — korzysta ze zmiennych z style.css
   ========================================================================= */
.pl { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.pl [hidden] { display: none !important; }

/* --- Pasek zakładek i narzędzi (przykleja się pod nagłówkiem) --- */
.pl-bar {
  position: sticky; top: 84px; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem;
  padding: .8rem 0; margin-bottom: 1rem;
  background: rgba(251, 250, 247, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-line);
}
.pl-tabs {
  display: inline-flex; gap: .25rem; padding: .25rem;
  background: var(--paper-2); border: 1px solid var(--ink-line); border-radius: 999px;
}
.pl-tab {
  font-family: var(--font-display); font-size: .95rem; letter-spacing: .06em; text-transform: uppercase;
  border: 0; background: transparent; color: var(--ink-soft);
  padding: .55rem 1.15rem; border-radius: 999px; cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.pl-tab:hover { color: var(--ink); }
.pl-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.pl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pl-btn {
  font-family: var(--font-body); font-size: .88rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 999px;
  padding: .45rem .95rem; cursor: pointer; line-height: 1.4;
  transition: border-color .18s ease, color .18s ease;
}
.pl-btn:hover { border-color: var(--brass); color: var(--brass); }
.pl-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pl-file:focus-visible + * , .pl-btn:focus-within { outline: 2px solid var(--brass); outline-offset: 2px; }
.pl-saved { font-size: .82rem; color: var(--brass); opacity: 0; transition: opacity .3s ease; min-width: 5.5rem; text-align: right; }
.pl-saved.is-on { opacity: 1; }
.pl-saved.is-error { color: var(--red); font-weight: 600; }

.pl-privacy {
  display: flex; gap: .7rem; align-items: flex-start; max-width: none;
  font-size: .9rem; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--ink-line); border-left: 3px solid var(--brass);
  border-radius: 10px; padding: .85rem 1rem; margin: 0 0 1.6rem;
}
.pl-privacy svg { flex: none; margin-top: .2rem; color: var(--brass); }
.pl-warn {
  max-width: none; font-size: .92rem; padding: .8rem 1rem; margin: -0.8rem 0 1.6rem;
  background: rgba(197,48,48,.08); border: 1px solid rgba(197,48,48,.35); border-radius: 10px; color: var(--ink);
}

.pl-head h2 { margin-bottom: .4rem; }
.pl-head p { max-width: 70ch; }

/* --- Podsumowanie --- */
.pl-summary { margin: .4rem 0 1.4rem; }
.pl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.pl-stat {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 12px;
  padding: .7rem .9rem; display: flex; flex-direction: column;
}
.pl-stat span { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pl-stat strong { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; line-height: 1.2; }
.pl-summary__line { margin: .8rem 0 0; font-size: .95rem; max-width: none; }

/* --- Sterowanie listą --- */
.pl-controls {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 1rem; align-items: end;
  margin-bottom: 1.2rem;
}
.pl-controls__btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.pl-controls .field input, .pl-controls .field select { padding: .65rem .8rem; }

.pl-paste {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 14px;
  padding: 1.2rem; margin-bottom: 1.4rem;
}
.pl-paste textarea { font-size: .95rem; line-height: 1.6; min-height: 140px; }
.pl-hint { font-size: .86rem; color: var(--muted); margin: .7rem 0 1rem; max-width: none; }
.pl-hint code { background: var(--paper-2); border-radius: 4px; padding: .05rem .35rem; font-size: .85em; color: var(--ink); }
.pl-paste__btns { display: flex; gap: .6rem; flex-wrap: wrap; }

/* --- Grupy i osoby --- */
.pl-groups { display: grid; gap: 1rem; }
.pl-group {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 14px;
  box-shadow: 0 14px 30px -26px rgba(32,29,26,.5);
  overflow: hidden;
}
.pl-group__head {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr) auto auto; gap: .5rem; align-items: center;
  padding: .8rem .9rem; background: var(--paper-2); border-bottom: 1px solid var(--ink-line);
}
.pl-group__name { font-family: var(--font-display); font-size: 1.1rem !important; letter-spacing: .02em; }
.pl-group__count { font-size: .82rem; color: var(--muted); white-space: nowrap; padding: 0 .3rem; }
.pl-people { display: grid; }
.pl-person {
  display: grid; align-items: center; gap: .5rem;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto auto;
  padding: .55rem .9rem; border-bottom: 1px solid var(--ink-line);
}
.pl-person:last-child { border-bottom: 0; }
.pl-person[data-status="no"] { background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(32,29,26,.025) 10px 20px); }
.pl-person[data-status="no"] .pl-person__name { text-decoration: line-through; color: var(--muted); }
.pl-person[data-status="yes"] .pl-person__status { border-color: rgba(169,130,47,.6); background: rgba(169,130,47,.08); }

.pl-in {
  font-family: inherit; font-size: .92rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 8px;
  padding: .5rem .6rem; width: 100%; min-width: 0; box-sizing: border-box;
}
.pl-in:focus { border-color: var(--brass); outline: none; }
.pl-group__head .pl-in { background: var(--card); }

.pl-person__checks { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.pl-chk { display: inline-flex; align-items: center; gap: .3rem; font-size: .84rem; color: var(--ink-soft); white-space: nowrap; cursor: pointer; }
.pl-chk input { accent-color: var(--brass); width: 1rem; height: 1rem; }
.pl-chk.is-off { opacity: .4; cursor: default; }

.pl-x {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.pl-x:hover { color: var(--red); border-color: rgba(197,48,48,.35); background: rgba(197,48,48,.06); }

.pl-group__foot { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; padding: .55rem .9rem .7rem; border-top: 1px dashed var(--ink-line); }
.pl-link {
  background: none; border: 0; padding: .2rem 0; cursor: pointer;
  font-family: var(--font-body); font-size: .9rem; color: var(--red);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(197,48,48,.35);
}
.pl-link:hover { text-decoration-color: currentColor; }

.pl-empty {
  max-width: none; text-align: center; color: var(--muted);
  border: 2px dashed var(--ink-line); border-radius: 14px; padding: 2.4rem 1.2rem; margin: 0;
}

/* --- Kalkulatory --- */
.pl-calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; margin-top: 1rem; }
.pl-calc__form { display: grid; gap: 1rem; }
.pl-calc__result { position: sticky; top: calc(84px + 5rem); }

.pl-box {
  margin: 0; padding: 1rem 1.1rem 1.15rem; min-width: 0;
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 14px;
  display: grid; gap: .8rem;
}
.pl-box legend {
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .03em;
  padding: 0 .4rem; margin-left: -.4rem;
}
.pl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.pl-box .field label { font-size: .7rem; letter-spacing: .1em; line-height: 1.35; }
.pl-box .field input, .pl-box .field select { padding: .6rem .7rem; }
.pl-box .field input:disabled { background: var(--paper-2); color: var(--ink-soft); }
.pl-switch { display: inline-flex; align-items: center; gap: .55rem; font-size: .95rem; cursor: pointer; }
.pl-switch input { accent-color: var(--brass); width: 1.1rem; height: 1.1rem; }
.pl-switch.is-off { opacity: .5; }
.pl-calc__form > .pl-link { justify-self: start; color: var(--muted); text-decoration-color: rgba(111,105,95,.35); }

.pl-result {
  background: linear-gradient(160deg, #2b2723 0%, #1b1916 55%, #100f0d 100%);
  color: rgba(251,250,247,.9); border-radius: 18px; padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: 0 30px 60px -36px rgba(23,21,18,.6);
}
.pl-result__kicker { color: #d4a35a; font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 .3rem; font-weight: 600; }
.pl-result__who { color: rgba(251,250,247,.66); font-size: .88rem; margin: 0 0 .9rem; }
.pl-result__who em { font-style: normal; color: rgba(251,250,247,.85); }
.pl-row {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: .7rem 0; border-top: 1px solid rgba(255,255,255,.1);
}
.pl-row__name { color: #fff; font-size: .98rem; min-width: 0; }
.pl-row__name small, .pl-row__qty small { display: block; font-size: .78rem; color: rgba(251,250,247,.55); line-height: 1.45; margin-top: .15rem; }
.pl-row__qty { text-align: right; white-space: nowrap; color: rgba(251,250,247,.8); }
.pl-row__qty strong { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; color: #fff; }
.pl-row--main .pl-row__qty strong { font-size: 2.3rem; color: #d4a35a; }
.pl-result .pl-note { color: rgba(251,250,247,.6); }
.pl-note { font-size: .86rem; color: var(--muted); margin: .8rem 0 0; }

.pl-faq { margin-top: 2.4rem; max-width: 760px; }
.pl-faq h3 { margin-top: 1.4rem; }

/* --- Zachęta do kontaktu --- */
.pl-cta {
  margin-top: clamp(2.6rem, 6vw, 4rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem;
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 18px; padding: 1.6rem 1.8rem;
}
.pl-cta h3 { margin-bottom: .3rem; }
.pl-cta p { margin: 0; }
.pl-cta__btns { display: flex; gap: .6rem; flex-wrap: wrap; }

/* --- Responsywność --- */
@media (max-width: 1080px) {
  .pl-person { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .pl-person [data-f="diet"] { grid-column: 2 / 4; grid-row: 2; }
  .pl-person__checks { grid-column: 1 / 2; grid-row: 2; }
}
@media (max-width: 900px) {
  .pl-calc { grid-template-columns: 1fr; }
  .pl-calc__result { position: static; order: -1; }
  .pl-controls { grid-template-columns: 1fr 1fr; }
  .pl-controls__btns { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .pl-bar { top: 84px; }
}
@media (max-width: 640px) {
  /* na telefonie pasek się nie przykleja — zajmowałby za dużo ekranu */
  .pl-bar { position: static; padding: .6rem 0; gap: .5rem; background: none; backdrop-filter: none; }
  .pl-tabs { width: 100%; }
  .pl-tab { flex: 1; padding: .55rem .4rem; font-size: .88rem; }
  .pl-tools { width: 100%; }
  .pl-btn { font-size: .8rem; padding: .4rem .7rem; }
  .pl-saved {
    position: fixed; left: 16px; bottom: 24px; z-index: 95; min-width: 0;
    background: var(--ink); color: var(--paper); border-radius: 999px; padding: .45rem .9rem;
    pointer-events: none;
  }
  .pl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-controls { grid-template-columns: 1fr; }
  .pl-controls__btns .btn { flex: 1; text-align: center; padding-inline: .8rem; }

  .pl-group__head { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pl-group__head [data-gf="side"], .pl-group__head [data-gf="circle"] { grid-row: 2; }
  .pl-group__head [data-gf="side"] { grid-column: 1 / 2; }
  .pl-group__head [data-gf="circle"] { grid-column: 2 / 4; }

  .pl-person { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding: .7rem .8rem; }
  .pl-person__name { grid-column: 1 / 3; }
  .pl-person [data-f="kind"] { grid-column: 1; grid-row: 2; }
  .pl-person [data-f="status"] { grid-column: 2; grid-row: 2; }
  .pl-person [data-f="diet"] { grid-column: 1; grid-row: 3; }
  .pl-person__checks { grid-column: 2 / 4; grid-row: 3; }
  .pl-person .pl-x { grid-column: 3; grid-row: 1; }

  .pl-row__qty strong { font-size: 1.3rem; }
  .pl-row--main .pl-row__qty strong { font-size: 1.9rem; }
  .pl-cta { padding: 1.3rem; }
}

/* =========================================================================
   Zakładka "Stoły"
   ========================================================================= */
.pl-tab .st-badge {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem;
  margin-left: .25rem; border-radius: 999px; background: var(--red); color: #fff;
  font-family: var(--font-body); font-size: .72rem; font-weight: 700; letter-spacing: 0; vertical-align: .1em;
}
.pl-badge {
  font-family: var(--font-display); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: #d4a35a; border-radius: 999px; padding: .3rem .8rem; white-space: nowrap;
}
.pl-group--couple { border-color: rgba(169,130,47,.5); }
.pl-group--couple .pl-group__head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; background: rgba(169,130,47,.08); }
.pl-group__hint { font-size: .86rem; color: var(--ink-soft); }

.st-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.2rem; align-items: center; margin: .6rem 0 1rem; }
.st-toolbar__left, .st-toolbar__right { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.st-toolbar__label { font-size: .82rem; color: var(--muted); margin-right: .1rem; }
.st-views { display: inline-flex; border: 1px solid var(--ink-line); border-radius: 999px; padding: .2rem; background: var(--card); }
.st-view {
  border: 0; background: transparent; border-radius: 999px; padding: .45rem .95rem; cursor: pointer;
  font-family: var(--font-body); font-size: .9rem; color: var(--ink-soft);
}
.st-view[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); font-weight: 600; }

.st-add {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .8rem; align-items: end;
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.st-add .field input, .st-add .field select { padding: .6rem .7rem; }
.st-add .field label { font-size: .7rem; }
.st-add__btns { display: flex; gap: .5rem; }

.st-warn { display: grid; gap: .35rem; margin-bottom: 1rem; }
.st-w {
  margin: 0; max-width: none; font-size: .9rem; padding: .5rem .8rem .5rem 2.1rem; border-radius: 10px; position: relative;
  background: var(--card); border: 1px solid var(--ink-line); color: var(--ink);
}
.st-w::before { position: absolute; left: .75rem; top: .5rem; font-weight: 700; }
.st-w--err { border-color: rgba(197,48,48,.45); background: rgba(197,48,48,.06); }
.st-w--err::before { content: "!"; color: var(--red); }
.st-w--warn { border-color: rgba(169,130,47,.55); background: rgba(169,130,47,.08); }
.st-w--warn::before { content: "!"; color: var(--brass); }
.st-w--info::before { content: "i"; color: var(--muted); font-style: italic; }
.st-w--ok { border-color: rgba(46,125,80,.4); background: rgba(46,125,80,.07); }
.st-w--ok::before { content: "✓"; color: #2e7d50; }
.st-w .pl-link { margin-left: .4rem; font-size: .86rem; }

.st-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; }
.st-side {
  position: sticky; top: calc(84px + 5.2rem);
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 14px;
  max-height: calc(100vh - 84px - 6.5rem); display: flex; flex-direction: column; overflow: hidden;
}
.st-side__head { padding: .9rem .9rem .7rem; border-bottom: 1px solid var(--ink-line); display: grid; gap: .5rem; }
.st-side__head h3 { font-size: 1.15rem; margin: 0; }
.st-side__head h3 span { color: var(--muted); font-family: var(--font-body); font-size: .9rem; }
.st-side__babies { font-size: .8rem; }
.st-free { overflow-y: auto; padding: .6rem .7rem 1rem; display: grid; gap: .55rem; align-content: start; }
.st-free__empty { color: var(--muted); font-size: .9rem; margin: .4rem .2rem; }
.st-fg { border-radius: 10px; }
.st-fg.is-picked { background: rgba(169,130,47,.12); outline: 2px solid var(--brass); }
.st-fg__head {
  display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  font-family: var(--font-display); font-size: .95rem; letter-spacing: .02em; color: var(--ink);
  padding: .3rem .35rem .2rem;
}
.st-fg__head small { font-family: var(--font-body); color: var(--muted); font-size: .76rem; }
.st-fg__head:hover { color: var(--brass); }
.st-fg__people { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 .2rem .2rem; }
.st-chip {
  border: 1px solid var(--ink-line); background: var(--paper); border-radius: 999px;
  padding: .28rem .7rem; font-family: var(--font-body); font-size: .85rem; color: var(--ink); cursor: pointer;
  user-select: none; -webkit-user-select: none; line-height: 1.35; text-align: left;
}
.st-chip small { color: var(--muted); font-size: .72rem; }
.st-chip:hover { border-color: var(--brass); }
.st-chip.is-picked { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.st-chip.is-picked small { color: rgba(251,250,247,.7); }

.st-pick {
  position: sticky; top: calc(84px + 5.2rem); z-index: 6;
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between;
  background: var(--ink); color: var(--paper); border-radius: 12px; padding: .6rem .9rem; margin-bottom: .8rem;
  font-size: .9rem; box-shadow: 0 16px 30px -20px rgba(23,21,18,.7);
}
.st-pick .pl-link { color: #d4a35a; text-decoration-color: rgba(212,163,90,.5); }

/* --- Plan sali --- */
.st-room {
  position: relative; overflow: auto; border-radius: 16px;
  height: clamp(500px, calc(100vh - 84px - 9rem), 940px);
  overscroll-behavior: contain;
  background:
    linear-gradient(rgba(32,29,26,.045) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(32,29,26,.045) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--card);
  border: 1px solid var(--ink-line);
}
.st-room__size { position: relative; }
.st-room__inner { position: absolute; left: 0; top: 0; width: 1400px; transform-origin: 0 0; }
.st-item {
  position: absolute; display: grid; place-items: center; border-radius: 12px; cursor: grab;
  font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; font-size: 15px;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.st-item--floor { background: repeating-linear-gradient(45deg, rgba(169,130,47,.09) 0 14px, rgba(169,130,47,.15) 14px 28px); border: 1px dashed rgba(169,130,47,.6); color: var(--brass); }
.st-item--band { background: #e4e9f0; border: 1.5px solid #9aa9bc; color: #3b4f68; }
.st-item--door { background: transparent; border-top: 4px solid var(--ink-soft); border-radius: 0; color: var(--muted); font-size: 12px; align-items: end; }
.st-item--door.is-rot { border-top: 0; border-left: 4px solid var(--ink-soft); align-items: center; justify-items: start; }
.st-item--door.is-rot .st-item__label { writing-mode: vertical-rl; transform: rotate(180deg); padding-left: 6px; }
.st-item--bar { background: #e2f0ea; border: 1.5px solid #8cbfa8; color: #2f6b53; }
.st-item--minibar { background: #fbeedd; border: 1.5px solid #e2b97a; color: #8a5a1c; }
.st-item--sweet { background: #fbe4ea; border: 1.5px solid #eab3c2; color: #a24d68; }
.st-item--rustic {
  background: repeating-linear-gradient(0deg, #e8d5bd 0 9px, #e1ccb1 9px 10px); border: 1.5px solid #a9805a; color: #6b4a2b;
}
/* przycisk obrotu elementu (lewy górny róg, jak uchwyt rozmiaru) */
.st-rot {
  position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; z-index: 3; padding: 0;
  border-radius: 50%; background: #fff; border: 2px solid var(--brass); color: var(--brass);
  font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s ease;
  display: grid; place-items: center; letter-spacing: 0; font-family: var(--font-body);
}
.st-editor.is-full .st-item:hover .st-rot { opacity: 1; }
@media (hover: none) { .st-editor.is-full .st-rot { opacity: 1; } }
.st-editor:not(.is-full) .st-rot, .pp-room .st-rot { display: none; }

.st-t { position: absolute; }
.st-t.is-moving, .st-item:active { z-index: 5; }
.st-t.is-moving .st-t__body { box-shadow: 0 18px 30px -12px rgba(23,21,18,.45); cursor: grabbing; }
.st-t__body {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-content: center; text-align: center; gap: 0;
  background: var(--paper-2); border: 1.5px solid rgba(32,29,26,.22); border-radius: 10px;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.st-t__body b { font-family: var(--font-display); font-weight: 500; font-size: 19px; line-height: 1.1; padding: 0 4px; }
.st-t__body small { font-size: 14px; color: var(--muted); line-height: 1.2; }
.st-t__body.is-full small { color: #2e7d50; font-weight: 700; }
.st-t__body.is-over { border-color: var(--red); background: rgba(197,48,48,.08); }
.st-t__body.is-over small { color: var(--red); font-weight: 700; }
.st-t--head .st-t__body { background: rgba(169,130,47,.14); border-color: rgba(169,130,47,.7); }
.st-t.is-locked .st-t__body::after { content: "🔒"; position: absolute; top: -10px; right: -10px; font-size: 13px; }

.st-seat {
  position: absolute; width: 44px; height: 44px; border-radius: 50%; padding: 0;
  border: 1.5px solid rgba(32,29,26,.28); background: #fff; cursor: pointer;
  font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--ink); letter-spacing: .02em;
  user-select: none; -webkit-user-select: none; transition: transform .12s ease, box-shadow .12s ease;
}
.st-seat:hover { transform: scale(1.12); }
.st-seat.is-taken { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.st-seat.is-kid { background: #6f695f; border-color: #6f695f; }
.st-seat.is-couple { background: var(--brass); border-color: var(--brass); color: #fff; }
.st-seat.is-bad { background: var(--red); border-color: var(--red); }
.st-seat.is-extra { border-style: dashed; }
.st-seat.is-pinned::after {
  content: ""; position: absolute; right: -2px; top: -2px; width: 10px; height: 10px; border-radius: 50%;
  background: #d4a35a; border: 2px solid #fff;
}
.st-seat.is-picked { box-shadow: 0 0 0 4px rgba(212,163,90,.6); }
.st-picking .st-seat:not(.is-taken) { border-color: var(--brass); border-style: dashed; background: rgba(169,130,47,.1); }
.st-picking .st-t__body, .st-picking .st-card { cursor: copy; }
.is-over-drop.st-seat, .is-over-drop.st-t__body, .is-over-drop.st-card, .is-over-drop.st-cs, .is-over-drop.st-side {
  outline: 3px solid var(--brass); outline-offset: 2px;
}

.st-ghost {
  position: fixed; z-index: 200; pointer-events: none; transform: translate(10px, 8px);
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: .35rem .8rem;
  font-size: .85rem; box-shadow: 0 12px 24px -12px rgba(0,0,0,.6); white-space: nowrap;
}

/* --- Lista stołów (także panel edycji) --- */
.st-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.st-card { background: var(--card); border: 1px solid var(--ink-line); border-radius: 14px; overflow: hidden; }
.st-card.is-over { border-color: var(--red); }
.st-card__head { display: flex; align-items: baseline; gap: .6rem; padding: .7rem .9rem; background: var(--paper-2); border-bottom: 1px solid var(--ink-line); }
.st-card__head h4 { margin: 0; font-size: 1.1rem; flex: 1; min-width: 0; }
.st-card__head span { font-size: .85rem; color: var(--muted); }
.st-card__seats { list-style: none; margin: 0; padding: .3rem 0; }
.st-cs {
  display: flex; align-items: center; gap: .5rem; padding: .3rem .9rem; min-height: 2.1rem;
  font-size: .9rem; cursor: pointer; border-radius: 0;
}
.st-cs:hover { background: rgba(169,130,47,.06); }
.st-cs__n { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--paper-2); color: var(--muted); }
.st-cs.is-taken .st-cs__n { background: var(--ink); color: var(--paper); }
.st-cs.is-couple .st-cs__n { background: var(--brass); color: #fff; }
.st-cs.is-bad .st-cs__n { background: var(--red); color: #fff; }
.st-cs.is-bad .st-cs__name { color: var(--red); }
.st-cs.is-extra .st-cs__n { border: 1.5px dashed var(--muted); }
.st-cs.is-picked { background: rgba(169,130,47,.14); }
.st-cs__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cs__empty { flex: 1; color: var(--muted); font-style: italic; font-size: .85rem; }
.st-picking .st-cs:not(.is-taken) .st-cs__empty { color: var(--brass); font-style: normal; }
.st-mini {
  flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1px solid transparent; background: none;
  cursor: pointer; font-size: .85rem; line-height: 1; color: var(--muted); opacity: .55;
}
.st-mini:hover { opacity: 1; border-color: var(--ink-line); }
.st-mini.is-on { opacity: 1; background: rgba(212,163,90,.18); }

.st-detail {
  position: fixed; inset: 0; z-index: 150; background: rgba(23,21,18,.45);
  display: flex; justify-content: flex-end;
}
.st-detail__box {
  width: min(420px, 100%); height: 100%; overflow-y: auto; background: var(--paper);
  box-shadow: -20px 0 40px -20px rgba(0,0,0,.4); padding: 1.1rem 1.2rem 2rem;
}
.st-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.st-detail__head h3 { margin: 0; }
.st-form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.st-form .field:first-child { grid-column: 1 / -1; }
.st-form .field input, .st-form .field select { padding: .6rem .7rem; }
.st-form .field label { font-size: .7rem; }
.st-step { display: flex; align-items: center; gap: .6rem; }
.st-step strong { min-width: 1.4rem; text-align: center; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.st-d-row { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin: 1rem 0 .4rem; }
.st-d-row--end { justify-content: space-between; margin-top: 1.2rem; border-top: 1px solid var(--ink-line); padding-top: 1rem; }
.st-d-sub { margin: 1.2rem 0 .3rem; font-size: 1.05rem; }
.st-detail .st-card__seats { background: var(--card); border: 1px solid var(--ink-line); border-radius: 12px; }
.st-danger { color: var(--red); }

@media (max-width: 900px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-side { position: static; max-height: 46vh; }
  .st-pick { top: 92px; position: sticky; }
  .st-add { grid-template-columns: 1fr 1fr; }
  .st-add__btns { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .st-toolbar__right { width: 100%; }
  .st-add { grid-template-columns: 1fr; }
  .st-list { grid-template-columns: 1fr; }
}

/* --- Wydruki planu stołów --- */
@media print {
  .pl-print__cols { columns: 3; column-gap: 18px; }
  .pl-print__cols--small { columns: 4; font-size: 8.5pt; margin-top: 10px; }
  .pl-print__table { break-inside: avoid; margin: 0 0 12px; }
  .pl-print__table h2 { font-size: 12pt; margin: 0 0 3px; border-bottom: 1.5px solid #000; padding-bottom: 2px; }
  .pl-print__table h2 small { font-weight: 400; font-size: 9pt; }
  .pl-print__table ol { margin: 0; padding-left: 18px; }
  .pl-print__big { text-align: center; font-size: 28pt !important; margin-bottom: 12px !important; }
  .pl-print__index { columns: 2; column-gap: 28px; font-size: 11.5pt; }
  .pl-print__index p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 3px 0; border-bottom: 1px dotted #999; break-inside: avoid; }
  .pl-print__index b { white-space: nowrap; }
  .pl-print__room { position: relative; overflow: hidden; border: 1px solid #999; margin-top: 6px; }
  .pl-print__room .st-seat, .pl-print__room .st-t__body, .pl-print__room .st-item { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* --- Wydruk: tylko przygotowana tabela --- */
.pl-print { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(main), main > *:not(.pl-print) { display: none !important; }
  .pl-print { display: block; color: #000; font-size: 11pt; }
  .pl-print h1 { font-size: 20pt; margin: 0 0 .3em; }
  .pl-print p { color: #000; max-width: none; }
  .pl-print table { width: 100%; border-collapse: collapse; margin-top: .6em; }
  .pl-print th, .pl-print td { border-bottom: 1px solid #bbb; padding: 4px 6px; text-align: left; vertical-align: top; }
  .pl-print th { border-bottom: 2px solid #000; font-size: 9pt; text-transform: uppercase; letter-spacing: .05em; }
  .pl-print tr.pl-print__first td { border-top: 1.5px solid #666; }
  .pl-print tr { break-inside: avoid; }
  .pl-print__foot { margin-top: 1.4em; font-size: 8.5pt; color: #555 !important; }
  @page { margin: 14mm; }
}

/* <button> z klasą .btn--ghost nie dziedziczy przezroczystego tła jak <a> */
.pl button.btn--ghost { background: transparent; }
@media (max-width: 640px) { .pl-saved.is-error { background: var(--red); color: #fff; } }

/* =========================================================================
   Automatyczne rozsadzanie (panel w zakładce "Stoły")
   ========================================================================= */
.st-auto {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 16px;
  padding: 1.2rem 1.3rem 1.3rem; margin-bottom: 1.1rem; scroll-margin-top: calc(84px + 5rem);
  box-shadow: 0 20px 40px -34px rgba(32,29,26,.5);
}
.st-auto__cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.6rem; }
.st-auto__sec h3 { font-size: 1.3rem; margin: 0 0 .3rem; }
.st-auto__hint { font-size: .86rem; color: var(--muted); margin: 0 0 .8rem; max-width: none; }
.st-auto__empty { font-size: .9rem; color: var(--muted); font-style: italic; margin: .6rem 0; }
.st-rule-form { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.st-rule-form .btn { padding: .6rem 1rem; }
.st-rules { list-style: none; margin: .8rem 0 .6rem; padding: 0; display: grid; gap: .35rem; }
.st-rule {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .35rem .4rem .35rem .8rem; border-radius: 10px; font-size: .9rem;
  border: 1px solid var(--ink-line); border-left-width: 4px;
}
.st-rule--apart { border-left-color: var(--red); }
.st-rule--together { border-left-color: #2e7d50; }
.st-rule em { font-style: normal; color: var(--muted); margin: 0 .25rem; }
.st-auto__sec .st-w { margin-top: .4rem; }
.st-near { display: grid; gap: .3rem; max-height: 300px; overflow-y: auto; padding-right: .3rem; }
.st-near__row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; font-size: .9rem; padding: .15rem 0; border-bottom: 1px solid var(--ink-line); }
.st-near__row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-near__row small { color: var(--muted); }
.st-near__row select { width: auto; flex: none; padding: .35rem .5rem; font-size: .86rem; }
.st-auto__opts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1.1rem 0 .2rem; padding-top: 1rem; border-top: 1px solid var(--ink-line); }
.st-auto__opts .pl-chk { white-space: normal; }
.st-auto__run { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1rem; }
.st-auto__note { font-size: .82rem; color: var(--muted); }
.st-auto__result {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: 12px;
  background: rgba(46,125,80,.07); border: 1px solid rgba(46,125,80,.35);
}
.st-auto__result p { margin: 0 0 .4rem; max-width: none; font-size: .92rem; }
.st-auto__result p:last-child { margin-bottom: 0; }
.st-res--err { color: var(--red); }
.st-res--warn { color: #8a6a22; }
.st-res--hint { color: var(--muted); font-size: .85rem !important; }

@media (max-width: 900px) {
  .st-auto__cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .st-auto { padding: 1rem; }
  .st-rule-form { grid-template-columns: 1fr; }
  .st-auto__run .btn { flex: 1 1 100%; text-align: center; }
}

/* =========================================================================
   Zakładka "Wydruki"
   ========================================================================= */
@media (max-width: 640px) {
  /* 5 zakładek: jeśli się nie mieszczą, można je przesunąć palcem */
  .pl-tabs { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .pl-tabs::-webkit-scrollbar { display: none; }
  .pl-tab { flex: 1 0 auto; padding: .55rem .7rem; }
}
.dr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.dr-card {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: 16px; padding: 1.2rem 1.3rem 1.3rem;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; align-content: start; min-width: 0;
}
.dr-card > * { min-width: 0; }
.dr-card--wide { grid-column: 1 / -1; }
.dr-card h3 { margin: 0; font-size: 1.35rem; }
.dr-card > .btn { justify-self: start; }
.dr-hint { margin: 0; font-size: .9rem; color: var(--muted); max-width: none; }
.dr-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: .7rem; }
.dr-tl__row > * { min-width: 0; }
.dr-opts .field label { font-size: .7rem; }
.dr-opts .field input, .dr-opts .field select { padding: .6rem .7rem; }
.dr-count { margin: 0; font-size: .86rem; color: var(--ink-soft); }

.dr-tl { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .35rem; }
.dr-tl__row { display: grid; grid-template-columns: 6.6rem minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: .45rem; align-items: center; }
.dr-tl__time { font-variant-numeric: tabular-nums; }
.dr-tl__btns { display: flex; gap: .1rem; }
.dr-tl__btns .st-mini:disabled { opacity: .15; cursor: default; }
.dr-tl__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: .6rem; }
.dr-tl__shift { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; color: var(--muted); }
.dr-tl__foot .btn { margin-left: auto; }

.dr-venue { overflow-x: auto; min-width: 0; }
.dr-venue h4 { margin: 1rem 0 .4rem; font-size: 1.05rem; }
.dr-tab { border-collapse: collapse; width: 100%; font-size: .92rem; }
.dr-tab th, .dr-tab td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--ink-line); vertical-align: top; }
.dr-tab th { font-weight: 400; color: var(--ink-soft); width: 45%; }
.dr-tab--rows th { width: auto; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dr-tab small { color: var(--muted); }
.dr-crew { width: 5rem; display: inline-block; padding: .3rem .5rem; }
.dr-list { margin: 0; padding-left: 1.2rem; font-size: .92rem; color: var(--ink-soft); }
.dr-empty { font-size: .9rem; color: var(--muted); margin: 0; }
.dr-warn { color: var(--red); font-size: .9rem; margin: .8rem 0 0; }

@media (max-width: 900px) {
  .dr-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .dr-tl__row { grid-template-columns: 5.8rem minmax(0, 1fr) auto; }
  .dr-tl__note { grid-column: 1 / 3; grid-row: 2; }
  .dr-tl__btns { grid-row: 1 / 3; grid-column: 3; flex-direction: column; }
  .dr-tl__foot .btn { margin-left: 0; width: 100%; text-align: center; }
  .dr-tab--rows { font-size: .82rem; }
  .dr-tab--rows th, .dr-tab--rows td { padding: .35rem .3rem; }
}

/* --- Wydruki: harmonogram, lista dla sali, winietki, numery stołów --- */
@media print {
  .dr-p-sub { margin: -.2em 0 1em !important; font-size: 11pt; color: #444 !important; }
  /* Harmonogram: oś czasu (skala --s dopasowuje go do jednej kartki) */
  .pp-tl__list { list-style: none; margin: 2mm 0 0; padding: 0; }
  .pp-tl__row {
    display: grid; grid-template-columns: 24mm 8mm 1fr; align-items: start; break-inside: avoid;
    padding: calc(2.4mm * var(--s, 1)) 0; position: relative;
  }
  .pp-tl__row::before {            /* pionowa linia osi czasu */
    content: ""; position: absolute; left: 28mm; top: 0; bottom: 0; width: .4mm; background: #e2d4b0;
  }
  .pp-tl__row:first-child::before { top: 50%; }
  .pp-tl__row:last-child::before { bottom: 50%; }
  .pp-tl__time {
    font-family: "Oswald", "Arial Narrow", sans-serif; font-size: calc(17pt * var(--s, 1)); line-height: 1.15;
    color: #8a6a22 !important; font-variant-numeric: tabular-nums; text-align: right; padding-right: 2mm;
  }
  .pp-tl__dot {
    width: 3.2mm; height: 3.2mm; border-radius: 50%; background: #fff; border: .6mm solid #a9822f;
    justify-self: center; margin-top: calc(1.6mm * var(--s, 1)); position: relative; z-index: 1;
  }
  .pp-tl__what strong { display: block; font-size: calc(13.5pt * var(--s, 1)); line-height: 1.25; color: #111; font-weight: 600; }
  .pp-tl__what small { display: block; font-size: calc(10pt * var(--s, 1)); color: #666 !important; margin-top: .6mm; }
  .pp-tl__contacts {
    margin-top: 7mm; padding: 4mm 5mm; border: .35mm solid #e2d4b0; border-radius: 2.5mm;
    display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 10mm; break-inside: avoid;
  }
  .pp-tl__contacts h2 { grid-column: 1 / -1; font-size: 11pt; letter-spacing: .16em; text-transform: uppercase; color: #8a6a22 !important; margin: 0; }
  .pp-tl__contacts p { display: flex; align-items: flex-end; gap: 3mm; margin: 0; font-size: 10pt; color: #333 !important; }
  .pp-tl__contacts i { flex: 1; border-bottom: .3mm solid #bbb; height: 5mm; }
  .dr-venue h4 { font-size: 13pt; margin: 14px 0 4px; }
  .dr-tab { width: 100%; border-collapse: collapse; }
  .dr-tab th, .dr-tab td { border-bottom: 1px solid #bbb; padding: 3px 6px; text-align: left; font-size: 10.5pt; }
  .dr-tab th { font-weight: 400; }
  .dr-tab--rows th { font-size: 8.5pt; text-transform: uppercase; font-weight: 700; border-bottom: 2px solid #000; }
  .dr-warn { color: #b00 !important; }

  /* Winietki — wymiary w milimetrach, stała liczba kart na stronie */
  .wv-page { display: grid; grid-template-columns: repeat(2, 84mm); gap: 4mm 6mm; justify-content: center; align-content: start; break-after: page; width: 100%; }
  .wv-page:last-child { break-after: auto; }
  .wv__card { border: .25mm dashed #c8c8c8; box-sizing: border-box; display: grid; break-inside: avoid; }
  .wv--flat .wv__card { height: 50mm; }
  .wv--fold .wv__card { height: 86mm; grid-template-rows: 1fr 1fr; }
  .wv__face { display: grid; padding: 3mm; box-sizing: border-box; min-height: 0; }
  .wv--fold .wv__face + .wv__face { border-top: .25mm dotted #bdbdbd; }   /* linia zgięcia */
  .wv__face--back { transform: rotate(180deg); }
  .wv__in {
    display: grid; place-content: center; text-align: center; gap: 1.6mm; padding: 2mm 3mm;
    border: .35mm solid #c9ad6e; border-radius: 1.5mm; outline: .2mm solid #e6d7b3; outline-offset: -1.4mm;
  }
  .wv__name { font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 19pt; line-height: 1.08; color: #111; letter-spacing: .01em; }
  .wv__name--s { font-size: 16pt; }
  .wv__name--xs { font-size: 13.5pt; }
  .wv__orn { display: flex; align-items: center; justify-content: center; gap: 1.6mm; color: #a9822f !important; }
  .wv__orn i { display: block; width: 10mm; height: .25mm; background: #c9ad6e; }
  .wv__orn b { font-size: 6pt; font-weight: 400; line-height: 1; }
  .wv__table { font-size: 8.5pt; letter-spacing: .18em; text-transform: uppercase; color: #8a6a22 !important; }

  /* Numery stołów — dokładnie dwa na stronie */
  .tn-page { display: grid; grid-template-rows: repeat(2, 130mm); gap: 6mm; break-after: page; }
  .tn-page:last-child { break-after: auto; }
  .tn__card { border: .25mm dashed #c8c8c8; box-sizing: border-box; padding: 5mm; display: grid; break-inside: avoid; }
  .tn__in {
    display: grid; align-content: center; justify-items: center; text-align: center; gap: 3.5mm; padding: 6mm 10mm;
    border: .45mm solid #c9ad6e; border-radius: 2.5mm; outline: .25mm solid #e6d7b3; outline-offset: -2.2mm; position: relative;
  }
  .tn__small { font-size: 14pt; letter-spacing: .32em; text-transform: uppercase; color: #8a6a22 !important; }
  .tn__big { font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 118pt; line-height: .95; color: #111; }
  .tn__big--text { font-size: 44pt; line-height: 1.05; }
  .tn__big--long { font-size: 32pt; line-height: 1.1; }
  .tn__orn i { width: 18mm; }
  .tn__list { list-style: none; margin: 1mm 0 0; padding: 0; columns: 3; column-gap: 8mm; font-size: 11pt; line-height: 1.55; color: #333 !important; text-align: left; }
  .tn__list li { break-inside: avoid; }
  .tn__sig { position: absolute; left: 0; right: 0; bottom: 5mm; font-size: 8.5pt; letter-spacing: .12em; color: #8a6a22 !important; text-transform: uppercase; }
}


/* =========================================================================
   Plan stołów — pasek nad mapką, przybliżanie, kosz, nazwiska
   ========================================================================= */
.st-mapbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: .6rem;
}
.st-mapbar__group { display: inline-flex; align-items: center; gap: .3rem; }
.st-tool {
  display: inline-flex; align-items: center; gap: .35rem; height: 2.3rem; min-width: 2.3rem; justify-content: center;
  padding: 0 .65rem; border-radius: 999px; border: 1px solid var(--ink-line); background: var(--card);
  font-family: var(--font-body); font-size: .86rem; color: var(--ink); cursor: pointer;
}
.st-tool:hover:not(:disabled) { border-color: var(--brass); color: var(--brass); }
.st-tool:disabled { opacity: .35; cursor: default; }
.st-zoom { min-width: 3.2rem; text-align: center; font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.st-additem { width: auto; height: 2.3rem; padding: 0 .7rem; border-radius: 999px; font-size: .86rem; }
.st-toolbar .pl-link { font-size: .88rem; }

.st-stage { position: relative; }
.st-trash {
  position: absolute; right: 14px; bottom: 14px; z-index: 8;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .9rem; border-radius: 999px;
  background: rgba(255,255,255,.92); border: 1.5px dashed rgba(197,48,48,.45); color: var(--red);
  font-size: .85rem; font-weight: 600; box-shadow: 0 10px 22px -16px rgba(0,0,0,.5);
  transition: transform .15s ease, background-color .15s ease, padding .15s ease;
}
.st-stage.is-dragging .st-trash { padding: 1rem 1.4rem; transform: scale(1.06); border-style: solid; }
.st-trash.is-over-drop { background: var(--red); color: #fff; border-color: var(--red); outline: none; transform: scale(1.15); }

.st-name {
  position: absolute; white-space: nowrap; pointer-events: none; text-align: center;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; line-height: 1.08; color: var(--ink);
  background: rgba(255,255,255,.85); border-radius: 4px; padding: 1px 3px;
}
.st-name.is-bad { color: var(--red); text-decoration: line-through; }
.st-empty {
  position: absolute; left: 0; right: 0; text-align: center; font-size: 22px; color: var(--muted);
  padding: 0 120px; line-height: 1.5;
}
.st-t.is-new .st-t__body { animation: st-pulse 1.4s ease 2; }
@keyframes st-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(169,130,47,0); }
  50% { box-shadow: 0 0 0 14px rgba(169,130,47,.35); }
}
.st-prints { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.2rem; }

@media (max-width: 900px) {
  .st-room { height: 62vh; }
}
@media (max-width: 640px) {
  .st-mapbar { gap: .4rem .6rem; }
  .st-tool span { display: none; }
  .st-tool[data-st-act="zoom-fit"] span { display: inline; }
  .st-trash { right: 8px; bottom: 8px; }
}

/* Wydruk: lista gości ze stołami (alfabetycznie) */
@media print {
  .gl { columns: 2; column-gap: 28px; font-size: 11.5pt; }
  .gl p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 3px 0; border-bottom: 1px dotted #999; break-inside: avoid; }
  .gl b { white-space: nowrap; }
  .pl-print__room .st-name { background: rgba(255,255,255,.9); }
  .pl-print__room .st-trash, .pl-print__room .st-empty { display: none; }
}

/* Pinezka widoczna wyraźnie tylko przy przypiętych osobach — mniej "szumu" na liście */
.st-mini[data-st-act="pin"]:not(.is-on) { filter: grayscale(1); opacity: .3; }
.st-mini[data-st-act="pin"]:not(.is-on):hover { opacity: .8; }

/* =========================================================================
   Plan stołów: podgląd na stronie + edytor na cały ekran
   ========================================================================= */
.st-pagebar { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 1rem; }
.st-stage .st-room { height: 100%; }
.st-room__size { margin: 0 auto; }
.st-ewarn:empty { display: none; }

/* --- Podgląd na stronie: sam plan + przycisk "Edytuj" --- */
.st-editor:not(.is-full) .st-ebar,
.st-editor:not(.is-full) .st-side,
.st-editor:not(.is-full) .st-zoombox,
.st-editor:not(.is-full) .st-trash,
.st-editor:not(.is-full) .st-pick,
.st-editor:not(.is-full) .st-list { display: none !important; }
.st-editor:not(.is-full) .st-elayout { display: block; }
.st-editor:not(.is-full) .st-stage { height: clamp(360px, 58vh, 640px); }
.st-editor:not(.is-full) .st-room { overflow: hidden; }
.st-open {
  position: absolute; inset: 0; z-index: 6; width: 100%; border: 0; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, rgba(251,250,247,0) 45%, rgba(251,250,247,.75) 100%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1.6rem;
}
.st-open span {
  font-family: var(--font-display); letter-spacing: .09em; text-transform: uppercase; font-size: .95rem;
  background: var(--red); color: #fff; padding: .85rem 1.6rem; border-radius: var(--radius);
  box-shadow: 0 14px 28px -14px rgba(197,48,48,.7);
}
.st-open:hover span { background: var(--red-dark); }
.st-editor.is-full .st-open { display: none; }

/* --- Edytor na cały ekran --- */
body.st-fullscreen { overflow: hidden; }
body.st-fullscreen .call-fab { display: none; }
.st-editor.is-full {
  position: fixed; inset: 0; z-index: 300; background: var(--paper);
  display: flex; flex-direction: column; gap: .6rem; padding: .7rem 1rem 1rem;
}
.st-ebar { flex: none; display: grid; gap: .5rem; }
.st-ebar__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.st-ebar__title { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; margin-right: .3rem; }
.st-ebar__group { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.st-ebar__spacer { flex: 1; }
.st-ebtn { padding: .55rem .95rem; font-size: .8rem; }
.st-ebar .st-add { margin: 0; }
.st-ewarn { display: flex; flex-wrap: wrap; gap: .35rem; max-height: 4.6rem; overflow-y: auto; }
.st-ewarn .st-w { font-size: .82rem; padding: .3rem .7rem .3rem 1.8rem; }
.st-ewarn .st-w::before { left: .65rem; top: .3rem; }
.st-elayout { min-height: 0; }
.st-editor.is-full .st-elayout { flex: 1; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: .9rem; }
.st-editor.is-full .st-side { position: static; max-height: none; height: 100%; }
.st-editor.is-full .st-main { display: flex; flex-direction: column; min-height: 0; }
.st-editor.is-full .st-pick { position: static; margin-bottom: .5rem; }
.st-editor.is-full .st-stage { flex: 1; min-height: 0; }
.st-editor.is-full .st-list { flex: 1; overflow-y: auto; align-content: start; grid-auto-rows: max-content; }
.st-editor.is-full .st-room { cursor: grab; }
.st-editor.is-full .st-room.is-panning { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* --- Przybliżanie na samej mapce (z boku, jak kosz) --- */
.st-zoombox {
  position: absolute; right: 14px; top: 14px; z-index: 8;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  background: rgba(255,255,255,.92); border: 1px solid var(--ink-line); border-radius: 999px; padding: .35rem;
  box-shadow: 0 10px 22px -16px rgba(0,0,0,.5);
}
.st-zbtn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ink-line); background: #fff;
  font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.st-zbtn:hover { border-color: var(--brass); color: var(--brass); }
.st-zoombox .st-zoom { font-size: .72rem; min-width: 0; color: var(--muted); }

/* komunikaty, automat i panel stołu nad edytorem */
body.st-fullscreen .pl-saved {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 450; min-width: 0;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: .5rem 1rem; pointer-events: none;
}
body.st-fullscreen .pl-saved.is-error { background: var(--red); color: #fff; }
body.st-fullscreen .st-auto {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); z-index: 320;
  margin: 0; border-radius: 0; overflow-y: auto; box-shadow: -20px 0 40px -20px rgba(0,0,0,.45);
}
.st-auto__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.st-auto__head h3 { margin: 0; font-size: 1.4rem; }
.st-detail { z-index: 400; }
.st-ghost { z-index: 500; }

@media (max-width: 760px) {
  .st-editor.is-full { padding: .5rem .6rem .6rem; }
  .st-ebar__title { display: none; }
  .st-ebtn { padding: .5rem .7rem; font-size: .74rem; }
  .st-editor.is-full .st-elayout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .st-editor.is-full .st-side { max-height: 26vh; height: auto; }
  .st-zoombox { right: 8px; top: 8px; }
  .st-zbtn { width: 36px; height: 36px; }
}

/* --- Mapka jak nieskończona kartka: bez przewijania, przesuwa się "kamera" --- */
.st-stage .st-room { overflow: hidden; }
.st-room__size { position: absolute; inset: 0; margin: 0; }
.st-editor.is-full .st-room { touch-action: none; }
.st-room__inner { will-change: transform; }

.st-back {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: .75rem 1.3rem;
  font-family: var(--font-body); font-size: .95rem; cursor: pointer; box-shadow: 0 14px 30px -14px rgba(0,0,0,.6);
}
.st-editor:not(.is-full) .st-back { display: none; }
/* zwarty pasek edytora na mniejszych ekranach: bez tytułu, Cofnij/Ponów jako ikony */
@media (max-width: 1600px) {
  .st-ebar__title { display: none; }
  .st-ebar [data-st-act="undo"] span, .st-ebar [data-st-act="redo"] span { display: none; }
  .st-ebar__row { gap: .45rem .6rem; }
}

/* Liczba miejsc w panelu stołu: −  10  + */
.st-seatstep {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 1rem 0 .4rem; padding: .7rem .9rem; background: var(--card); border: 1px solid var(--ink-line); border-radius: 12px;
}
.st-seatstep__label { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.st-seatstep__ctrl { display: flex; align-items: center; gap: .9rem; }
.st-seatstep__btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink-line); background: var(--paper);
  font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.st-seatstep__btn:hover:not(:disabled) { border-color: var(--brass); color: var(--brass); }
.st-seatstep__btn:disabled { opacity: .3; cursor: default; }
.st-seatstep__num { min-width: 2.4rem; text-align: center; font-family: var(--font-display); font-weight: 500; font-size: 2rem; line-height: 1; }

/* Pudełka z ciastem jako druga, opcjonalna część zakładki "Wódka i ciasto" */
.pl-sub { margin-top: clamp(2.4rem, 5vw, 3.4rem); padding-top: clamp(1.8rem, 4vw, 2.4rem); border-top: 1px solid var(--ink-line); scroll-margin-top: calc(84px + 5rem); }
.pl-opt {
  display: inline-block; vertical-align: middle; margin-left: .5rem;
  font-family: var(--font-body); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--ink-line); border-radius: 999px; padding: .2rem .7rem;
}

/* =========================================================================
   Edytor: mapka na całą wysokość, przyciski leżą na mapce
   ========================================================================= */
.st-editor.is-full { padding: .6rem; gap: 0; }
.st-editor.is-full .st-elayout { grid-template-columns: 270px minmax(0, 1fr); }
.st-editor.is-full .st-main { position: relative; }
.st-mapover { display: none; }
.st-editor.is-full .st-mapover {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: .5rem;
  pointer-events: none;
}
.st-mapover__group { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; pointer-events: auto; }
.st-mapover__left { justify-self: start; }
.st-mapover__center { justify-self: center; background: rgba(255,255,255,.92); border: 1px solid var(--ink-line); border-radius: 999px; padding: .25rem; box-shadow: 0 10px 22px -16px rgba(0,0,0,.45); }
.st-mapover__center .st-tool { border-color: transparent; }
.st-mapover__right { justify-self: end; justify-content: flex-end; }
.st-mapover .st-ebtn { box-shadow: 0 10px 22px -14px rgba(0,0,0,.45); }
.st-mapover .st-additem { background: #fff; box-shadow: 0 10px 22px -16px rgba(0,0,0,.45); }
.st-editor.is-full .st-mapover__center .st-tool span { display: inline; }
.st-side__views { display: flex; margin: .8rem .8rem 0; }
.st-side__views .st-view { flex: 1; }
.st-editor:not(.is-full) .st-side__views { display: none; }
.st-editor.is-full .st-side .st-ewarn { padding: .6rem .8rem 0; max-height: 8rem; }
.st-editor.is-full .st-side .st-ewarn .st-w { width: 100%; }
.st-editor.is-full .st-pick {
  position: absolute; top: 68px; left: 50%; transform: translateX(-50%); z-index: 11;
  margin: 0; max-width: min(720px, 90%);
}
.st-editor.is-full .st-list { padding-top: 64px; }
.st-zoombox { top: 50%; transform: translateY(-50%); }

/* przeciąganie: bez niebieskiego zaznaczania tekstu */
body.st-noselect, body.st-noselect * { -webkit-user-select: none !important; user-select: none !important; }
.st-editor.is-full .st-room, .st-editor.is-full .st-room * { -webkit-user-select: none; user-select: none; }

@media (max-width: 1200px) {
  .st-editor.is-full .st-mapover__center .st-tool span { display: none; }
}
@media (max-width: 760px) {
  .st-editor.is-full .st-elayout { grid-template-columns: 1fr; }
  .st-editor.is-full .st-mapover {
    position: static; display: flex; flex-wrap: wrap; justify-content: space-between; margin-bottom: .5rem;
  }
  .st-editor.is-full .st-pick { position: static; transform: none; max-width: none; margin-bottom: .5rem; }
  .st-editor.is-full .st-list { padding-top: 0; }
}


/* =========================================================================
   Ikonki gości na krzesłach (kolor ubrania = rodzina/grupa)
   ========================================================================= */
.st-seat .st-av { width: 100%; height: 100%; display: block; border-radius: 50%; overflow: hidden; }
.st-seat.is-taken, .st-seat.is-kid, .st-seat.is-couple {
  background: #f5f1ea; color: inherit; border: 2px solid var(--gc, #c9bfae);
}
.st-seat.is-couple { border-color: var(--brass); background: #fbf6ec; }
.st-seat.is-bad { background: #f5f1ea; border-color: var(--red); opacity: .55; }
.st-seat.is-pinned::after { z-index: 2; }
.st-chip { display: inline-flex; align-items: center; gap: .4rem; }
.st-chip::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--gc, #c9bfae); flex: none; }
.st-chip.is-picked::before { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }

/* Uchwyt zmiany rozmiaru elementu sali (parkiet, zespół, wejście, bar) */
.st-item__label { pointer-events: none; }
.st-resize {
  position: absolute; right: -7px; bottom: -7px; width: 18px; height: 18px; z-index: 3;
  border-radius: 4px; background: #fff; border: 2px solid var(--brass); cursor: nwse-resize; touch-action: none;
  opacity: 0; transition: opacity .15s ease;
}
.st-resize::after {
  content: ""; position: absolute; right: 2px; bottom: 2px; width: 7px; height: 7px;
  border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass);
}
.st-editor.is-full .st-item:hover .st-resize,
.st-editor.is-full .st-item:focus-within .st-resize { opacity: 1; }
@media (hover: none) { .st-editor.is-full .st-resize { opacity: 1; } }
.st-editor:not(.is-full) .st-resize, .pl-print__room .st-resize { display: none; }

/* Uchwyt zmiany rozmiaru stołu (w rogu blatu) */
.st-resize--t { right: auto; bottom: auto; transform: translate(-50%, -50%); }
.st-editor.is-full .st-t:hover .st-resize--t { opacity: 1; }
.st-editor:not(.is-full) .st-resize--t { display: none; }

/* =========================================================================
   Wydruki: wspólny nagłówek, plan sali dopasowany do kartki, legenda
   ========================================================================= */
@media print {
  .pl-print, .pl-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-head { margin: 0 0 5mm; }
  .pp-head h1 { font-size: 22pt !important; margin: 0 !important; line-height: 1.1; }
  .pp-head p { margin: 1.5mm 0 0 !important; font-size: 11pt; color: #555 !important; }
  .pp-head::after { content: ""; display: block; width: 36mm; height: .6mm; background: #a9822f; margin-top: 3.5mm; }
  .pp-sub { font-size: 14pt; margin: 6mm 0 2mm; }
  .pp-room {
    position: relative; overflow: hidden; margin: 0 auto; box-sizing: content-box;
    padding: 3mm; border: .4mm solid #d9c9a3; border-radius: 3mm; break-inside: avoid;
  }
  .pp-room .st-room__inner { position: absolute; left: 3mm; top: 3mm; width: auto; }
  .pp-room .st-resize, .pp-room .st-empty, .pp-room .st-trash { display: none !important; }
  .pp-room .st-seat:hover { transform: none; }
  .pp-legend {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2mm 7mm;
    margin-top: 3.5mm; font-size: 9.5pt; color: #333; break-inside: avoid;
  }
  .pp-legend span { display: inline-flex; align-items: center; }
  .pp-ic { display: inline-block; width: 4mm; height: 4mm; border-radius: 50%; margin-right: 1.6mm; }
  .pp-ic--couple { background: #fbf6ec; border: .5mm solid #a9822f; }
  .pp-ic--free { background: #fff; border: .35mm solid #999; }
  .pp-dots { display: inline-flex; gap: .7mm; margin-right: 1.6mm; }
  .pp-dots b { display: inline-block; width: 3mm; height: 3mm; border-radius: 50%; }
  .pp-sum { margin-left: auto; color: #555; }
  .pl-print__foot { margin-top: 3mm !important; }
}

/* Panel "Rozsadź automatycznie": lista bliskości jak lista zasad */
.st-near-form { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.st-rule--near-top, .st-rule--near-close { border-left-color: var(--brass); }
.st-rule--near-far { border-left-color: #7c8aa0; }
.st-auto__hint strong { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .st-near-form { grid-template-columns: 1fr; } }
body.st-fullscreen .st-auto .st-auto__cols { grid-template-columns: 1fr; }
body.st-fullscreen .st-auto .st-rule-form { grid-template-columns: 1fr; }
body.st-fullscreen .st-auto .st-rule-form .btn { justify-self: start; }

/* Wydruk: lista gości według stołów (wyśrodkowane nagłówki, bez stopki) */
@media print {
  .pp-center .pp-head { text-align: center; }
  .pp-center .pp-head::after { margin-left: auto; margin-right: auto; }
  .gt-cols { columns: 3; column-gap: 9mm; }
  .gt { break-inside: avoid; text-align: center; margin: 0 0 7mm; padding-top: 1mm; }
  .gt h2 { font-family: "Oswald", "Arial Narrow", sans-serif; font-size: calc(var(--gf, 12pt) * 1.45) !important; font-weight: 500; margin: 0 0 1.5mm !important; color: #111; }
  .gt .wv__orn { margin-bottom: 2.5mm; }
  .gt .wv__orn i { width: 8mm; }
  .gt ol { list-style: none; margin: 0; padding: 0; font-size: var(--gf, 12pt); line-height: 1.6; color: #222 !important; }
  .gt--free h2 { color: #8a6a22 !important; }
}

/* =========================================================================
   Panel "Rozsadź automatycznie" — wersja minimalistyczna
   ========================================================================= */
.st-auto { padding: 1.2rem 1.3rem; }
.au-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.au-head h3 { margin: 0 0 .2rem; font-size: 1.45rem; }
.au-head p { margin: 0; font-size: .9rem; color: var(--muted); max-width: none; }
.au-run { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .4rem; }
.au-run .btn--primary { flex: 1 1 auto; }
.au-note { font-size: .8rem; color: var(--muted); margin: 0 0 .9rem; max-width: none; }
.st-auto .st-auto__result { margin: 0 0 1rem; }

.au-sec { border-top: 1px solid var(--ink-line); }
.au-sec:last-child { border-bottom: 1px solid var(--ink-line); }
.au-sec summary {
  display: flex; align-items: center; gap: .55rem; padding: .85rem .1rem; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 1.08rem; letter-spacing: .01em;
}
.au-sec summary::-webkit-details-marker { display: none; }
.au-sec summary:hover { color: var(--brass); }
.au-chev { flex: none; color: var(--muted); transition: transform .15s ease; }
.au-sec[open] .au-chev { transform: rotate(90deg); }
.au-sec__title { flex: 1; }
.au-sec__title em { font-family: var(--font-body); font-style: normal; font-size: .78rem; color: var(--muted); letter-spacing: 0; }
.au-count {
  min-width: 1.5rem; height: 1.5rem; padding: 0 .45rem; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--paper-2); color: var(--ink-soft); font-family: var(--font-body); font-size: .76rem; font-weight: 700;
}
.au-sec__body { display: grid; gap: .7rem; padding: 0 .1rem 1rem; }
.au-sec__body .pl-chk { white-space: normal; }
.au-hint { margin: 0; font-size: .86rem; color: var(--muted); max-width: none; }
.au-hint strong { color: var(--ink); font-weight: 600; }
.au-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) auto; gap: .4rem; }
.au-form--near { grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) auto; }
.au-form .pl-in { padding: .5rem .55rem; font-size: .88rem; }
.au-add { padding: .5rem .9rem; font-size: .78rem; }
.au-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.au-item {
  display: flex; align-items: center; gap: .55rem; font-size: .88rem;
  padding: .3rem .3rem .3rem .4rem; border-radius: 10px; background: var(--paper);
}
.au-item > span:nth-child(2) { flex: 1; min-width: 0; }
.au-item em { font-style: normal; color: var(--muted); margin: 0 .2rem; }
.au-ico {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .9rem; color: #fff;
}
.au-item--together .au-ico { background: #2e7d50; }
.au-item--apart .au-ico { background: var(--red); }
.au-item--near-top .au-ico, .au-item--near-close .au-ico { background: var(--brass); }
.au-item--near-far .au-ico { background: #7c8aa0; }
.au-item .pl-x { width: 28px; height: 28px; font-size: 1.1rem; }

/* w wąskim panelu obok mapki: pola jedno pod drugim */
body.st-fullscreen .au-form, .st-auto .au-form { }
body.st-fullscreen .au-form { grid-template-columns: 1fr; }
body.st-fullscreen .au-add { justify-self: start; }
@media (max-width: 760px) { .au-form, .au-form--near { grid-template-columns: 1fr; } .au-add { justify-self: start; } }

/* przybliżanie: z prawej, w górnej części mapki (pod przyciskami na mapce) */
.st-editor.is-full .st-zoombox { top: 120px; transform: none; }
@media (max-width: 760px) { .st-editor.is-full .st-zoombox { top: 8px; } }

/* Uchwyty na planie: większe i zawsze widoczne w edytorze, żeby było jasne, co do czego służy */
.st-editor.is-full .st-resize, .st-editor.is-full .st-rot { opacity: 1; }
.st-resize { width: 24px; height: 24px; right: -10px; bottom: -10px; border-radius: 6px; box-shadow: 0 3px 8px -3px rgba(0,0,0,.35); }
.st-resize::after { right: 4px; bottom: 4px; width: 9px; height: 9px; }
.st-rot { width: 28px; height: 28px; left: -12px; top: -12px; box-shadow: 0 3px 8px -3px rgba(0,0,0,.35); }
.st-rot:hover, .st-resize:hover { background: var(--brass); color: #fff; }
.st-resize:hover::after { border-color: #fff; }
.st-rot--t { transform: translate(-50%, -50%); left: auto; top: auto; }
.st-editor:not(.is-full) .st-rot--t { display: none; }

/* obracanie przez przeciąganie: podgląd na żywo, złota obwódka gdy puszczenie zmieni orientację */
.st-item.is-snap, .st-t.is-snap .st-t__body { outline: 2px dashed var(--brass); outline-offset: 4px; }
.st-rot { cursor: grab; touch-action: none; }
.st-rot:active { cursor: grabbing; }

/* Poradnik i najczęstsze pytania pod planerem */
.pg { padding: clamp(2.6rem, 6vw, 4rem) 0; border-top: 1px solid var(--ink-line); }
.pg--faq { background: var(--paper-2); }
.pg h2 { margin-bottom: .8rem; }
.pg h3 { margin: 1.8rem 0 .4rem; font-size: clamp(1.2rem, 2.2vw, 1.4rem); }
.pg-q { border-bottom: 1px solid var(--ink-line); }
.pg-q summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-family: var(--font-display); font-size: 1.12rem; letter-spacing: .01em;
}
.pg-q summary::-webkit-details-marker { display: none; }
.pg-q summary::after { content: "+"; position: absolute; right: .2rem; top: .8rem; font-size: 1.5rem; color: var(--brass); }
.pg-q[open] summary::after { content: "−"; }
.pg-q p { margin: 0 0 1.1rem; }

/* =========================================================================
   Edytor planu na TELEFONIE: mapka na cały ekran, przyciski w jednym
   przewijanym pasku, lista "Goście bez miejsca" jako wysuwany panel od dołu
   ========================================================================= */
.st-sheet-toggle { display: none; }
@media (max-width: 760px) {
  .st-editor.is-full { padding: 0; height: 100dvh; }
  .st-editor.is-full .st-elayout { display: block; height: 100%; position: relative; }
  .st-editor.is-full .st-main { height: 100%; display: flex; flex-direction: column; }
  .st-editor.is-full .st-stage { flex: 1; min-height: 0; }
  .st-editor.is-full .st-room { border-radius: 0; border: 0; }

  /* pasek przycisków: jeden rząd, przewijany palcem */
  .st-editor.is-full .st-mapover {
    position: absolute; top: 0; left: 0; right: 0; z-index: 12; margin: 0;
    display: flex; flex-wrap: nowrap; gap: .35rem; padding: .5rem .5rem .55rem;
    overflow-x: auto; scrollbar-width: none; pointer-events: auto;
    background: linear-gradient(180deg, rgba(251,250,247,.97) 70%, rgba(251,250,247,0));
  }
  .st-editor.is-full .st-mapover::-webkit-scrollbar { display: none; }
  .st-editor.is-full .st-mapover__group { flex-wrap: nowrap; flex: none; }
  .st-editor.is-full .st-mapover__right { order: -1; }
  .st-editor.is-full .st-mapover__right .st-done { order: -1; }
  .st-editor.is-full .st-mapover__center { padding: .1rem; }
  .st-editor.is-full .st-mapover .st-ebtn { padding: .5rem .7rem; font-size: .72rem; white-space: nowrap; box-shadow: none; }
  .st-editor.is-full .st-mapover .st-additem { height: 2.1rem; font-size: .8rem; box-shadow: none; }
  .st-editor.is-full .st-mapover .st-tool { height: 2.1rem; min-width: 2.1rem; padding: 0 .45rem; }
  .st-editor.is-full .st-mapover__center .st-tool span { display: none; }

  .st-editor.is-full .st-pick { position: absolute; top: 3.3rem; left: .5rem; right: .5rem; transform: none; max-width: none; z-index: 11; font-size: .84rem; }
  .st-editor.is-full .st-list { padding: 3.4rem .6rem 4.5rem; }
  .st-editor.is-full .st-zoombox { top: 3.6rem; right: .5rem; }
  .st-editor.is-full .st-trash { bottom: 4.2rem; right: .5rem; }

  /* lista gości bez miejsca: panel od dołu */
  .st-editor.is-full .st-side {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 20; height: auto; max-height: 62dvh;
    border-radius: 18px 18px 0 0; border: 0; box-shadow: 0 -12px 30px -14px rgba(0,0,0,.35);
    transform: translateY(calc(100% - 3.5rem)); transition: transform .25s ease;
  }
  .st-editor.is-full.sheet-open .st-side { transform: none; }
  .st-editor.is-full .st-sheet-toggle {
    display: flex; align-items: center; gap: .6rem; width: 100%; flex: none;
    border: 0; background: var(--card); padding: .9rem 1rem .75rem; cursor: pointer;
    font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); position: relative;
  }
  .st-sheet-toggle > span:nth-child(2) { flex: 1; text-align: left; }
  .st-sheet-toggle b {
    display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .4rem; margin-left: .3rem;
    border-radius: 999px; background: var(--red); color: #fff; font-family: var(--font-body); font-size: .78rem;
  }
  .st-sheet-toggle svg { transition: transform .2s ease; color: var(--muted); }
  .st-editor.sheet-open .st-sheet-toggle svg { transform: rotate(180deg); }
  .st-sheet-toggle__grip { position: absolute; top: .35rem; left: 50%; width: 2.4rem; height: .25rem; margin-left: -1.2rem; border-radius: 999px; background: var(--ink-line); }
  .st-editor.is-full .st-side__head h3 { display: none; }
  .st-editor.is-full .st-side__head { padding-top: .2rem; }
  .st-editor.is-full .st-side__views { margin: 0 .8rem .4rem; order: 2; }
  .st-editor.is-full .st-side .st-ewarn { padding: 0 .8rem; max-height: 5rem; }
  .st-editor.is-full .st-free { max-height: 34dvh; }
}
@media (max-width: 760px) {
  .st-editor.is-full .st-side .st-ewarn { max-height: none; }
  .st-editor.is-full .st-side .st-ewarn .st-w--info { display: none; }   /* liczbę czekających widać w kółku */
}
@media (max-width: 760px) {
  /* komunikaty w edytorze u góry, żeby nie zasłaniały przycisków na dole paneli */
  body.st-fullscreen .pl-saved { top: 3.4rem; bottom: auto; z-index: 450; }
}
