/* AstroDestiny workspace overflow and form sizing repair */
body.astro-workspace-page,body.astro-workspace-page #top,body.astro-workspace-page main,body.astro-workspace-page main>section{box-sizing:border-box;min-width:0}
body.astro-workspace-page main{overflow-x:clip}
body.astro-workspace-page main>section{width:100%;max-width:1440px}
body.astro-workspace-page .content-grid{display:grid!important;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;align-items:center;gap:clamp(20px,3vw,42px)!important;width:100%;max-width:100%;min-width:0}
body.astro-workspace-page .content-grid>*,body.astro-workspace-page .form-card,body.astro-workspace-page .section-intro,body.astro-workspace-page .vedic-section,body.astro-workspace-page .vedic-section>*,body.astro-workspace-page .vedic-form-grid,body.astro-workspace-page .vedic-field{min-width:0;max-width:100%;box-sizing:border-box}
body.astro-workspace-page .form-card{width:100%;overflow:hidden}
body.astro-workspace-page .form-card input,body.astro-workspace-page .form-card select,body.astro-workspace-page .form-card textarea,body.astro-workspace-page .vedic-field input,body.astro-workspace-page .vedic-field select{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
body.astro-workspace-page .vedic-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;width:100%}
body.astro-workspace-page .map-section,body.astro-workspace-page .map-shell,body.astro-workspace-page #world-map{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
body.astro-workspace-page .map-shell{position:relative;min-height:540px;overflow:hidden}
body.astro-workspace-page #world-map{height:540px;min-height:540px;overflow:hidden}
body.astro-workspace-page #world-map canvas{display:block;max-width:100%}
body.astro-workspace-page .map-section .map-hint{max-width:420px}
body.astro-workspace-page .workspace-topbar,body.astro-workspace-page .workspace-sidebar{box-sizing:border-box}
@media(max-width:1050px){body.astro-workspace-page .content-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important}}
@media(max-width:760px){body.astro-workspace-page .content-grid{grid-template-columns:minmax(0,1fr)!important}body.astro-workspace-page .vedic-form-grid{grid-template-columns:minmax(0,1fr)}body.astro-workspace-page .map-shell,body.astro-workspace-page #world-map{min-height:420px;height:420px}}

/* v2: ensure workspace content begins immediately after the sidebar and stays inside viewport */
body.astro-workspace-page main {
  margin-left:258px !important;
  width:calc(100% - 258px) !important;
  max-width:none !important;
  min-width:0 !important;
  overflow-x:hidden !important;
}
body.astro-workspace-page main > section {
  width:100% !important;
  max-width:1440px !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
body.astro-workspace-page main > section#personal-matrix {
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
  min-width:0 !important;
}
body.astro-workspace-page #personal-matrix .matrix-layout {
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  grid-template-columns:minmax(0,1.25fr) minmax(280px,.85fr) !important;
}
body.astro-workspace-page #personal-matrix .matrix-layout > * {
  min-width:0 !important;
  max-width:100% !important;
}
body.astro-workspace-page #personal-matrix .matrix-numbers-card,
body.astro-workspace-page #personal-matrix .matrix-chart-card {
  overflow-wrap:anywhere;
}
@media(max-width:900px) {
  body.astro-workspace-page main {
    margin-left:0 !important;
    width:100% !important;
  }
  body.astro-workspace-page #personal-matrix .matrix-layout {
    grid-template-columns:minmax(0,1fr) !important;
  }
}
