/* ══════════════════════════════════════════════════════════════
   skill-builder.css  —  Skill Builder view
   ══════════════════════════════════════════════════════════════ */

/* ── Layout ── */
#view-skill-builder { flex-direction: row; overflow: hidden; }

/* ── Left: Skill tag panel ── */
.sb-tag-panel {
  width: var(--tagbar-w); flex-shrink: 0;
  background: var(--ps-sidebar);
  display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sb-tag-header {
  padding: 14px 12px 12px; border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.sb-tag-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.25); margin-bottom: 7px;
}
.sb-tag-title {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,.8);
}
.sb-tag-title em { font-style: normal; color: var(--ps-terracotta-light); }
.sb-tag-scroll {
  flex: 1; overflow-y: auto; padding: 10px 10px 16px;
}
.sb-tag-scroll::-webkit-scrollbar { width: 3px; }
.sb-tag-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }

/* Skill tag buttons — same base as .tag-btn but terracotta accent */
.sb-tag-btn {
  display: flex; align-items: center; background: transparent;
  border: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.48);
  font-family: var(--mono); font-size: 12px; padding: 5px 9px;
  border-radius: var(--ps-radius-sm); cursor: pointer; text-align: left;
  width: 100%; transition: all .12s; margin-bottom: 3px;
}
.sb-tag-btn:hover {
  background: rgba(168,75,42,.15); border-color: rgba(168,75,42,.4); color: rgba(255,255,255,.9);
}
.sb-tag-btn:active { transform: scale(.97); }
.sb-tb-name { color: var(--ps-terracotta-light); margin: 0 1px; flex: 1; }
.sb-tb-bracket { color: rgba(255,255,255,.22); }
.sb-tb-plus { margin-left: auto; color: rgba(255,255,255,.18); font-size: 14px; padding-left: 8px; transition: color .12s; }
.sb-tag-btn:hover .sb-tb-plus { color: var(--ps-terracotta-light); }

/* ── Custom tag entry ── */
.sb-custom-tag-wrap {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sb-custom-tag-btn {
  border-style: dashed;
  color: rgba(255,255,255,.3);
  gap: 6px;
}
.sb-ctb-plus { color: var(--ps-terracotta-light); font-size: 15px; line-height: 1; }
.sb-ctb-label { flex: 1; color: rgba(255,255,255,.3); font-size: 11px; font-style: italic; }
.sb-custom-tag-btn:hover .sb-ctb-label { color: rgba(255,255,255,.7); }
.sb-custom-tag-form {
  display: none; align-items: center; gap: 4px; padding: 2px 0;
}
.sb-custom-tag-form.sb-ctf-open { display: flex; }
.sb-custom-tag-input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--ps-radius-sm); color: rgba(255,255,255,.9);
  font-family: var(--mono); font-size: 12px; padding: 4px 7px; outline: none;
}
.sb-custom-tag-input:focus { border-color: var(--ps-terracotta); }
.sb-custom-tag-input::placeholder { color: rgba(255,255,255,.25); }
.sb-ctag-add {
  background: var(--ps-terracotta); border: none; border-radius: var(--ps-radius-sm);
  color: #fff; font-size: 11px; font-weight: 600; padding: 4px 9px;
  cursor: pointer; white-space: nowrap; transition: background .12s;
}
.sb-ctag-add:hover { background: var(--ps-terracotta-dark); }
.sb-ctag-cancel {
  background: transparent; border: none; color: rgba(255,255,255,.3);
  font-size: 14px; cursor: pointer; padding: 2px 4px; line-height: 1;
  transition: color .12s;
}
.sb-ctag-cancel:hover { color: rgba(255,255,255,.7); }

/* ── Center: Skill workspace ── */
.sb-workspace {
  flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--ps-off-white);
}
.sb-workspace-body {
  flex: 1; overflow-y: auto; padding: 24px 28px;
  display: flex; flex-direction: column; align-items: center;
}
.sb-workspace-body::-webkit-scrollbar { width: 4px; }
.sb-workspace-body::-webkit-scrollbar-thumb { background: var(--ps-border); border-radius: 2px; }

/* Skill name context chip */
.sb-skill-context { width: 100%; max-width: 720px; margin-bottom: 14px; display: none; }
.sb-skill-context.visible { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sb-skill-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ps-surface); border: 1.5px solid var(--ps-terracotta-light);
  border-radius: var(--ps-radius-pill); padding: 4px 10px 4px 8px;
  font-size: 12px; font-weight: 500; color: var(--ps-text-secondary);
}
.sb-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ps-terracotta); flex-shrink: 0; }
.sb-chip-name { color: var(--ps-terracotta-dark); font-weight: 600; font-size: 12px; }
.sb-chip-x {
  background: none; border: none; color: var(--ps-text-muted); cursor: pointer;
  font-size: 15px; padding: 0 0 0 3px; line-height: 1; transition: color .12s;
}
.sb-chip-x:hover { color: var(--ps-terracotta); }

/* Blocks area */
.sb-blocks-area {
  width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}

/* Override block-tag color for skill context */
.sb-workspace .block-tag { color: var(--ps-terracotta); }

/* Enhance button per block */
.sb-enhance-btn {
  opacity: 0; margin-left: auto; flex-shrink: 0;
  background: none; border: 1px solid var(--ps-azul-light);
  color: var(--ps-azul-dark); font-family: var(--display); font-size: 10.5px; font-weight: 600;
  padding: 2px 9px; border-radius: var(--ps-radius-pill); cursor: pointer;
  transition: all .12s; white-space: nowrap;
}
.block-card:hover .sb-enhance-btn,
.block-card:focus-within .sb-enhance-btn { opacity: 1; }
.sb-enhance-btn:hover { background: var(--ps-azul-faint); border-color: var(--ps-azul); }
.sb-enhance-btn.loading { opacity: .5; cursor: wait; pointer-events: none; }

/* Main builder: hide enhance button entirely for guests */
#blocks-area .sb-enhance-btn { display: none; }
body.ps-logged-in #blocks-area .sb-enhance-btn { display: inline-flex; }

/* Empty state */
.sb-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; width: 100%; padding: 60px 0;
  pointer-events: none; user-select: none;
}
.sb-empty-tag { font-family: var(--mono); font-size: 22px; color: var(--ps-terracotta-light); margin-bottom: 8px; letter-spacing: -.5px; }
.sb-empty-hint { font-size: 13.5px; color: var(--ps-text-muted); line-height: 1.6; }
.sb-starter { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--ps-text-muted); margin-top: 16px; pointer-events: all; flex-wrap: wrap; justify-content: center; }
.sb-starter-tag {
  background: var(--ps-bege-rose); border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-xs); padding: 3px 8px;
  font-family: var(--mono); font-size: 10.5px; color: var(--ps-text-secondary);
  cursor: pointer; transition: all .12s;
}
.sb-starter-tag:hover { background: rgba(168,75,42,.1); border-color: var(--ps-terracotta-light); color: var(--ps-terracotta-dark); }

/* AI Skill Builder bar — mirrors builder.css #ai-prompt-bar, logged-in only */
#ai-skill-bar {
  display: none;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 20px;
  background: var(--ps-surface);
  border-top: 1.5px solid var(--ps-border);
  flex-shrink: 0;
  position: relative;
}
.ps-logged-in #ai-skill-bar { display: flex; }

.askb-resize-handle {
  position: absolute;
  top: -6px; left: 0; right: 0;
  height: 12px;
  cursor: ns-resize;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.askb-resize-handle::after {
  content: '';
  width: 36px; height: 3px;
  border-radius: 2px;
  background: var(--ps-border);
  transition: background .15s, width .15s;
}
.askb-resize-handle:hover::after,
.askb-resize-handle.dragging::after { background: var(--ps-azul-light); width: 48px; }

.askb-label {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; flex-shrink: 0; padding-bottom: 2px;
}
.askb-icon { font-size: 13px; color: var(--ps-terracotta); line-height: 1; }
.askb-text { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ps-text-muted); white-space: nowrap; }

.askb-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  min-width: 0;
}
.askb-input-wrap #ai-skill-input { flex: 1; width: 100%; }

.askb-clear-btn {
  position: absolute;
  top: 5px; right: 6px;
  width: 17px; height: 17px;
  border-radius: 50%;
  border: none;
  background: var(--ps-border-strong, #ccc);
  color: var(--ps-text-muted);
  font-size: 13px;
  line-height: 17px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s, color .15s;
  z-index: 2;
}
.askb-clear-btn:hover { background: var(--ps-terracotta); color: white; }
.askb-input-wrap.has-content .askb-clear-btn { display: flex; }

#ai-skill-input {
  flex: 1;
  border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-radius-sm);
  padding: 8px 12px;
  font-family: var(--display);
  font-size: 13.5px;
  color: var(--ps-text-primary);
  background: var(--ps-off-white);
  resize: none;
  outline: none;
  line-height: 1.5;
  min-height: 36px;
  overflow-y: auto;
  transition: border-color .15s;
}
#ai-skill-input:focus { border-color: var(--ps-terracotta); box-shadow: 0 0 0 3px rgba(168,75,42,.08); }
#ai-skill-input::placeholder { color: var(--ps-text-muted); opacity: .7; }

#ai-skill-build-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ps-terracotta);
  color: white;
  border: none;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--ps-radius-pill);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
  height: 36px;
}
#ai-skill-build-btn:hover { background: var(--ps-terracotta-dark); box-shadow: 0 4px 16px rgba(168,75,42,.3); transform: translateY(-1px); }
#ai-skill-build-btn:active { transform: scale(.97); box-shadow: none; }
#ai-skill-build-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.ai-skill-build-icon { font-size: 11px; }

@media (max-width: 700px) {
  #ai-skill-bar { padding: 8px 12px; }
  .askb-label { display: none; }
  .ai-skill-build-label { display: none; }
  #ai-skill-build-btn { padding: 9px 13px; }
}

/* Preview pane */
#preview-pane-sb {
  display: none; border-top: 1.5px solid var(--ps-border); padding: 14px 20px;
  max-height: 220px; overflow-y: auto; flex-shrink: 0; background: var(--ps-surface);
}
#preview-pane-sb.open { display: block; }
#preview-pane-sb pre { font-family: var(--mono); font-size: 12px; color: var(--ps-text-secondary); white-space: pre-wrap; word-break: break-word; line-height: 1.75; }
#preview-pane-sb pre .xml-tag { color: var(--ps-terracotta); }

/* Export button + dropdown */
.sb-export-wrap { position: relative; }
.sb-export-menu {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  background: var(--ps-surface); border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-radius); box-shadow: var(--ps-shadow-lg);
  min-width: 290px; display: none; flex-direction: column;
  z-index: 100; overflow: hidden;
}
.sb-export-menu.open { display: flex; }
.sb-export-item {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 16px;
  cursor: pointer; border-bottom: 1px solid var(--ps-border); transition: background .12s;
}
.sb-export-item:last-child { border-bottom: none; }
.sb-export-item:hover { background: var(--ps-off-white); }
.sb-export-name { font-size: 13px; font-weight: 600; color: var(--ps-text-primary); }
.sb-export-desc { font-size: 11.5px; color: var(--ps-text-muted); margin-top: 1px; }

/* ── Right: Chat panel ── */
.sb-chat {
  width: 0; flex-shrink: 0; background: var(--ps-surface);
  border-left: 0px solid var(--ps-border); overflow: hidden;
  display: flex; flex-direction: column;
  transition: width .25s cubic-bezier(.4,0,.2,1), border-left-width .25s;
}
.sb-chat.open { width: 360px; border-left-width: 1.5px; }

.sb-chat-header {
  padding: 12px 14px 10px; flex-shrink: 0; border-bottom: 1.5px solid var(--ps-border);
  display: flex; align-items: center; justify-content: space-between;
}
.sb-chat-title { font-size: 13px; font-weight: 700; color: var(--ps-text-primary); }
.sb-chat-title em { font-style: normal; color: var(--ps-azul); }
.sb-chat-close {
  width: 24px; height: 24px; border-radius: 50%; background: var(--ps-bege-rose); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--ps-text-muted); transition: all .12s;
}
.sb-chat-close:hover { background: var(--ps-azul-light); color: var(--ps-azul-dark); }

.sb-mode-tabs { display: flex; border-bottom: 1.5px solid var(--ps-border); flex-shrink: 0; }
.sb-mode-tab {
  flex: 1; padding: 9px 8px; font-family: var(--display); font-size: 12px; font-weight: 500;
  cursor: pointer; border: none; background: transparent; color: var(--ps-text-muted);
  transition: all .15s; border-bottom: 2px solid transparent; margin-bottom: -1.5px;
}
.sb-mode-tab.active { color: var(--ps-azul-dark); border-bottom-color: var(--ps-azul); font-weight: 600; }

.sb-chat-provider {
  padding: 8px 12px; flex-shrink: 0; border-bottom: 1.5px solid var(--ps-border);
  display: flex; align-items: center; gap: 8px;
}
.sb-provider-label { font-size: 11px; color: var(--ps-text-muted); flex-shrink: 0; }
.sb-provider-select {
  flex: 1; border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius-sm);
  padding: 4px 8px; font-family: var(--display); font-size: 12px; color: var(--ps-text-primary);
  background: var(--ps-off-white); outline: none; cursor: pointer;
}
.sb-provider-select:focus { border-color: var(--ps-azul); }

.sb-chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 8px;
}
.sb-chat-messages::-webkit-scrollbar { width: 3px; }
.sb-chat-messages::-webkit-scrollbar-thumb { background: var(--ps-border); border-radius: 2px; }

.sb-chat-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 20px;
}
.sb-chat-empty-text { font-size: 12.5px; color: var(--ps-text-muted); line-height: 1.65; }

/* Chat bubbles */
.sb-msg { display: flex; flex-direction: column; max-width: 100%; }
.sb-msg.user { align-items: flex-end; }
.sb-msg.ai   { align-items: flex-start; }
.sb-bubble {
  padding: 8px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.6;
  max-width: 92%; word-break: break-word;
}
.sb-msg.user .sb-bubble { background: var(--ps-azul); color: white; border-bottom-right-radius: 3px; }
.sb-msg.ai .sb-bubble {
  background: white; border: 1.5px solid var(--ps-border);
  color: var(--ps-text-primary); border-bottom-left-radius: 3px;
}
.sb-bubble p { margin: 0 0 6px; }
.sb-bubble p:last-child { margin-bottom: 0; }

.sb-thinking {
  background: white; border: 1.5px solid var(--ps-border); border-radius: 12px; border-bottom-left-radius: 3px;
  padding: 10px 14px; display: flex; align-items: center; gap: 4px;
}
.sb-thinking span {
  width: 5px; height: 5px; background: var(--ps-text-muted); border-radius: 50%;
  animation: sbDotPulse 1.2s ease-in-out infinite;
}
.sb-thinking span:nth-child(2) { animation-delay: .2s; }
.sb-thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes sbDotPulse { 0%,80%,100% { transform: scale(.7); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Add-to-skill row (build mode) */
.sb-add-row {
  display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap;
}
.sb-add-btn {
  font-family: var(--display); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: var(--ps-radius-pill);
  border: 1.5px solid var(--ps-terracotta-light);
  background: var(--ps-terracotta-faint); color: var(--ps-terracotta-dark);
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.sb-add-btn:hover { background: var(--ps-terracotta-light); border-color: var(--ps-terracotta); }
.sb-add-select {
  font-family: var(--mono); font-size: 11px; color: var(--ps-text-secondary);
  border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius-sm);
  padding: 2px 6px; background: var(--ps-off-white); cursor: pointer; outline: none;
}
.sb-add-select:focus { border-color: var(--ps-terracotta-light); }

.sb-chat-input-area {
  padding: 10px 12px; flex-shrink: 0; border-top: 1.5px solid var(--ps-border);
  display: flex; align-items: flex-end; gap: 8px;
}
.sb-chat-input {
  flex: 1; border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius-sm);
  padding: 7px 10px; font-family: var(--display); font-size: 12.5px; color: var(--ps-text-primary);
  background: var(--ps-off-white); outline: none; resize: none;
  max-height: 100px; overflow-y: auto; line-height: 1.5; min-height: 34px;
}
.sb-chat-input:focus { border-color: var(--ps-azul); }
.sb-chat-send {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  background: var(--ps-azul); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.sb-chat-send:hover { background: var(--ps-azul-dark); transform: scale(1.05); }
.sb-chat-send:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.sb-chat-send svg { width: 13px; height: 13px; fill: none; stroke: white; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Enhance diff overlay ── */
#sb-diff-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(30,32,34,.5); display: none; align-items: center; justify-content: center; padding: 20px;
}
#sb-diff-overlay.visible { display: flex; }
.sb-diff-box {
  background: var(--ps-surface); border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius);
  box-shadow: 0 16px 56px rgba(30,32,34,.18); width: 100%; max-width: 680px;
  display: flex; flex-direction: column; overflow: hidden; max-height: 80vh;
}
.sb-diff-header {
  padding: 14px 18px 12px; border-bottom: 1.5px solid var(--ps-border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.sb-diff-title { font-size: 14px; font-weight: 700; color: var(--ps-text-primary); }
.sb-diff-subtitle { font-size: 12px; color: var(--ps-text-muted); margin-top: 2px; }
.sb-diff-close {
  width: 26px; height: 26px; border-radius: 50%; background: var(--ps-bege-rose); border: none;
  cursor: pointer; font-size: 14px; color: var(--ps-text-muted); transition: all .12s;
  display: flex; align-items: center; justify-content: center;
}
.sb-diff-close:hover { background: var(--ps-terracotta-light); color: var(--ps-terracotta-dark); }
.sb-diff-cols {
  display: grid; grid-template-columns: 1fr 1fr; flex: 1; overflow: hidden;
}
.sb-diff-col { display: flex; flex-direction: column; overflow: hidden; }
.sb-diff-col + .sb-diff-col { border-left: 1.5px solid var(--ps-border); }
.sb-diff-col-label {
  padding: 7px 14px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ps-text-muted); background: var(--ps-off-white); border-bottom: 1px solid var(--ps-border);
  flex-shrink: 0;
}
.sb-diff-col:last-child .sb-diff-col-label { color: var(--ps-verde-dark); }
.sb-diff-text {
  flex: 1; overflow-y: auto; padding: 14px; font-family: var(--display); font-size: 13px;
  color: var(--ps-text-secondary); line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.sb-diff-text::-webkit-scrollbar { width: 3px; }
.sb-diff-text::-webkit-scrollbar-thumb { background: var(--ps-border); border-radius: 2px; }
.sb-diff-footer {
  padding: 12px 18px; border-top: 1.5px solid var(--ps-border);
  background: var(--ps-off-white); display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; flex-shrink: 0;
}

/* ── Save skill modal ── */
#sb-save-overlay { position: fixed; inset: 0; background: rgba(30,32,34,.45); z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 20px; }
#sb-save-overlay.hidden { display: none; }
#sb-save-box { background: var(--ps-surface); border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius); padding: 24px 28px; width: 100%; max-width: 400px; box-shadow: 0 24px 64px rgba(30,32,34,.2); }
#sb-save-title { font-size: 15px; font-weight: 700; color: var(--ps-text-primary); margin-bottom: 14px; letter-spacing: -.2px; }
#sb-save-box input { width: 100%; border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius-sm); padding: 8px 12px; font-family: var(--display); font-size: 13px; color: var(--ps-text-primary); background: var(--ps-off-white); outline: none; transition: border-color .15s; margin-bottom: 10px; display: block; }
#sb-save-box input:focus { border-color: var(--ps-terracotta-light); }
#sb-save-box .confirm-ok { background: var(--ps-terracotta); }
#sb-save-box .confirm-ok:hover { background: var(--ps-terracotta-dark); }

/* pcard-btn danger variant */
.pcard-btn.danger { border-color: var(--ps-terracotta-light); color: var(--ps-terracotta); }
.pcard-btn.danger:hover { background: var(--ps-terracotta-faint); border-color: var(--ps-terracotta); color: var(--ps-terracotta-dark); }

/* ── Library: Skills section ── */
.skill-card {
  background: var(--ps-surface); border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-radius); padding: 14px 16px; margin-bottom: 10px;
  transition: all .15s;
}
.skill-card:hover { box-shadow: var(--ps-shadow); border-color: var(--ps-border-strong); }
.skill-card-name { font-size: 14px; font-weight: 700; color: var(--ps-text-primary); margin-bottom: 4px; }
.skill-card-desc { font-size: 12.5px; color: var(--ps-text-muted); line-height: 1.5; margin-bottom: 10px; }
.skill-card-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.skill-card-blocks { font-family: var(--mono); font-size: 11px; color: var(--ps-text-muted); }
.skill-card-date { font-family: var(--mono); font-size: 11px; color: var(--ps-text-muted); }
.skill-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.skill-tag-chip {
  font-family: var(--mono); font-size: 10px; color: var(--ps-terracotta-dark);
  background: var(--ps-terracotta-faint); border: 1px solid var(--ps-terracotta-light);
  border-radius: 4px; padding: 2px 7px;
}
.skill-card-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Mobile: hide chat panel, tag panel as overlay ── */
@media (max-width: 700px) {
  .sb-chat { display: none; }
  .sb-tag-panel {
    position: fixed; left: 0; top: var(--header-h); bottom: 56px;
    width: 260px; z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
  }
  .sb-tag-panel.mobile-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,.4);
  }
  .sb-workspace-body { padding: 14px 14px; }
  #sb-mobile-tags-btn { display: inline-flex; }
  #sb-preview-btn { display: none; }
}
#sb-mobile-tags-btn { display: none; }
