
.zs-panel {
  position: fixed;
  top: 64px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  z-index: 1000;
  display: none;

  max-height: calc(100vh - 84px);
  flex-direction: column;
}
.zs-panel.is-open { display: flex; }
.zs-panel.zs-dragging { user-select: none; }

.zs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--accent);
  flex: 0 0 auto;
  cursor: move;
  touch-action: none;
}

.zs-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0 4px;
}
.zs-close:hover { color: var(--ink); }

.zs-body {
  padding: 12px 16px;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.zs-section { margin-bottom: 14px; }
.zs-section:last-child { margin-bottom: 0; }

.zs-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.zs-themes { display: flex; justify-content: space-between; gap: 4px; }

.zs-theme {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 3px 2px;
  cursor: pointer;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  border-radius: 8px;
}
.zs-theme:hover { background: var(--accent-soft); }

.zs-theme:focus-visible,
.zs-font:focus-visible,
.zs-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.zs-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  transition: transform .15s, border-color .15s;
}
.zs-theme.is-active .zs-swatch { border-color: var(--accent); transform: scale(1.12); }
.zs-theme.is-active .zs-name { color: var(--ink); font-weight: 600; }

.zs-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.zs-step {
  width: 34px;
  height: 34px;

  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.zs-step:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.zs-size { text-align: center; }
.zs-size b { font-size: 22px; font-weight: 400; line-height: 1.1; color: var(--ink); }
.zs-size small { margin-left: 4px; }
.zs-size small { font-size: 11px; color: var(--ink-soft); }

.zs-fonts { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 6px; }

.zs-font {
  padding: 7px 2px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: none;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.zs-font:hover { border-color: var(--accent); background: var(--accent-soft); }
.zs-font.is-active { background: var(--accent); border-color: var(--accent); color: var(--surface); }

.zs-choices { display: flex; flex-wrap: wrap; gap: 6px; }

.zs-choice {
  flex: 1 1 auto;
  min-width: 56px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.zs-choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.zs-choice.is-active { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.zs-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.zs-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 2px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}
.zs-toggle input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

@media (max-width: 480px) {
  .zs-panel { right: 8px; left: 8px; width: auto; top: 56px; }
}

:where(tbody > tr:nth-child(even)) { background-color: var(--stripe); }
