.generator-mode-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  margin: 0;
  width: 640px;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  overflow: visible;
  padding: 20px 24px;
  border: 1px solid #dfe6e8;
  border-radius: 26px;
  background: #fff;
  color: #101b34;
  font-family: var(--font-ui, Arial, sans-serif);
  text-align: left;
  box-shadow: 0 24px 90px #102d3538;
  isolation: isolate;
}
.generator-mode-dialog::backdrop { background: #162b3b70; backdrop-filter: blur(7px); }
.generator-mode-dialog [hidden] { display: none !important; }
.generator-mode-dialog .generator-mode-close { position: absolute; z-index: 2; right: 14px; top: 14px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font: 300 30px/1 Arial, sans-serif; cursor: pointer; }
.generator-mode-close:hover { background: #9eaab926; }
.generator-mode-brand { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; padding-right: 36px; color: #174276; font-size: 16px; font-weight: 650; }
.generator-mode-brand > span { display: block; position: relative; width: 36px; height: 38px; overflow: hidden; flex: 0 0 36px; }
.generator-mode-brand img { display: block; width: 120px; height: 38px; object-fit: contain; }
.generator-mode-dialog h2 { margin: 0 0 8px; color: inherit; font: 700 24px/1.2 var(--font-ui, Arial, sans-serif); letter-spacing: -.65px; }
.generator-mode-dialog > p { margin: 0 0 16px; color: #61728d; font-size: 14px; line-height: 1.45; }
.generator-mode-dialog .generator-mode-loading-vinyl { --am-vinyl-size: 72px; margin: 22px auto 24px; }
.generator-mode-dialog[aria-busy="true"] { text-align: center; }
.generator-mode-dialog[aria-busy="true"] .generator-mode-brand { justify-content: center; padding-right: 0; }
.generator-mode-dialog[aria-busy="true"] > p { margin-bottom: 8px; }
.generator-mode-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.generator-mode-choices a { display: flex; flex-direction: column; align-items: stretch; min-width: 0; gap: 8px; padding: 14px 16px; border: 1px solid #e5e9ec; border-radius: 18px; background: #fff; color: #101b34; text-align: left; text-decoration: none; box-shadow: 0 10px 24px #13292f10; transition: border-color .15s, box-shadow .15s; }
.generator-mode-choices a:hover { border-color: #54c48e; box-shadow: 0 10px 26px #0a805422; }
.generator-choice-icon { display: grid; place-items: center; width: 76px; height: 76px; max-width: 100%; align-self: center; margin: 0 0 6px; border-radius: 50%; background: #eaf9f2; color: #009853; }
.generator-choice-icon svg { width: 72%; height: 72%; }
.generator-mode-choices strong { font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -.35px; }
.generator-choice-copy { display: grid; gap: 8px; min-width: 0; }
.generator-choice-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.generator-mode-choices small { display: block; color: #7186a4; font-size: 13px; line-height: 1.45; }
.generator-choice-badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border: 1px solid #bdf0d9; border-radius: 999px; background: #e9fbf2; color: #00a94f; font-size: 10px; font-weight: 700; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.generator-choice-arrow { width: 13px; height: 20px; align-self: flex-end; margin-top: auto; flex-shrink: 0; }
.generator-choice-cta { display: none; }
.generator-mode-dialog > .generator-mode-footnote { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #f7f9fa; color: #344d61; font-size: 12px; }
.generator-mode-footnote svg { width: 21px; height: 21px; flex: 0 0 21px; color: #00a259; }
.generator-mode-dialog :is(a, button):focus-visible { outline: 3px solid #2cbe7a; outline-offset: 3px; }
.generator-mode-choices .generator-choice-examples { border-color: #c5efdc; background: linear-gradient(150deg, #edf9f2, #e2f6eb); }
.generator-choice-examples .generator-choice-badge { border-color: #97ecc6; background: #dcfaeb; }
.generator-mode-choices .generator-choice-advanced { border-color: #e5d8ff; background: #f8f4ff; }
.generator-mode-choices .generator-choice-advanced:hover { border-color: #b38af6; box-shadow: 0 10px 26px #8350ca18; }
.generator-choice-advanced .generator-choice-icon { color: #8c40ff; background: #eee4ff; }
.generator-choice-advanced .generator-choice-badge { border-color: #d0b4ff; background: #f0e7ff; color: #8a3fff; }
.generator-example-art { display: block; position: relative; align-self: center; width: 84px; max-width: 100%; height: 76px; margin-bottom: 6px; }
.generator-example-art i { position: absolute; left: 50%; top: 6px; width: 50px; height: 62px; border-radius: 8px; background: url('/gift-style-assets/nostalgic.webp') center / cover; box-shadow: 0 6px 10px #172a3930; transform: translateX(-62%) rotate(-14deg); }
.generator-example-art i:nth-child(2) { background-image: url('/gift-style-assets/puternic.webp'); transform: translateX(-32%) rotate(13deg); }
.generator-example-art i:nth-child(3) { background-image: url('/gift-style-assets/dor.webp'); transform: translateX(-50%); top: 0; }
.generator-example-art b { display: grid; place-items: center; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border: 1px solid #b6e7ce; border-radius: 50%; background: #fff; color: #00a75a; box-shadow: 0 3px 8px #185f3520; }
.generator-example-art svg { width: 21px; height: 21px; }
html:has(.generator-mode-dialog[open]) { overflow: hidden; }
/* Keep the composition intact; scale the complete dialog to the viewport. */
.generator-mode-dialog {
  transform: translate(-50%, -50%) scale(var(--generator-mode-scale, .85));
  transform-origin: center;
}

/* Desktop cards mirror the centered composition and pill actions. */
@media (min-width: 601px) {
  .generator-mode-choices { gap: 10px; }
  .generator-mode-choices a { padding: 14px 10px 10px; border-radius: 14px; text-align: center; }
  .generator-choice-copy { gap: 6px; }
  .generator-choice-heading { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
  .generator-mode-choices small { min-height: 36px; font-size: 12px; line-height: 1.5; letter-spacing: -.2px; text-wrap: balance; }
  .generator-choice-badge { padding: 4px 10px; border-color: transparent; background: #d9f5e8; font-size: 11px; }
  .generator-choice-examples .generator-choice-badge { border-color: transparent; background: #bcefd9; }
  .generator-choice-advanced .generator-choice-badge { border-color: transparent; background: #e3d3ff; }
  .generator-choice-arrow { display: none; }
  .generator-choice-cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin-top: auto; padding: 0 16px; border: 1px solid #e1e7ec; border-radius: 999px; background: #fff; color: #101b34; box-shadow: 0 3px 8px #1e3d5410; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
  .generator-choice-cta > span:last-child { font-size: 23px; font-weight: 400; line-height: 1; }
  .generator-choice-examples .generator-choice-cta { border-color: transparent; background: linear-gradient(110deg, #00b869, #00964c); color: #fff; box-shadow: none; }
  .generator-mode-dialog > .generator-mode-footnote { color: #61728d; }
}

/* Keep the existing mobile dialog size, with three horizontal choices. */
@media (max-width: 600px) {
  .generator-mode-dialog { width: min(440px, calc(100% - 24px)); padding: 16px; border-radius: 20px; transform: translate(-50%, -50%); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
  .generator-mode-dialog:not([aria-busy="true"]) { min-height: min(443px, calc(100dvh - 24px)); }
  .generator-mode-brand { margin-bottom: 10px; font-size: 16px; }
  .generator-mode-close { color: #52657c; }
  .generator-mode-dialog h2 { max-width: none; font-size: clamp(19px, 5.5vw, 23px); letter-spacing: -.65px; }
  .generator-mode-dialog > p { margin-bottom: 12px; font-size: 13px; }
  .generator-mode-choices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .generator-mode-choices a { display: grid; grid-template-columns: 50px minmax(0, 1fr) 10px; align-items: center; min-height: 76px; padding: 10px; gap: 9px; border-radius: 14px; }
  .generator-choice-copy { gap: 6px; }
  .generator-choice-heading { column-gap: 6px; row-gap: 4px; }
  .generator-mode-choices strong { font-size: 14px; line-height: 1.25; letter-spacing: -.5px; }
  .generator-choice-badge { padding: 3px 7px; font-size: 9px; letter-spacing: -.15px; }
  .generator-mode-choices small { font-size: 12px; line-height: 1.4; }
  .generator-mode-choices .generator-choice-icon { width: 50px; height: 50px; margin: 0; }
  .generator-example-art { width: 50px; height: 50px; margin: 0; }
  .generator-example-art i { top: 5px; height: 40px; width: 32px; border-radius: 6px; }
  .generator-example-art b { width: 25px; height: 25px; }
  .generator-example-art svg { width: 16px; height: 16px; }
  .generator-choice-arrow { align-self: center; width: 10px; height: 18px; margin: 0; }
  .generator-mode-dialog > .generator-mode-footnote { margin-top: 12px; padding: 8px; font-size: 11px; color: #7186a4; }
}
@media (max-width: 359px) {
  .generator-mode-dialog { padding: 12px; }
  .generator-mode-choices a { grid-template-columns: 44px minmax(0, 1fr) 8px; padding: 10px 8px; gap: 8px; }
  .generator-mode-choices .generator-choice-icon { width: 44px; height: 44px; }
  .generator-example-art { width: 44px; }
  .generator-mode-choices strong { font-size: 13px; }
  .generator-choice-badge { padding: 3px 6px; font-size: 8px; }
}
