#jy-pwa {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #173046;
  font-size: 14px;
  line-height: 1.5;
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1000;
  max-width: calc(100vw - 32px);
}

#jy-pwa *,
#jy-pwa-notices *,
#jy-install-dialog * { box-sizing: border-box; }
#jy-pwa [hidden],
#jy-pwa-notices [hidden],
#jy-install-dialog [hidden] { display: none !important; }

.jy-pwa-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid #d8e3ea;
  background: #fff;
  color: #173046;
  padding: 8px 14px 8px 8px;
  border-radius: 13px;
  box-shadow: 0 4px 20px #0c1f3312;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.jy-pwa-launch img { width: 30px; height: 30px; border-radius: 8px; }
#jy-pwa-notices { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 2000; width: min(360px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; font: 14px/1.5 "Segoe UI", "Microsoft YaHei", sans-serif; }
.jy-pwa-notice { background: #fff; color: #172033; padding: 20px; border: 1px solid #d5ddea; border-radius: 20px; box-shadow: 0 14px 40px rgb(26 49 90 / .18); }
.jy-pwa-notice + .jy-pwa-notice:not([hidden]) { margin-top: 10px; }
.jy-notice-title { display: block; margin-bottom: 6px; font-size: 16px; color: #172033; }
.jy-pwa-notice p { margin: 0 0 10px; font-size: 13px; line-height: 1.65; }
.jy-pwa-notice p:last-child { margin-bottom: 0; }
.jy-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.jy-pwa-notice button { font: inherit; font-size: 13px; font-weight: 600; min-height: 38px; border: 1px solid #3b5bdb; border-radius: 10px; padding: 7px 15px; cursor: pointer; background: #3b5bdb; color: #fff; }
.jy-pwa-notice button.jy-quiet { background: #f7f9fe; border-color: #d5ddea; color: #3e4a63; }

#jy-install-dialog {
  border: 1px solid #dce4e8;
  border-radius: 24px;
  padding: 28px;
  width: min(440px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 24px));
  overflow: auto;
  color: #173046;
  background: #fff;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  box-shadow: 0 24px 80px #0c1f3333;
}

#jy-install-dialog::backdrop { background: #071c3299; }
#jy-install-dialog .jy-dialog-top { display: flex; justify-content: space-between; align-items: flex-start; }
#jy-install-dialog .jy-dialog-top img { width: 64px; height: 64px; border-radius: 16px; }
#jy-install-dialog h2 { font-size: 25px; letter-spacing: 1px; margin: 18px 0 8px; }
#jy-install-dialog p { font-size: 14px; line-height: 1.7; color: #607185; }
#jy-install-dialog .jy-kicker { font-size: 11px; color: #147c68; letter-spacing: 2px; margin: 18px 0 0; }
#jy-install-dialog .jy-install-status { display: inline-block; margin: 2px 0 6px; padding: 5px 9px; border-radius: 999px; color: #0b725f; background: #e6f8f3; font-size: 12px; font-weight: 700; }
#jy-install-dialog #jy-install-instructions { margin: 8px 0; }
#jy-install-dialog .jy-install-steps { margin: 10px 0 4px; padding-left: 26px; color: #344d61; font-size: 14px; line-height: 1.7; }
#jy-install-dialog .jy-install-steps:empty { display: none; }
#jy-install-dialog .jy-install-steps li { padding-left: 3px; margin: 5px 0; }
#jy-install-dialog .jy-close { font: inherit; background: #f0f4f6; color: #40576a; border: 0; border-radius: 50%; height: 38px; width: 38px; cursor: pointer; }
#jy-install-dialog .jy-install-actions { display: grid; gap: 9px; margin-top: 16px; }
#jy-install-dialog .jy-install-action,
#jy-install-dialog .jy-browser-action,
#jy-install-dialog .jy-copy-action { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 0; border-radius: 10px; padding: 12px 14px; font: inherit; font-weight: 700; text-align: center; cursor: pointer; text-decoration: none; }
#jy-install-dialog .jy-install-action,
#jy-install-dialog .jy-browser-action { background: #0c1f33; color: #fff; }
#jy-install-dialog .jy-copy-action { border: 1px solid #ccd9e1; background: #f5f8fa; color: #173046; }
#jy-install-dialog .jy-install-action:disabled { opacity: .6; cursor: wait; }
#jy-install-dialog .jy-install-feedback { margin: 10px 0 0; color: #147c68; font-weight: 600; overflow-wrap: anywhere; }
#jy-install-dialog .jy-install-feedback:empty { display: none; }
#jy-install-dialog .jy-note { font-size: 12px; padding-top: 14px; margin: 16px 0 0; border-top: 1px solid #e6ecef; }
#jy-pwa button:focus-visible,
#jy-pwa-notices button:focus-visible,
#jy-install-dialog button:focus-visible,
#jy-install-dialog a:focus-visible { outline: 3px solid #25ad91; outline-offset: 3px; }

#jy-install-dialog.jy-dialog-fallback { display: block; position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); z-index: 2001; }
.jy-dialog-open::before { content: ""; position: fixed; inset: 0; background: #071c3299; z-index: 2000; }

#jy-pwa.jy-pwa-embedded { position: static; margin-top: 12px; max-width: 100%; }
.portal-user-actions #jy-pwa.jy-pwa-embedded { margin-top: 0; }
.login-panel #jy-pwa .jy-pwa-launch { box-shadow: none; background: #f5f8fa; width: 100%; }
.portal-user-actions #jy-pwa .jy-pwa-launch { box-shadow: none; }

@media (max-width: 600px) {
  #jy-pwa { bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; }
  #jy-pwa-notices { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
  .jy-pwa-launch { font-size: 13px; padding: 7px 10px 7px 7px; }
  .jy-pwa-launch img { width: 28px; height: 28px; }
  #jy-install-dialog { padding: 22px; border-radius: 20px; }
  #jy-install-dialog h2 { font-size: 23px; }
  .portal-user-actions #jy-pwa .jy-pwa-launch span { max-width: 76px; font-size: 11px; line-height: 1.3; }
  .portal-user-actions #jy-pwa .jy-pwa-launch img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #jy-install-dialog { scroll-behavior: auto; }
}

/* Legacy standalone pages use the same select surfaces as design/form-controls.css. */
/* A control has one glass surface; Fluent's nested select stays transparent. */
html body select:not([multiple]):not([size]),
html body .fui-Select {
  border: 1px solid rgba(84, 105, 155, .16) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .12) !important;
  box-shadow: none !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  color: #3E4A63 !important;
  min-height: 38px;
  padding: 8px 12px;
  font: inherit;
}
html body select:focus-visible,
html body .fui-Select:focus-within { outline: 2px solid #3B5BDB; outline-offset: 3px; }
html body select:disabled { opacity: .5; cursor: not-allowed; }
html body select option { background: #F4F6FB; color: #172033; }
html body .fui-Select { padding: 0; }
html body .fui-Select::before,
html body .fui-Select::after { display: none; }
/* This must outrank the native-select rule above, including its :not clauses. */
html body .fui-Select select:not([multiple]):not([size]) {
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  outline: none !important;
}
