#hud #production-panel { background:radial-gradient(ellipse at 4% 0,#779e7433,transparent 56%),linear-gradient(140deg,#35483d,#24332c); }
#hud #production-panel[data-production-mode=crafting] { background:radial-gradient(ellipse at 4% 0,#b89b7133,transparent 56%),linear-gradient(140deg,#494b3b,#2d382d); }
#hud #production-panel .smithing-heading [data-production-icon]>.icon { width:48px;height:48px; }
#hud #production-panel [data-production-name] { font:22px Georgia,serif;color:#f2d29a; }
#hud #production-panel .production-filters { display:flex;align-items:end;gap:10px; }
#hud #production-panel .production-filters>label:first-child { flex:1; }
#hud #production-panel .production-filters input[type=search] { margin-top:4px;height:30px; }
#hud #production-panel .production-carried { display:flex;align-items:center;gap:4px;max-width:84px;line-height:1.3;padding-bottom:4px; }
#hud #production-panel .production-carried input { width:14px;height:14px;flex:none;accent-color:#d5b772; }
#hud #production-panel .production-category-heading { margin:0;color:#d2bb94;font-size:10px;letter-spacing:.06em;text-transform:uppercase; }
#hud #production-panel[data-production-mode=crafting] .production-categories { grid-template-columns:repeat(3,minmax(0,1fr)); }
#hud #production-panel .production-station { display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;padding:7px 8px;margin-bottom:8px;border:1px solid #9aa88566;border-radius:5px;background:#87967918; }
#hud #production-panel .production-station strong { color:#dcc89e;font:11px Georgia,serif; }
#hud #production-panel .production-station span { flex:1;min-width:100px;font-size:9px;color:#c3bea7; }
#hud #production-panel .production-station.missing { border-color:#be936455; }
#hud #production-panel .production-station button { padding:4px 7px;font-size:9px; }
#hud .production-furnace-links { display:flex;align-items:center;gap:5px;padding:7px 0; }
#hud .production-furnace-links>span { flex:1;font-size:9px;color:#c3bea7; }
#hud .production-furnace-links>button { font-size:9px;padding:5px 7px; }
#hud #production-panel .production-categories { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px; }
#hud #production-panel .production-categories button { min-width:0;padding:5px 6px;font-size:10px; }
#hud #production-panel .production-categories button:only-child { grid-column:1/-1; }
#hud #production-panel .production-categories button small { display:block;margin-top:3px;font-size:8px;color:#bdb69e; }
#hud #production-panel .production-recipes { display:block;max-height:222px;margin-top:2px; }
#hud #production-panel[data-production-mode=crafting] .production-recipes { max-height:none; }
#hud #production-panel .production-mobile-picker { display:none; }
#hud #production-panel .production-recipe-group+.production-recipe-group { margin-top:12px; }
#hud #production-panel .production-recipe-group h5 { display:flex;justify-content:space-between;gap:5px;align-items:center;margin:0 0 7px;padding:6px 4px;border-bottom:1px solid #c1a26b66;color:#e5c696;font:13px Georgia,serif; }
#hud #production-panel .production-recipe-group h5 small { font-size:9px;color:#bdb69e; }
#hud #production-panel .production-recipe-segment h6 { margin:8px 0 5px;color:#c4bb9e;font:9px Georgia,serif; }
#hud #production-panel .production-recipe-choices { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px; }
#hud #production-panel .production-crossbow-pairs { display:flex;flex-direction:column;gap:4px; }
#hud #production-panel .production-crossbow-pair { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px; }
#hud #production-panel .production-pair-empty { min-width:0; }
#hud #production-panel [data-production-footer-art] { flex:none; }
#hud #production-panel .production-future { padding:7px;border-left:2px solid #bb8b52;background:#b87b2e1c;color:#dfbb90; }
#hud #production-panel .production-recipes .icon { width:48px;height:48px;object-fit:contain; }
#hud #production-panel .production-recipes .locked .icon { opacity:1;filter:drop-shadow(0 2px 2px #10201855); }
#hud #production-panel .production-empty { padding:30px 10px; }
#hud #production-panel .smithing-hero p { max-height:70px;overflow:auto; }
#hud #production-panel .smithing-output { padding:3px;border:1px solid #c6b18388;border-radius:10px;background:radial-gradient(ellipse at 38% 28%,#f1e5c9,#d5c29b);box-shadow:inset 0 0 0 3px #fff5de26,0 3px 8px #12221944; }
#hud #production-panel .smithing-output>.icon { width:108px;height:108px;object-fit:contain;filter:drop-shadow(0 2px 2px #604b2b28); }
#hud #production-panel .smithing-supplies .icon { width:40px;height:40px;object-fit:contain; }
#hud #production-panel[data-production-mode=crafting] .production-recipes .icon { width:52px;height:52px;box-sizing:border-box;padding:2px;border:1px solid #c6b38c99;border-radius:6px;background:radial-gradient(ellipse at 35% 25%,#efe6d2,#d8c9ab);filter:drop-shadow(0 1px 1px #0c191733); }
#hud #production-panel[data-production-mode=crafting] .production-recipes button[aria-pressed=true] .icon { border-color:#eed39b;box-shadow:0 0 0 1px #d7b47555; }
#hud #production-panel[data-production-mode=crafting] .smithing-output { background:radial-gradient(ellipse at 35% 25%,#f1e8d5,#d8c8a9);border-color:#cbb58b;box-shadow:inset 0 0 0 3px #fff6df30,0 3px 8px #12221944; }
#hud #production-panel[data-production-mode=crafting].smithing-complete .smithing-output { animation:crafting-finish 1s ease-out; }
@keyframes crafting-finish { from { border-color:#f1d797;box-shadow:inset 0 0 0 3px #fff6df45,0 0 10px #d1ae6c66; } to { border-color:#cbb58b;box-shadow:inset 0 0 0 3px #fff6df30,0 3px 8px #12221944; } }
@media(prefers-reduced-motion:reduce) { #hud #production-panel[data-production-mode=crafting].smithing-complete .smithing-output { animation:none; } }
@media(min-width:601px) { #hud #production-panel[data-production-mode=crafting] .smithing-output>.icon { width:120px;height:120px; } }
#hud #production-panel .smithing-quantity-label { width:64px; }
/* Crafting keeps the shared workbook, with space for its larger recipe catalog. */
#hud .inventory-grid.production-open:has(#production-panel[data-production-mode=crafting]) { width:min(820px,calc(100vw - 24px)); }
#hud #production-panel[data-production-mode=crafting] .production-categories { grid-template-columns:repeat(6,minmax(0,1fr));gap:7px; }
#hud #production-panel[data-production-mode=crafting] .production-categories button { min-height:42px;padding:8px;font-size:12px; }
#hud #production-panel[data-production-mode=crafting] .production-categories button small { font-size:9px; }
#hud #production-panel[data-production-mode=crafting] .smithing-content { display:flex;flex-direction:column;overflow:hidden;padding:0; }
#hud #production-panel[data-production-mode=crafting] .production-workspace { display:grid;grid-template-columns:minmax(260px,.95fr) minmax(310px,1.15fr);gap:18px;flex:1;min-height:0; }
#hud #production-panel[data-production-mode=crafting] .production-recipes { min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 9px 12px 0;scrollbar-gutter:stable; }
#hud #production-panel[data-production-mode=crafting] .production-recipe-choices { grid-template-columns:1fr;gap:7px; }
#hud #production-panel[data-production-mode=crafting] .production-recipes button { width:100%;min-height:70px;padding:8px;gap:11px;border-radius:5px; }
#hud #production-panel[data-production-mode=crafting] .production-recipes button>span { min-width:0;font-size:13px;line-height:1.4;overflow-wrap:anywhere; }
#hud #production-panel[data-production-mode=crafting] .production-recipes button small { margin-top:5px;font-size:10px; }
#hud #production-panel[data-production-mode=crafting] .production-recipe-group h5 { margin:0 0 13px;padding:9px 3px;font-size:16px; }
#hud #production-panel[data-production-mode=crafting] .production-recipe-segment+.production-recipe-segment { margin-top:20px; }
#hud #production-panel[data-production-mode=crafting] .production-recipe-segment h6 { display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:0 0 9px;padding:5px 3px;color:#e5c696;font-size:13px; }
#hud #production-panel[data-production-mode=crafting] .production-recipe-segment h6 small { flex:none;margin:0;font-size:10px;color:#c4bb9e; }
#hud #production-panel[data-production-mode=crafting] .production-recipe-detail { min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:1px 7px 12px 0;scrollbar-width:thin;scrollbar-color:#b79b6055 transparent;scrollbar-gutter:stable; }
#hud #production-panel[data-production-mode=crafting] .production-station { margin:0 0 12px;padding:10px;gap:6px 10px; }
#hud #production-panel[data-production-mode=crafting] .production-station strong { font-size:12px; }
#hud #production-panel[data-production-mode=crafting] .production-station span { font-size:10px;line-height:1.5; }
#hud #production-panel[data-production-mode=crafting] .smithing-hero { margin:0;padding:12px 0;gap:12px;align-items:flex-start; }
#hud #production-panel[data-production-mode=crafting] .smithing-hero p { max-height:none;overflow:visible;font-size:11px;line-height:1.6; }
#hud #production-panel[data-production-mode=crafting] .smithing-hero h4 { font-size:20px;line-height:1.25; }
#hud #production-panel[data-production-mode=crafting] .smithing-supplies { grid-template-columns:1fr;gap:7px; }
#hud #production-panel[data-production-mode=crafting] .smithing-supplies>div { padding:8px;gap:10px; }
#hud #production-panel[data-production-mode=crafting] .smithing-supplies span { font-size:12px; }
#hud #production-panel[data-production-mode=crafting] .smithing-supplies small { font-size:10px; }
#hud #production-panel[data-production-mode=crafting] .smithing-note { font-size:11px;line-height:1.6; }
#hud #production-panel[data-production-mode=crafting] .smithing-actions { gap:7px;margin-top:14px; }
@media(max-width:760px) {
  #hud .inventory-grid.production-open:has(#production-panel[data-production-mode=crafting]) { width:min(540px,calc(100vw - 24px)); }
  #hud #production-panel[data-production-mode=crafting] .production-categories { grid-template-columns:repeat(3,minmax(0,1fr));gap:5px; }
  #hud #production-panel[data-production-mode=crafting] .smithing-content { display:block;overflow-y:auto; }
  #hud #production-panel[data-production-mode=crafting] .production-workspace { display:block; }
  #hud #production-panel[data-production-mode=crafting] .production-recipes { max-height:280px;margin-bottom:18px; }
  #hud #production-panel[data-production-mode=crafting] .production-recipe-detail { overflow:visible;padding-right:0; }
}
#hud .production-status .production-phase { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:7px 0;color:#655033;font:12px Georgia,serif; }
#hud .production-status .production-phase[hidden] { display:none; }
#hud .production-status [data-status-phases] { display:flex;gap:4px;flex:none; }
#hud .production-status [data-status-phases] i { display:block;width:11px;height:3px;border-radius:2px;background:#78664740;transition:background-color .18s ease; }
#hud .production-status [data-status-phases] i.complete { background:#788052; }
#hud .production-status [data-status-phases] i.current { background:#a06a32; }
@media(prefers-reduced-motion:reduce) { #hud .production-status [data-status-phases] i { transition:none; } }
@media(max-width:600px) {
  #hud:has(#inventory.production-open:not([hidden])) .map-cluster { visibility:hidden;pointer-events:none; }
  #hud:has(.production-status:not([hidden]):not(.production-status-inline)) #inventory.production-open:not([hidden]) { bottom:220px;height:calc(100dvh - 240px);max-height:calc(100dvh - 240px); }
  #hud #production-panel { gap:6px;padding:9px; }
  #hud #production-panel .smithing-heading [data-production-icon]>.icon { width:32px;height:32px; }
  #hud #production-panel [data-production-eyebrow],#hud #production-panel .production-category-heading { display:none; }
  #hud #production-panel [data-production-name] { font-size:18px; }
  #hud #production-panel .production-filters>label:first-child { font-size:0; }
  #hud #production-panel .production-filters input[type=search] { margin-top:0;font-size:10px; }
  #hud #production-panel .production-categories button { padding:4px 5px; }
  #hud #production-panel .production-categories button small { margin-top:2px; }
  #hud #production-panel .production-recipes { max-height:120px; }
  #hud #production-panel[data-production-mode=crafting] .production-recipes { display:none; }
  #hud #production-panel[data-production-mode=crafting] .production-categories button { min-height:33px;padding:4px 5px;font-size:11px; }
  #hud #production-panel[data-production-mode=crafting] .production-categories button small { margin-top:2px;font-size:8px; }
  #hud #production-panel[data-production-mode=crafting] .smithing-hero { padding:10px 0; }
  #hud #production-panel[data-production-mode=crafting] .smithing-hero h4 { font-size:18px; }
  #hud #production-panel[data-production-mode=crafting] .smithing-hero p { font-size:10px; }
  #hud #production-panel[data-production-mode=crafting] .production-station { padding:8px;margin-bottom:10px; }
  #hud #production-panel .production-mobile-picker { display:block;font-size:9px;margin:5px 0 8px; }
  #hud #production-panel .production-mobile-picker select { display:block;width:100%;margin-top:4px;height:32px;padding:4px;border:1px solid #aa926077;border-radius:3px;background:#24372b;color:#eee0c6;font:11px Georgia,serif;color-scheme:dark; }
  #hud #production-panel .smithing-output>.icon { width:68px;height:68px; }
  #hud #production-panel .smithing-hero { padding:8px 4px; }
  #hud .production-open .inventory-footer .inventory-utilities button { min-height:24px;padding:3px 6px;font-size:9px; }
  #hud .production-open .inventory-footer .inventory-utilities .icon { width:16px;height:16px; }
  #hud .production-open .inventory-bottom-tabs button { min-height:38px;flex-direction:row;gap:4px;padding:5px 3px;font-size:9px; }
  #hud .production-open .inventory-bottom-tabs .icon,#hud .production-open #inventory-logout .icon { width:20px;height:20px;margin:0; }
  #hud .production-status { z-index:9;padding:8px; }
  #hud .production-status>div .icon { width:24px;height:24px; }
  #hud .production-status strong { font-size:12px; }
  #hud .production-status>small { margin:4px 0;font-size:10px; }
  #hud .production-status .production-phase { margin:4px 0;font-size:10px; }
  #hud .production-status>span { margin-top:3px;font-size:9px; }
}
/* The wide workbook owns its live activity card, so progress and Stop remain
   visible without covering the recipe panes. Small screens keep the HUD card. */
#hud #production-panel>.production-status-inline { position:static;left:auto;bottom:auto;transform:none;translate:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;width:auto;max-width:none;flex:none;margin:0;padding:7px 9px;animation:none;box-shadow:inset 0 0 0 2px #fff3d526; }
#hud #production-panel>.production-status-inline[hidden] { display:none; }
#hud #production-panel>.production-status-inline>div:first-child { grid-column:1/-1;grid-row:1;gap:7px; }
#hud #production-panel>.production-status-inline .icon { width:24px;height:24px; }
#hud #production-panel>.production-status-inline strong { font-size:13px; }
#hud #production-panel>.production-status-inline button { padding:4px 8px;border:1px solid #98794b88;background:#98794b20;color:#684b2c;font-size:10px; }
#hud #production-panel>.production-status-inline>small { grid-column:1;grid-row:2;margin:0;font-size:10px; }
#hud #production-panel>.production-status-inline>span[role=status] { grid-column:2;grid-row:2;margin:0;font-size:10px; }
#hud #production-panel>.production-status-inline>progress { grid-column:1/-1;grid-row:3;height:4px; }
#hud #production-panel>.production-status-inline .production-phase { display:none; }
#hud #production-panel:has(>.production-status-inline:not([hidden]))>.smithing-footer { display:none; }
@media(min-width:761px) and (max-height:850px) {
  #hud .inventory-grid.production-open:has(#production-panel[data-production-mode=crafting]) { height:calc(100dvh - 130px);max-height:calc(100dvh - 130px); }
  #hud .production-open:has(#production-panel[data-production-mode=crafting]) .inventory-tabs button { min-height:40px;padding:3px 1px; }
  #hud .production-open:has(#production-panel[data-production-mode=crafting]) .inventory-tabs .icon { width:28px;height:28px; }
  #hud .production-open:has(#production-panel[data-production-mode=crafting]) .inventory-utilities button { min-height:24px;padding:3px 6px;font-size:10px; }
  #hud .production-open:has(#production-panel[data-production-mode=crafting]) .inventory-bottom-tabs button { min-height:36px;flex-direction:row;gap:7px;padding:4px 6px;font-size:10px; }
  #hud .production-open:has(#production-panel[data-production-mode=crafting]) .inventory-footer .icon { width:20px;height:20px;margin:0; }
  #hud #production-panel[data-production-mode=crafting] { gap:6px;padding:10px; }
  #hud #production-panel[data-production-mode=crafting] :is([data-production-eyebrow],.production-category-heading,.smithing-footer) { display:none; }
  #hud #production-panel[data-production-mode=crafting] .smithing-heading [data-production-icon]>.icon { width:32px;height:32px; }
  #hud #production-panel[data-production-mode=crafting] .smithing-heading h3 { margin:0; }
  #hud #production-panel[data-production-mode=crafting] .smithing-heading [data-production-name] { font:18px Georgia,serif; }
  #hud #production-panel[data-production-mode=crafting] .smithing-xp span { margin-top:3px;font-size:9px; }
  #hud #production-panel[data-production-mode=crafting] .production-filters>label:first-child { font-size:0; }
  #hud #production-panel[data-production-mode=crafting] .production-filters input[type=search] { margin-top:0;font-size:11px; }
  #hud #production-panel[data-production-mode=crafting] .production-categories button { min-height:34px;padding:5px 8px; }
  #hud #production-panel[data-production-mode=crafting] .production-categories button small { display:inline;margin:0 0 0 6px; }
}
