/* Shared corrections only: retain each tool's existing layout and palette. */
html body :is(button,a,summary,input,select,textarea,[tabindex]):focus-visible{outline:2px solid #76a963;outline-offset:3px}
html body :is(button,input,select,textarea):disabled{cursor:not-allowed}
html body dialog{box-sizing:border-box;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:anywhere}
html body :is(.dialog-head,.dialog-heading)>div{min-width:0}
html body :is(.dialog-head,.dialog-heading)>button{flex-shrink:0}
/* Settings must not depend on a page importing the large viewer stylesheet. */
html body #preferencesDialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:28px;background:#17222e;color:#dce6ee;border:1px solid #364959;font:14px/1.5 system-ui,sans-serif;color-scheme:dark;overflow:auto}
#preferencesDialog::backdrop{background:#10291f70}
html body #preferencesDialog .dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}
html body #preferencesDialog .eyebrow{color:#9eb1bf;font-size:10px;letter-spacing:.12em}
html body #preferencesDialog h2{color:#dce6ee;font:26px/1.2 var(--pixel-font,system-ui);margin:8px 0 0}
html body #preferencesDialog .iconbutton{display:grid;place-items:center;flex:none;width:36px;height:36px;padding:8px;background:#243442;color:#dce6ee;border:1px solid #415362}
html body #preferencesDialog .preference-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 0;margin:0;border-bottom:1px solid #ffffff15}
html body #preferencesDialog .preference-row>span{flex:1;min-width:0}
html body #preferencesDialog .preference-row b{display:block;color:#dce6ee;font-size:14px}
html body #preferencesDialog .preference-row small{display:block;color:#afbfca;font:12px/1.5 system-ui;margin-top:5px;max-width:270px}
html body #preferencesDialog select{box-sizing:border-box;min-width:0;max-width:210px;min-height:40px;padding:8px 10px;background:#243442;color:#e0eaf0;border:1px solid #516472;font:13px/1.4 system-ui}
html body #preferencesDialog input[type=checkbox]{flex:none;width:20px;height:20px;accent-color:#64efc0}
html body #preferencesDialog .hint{color:#afbfca;font:12px/1.6 system-ui;margin:18px 0 10px}
html body #preferencesDialog #preferenceStatus{min-height:20px;color:#b3d9c7;font:12px/1.5 system-ui}
html body #preferencesDialog .dialog-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:20px}
html body #preferencesDialog .dialog-actions button{min-height:40px;padding:9px 16px;font:16px/1.3 var(--pixel-font,system-ui);border:1px solid #516472;background:#243442;color:#e0eaf0}
html body #preferencesDialog .dialog-actions .primary{background:#64efc0;color:#153b31;border-color:#64efc0}
/* Clamp long disclosures without clipping them behind the navigation. */
html body :is(.home-tools-panel,.pixel-tools-panel,.settings-menu .nav-menu){box-sizing:border-box;min-width:min(255px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:var(--ui-panel-maxheight,calc(100dvh - 144px));overflow:auto;overscroll-behavior:contain;translate:var(--ui-panel-x,0px) var(--ui-panel-y,0px)}
html body :is(.home-tools-panel,.pixel-tools-panel) a{min-width:0;overflow-wrap:anywhere}
html body :is(.home-tools-panel,.pixel-tools-panel) a>img{flex-shrink:0}
html body :is(.home-tools-panel,.pixel-tools-panel) a>span{min-width:0}
html body :is(.bridge-material-row,.pixel-material)>div{min-width:0;overflow-wrap:anywhere}
html body :is(.bridge-actions,.shape-actions,.pixel-exports) button{white-space:normal;text-align:center}
html body .feedback-close{display:grid;place-items:center;width:36px;height:36px;padding:0}
html body .shape-layer{flex-wrap:wrap}
html body .shape-layer>label:not(.shape-check){min-width:0;flex:1 1 120px}
html body .shape-layer>button{flex:0 0 36px;width:36px;height:36px}
html body .pixel-preview-controls{flex-wrap:wrap;row-gap:12px}
html body .pixel-preview-controls .pixel-zoom{min-width:0}
html body .ency-source-card>div{min-width:0;overflow-wrap:anywhere}
html body .ency-recipe{flex-wrap:wrap}
html body .ency-recipe-top{flex-wrap:wrap}
html body :is(.ency-toolbar,.match-controls)>*{min-width:0}
/* Keep secondary copy secondary, while making small text readable on paper. */
html body .tool-redesign :is(.bridge-note,.shape-hint,.shape-footnote,.path-style small,.picker-note,.local-note,.matches-bottom p),
html body .pixel-settings :is(.pixel-muted,.pixel-local,.pixel-upload small),
html body .pixel-footer :is(p,nav),html body .ency-detail-body .ency-note{color:#60715a}
@media(max-width:600px){
 html body #preferencesDialog{padding:20px}
 html body #preferencesDialog .preference-row{gap:12px;flex-wrap:wrap}
 html body #preferencesDialog .preference-row:has(select)>span{flex-basis:100%}
 html body #preferencesDialog select{max-width:100%;width:100%}
 html body :is(.pixel-topbar,.palette-nav){column-gap:10px}
 html body :is(.pixel-topbar,.palette-nav) :is(.pixel-brand,.palette-brand){min-width:0}
 html body :is(.pixel-topbar,.palette-nav) nav{flex-wrap:wrap;row-gap:10px}
 html body .tool-redesign :is(.bridge-materials,.pixel-materials)>header{flex-wrap:wrap}
 html body .pixel-exports button{flex:1 1 130px}
 html body .shape-layer>.shape-check{flex-basis:100%;margin:0}
}
@media(max-width:360px){
 html body .pixel-page .pixel-topbar .pixel-brand,html body .palette-nav .palette-brand{font-size:23px}
 html body .tool-redesign :is(.bridge-options,.shape-options){display:block}
 html body .tool-palette .color-panel{grid-template-columns:1fr}
 html body .tool-palette .color-panel :is(.mode-tabs,.color-plane-wrap,.hue,.color-values,.field-error,.choose-block,.seed-block,.fine-tune){grid-column:1;grid-row:auto}
 html body .tool-palette .color-plane-wrap{margin-bottom:18px}
 html body .tool-palette .hue{margin:0 0 20px}
 html body .tool-palette .palette-actions{flex-wrap:wrap}
 html body .tool-palette .palette-actions>.button{flex:1 1 100px}
 html body .shape-select{grid-template-columns:1fr}
 html body .shape-select select{max-width:100%;width:100%}
}
/* A short landscape screen must keep both the preview and settings reachable. */
@media(max-width:700px) and (max-height:600px){
 html body #photoDialog{overflow:auto}
 html body #photoDialog .photo-layout{height:auto;grid-template-rows:220px auto}
 html body #photoDialog .photo-settings{overflow:visible}
}
@media(pointer:coarse){
 html body :is(.preferences-button,.pixel-support,.palette-support,.settings-menu>summary,.feedback-close,#closePreferences,.shape-layer>button){min-width:44px;min-height:44px}
 html body :is(.pixel-tools-menu>summary,.home-tools-menu>summary){min-height:44px}
 html body :is(.pixel-page,.tool-redesign) :is(input[type=text],input[type=search],input[type=number],select),html body #preferencesDialog select{font-size:16px}
}
/* One shared navigation bar for every tool, scoped away from the homepage. */
html body .tool-topbar{box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:24px;width:100%;max-width:1240px;min-height:76px;margin:0 auto;padding:19px 28px;background:#f8faf1;border:0;border-bottom:1px solid #c5d2bb;position:relative;z-index:50;box-shadow:none;color:#3d6043}
html body .tool-topbar .pixel-brand{display:flex;align-items:center;gap:10px;margin:0;padding:0;font:27px/1.2 var(--pixel-font);font-weight:400;color:#3c6547;white-space:nowrap;text-decoration:none}
html body .tool-topbar .pixel-brand span{color:inherit}html body .tool-topbar .site-brand-icon{width:30px;height:30px;object-fit:contain;flex:none}
html body .tool-topbar nav{display:flex;align-items:center;gap:22px;flex:1;flex-wrap:wrap;margin:0;padding:0;font:16px/1.3 var(--pixel-font)}
html body .tool-topbar nav>a{background:none;border:0;margin:0;padding:0;color:#536e49;text-decoration:none;font:16px/1.3 var(--pixel-font)}
html body .tool-topbar .pixel-tools-menu{position:relative;margin:0}html body .tool-topbar .pixel-tools-menu>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;padding:7px 12px;min-height:35px;background:#eaf0df;border:1px solid #c5d4b8;border-radius:0;color:#526d47;font:16px/1.3 var(--pixel-font)}
html body .tool-topbar summary::-webkit-details-marker{display:none}html body .tool-topbar summary .ui-icon{width:14px;height:14px}html body .tool-topbar .pixel-tools-menu[open]>summary .ui-icon{transform:rotate(180deg)}
html body .tool-topbar .pixel-tools-panel{position:absolute;top:calc(100% + 9px);left:0;z-index:60;min-width:270px;max-width:calc(100vw - 24px);max-height:var(--ui-panel-maxheight,calc(100dvh - 144px));overflow:auto;background:#fafcf3;border:1px solid #b6c8a8;padding:8px;box-shadow:3px 4px #7b927648,0 10px 24px #263a2615}
html body .tool-topbar .pixel-more-menu .pixel-tools-panel{left:0;right:auto}html body .tool-topbar .pixel-tools-panel a{display:flex;align-items:center;gap:12px;padding:11px 12px;color:#5c7650;font:16px/1.3 var(--pixel-font);text-decoration:none}html body .tool-topbar .pixel-tools-panel a:hover{background:#e7efdb}html body .tool-topbar .pixel-tools-panel img{width:32px;height:32px;object-fit:contain;image-rendering:pixelated;flex:none}
html body .tool-topbar :is(.pixel-support,.preferences-button,.settings-menu>summary){display:grid;place-items:center;flex:none;width:34px;height:34px;min-height:34px;padding:0;margin:0;background:#edf2e5;color:#5c7b53;border:1px solid #c8d5bd;border-radius:0;box-shadow:none;cursor:pointer}html body .tool-topbar :is(.pixel-support,.preferences-button,.settings-menu>summary) .ui-icon{width:19px;height:19px}
html body .tool-topbar .settings-menu{position:relative;margin:0}html body .tool-topbar .settings-menu .nav-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:60}
html body .tool-project-actions{display:flex;align-items:center;gap:14px;max-width:1240px;padding:15px 28px;margin:auto;color:#536e49}html body .tool-project-actions input{margin-left:auto;max-width:230px}html body .tool-project-actions .navitem{color:#536e49}
@media(max-width:700px){html body .tool-topbar{padding:16px;gap:12px;min-height:70px}html body .tool-topbar .pixel-brand{font-size:23px}html body .tool-topbar nav{order:4;flex:1 0 100%;gap:18px;justify-content:flex-start}html body .tool-topbar .pixel-support{margin-left:auto}html body .tool-topbar .pixel-tools-menu>summary{min-height:44px}html body .tool-project-actions{padding:12px 16px;flex-wrap:wrap}html body .tool-project-actions input{min-width:0;flex:1} }

/* Override the viewer landing page legacy ID styles. */
/* One shared navigation bar for every tool, scoped away from the homepage. */
html body #dashboard .tool-topbar{box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:24px;width:100%;max-width:1240px;min-height:76px;margin:0 auto;padding:19px 28px;background:#f8faf1;border:0;border-bottom:1px solid #c5d2bb;position:relative;z-index:50;box-shadow:none;color:#3d6043}
html body #dashboard .tool-topbar .pixel-brand{display:flex;align-items:center;gap:10px;margin:0;padding:0;font:27px/1.2 var(--pixel-font);font-weight:400;color:#3c6547;white-space:nowrap;text-decoration:none}
html body #dashboard .tool-topbar .pixel-brand span{color:inherit}html body #dashboard .tool-topbar .site-brand-icon{width:30px;height:30px;object-fit:contain;flex:none}
html body #dashboard .tool-topbar nav{display:flex;align-items:center;gap:22px;flex:1;flex-wrap:wrap;margin:0;padding:0;font:16px/1.3 var(--pixel-font)}
html body #dashboard .tool-topbar nav>a{background:none;border:0;margin:0;padding:0;color:#536e49;text-decoration:none;font:16px/1.3 var(--pixel-font)}
html body #dashboard .tool-topbar .pixel-tools-menu{position:relative;margin:0}html body #dashboard .tool-topbar .pixel-tools-menu>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;padding:7px 12px;min-height:35px;background:#eaf0df;border:1px solid #c5d4b8;border-radius:0;color:#526d47;font:16px/1.3 var(--pixel-font)}
html body #dashboard .tool-topbar summary::-webkit-details-marker{display:none}html body #dashboard .tool-topbar summary .ui-icon{width:14px;height:14px}html body #dashboard .tool-topbar .pixel-tools-menu[open]>summary .ui-icon{transform:rotate(180deg)}
html body #dashboard .tool-topbar .pixel-tools-panel{position:absolute;top:calc(100% + 9px);left:0;z-index:60;min-width:270px;max-width:calc(100vw - 24px);max-height:var(--ui-panel-maxheight,calc(100dvh - 144px));overflow:auto;background:#fafcf3;border:1px solid #b6c8a8;padding:8px;box-shadow:3px 4px #7b927648,0 10px 24px #263a2615}
html body #dashboard .tool-topbar .pixel-more-menu .pixel-tools-panel{left:0;right:auto}html body #dashboard .tool-topbar .pixel-tools-panel a{display:flex;align-items:center;gap:12px;padding:11px 12px;color:#5c7650;font:16px/1.3 var(--pixel-font);text-decoration:none}html body #dashboard .tool-topbar .pixel-tools-panel a:hover{background:#e7efdb}html body #dashboard .tool-topbar .pixel-tools-panel img{width:32px;height:32px;object-fit:contain;image-rendering:pixelated;flex:none}
html body #dashboard .tool-topbar :is(.pixel-support,.preferences-button,.settings-menu>summary){display:grid;place-items:center;flex:none;width:34px;height:34px;min-height:34px;padding:0;margin:0;background:#edf2e5;color:#5c7b53;border:1px solid #c8d5bd;border-radius:0;box-shadow:none;cursor:pointer}html body #dashboard .tool-topbar :is(.pixel-support,.preferences-button,.settings-menu>summary) .ui-icon{width:19px;height:19px}
html body #dashboard .tool-topbar .settings-menu{position:relative;margin:0}html body #dashboard .tool-topbar .settings-menu .nav-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:60}
html body #dashboard .tool-project-actions{display:flex;align-items:center;gap:14px;max-width:1240px;padding:15px 28px;margin:auto;color:#536e49}html body #dashboard .tool-project-actions input{margin-left:auto;max-width:230px}html body #dashboard .tool-project-actions .navitem{color:#536e49}
@media(max-width:700px){html body #dashboard .tool-topbar{padding:16px;gap:12px;min-height:70px}html body #dashboard .tool-topbar .pixel-brand{font-size:23px}html body #dashboard .tool-topbar nav{order:4;flex:1 0 100%;gap:18px;justify-content:flex-start}html body #dashboard .tool-topbar .pixel-support{margin-left:auto}html body #dashboard .tool-topbar .pixel-tools-menu>summary{min-height:44px}html body #dashboard .tool-project-actions{padding:12px 16px;flex-wrap:wrap}html body #dashboard .tool-project-actions input{min-width:0;flex:1} }

html body.tool-page #dashboard .home-cover{background:#f8faf1;border-bottom:1px solid #c5d2bb}
html body #dashboard .tool-topbar{height:auto}
html body #dashboard .tool-project-actions .navitem{width:auto;min-width:0;padding:8px 12px;background:#edf2e5;color:#536e49;border:1px solid #c8d5bd}
html body #dashboard .tool-project-actions input{width:220px;flex:0 1 220px;background:#fffff8;color:#536e49;border:1px solid #c8d5bd;padding:9px 12px}

/* Quieter presentation: retain the Minecraft palette, type and working layouts. */
html body:is(.tool-redesign,.floor-page,.gradient-page,.tree-page,.banner-page,.encyclopedia-page,.coordinate-page){background-image:none}
html body :is(.catalog-card,.tree-viewer,.tree-controls,.tree-variation,.floor-workspace,.floor-settings,.gradient-panel,.gradient-endpoints-console,.coordinate-console,.coordinate-card,.banner-panel,.bridge-panel,.shape-panel){box-shadow:none}
html body :is(.catalog-card,.tree-preset,.tree-variation,.floor-preset,.gradient-preset):hover{transform:none}
html body :is(.tree-preset,.tree-variation,.floor-preset,.catalog-card){transition:background-color .15s,border-color .15s,color .15s}
html body :is(.tree-preset,.tree-export,.tree-title-icon){background-image:none}
html body .tree-title-icon{border:0;background:transparent;box-shadow:none;border-radius:0;width:66px;height:66px}
html body .tree-title-icon img{transform:none;filter:none}
html body .tree-control-title{background:#365841;border-bottom-width:1px}
html body .tree-control-title img{transform:none;filter:none}
html body .tree-heading-copy{gap:15px}
html body .tree-variation:hover{box-shadow:none}
html body .tree-preview-caption small{font:11px/1.5 system-ui,sans-serif}
html body .tree-section-heading>span:empty{display:none}
html body .tree-stage .tree-specimen{display:none}
html body :is(.tree-finishing label,.tree-control-group label,.gradient-label,.floor-main label,.banner-main label){font-family:system-ui,-apple-system,'Segoe UI',sans-serif}
html body :is(.tree-button,.floor-main button,.coordinate-reset,.gradient-reset):hover{transform:none}
/* Avoid repeating a category above the tool's own title and the preview's heading. */
html body :is(.tree-eyebrow,.floor-heading>.floor-kicker,.floor-heading>div>.floor-kicker,.gradient-intro .gradient-eyebrow,.banner-intro [data-t=eyebrow],.ency-intro .ency-eyebrow){display:none}
html body :is(.floor-stamp,.coordinate-dimension-icon,.tool-heading-art){filter:none}
html body .floor-settings-cover{box-shadow:none}
html body .catalog-card{background-image:none}
html body .catalog-preview{box-shadow:none}
@media(max-width:600px){html body .tree-title-icon{width:52px;height:52px}html body .tree-heading-copy{gap:13px}html body .tree-random{margin-left:65px}}
@media(max-width:360px){html body .tree-title-icon{width:40px;height:48px}html body .tree-heading-copy{gap:10px}html body .tree-random{margin-left:50px}}

/* Keep all five project tabs inside the inspector, including long German labels. */
html body #studio .inspector-tabs{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding-inline:6px;min-width:0}
html body #studio .inspector-tabs button{min-width:0;max-width:100%;padding-inline:2px;white-space:normal;font-size:11px;line-height:1.25;justify-content:flex-start}
html body #studio .inspector-tabs .inspector-tab-label{display:block;width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;hyphens:auto;text-align:center}
html body #studio .inspector-tabs .ui-icon{flex:none}
