.craft-calculator { max-width: 1500px; margin: 0 auto; padding: 20px; color: var(--text-primary); }
.craft-calculator [hidden] { display: none !important; }
.craft-calculator *, .craft-calculator *::before, .craft-calculator *::after { box-sizing: border-box; }
.craft-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 18px; }
.craft-heading h1 { margin: 0 0 8px; font-size: 1.7rem; }
.craft-heading p, .craft-muted, .craft-snapshot, .craft-id { color: var(--text-secondary); }
.craft-heading p { margin: 0; line-height: 1.5; }
.craft-snapshot { max-width: 360px; font-size: .8rem; overflow-wrap: anywhere; line-height: 1.6; }
.craft-layout { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.4fr); gap: 20px; align-items: start; margin-top: 18px; }
.craft-panel { min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.craft-panel h2 { margin: 0 0 18px; font-size: 1.2rem; }
.craft-panel h3 { margin: 22px 0 10px; font-size: 1.05rem; }
.craft-calculator label { display: block; font-size: .9rem; margin-bottom: 7px; }
.craft-calculator input, .craft-calculator select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--background); color: var(--text-primary); font: inherit; }
.craft-calculator :is(input, select, button):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.craft-calculator :is(input, select, button):disabled { opacity: .6; cursor: not-allowed; }
.craft-calculator input[aria-invalid="true"] { border-color: var(--error); }
.craft-muted { font-size: .85rem; line-height: 1.55; margin: 10px 0; }
.craft-notice { padding: 13px 15px; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 7px; background: var(--surface); line-height: 1.6; font-size: .9rem; margin: 12px 0; }
.craft-warning, .craft-input-error { color: var(--warning, #f59e0b); }
.craft-input-error { font-size: .85rem; }
.craft-warnings { line-height: 1.6; font-size: .9rem; padding-left: 23px; color: var(--warning, #f59e0b); }
.craft-category-filter { margin-bottom: 14px; }
.craft-results { display: flex; flex-direction: column; gap: 8px; max-height: 670px; overflow-y: auto; padding: 4px; }
.craft-result { display: flex; align-items: center; gap: 12px; width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--background); color: var(--text-primary); text-align: left; cursor: pointer; font: inherit; }
.craft-result:hover, .craft-result[aria-pressed="true"] { border-color: var(--primary); }
.craft-result[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--primary); }
.craft-result-label { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.craft-result-label small { color: var(--text-secondary); font-size: .78rem; }
.craft-id { margin: 0; font-size: .75rem; overflow-wrap: anywhere; }
.craft-button { min-height: 42px; background: var(--surface); border: 1px solid var(--primary); border-radius: 7px; color: var(--text-primary); padding: 9px 16px; cursor: pointer; font: inherit; }
.craft-button:hover { background: var(--background); }
.craft-more { width: 100%; margin-top: 12px; }
.craft-icon { width: 64px; height: 64px; position: relative; flex-shrink: 0; display: inline-block; vertical-align: middle; border: 1px solid var(--border); border-radius: 8px; background: var(--background); overflow: hidden; }
.craft-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }
.craft-icon-tint { position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none; mask-size: contain; mask-position: center; mask-repeat: no-repeat; -webkit-mask-size: contain; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; }
.craft-calculator .slot-quality-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 12px; z-index: 2; }
.craft-calculator .slot-quality-bar.q1 { background: #9c8867; }
.craft-calculator .slot-quality-bar.q2 { background: #bc7325; }
.craft-calculator .slot-quality-bar.q3 { background: #a2a41b; }
.craft-calculator .slot-quality-bar.q4 { background: #42c234; }
.craft-calculator .slot-quality-bar.q5 { background: #315dce; }
.craft-calculator .slot-quality-bar.q6 { background: #a42acc; }
.craft-calculator .slot-quality-badge { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; line-height: 12px; font-size: 11px; z-index: 3; text-shadow: 0 1px 2px #000; }
.craft-item-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.craft-item-heading h3 { margin: 0 0 6px; overflow-wrap: anywhere; }
.craft-item-heading > div:last-child { min-width: 0; }
.craft-description { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.6; font-size: .95rem; }
.craft-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.craft-controls > div { min-width: 0; }
.craft-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px 16px; padding: 15px; border-radius: 8px; background: var(--background); line-height: 1.5; }
.craft-summary dt { color: var(--text-secondary); }
.craft-summary dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.craft-components { list-style: none; padding: 0; margin: 12px 0; }
.craft-component { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding: 10px 0; }
.craft-component .craft-icon { width: 48px; height: 48px; }
.craft-component-count { margin-left: auto; flex-shrink: 0; }
.craft-requirements { line-height: 1.65; padding-left: 22px; overflow-wrap: anywhere; }
.craft-requirements li { margin-bottom: 8px; }
@media (max-width: 950px) { .craft-layout { grid-template-columns: 1fr; } .craft-results { max-height: 390px; } }
@media (max-width: 560px) { .craft-calculator { padding: 12px 4px; } .craft-heading { flex-direction: column; gap: 8px; } .craft-heading h1 { font-size: 1.4rem; } .craft-panel { padding: 14px; } .craft-layout { gap: 12px; } .craft-controls { grid-template-columns: 1fr; } .craft-icon { width: 52px; height: 52px; } .craft-summary { padding: 11px; gap: 8px; } }
