/* Shared modal structure: contain page header/navigation rules inside public UI roots. */
:is(#unipayClientSettingsModal,#unipayContextHelpModal,#unipay-notification-overlay,#unipayMediaStorageRoot,#ia-up-dialog) :is(header,.unipay-settings-header,.unipay-context-help-header,.unipay-notification-header,.ums-head),
aside.unipay-notification-toast-host > section.unipay-notification-toast > header {
  position:relative!important;inset:auto!important;float:none!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;max-height:none!important;transform:none!important;box-sizing:border-box!important;
}
:is(#unipayClientSettingsModal,#unipayContextHelpModal,#unipay-notification-overlay,#unipayMediaStorageRoot,#ia-up-dialog) :is(footer,.unipay-settings-tabs,.unipay-context-help-tabs,.unipay-notification-tabs),
aside.unipay-notification-toast-host > section.unipay-notification-toast > footer {
  position:relative!important;inset:auto!important;float:none!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;transform:none!important;box-sizing:border-box!important;
}
:is(#unipayClientSettingsModal,#unipayContextHelpModal,#unipay-notification-overlay,#unipayMediaStorageRoot,#ia-up-dialog) :is(h1,h2,h3,p,label),
.unipay-notification-toast-host :is(.unipay-notification-toast-title,.unipay-notification-toast-summary,.unipay-notification-model){
  position:static!important;inset:auto!important;float:none!important;transform:none!important;writing-mode:horizontal-tb!important;min-width:0;max-width:100%;overflow-wrap:break-word;
}
.unipay-notification-toast-host{font-family:Inter,Segoe UI,system-ui,sans-serif}
.unipay-notification-toast-host .unipay-notification-toast-title{display:block!important;line-height:1.35!important;margin:8px 0 6px!important}
.unipay-notification-toast-host .unipay-notification-toast-summary{display:block!important;line-height:1.5!important;margin:0!important}
.unipay-notification-toast-host .unipay-notification-model{display:block!important;text-align:center!important}
.unipay-notification-toast-host:not(.is-system) .unipay-notification-model{display:none!important}
:is(#unipayClientSettingsModal,#unipayContextHelpModal,#unipay-notification-overlay,#unipayMediaStorageRoot,#ia-up-dialog) :is(.unipay-settings-header h2,.unipay-context-help-header h2,.unipay-notification-header h2){line-height:1.25!important;margin:4px 0!important}
:is(#unipayClientSettingsModal,#unipayContextHelpModal) :is(.unipay-settings-title-wrap,.unipay-context-help-header>div){min-width:0;flex:1 1 auto}
:is(#unipayClientSettingsModal,#unipayContextHelpModal,#unipay-notification-overlay,#unipayMediaStorageRoot,#ia-up-dialog) :is(.unipay-settings-close,[data-unipay-help-close],.unipay-notification-close){position:relative!important;inset:auto!important;flex:0 0 auto!important}

/* Visible guide target. Indicators never intercept the operation itself. */
.unipay-guided-click-target{outline:2px solid #7aecf0!important;outline-offset:4px;box-shadow:0 0 18px #46d6e677!important;animation:unipayGuideTargetPulse 2.4s ease-in-out infinite}
#unipay-guide-pointer{position:fixed;z-index:100400;display:flex;align-items:center;gap:8px;box-sizing:border-box;padding:8px 12px;border:1px solid #72dbea88;border-radius:12px;background:#082232f0;color:#e4f8fc;font:600 12px/1.35 Inter,system-ui,sans-serif;box-shadow:0 6px 24px #071d31aa;pointer-events:none;writing-mode:horizontal-tb}
#unipay-guide-pointer[hidden]{display:none!important}
#unipay-guide-pointer small{font:inherit;overflow-wrap:break-word}
.unipay-guide-arrow{color:#91fff0;font-size:21px;line-height:1}
.unipay-notification-toast-host.is-guide-lower{top:auto!important;bottom:max(96px,calc(env(safe-area-inset-bottom,0px) + 96px))!important}
@keyframes unipayGuideTargetPulse{0%,100%{outline-color:#73dfe8;box-shadow:0 0 12px #46d6e644}50%{outline-color:#ba9fff;box-shadow:0 0 22px #9d7be677}}
@media(prefers-reduced-motion:reduce){.unipay-guided-click-target{animation:none}}

/* Preserve the space assigned to the shared brand above help controls. */
#unipayContextHelpModal .unipay-context-help-panel{box-sizing:border-box!important;padding-top:clamp(80px,10vh,112px)!important}

/* R046: index.html is the common viewport contract, never the page's content box. */
html[data-unipay-shell-contract="index"] body > #unipayClientSettingsModal#unipayClientSettingsModal {
  position:fixed!important;inset:auto!important;left:calc(var(--unipay-shell-left,0px) + 5px)!important;top:calc(var(--unipay-shell-top,0px) + 78px)!important;
  width:calc(var(--unipay-shell-width,100vw) - 10px)!important;height:max(120px,calc(var(--unipay-shell-height,100dvh) - 160px))!important;
  min-width:0!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;margin:0!important;padding:clamp(10px,1.8vw,24px)!important;transform:none!important;zoom:1!important;
  align-items:center!important;justify-content:center!important;
}
html[data-unipay-shell-contract="index"] body > #unipayClientSettingsModal#unipayClientSettingsModal .unipay-settings-panel {
  width:min(1080px,100%)!important;height:min(760px,100%)!important;min-height:min(570px,100%)!important;max-width:100%!important;max-height:100%!important;box-sizing:border-box!important;
}
html[data-unipay-shell-contract="index"] body > #unipayClientSettingsModal#unipayClientSettingsModal[aria-hidden="false"] {display:flex!important;}
html[data-unipay-shell-contract="index"] body > #unipayContextHelpModal#unipayContextHelpModal[aria-hidden="false"] {display:grid!important;}
html[data-unipay-shell-contract="index"] body > #unipayContextHelpModal#unipayContextHelpModal {
  position:fixed!important;inset:auto!important;left:calc(var(--unipay-shell-left,0px) + 6px)!important;top:calc(var(--unipay-shell-top,0px) + 6px)!important;
  width:calc(var(--unipay-shell-width,100vw) - 12px)!important;height:calc(var(--unipay-shell-height,100dvh) - 12px)!important;
  min-width:0!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;margin:0!important;padding:0!important;transform:none!important;zoom:1!important;
}
html[data-unipay-shell-contract="index"] body > #unipayContextHelpModal#unipayContextHelpModal .unipay-context-help-panel {
  width:min(1120px,100%)!important;height:100%!important;min-height:0!important;max-width:100%!important;max-height:100%!important;
}
html[data-unipay-shell-contract="index"] body > #unipay-notification-overlay#unipay-notification-overlay {
  position:fixed!important;inset:auto!important;left:var(--unipay-shell-left,0px)!important;top:var(--unipay-shell-top,0px)!important;
  width:var(--unipay-shell-width,100vw)!important;height:var(--unipay-shell-height,100dvh)!important;max-width:none!important;max-height:none!important;
  box-sizing:border-box!important;margin:0!important;padding:78px 14px!important;transform:none!important;zoom:1!important;
}
html[data-unipay-shell-contract="index"] body > #unipay-notification-overlay#unipay-notification-overlay .unipay-notification-panel {
  width:min(900px,100%)!important;height:min(680px,100%)!important;min-height:min(430px,100%)!important;max-width:100%!important;max-height:100%!important;box-sizing:border-box!important;margin:0!important;
}
html[data-unipay-shell-contract="index"] body > #unipay-notification-overlay#unipay-notification-overlay.is-open .unipay-notification-panel {transform:translateY(0) scaleY(1)!important;translate:none!important;}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > #unipayClientSettingsModal#unipayClientSettingsModal {
  top:calc(var(--unipay-shell-top,0px) + 68px)!important;height:max(120px,calc(var(--unipay-shell-height,100dvh) - 144px))!important;padding:6px!important;
}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > #unipayClientSettingsModal#unipayClientSettingsModal .unipay-settings-panel {width:100%!important;height:100%!important;min-height:0!important;}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > #unipay-notification-overlay#unipay-notification-overlay {padding:58px 7px 70px!important;}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > #unipay-notification-overlay#unipay-notification-overlay .unipay-notification-panel {width:100%!important;height:100%!important;min-height:0!important;}

/* The tools and IA-UP system object stay on the same right/left rails as index. */
html[data-unipay-shell-contract="index"] body > :is(#unipayClientSettingsTrigger,#unipayContextHelpTrigger,#unipay-notification-dock) {
  position:fixed!important;top:auto!important;right:auto!important;left:calc(var(--unipay-shell-left,0px) + var(--unipay-shell-width,100vw) - 66px)!important;width:50px!important;height:50px!important;margin:0!important;zoom:1!important;
}
html[data-unipay-shell-contract="index"] body > #unipayClientSettingsTrigger {bottom:18px!important;}
html[data-unipay-shell-contract="index"] body > #unipayContextHelpTrigger {bottom:80px!important;}
html[data-unipay-shell-contract="index"] body > #unipay-notification-dock {bottom:142px!important;}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > :is(#unipayClientSettingsTrigger,#unipayContextHelpTrigger,#unipay-notification-dock) {left:calc(var(--unipay-shell-left,0px) + var(--unipay-shell-width,100vw) - 56px)!important;width:46px!important;height:46px!important;}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > #unipayClientSettingsTrigger {bottom:78px!important;}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > #unipayContextHelpTrigger {bottom:134px!important;}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > #unipay-notification-dock {bottom:190px!important;}
html[data-unipay-shell-contract="index"] > aside.unipay-notification-toast-host,
html[data-unipay-shell-contract="index"] body > aside.unipay-notification-toast-host {
  position:fixed!important;left:56px!important;right:auto!important;top:78px!important;bottom:auto!important;width:min(410px,calc(var(--unipay-shell-width,100vw) - 70px))!important;zoom:1!important;
}
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] > aside.unipay-notification-toast-host,
html[data-unipay-shell-contract="index"][data-unipay-shell-compact="true"] body > aside.unipay-notification-toast-host {top:66px!important;width:min(280px,calc(var(--unipay-shell-width,100vw) - 86px))!important;}
html[data-unipay-shell-contract="index"] > aside.unipay-notification-toast-host.is-guide-lower,
html[data-unipay-shell-contract="index"] body > aside.unipay-notification-toast-host.is-guide-lower {top:auto!important;bottom:96px!important;}
html[data-unipay-shell-contract="index"] aside.unipay-notification-toast-host,
html[data-unipay-shell-contract="index"] aside.unipay-notification-toast-host > .unipay-notification-toast {box-sizing:border-box!important;}
html[data-unipay-shell-contract="index"] aside.unipay-notification-toast-host > .unipay-notification-toast {width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;}
