/* Stage one brand roles only. Status, charts, map layers and editor axes stay owned by each app. */
body[data-setsu-stage1]{--setsu-primary:#2563eb;--setsu-hover:#1d4ed8;--setsu-pale:#eff6ff;--setsu-text:#1e293b;--setsu-bg:#fff;--setsu-global-height:42px;--accent:#2563eb;--accent-dark:#1d4ed8;--soft:#eff6ff;--portal-accent:#2563eb;--portal-ink:#1e293b;--primary-color:#2563eb;--color-primary:#2563eb;--color-primary-dark:#1d4ed8;--color-primary-light:#eff6ff;--reading-green:#2563eb;--reading-green-deep:#1d4ed8;--reading-ink:#1e293b;--reading-text:#1e293b;--reading-paper:#fff;--reading-wash:#eff6ff;color:var(--setsu-text);background:var(--setsu-bg)}
#setsu-global-nav{position:sticky;top:0;z-index:1500;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:16px;min-height:42px;padding:6px 18px;border-bottom:1px solid #cbd5e1;background:#fff;color:#1e293b;font:13px/1.5 system-ui,sans-serif;isolation:isolate}
#setsu-global-nav *{box-sizing:border-box}#setsu-global-nav a{color:#2563eb;text-decoration:underline;text-underline-offset:3px;font-weight:600}#setsu-global-nav .setsu-global-current{color:#1e293b;flex:1}#setsu-global-nav .setsu-global-home{font-size:12px}#setsu-global-nav button{font:inherit;font-weight:600;min-height:32px;padding:5px 10px;border:1px solid #2563eb;border-radius:6px;color:#2563eb;background:white;cursor:pointer}#setsu-global-nav button:hover{color:white;background:#1d4ed8}#setsu-global-nav :is(a,button):focus-visible,#setsu-global-dialog :is(a,button):focus-visible{outline:3px solid #1d4ed8;outline-offset:3px}
#setsu-global-dialog{box-sizing:border-box;position:fixed;inset:calc(var(--setsu-global-height,42px) + 10px) 12px auto auto;margin:0;width:340px;max-width:calc(100vw - 24px);max-height:calc(100dvh - var(--setsu-global-height,42px) - 24px);padding:18px;border:1px solid #94a3b8;border-radius:10px;overflow:auto;background:white;color:#1e293b;box-shadow:0 16px 40px #1e293b30;font:14px/1.6 system-ui,sans-serif}#setsu-global-dialog::backdrop{background:#0f172a66}#setsu-global-dialog header{position:static!important;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:0 0 12px!important;background:white!important;color:#1e293b!important;border-bottom:1px solid #cbd5e1}#setsu-global-dialog h2{margin:0;font:700 18px/1.4 system-ui,sans-serif;color:#1e293b}#setsu-global-dialog button{min-width:44px;min-height:44px;border:1px solid #94a3b8;border-radius:6px;background:white;color:#1e293b;font:inherit;cursor:pointer}#setsu-global-dialog ul{list-style:none;padding:8px 0 0;margin:0;display:grid;gap:3px}#setsu-global-dialog li{margin:0;padding:0}#setsu-global-dialog a{display:block;min-height:44px;padding:10px;border-radius:5px;color:#2563eb;font-weight:600;text-decoration:none;background:#fff}#setsu-global-dialog a:hover,#setsu-global-dialog a[aria-current=page]{background:#eff6ff;color:#1d4ed8}

/* Photo presentation only: React editor, upload handlers and data APIs are unchanged. */
body[data-setsu-site=photo] .MuiAppBar-colorPrimary{background:#2563EB!important;background-image:none!important;color:#fff!important}
body[data-setsu-site=photo] .MuiAppBar-positionFixed{top:var(--setsu-global-height,51px)}
body[data-setsu-site=photo] .MuiButton-containedPrimary:not(.Mui-disabled){background:#2563EB!important;background-image:none!important;color:#fff!important}
body[data-setsu-site=photo] .MuiButton-containedPrimary:not(.Mui-disabled):hover{background:#1D4ED8!important}
body[data-setsu-site=photo] :is(.MuiButton-textPrimary,.MuiButton-outlinedPrimary,.MuiTab-textColorPrimary.Mui-selected):not(.Mui-disabled){color:#2563EB!important}
body[data-setsu-site=photo] .MuiAppBar-root :is(.MuiButton-textPrimary,.MuiButton-outlinedPrimary):not(.Mui-disabled){color:#fff!important;border-color:#ffffff80!important}
body[data-setsu-site=photo] .MuiAppBar-root :is(.MuiButton-textPrimary,.MuiButton-outlinedPrimary):not(.Mui-disabled):hover{background:#1D4ED8!important}
body[data-setsu-site=photo] .MuiTabs-indicator{background:#2563EB!important}
body[data-setsu-site=photo] .MuiFab-primary{background:#2563EB!important;background-image:none!important;color:#fff!important}
body[data-setsu-site=photo] .MuiFab-primary:hover{background:#1D4ED8!important}
#setsu-global-nav a{display:inline-flex;flex:0 1 auto;width:auto;white-space:nowrap;align-items:center;min-height:32px}
@media(max-width:700px){#setsu-global-nav{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px;padding:5px 12px;font-size:13px;justify-content:space-between;min-height:50px}#setsu-global-nav>a{min-height:40px}#setsu-global-nav .setsu-global-home{display:none}#setsu-global-nav button{min-height:40px}#setsu-global-nav .setsu-global-current{display:none}}
@media print{#setsu-global-nav,#setsu-global-dialog{display:none!important}}


/* Single native top bar — 20261027. */
/* One native header; the shared script adds only this service-menu control. */
body[data-setsu-single-header="true"]{--setsu-global-height:0px;--setsu-single-height:64px}
body[data-setsu-single-header="true"] #setsu-global-nav{position:fixed;inset:10px 12px auto auto;z-index:1501;display:block;box-sizing:border-box;width:44px;height:44px;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
body[data-setsu-single-header="true"] #setsu-global-nav .setsu-service-toggle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:44px;height:44px;min-height:44px;margin:0;padding:3px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#2563eb;font:600 9px/1.1 system-ui,sans-serif;cursor:pointer}
body[data-setsu-single-header="true"] #setsu-global-nav .setsu-service-toggle svg{display:block;width:19px;height:19px;flex:none}
body[data-setsu-single-header="true"] #setsu-global-nav .setsu-service-toggle:hover{background:#eff6ff;color:#1d4ed8;border-color:#2563eb}
body[data-setsu-single-header="true"] #setsu-global-dialog{inset:74px 12px auto auto;max-height:calc(100dvh - 88px)}
body[data-setsu-single-header="true"] :is(main section[id],main h2[id],main h3[id]){scroll-margin-top:80px}
@media print{body[data-setsu-single-header="true"] #setsu-global-nav,body[data-setsu-single-header="true"] #setsu-global-dialog{display:none!important}}

/* Photo keeps its React-owned AppBar and controls in one 64px header.
   The 68px end inset reserves the 44px service control, its 12px edge inset,
   and a 12px gap. Action overflow remains scrollable and keyboard reachable. */
body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root {
  position: sticky !important;
  top: 0 !important;
  inset-inline: 0;
  width: 100%;
  height: var(--setsu-single-height, 64px) !important;
  min-height: var(--setsu-single-height, 64px) !important;
  flex-shrink: 0;
  z-index: 1100;
}

body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
  height: var(--setsu-single-height, 64px) !important;
  min-height: var(--setsu-single-height, 64px) !important;
  max-height: var(--setsu-single-height, 64px) !important;
  padding: 0 68px 0 16px !important;
}

body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root > .MuiTypography-h6,
body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root > .MuiBox-root:first-child .MuiTypography-h6 {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root > .MuiBox-root:last-child {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: calc(100% - 64px);
  min-height: 48px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-padding-inline: 4px;
}

body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root :is(.MuiButton-root, .MuiIconButton-root) {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  white-space: nowrap;
}

@media (max-width: 700px) {
  body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root {
    gap: 4px;
    padding-inline-start: 12px !important;
  }

  body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root > .MuiTypography-h6,
  body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root > .MuiBox-root:first-child .MuiTypography-h6 {
    font-size: clamp(14px, 4.4vw, 18px);
    letter-spacing: 0;
  }

  body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root > .MuiBox-root:last-child {
    gap: 0;
  }

  body[data-setsu-single-header][data-setsu-site=photo] #root .MuiAppBar-root > .MuiToolbar-root .MuiIconButton-root {
    width: 44px;
    padding: 10px;
  }
}

body[data-setsu-single-header="true"][data-setsu-site=photo] #setsu-global-nav{z-index:1101}
