/* Reuse the black/white shell; mint only signals an available reward. */
html[data-theme] #dialog.growth-dialog.level-dialog { width: min(860px, calc(100vw - 40px)); max-width: 860px; height: min(760px, calc(100dvh - 56px)); max-height: calc(100dvh - 56px); }
html[data-theme] #dialog.growth-dialog.level-success-dialog { width: min(580px, calc(100vw - 40px)); height: fit-content; max-height: calc(100dvh - 56px); }
.xl-summary { display: flex; align-items: center; gap: 26px; padding: 22px 28px 20px; flex: none; }
.xl-current-level { display: flex; flex-direction: column; gap: 3px; flex: none; }
.xl-current-level > span, .xl-next-reward > span, .xl-summary-count > span { font-size: 11px; color: var(--muted); }
.xl-current-level > strong { font-size: 31px; line-height: 1.2; letter-spacing: -.04em; font-weight: 650; }
.xl-next-reward { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.xl-next-reward button, .xl-next-reward > strong { display: flex; gap: 7px; align-items: center; padding: 0; font-size: 12px; font-weight: 500; text-align: left; }
.xl-next-reward i { font-style: normal; color: var(--muted); }
.xl-next-reward .icon { width: 12px; height: 12px; flex: none; color: var(--muted); }
.xl-next-reward button:hover { text-decoration: underline; text-underline-offset: 4px; }
.xl-summary-count { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; flex: none; }
.xl-summary-count strong { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.xl-summary-count small { font-size: 12px; font-weight: 400; color: var(--muted); }
.xl-tabs { display: flex; align-items: center; gap: 6px; padding: 0 28px 16px; flex: none; }
.xl-tabs button { padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; }
.xl-tabs button span { margin-left: 7px; font-size: 10px; font-variant-numeric: tabular-nums; }
.xl-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; }
.xl-tabs button:hover { background: var(--hover); }
html[data-theme] #dialog.growth-dialog.level-dialog > #dialogContent > .xl-body { flex: 1 1 auto; padding: 0 20px 18px; margin-top: 0; }
.xl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.xl-card { position: relative; min-width: 0; padding: 16px 20px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); scroll-margin: 14px; }
.xl-card.is-ready { border-color: var(--ink); }
.xl-card-top, .xl-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.xl-card-level { display: flex; gap: 2px; align-items: baseline; font-size: 11px; color: var(--muted); }
.xl-card-level strong { font-size: 20px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.xl-kind { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.xl-card-body { display: grid; grid-template-columns: minmax(0,1fr) 138px; align-items: center; min-height: 119px; gap: 4px; }
.xl-card-copy { min-width: 0; padding: 6px 0; }
.xl-card-copy h3 { font-size: 16px; line-height: 1.5; font-weight: 600; }
.xl-card-copy p { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 6px; max-width: 155px; }
.xl-card-copy h3.xl-credit-value { font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.xl-card-art { display: grid; place-items: center; width: 138px; height: 119px; }
.xl-card-art .pet-art { width: 138px; height: 138px; flex: none; }
/* Keep theme blending on the portrait itself. A brightness filter on its parent
   darkens the white matte and creates a gray square behind the character. */
.xl-card.is-locked .pet-art:before { filter: saturate(.6); opacity: .84; }
.xl-credit-seal { position: relative; display: grid; place-items: center; width: 65px; height: 65px; border-radius: 50%; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.xl-credit-seal:after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); border-radius: inherit; pointer-events: none; }
.xl-credit-seal .icon { width: 31px; height: 31px; }
.xl-card.is-ready .xl-credit-seal { color: var(--ink); }
.xl-card-footer { min-height: 32px; margin-top: 5px; }
.xl-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.xl-status .icon { width: 12px; height: 12px; }
.is-ready .xl-status { color: var(--activity-ink); }
.xl-card-footer .button { min-height: 32px; padding: 6px 14px; font-size: 11px; }
.xl-condition, .xl-received-note { color: var(--muted); font-size: 10px; }
.xl-view-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 5px 0; }
.xl-view-link .icon { width: 11px; height: 11px; }
.xl-footer { padding: 15px 28px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-top: 1px solid var(--line); flex: none; }
.xl-footer > span { color: var(--muted); font-size: 12px; }
.xl-footer small { display: block; margin-top: 3px; font-size: 10px; }
.xl-footer-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 0; flex: none; }
.xl-footer-link .icon { width: 13px; height: 13px; }
.xl-empty { display: flex; align-items: center; flex-direction: column; padding: 64px 16px; text-align: center; }
.xl-empty > .icon { width: 34px; height: 34px; color: var(--muted); margin-bottom: 18px; }
.xl-empty p { margin: 10px 0 24px; color: var(--muted); font-size: 13px; }
.xl-error { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; padding: 12px; background: var(--surface); border-radius: 8px; font-size: 12px; }
.xl-error > span { flex: 1; }
.xl-error button { text-decoration: underline; text-underline-offset: 3px; }
.xl-home-entry { display: flex; align-items: center; width: 100%; gap: 8px; padding: 11px 0 0; text-align: left; }
.xl-home-entry > span { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.xl-home-entry strong { font-size: 12px; font-weight: 500; }
.xl-home-entry .icon { width: 14px; height: 14px; color: var(--muted); }
.xl-home-entry > small { margin-left: auto; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl-home-entry.has-rewards > small { color: var(--activity-ink); }
.xl-home-entry:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.xl-success { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 24px 34px; }
.xl-success-level { font-size: 12px; color: var(--muted); }
.xl-success-art { width: 210px; height: 210px; display: grid; place-items: center; margin: 6px auto; animation: xl-arrive .45s ease-out both; }
.xl-success-art .pet-art { width: 100%; height: 100%; }
.xl-success-art.pose-compositor { mix-blend-mode: multiply; }
html[data-theme="dark"] .xl-success-art.pose-compositor { mix-blend-mode: lighten; }
.xl-success-art .xl-credit-seal { width: 104px; height: 104px; }
.xl-success-art .icon { width: 52px; height: 52px; }
.xl-success h3 { font-size: 22px; }
.xl-success p { margin: 12px 0 22px; color: var(--muted); font-size: 13px; }
.xl-success-rewards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.xl-success-rewards > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.xl-success-rewards .icon { width: 16px; height: 16px; color: var(--activity-ink); }
.xl-success-rewards strong { font-size: 21px; font-weight: 650; }
.xl-success-note { margin-top: 12px; font-size: 11px; color: var(--muted); }
.xl-success-actions { justify-content: space-between; }
@keyframes xl-arrive { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .xl-success-art { animation: none; } }
@media (max-width: 680px) {
  .xl-summary { padding: 18px 22px; gap: 18px; }
  .xl-tabs { padding-inline: 20px; }
  .xl-card { padding: 14px; }
  .xl-card-body { grid-template-columns: minmax(0,1fr) 105px; min-height: 116px; }
  .xl-card-art { width: 105px; height: 116px; }
  .xl-card-art .pet-art { width: 116px; height: 116px; }
  .xl-card-copy h3 { font-size: 14px; }
  .xl-card-copy p { font-size: 10px; }
}
@media (max-width: 520px) {
  html[data-theme] #dialog.growth-dialog.level-dialog { width: calc(100vw - 24px); height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); }
  .xl-summary { gap: 16px; padding: 16px 18px; }
  .xl-current-level > strong { font-size: 27px; }
  .xl-next-reward { gap: 6px; }
  .xl-next-reward button { font-size: 11px; flex-wrap: wrap; column-gap: 4px; row-gap: 0; }
  .xl-summary-count { display: none; }
  .xl-tabs { padding: 0 14px 14px; gap: 2px; }
  .xl-tabs button { padding: 7px 8px; font-size: 11px; }
  .xl-tabs button span { margin-left: 4px; }
  html[data-theme] #dialog.growth-dialog.level-dialog > #dialogContent > .xl-body { padding-inline: 10px; }
  .xl-grid { grid-template-columns: 1fr; gap: 12px; }
  .xl-card { padding: 14px 18px; }
  .xl-card-body { grid-template-columns: minmax(0,1fr) 132px; min-height: 110px; }
  .xl-card-art { width: 132px; height: 110px; }
  .xl-card-art .pet-art { width: 132px; height: 132px; }
  .xl-card-copy h3 { font-size: 16px; }
  .xl-card-copy p { font-size: 11px; }
  .xl-footer { padding: 14px 18px; }
}

/* Final two-theme portraits use the existing collection compositor. */
html .growth-themed-art { background: none; }
