/* Enchanting Guide (/minecraft/tools/enchanting/) */
.ench [hidden] { display: none !important; }
.ench img { image-rendering: pixelated; }

.ench-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.ench-items button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 76px; padding: 8px 4px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: inherit; font-size: 12px; text-align: center; cursor: pointer;
    transition: border-color var(--fast), transform var(--fast);
}
.ench-items button:hover { border-color: var(--accent); transform: translateY(-2px); }
.ench-items button:active { transform: translateY(1px); }
.ench-items button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--btn-line); }
.ench-items button span { max-width: 100%; line-height: 1.25; }

.ench-cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ench-set-card { flex: 1 1 260px; min-width: 0; }
.ench-order-card { flex: 3 1 440px; min-width: 0; }
.ench-choice { margin-bottom: 12px; }
.ench-checks { display: grid; gap: 2px; }

.ench .stat-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
.stat-card.ench-bad, .ench-step.ench-bad { background: var(--danger-bg); border-color: var(--danger-line); }

.ench-order { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.ench-step { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card2); border: 1px solid transparent; border-radius: var(--radius); font-size: 14px; }
.ench-n { flex: none; width: 24px; color: var(--muted); font-size: 13px; text-align: center; }
.ench-combo { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ench-part { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ench-part > span { display: flex; flex-direction: column; min-width: 0; }
.ench-part small { color: var(--muted); font-size: 12px; }
.ench-ic { flex: none; width: 24px; height: 24px; }
.ench-op { color: var(--muted); }
.ench-cost { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--muted); font-size: 13px; text-align: right; }
.ench-cost b { color: var(--text); font-size: 17px; }
.ench-note { margin: 0; font-size: 13px; }

@media (max-width: 480px) {
    .ench-step { flex-wrap: wrap; }
    .ench-combo { flex-basis: calc(100% - 34px); }
    .ench-cost { flex-direction: row; align-items: baseline; margin-left: 34px; }
}
