/* The shared header must not inherit the flower editor's header rules. */
#productWorkbench #workspaceHeader { position: fixed; inset: 0 0 auto; display: block; width: 100%; max-width: none; margin: 0; padding: 8px 16px 0; transform: none; z-index: 500; background: #f4f7f4; }
#workspaceHeader .topbar, #productWorkbench #workspaceHeader .topbar { position: static; display: flex; padding: 0; margin: 0; border: 0; background: transparent; width: 100%; justify-content: space-between; transform: none; }
#productWorkbench #workspaceHeader button { width: auto; flex: initial; margin: 0; font-size: 16px; line-height: 1.4; }
#productWorkbench #workspaceHeader nav button { width: 100%; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; padding: 8px 2px; }
#productWorkbench #workspaceHeader nav button[aria-current="page"] { border-bottom-color: #316848; }
#workspaceHeader .topbar-actions { align-items: center; }
#workspaceHeader > nav, #workspaceHeader > .topbar, #productWorkbench #workspaceHeader > .topbar { max-width: 1180px; margin-inline: auto; }
#workspaceHeader > nav button { font-weight: 500; }
#workspaceHeader > nav button[aria-current="page"] { font-weight: 700; }
#workspaceHeader #communityButton { display: none; }
#productWorkbench #workspaceHeader .utility-menu { border: 0; padding: 0; }
#productWorkbench #workspaceHeader .utility-menu > summary { font-size: 16px; padding: 8px; }

/* A single anchored sheet geometry at every viewport size. */
body[data-mobile-panel="tools"].mobile-panel-open .seed-panel,
body[data-mobile-panel="seeds"].mobile-panel-open .seed-panel,
body[data-mobile-panel="soil"].mobile-panel-open .soil-lab {
  position: fixed !important; top: calc(var(--workspace-header-height) + 12px) !important;
  bottom: auto !important; left: 50% !important; right: auto !important;
  transform: translateX(-50%) !important; display: block !important;
  width: min(780px, calc(100vw - 24px)) !important; box-sizing: border-box;
  max-height: calc(100dvh - var(--workspace-header-height) - 28px) !important;
  margin: 0 !important; overflow: auto; overscroll-behavior: contain;
  z-index: 150; background: #fff; border: 1px solid #b8c8be;
}
body.mobile-panel-open .mobile-panel-backdrop:not([hidden]) { display: block; position: fixed; inset: var(--workspace-header-height) 0 0; z-index: 145; background: #17291c66; }
body.mobile-panel-open .seed-panel .mobile-panel-close,
body[data-mobile-panel="soil"] .soil-panel-close { display: grid !important; place-items: center; min-width: 44px; min-height: 44px; flex: 0 0 44px; }
body[data-mobile-panel="tools"] .seed-panel .seed-catalog-disclosure { display: none; }
body[data-mobile-panel="tools"] .seed-panel .tool-shelf-disclosure { display: block; }
.empty-soil-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 8px 0; }
.empty-soil-row button { min-height: 44px; padding: 6px 12px; }
.empty-pot .empty-copy { margin: 6px 0; }
.empty-pot .empty-plant-actions { width: 100%; margin-top: 12px; }
.garden-heading { display: none !important; }
.garden-next-steps:empty { display: none; }
.expansion-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 0; min-height: 220px; padding: 20px; border: 2px dashed #a0b6a6; border-radius: 6px; background: #f1f6f1; color: #34513e; cursor: pointer; }
.expansion-placeholder > span { font-size: 48px; line-height: 1; font-weight: 400; }
.expansion-placeholder small { font-size: 16px; line-height: 1.5; }
#expansionCard[data-focused="true"] { outline: 3px solid #bd9034; outline-offset: -3px; background: #fff8e4; }
.seed-panel > details > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 8px; padding: 14px 8px; min-height: 64px; border-bottom: 1px solid #cbd5ce; background: transparent; }
.seed-panel > details > summary strong { grid-column: 1; font-size: 18px; }
.seed-panel > details > summary small { grid-column: 1; font-size: 14px; font-weight: 400; }
.seed-panel > details > summary em { grid-column: 2; grid-row: 1 / 3; font-size: 14px; font-style: normal; }
.seed-panel > details > summary::after { display: none; }
.seed-panel > details .seed-close-label { display: none; }
.seed-panel > details[open] .seed-close-label { display: inline; }
.seed-panel > details[open] .seed-open-label { display: none; }
#eventLog { display: block; max-height: 220px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
#eventLog > li { height: auto; min-height: min-content; margin: 0 0 8px; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.log-panel { min-width: 0; clear: both; }
.seed-panel > .panel-heading { display: none !important; }
body.mobile-panel-open .seed-panel > .panel-heading { display: flex !important; justify-content: flex-end; min-height: 44px; }
body.mobile-panel-open .seed-panel > .panel-heading > div:first-child { display: none; }
body.mobile-panel-open .seed-panel > details > summary { display: none; }
.tool-shelf-heading > div:first-child { display: none; }
.tool-shelf-heading { justify-content: flex-end; }
.codex-panel #rewardResearchView { padding: 0; }
.codex-panel #rewardResearchView > header { position: static; display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; }
.codex-panel #rewardResearchView > header strong { display: none; }
.codex-panel #rewardResearchView .research-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); }
.codex-panel:has(#researchTab.active) .codex-first-help { display: none; }
#compostResource::before { content: "💩" !important; background: none !important; font-size: 26px; display: grid; place-items: center; line-height: 1; }
.community-modal { box-sizing: border-box; min-height: 0; grid-template-rows: minmax(0,1fr); }
.community-modal .community-sheet { box-sizing: border-box; min-height: 0; max-height: 100%; overscroll-behavior: contain; }
#expansionCard[data-focused="true"] { position: relative; isolation: isolate; }
#expansionCard[data-focused="true"]::after { content: ""; position: absolute; inset: 0; border: 3px solid #bd9034; border-radius: inherit; z-index: 5; pointer-events: none; }
.codex-entry .codex-art, .codex-entry .codex-visitor-art { width: 104px; height: 120px; flex: 0 0 104px; box-sizing: border-box; }
.codex-entry button.codex-plant-heading { width: 100%; min-height: 120px; text-align: left; border: 1px solid transparent; background: transparent; color: inherit; padding: 8px; cursor: pointer; }
.codex-entry button.codex-plant-heading:disabled { opacity: 1; cursor: default; }
.codex-entry button.codex-plant-heading:not(:disabled):hover { background: #edf3ef; border-color: #abc0b1; }
.codex-entry [data-mint-reveal]:not(:disabled) { min-height: 48px; padding: 12px 24px; font-size: 18px; font-weight: 600; color: white; background: #31694e; border: 2px solid #23533b; border-radius: 6px; cursor: pointer; }
.codex-entry details:has([data-mint-reveal]:not(:disabled)) > summary { background: #e4f1e7; border: 2px solid #62916b; padding: 12px; font-size: 18px; color: #245439; }
#workshopPanel #openProductWorkbench { display: none !important; }
#linStory .lin-story-heading { margin: 0; }
#linStory .ingredient em { display: none; }
#linStory .lin-story-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
#linStory details { margin-top: 12px; }
.seed-panel > .shop-wallet { display: inline-flex; width: fit-content; max-width: 100%; box-sizing: border-box; justify-self: end; align-self: flex-end; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; margin-left: auto; flex: 0 0 auto; }
#seedPurchaseReceipt { position: sticky; top: 0; z-index: 6; padding: 12px; background: #e4f1e7; border: 1px solid #87a98f; border-radius: 4px; color: #214b34; font-size: 16px; }
#seedPurchaseReceipt:empty { display: none; }
body[data-mobile-panel="tools"] #seedPurchaseReceipt { display: none; }
.speed-view-option { display: flex; align-items: center; gap: 10px; border-left: 1px solid #bccbbf; padding-left: 12px; }
#speedControl #showcaseEntryButton { display: inline-flex; align-items: center; width: auto; min-height: 44px; padding: 8px 12px; margin: 0; background: #edf4ed; color: #31543d; border: 1px solid #92aa97; border-radius: 4px; box-shadow: none; }
#speedControl #showcaseEntryButton[hidden] { display: none; }
#speedControl #showcaseEntryButton > span, #speedControl #showcaseEntryButton > small, #speedControl #showcaseEntryButton > b { display: none; }
#speedControl #showcaseEntryButton strong { font-size: 16px; }
#awayActions { display: none !important; }
#productWorkbench .stall-workspace { grid-template-columns: minmax(220px,280px) minmax(0,1fr); }
#stallRecipeShelf { min-width: 0; border-right: 1px solid #c8d8d9; background: #edf2ef; }
#stallRecipeShelf > summary { cursor: pointer; padding: 16px; min-height: 48px; font-weight: 600; box-sizing: border-box; }
#stallRecipeShelf #stallCatalog { border: 0; padding: 12px; }
#productWorkbench[data-stage="shelf"] #productBody > .pw-muted { display: none; }
#productWorkbench[data-stage="invitation"] #stallRecipeShelf { display: none; }
#productWorkbench #productBody { min-width: 0; scroll-margin-top: calc(var(--workspace-header-height, 100px) + 72px); }
@media(max-width:1100px) { #productWorkbench .pw-layout { grid-template-columns: minmax(0,1fr); } }
@media(max-width:760px) {
  #productWorkbench .stall-workspace { grid-template-columns: minmax(0,1fr); }
  #stallRecipeShelf { border-right: 0; border-bottom: 1px solid #c8d8d9; }
  .speed-view-option { border-left: 0; padding-left: 0; }
}
#speedControl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; }
#speedControl .speed-label { display: none; }
#speedControl .speed-segments { flex: 0 1 auto; width: auto; min-width: 0; grid-template-columns: repeat(3,minmax(0,1fr)); }
#speedControl .speed-segments button { min-height: 44px; padding: 8px 12px; }
#speedControl .speed-view-option { flex: 0 0 auto; margin: 0; padding: 0; }
#speedControl #pauseButton { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 88px; min-height: 44px; padding: 8px 12px; background: #fff; border: 2px solid #53745d; border-radius: 4px; color: #24482f; font-size: 16px; }
#speedControl #pauseButton[aria-pressed="true"] { background: #ffe7a8; border-color: #946b20; color: #513b16; }
#rewardStrip { border: 2px solid #739785; background: #e9f3ec; border-radius: 6px; }
#rewardStripButton { width: 100%; padding: 14px 16px; min-height: 74px; background: transparent; color: #204c33; text-align: left; }
#rewardStripAction { display: inline-block; background: #316848; color: white; padding: 8px 12px; border-radius: 4px; font-style: normal; font-weight: 600; }
#rewardStripButton:focus-visible { outline: 3px solid #b18a33; outline-offset: 3px; }
@media(min-width:700px) {
  #workspaceHeader h1 { font-size: 26px; }
  #workspaceHeader nav button { font-size: 18px; min-height: 52px; }
  #speedControl button { font-size: 18px; min-height: 48px; }
  #rewardStripTitle { font-size: 20px; }
  #rewardStripCopy, #rewardStripAction { font-size: 17px; }
}
#speedControl #openGreenhouseFlow, #speedDescription { display: none; }
.speed-view-option { border-left: 0; padding-left: 0; }
#codexContent, #codexContent .codex-list, #codexContent .codex-entry { min-width: 0; max-width: 100%; box-sizing: border-box; }
#codexContent .codex-list { grid-template-columns: minmax(0,1fr); }
#codexContent .codex-entry { overflow-wrap: anywhere; }
#codexContent .codex-entry > *, #codexContent .codex-entry details, #codexContent .codex-entry summary { min-width: 0; max-width: 100%; box-sizing: border-box; }
#codexContent .codex-plant-heading { display: flex; gap: 12px; white-space: normal; }
#codexContent .codex-plant-heading strong { min-width: 0; overflow-wrap: anywhere; }
#codexContent .mint-improvement { min-width: 0; max-width: 100%; }
#codexContent .mint-improvement button { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
@media(min-width:1000px) { #codexContent .codex-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:699px) {
  #codexContent .codex-entry { padding: 12px; }
  #codexContent .codex-art, #codexContent .codex-visitor-art { width: 80px; height: 100px; flex-basis: 80px; }
  #codexContent button.codex-plant-heading { min-height: 100px; padding: 0; }
  #speedControl .speed-segments { width: auto; min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  #speedControl .speed-segments button { min-width: 0; white-space: normal; padding: 8px 4px; }
}
.supply-tabs { display: none; }
body.mobile-panel-open .supply-tabs { display: flex; gap: 8px; padding: 8px 0 12px; }
.supply-tabs button { min-height: 44px; flex: 1; padding: 8px; border: 1px solid #bdcbbf; border-radius: 4px; background: white; }
.supply-tabs button[aria-pressed="true"] { background: #e7f0e8; border-color: #63886d; font-weight: 600; }
body[data-mobile-panel="seeds"].mobile-panel-open .tool-shelf-disclosure { display: none; }
body.mobile-panel-open .seed-panel > .panel-heading p { display: none; }
@media(min-width:981px) {
  body[data-mobile-workspace="garden"] .layout-grid { grid-template-columns: 250px minmax(0,1fr); align-items: start; }
  body[data-mobile-workspace="garden"] .layout-grid > .seed-panel { grid-column: 1; grid-row: 1; }
  body[data-mobile-workspace="garden"] .layout-grid > .garden { grid-column: 2; grid-row: 1; min-width: 0; }
}
@media(max-width:699px) { #productWorkbench #workspaceHeader { padding-inline: 8px; } #productWorkbench #workspaceHeader nav button { font-size: 15px; } }
