.tool-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr); gap: 18px; align-items: start; }
.tool-stack { display: grid; gap: 18px; }
.tool-card { padding: clamp(20px, 4vw, 30px); box-shadow: none; }
.tool-card h2 { margin-bottom: 8px; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.tool-form { display: grid; gap: 15px; margin-top: 22px; }
.tool-form .button { justify-self: start; }
.tool-status { min-height: 24px; margin-top: 14px; color: var(--ink-600); }
.tool-status.error { color: var(--danger-600); }
.tool-status.success { color: var(--success-600); }
.deck-list { display: grid; gap: 10px; margin-top: 20px; }
.deck-row { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); padding: 16px; }
.deck-row-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.deck-row-head strong { overflow-wrap: anywhere; }
.deck-actions { display: flex; gap: 7px; }
.deck-actions button { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-800); padding: 7px 10px; font-weight: 750; cursor: pointer; }
[data-theme="dark"] .deck-actions button { background: var(--surface); }
.deck-actions button.danger { color: var(--danger-600); }
.subdeck-list { display: grid; gap: 7px; margin: 13px 0 0 18px; }
.subdeck-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-left: 2px solid var(--brand-500); padding: 8px 10px; color: var(--ink-600); }
.file-drop { display: grid; justify-items: center; gap: 12px; border: 2px dashed #adc1c6; border-radius: 16px; background: var(--surface-soft); padding: clamp(28px, 6vw, 54px) 20px; text-align: center; }
.file-drop input { width: min(100%, 340px); }
.import-steps { counter-reset: import-step; display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.import-steps li { display: flex; gap: 10px; color: var(--ink-600); }
.import-steps li::before { counter-increment: import-step; content: counter(import-step); width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--surface-muted); color: var(--brand-700); font-size: 0.78rem; font-weight: 850; }

@media (max-width: 880px) {
  .tool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .deck-row-head { align-items: start; flex-direction: column; }
  .deck-actions { width: 100%; }
  .deck-actions button { flex: 1; min-height: 44px; }
  .tool-form .button { width: 100%; }
  .file-drop { padding: 28px 16px; }
  .file-drop input { width: 100%; }
  .tool-card { padding: 18px 14px; }
  .subdeck-row { flex-wrap: wrap; }
}
