/* Allow a 320px viewport to account for a desktop browser's scrollbar. */
body { min-width:0; }

/* Keep the toolbar itself transparent, without a vertical scroll track or halo. */
.floating-tools {
  background:transparent;
  border:0;
  box-shadow:none;
  filter:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  scrollbar-width:none;
}
.floating-tools::-webkit-scrollbar { display:none; width:0; height:0; }

/* Solid, single-ring controls avoid clipped blur/shadow tiles on iOS Safari. */
.floating-tools .floating-tool {
  -webkit-appearance:none;
  appearance:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  background:#fffaf1;
  box-shadow:none;
  border:1.5px solid #b78635;
  isolation:isolate;
  -webkit-tap-highlight-color:transparent;
}
.floating-tools .floating-tool:hover,
.floating-tools .floating-tool:focus-visible {
  box-shadow:none;
  background:var(--gold);
}
.floating-tools .floating-tool:focus-visible {
  outline:2px solid #94660c;
  outline-offset:3px;
}
.floating-tools .floating-tool-mark { width:32px; height:32px; flex-shrink:0; }

/* Keep quick actions on the right, with space beside the reading column. */
@media screen and (max-width:1099px) {
  .site-shell .floating-tools,
  .site-shell:has(.motion-template-hero) .floating-tools {
    inset:auto max(10px,env(safe-area-inset-right,0px)) max(22px,env(safe-area-inset-bottom,0px)) auto;
    transform:none;
    display:grid;
    grid-template-columns:48px;
    gap:8px;
    padding:0;
    max-height:none;
    overflow:visible;
  }
  .floating-tools .floating-tool {
    width:48px; height:48px; min-width:48px;
  }
  .floating-tools .floating-tool-mark svg { width:27px; height:27px; }
  .floating-tools .floating-tool-label { display:none; }
  .floating-tools .floating-tool:hover,
  .floating-tools .floating-tool:focus-visible { transform:none; }
  .floating-tools .floating-tool:focus-visible { outline:2px solid #94660c; outline-offset:-2px; }
  .site-shell:has(.floating-tools) > .page-section,
  .site-shell:has(.floating-tools) > .site-footer {
    padding-right:max(72px,calc(env(safe-area-inset-right,0px) + 64px));
  }
  .market-news-report h2 { text-wrap:balance; }
  .market-news-feed button strong { white-space:normal; overflow-wrap:anywhere; }
  .local-nav-links { max-height:calc(100svh - var(--site-nav-height) - env(safe-area-inset-bottom,0px)); }
}

/* Short landscape screens still allow all four actions to be reached. */
@media screen and (max-width:1099px) and (max-height:400px) {
  .site-shell .floating-tools,
  .site-shell:has(.motion-template-hero) .floating-tools {
    max-height:calc(100svh - var(--site-nav-height) - 36px);
    overflow-x:hidden;
    overflow-y:auto;
  }
}
