.sp-support-dialog{box-sizing:border-box;width:min(410px,calc(100% - 36px));max-height:calc(100dvh - 80px);padding:25px;border:1px solid #3c4752;border-top:4px solid #209eea;background:#111820;color:#f3f8fc;font:16px/1.5 system-ui,sans-serif}
.sp-support-dialog::backdrop{background:#000a}
.sp-support-dialog h2{font-size:24px;font-weight:500;margin:0 0 10px}
.sp-support-dialog p{margin:0 0 15px;color:#d4dce3}
.sp-support-dialog label{display:grid;gap:5px;font-size:14px;margin-bottom:12px}
.sp-support-dialog input{box-sizing:border-box;width:100%;padding:10px;background:#05090e;border:1px solid #7d90a1;color:#fff;font:inherit}
.sp-support-dialog .sp-actions{display:flex;flex-wrap:wrap;gap:8px}
.sp-support-dialog button{min-height:42px;padding:5px 13px;border:1px solid #6a7881;background:transparent;color:white;font:500 15px system-ui,sans-serif;cursor:pointer}
.sp-support-dialog button:first-child{background:#0079bf;border-color:#0079bf}
.sp-support-dialog [role=status]{font-size:14px;color:#ffd387;overflow-wrap:anywhere}
.sp-status-note {box-sizing:border-box;position:fixed;left:50%;top:calc(18px + var(--toy-safe-top,env(safe-area-inset-top,0px)));transform:translateX(-50%);z-index:1000;max-width:calc(100% - 24px);width:max-content;border-radius:18px;padding:12px 17px;background:#24212b;color:white;font:14px/1.4 system-ui,sans-serif;box-shadow:0 4px 24px #0003;}
body:has(> .sp-welcome) > .sp-status-note { top: auto; bottom: calc(16px + var(--toy-safe-bottom,env(safe-area-inset-bottom,0px))); }

dialog.sp-checkout-thanks {
  box-sizing: border-box;
  width: min(416px, calc(100% - max(36px, var(--toy-safe-left, 0px) + var(--toy-safe-right, 0px) + 20px)));
  max-height: calc(100dvh - var(--toy-safe-top, 0px) - var(--toy-safe-bottom, 0px) - 24px);
  max-width: none; overflow: auto; isolation: isolate;
  margin: auto; padding: clamp(21px,6vw,36px);
  border: 1px solid #f0cfce; border-radius: 26px;
  background: radial-gradient(ellipse at 96% 0%, #fce0e2 0, transparent 55%), #fff9f5;
  box-shadow: 0 22px 72px #3b162740, inset 0 1px #fff;
  color: #692e44; color-scheme: light;
  font: 400 16px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  text-align: left; text-shadow: none; text-transform: none;
}
dialog.sp-checkout-thanks[open] { animation: sp-checkout-enter 220ms cubic-bezier(.2,.8,.3,1) both; }
dialog.sp-checkout-thanks::backdrop { background: #32172960; }
.sp-checkout-thanks .sp-checkout-seal {
  position: relative; display: block; width: 48px; height: 48px; margin: 0 0 15px;
  border: 1px solid #efc4ce; border-radius: 16px; background: linear-gradient(145deg,#fff7f5,#f3c6cf);
  box-shadow: inset 0 1px #fff9, 0 3px 11px #b252691b;
}
.sp-checkout-thanks .sp-checkout-seal::after {
  content: ""; position: absolute; left: 15px; top: 14px; width: 16px; height: 9px;
  border: solid #a54360; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg);
}
.sp-checkout-thanks h2 {
  margin: 0 0 7px; color: inherit; letter-spacing: -.035em;
  font: 700 clamp(23px,6vw,30px)/1.26 "Songti SC","STSong","Noto Serif CJK SC",serif;
}
.sp-checkout-thanks p { margin: 0; max-width: 29ch; color: #794a59; font-size: 15px; line-height: 1.6; }
.sp-checkout-thanks .sp-checkout-actions { display: grid; grid-template-columns: minmax(64px,.7fr) minmax(max-content,1.3fr); gap: 10px; margin-top: 23px; }
.sp-checkout-thanks .sp-checkout-actions > * {
  appearance: none; display: flex; align-items: center; justify-content: center; gap: 4px;
  box-sizing: border-box; min-height: 46px; margin: 0; padding: 8px 10px;
  border: 1px solid #dfb7bf; border-radius: 13px; box-shadow: none;
  background: #fffaf6; color: #764353;
  font-family: inherit; font-size: 14px; font-weight: 650; line-height: 1.35; text-decoration: none;
  white-space: nowrap; cursor: pointer; touch-action: manipulation;
}
.sp-checkout-thanks .sp-checkout-actions > a { color: #fff8f6; background: #a14260; border-color: #a14260; }
.sp-checkout-thanks .sp-checkout-actions > a[aria-busy="true"] { opacity: .72; }
.sp-checkout-thanks .sp-checkout-actions :focus-visible { outline: 2px solid #863b55; outline-offset: 3px; }
.sp-checkout-thanks .sp-checkout-actions svg { width: 15px; height: 15px; stroke-width: 1.6; flex: none; }
.sp-checkout-thanks .sp-checkout-status { margin-top: 10px; font-size: 13px; }
@keyframes sp-checkout-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { dialog.sp-checkout-thanks[open] { animation: none; } }

/* Full-screen sponsor credits. The face row keeps its final size from the first frame. */
dialog.sp-opening {
  --sp-flower: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cdefs%3E%3Cpath id='p' d='M118 117C84 110 51 88 43 53 36 25 58 7 80 22c21-23 47-7 49 22 2 24-2 49-11 73Z'/%3E%3C/defs%3E%3Cg fill='%23f4babc' stroke='%23d88f9a' stroke-width='.85'%3E%3Cuse href='%23p'/%3E%3Cuse href='%23p' transform='rotate(90 120 120)'/%3E%3Cuse href='%23p' transform='rotate(180 120 120)'/%3E%3Cuse href='%23p' transform='rotate(270 120 120)'/%3E%3C/g%3E%3Cg stroke='%23d88f9a' stroke-width='1' fill='none'%3E%3Cpath d='M120 120Q90 79 80 28m40 92q23-34 79-35m-79 35q30 34 34 77m-34-77q-27 35-77 29'/%3E%3C/g%3E%3C/svg%3E");
  --sp-safe-top: var(--toy-safe-top, env(safe-area-inset-top, 0px));
  --sp-safe-right: var(--toy-safe-right, env(safe-area-inset-right, 0px));
  --sp-safe-bottom: var(--toy-safe-bottom, env(safe-area-inset-bottom, 0px));
  --sp-safe-left: var(--toy-safe-left, env(safe-area-inset-left, 0px));
  position: fixed; inset: 0; z-index: 2147483000; box-sizing: border-box;
  width: 100%; height: 100%; width: 100dvw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: var(--sp-safe-top) var(--sp-safe-right) var(--sp-safe-bottom) var(--sp-safe-left);
  border: 0; border-radius: 0; outline: 0; box-shadow: none; isolation: isolate; overflow: hidden;
  color: #75384b; color-scheme: light; direction: ltr;
  background: radial-gradient(ellipse at 100% 8%,#f9d8d4 0,transparent 48%),linear-gradient(159deg,#fff9f2 6%,#fff0eb 60%,#f9dbdf 100%);
  font: 400 16px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  text-align: center; letter-spacing: normal; text-transform: none; animation: none; transition: none;
}
dialog.sp-opening[open] { display: grid; place-items: center; }
dialog.sp-opening:not([open]), .sp-opening [hidden] { display: none; }
dialog.sp-opening::backdrop { background: #fff2ee; backdrop-filter: none; }
.sp-opening *, .sp-opening *::before, .sp-opening *::after, .sp-welcome *, .sp-welcome *::before, .sp-welcome *::after { box-sizing: border-box; }
.sp-opening .sp-opening-paper { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sp-opening .sp-opening-paper::before, .sp-opening .sp-opening-paper::after {
  content: ""; position: absolute; width: clamp(138px,62vmin,410px); aspect-ratio: 1;
  background: var(--sp-flower) center/contain no-repeat;
}
.sp-opening .sp-opening-paper::before { right: 0; top: 0; transform: translate(50%,-53%) rotate(-24deg); opacity: .67; }
.sp-opening .sp-opening-paper::after { bottom: 0; left: 0; transform: translate(-46%,48%) rotate(12deg); opacity: .65; }
dialog.sp-opening::after {
  content: ""; position: absolute; right: 0; bottom: 0; z-index: 0; width: 46%; height: 24%; opacity: .2; pointer-events: none;
  background: radial-gradient(#c97786 .8px,transparent .95px) 0 0/4px 4px;
  mask-image: linear-gradient(145deg,transparent 42%,#382730 98%);
}
.sp-opening .sp-opening-skip {
  appearance: none; position: absolute; z-index: 3; right: calc(17px + var(--sp-safe-right)); top: calc(14px + var(--sp-safe-top));
  min-height: 44px; min-width: 70px; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  margin: 0; padding: 2px 12px 2px 15px; border: 1px solid #d9aab5; border-radius: 99px;
  background: #fff7f2f2; color: #783e52; box-shadow: none; font: inherit; font-size: 13px; font-weight: 600;
  line-height: 1.35; letter-spacing: normal; touch-action: manipulation; cursor: pointer;
}
.sp-opening .sp-opening-skip:focus-visible { outline: 2px solid #95475e; outline-offset: 3px; }
.sp-opening .sp-opening-skip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sp-opening .sp-opening-center {
  --sp-face: clamp(39px,13vmin,79px); --sp-pop-time: 220ms;
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  width: min(90%,850px); text-align: center; overflow-wrap: anywhere; animation: none; transition: none;
}
.sp-opening .sp-opening-faces:not([hidden]) {
  display: flex; justify-content: center; align-items: center; height: var(--sp-face);
  gap: 0; padding: 0; margin: 0; background: transparent;
}
.sp-opening .sp-opening-face {
  position: relative; display: grid; place-items: center; flex: none; width: var(--sp-face); height: var(--sp-face);
  overflow: hidden; border: clamp(1.5px,.53vmin,3px) solid #fff3ee; border-radius: 50%;
  background: #ffe8e6; color: #783e52; font-size: calc(var(--sp-face) * .38); font-weight: 600;
  animation: sp-petal-face var(--sp-pop-time) ease-out calc(var(--sp-order, 0) * var(--sp-pop-time)) both;
}
.sp-opening .sp-opening-face:nth-child(2) { --sp-order: 1; }
.sp-opening .sp-opening-face:nth-child(3) { --sp-order: 2; }
.sp-opening .sp-opening-face:nth-child(4) { --sp-order: 3; }
.sp-opening .sp-opening-face:nth-child(5) { --sp-order: 4; }
.sp-opening .sp-opening-face + .sp-opening-face { margin-left: calc(-.18 * var(--sp-face)); }
.sp-opening .sp-opening-face img, .sp-welcome .sp-welcome-portrait img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none;
  border-radius: 50%; object-fit: cover; border: 0;
}
.sp-opening .sp-opening-intro, .sp-opening .sp-opening-name, .sp-opening .sp-opening-message {
  max-width: 100%; margin: 0; padding: 0; color: inherit; white-space: normal;
  animation: none; transition: none; transform: none; opacity: 1; text-shadow: none;
}
.sp-opening .sp-opening-intro {
  margin-top: clamp(14px,5.2vmin,34px); color: #92586a; font-size: clamp(12px,3.3vmin,19px);
  font-weight: 530; letter-spacing: .12em; line-height: 1.45; outline: none;
}
.sp-opening .sp-opening-faces[hidden] + .sp-opening-intro { margin-top: 0; }
.sp-opening .sp-opening-name {
  margin-top: clamp(3px,.9vmin,8px); color: #7b364e;
  font: 700 clamp(27px,8.2vmin,64px)/1.23 "Songti SC","STSong","Noto Serif CJK SC","SimSun",serif; letter-spacing: .025em;
}
.sp-opening .sp-opening-message {
  margin-top: clamp(8px,2.6vmin,21px); color: #92586a; font-size: clamp(13px,3.7vmin,23px); font-weight: 450; line-height: 1.4;
}
.sp-opening .sp-opening-message strong { color: #bc4e71; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-opening .sp-opening-name .sp-icon-crown { display: inline-block; width: .64em; height: .64em; margin-right: .16em; vertical-align: .07em; color: #aa742c; }
@keyframes sp-petal-face {
  from { opacity: 0; transform: scale(.55); }
  72% { opacity: 1; transform: scale(1.045); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-opening .sp-opening-face { animation: none; }
}

/* A non-modal greeting above play. The containing strip leaves pointer input to the game. */
aside.sp-welcome {
  box-sizing: border-box; position: fixed; z-index: 2147482999;
  inset: auto 0 auto; top: calc(var(--toy-safe-top,env(safe-area-inset-top,0px)) + clamp(12px,4vh,32px));
  display: flex; justify-content: center; align-items: flex-start; width: auto; max-width: none; height: auto;
  padding: 0 max(12px,var(--toy-safe-right,env(safe-area-inset-right,0px))) 0 max(12px,var(--toy-safe-left,env(safe-area-inset-left,0px)));
  margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; pointer-events: none;
  direction: ltr; color-scheme: light; text-shadow: none; text-transform: none;
  font: 400 16px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
}
.sp-welcome .sp-welcome-capsule {
  --sp-cap-ink: #6b3857;
  --sp-cap-secondary: #855d76;
  --sp-cap-tint: #d3769c;
  --sp-cap-wash: #f7dce7;
  --sp-cap-enter: sp-petal-welcome-in;
  --sp-cap-exit: sp-petal-welcome-out;
  --sp-cap-in-time: 640ms;
  --sp-cap-out-time: 420ms;
  --sp-cap-face: clamp(31px, 9.8vw, 44px);
  color: var(--sp-cap-ink);
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2.4vw, 13px);
  width: min(100%, clamp(228px, 77vw, 298px));
  min-height: calc(var(--sp-cap-face) + 17px);
  padding: 8px 15px 8px 9px;
  border-radius: 42px;
  border: 1px solid #fffbfd;
  background: linear-gradient(111deg, #fff8fb 0%, #fffdfe 62%, #fbeaf1 100%);
  box-shadow: 0 5px 16px -4px #aa5f8760, inset 0 0 0 1px #e9cad938;
  transform-origin: center 0;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.sp-welcome .sp-welcome-portrait {
  position: relative;
  display: grid; place-items: center; color: var(--sp-cap-ink); font-weight: 650;
  box-sizing: border-box;
  flex: 0 0 var(--sp-cap-face);
  width: var(--sp-cap-face);
  height: var(--sp-cap-face);
  border-radius: 50%;
  overflow: hidden;
  background: var(--sp-cap-wash);
}
.sp-welcome .sp-welcome-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  text-align: start;
}
.sp-welcome .sp-welcome-label { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sp-welcome .sp-welcome-label {
  color: var(--sp-cap-secondary);
  font-size: clamp(10px, 2.85vw, 12px);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: .04em;
}
.sp-welcome .sp-welcome-name {
  display: flex;
  align-items: baseline;
  color: var(--sp-cap-ink);
  font-size: clamp(13px, 3.9vw, 18px);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -.025em;
}
.sp-welcome .sp-welcome-prefix { flex: none; white-space: nowrap; }
.sp-welcome .sp-welcome-nickname-viewport { flex: 1; min-width: 0; overflow: hidden; }
.sp-welcome .sp-welcome-nickname { display: inline-block; white-space: nowrap; }
.sp-welcome .sp-welcome-name-wrap .sp-welcome-nickname { display: block; white-space: normal; overflow-wrap: anywhere; }
.sp-welcome .sp-welcome-name .sp-icon-crown {
  display: inline-block;
  flex: none;
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  margin: 0 .16em 0 .02em;
  vertical-align: -.10em;
  color: #aa742c;
  fill: currentColor;
}
.sp-welcome .sp-welcome-accent { position: relative; flex: 0 0 20px; height: 22px; color: var(--sp-cap-tint); pointer-events: none; }
.sp-welcome .sp-welcome-accent::before, .sp-welcome .sp-welcome-accent::after { content: ""; position: absolute; }
.sp-welcome .sp-welcome-accent::before,
.sp-welcome .sp-welcome-accent::after {
  width: 8px; height: 11px;
  border-radius: 90% 18% 80% 25%;
  background: #e69cba;
}
.sp-welcome .sp-welcome-accent::before { left: 2px; top: 7px; transform: rotate(-37deg); }
.sp-welcome .sp-welcome-accent::after { left: 10px; top: 3px; transform: rotate(17deg); opacity: .64; }

.sp-welcome[data-toast="hold"] .sp-welcome-capsule { opacity: 1; transform: none; }
.sp-welcome[data-toast="enter"] .sp-welcome-capsule { animation: var(--sp-cap-enter) var(--sp-cap-in-time) both; }
.sp-welcome[data-toast="enter"] .sp-welcome-copy { animation: sp-petal-ink-in 360ms 200ms cubic-bezier(.16,.85,.32,1) both; }
.sp-welcome[data-toast="enter"] .sp-welcome-accent { animation: sp-petal-mark-in 220ms 340ms ease-out both; }
.sp-welcome[data-toast="exit"] .sp-welcome-capsule { animation: var(--sp-cap-exit) var(--sp-cap-out-time) both; pointer-events: none; }
.sp-welcome[data-toast="exit"] .sp-welcome-copy,
.sp-welcome[data-toast="exit"] .sp-welcome-accent { animation: sp-petal-ink-out 135ms ease-in both; }
.sp-welcome[data-toast="exit"] .sp-welcome-portrait { animation: sp-petal-ink-out 170ms 35ms ease-in both; }

/* The clip exposes the real avatar and text at their native proportions. */
@keyframes sp-petal-welcome-in {
  0% { opacity: 0; transform: translateY(-85%); clip-path: inset(37% 46% round 99px); }
  22% { opacity: 1; transform: translateY(-15%); clip-path: inset(30% 40% round 99px); }
  64% { transform: translateY(7%) scale(1.025, .985); clip-path: inset(0 round 38px); }
  82% { transform: translateY(-2%); }
  100% { opacity: 1; transform: none; clip-path: inset(-30px round 40px); }
}
@keyframes sp-petal-welcome-out {
  0% { opacity: 1; transform: none; clip-path: inset(-30px round 40px); }
  24% { transform: translateY(4%); clip-path: inset(0 1% round 40px); }
  72% { opacity: .92; transform: translateY(-15%); clip-path: inset(32% 44% round 40px); }
  100% { opacity: 0; transform: translateY(-85%); clip-path: inset(42% 47% round 40px); }
}
@keyframes sp-petal-ink-in { from {opacity: 0; transform: translateY(4px);} to {opacity: 1; transform: none;} }
@keyframes sp-petal-ink-out { from {opacity: 1;} to {opacity: 0;} }
@keyframes sp-petal-mark-in { from {opacity: 0;} to {opacity: 1;} }

@media (prefers-reduced-motion: reduce) {
  .sp-welcome[data-toast="enter"] .sp-welcome-capsule { animation: sp-petal-mark-in 100ms linear both; }
  .sp-welcome[data-toast="exit"] .sp-welcome-capsule { animation: sp-petal-ink-out 100ms linear both; }
  .sp-welcome[data-toast] .sp-welcome-portrait,
  .sp-welcome[data-toast] .sp-welcome-copy,
  .sp-welcome[data-toast] .sp-welcome-accent { animation: none; }
}
