/* ── Editor page body ── */
.editor-page {
  overflow: hidden;
  height: 100vh;
  background: #0A0A0B;
}

/* ══════════════════════════════════════════════════════════
   NAVBAR — editor-specific overrides (shared styles in main.css)
   ══════════════════════════════════════════════════════════ */
body.editor-page #navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
body.editor-page .nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Frame: centers editor to 1440px with border lines ── */
.editor-frame {
  max-width: 1440px;
  margin: 0 auto;
  border-left:  1px solid rgba(255,255,255,0.08);
  border-right: 1px solid rgba(255,255,255,0.08);
  height: calc(100vh - 52px);
  margin-top: 52px;
  background: #0A0A0B;
}

/* ── Shell: fills the frame ── */
.editor-shell {
  display: flex;
  height: 100%;
  background: #0A0A0B;
}

/* ── Shared pane bar ── */
.pane-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #0F1012;
  flex-shrink: 0;
  gap: 6px;
}
.pane-bar-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #6F6F6B;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pane-bar-hint {
  font-size: 11px;
  color: #6F6F6B;
  opacity: 0.5;
}
.pane-bar-left {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pane-bar-sep {
  color: #6F6F6B;
  opacity: 0.4;
  font-size: 13px;
  flex-shrink: 0;
  margin: 0 2px;
}
.skill-name-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #D6B35F;
  width: 180px;
  padding: 2px 4px;
  border-radius: 0;
  transition: border-color 150ms;
  caret-color: #D6B35F;
}
.skill-name-input:hover { border-color: rgba(255,255,255,0.2); }
.skill-name-input:focus { border-color: #D6B35F; }
.skill-name-input::placeholder { color: #6F6F6B; font-weight: 400; }

/* ── Left pane: editor ── */
.editor-pane {
  display: flex;
  flex-direction: column;
  width: 50%;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: #0A0A0B;
}

#editor {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
  padding: 28px 32px;
  overflow-y: auto;
  tab-size: 2;
}

[data-theme="dark"] #editor  { caret-color: #D6B35F; }
[data-theme="light"] #editor { caret-color: var(--accent); }

/* ── Divider ── */
.editor-divider {
  width: 1px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* ── Right pane: preview ── */
.preview-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  background: #0A0A0B;
}

/* Tab group */
.tab-group {
  display: flex;
  gap: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.tab-btn {
  padding: 0 16px;
  height: 48px;
  border-radius: 0;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  color: #6F6F6B;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 150ms, background 150ms;
}
.tab-btn:hover { color: #F5F5F3; background: rgba(255,255,255,0.025); }
.tab-btn.active {
  background: transparent;
  color: #D6B35F;
  box-shadow: inset 0 -2px 0 #D6B35F;
}

/* Action buttons */
.pane-bar-actions { display: flex; gap: 0; align-items: stretch; height: 48px; margin-right: -20px; }
.bar-btn {
  padding: 0 16px;
  height: 100%;
  border-radius: 0;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  color: #6F6F6B;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 150ms, background 150ms;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.bar-btn:hover { color: #F5F5F3; background: rgba(255,255,255,0.025); }
.bar-btn.copied { color: #34d399; }
.bar-btn-primary {
  background: transparent;
  color: #6F6F6B;
}
.bar-btn-primary:hover { color: #F5F5F3; }

/* ── Mobile overflow menu (hidden on desktop) ── */
.bar-overflow-wrap {
  display: none;        /* shown only inside the ≤768px media query */
  position: relative;
  align-items: stretch;
  height: 100%;
  flex-shrink: 0;
}
.bar-overflow-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid rgba(255,255,255,0.06);
}
.bar-overflow-chevron {
  transition: transform 150ms;
  flex-shrink: 0;
  opacity: 0.5;
}
.bar-overflow-wrap.open .bar-overflow-chevron { transform: rotate(180deg); }
.bar-overflow-wrap.open .bar-overflow-trigger {
  color: #D6B35F;
  background: rgba(214,179,95,0.06);
}

.bar-overflow-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.10);
  border-top: none;
  z-index: 60;
  flex-direction: column;
}
.bar-overflow-wrap.open .bar-overflow-menu { display: flex; }

.bar-overflow-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #6F6F6B;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  width: 100%;
  transition: color 120ms, background 120ms;
}
.bar-overflow-item:last-child { border-bottom: none; }
.bar-overflow-item:hover {
  color: #D6B35F;
  background: rgba(214,179,95,0.06);
}
.bar-overflow-item svg { flex-shrink: 0; opacity: 0.7; }

/* Scrollable areas */
.preview-scroll,
.raw-scroll {
  flex: 1;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

/* ── Markdown body styles ── */
.preview-inner {
  padding: 36px 48px 64px;
  max-width: 720px;
}

/* Frontmatter block */
.fm-block {
  position: relative;
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  padding: 14px 16px;
  margin-bottom: 32px;
}
.fm-label {
  position: absolute;
  top: -10px;
  left: 12px;
  background: #0A0A0B;
  padding: 0 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #D6B35F;
}
.fm-pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #9A9A97;
  white-space: pre-wrap;
}

/* Markdown elements */
.md-body h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  color: #F5F5F3;
}
.md-body h2 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #F5F5F3;
}
.md-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: #F5F5F3;
}
.md-body p {
  font-size: 14px;
  line-height: 1.75;
  color: #9A9A97;
  margin-bottom: 12px;
}
.md-body blockquote {
  border-left: 2px solid #D6B35F;
  margin: 20px 0;
  padding: 4px 0 4px 16px;
}
.md-body blockquote p {
  color: #F5F5F3;
  font-style: italic;
  font-size: 15px;
  margin: 0;
}
.md-body ul, .md-body ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.md-body li {
  font-size: 14px;
  line-height: 1.75;
  color: #9A9A97;
  margin-bottom: 4px;
}
.md-body li strong { color: #F5F5F3; }
.md-body strong { color: #F5F5F3; font-weight: 600; }
.md-body em { color: #F5F5F3; font-style: italic; }
.md-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 0;
  color: #D6B35F;
}
.md-body pre {
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.md-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #F5F5F3;
  line-height: 1.6;
}
.md-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13px;
}
.md-body th {
  text-align: left;
  padding: 8px 12px;
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 600;
  color: #F5F5F3;
  font-size: 12px;
}
.md-body td {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  color: #9A9A97;
  vertical-align: top;
}
.md-body hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 28px 0;
}

/* Raw view */
.raw-body {
  margin: 0;
  padding: 28px 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: #9A9A97;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── npm Package Panel ── */
.npm-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0F1012;
  border-top: 1px solid rgba(255,255,255,0.08);
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 80%;
  overflow-y: auto;
  z-index: 10;
}
.npm-panel.open { transform: translateY(0); }

/* Make preview-pane relative so panel + watermark position inside it */
.preview-pane { position: relative; }


.npm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  background: #0F1012;
  z-index: 1;
}
.npm-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F5F5F3;
}
.npm-panel-close {
  background: none;
  border: none;
  color: #6F6F6B;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 150ms;
}
.npm-panel-close:hover { color: #F5F5F3; }

.npm-panel-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

/* Package name row */
.npm-pkg-name-row { display: flex; flex-direction: column; gap: 4px; }
.npm-pkg-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #6F6F6B; }
.npm-pkg-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #D6B35F;
  background: none;
  border: none;
  padding: 0;
}

/* Download button */
.npm-download-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(214,179,95,0.06);
  border: 1px solid rgba(214,179,95,0.25);
  border-radius: 0;
  color: #D6B35F;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 150ms, border-color 150ms;
  align-self: flex-start;
}
.npm-download-btn:hover { background: rgba(214,179,95,0.1); border-color: rgba(214,179,95,0.4); }

/* Steps */
.npm-steps { display: flex; flex-direction: column; gap: 16px; }
.npm-step { display: flex; gap: 12px; align-items: flex-start; }
.npm-step-num {
  width: 20px; height: 20px;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #6F6F6B;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.npm-step-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.npm-step-title { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: #F5F5F3; }
.npm-step-note { font-size: 11px; color: #6F6F6B; }
.npm-step-note a { color: #D6B35F; text-decoration: none; }
.npm-step-note a:hover { text-decoration: underline; }
.npm-step-note code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1px 4px;
  border-radius: 0;
}

/* Code block row */
.npm-code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  padding: 10px 14px;
}
.npm-code-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #F5F5F3;
  word-break: break-all;
  flex: 1;
}
.npm-copy-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: #6F6F6B;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  transition: color 150ms, border-color 150ms;
  flex-shrink: 0;
}
.npm-copy-btn:hover { color: #F5F5F3; border-color: rgba(255,255,255,0.2); }
.npm-copy-btn.copied { color: #34d399; border-color: #34d399; }

/* ── Publish button ── */
.bar-btn-publish {
  color: #D6B35F !important;
  background: rgba(214,179,95,0.06);
  gap: 5px;
}
.bar-btn-publish:hover { color: #D6B35F !important; background: rgba(214,179,95,0.1); }
.bar-btn-publish.published { color: #34d399 !important; }

/* Publish wrap (relative for dropdown positioning) */
.publish-wrap { position: relative; }

/* Name input error state */
.skill-name-input.input-error {
  border-color: #ef4444 !important;
  border-style: solid !important;
  background: rgba(239,68,68,0.08) !important;
  color: #ef4444 !important;
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
  80%      { transform: translateX(-3px); }
}

/* Error tooltip under name input */
.name-error-tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #0F1012;
  border: 1px solid #ef4444;
  color: #ef4444;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 200ms;
  pointer-events: none;
  z-index: 50;
}
.name-error-tip.visible { opacity: 1; transform: translateY(0); }

/* Category dropdown */
.publish-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  padding: 6px;
  min-width: 180px;
  box-shadow: none;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 150ms, transform 150ms;
  z-index: 50;
}
.publish-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: all; }

.publish-dropdown-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6F6F6B;
  padding: 6px 8px 8px;
}
.publish-categories { display: flex; flex-direction: column; gap: 1px; }
.category-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: #9A9A97;
  font-size: 12px;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-align: left;
  transition: color 120ms, background 120ms;
}
.category-btn:hover { background: rgba(255,255,255,0.03); color: #F5F5F3; }

/* Spinner */
.publish-spinner {
  width: 11px; height: 11px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.publish-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.12);
  color: #F5F5F3;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-radius: 0;
  opacity: 0;
  transition: opacity 250ms, transform 250ms;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.publish-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Publish Modal ── */
.pub-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  z-index: 100;
}
.pub-overlay.open { display: block; }

.pub-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  opacity: 0;
  z-index: 101;
  width: min(480px, calc(100vw - 32px));
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  box-shadow: none;
  transition: opacity 220ms, transform 220ms;
}
.pub-modal.open {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%);
}

.pub-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 32px 28px;
  gap: 16px;
}

/* Step 1 */
.pub-modal-icon { font-size: 32px; line-height: 1; }
.pub-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #F5F5F3;
  text-align: center;
}
.pub-modal-desc {
  font-size: 13px;
  color: #6F6F6B;
  text-align: center;
  line-height: 1.65;
  margin-top: -4px;
}

/* Name field */
.pub-name-field {
  display: flex;
  align-items: center;
  width: 100%;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 150ms;
}
.pub-name-field:focus-within { border-color: #D6B35F; }
.pub-name-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #6F6F6B;
  padding: 10px 0 10px 14px;
  white-space: nowrap;
  user-select: none;
}
.pub-name-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #D6B35F;
  padding: 10px 14px 10px 2px;
  caret-color: #D6B35F;
}
.pub-name-input::placeholder { color: #6F6F6B; font-weight: 400; }

.pub-name-hint {
  font-size: 11px;
  color: #6F6F6B;
  align-self: flex-start;
  min-height: 16px;
  margin-top: -8px;
}
.pub-name-hint.error { color: #ef4444; }
.pub-name-hint.ok    { color: #34d399; }

/* Categories */
.pub-category-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6F6F6B;
  align-self: flex-start;
  margin-bottom: -8px;
}
.pub-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
.pub-cat-btn {
  padding: 5px 12px;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #9A9A97;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 140ms;
}
.pub-cat-btn:hover { border-color: rgba(214,179,95,0.35); color: #F5F5F3; }
.pub-cat-btn.active {
  background: rgba(214,179,95,0.08);
  border-color: rgba(214,179,95,0.5);
  color: #D6B35F;
}

/* Description input */
.pub-desc-input {
  width: 100%;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  color: #F5F5F3;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 14px;
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: border-color 150ms;
  caret-color: #D6B35F;
}
.pub-desc-input:focus { border-color: rgba(255,255,255,0.2); }
.pub-desc-input::placeholder { color: #6F6F6B; }

/* Actions */
.pub-modal-actions {
  display: flex;
  gap: 0;
  width: 100%;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.pub-cancel-btn {
  flex: 1;
  padding: 12px;
  border-radius: 0;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #6F6F6B;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 140ms, background 140ms;
}
.pub-cancel-btn:hover { color: #F5F5F3; background: rgba(255,255,255,0.02); }
.pub-submit-btn {
  flex: 2;
  padding: 12px;
  border-radius: 0;
  border: none;
  background: rgba(214,179,95,0.08);
  color: #D6B35F;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 140ms;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pub-submit-btn:hover:not(:disabled) { background: rgba(214,179,95,0.14); }
.pub-submit-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Publish loading overlay ── */
.pub-loading {
  position: absolute;
  inset: 0;
  background: #0F1012;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
}
.pub-loading-spinner {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  border-top-color: #D6B35F;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.pub-loading-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6F6F6B;
}

/* Step 2: success */
.pub-success-icon {
  width: 48px; height: 48px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34d399;
}
.pub-review-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #9A9A97;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 14px;
  border-radius: 0;
}
.pub-review-dot {
  width: 6px; height: 6px;
  background: #f59e0b;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}
.pub-skill-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
}
.pub-skill-slug {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #F5F5F3;
  flex: 1;
}
.pub-skill-cat {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #D6B35F;
  background: rgba(214,179,95,0.06);
  border: 1px solid rgba(214,179,95,0.2);
  padding: 3px 8px;
  border-radius: 0;
}

/* ── OS tabs ── */
.os-tabs {
  display: flex;
  gap: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.08);
  align-self: flex-start;
}
.os-tab {
  padding: 6px 16px;
  border-radius: 0;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #6F6F6B;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 150ms, background 150ms;
}
.os-tab:last-child { border-right: none; }
.os-tab.active {
  background: rgba(255,255,255,0.03);
  color: #F5F5F3;
  box-shadow: none;
}

/* ── Try Skill publish state ── */
.try-success-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.try-success-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #34d399;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  padding: 3px 10px;
  border-radius: 0;
}
.try-status-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f59e0b;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 3px 10px;
  border-radius: 0;
}
.try-publish-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 8px;
  min-height: 16px;
}

/* ── Name input error (reused from pub modal) ── */
.skill-name-input.input-error {
  border-color: #ef4444 !important;
  border-style: solid !important;
  background: rgba(239,68,68,0.08) !important;
  color: #ef4444 !important;
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
  80%      { transform: translateX(-3px); }
}
/* ── Exists modal ── */
.exists-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.exists-modal.open { display: flex; }

.exists-modal-box {
  background: #0F1012;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  padding: 32px 28px;
  max-width: 380px;
  width: calc(100vw - 32px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: none;
}
.exists-modal-icon { font-size: 32px; }
.exists-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #F5F5F3;
}
.exists-modal-desc {
  font-size: 13px;
  color: #9A9A97;
  line-height: 1.6;
}
.exists-modal-desc code {
  font-family: 'JetBrains Mono', monospace;
  background: #0A0A0B;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 0;
  color: #D6B35F;
}
.exists-modal-btn {
  margin-top: 4px;
  padding: 9px 24px;
  background: rgba(214,179,95,0.08);
  border: 1px solid rgba(214,179,95,0.3);
  border-radius: 0;
  color: #D6B35F;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 150ms;
}
.exists-modal-btn:hover { background: rgba(214,179,95,0.14); }

.try-publish-error.error-conflict {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: #ef4444;
  margin-top: 10px;
  line-height: 1.5;
}
.try-publish-error.error-conflict::before {
  content: "⚠";
  flex-shrink: 0;
  font-size: 13px;
}

.conflict-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.7;
}

/* ── Conflict error card ── */
.conflict-card {
  display: flex;
  gap: 12px;
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.18);
  border-radius: 0;
  padding: 12px 14px;
  margin-top: 12px;
  text-align: left;
}
.conflict-card-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.conflict-card-body { display: flex; flex-direction: column; gap: 4px; }
.conflict-card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ef4444;
}
.conflict-card-msg {
  font-size: 12px;
  color: #9A9A97;
  line-height: 1.5;
}
.conflict-card-hint {
  font-size: 11px;
  color: #6F6F6B;
  margin-top: 2px;
}

/* ── Preview EOF ── */
.preview-eof {
  margin-top: 96px;
  padding-bottom: 56px;
  position: relative;
  z-index: 1;
}
.eof-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 32px;
}
.eof-label {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  margin: 0 0 20px;
}
.eof-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 0;
  width: 100%;
  transition: background 150ms;
}
.eof-action:hover { background: rgba(255,255,255,0.02); }
.eof-action:hover .eof-ready,
.eof-action:hover .eof-copy-hint { color: rgba(214,179,95,0.5); }
.eof-action:hover .eof-cmd { color: #D6B35F; }
.eof-action.copied .eof-ready,
.eof-action.copied .eof-cmd,
.eof-action.copied .eof-copy-hint { color: #D6B35F; }

.eof-ready {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.12);
  transition: color 150ms;
  user-select: none;
}
.eof-cmd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  background: none;
  border: none;
  padding: 0;
  letter-spacing: -0.01em;
  transition: color 150ms;
}
.eof-copy-hint {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2px 6px;
  transition: color 150ms, border-color 150ms;
}
.eof-action:hover .eof-copy-hint { border-color: rgba(214,179,95,0.25); }

/* ── Custom scrollbars ── */
#editor::-webkit-scrollbar,
.preview-scroll::-webkit-scrollbar,
.raw-scroll::-webkit-scrollbar,
.npm-panel::-webkit-scrollbar {
  width: 6px;
}
#editor::-webkit-scrollbar-track,
.preview-scroll::-webkit-scrollbar-track,
.raw-scroll::-webkit-scrollbar-track,
.npm-panel::-webkit-scrollbar-track {
  background: transparent;
}
#editor::-webkit-scrollbar-thumb,
.preview-scroll::-webkit-scrollbar-thumb,
.raw-scroll::-webkit-scrollbar-thumb,
.npm-panel::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 100px;
}
#editor::-webkit-scrollbar-thumb:hover,
.preview-scroll::-webkit-scrollbar-thumb:hover,
.raw-scroll::-webkit-scrollbar-thumb:hover,
.npm-panel::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Publish modal description input — duplicate kept for legacy JS refs */

/* ══════════════════════════════════════════════════════════
   LIGHT MODE — create page
   ══════════════════════════════════════════════════════════ */
[data-theme="light"] .editor-page,
[data-theme="light"] body.editor-page { background: #FAFAF8; }

/* Navbar */
[data-theme="light"] body.editor-page #navbar { background: #FAFAF8; border-bottom: 1px solid rgba(0,0,0,0.08); }
[data-theme="light"] body.editor-page .logo-text,
[data-theme="light"] body.editor-page .nav-logo { color: #111111; }
[data-theme="light"] body.editor-page .nav-link { color: #888888; border-left-color: rgba(0,0,0,0.04); }
[data-theme="light"] body.editor-page .nav-link:hover { color: #111111; background: rgba(0,0,0,0.02); }
[data-theme="light"] body.editor-page .nav-link-active { color: #555555 !important; }
[data-theme="light"] body.editor-page .theme-toggle { color: #888888; border-left-color: rgba(0,0,0,0.04); }
[data-theme="light"] body.editor-page .theme-toggle:hover { color: #111111; background: rgba(0,0,0,0.02); }

/* Shell + panes */
[data-theme="light"] .editor-frame { background: #FAFAF8; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .editor-shell { background: #FAFAF8; }
[data-theme="light"] .editor-pane { background: #FAFAF8; border-right-color: rgba(0,0,0,0.08); }
[data-theme="light"] .editor-divider { background: rgba(0,0,0,0.08); }
[data-theme="light"] .preview-pane { background: #FAFAF8; }

/* Pane bars */
[data-theme="light"] .pane-bar { background: #F4F4F2; border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .pane-bar-title { color: #888888; }
[data-theme="light"] .pane-bar-sep { color: #888888; }

/* Skill name input */
[data-theme="light"] .skill-name-input { color: #C49A38; border-bottom-color: rgba(0,0,0,0.15); caret-color: #C49A38; }
[data-theme="light"] .skill-name-input:hover { border-color: rgba(0,0,0,0.25); }
[data-theme="light"] .skill-name-input:focus { border-color: #C49A38; }
[data-theme="light"] .skill-name-input::placeholder { color: #888888; }
[data-theme="light"] .skill-name-input.input-error { background: rgba(239,68,68,0.06) !important; }

/* Tab + action buttons */
[data-theme="light"] .tab-btn { color: #888888; border-right-color: rgba(0,0,0,0.06); }
[data-theme="light"] .tab-btn:hover { color: #111111; background: rgba(0,0,0,0.03); }
[data-theme="light"] .tab-btn.active { color: #C49A38; box-shadow: inset 0 -2px 0 #C49A38; }
[data-theme="light"] .bar-btn { color: #888888; border-left-color: rgba(0,0,0,0.06); }
[data-theme="light"] .bar-btn:hover { color: #111111; background: rgba(0,0,0,0.03); }
[data-theme="light"] .bar-btn-publish { color: #C49A38 !important; background: rgba(196,154,56,0.06); }
[data-theme="light"] .bar-btn-publish:hover { background: rgba(196,154,56,0.12); }

/* Editor textarea */
[data-theme="light"] #editor { color: #111111; }
[data-theme="light"] #editor { caret-color: #C49A38; color: #111111; }

/* Preview markdown */
[data-theme="light"] .preview-inner { color: #111111; }
[data-theme="light"] .fm-block { background: #F4F4F2; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .fm-label { background: #FAFAF8; color: #C49A38; }
[data-theme="light"] .fm-pre { color: #555555; }
[data-theme="light"] .md-body h1,
[data-theme="light"] .md-body h2,
[data-theme="light"] .md-body h3 { color: #111111; }
[data-theme="light"] .md-body h2 { border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .md-body p,
[data-theme="light"] .md-body li { color: #555555; }
[data-theme="light"] .md-body strong,
[data-theme="light"] .md-body em { color: #111111; }
[data-theme="light"] .md-body code { background: #F4F4F2; border-color: rgba(0,0,0,0.08); color: #7c3aed; }
[data-theme="light"] .md-body pre { background: #F4F4F2; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .md-body pre code { background: none; border: none; color: #111111; }
[data-theme="light"] .md-body th { background: #F4F4F2; border-color: rgba(0,0,0,0.08); color: #111111; }
[data-theme="light"] .md-body td { border-color: rgba(0,0,0,0.08); color: #555555; }
[data-theme="light"] .md-body hr { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .raw-body { color: #555555; }
[data-theme="light"] .eof-divider { background: rgba(0,0,0,0.08); }
[data-theme="light"] .eof-label { color: rgba(0,0,0,0.25); }
[data-theme="light"] .eof-ready { color: rgba(0,0,0,0.2); }
[data-theme="light"] .eof-cmd { color: rgba(0,0,0,0.4); }
[data-theme="light"] .eof-copy-hint { color: rgba(0,0,0,0.2); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .eof-action:hover { background: rgba(0,0,0,0.02); }
[data-theme="light"] .eof-action:hover .eof-ready,
[data-theme="light"] .eof-action:hover .eof-copy-hint { color: rgba(196,154,56,0.7); }
[data-theme="light"] .eof-action:hover .eof-cmd { color: #C49A38; }
[data-theme="light"] .eof-action:hover .eof-copy-hint { border-color: rgba(196,154,56,0.3); }
[data-theme="light"] .eof-action.copied .eof-ready,
[data-theme="light"] .eof-action.copied .eof-cmd,
[data-theme="light"] .eof-action.copied .eof-copy-hint { color: #C49A38; }

/* npm / install panel */
[data-theme="light"] .npm-panel { background: #F4F4F2; border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .npm-panel-header { background: #F4F4F2; border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .npm-panel-title { color: #111111; }
[data-theme="light"] .npm-panel-close { color: #888888; }
[data-theme="light"] .npm-panel-close:hover { color: #111111; }
[data-theme="light"] .npm-pkg-label { color: #888888; }
[data-theme="light"] .npm-pkg-name { color: #C49A38; }
[data-theme="light"] .npm-download-btn { color: #C49A38; background: rgba(196,154,56,0.06); border-color: rgba(196,154,56,0.25); }
[data-theme="light"] .npm-download-btn:hover { background: rgba(196,154,56,0.12); }
[data-theme="light"] .npm-step-num { background: #FAFAF8; border-color: rgba(0,0,0,0.08); color: #888888; }
[data-theme="light"] .npm-step-title { color: #111111; }
[data-theme="light"] .npm-step-note { color: #888888; }
[data-theme="light"] .npm-step-note code { background: #FAFAF8; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .npm-code-block { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .npm-code-block code { color: #111111; }
[data-theme="light"] .npm-copy-btn { color: #888888; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .npm-copy-btn:hover { color: #111111; border-color: rgba(0,0,0,0.2); }

/* Category dropdown */
[data-theme="light"] .publish-dropdown { background: #F4F4F2; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .publish-dropdown-title { color: #888888; }
[data-theme="light"] .category-btn { color: #555555; }
[data-theme="light"] .category-btn:hover { background: rgba(0,0,0,0.04); color: #111111; }

/* Publish modal */
[data-theme="light"] .pub-overlay { background: rgba(0,0,0,0.3); }
[data-theme="light"] .pub-modal { background: #F4F4F2; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .pub-modal-title { color: #111111; }
[data-theme="light"] .pub-modal-desc { color: #888888; }
[data-theme="light"] .pub-name-field { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .pub-name-field:focus-within { border-color: #C49A38; }
[data-theme="light"] .pub-name-prefix { color: #888888; }
[data-theme="light"] .pub-name-input { color: #C49A38; caret-color: #C49A38; }
[data-theme="light"] .pub-name-hint { color: #888888; }
[data-theme="light"] .pub-category-label { color: #888888; }
[data-theme="light"] .pub-cat-btn { color: #555555; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .pub-cat-btn:hover { border-color: rgba(196,154,56,0.4); color: #111111; }
[data-theme="light"] .pub-cat-btn.active { background: rgba(196,154,56,0.1); border-color: rgba(196,154,56,0.5); color: #C49A38; }
[data-theme="light"] .pub-desc-input { background: #FFFFFF; border-color: rgba(0,0,0,0.08); color: #111111; }
[data-theme="light"] .pub-desc-input::placeholder { color: #888888; }
[data-theme="light"] .pub-desc-input:focus { border-color: rgba(0,0,0,0.2); }
[data-theme="light"] .pub-modal-actions { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .pub-cancel-btn { color: #888888; border-right-color: rgba(0,0,0,0.08); }
[data-theme="light"] .pub-cancel-btn:hover { color: #111111; background: rgba(0,0,0,0.03); }
[data-theme="light"] .pub-submit-btn { color: #C49A38; background: rgba(196,154,56,0.08); }
[data-theme="light"] .pub-submit-btn:hover:not(:disabled) { background: rgba(196,154,56,0.15); }
[data-theme="light"] .pub-success-icon { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.2); }
[data-theme="light"] .pub-review-tag { background: #FFFFFF; border-color: rgba(0,0,0,0.08); color: #555555; }
[data-theme="light"] .pub-skill-preview { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .pub-skill-slug { color: #111111; }
[data-theme="light"] .pub-skill-cat { color: #C49A38; background: rgba(196,154,56,0.08); border-color: rgba(196,154,56,0.2); }

/* OS tabs */
[data-theme="light"] .os-tabs { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .os-tab { color: #888888; border-right-color: rgba(0,0,0,0.08); }
[data-theme="light"] .os-tab.active { color: #111111; background: rgba(0,0,0,0.04); }

/* Error/conflict states */
[data-theme="light"] .name-error-tip { background: #FAFAF8; }
[data-theme="light"] .exists-modal-box { background: #F4F4F2; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .exists-modal-title { color: #111111; }
[data-theme="light"] .exists-modal-desc { color: #555555; }
[data-theme="light"] .exists-modal-desc code { background: #FFFFFF; border-color: rgba(0,0,0,0.08); color: #C49A38; }
[data-theme="light"] .exists-modal-btn { color: #C49A38; background: rgba(196,154,56,0.06); border-color: rgba(196,154,56,0.25); }
[data-theme="light"] .publish-toast { background: #F4F4F2; border-color: rgba(0,0,0,0.12); color: #111111; }

/* Scrollbars */
[data-theme="light"] #editor::-webkit-scrollbar-thumb,
[data-theme="light"] .preview-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 768px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Page: allow scrolling ── */
  .editor-page {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  /* ── Frame ── */
  .editor-frame {
    height: auto;
    min-height: calc(100vh - 52px);
    border-left: none;
    border-right: none;
  }

  /* ── Shell: stack panes vertically ── */
  .editor-shell { flex-direction: column; height: auto; }
  .editor-divider { display: none; }

  /* ── Editor pane ── */
  .editor-pane {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 42vh;
    max-height: 50vh;
  }
  #editor { padding: 16px 20px; font-size: 13px; }

  /* ── Editor pane bar (left pane) ── */
  .editor-pane .pane-bar {
    padding: 0 0 0 14px;
    height: 48px;
  }
  .pane-bar-left   { min-width: 0; flex-shrink: 1; }
  .pane-bar-hint   { display: none; }
  .skill-name-input { width: 130px; }

  /* ══════════════════════════════════════════════════════
   * PREVIEW PANE BAR — two-row intentional layout
   *
   *  Row 1 (44px) │ [PREVIEW ─────────────] [RAW ──────]
   *  Row 2 (44px) │ [⠿ ACTIONS ▾]           [→ PUBLISH]
   *
   * Secondary actions (Copy, Download, Add to Claude) are
   * collapsed into the Actions overflow menu on mobile.
   * Publish stays visible and prominent.
   * ══════════════════════════════════════════════════════ */
  .preview-pane .pane-bar {
    flex-wrap: wrap;
    padding: 0;
    height: auto;
  }

  /* Row 1 — full-width tab strip */
  .preview-pane .tab-group {
    flex: 0 0 100%;
    display: flex;
    height: 44px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .preview-pane .tab-btn {
    flex: 1;                             /* each tab = 50% width */
    height: 44px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  /* Row 2 — compact actions bar */
  .preview-pane .pane-bar-actions {
    flex: 0 0 100%;
    display: flex;
    align-items: stretch;
    justify-content: space-between;      /* Actions ← left | Publish → right */
    height: 44px;
    overflow: visible;                   /* dropdown must not be clipped */
    margin-right: 0;                     /* cancel desktop -20px bleed */
  }

  /* Hide secondary desktop buttons on mobile */
  .bar-btn-secondary { display: none; }

  /* Overflow menu: enabled on mobile */
  .bar-overflow-wrap {
    display: flex;
    height: 44px;
  }
  .bar-overflow-trigger { height: 44px; }
  .bar-btn { height: 44px; font-size: 10px; }

  /* ── Preview pane ── */
  .preview-pane  { min-height: 50vh; }
  .preview-inner { padding: 20px 16px 40px; }

  /* ── npm / Add-to-Claude panel — fixed bottom sheet ── */
  .npm-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    border-left: none;
    border-right: none;
    border-bottom: none;
    z-index: 90;
  }
  .npm-panel-body { padding: 16px; gap: 16px; }
  .npm-code-block { flex-wrap: wrap; gap: 8px; }
  .npm-code-block code { word-break: break-all; overflow-wrap: break-word; }

  /* ── Publish dropdown — right-anchored ── */
  .publish-dropdown { left: auto; right: 0; top: 100%; min-width: 180px; }

  /* ── Publish modal — bottom sheet ── */
  .pub-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    max-height: 92vh;
    overflow-y: auto;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
  .pub-modal.open { transform: none; }
  .pub-step { padding: 24px 20px 20px; gap: 12px; }
  .pub-modal-desc { font-size: 12px; }
}

@media (max-width: 480px) {
  body.editor-page .nav-inner { padding: 0 0 0 16px; }
  .skill-name-input { width: 100px; }
}
