html[data-aetheros-display-mode="standalone"] body {
  min-height: 100vh;
  min-height: 100dvh;
}

@media (max-width: 860px) {
  html[data-aetheros-display-mode="standalone"] .portal-shell {
    padding-top: calc(20px + env(safe-area-inset-top, 0px) + 12px);
  }

  html[data-aetheros-display-mode="standalone"] .portal-shell-community,
  html[data-aetheros-display-mode="standalone"] .agc-shell {
    padding-top: calc(28px + env(safe-area-inset-top, 0px) + 12px);
  }

  html[data-aetheros-display-mode="standalone"] .campaign-shell {
    padding-top: calc(10px + env(safe-area-inset-top, 0px) + 12px) !important;
  }
}

body {
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.aetheros-pwa-shell {
  position: fixed;
  left: max(12px, calc(env(safe-area-inset-left) + 12px));
  right: max(12px, calc(env(safe-area-inset-right) + 12px));
  bottom: max(12px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 2147482000;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.aetheros-pwa-fab {
  position: fixed;
  right: max(12px, calc(env(safe-area-inset-right) + 12px));
  bottom: max(12px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 2147481999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(158, 127, 255, 0.36);
  border-radius: 999px;
  padding: 11px 16px;
  color: #fff6ea;
  background: linear-gradient(180deg, rgba(57, 43, 79, 0.96), rgba(30, 22, 42, 0.98));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3), 0 0 26px rgba(123, 87, 222, 0.16);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.aetheros-pwa-fab[hidden] {
  display: none;
}

.aetheros-pwa-fab-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #efc671;
  font-size: 14px;
  line-height: 1;
}

.aetheros-pwa-card {
  width: min(100%, 420px);
  pointer-events: auto;
  border-radius: 18px;
  border: 1px solid rgba(158, 127, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(32, 24, 47, 0.97), rgba(14, 10, 21, 0.985)),
    linear-gradient(140deg, rgba(248, 223, 172, 0.06), transparent 25%, transparent 80%, rgba(123, 87, 222, 0.1));
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(158, 127, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #f6f0e6;
  padding: 14px 14px 12px;
  backdrop-filter: blur(14px);
}

.aetheros-pwa-card[hidden] {
  display: none;
}

.aetheros-pwa-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.aetheros-pwa-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #efc671;
  margin-bottom: 4px;
}

.aetheros-pwa-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  color: #fff6ea;
}

.aetheros-pwa-copy {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #d9cbe8;
}

.aetheros-pwa-steps {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #f3ead8;
  font-size: 13px;
  line-height: 1.45;
}

.aetheros-pwa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.aetheros-pwa-btn {
  appearance: none;
  border: 1px solid rgba(158, 127, 255, 0.32);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f7f0ff;
  background: linear-gradient(180deg, rgba(57, 43, 79, 0.96), rgba(30, 22, 42, 0.98));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.aetheros-pwa-btn.primary {
  background: linear-gradient(180deg, #9e7fff, #4e338e);
  color: #ffffff;
  border-color: rgba(158, 127, 255, 0.56);
}

.aetheros-pwa-btn.ghost {
  background: rgba(255, 255, 255, 0.02);
}

.aetheros-pwa-dismiss {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d8cae8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.aetheros-pwa-inline-note {
  margin-top: 10px;
  font-size: 12px;
  color: #b9acc8;
}

.aetheros-pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding:
    max(18px, calc(env(safe-area-inset-top) + 18px))
    max(12px, calc(env(safe-area-inset-right) + 12px))
    max(12px, calc(env(safe-area-inset-bottom) + 12px))
    max(12px, calc(env(safe-area-inset-left) + 12px));
  background: rgba(5, 5, 12, 0.58);
  backdrop-filter: blur(10px);
}

.aetheros-pwa-modal[hidden] {
  display: none;
}

.aetheros-pwa-sheet {
  width: min(100%, 460px);
  border-radius: 22px;
  border: 1px solid rgba(158, 127, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(28, 21, 40, 0.98), rgba(12, 9, 18, 0.995)),
    linear-gradient(140deg, rgba(248, 223, 172, 0.06), transparent 24%, transparent 80%, rgba(123, 87, 222, 0.1));
  color: #f6f0e6;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.aetheros-pwa-sheet-head,
.aetheros-pwa-sheet-body,
.aetheros-pwa-sheet-foot {
  padding: 16px 18px;
}

.aetheros-pwa-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aetheros-pwa-sheet-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff6ea;
  line-height: 1.05;
}

.aetheros-pwa-sheet-copy {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: #d9cbe8;
}

.aetheros-pwa-step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aetheros-pwa-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(158, 127, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.aetheros-pwa-step-num {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #9e7fff, #4e338e);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.aetheros-pwa-step-title {
  font-size: 14px;
  font-weight: 900;
  color: #fff3df;
}

.aetheros-pwa-step-copy {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: #d9cbe8;
}

.aetheros-pwa-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.aetheros-pwa-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(239, 198, 113, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #fff3df;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.aetheros-pwa-share-glyph {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 198, 113, 0.34);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
}

.aetheros-pwa-sheet-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .aetheros-pwa-fab {
    right: max(10px, calc(env(safe-area-inset-right) + 10px));
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 10px));
    padding: 10px 14px;
  }

  .aetheros-pwa-shell {
    left: max(10px, calc(env(safe-area-inset-left) + 10px));
    right: max(10px, calc(env(safe-area-inset-right) + 10px));
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 10px));
  }

  .aetheros-pwa-card {
    border-radius: 16px;
    padding: 13px 12px 12px;
  }

  .aetheros-pwa-sheet {
    border-radius: 18px;
  }
}
