/* The install guide is independent of the account and administrator layouts. */
.app-install-dialog {
  --install-gap: 16px;
  --install-height: calc(100vh - var(--install-gap) * 2 - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  position: fixed;
  inset: 0;
  width: min(600px, calc(100vw - var(--install-gap) * 2 - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-width: none;
  max-height: var(--install-height);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: visible;
  background: transparent;
  color: #17384b;
  box-shadow: none;
  text-align: left;
  font: 15px/1.6 Inter, Arial, sans-serif;
  color-scheme: light;
}
.app-install-dialog:not([open]),
.app-install-dialog [hidden] { display: none !important; }
.app-install-dialog,
.app-install-dialog * { box-sizing: border-box; }
.app-install-dialog::backdrop {
  background: rgb(9 35 53 / 62%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.app-install-dialog .install-guide-surface {
  position: relative;
  min-width: 0;
  width: 100%;
  max-height: var(--install-height);
  padding: 28px;
  border: 1px solid #d8e5ed;
  border-radius: inherit;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 20px;
  background: linear-gradient(150deg, #f3fbff 0, #fff 180px);
  box-shadow: 0 28px 90px rgb(7 35 53 / 26%);
  -webkit-overflow-scrolling: touch;
}
.app-install-dialog .install-guide-surface > * { min-width: 0; }
.app-install-dialog p,
.app-install-dialog h2,
.app-install-dialog strong,
.app-install-dialog label { overflow-wrap: anywhere; }
.app-install-dialog p { margin: 0; color: #526c7e; font-size: 14px; line-height: 1.65; }
.app-install-dialog .install-guide-close:first-child {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  margin: -8px -8px 0 12px;
  padding: 0;
  border: 1px solid #d7e5ed;
  border-radius: 50%;
  background: #f1f7fa;
  color: #31556a;
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}
.app-install-dialog .install-guide-close:first-child:hover { background: #e5f1f7; }
.app-install-dialog .install-guide-brand {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 0 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(22 116 157 / 16%);
}
.app-install-dialog .install-guide-brand img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }
.app-install-dialog .install-guide-kicker { margin: 0 0 7px; color: #147da3; font-size: 11px; font-weight: 800; letter-spacing: .1em; line-height: 1.5; }
.app-install-dialog #install-guide-title { clear: both; margin: 0 0 12px; color: #17384b; font-size: clamp(24px, 5vw, 31px); font-weight: 750; line-height: 1.18; letter-spacing: -.6px; }
.app-install-dialog #install-guide-description { margin-bottom: 20px; font-size: 15px; }
.app-install-dialog #install-guide-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #b9dfe8;
  border-radius: 12px;
  background: #edf9fb;
  color: #255a6d;
}
.app-install-dialog .install-guide-browser,
.app-install-dialog .install-guide-address { display: grid; gap: 7px; min-width: 0; }
.app-install-dialog .install-guide-browser { margin: 0 0 18px; }
.app-install-dialog .install-guide-address { margin-top: 18px; }
.app-install-dialog .install-guide-browser label,
.app-install-dialog .install-guide-address label { color: #35576b; font-size: 12px; font-weight: 700; line-height: 1.5; }
.app-install-dialog .install-guide-browser select,
.app-install-dialog .install-guide-address input {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #c7d9e4;
  border-radius: 10px;
  background: #fff;
  color: #26495e;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
.app-install-dialog .install-guide-browser select { padding-right: 30px; }
.app-install-dialog .install-guide-address input { background: #f6f9fb; text-overflow: ellipsis; }
.app-install-dialog .install-guide-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.app-install-dialog .install-guide-steps > li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e0ebf1;
  border-radius: 14px;
  background: #f5f9fc;
}
.app-install-dialog .install-guide-steps > li > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #167fa6;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.app-install-dialog .install-guide-steps > li > div { min-width: 0; }
.app-install-dialog .install-guide-steps strong { display: block; margin: 2px 0 4px; color: #264b60; font-size: 14px; font-weight: 750; line-height: 1.5; }
.app-install-dialog .install-guide-steps p { font-size: 13px; }
.app-install-dialog #install-guide-note { margin-top: 16px; padding: 12px 14px; border: 1px solid #ecdfbd; border-radius: 12px; background: #fff9eb; color: #6d603d; font-size: 13px; }
.app-install-dialog .install-guide-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 20px; }
.app-install-dialog .install-guide-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  max-width: 100%;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid #c9dce6;
  border-radius: 11px;
  background: #fff;
  color: #31576c;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.app-install-dialog .install-guide-actions #install-guide-copy { border-color: #117fa6; background: #117fa6; color: #fff; }
.app-install-dialog .install-guide-actions button:hover { background: #edf5f9; }
.app-install-dialog .install-guide-actions #install-guide-copy:hover { background: #0d6c8e; }
.app-install-dialog :is(button, select, input, a):focus-visible { outline: 3px solid #26a7d1; outline-offset: 3px; }
.app-install-dialog .install-guide-actions button:disabled { border-color: #d5e1e7; background: #eaf0f4; color: #617788; cursor: wait; }

/* The same surface is used when a browser does not implement HTMLDialogElement. */
body.install-guide-open { overflow: hidden; }
.app-install-dialog.install-dialog-fallback[open] {
  z-index: 10000;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: calc(var(--install-gap) + env(safe-area-inset-top, 0px)) calc(var(--install-gap) + env(safe-area-inset-right, 0px)) calc(var(--install-gap) + env(safe-area-inset-bottom, 0px)) calc(var(--install-gap) + env(safe-area-inset-left, 0px));
  border-radius: 0;
  isolation: isolate;
}
.app-install-dialog.install-dialog-fallback::before { position: fixed; inset: 0; z-index: -1; background: rgb(9 35 53 / 62%); content: ''; }
.app-install-dialog.install-dialog-fallback .install-guide-surface { width: min(600px, 100%); min-height: 0; border-radius: 24px; }

@supports (height: 100dvh) {
  .app-install-dialog { --install-height: calc(100dvh - var(--install-gap) * 2 - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
}

@media screen and (max-width: 480px) {
  .app-install-dialog { --install-gap: 10px; border-radius: 20px; }
  .app-install-dialog .install-guide-surface { padding: 22px 18px; }
  .app-install-dialog .install-guide-brand { width: 52px; height: 52px; border-radius: 15px; margin-bottom: 16px; }
  .app-install-dialog .install-guide-steps > li { gap: 10px; padding: 12px; }
  .app-install-dialog .install-guide-actions { grid-template-columns: minmax(0, 1fr); }
  .app-install-dialog.install-dialog-fallback .install-guide-surface { border-radius: 20px; }
}
@media screen and (max-height: 540px) {
  .app-install-dialog { --install-gap: 8px; }
  .app-install-dialog .install-guide-surface { padding: 20px; }
  .app-install-dialog .install-guide-brand { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 12px; }
  .app-install-dialog #install-guide-title { font-size: 25px; }
  .app-install-dialog #install-guide-description { margin-bottom: 14px; }
}
@media (forced-colors: active) {
  .app-install-dialog .install-guide-surface,
  .app-install-dialog .install-guide-steps > li { border-color: CanvasText; }
  .app-install-dialog .install-guide-steps > li > span { border: 1px solid CanvasText; }
  .app-install-dialog .install-guide-brand { box-shadow: none; }
}
@media print { .app-install-dialog { display: none !important; } }
