/* 3.43: embedded goal picker, station phases and readable live materials. */
body[data-tool=crafting] .atlas-layout{grid-template-columns:minmax(240px,22%) minmax(0,1fr) minmax(280px,20%);gap:18px;margin-left:28px;margin-right:28px}
.workshop-goal-picker{margin:0!important;padding:18px!important;min-width:0;position:sticky;top:18px;max-height:calc(100dvh - 40px);display:flex;flex-direction:column;overflow:hidden}
.workshop-goal-picker h2{font-size:17px;margin-bottom:15px;flex:none}
.workshop-goal-picker .atlas-field{margin:0 0 14px;flex:none}
#craftGoalPanel #craftGoalList{display:block;overflow:auto;overscroll-behavior:contain;min-height:0;max-height:min(58dvh,650px);scrollbar-width:thin;scrollbar-color:#a2adbf #172234;padding-right:5px}
#craftGoalPanel .workshop-goal-row{padding:10px 0;gap:8px;border-bottom:1px solid #9da9be29}
#craftGoalPanel .workshop-goal-row>.craft-icon{width:29px;height:29px}
#craftGoalPanel .workshop-goal-row>span{font-size:12px;line-height:1.4}
#craftGoalPanel .workshop-quantity{grid-template-columns:27px 44px 27px;gap:3px}
#craftGoalPanel .workshop-quantity input{padding:6px 2px;font-size:12px}
#craftGoalPanel .workshop-quantity .btn{min-width:27px;min-height:28px;width:27px;padding:3px;font-size:15px}
#craftGoalPanel #craftClearGoal{align-self:flex-start;margin-top:14px;font-size:11px}
.workshop-goal-actions{flex-wrap:wrap;justify-content:flex-end;gap:7px}
#craftParty{background:linear-gradient(#4b6549,#2c4438);border-color:#a6c68b;color:#f0ffdd}
#craftShareDisclosure>summary{font-size:13px}
/* Inputs keep their native state and keyboard semantics. */
#craftingTool input[type=checkbox]{cursor:pointer;appearance:none;-webkit-appearance:none;width:20px;height:20px;min-width:20px;border:1px solid #b9c5dc;border-radius:6px;background:linear-gradient(#101b2c,#25354d);position:relative;vertical-align:middle;box-shadow:inset 0 1px 3px #0007;transition:background .15s,border-color .15s,box-shadow .15s}
#craftingTool input[type=checkbox]::after{content:'';position:absolute;width:10px;height:6px;border-left:2px solid #3c290e;border-bottom:2px solid #3c290e;transform:translate(4px,4px) rotate(-45deg);opacity:0}
#craftingTool input[type=checkbox]:checked{background:linear-gradient(#ffe7a0,#edb951);border-color:#ffe8ad;box-shadow:0 0 8px #efc35b30,inset 0 1px #fff6}
#craftingTool input[type=checkbox]:checked::after{opacity:1}
#craftingTool input[type=checkbox]:hover{border-color:#ffdf92;box-shadow:0 0 0 3px #ffd76b18}
#craftingTool input[type=checkbox]:focus-visible{outline:2px solid #ffdb7c;outline-offset:3px}
#craftCharacterRead{font-weight:700;font-size:18px;color:#ffe09a;display:block;padding:6px 0}
.workshop-station{margin:18px 16px;padding:18px;border:1px solid #a8b5ce;border-left:4px solid #edc773;border-radius:12px;background:linear-gradient(125deg,#34415788,#1b283944)}
.workshop-station+.workshop-station{border-top:1px solid #a8b5ce;margin-top:28px}
.workshop-station.is-complete{border-left-color:#8acb9f}
.workshop-station-heading{padding-bottom:12px;border-bottom:1px solid #acb8cc40;flex-wrap:wrap}
.workshop-station-heading h2{font-size:20px;line-height:1.3;margin:0 0 3px}
.workshop-station-heading>div>span{font-size:14px;color:#ffd88e}
.workshop-station-location{font-size:10px;display:flex;flex-direction:column;gap:5px;color:#c9d4e6}
.workshop-station-location select{border:1px solid #92a2ba;border-radius:6px;background:#162338;color:#eff5ff;font-size:12px;padding:7px 8px;max-width:190px}
.workshop-station-totals{gap:9px;margin:14px 0 18px}
.workshop-station-totals>.workshop-station-total-label{font-size:13px;font-weight:650;align-self:center}
.workshop-station-totals>.workshop-station-output{font-size:13px;line-height:1.4;padding:8px 10px;border:1px solid #8d9db860;background:#17243b;border-radius:8px;color:#eef4ff;max-width:100%}
.workshop-station-output>.craft-icon{width:32px;height:32px}
.workshop-station-output small{font-size:11px;display:block;color:#9dd7ae}
.workshop-station-output.is-done>span{text-decoration:line-through;color:#b0bccc}
.workshop-station-output.is-done>.craft-icon{filter:grayscale(1);opacity:.45}
.workshop-station-pass{padding:12px;margin-top:14px;border:1px solid #94a3ba50;border-radius:8px;background:#101d3029;scroll-margin-top:105px}
.workshop-station-pass>header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 10px;margin:-12px -12px 12px;border-bottom:1px solid #e2bc6c66;background:#c19a3e18;border-radius:8px 8px 0 0}
.workshop-station-pass>header>strong{color:#ffdf9c;font-size:14px}
.workshop-station-pass>header>span{font-size:12px;color:#d0dcec}
.workshop-station-pass>footer{width:100%;margin:14px 0 0;padding:12px 0 0;border-top:1px solid #9cabc04d;font-size:12px;color:#ffe0a0}
.workshop-itinerary{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:16px;border-bottom:1px solid #94a3ba50}
.workshop-itinerary>button{padding:7px 9px;border:1px solid #b9a06b;border-radius:7px;background:#24354b;color:#edf5ff;font-size:12px;display:flex;gap:6px;align-items:center}
.workshop-itinerary>button:hover{background:#5c4a2d}
.workshop-itinerary b{color:#ffdb84}
/* Reset legacy dashboard spacing that compressed cards to half the drawer. */
#craftMaterialDock{--dock-width:330px;height:calc(100dvh - 104px);top:calc(50% + 26px);font-size:12px}
#craftMaterialDock #craftDockMaterialsBody{padding:0 12px 12px;min-width:0}
#craftMaterialDock .atlas-material-preview{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;margin:0!important;width:100%;gap:8px;min-width:0}
#craftMaterialDock .atlas-material-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex:none!important;width:100%;min-width:0;max-width:none;height:auto;min-height:145px;padding:12px 6px 9px!important;overflow:visible}
#craftMaterialDock .atlas-material-card h3{font-size:11px;line-height:1.35;min-height:44px;height:auto;width:100%;padding:0;margin:0 0 3px;overflow-wrap:normal;word-break:normal;text-wrap:balance}
#craftMaterialDock .atlas-material-card>.craft-icon{width:33px;height:33px;margin:3px auto 5px;object-fit:contain}
#craftMaterialDock .atlas-material-quantity{font-size:20px;line-height:1.2;margin:0;max-width:100%;overflow-wrap:normal;word-break:normal}
#craftMaterialDock .atlas-mesos-card .atlas-material-quantity{font-size:17px}
#craftMaterialDock .atlas-material-label{font-size:10px;line-height:1.35;margin:3px 0;color:#e1e9f6}
#craftMaterialDock .atlas-material-stock{font-size:10px;line-height:1.4;margin-top:4px;white-space:normal;color:#bccce3}
#craftMaterialDock .atlas-material-totals{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px 0;margin:0 0 8px;height:auto;line-height:1.3}
#craftMaterialDock .atlas-material-totals>span{display:flex;flex-direction:column;gap:3px;padding:0!important;border:0!important;min-width:0;font-size:10px}
#craftMaterialDock .atlas-material-totals>span::before{display:none!important}
#craftMaterialDock .atlas-material-totals b{font-size:19px;line-height:1.2}
#craftMaterialDock .atlas-material-totals>small{grid-column:1/-1;font-size:10px;display:block}
#craftMaterialDock .atlas-collection-progress{padding:10px;margin-bottom:7px}
#craftMaterialDock .atlas-collection-progress strong,#craftMaterialDock .atlas-collection-progress b{font-size:11px}
#craftMaterialDock .atlas-collection-progress small{font-size:10px}
#craftMaterialDock .atlas-collected-materials{margin-top:12px}
/* Exclude is an icon affordance, visible on hover/focus and always on touch. */
.atlas-material-card{position:relative}
.workshop-exclude-button{position:absolute;right:1px;top:1px;width:25px;height:25px;min-height:0;margin:0;padding:3px;border:0;background:transparent;box-shadow:none;color:#f7a5a2;opacity:0;pointer-events:none;transform:scale(.8);transition:opacity .16s,transform .16s,color .16s;z-index:2}
.workshop-exclude-button svg{width:19px;height:19px;fill:#172338;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.atlas-material-card:hover>.workshop-exclude-button,.atlas-material-card:focus-within>.workshop-exclude-button,.workshop-exclude-button:focus-visible{opacity:1;pointer-events:auto;transform:scale(1)}
.workshop-exclude-button:hover{color:#fff2c1;background:transparent;transform:scale(1.18)!important;filter:drop-shadow(0 0 4px #f4c37499)}
/* Native modal is centered; the graph has its own centered scrollable canvas. */
.workshop-overview{inset:0;margin:auto!important;position:fixed;width:min(1480px,95vw);height:min(900px,90dvh);max-height:90dvh;transform:none}
.workshop-overview>header{padding:12px 18px}
.workshop-overview>header p{font-size:12px}
.workshop-tree-body{display:flex;flex:1;min-height:0;overflow:hidden}
.workshop-tree-viewport{min-width:0;min-height:0;height:auto;flex:1;touch-action:none;outline-offset:-4px}
.workshop-tree-canvas{display:grid;place-items:center;min-width:100%;min-height:100%;width:max-content;height:max-content;padding:0}
.workshop-tree-canvas svg{max-width:none;flex:none}
.workshop-tree-name{font-size:14px}.workshop-tree-quantity{font-size:17px}.workshop-tree-subtitle{font-size:11px}
.workshop-tree-detail{display:block;flex:0 0 300px;width:300px;max-height:100%;overflow:auto;border-top:0;border-left:1px solid #91a1ba80;padding:14px;background:#1b293d;font-size:12px;user-select:text}
.workshop-tree-detail>header{display:flex;justify-content:space-between;gap:8px;align-items:center}
.workshop-tree-detail>header strong{font-size:16px;color:#ffdf9c;line-height:1.35}
.workshop-tree-detail>p{font-size:12px;line-height:1.5;color:#d3e0f0;margin:10px 0}
.workshop-tree-detail>section{border-top:1px solid #8c9eb850;padding-top:12px;margin-top:12px}
.workshop-tree-detail h3{font-size:13px;color:#ffe0a0;margin:0 0 8px}
.workshop-tree-detail ul{list-style:none;padding:0;margin:0 0 9px}
.workshop-tree-detail li{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0;line-height:1.4}
.workshop-tree-detail li>img{width:29px;height:29px;object-fit:contain;image-rendering:pixelated}
.workshop-tree-detail li>small{font-size:10px;color:#b9c9df}
.workshop-tree-detail section p{font-size:12px;line-height:1.5;color:#bacbe1;margin:5px 0}
.workshop-tree-detail .btn{font-size:11px;padding:5px 8px}
.workshop-tree-station{display:flex;gap:10px;margin:10px 0}
.workshop-tree-station>img{width:36px;height:36px;object-fit:contain;image-rendering:pixelated}
.workshop-tree-station strong{font-size:12px}
@media(min-width:1600px){body[data-tool=crafting].workshop-dock-pinned .atlas-layout,body[data-tool=crafting].workshop-dock-pinned .atlas-secondary{margin-right:378px}}
@media(max-width:1400px){body[data-tool=crafting] .atlas-layout{grid-template-columns:250px minmax(0,1fr) 280px;gap:14px;margin:0 18px}.workshop-goal-actions .btn{padding:6px 8px;font-size:11px}}
@media(max-width:1100px){body[data-tool=crafting] .atlas-layout{grid-template-columns:260px minmax(0,1fr)}.workshop-goal-picker{position:static;grid-column:2;max-height:600px}.workshop-tree-detail{flex-basis:270px;width:270px}}
@media(max-width:700px){body[data-tool=crafting] .atlas-layout{grid-template-columns:minmax(0,1fr);margin:0 12px}.workshop-goal-picker{grid-column:1}.workshop-goal-actions{justify-content:flex-start}#craftMaterialDock{--dock-width:min(330px,calc(100vw - 40px));height:calc(100dvh - 120px);top:calc(50% + 35px)}.workshop-tree-body{flex-direction:column}.workshop-tree-viewport{min-height:200px}.workshop-tree-detail{width:100%;max-height:32dvh;flex:0 0 auto;border:0;border-top:1px solid #91a1ba80}.workshop-station{margin:14px 8px;padding:12px}.workshop-station-pass{padding:10px}.workshop-station-pass>header{margin:-10px -10px 10px}.workshop-tree-toolbar select{max-width:180px}}
@media(hover:none){.workshop-exclude-button{opacity:1;pointer-events:auto;transform:none}}
@media(prefers-reduced-motion:reduce){.workshop-exclude-button,#craftingTool input[type=checkbox]{transition:none}}

.workshop-itinerary>small{width:100%;font-size:11px;color:#c9d7e9}.workshop-dock-actions{flex-wrap:wrap}
