.field-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.field-tool-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid #a2ab7640;
  background: #1d251c;
  transition: border-color .2s, transform .2s;
}

.field-tool-card:hover, .field-tool-card:focus-visible {
  border-color: #e5b27e;
  transform: translateY(-3px);
}

.field-tool-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.field-tool-card div { padding: 18px; }
.field-tool-card h3 { font-size: 23px; line-height: 1.2; margin: 0 0 10px; }
.field-tool-card p { font-size: 15px; line-height: 1.6; color: #b5c3aa; margin: 0; }

.field-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid #899a6b55;
  background: #171e19;
  margin-block: 30px;
}

.field-tool form, .field-output { padding: clamp(16px, 3vw, 36px); }
.field-tool form { display: grid; gap: 15px; align-content: start; }
.field-tool p { margin: 0; color: #c1ccb3; font-size: 16px; line-height: 1.65; }
.field-tool label { display: grid; gap: 6px; color: #e2ead6; font-size: 15px; }
.field-control { display:grid; gap:6px; min-width:0; }
.field-tool label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; }
.field-tool input[type="checkbox"] { order: -1; width: 18px; height: 18px; accent-color: #e5b27e; }

.field-tool :is(input:not([type="checkbox"]), textarea, select) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #81936b80;
  background: #101710;
  color: #e4eddc;
  font: inherit;
  font-size: 16px;
  color-scheme: dark;
}

.field-tool textarea { resize: vertical; }
.field-tool input:disabled { opacity: .5; }
.field-tool [aria-invalid="true"] { border-color: #ee9b80; }
.field-tool :focus-visible, .field-tool-card:focus-visible { outline: 2px solid #ffc998; outline-offset: 3px; }
.field-tool button { width: fit-content; min-height: 44px; }
.field-tool .blueprint-help { font-size: .88rem; }
.blueprint-method { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.blueprint-method legend { margin-bottom: .4rem; }
.field-tool .blueprint-method label {
  display: inline-flex; position: relative; align-items: center; min-height: 44px; padding: .4rem .65rem;
  border: 1px solid #536c56; border-radius: 8px; background: #263629; cursor: pointer;
}
.blueprint-method label:has(:checked) { border-color: #b2d38c; background: #3d5636; }
.blueprint-method label:has(:focus-visible) { outline: 2px solid #ffc998; outline-offset: 3px; }
.field-tool .blueprint-method input { position: absolute; inset: 0; width: 100%; margin: 0; opacity: 0; cursor: pointer; }
.field-tool [data-blueprint-count] .blueprint-help, .field-tool [data-blueprint-manual] .blueprint-help { margin-top: .36rem; }
.blueprint-research, .blueprint-summary {
  border: 1px solid #566c56; border-radius: 9px; padding: .75rem; min-width: 0; margin: 0; background: #1c2920;
}
.blueprint-research { display: grid; gap: .65rem; }
.blueprint-research legend { padding-inline: .32rem; font-weight: 700; }
.blueprint-summary + .blueprint-summary { margin-top: .8rem; }
.blueprint-summary h2 { margin-top: 0; }
.blueprint-picker, .blueprint-matches, .blueprint-known-list { display: grid; gap: .4rem; }
.blueprint-picker [hidden], .field-tool [data-blueprint-tiers][hidden] { display: none; }
.blueprint-matches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blueprint-matches > p { grid-column: 1 / -1; }
.field-tool .blueprint-option, .blueprint-selection, .blueprint-known-item {
  display: flex; align-items: center; min-width: 0; gap: .5rem; padding: .45rem;
  border: 1px solid #81936b60; border-radius: 8px; background: #243227; color: #ebf0e6;
}
.field-tool .blueprint-option { width: 100%; text-align: start; font: inherit; cursor: pointer; }
.blueprint-option:hover, .blueprint-known-item:hover { border-color: #e7ba85; }
.blueprint-option small { display: block; color: #bfcdac; font-size: .75rem; }
.blueprint-option strong, .blueprint-selection strong, .blueprint-known-item span, .blueprint-route a { overflow-wrap: anywhere; }
.blueprint-picker .item-icon, .blueprint-route .item-icon { flex: 0 0 36px; object-fit: contain; }
.blueprint-selection { flex-wrap: wrap; border-color: #aac87b; }
.blueprint-selection > div { flex: 1; }
.blueprint-selection a { padding: .2rem; font-size: .82rem; }
.blueprint-known { border: 1px solid #81936b60; border-radius: 8px; padding: .6rem; }
.blueprint-known summary { cursor: pointer; color: #e2ead6; }
.blueprint-known > p, .blueprint-known .field-control { margin-block: .5rem; }
.blueprint-known-list { max-height: 18rem; overflow-y: auto; padding: 3px; }
.blueprint-route-heading { margin: .8rem 0 .35rem; font-size: 1rem; }
.blueprint-route { padding-inline-start: 1.6em; margin: 0; }
.blueprint-route li { padding: .25rem; border-bottom: 1px solid #81936b46; color: #d6e1cc; }
.blueprint-route :is(.item-icon, a, .blueprint-badge) { vertical-align: middle; margin-inline-end: .35rem; }
.blueprint-route li:last-child { border-color: #aac87b; }
.blueprint-badge { display: inline-block; padding: .1rem .45rem; border-radius: .4rem; background: #aed29122; color: #dceec7; font-size: .75rem; }
@media (max-width: 500px) { .blueprint-matches { grid-template-columns: 1fr; } }
.field-tool .field-run { background: #e7ba85; border-color: #e7ba85; color: #172018; font-weight: 700; }
.field-tool .field-run:hover { background: #ffd5a4; }

.field-output {
  border-inline-start: 1px solid #8a9c7055;
  background: radial-gradient(ellipse at 100% 100%, #64784a48, transparent 75%), #20291d;
  display: grid;
  gap: 12px;
  align-content: start;
}

.field-output h2 { font-size: clamp(20px, 2.5vw, 30px); margin: 0; line-height: 1.22; }
.field-output h2:not(:first-child) { margin-top: 12px; }
.field-output .field-emphasis { color: #ffd1a6; font-weight: 700; }

.field-genes {
  list-style: decimal inside;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field-genes li {
  border: 1px solid #a8c38566;
  background: #2e4427;
  color: #dcecc8;
  text-align: center;
  font-size: clamp(12px, 1.7vw, 18px);
  font-weight: 700;
  overflow-wrap: anywhere;
  padding: 8px 1px;
}

.field-genes li::marker { font-size: 10px; color: #cbd4bc; }
.field-genes .red { color: #ffe0d3; background: #523027; border-color: #e0a08680; }
.field-genes .tie { color: #ffe5af; background: #51401f; border-color: #e7c17680; }

.field-upkeep {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
  table-layout: fixed;
  line-height: 1.4;
}

.field-upkeep :is(th, td) {
  padding: 7px 4px;
  border-bottom: 1px solid #8a9c7055;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  text-align: start;
}

.field-recipes th:first-child { width: 66%; }
.field-recipes a { text-decoration: underline; text-underline-offset: 3px; }
.field-recipes small { display: block; font-size: 13px; font-weight: 400; color: #c1ccb3; margin-top: 4px; }
.field-stock {
  margin: 0;
  padding: 12px;
  border: 1px solid #81936b80;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

@media (max-width: 820px) {
  .field-tool { grid-template-columns: 1fr; }
  .field-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-output { border-inline-start: 0; border-top: 1px solid #8a9c7055; }
}

@media (prefers-reduced-motion: reduce) {
  .field-tool-card { transition: none; }
  .field-tool-card:hover, .field-tool-card:focus-visible { transform: none; }
}

.tool-hero {
  --aura: #547145;
  --ink: #eaf1dc;
  min-height: clamp(190px, 22vw, 264px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 1fr);
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 3vw, 38px);
  border: 1px solid #94a87955;
  border-radius: 14px;
  background: radial-gradient(ellipse at 85% 80%, var(--aura), transparent 60%), #151c18;
}

.tool-hero--index {
  background: linear-gradient(90deg, #111811f8 0%, #111811b5 52%, #171b0b37 100%),
    url('/assets/item-workshop.webp') center / cover;
  margin-bottom: 22px;
}
.tool-hero--genetics { --aura: #496a3a; }
.tool-hero--blueprint-planner { --aura: #326057; }
.tool-hero--starter-crafting { --aura: #6d5537; }
.tool-hero--upkeep { --aura: #586944; }
.tool-hero--battery-runtime { --aura: #416674; }
.tool-hero h1 {
  color: var(--ink);
  font-size: clamp(30px, 4.55vw, 60px);
  line-height: 1.06;
  margin: 0 0 13px;
  overflow-wrap: anywhere;
}
.tool-hero p { color: #d0d8c6; font-size: clamp(15px, 1.8vw, 19px); line-height: 1.6; max-width: 50ch; margin: 0; }
.tool-hero-items {
  display: flex; align-items: center; justify-content: center;
  isolation: isolate; min-width: 0;
}
.tool-hero-items img { width: clamp(62px, 10vw, 160px); height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 9px 12px #080d0bcc); }
.tool-hero-items img + img { margin-left: -9%; }
.tool-hero-items img:first-child { transform: rotate(-9deg) translateY(6%); }
.tool-hero-items img:last-child { transform: rotate(8deg) translateY(-4%); }
.tool-card-art {
  display:block; width:100%; aspect-ratio:16 / 9; min-height:140px;
  background:#202a21; overflow:hidden;
}
.tool-card-art img { max-width:none; width:100%; height:100%; aspect-ratio:auto; object-fit:cover; }
.tool-card-art--tea, .tool-card-art--power {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #77583b, #2b2f24 76%);
}
.tool-card-art--power { background: radial-gradient(ellipse at center, #3e6671, #25352d 76%); }
.tool-card-art--tea img, .tool-card-art--power img {
  width: 32%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 7px 8px #150e0b99);
}
.tool-card-art--tea img + img, .tool-card-art--power img + img { margin-left: -7%; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .tool-card-art img { transition:transform .38s cubic-bezier(.2,.8,.2,1),filter .38s; }
  .field-tool-card:is(:hover,:focus-visible) .tool-card-art img { transform:scale(1.055); filter:saturate(1.13); }
}
.field-tool-card { border-radius: 12px; }
.tool-resources { margin-block: clamp(25px, 5vw, 65px); }
.tool-lookup > label { display: grid; gap: 6px; color: #e2ebd7; font-weight: 700; max-width: 520px; margin-bottom: 14px; }
.tool-lookup [hidden] { display: none !important; }
.tool-lookup input { width: 100%; min-height: 46px; background: #101912; border: 1px solid #778c69; border-radius: 8px; padding: 8px 12px; color: #e8f1e0; font: inherit; }
.tool-resources h2 { font-size: clamp(23px, 4vw, 40px); }
.tool-resources nav { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-resources a, .tool-toolbar a {
  display: inline-flex; gap: 12px; align-items: center;
  border: 1px solid #73846575; border-radius: 8px; color: #e9eddf;
  padding: 10px 14px;
}
.tool-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.tool-toolbar a { font-size: 15px; }
.tool-toolbar a:hover, .tool-resources a:hover { background: #2b3a29; }
.screen-trigger, .screen-dialog button, .donor-entry button, .tool-presets button, .quantity-control button, .donor-editor li button {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #788e6a85;
  border-radius: 8px;
  background: #243226;
  color: #eaf0e2;
  font: inherit;
  cursor: pointer;
}
.screen-trigger { border-color: #b7d48c; color: #d9f3b7; font-weight: 700; }
.field-tool, .battery-calculator { border-radius: 13px; margin-top: 15px; }
.field-tool { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); align-items: start; }
.field-tool form { min-width: 0; }
.field-tool form > p:first-child { color: #c3cebd; font-size: 15px; }
.field-tool :is(input:not([type="checkbox"]), textarea, select) { border-radius: 7px; }
.field-tool [hidden], .tool-toolbar [hidden], .screen-dialog [hidden] { display: none !important; }
.field-output { border-radius: 0 13px 13px 0; scroll-margin-top: 105px; }
.battery-result { border-radius: 0 13px 13px 0; scroll-margin-top: 105px; }
.field-output h3 { font-size: 19px; margin: 0; }
.field-output table :is(th, td) { padding: 11px 4px; }
.field-output table img { vertical-align: middle; object-fit: contain; margin-inline-end: 6px; }
.field-tool .field-run { min-width: 155px; border-radius: 8px; }
.tool-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.tool-presets button { text-align: start; font-size: 14px; }
.tool-presets button strong { display: block; font-variant-numeric: tabular-nums; }
.tool-presets button:hover, .tool-presets button[aria-pressed="true"], .quantity-control button:hover,
.screen-trigger:hover, .screen-dialog button:enabled:hover { background: #334733; border-color: #c0d992; }
.tool-presets button[aria-pressed="true"] { color: #e2ffbf; }
.donor-editor { display: grid; gap: 8px; }
.donor-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: start; }
.field-tool textarea#donor-input, .field-tool :is(#parent,#desired) { font: 700 18px/1.25 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.donor-editor > p { font-size: 13px; }
.donor-editor ol { display: flex; flex-wrap: wrap; padding: 0; list-style: none; gap: 6px; margin: 0; }
.donor-editor li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 5px 4px 9px; border: 1px solid #65805680; border-radius: 8px; background: #1e2c20; }
.donor-editor li small { color: #a7b59d; }
.donor-editor li button { min-height: 36px; width: 38px; padding: 0; }
.field-tool .donor-editor li button[data-use-center] { width: auto; padding: 0 7px; font-size: 12px; }
.planter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); list-style: none; padding: 0; margin: 0; gap: 5px; }
.planter-grid li { display: grid; gap: 4px; align-content: center; min-height: 52px; padding: 5px; background: #131d16; border: 1px solid #6c825555; border-radius: 7px; text-align: center; overflow-wrap: anywhere; }
.planter-grid .planter-center { background: #574627; color: #ffe5b2; border-color: #c49a52; }
.planter-grid .planter-donor { background: #345032; color: #e6f3d4; border-color: #92b57b; }
.planter-grid .planter-empty { color: #a4b39b; }
.planter-grid small { font-size: 11px; line-height: 1.15; }
.planter-grid strong { font: 700 clamp(11px, 1.6vw, 14px)/1.15 ui-monospace, monospace; }
.planter-result { display: grid; gap: 9px; }
.planter-more, .tool-stock, .tool-timer { border: 1px solid #81936b65; border-radius: 8px; padding: 12px; background: #1b261c; }
.planter-more summary, .tool-stock summary, .tool-timer summary { cursor: pointer; font-weight: 700; }
.planter-more .tool-presets, .tool-stock .field-stock { margin-top: 10px; }
.tool-timer { max-width: 610px; color: #e1edda; }
.tool-timer p { margin: 8px 0; color: #becab6; }
.tool-timer label { display: grid; gap: 4px; margin-bottom: 8px; max-width: 320px; }
.tool-timer input { min-height: 43px; background: #111b14; color: #e4ead9; border: 1px solid #788e6a85; padding: 8px 10px; border-radius: 6px; }
.tool-timer output { display: inline-block; margin-top: 8px; color: #d5ee9b; font-size: 24px; font-variant-numeric: tabular-nums; }
.tool-timer :is(output,p):empty { display: none; }
.tier-options, .upkeep-cards, .recipe-cards, [data-research-fields] {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; min-width: 0;
}
.tier-options { border: none; padding: 0; margin: 0; }
.tier-options legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.field-tool .tier-option {
  display: grid; grid-template-columns: auto 48px minmax(0,1fr); gap: 7px; align-items: center;
  border: 1px solid #657d5999; border-radius: 8px; padding: 6px; cursor: pointer; line-height: 1.2;
}
.field-tool .tier-option:has(:checked) { background: #35472d; border-color: #b9d386; }
.field-tool .tier-option input[type="radio"] { width: 16px; height: 16px; min-height: 0; accent-color: #b8d582; padding: 0; }
.tier-option img { width: 48px; height: 48px; object-fit: contain; }
.upkeep-card, .recipe-card { min-width: 0; border: 1px solid #7d92685b; padding: 10px; border-radius: 9px; background: #202d21; }
.upkeep-card h2 { display: flex; align-items: center; gap: 6px; font-size: 17px; line-height: 1.2; margin: 0 0 9px; }
.upkeep-card img { object-fit: contain; }
.upkeep-card label + label { margin-top: 8px; }
.upkeep-card label { font-size: 13px; }
.recipe-card { display: grid; align-content: space-between; row-gap: 8px; }
.recipe-card a { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 7px; align-items: center; line-height: 1.2; }
.recipe-card a:hover strong { text-decoration: underline; }
.recipe-card img { object-fit: contain; }
.recipe-cost { display: flex; gap: 5px 10px; color: #c4d3bb; flex-wrap: wrap; font-size: 12px; }
.recipe-cost > span { display: inline-flex; align-items: center; gap: 3px; }
.quantity-control { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 4px; }
.field-tool .quantity-control button { width: 40px; padding: 0; min-height: 44px; font-size: 20px; line-height: 1; }
.quantity-control input { text-align: center; appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button { appearance: none; }
.tool-stock .field-stock { border: 0; padding: 0; }
.tool-base {
  display:grid; gap:12px; padding:clamp(12px, 2vw, 20px); scroll-margin-top:100px;
  border:1px solid #84986ca0; border-radius:10px; background:#243324;
}
.tool-base h2 { margin:0; font-size:clamp(21px, 3vw, 28px); }
.field-tool .tool-base p { font-size:14px; line-height:1.5; }
.tool-base summary { font-weight:700; cursor:pointer; }
.tool-base ul { display:grid; gap:4px; padding-inline-start:21px; margin-block:8px; }
.tool-base details a { color:#dfebbb; text-decoration:underline; text-underline-offset:3px; }
.field-output .field-shell-subtotal { display:grid; gap:3px; padding:10px 13px; border-inline-start:3px solid #bfd380; background:#131d168c; }
.field-shell-subtotal strong { color:#d9ebaa; }
.tool-hero--smelting {
  background-image:linear-gradient(90deg,#142018f5 12%,#142018e0 64%,#14201878),url('/assets/guides/gameplay-industrial-smelting.webp');
  background-position:center; background-size:cover;
}
.tool-card-art--smelting { display:flex; align-items:center; justify-content:center; gap:3px; }
.tool-card-art.tool-card-art--smelting img { width:28%; height:auto; aspect-ratio:1; object-fit:contain; }
.smelting-ores { grid-template-columns:1fr; }
.smelting-product, .smelting-card-title { display:flex; align-items:center; gap:9px; }
.smelting-product img, .smelting-card-title img { object-fit:contain; flex:none; }
.smelting-results { display:grid; gap:10px; }
.smelting-card { padding:12px 14px; border:1px solid #8096718c; border-radius:9px; background:#19241b; }
.smelting-card dl { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 9px; margin:8px 0; font-size:14px; }
.smelting-card dd { margin:0; color:#d8e9af; font-weight:700; text-align:end; font-variant-numeric:tabular-nums; }
.smelting-card dt { color:#c8d4c1; }
.smelting-card meter { width:100%; height:8px; accent-color:#b6d686; }
.screen-dialog {
  width: min(760px, calc(100% - 24px)); max-height: 91vh; max-height: 91dvh;
  margin: auto; padding: 0; border: 1px solid #889a73; border-radius: 14px;
  color: #ecf1e4; background: #19231b; overflow: hidden;
}
.screen-dialog::backdrop { background: #080d09cf; }
.screen-frame { display:flex; flex-direction:column; max-height:90vh; max-height:90dvh; min-height:0; }
.screen-heading,.screen-content,.screen-footer { padding:clamp(12px,2.5vw,22px); }
.screen-heading { display:flex; flex:0 0 auto; justify-content:space-between; align-items:flex-start; gap:8px; border-bottom:1px solid #61755575; }
.screen-content { display:grid; flex:1 1 auto; gap:10px; min-height:0; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.screen-footer { display:grid; flex:0 0 auto; gap:8px; background:#202e22; border-top:1px solid #617555; }
.screen-footer [data-recognize] { justify-self:start; color:#e3f7c7; border-color:#b4d486; }
.screen-recognition-actions { display:flex; flex-wrap:wrap; gap:8px; }
.screen-recognition-actions:not(:has(button:not([hidden]))) { display:none; }
.screen-heading h2 { font-size: clamp(22px, 3vw, 39px); margin: 0; line-height: 1.12; }
.screen-heading button { min-width: 44px; font-size: 22px; line-height: 1; }
.screen-frame p { color: #c5d2bc; margin: 0; line-height: 1.55; }
.screen-frame .screen-privacy { font-size: 14px; color: #b0c6a4; }
.screen-dialog :is(select,input:not([type="file"],[type="range"])) { min-height: 44px; width: 100%; min-width: 0; color: #eef4e5; background: #0f1711; padding: 8px 11px; border: 1px solid #778c6a; border-radius: 7px; font: inherit; font-size:16px; }
.screen-frame :focus-visible { outline: 2px solid #f3bd86; outline-offset: 2px; }
.screen-target, .screen-result label { display: grid; gap: 4px; }
.screen-controls, .screen-result { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.screen-file { position: relative; padding: 9px 11px; min-height: 44px; border: 1px solid #788e6a; border-radius: 8px; cursor: pointer; }
.screen-file:focus-within { outline: 2px solid #f3bd86; outline-offset: 2px; }
.screen-file input { opacity: 0; position: absolute; inset: 0; width: 100%; cursor: pointer; }
.screen-result label { flex: 1 1 150px; }
.screen-dialog button:disabled { opacity: .55; cursor: default; }
.screen-dialog [data-crop-area] { display: grid; gap: 8px; }
.screen-dialog [data-preview] { display:block; width:auto; max-width:100%; height:auto; max-height:340px; max-height:min(42dvh,340px); min-width:0; margin:auto; object-fit:contain; border:1px solid #a1ba80; cursor:crosshair; touch-action:none; }
.screen-dialog [data-preview][data-expanded] { width:100%; max-height:none; }
.screen-preview-controls { display:flex; flex-wrap:wrap; gap:6px; }
.screen-preview-controls button[aria-pressed="true"] { background:#3c5132; border-color:#b2ca83; }
.screen-ranges { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding-top: 7px; }
.screen-ranges label { display: grid; font-size: 13px; }
.screen-ranges input { width: 100%; accent-color: #b8d582; }
.screen-status { font-size: 15px; }

@media (max-height: 500px) {
  .screen-dialog { overflow:auto; }
  .screen-frame { max-height:none; }
  .screen-content { overflow:visible; }
}
@media (min-width: 981px) {
  .field-output { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; border-inline-start: 1px solid #6e86668a; }
}
@media (max-width: 820px) {
  .field-tool { grid-template-columns: 1fr; }
  .field-output, .battery-result { border-radius: 0 0 13px 13px; }
}
@media (max-width: 530px) {
  .field-tool-grid { grid-template-columns: 1fr; }
  .tool-hero { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .tool-hero-items { justify-content: flex-end; }
  .tool-hero-items img { width: 68px; }
  .tool-hero-items img + img { margin-left: -7px; }
  .recipe-card a { grid-template-columns: 40px minmax(0,1fr); font-size: 13px; }
  .recipe-card a img { width: 40px; height: 40px; }
  .quantity-control { grid-template-columns: 33px minmax(0,1fr) 33px; }
  .field-tool .quantity-control button { width: 33px; }
  .field-tool .quantity-control input { padding-inline: 3px; }
  .field-tool .tier-option { grid-template-columns: auto 32px minmax(0,1fr); font-size: 13px; }
  .tier-option img { width: 32px; height: 32px; }
}
.tool-card-art--cooking { background: radial-gradient(ellipse, #704829, #30241b 72%); }
