#forge-costs {
  --fc-panel: #191b1e;
  --fc-border: #34373c;
  --fc-muted: #b4b1ac;
  --fc-gold: #ffad53;
  color: #f3efe9;
  color-scheme: dark;
}
.fc-layout { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr); gap: 1.15rem; align-items: start; }
.fc-card { min-width: 0; padding: clamp(1rem, 2.4vw, 1.65rem); background: var(--fc-panel); border: 1px solid var(--fc-border); border-radius: 12px; }
.fc-title { display: flex; align-items: center; gap: .55rem; margin-bottom: 1.2rem; }
.fc-title svg { color: var(--fc-gold); flex: 0 0 auto; }
.fc-title h2 { font-size: 1.22rem; line-height: 1.2; margin: 0; }
.fc-card h3 { margin: .85rem 0 .6rem; font-size: 1rem; line-height: 1.4; }
.fc-mode { display: flex; padding: .25rem; gap: .25rem; border-radius: 8px; background: #101113; border: 1px solid var(--fc-border); margin: 0 0 .95rem; }
.fc-mode button { background: transparent; border: 1px solid transparent; color: var(--fc-muted); cursor: pointer; border-radius: 5px; font: inherit; font-size: .94rem; font-weight: 600; min-width: 0; min-height: 40px; flex: 1; display: inline-flex; gap: .5rem; justify-content: center; align-items: center; }
.fc-mode button[aria-pressed=true] { background: #302820; color: #ffc98d; border-color: #6d4e2e; }
.fc-mode button:disabled { opacity: .46; cursor: default; }
.fc-row, .fc-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.fc-field { min-width: 0; display: grid; align-content: start; gap: .4rem; margin: .45rem 0; }
.fc-field > span { font-size: .89rem; line-height: 1.35; color: #dfdcd7; }
#forge-costs :is(select,input:not([type=checkbox])) { width: 100%; min-width: 0; height: 43px; padding: .46rem .7rem; font: inherit; font-size: .94rem; color: #f0eee9; background-color: #131518; border: 1px solid #404247; border-radius: 6px; box-sizing: border-box; }
#forge-costs select { appearance: none; padding-right: 1.95rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23bbb4aa' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; }
#forge-costs :is(button,input,select,summary):focus-visible { outline: 2px solid var(--fc-gold); outline-offset: 3px; }
#forge-costs input:disabled { color: var(--fc-muted); opacity: .75; }
#forge-costs input[aria-invalid=true] { border-color: #fa997b; }
.fc-help { color: var(--fc-muted); font-size: .88rem; line-height: 1.5; margin: .5rem 0 .8rem; }
.fc-pair { display: grid; gap: .25rem; }
.fc-item-selector { display: flex; align-items: flex-end; gap: .55rem; min-width: 0; }
.fc-item-selector .fc-field { flex: 1; }
.fc-item-selector > img { border: 1px solid var(--fc-border); background: #121316; width: 42px; height: 42px; padding: 3px; box-sizing: border-box; border-radius: 6px; image-rendering: pixelated; object-fit: contain; margin: 0 0 .45rem; }
.fc-divider { height: 1px; background: var(--fc-border); margin: 1rem 0; }
.fc-check { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; font-size: .96rem; line-height: 1.35; margin: .65rem 0; }
.fc-check input { accent-color: var(--fc-gold); width: 17px; height: 17px; margin: .12rem 0 0; flex: 0 0 17px; }
.fc-check small { display: block; color: var(--fc-muted); font-size: .83rem; margin-top: .2rem; }
.fc-op { font-weight: 600; line-height: 1.5; margin: 0 0 .85rem; }
.fc-value-label { font-size: .89rem; color: var(--fc-muted); margin: 0; }
.fc-total { display: block; font-size: clamp(2.2rem,4vw,3rem); color: var(--fc-gold); line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.035em; margin: .25rem 0; }
.fc-metrics { margin: .85rem 0; }
.fc-metrics > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .7rem; border-bottom: 1px solid var(--fc-border); padding: .5rem 0; font-size: .89rem; }
.fc-metrics dt { color: var(--fc-muted); }
.fc-metrics dd { margin: 0 0 0 auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-detail { grid-column: 1/-1; padding-block: .9rem; }
.fc-detail summary { cursor: pointer; font-weight: 600; font-size: .97rem; }
.fc-detail summary::marker { color: var(--fc-gold); }
.fc-detail p { color: var(--fc-muted); line-height: 1.55; margin: .9rem 0 .45rem; font-size: .9rem; }
.fc-table-wrap { overflow-x: auto; margin: .7rem 0; }
.fc-table-wrap table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; }
.fc-table-wrap :is(td,th) { border-bottom: 1px solid var(--fc-border); padding: .55rem .5rem; white-space: nowrap; text-align: right; }
.fc-table-wrap :is(td,th):first-child { text-align: left; padding-left: 0; }
.fc-table-wrap thead th { color: var(--fc-muted); font-size: .83rem; }
.fc-sources { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.fc-sources a { color: #ffc184; text-decoration: underline; text-underline-offset: .15em; }
@media (max-width: 830px) { .fc-layout { grid-template-columns: 1fr; } }
@media (max-width: 440px) { .fc-layout { gap: .75rem; } .fc-price-grid { grid-template-columns: 1fr; gap: 0; } }
