.tools-index-hero {
  min-height: 120px;
  border: 0;
  border-bottom: 1px solid #494036;
  border-radius: 0;
  background: radial-gradient(ellipse at 92% 115%, #41302588, transparent 56%);
}
.tools-index-hero .hero-copy { padding: 2px 0 20px; }
.tools-index-hero p { max-width: 650px; }
.tool-hero { background: #171618; isolation: isolate; min-height: 189px; }
.tool-hero::before, .tool-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.tool-hero::before { left: 32%; background: var(--player-art) center / cover no-repeat; }
.tool-hero::after { background: linear-gradient(90deg, #171618 17%, #171618ee 34%, #171618ab 51%, #17161812 85%); }
.tool-hero .hero-copy { max-width: 67%; }
.lab-quick, .feature-grid, .gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.lab-quick { margin: 14px 0 0; gap: 8px; }
.lab-quick a { display: grid; grid-template-columns: 61px 1fr 15px; gap: 10px; align-items: center; min-width: 0; padding-right: 9px; overflow: hidden; background: #221e1c; border: 1px solid #433a31; border-radius: 6px; font-size: .85rem; font-weight: 650; }
.lab-quick img { width: 61px; height: 46px; object-fit: cover; }
.lab-quick .icon { width: 13px; color: var(--gold); }
.gallery-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; justify-content: space-between; margin: 22px 0 12px; }
.gallery-heading h2 { font: 600 clamp(1.3rem,2.1vw,1.7rem)/1.2 var(--serif); letter-spacing: -.025em; }
.gallery-card { display: flex; position: relative; flex-direction: column; min-width: 0; background: #1c1c20; border: 1px solid #3c3734; border-radius: 9px; overflow: hidden; }
.gallery-card:hover, .gallery-card:focus-visible { border-color: #b3875d; background: #262222; }
.gallery-picture { height: clamp(95px,10.5vw,154px); overflow: hidden; background: #272426; }
.gallery-picture img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .24s; }
.gallery-card:hover img { transform: scale(1.035); }
.gallery-feature .gallery-picture { height: clamp(115px,13vw,200px); }
.gallery-copy { display: grid; gap: 5px; padding: 13px 15px 16px; }
.gallery-copy strong { font: 600 clamp(1.08rem,1.5vw,1.27rem)/1.2 var(--serif); color: #fff1df; }
.gallery-copy > span { color: #c3bdba; font-size: .84rem; line-height: 1.48; }
.gallery-feature .gallery-copy strong { font-size: clamp(1.24rem,1.8vw,1.58rem); }
.gallery-arrow { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; color: #fff6df; background: #171314bb; border: 1px solid #ffdfb34a; border-radius: 100%; width: 26px; height: 26px; }
.gallery-arrow .icon { width: 14px; }
.gallery-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.gallery-filters button { border: 1px solid transparent; border-radius: 15px; padding: 4px 11px; color: #b6b0ae; font-size: .8rem; }
.gallery-filters button[aria-pressed=true] { border-color: #6a4e37; background: #33291f; color: #f2c99b; }
.tool-library { margin-top: 31px; }
.research-link { display: inline-flex; gap: 5px; align-items: center; color: var(--gold); font-size: .85rem; }
.research-link .icon { width: 13px; }
.tool-research { margin: 3px 0 25px; padding: 14px clamp(14px,3vw,30px) 25px; color: #c9c4c0; font-size: .96rem; line-height: 1.65; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); max-width: 86ch; }
.tool-research h2 { font: 600 1.22rem/1.3 var(--serif); color: var(--ink); margin: 24px 0 3px; }
.tool-research p { margin: 8px 0; }
.tool-research a { color: #e9bb8f; text-decoration: underline; text-underline-offset: .15em; white-space: nowrap; }
.player-back { display: inline-flex; align-items: center; gap: 5px; padding: 7px 0; margin: 12px 0 7px; color: var(--gold); font-size: .88rem; }
.player-back .icon { transform: rotate(180deg); width: 14px; }
.player-workbench { width: 100%; max-width: 1080px; }
.player-workbench .tool-form, .player-workbench [data-forge-output] {
  min-width: 0;
  padding: clamp(15px, 2.2vw, 26px);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.player-workbench :is(.tool-form, [data-forge-output]) + :is(.tool-form, [data-forge-output]) { margin-top: 12px; }
.player-workbench .tool-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  align-items: end;
  gap: 13px;
}
.player-workbench label { display: grid; gap: 6px; min-width: 0; font-size: .86rem; }
.player-workbench :is(input:not([type=checkbox]), select, textarea) { width: 100%; }
.player-workbench input[type=checkbox] { accent-color: var(--gold); }
.player-workbench textarea { min-height: 90px; padding: 12px; resize: vertical; font: .9rem/1.5 var(--sans); color: var(--ink); background: var(--inset); border: 1px solid #424146; border-radius: 5px; }
.player-workbench li + li { margin-top: 4px; }
.player-workbench .tool-form > :not(:first-child):not(:empty), .player-workbench form[data-add] > button,
.player-workbench details[open] > :not(summary), .player-workbench [data-forge-output] > :not(:first-child),
.player-workbench [data-hunt-results] > :not(:first-child), .player-workbench [data-rows] > :not(:first-child) { margin-top: 13px; }
.player-workbench .tool-note { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.player-workbench .tool-note:empty { display: none; }
.player-workbench .tool-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 154px), 1fr)); gap: 8px; }
.player-workbench .tool-metric {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
  padding: 13px;
  min-width: 0;
  border: 1px solid #3b3733;
  border-radius: 6px;
  background: #211f1e;
}
.tool-metric > span { font-size: .81rem; color: #bfb9b1; }
.tool-metric > strong { color: #f0bf86; font: 600 1.22rem/1.25 var(--sans); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.player-workbench .scroll-table { max-width: 100%; }
.player-workbench :is(td,th) input:not([type=checkbox]) { min-width: 6rem; }
.player-workbench .scroll-table .item-art { display: inline-flex; vertical-align: middle; }
.player-workbench h3 { margin: 15px 0 7px; font-size: 1.02rem; }
.player-workbench summary { color: var(--gold); cursor: pointer; }
.player-workbench button { line-height: 1.4; }
.player-workbench .outline-btn, .player-workbench .solid { min-height: 36px; }
.player-chart {
  grid-column: 1 / -1;
  margin: 15px 0;
  padding: 15px clamp(13px, 2vw, 22px);
  border: 1px solid #494038;
  border-radius: 8px;
  background: linear-gradient(115deg,#28221f,#1c1c20 75%);
}
.player-chart figcaption { margin: 0 0 12px; color: #efd1ac; font: 600 1.06rem/1.3 var(--serif); }
.chart-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; align-items: baseline; margin-top: 9px; }
.chart-name { color: #d0c9c4; font-size: .83rem; overflow-wrap: anywhere; }
.chart-line strong { color: #f0dfc9; font-size: .84rem; font-variant-numeric: tabular-nums; }
.chart-track { grid-column: 1/-1; height: 7px; background: #373438; border-radius: 3px; position: relative; overflow: hidden; }
.chart-track i { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg,#9f6834,#f2bd77); border-radius: 2px; }
.chart-line:nth-of-type(even) .chart-track i { background: linear-gradient(90deg,#387b70,#8dd5ba); }
.chart-line .chart-track i.negative { background: linear-gradient(90deg,#eb9b89,#9a5147); }
.chart-track::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--zero); border-left: 1px solid #eee6d675; }
@media (min-width: 1550px) { .gallery-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 850px) {
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lab-quick a { grid-template-columns: 39px 1fr; gap: 6px; }
  .lab-quick img { width: 39px; }
  .lab-quick .icon { display: none; }
}
@media (max-width: 650px) {
  .tools-index-hero { min-height: auto; }
  .tools-index-hero p { max-width: 100%; }
  .tool-hero .hero-copy { max-width: 100%; }
  .tool-hero::after { background: linear-gradient(90deg,#181519f5 0%,#181519d1 50%,#18151944); }
  .feature-grid { grid-template-columns: 1fr; gap: 9px; }
  .gallery-feature { display: grid; grid-template-columns: 35% minmax(0,1fr); align-items: stretch; }
  .gallery-feature .gallery-picture { height: 100%; min-height: 107px; }
  .gallery-feature .gallery-arrow { display: none; }
  .gallery-copy { padding: 10px; }
  .gallery-grid { gap: 8px; }
  .gallery-picture { height: 100px; }
  .gallery-filters button { padding: 5px 8px; }
  .lab-quick { grid-template-columns: 1fr; gap: 4px; }
  .lab-quick a { grid-template-columns: 48px 1fr 15px; min-height: 34px; }
  .lab-quick img { width: 48px; height: 34px; }
  .lab-quick .icon { display: inline-block; }
}
@media (max-width: 350px) { .gallery-grid { grid-template-columns: 1fr; } }
@media (max-width: 500px) {
  .player-workbench .tool-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
