.atlas-philla-embed {
  position: relative;
  box-sizing: border-box;
  width: min(720px, calc(100vw - 32px));
  height: min(840px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--atlas-line, #d9d3e4);
  border-radius: 20px;
  color: var(--atlas-fg, #28223a);
  background: var(--atlas-panel, #fcfbfe);
  box-shadow: 0 24px 64px rgb(12 6 30 / 30%);
  display: flex;
  flex-direction: column;
}
.atlas-philla-embed:not([open]) { display: none; }
.atlas-philla-embed::backdrop { background: rgb(22 14 32 / 66%); }
.atlas-philla-embed header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 50px;
  padding: 5px 16px;
  border-bottom: 1px solid var(--atlas-line, #eae5f2);
  background: var(--atlas-panel, #fff);
}
.atlas-philla-embed h2 { margin: 0; font: 750 15px/1.4 system-ui, sans-serif; letter-spacing: -.035em; }
.atlas-philla-embed-close {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--atlas-line, #e8e2f0);
  border-radius: 11px;
  color: var(--atlas-fg, #4b3d69);
  background: var(--atlas-raised, #f8f5fc);
  font: 700 12px/1.3 system-ui, sans-serif;
  cursor: pointer;
  order: -1;
}
.atlas-philla-embed-close:hover { border-color: var(--atlas-gold, #8e65df); }
.atlas-philla-embed-close:focus-visible,
.atlas-philla-embed-fallback:focus-visible { outline: 3px solid #8e65df; outline-offset: 2px; }
.atlas-philla-embed-status { margin: 0; padding: 10px 16px; font: 500 13px/1.5 system-ui, sans-serif; color: var(--atlas-muted, #61556f); }
.atlas-philla-embed-status[hidden] { display: none; }
.atlas-philla-embed iframe { display: block; flex: 1; min-height: 0; width: 100%; border: 0; background: transparent; }
.atlas-philla-embed-fallback { display: inline-block; margin: 6px 18px 14px; font-size: 13px; color: inherit; }
.atlas-philla-embed-fallback[hidden] { display: none; }
.atlas-story-manage-dialog { height: min(460px, calc(100dvh - 32px)); }
.atlas-philla-embed-leave {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  background: rgb(22 14 32 / 82%);
}
.atlas-philla-embed-leave[hidden] { display: none; }
.atlas-philla-embed-leave p {
  box-sizing: border-box;
  width: min(100%, 400px);
  margin: 0;
  padding: 24px;
  border-radius: 16px;
  color: #28223a;
  background: #fff;
  font: 600 16px/1.5 system-ui, sans-serif;
}
.atlas-philla-embed-leave div { display: flex; gap: 10px; }
.atlas-philla-embed-leave button {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid #d9cfe8;
  border-radius: 12px;
  background: #fff;
  color: #28223a;
  font: 700 14px/1.4 system-ui, sans-serif;
  cursor: pointer;
}
.atlas-philla-embed-leave button:first-child { background: #f4c296; border-color: #f4c296; }
@media (max-width: 600px) {
  .atlas-philla-embed {
    position: fixed;
    inset: auto 0 0;
    width: 100vw;
    height: calc(100dvh - env(safe-area-inset-top) - 8px);
    margin: 0;
    border: 0;
    border-radius: 20px 20px 0 0;
  }
  .atlas-philla-embed header { min-height: 48px; padding: 2px 12px; }
  .atlas-philla-embed h2 { font-size: 14px; }
  .atlas-story-manage-dialog { height: min(460px, calc(100dvh - env(safe-area-inset-top) - 8px)); }
}
