/* Presentation-only controls; forms and content keep their existing handlers. */
body:has(dialog.obx-tool-dialog[open]) { overflow: hidden; }
.obx-home-tools { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.obx-home-tools .aside-cats[aria-hidden="true"] { visibility: hidden; }
.obx-tool-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.obx-nav-tool, .obx-tool-icon {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #e3e7ec;
  border-radius: 50%; background: #fff; color: #17212c; cursor: pointer;
  box-shadow: 0 3px 14px #17212c0a; text-decoration: none;
}
.obx-nav-tool:hover, .obx-tool-icon:hover { background: #f1f5f8; }
.obx-nav-tool svg, .obx-tool-icon svg, .obx-tool-dialog svg, .obx-post-button svg {
  width: 22px; height: 22px; flex-shrink: 0; display: block;
}
.obx-weather-trigger { color: #93641b; }
.obx-tool-dialog {
  box-sizing: border-box; color: #17212c; font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.5; letter-spacing: 0;
  width: min(560px, calc(100% - 32px)); max-width: none;
  max-height: calc(100dvh - 48px); margin: auto; padding: 24px;
  border: 1px solid #e2e7ec; border-radius: 8px; background: #fff;
  box-shadow: 0 20px 80px #121d3026; overflow: auto; overscroll-behavior: contain;
}
.obx-tool-dialog:not([open]) { display: none; }
.obx-tool-dialog *, .obx-tool-dialog *::before, .obx-tool-dialog *::after { box-sizing: border-box; }
.obx-tool-dialog::backdrop { background: #17212c59; backdrop-filter: blur(5px); }
.obx-tool-dialog button, .obx-tool-dialog input { font: inherit; letter-spacing: 0; }
.obx-tool-dialog button, .obx-tool-dialog a { -webkit-tap-highlight-color: transparent; }
.obx-tool-dialog :is(button, a, input):focus-visible,
.obx-nav-tool:focus-visible, .obx-post-button:focus-visible {
  outline: 3px solid #168baf; outline-offset: 4px; box-shadow: none;
}
.obx-tool-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.obx-tool-heading h2 { font-size: 24px; line-height: 1.2; letter-spacing: 0; font-weight: 800; margin: 0; }
.obx-tool-heading p { margin: 6px 0 0; color: #65717c; font-size: 13px; }
.obx-tool-heading .obx-tool-icon { box-shadow: none; background: #f4f6f8; border-color: transparent; }

/* The search field floats over the page, without a surrounding card. */
.obx-search-dialog {
  width: min(800px, calc(100% - 40px)); padding: 8px;
  margin: min(19vh, 160px) auto auto; max-height: calc(100dvh - 48px);
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.obx-search-dialog::backdrop { background: #f8fafce8; backdrop-filter: blur(6px); }
.obx-search-dialog .obx-tool-heading { margin: 0 0 24px; }
.obx-search-dialog .obx-tool-heading h2 { font-size: 28px; }
.obx-search-dialog .obx-tool-heading .obx-tool-icon { background: #ffffffa6; border-color: #dce3e9; }
.obx-search-form {
  display: flex; gap: 14px; align-items: center; width: 100%; min-height: 68px;
  padding: 10px 12px 10px 22px; border: 1px solid #cfd8e1; border-radius: 36px;
  background: #fff; box-shadow: 0 10px 35px #17212c14; color: #617586;
}
.obx-search-form:focus-within { border-color: #1b899e; box-shadow: 0 0 0 3px #1b899e14, 0 10px 35px #17212c0d; }
.obx-search-form input {
  flex: 1; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 0;
  border: 0; outline: none; background: transparent; box-shadow: none;
  color: #17212c; font-size: 18px; border-radius: 0;
}
.obx-search-form input:focus-visible { outline: none; box-shadow: none; }
.obx-search-form input::placeholder { color: #7a8793; opacity: 1; }
.obx-search-form .obx-search-submit { background: #167e93; color: #fff; border: 0; box-shadow: none; }
.obx-search-form .obx-search-submit:hover { background: #11687b; }
.obx-search-explore { margin: 30px 12px 0; }
.obx-search-explore h3 { font-size: 13px; font-weight: 700; letter-spacing: 0; color: #65717c; margin: 0 0 12px; }
.obx-search-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.obx-search-links a {
  display: flex; align-items: center; gap: 12px; min-height: 48px; min-width: 0;
  padding: 8px 0; color: #263641; text-decoration: none; font-size: 16px;
}
.obx-search-links a svg { width: 18px; height: 18px; color: #798894; }
.obx-search-links a:hover { color: #107b91; text-decoration: underline; text-underline-offset: 4px; }
.obx-search-browse { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #dbe2e8; }
.obx-search-browse a, .obx-search-browse button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  background: none; border: 0; border-radius: 0; color: #485967; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.obx-search-browse :is(a, button):hover { color: #107b91; }
.obx-search-browse svg { width: 17px; height: 17px; }

/* Forecast data, location buttons, and tide details are unchanged. */
.obx-weather-dialog { width: min(880px, calc(100% - 32px)); }
#obxWeatherDialog #wxCard {
  width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  box-shadow: none; backdrop-filter: none;
}
#obxWeatherDialog #wxPlace { display: block; margin-bottom: 12px; font-weight: 600; font-size: 13px; }
#obxWeatherDialog .wx-tabs { padding: 0 0 16px; gap: 6px; }
#obxWeatherDialog .wx-tabs .pill { min-height: 36px; padding: 8px 12px; box-shadow: none; background: #f5f7f9; border-color: transparent; font-weight: 600; }
#obxWeatherDialog .wx-tabs .pill.active { background: #167e93; color: #fff; }
#obxWeatherDialog .wx-grid { gap: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow-x: auto; }
#obxWeatherDialog .wx-item {
  padding: 16px 8px; border: 0; border-right: 1px solid #e8edf1; border-radius: 0;
  background: transparent; box-shadow: none; transform: none;
}
#obxWeatherDialog .wx-item:last-child { border-right: 0; }
#obxWeatherDialog .wx-item .h { font-size: 14px; }
#obxWeatherDialog .wx-item .ti { font-size: 11px; }
#obxWeatherDialog .wx-item .t { letter-spacing: 0; }

.obx-post-button {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  z-index: 990; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 116px; min-height: 54px; padding: 12px 24px; border: 1px solid #ffffff70;
  border-radius: 28px; background: #17212c; color: #fff; font: 700 15px/1.2 Inter, system-ui, sans-serif;
  box-shadow: 0 8px 28px #17212c30, 0 0 0 4px #ffffffb3; cursor: pointer; letter-spacing: 0;
}
.obx-post-button:hover { background: #167e93; }
.obx-post-button:active { transform: translateX(-50%) scale(.97); }
.obx-post-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.obx-post-options a, .obx-post-options button {
  display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 12px;
  border: 1px solid transparent; border-radius: 8px; background: #f5f7f9; color: #17212c;
  text-decoration: none; text-align: left; cursor: pointer; min-width: 0;
}
.obx-post-options :is(a, button):hover { border-color: #cddce3; background: #eef4f5; }
.obx-post-option-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #e1f1f2; color: #167e93; }
.obx-post-options [data-kind="market"] .obx-post-option-icon { background: #e8edfb; color: #4767a7; }
.obx-post-options [data-kind="event"] .obx-post-option-icon { background: #fce9e8; color: #bd5552; }
.obx-post-options [data-kind="blog"] .obx-post-option-icon { background: #f9efce; color: #8c6d18; }
.obx-post-options [data-kind="business"] .obx-post-option-icon { background: #e4f0e6; color: #407950; }
.obx-post-options strong { display: block; font-size: 14px; line-height: 1.35; font-weight: 700; }
.obx-post-options small { display: block; font-size: 12px; margin-top: 3px; color: #6c7782; line-height: 1.4; }
.obx-post-options a > span:last-child, .obx-post-options button > span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* Only the relocated homepage composer gets this modal layout. */
.obx-tool-dialog#obxComposeDialog { width: min(620px, calc(100% - 32px)); }
.obx-tool-dialog#obxComposeDialog .wall-composer-bar { display: block; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.obx-tool-dialog#obxComposeDialog .wall-composer-avatar { width: 44px; height: 44px; margin-bottom: 16px; }
.obx-tool-dialog#obxComposeDialog .wall-composer-textarea {
  border-radius: 8px; min-height: 140px; padding: 16px; background: #f6f8fa;
  font-size: 16px; line-height: 1.5; margin: 0; width: 100%;
}
.obx-tool-dialog#obxComposeDialog .wall-composer-actions { position: static; display: flex; justify-content: flex-end; transform: none; margin-top: 12px; gap: 10px; }
.obx-tool-dialog#obxComposeDialog .wall-composer-icon-btn { width: 44px; height: 44px; border-radius: 50%; box-shadow: none; background: #eef2f5; animation: none; backdrop-filter: none; will-change: auto; }
.obx-tool-dialog#obxComposeDialog .wall-composer-submit { background: #167e93; color: #fff; }
.obx-tool-dialog#obxComposeDialog .wall-composer-submit:is(:hover, :focus-visible) { background: #11687b; box-shadow: none; }
.obx-tool-dialog#obxComposeDialog .wall-composer-icon-btn:focus-visible { outline: 3px solid #168baf; outline-offset: 4px; }
.obx-tool-dialog#obxComposeDialog .wall-composer-submit::before, .obx-tool-dialog#obxComposeDialog .wall-composer-submit::after { display: none; }
.obx-tool-dialog#obxComposeDialog .wall-composer-preview, .obx-tool-dialog#obxComposeDialog .wall-composer-progress, .obx-tool-dialog#obxComposeDialog .wall-composer-status { margin-left: 0; margin-right: 0; }
.obx-tool-dialog#obxComposeDialog .wall-composer-preview { border-radius: 8px; }

@media (max-width: 600px) {
  .obx-home-tools .brand { padding-left: 10px; }
  .obx-home-tools .nav-right { gap: 6px; }
  .obx-tool-dialog { padding: 20px; width: calc(100% - 24px); max-height: calc(100dvh - 32px); }
  .obx-tool-heading { margin-bottom: 20px; gap: 12px; }
  .obx-tool-heading h2 { font-size: 22px; }
  .obx-search-dialog { width: calc(100% - 24px); padding: 6px; margin-top: 68px; max-height: calc(100dvh - 84px); }
  .obx-search-dialog .obx-tool-heading h2 { font-size: 24px; }
  .obx-search-form { gap: 10px; min-height: 60px; padding: 6px 8px 6px 16px; }
  .obx-search-form input { font-size: 16px; }
  .obx-search-form > svg { width: 20px; height: 20px; }
  .obx-search-explore { margin: 24px 8px 0; }
  .obx-search-links { column-gap: 16px; }
  .obx-search-links a { font-size: 14px; gap: 8px; }
  .obx-search-browse { gap: 4px 20px; margin-top: 18px; padding-top: 14px; }
  .obx-post-options { gap: 6px; }
  .obx-post-options a, .obx-post-options button { padding: 12px 8px; gap: 8px; }
  .obx-post-option-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .obx-post-options small { font-size: 11px; }
  #obxWeatherDialog .wx-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 106px; }
  .obx-post-button { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 360px) {
  .obx-home-tools .brand-ledger { font-size: 10px; }
  .obx-home-tools .nav-right { right: 8px; gap: 4px; }
  .obx-post-options { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 500px) {
  .obx-search-dialog { margin-top: 16px; max-height: calc(100dvh - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .obx-nav-tool, .obx-tool-dialog *, .obx-post-button { transition: none !important; scroll-behavior: auto !important; }
}
/* Hidden owner navigation must win over the menu's grid display rule. */
[data-obx-my-business][hidden] { display: none !important; }
