/* ========== Shortcut Help Modal ========== */
.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}

.shortcut-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

.shortcut-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== Page Help + Guided Tour ========== */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: auto;
}

.help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
}

[data-theme="dark"] .help-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.help-bar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: min(720px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.help-bar h2,
.tour-card h2,
.help-note h3 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

.help-bar h2 {
  font-size: 16px;
  line-height: 1.25;
}

.help-bar p,
.tour-card p,
.help-note p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.help-bar p {
  font-size: 12px;
}

.help-actions,
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.help-items,
.help-target-box,
.help-note,
.tour-spotlight,
.tour-card {
  position: fixed;
  z-index: 2;
}

.help-target-box,
.tour-spotlight {
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.08), 0 0 0 6px var(--accent-glow);
  pointer-events: none;
}

.help-note {
  width: min(240px, calc(100vw - 24px));
  padding: 12px 12px 12px 42px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.help-note-index {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.help-note h3 {
  font-size: 13px;
  line-height: 1.25;
}

.help-note p {
  font-size: 12px;
  line-height: 1.45;
}

.tour-card {
  padding: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.tour-step {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.tour-card h2 {
  font-size: 18px;
  line-height: 1.25;
}

.tour-card p {
  font-size: 13px;
  line-height: 1.55;
}

.tour-actions {
  margin-top: 16px;
}

.tour-actions .button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .help-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .help-actions,
  .tour-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .help-note {
    display: none;
  }
}

/* ========== Skill Modal ========== */
.skill-modal-content {
  width: min(90vw, 700px);
}

.skill-detail-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-editor {
  width: 100%;
  min-height: 200px;
  max-height: 400px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 16px;
  font: 14px/1.6 var(--font-mono);
  color: var(--text);
  transition: all var(--transition-base);
}

.skill-editor:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--panel-strong);
}

.skill-editor:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skill-validation-result {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
}

.skill-validation-result.valid {
  background: var(--success-soft);
  color: var(--success);
}

.skill-validation-result.invalid {
  background: var(--danger-soft);
  color: var(--danger);
}
