/* Royal Emerald V2: scoped display-only celebration. */
body.golden-open { overflow: hidden; }
.golden-overlay {
  box-sizing: border-box; position: fixed; inset: 0; width: 100vw; max-width: none;
  height: 100vh; height: 100dvh; max-height: none; margin: 0; border: 0;
  padding: max(28px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 40%,#103e30d9 0%,#061713f2 52%,#050a0af7 100%);
  color: #f4f3eb; color-scheme: dark; font-family: inherit; overflow: auto; text-align: center;
}
.golden-overlay:not([open]),.golden-overlay [hidden] { display: none !important; }
.golden-overlay[open] { display: grid; place-items: center; }
.golden-overlay::backdrop { background: #040b0be8; }
.golden-overlay * { box-sizing: border-box; }
.golden-atmosphere { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.golden-atmosphere::before { content: ''; position: absolute; width: 105vmax; height: 105vmax; left: calc(50% - 52.5vmax); top: calc(45% - 52.5vmax); background: conic-gradient(from 30deg,transparent 0deg,#cfb97c0b 18deg,transparent 37deg,#70c59a0b 65deg,transparent 89deg,#dec8930d 110deg,transparent 150deg,#70c59a08 200deg,transparent 240deg,#dcc1820c 270deg,transparent 310deg); animation: royal-rays 30s linear infinite; }
.golden-atmosphere::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle,#eddbac99 1px,transparent 1.6px),radial-gradient(circle,#7cb99855 1px,transparent 1.8px); background-size: 197px 163px,317px 263px; background-position: 10% 20%,80% 15%; opacity: .35; }
.golden-panel {
  position: relative; z-index: 1; width: min(100%,980px); max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px);
  margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; isolation: isolate;
  border: 1px solid #ddca9566; border-radius: 32px;
  background: radial-gradient(ellipse at 12% 35%,#1c725433,transparent 65%),linear-gradient(130deg,#0e2d24f7,#0a1918fa 64%,#122c23f7);
  box-shadow: 0 40px 100px #0009,0 0 100px #368b5b15,inset 0 1px #f2dfb721;
  animation: royal-enter .58s cubic-bezier(.16,1,.3,1) both;
}
.golden-panel::before { content: ''; position: absolute; inset: 10px; border: 1px solid #d7c39419; border-radius: 24px; pointer-events: none; z-index: -1; }
.golden-panel::after { content: ''; position: absolute; left: 15%; right: 15%; top: 0; height: 1px; background: linear-gradient(90deg,transparent,#f1dca5,transparent); pointer-events: none; }
.golden-topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 32px 18px; text-align: start; }
.golden-wordmark { display: flex; align-items: center; gap: 10px; color: #f2ead8; font-size: 13px; font-weight: 650; letter-spacing: .08em; direction: ltr; }
.golden-wordmark img { display: block; width: 30px; height: 30px; object-fit: contain; }
.golden-overlay button { cursor: pointer; font: inherit; touch-action: manipulation; }
.golden-close { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid #c6cdb22c; border-radius: 50%; color: #e3d7b9; background: #06130f55; font-size: 26px !important; line-height: 1; transition: background .18s,transform .18s; }
.golden-close:hover { background: #cbb67e1c; transform: rotate(8deg); }
.golden-overlay :is(button,input):focus-visible { outline: 2px solid #f0d597; outline-offset: 4px; }
.golden-panel h2:focus { outline: none; }
.golden-hero { display: grid; grid-template-columns: minmax(230px,.92fr) minmax(0,1.2fr); align-items: center; gap: 28px; padding: 30px 54px 54px; }
.golden-portrait-stage { position: relative; display: grid; place-items: center; min-height: 330px; }
.golden-orbit { position: absolute; width: 310px; height: 310px; border: 1px solid #d8c39128; border-radius: 50%; transform: rotateX(20deg) rotate(-22deg); }
.golden-orbit::before { content: ''; position: absolute; inset: -28px; border: 1px solid #8ab49c15; border-radius: 50%; }
.golden-avatar { position: relative; width: 208px; height: 208px; margin: 0; border-radius: 50%; box-shadow: 0 20px 60px #0007; }
.golden-avatar::before { content: ''; position: absolute; inset: -9px; border-radius: inherit; background: conic-gradient(from 25deg,#f6e3b1,#8e6d32 13%,#e2bf70 24%,#fff3ce 37%,#a38447 52%,#e6d19e 72%,#846331 84%,#f6e3b1); animation: royal-ring 10s linear infinite; }
.golden-avatar::after { content: ''; position: absolute; inset: -17px; border: 1px solid #d9c89a66; border-radius: inherit; box-shadow: 0 0 46px #d9bd6a28; animation: royal-glow 3.8s ease-in-out infinite alternate; pointer-events: none; }
.golden-avatar canvas { position: relative; display: block; width: 100%; height: 100%; border: 5px solid #12352a; border-radius: inherit; background: #14392d; }
.golden-float-coin { position: absolute; width: 62px; height: 62px; object-fit: contain; clip-path: circle(37.5%); filter: drop-shadow(0 10px 9px #0008); animation: royal-float 5s ease-in-out infinite; pointer-events: none; }
.golden-float-coin:nth-of-type(1) { top: 12px; inset-inline-start: 8px; transform: rotate(-20deg); }
.golden-float-coin:nth-of-type(2) { bottom: 17px; inset-inline-end: 4px; width: 76px; height: 76px; animation-delay: -1.8s; }
.golden-float-coin:nth-of-type(3) { top: 34px; inset-inline-end: 4px; width: 38px; height: 38px; animation-delay: -3.2s; opacity: .65; }
.golden-copy { text-align: start; min-width: 0; }
.golden-overlay .golden-badge { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; border: 1px solid #8eb59c30; border-radius: 50px; padding: 7px 13px; color: #b6d6c1; background: #72b38a0b; font-size: 12px; line-height: 1.5; }
.golden-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #dbcb93; box-shadow: 0 0 10px #e3c57d55; flex: 0 0 auto; }
.golden-panel h2 { margin: 0 0 12px; color: #f7f3e9; font-family: Georgia,'Times New Roman',serif; font-size: clamp(34px,4.3vw,53px); font-weight: 400; line-height: 1.15; letter-spacing: -.035em; text-wrap: balance; }
.golden-overlay:dir(rtl) h2 { font-family: inherit; font-weight: 650; letter-spacing: 0; line-height: 1.5; }
.golden-reason { margin: 0 0 20px; color: #c2d6c8; font-size: 16px; line-height: 1.7; }
.golden-amount-row { display: flex; align-items: center; gap: 17px; }
.golden-amount-coin { width: 56px; height: 56px; object-fit: contain; clip-path: circle(37.5%); filter: drop-shadow(0 5px 9px #0007); }
.golden-panel .golden-amount { margin: 0; min-width: 0; color: #eed49a; font-size: clamp(60px,8.5vw,104px); font-weight: 700; line-height: 1.15; letter-spacing: -.05em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.golden-amount bdi { background: linear-gradient(160deg,#fff2cc,#dfb966 65%,#f2deb0); background-clip: text; -webkit-background-clip: text; color: transparent; }
.golden-denomination { margin: 8px 0 25px; color: #dfd7c4; font-size: 14px; letter-spacing: .03em; }
.golden-total { margin: 0 0 25px; padding-top: 18px; border-top: 1px solid #b8cbaf26; color: #a4c4af; font-size: 13px; line-height: 1.65; }
.golden-total:empty { display: none; }
.golden-overlay button:not(.golden-close) { min-height: 48px; border: 1px solid #d4c08d55; border-radius: 12px; padding: 13px 20px; color: #f0eadb; background: #ffffff05; font-size: 14px; font-weight: 600; transition: transform .18s,background .18s; }
.golden-overlay button:hover:not(:disabled,.golden-close) { transform: translateY(-2px); }
.golden-overlay button:disabled { cursor: progress; opacity: .48; }
.golden-overlay button.golden-primary,.golden-overlay [data-format] { color: #15251c; border-color: #e7d39c; background: linear-gradient(115deg,#d2b478,#f0dca5 50%,#d5b87b); box-shadow: inset 0 1px #fff7de80,0 8px 24px #0003; }
.golden-primary { display: inline-flex; align-items: center; justify-content: center; gap: 15px; width: 100%; }
.golden-primary svg { width: 18px; height: 18px; flex: 0 0 auto; }
.golden-bottomline { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 18px 28px; border-top: 1px solid #c4caa820; color: #8ca797; font-size: 10px; letter-spacing: .2em; }
.golden-bottomline::before,.golden-bottomline::after { content: ''; width: 40px; height: 1px; background: #cbb77d55; }
.golden-confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.golden-panel > [data-export] { max-width: 700px; margin: auto; padding: 12px 54px 40px; text-align: start; }
.golden-panel > [data-export] h2 { font-size: 34px; margin-bottom: 20px; }
.golden-privacy,.golden-help,.golden-status { color: #b6cbbd; font-size: 13px; line-height: 1.8; }
.golden-check { display: flex; align-items: center; gap: 11px; min-height: 44px; margin-block: 16px; font-size: 14px; color: #e2e9df; }
.golden-check input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: #d6bf88; }
.golden-name-label { display: grid; gap: 8px; color: #d2e0d5; font-size: 13px; }
.golden-name-label input { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #b1baa144; border-radius: 10px; padding: 11px 13px; background: #061611aa; color: #f0eee3; font: inherit; font-size: 16px; }
.golden-name-label input:disabled { opacity: .5; }
.golden-status { min-height: 44px; margin-block: 12px; }
.golden-export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 12px; }
.golden-panel [data-back] { margin-top: 12px; }
.golden-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.golden-overlay.is-leaving .golden-panel { animation: royal-exit .22s ease-in both; }
.golden-overlay.is-leaving .golden-atmosphere { opacity: 0; transition: opacity .22s; }
@keyframes royal-enter { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes royal-exit { to { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes royal-ring { to { transform: rotate(360deg); } }
@keyframes royal-rays { to { transform: rotate(360deg); } }
@keyframes royal-glow { from { opacity: .45; } to { opacity: 1; } }
@keyframes royal-float { 0%,100% { transform: translateY(0) rotate(-12deg) rotateY(-12deg); } 50% { transform: translateY(-13px) rotate(7deg) rotateY(20deg); } }
@media (max-width: 700px) {
  .golden-overlay { padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
  .golden-panel { max-width: 470px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 26px; }
  .golden-panel::before { inset: 7px; border-radius: 20px; }
  .golden-topbar { padding: 17px 20px 8px; }
  .golden-wordmark { font-size: 10px; gap: 7px; letter-spacing: .06em; }
  .golden-wordmark img { width: 24px; height: 24px; }
  .golden-hero { display: block; padding: 4px 26px 28px; }
  .golden-portrait-stage { min-height: 224px; max-width: 290px; margin: 0 auto 7px; }
  .golden-avatar { width: 142px; height: 142px; }
  .golden-orbit { width: 204px; height: 204px; }
  .golden-orbit::before { inset: -15px; }
  .golden-float-coin:nth-of-type(1) { top: 20px; inset-inline-start: 5px; width: 40px; height: 40px; }
  .golden-float-coin:nth-of-type(2) { bottom: 12px; inset-inline-end: 3px; width: 49px; height: 49px; }
  .golden-float-coin:nth-of-type(3) { top: 13px; inset-inline-end: 9px; width: 27px; height: 27px; }
  .golden-copy { text-align: center; }
  .golden-panel h2 { font-size: 35px; line-height: 1.2; }
  .golden-overlay:dir(rtl) h2 { font-size: 32px; line-height: 1.45; }
  .golden-overlay .golden-badge { font-size: 11px; margin-bottom: 13px; padding: 5px 11px; }
  .golden-reason { font-size: 14px; margin-bottom: 12px; }
  .golden-amount-row { justify-content: center; gap: 12px; }
  .golden-amount-coin { width: 44px; height: 44px; }
  .golden-panel .golden-amount { font-size: 76px; }
  .golden-denomination { font-size: 13px; margin: 6px 0 17px; }
  .golden-total { font-size: 12px; padding-top: 13px; margin-bottom: 18px; }
  .golden-bottomline { padding: 14px 20px; font-size: 9px; }
  .golden-panel > [data-export] { padding: 12px 24px 28px; }
  .golden-panel > [data-export] h2 { font-size: 28px; }
  .golden-export-actions { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  .golden-hero { padding-inline: 18px; }
  .golden-portrait-stage { min-height: 200px; }
  .golden-avatar { width: 128px; height: 128px; }
  .golden-orbit { width: 180px; height: 180px; }
  .golden-panel h2 { font-size: 30px; }
  .golden-overlay:dir(rtl) h2 { font-size: 28px; }
  .golden-panel .golden-amount { font-size: 66px; }
  .golden-wordmark { font-size: 9px; }
}
.golden-fly-chip {
  position: fixed; z-index: 100000; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px; pointer-events: none;
  background: linear-gradient(135deg,#14362cf2,#0b1a17f5); border: 1px solid #d7c39466;
  color: #efd398; font: 700 15px/1 inherit; box-shadow: 0 12px 36px #0008;
  transform: translate(-50%,-50%) scale(1); opacity: 1;
  transition: transform .85s cubic-bezier(.16,1,.3,1), opacity .85s ease;
}
.golden-fly-chip img { width: 22px; height: 22px; display: block; object-fit: contain; }
html[data-dg-theme="light"] .golden-fly-chip {
  background: linear-gradient(135deg,#f7f3e8f5,#e7efe8f2); color: #7a5d20; border-color: #cbb67e88;
}
@media (prefers-reduced-motion: reduce) {
  .golden-overlay *,.golden-overlay *::before,.golden-overlay *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .golden-fly-chip { transition: none !important; display: none !important; }
}
