.service-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid currentColor;
  border-color: var(--auth-border, var(--theme-border, #9286a24d));
}

a.service-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#session-retry[hidden] + .session-service-link { display: none; }
html[data-app-shell="bundled"] .session-service-link { margin-inline: 16px; }

.pixcoin-wallet { flex-wrap: wrap; }
#pixcoin-balance { font-weight: 700; font-variant-numeric: tabular-nums; }

#store-view {
  --store-banner-height: clamp(250px, 23vw, 388px);
  --store-muted: #cfc4dc;
  --store-edge: #d2bedc48;
  --store-accent: #d9adfa;
  position: relative;
  padding: clamp(24px, 2vw, 34px) clamp(16px, 6vw, 102px) clamp(28px, 4vw, 62px);
  color: #f9f5ff;
  background: #151025 radial-gradient(ellipse at 50% 75%, #211b35 0%, #1b162c 43%, #151025 78%);
  color-scheme: dark;
}
#store-view::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto;
  height: var(--store-banner-height);
  background: url("../images/store-moonlight.webp") top right / 100% 100% no-repeat;
  mask-image: linear-gradient(#000 48%, transparent 100%);
}
#welcome-screen:has(#store-view:not([hidden])) .profile-topbar { background-color: #141025; }
#welcome-screen:has(#store-view:not([hidden])) > .profile-nav { background-color: #151124; }
.store-content { position: relative; max-width: 1160px; margin-inline: auto; }
/* Keep the animated brand and static product grid in separate compositing layers. */
#welcome-screen .profile-brand-logo { transform: translateZ(0); }
.store-products { transform: translateZ(0); }
.store-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px; }
.store-header h2 { margin: 0; font-size: clamp(34px, 4vw, 56px); line-height: 1.04; letter-spacing: -.045em; }
.store-header p, .store-products p { margin: 8px 0 0; color: var(--store-muted); overflow-wrap: anywhere; }
.store-header > div > p { font-size: clamp(14px, 1.45vw, 21px); }
.store-header .store-rate {
  margin: 3px 0 0;
  padding: 9px 14px;
  border: 1px solid #d2bedc74;
  border-radius: 14px;
  background: #32253b70;
  color: inherit;
  font-size: clamp(13px, 1.28vw, 19px);
  font-weight: 650;
  white-space: nowrap;
}
.store-categories { display: flex; flex-wrap: wrap; gap: 9px 14px; margin-block: 22px clamp(18px, 1.85vw, 34px); }
.store-categories button, .store-item-gift {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #d2bedc75;
  border-radius: 13px;
  background: #2b223a9c;
  color: inherit;
  font: inherit;
  font-size: clamp(13px, 1.17vw, 17px);
  cursor: pointer;
}
.store-categories button[aria-pressed="true"], .store-categories button:hover, .store-item-gift:hover {
  border-color: var(--store-accent);
  background: linear-gradient(150deg, #54346a, #2b1642);
  box-shadow: inset 0 1px 6px #ddaffc35;
}
.store-categories button:focus-visible, .store-item-gift:focus-visible { outline: 2px solid var(--store-accent); outline-offset: 3px; }
.store-status { margin: 0 0 14px; color: var(--store-muted); }
.store-status:empty { display: none; }
.store-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 26px); }
.store-products article {
  contain: layout paint;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--store-edge);
  border-radius: clamp(17px, 1.8vw, 28px);
  background: radial-gradient(ellipse 54% 32% at 50% 68%, #a379c16e, #5c437853 62%, transparent 100%),
    radial-gradient(ellipse at 35% 4%, #413654d9, transparent 66%), linear-gradient(155deg, #352b46b5, #272138e8);
  box-shadow: inset 0 1px 0 #f1dcff22, 0 14px 36px #100a1c38;
}
.store-showcase {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1.3;
  padding: 6% 10% 2%;
}
.store-glass {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 86%;
  height: 100%;
  border: 1px solid #d8c5f369;
  border-radius: 21% 21% 12% 12% / 18% 18% 9% 9%;
  background: linear-gradient(90deg, #f4c9fe36, transparent 10%, #ba9fce13 52%, transparent 90%, #d9b9f945),
    linear-gradient(180deg, #a78bc260, #29213c52 26%, #2a204a14 74%, #a886c252);
  box-shadow: inset 0 0 13px #dbc2fd35, inset 0 3px 8px #ead5fc59;
}
.store-glass::before, .store-glass::after { content: ""; position: absolute; inset-inline: 2%; pointer-events: none; }
.store-glass::before {
  top: 7%;
  height: 16%;
  z-index: 1;
  border-top: 1px solid #e4cef7bf;
  border-radius: 20% 20% 0 0;
  background: linear-gradient(#edd8fb24, transparent 72%);
}
.store-glass::after {
  bottom: 2%;
  height: 17%;
  z-index: -1;
  border: 1px solid #e5c8f8a3;
  border-radius: 50%;
  background: radial-gradient(ellipse at 36% 42%, #e1b8fb, #9574b8 54%, #624d7e);
  box-shadow: 0 8px 0 #7c6495, 0 11px 15px #cda5f86b;
}
.store-glass img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.store-item-info { padding: 12px clamp(15px, 1.75vw, 27px) clamp(16px, 1.6vw, 24px); }
.store-products h3 { margin: 0; font-size: clamp(18px, 1.7vw, 26px); line-height: 1.18; overflow-wrap: anywhere; }
.store-products strong { display: block; margin-top: 7px; color: var(--store-muted); font-size: clamp(15px, 1.35vw, 20px); font-weight: 550; }
.store-card-actions {
  position: absolute;
  z-index: 2;
  inset: auto 8px 9%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.store-item-gift { background: #21152ff0; box-shadow: 0 4px 14px #130d2190; }
@media (hover: hover) and (pointer: fine) {
  .store-card-actions { opacity: 0; transform: translateY(5px); pointer-events: none; transition: opacity .16s, transform .16s; }
  .store-products article:is(:hover, :focus-within) .store-card-actions { opacity: 1; transform: none; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .store-card-actions { transition: none; } }
#store-view.is-scrolling .store-card-actions { transition: none; }

.dev-store-prices { display: grid; gap: 12px; }
.dev-store-price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(85px, 150px) auto; gap: 10px; align-items: end; }
.dev-store-price label { align-self: center; }
.dev-store-price .developer-status { grid-column: 1 / -1; margin: 0; }
#dev-store-credit { margin-top: 16px; display: grid; gap: 8px; justify-items: start; }
#dev-store-credit-amount { width: min(100%, 215px); }
#dev-store-user-balance { color: var(--theme-muted, #cfc4dc); font-size: .88em; font-weight: 500; }

.profile-gifts h3 { margin: 0 0 10px; }
.profile-gifts > p { margin: 0; color: var(--profile-muted, #cfc4dc); }
.profile-gift-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 125px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.profile-gift-list li { display: grid; gap: 4px; align-content: start; justify-items: center; text-align: center; padding: 9px; background: var(--theme-surface, #21192f); border-radius: 14px; overflow-wrap: anywhere; }
.profile-gift-list img { width: 87px; height: 87px; object-fit: contain; }
#profile-gifts { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
#profile-gifts li { display: block; padding: 0; }
.profile-gift-open {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 82px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
.profile-gift-open img { width: 70px; height: 70px; }
.profile-gift-open:hover { background: var(--theme-tint, #34264b); }
.profile-gift-open:focus-visible, .profile-gift-picker-list button:focus-visible { outline: 2px solid var(--theme-accent, #c291f6); outline-offset: -2px; }
#profile-decoration-status:not(:empty) { margin-top: 10px; }
#public-profile-avatar:has(> .profile-equipped-decoration) { overflow: visible; }
#public-profile-avatar > .profile-equipped-decoration {
  --decoration-width: clamp(5px, .62vw, 10px);
  position: absolute;
  z-index: 1;
  inset: calc(-1 * var(--decoration-width));
  width: auto;
  height: auto;
  pointer-events: none;
}
.profile-equipped-decoration:not(.is-custom-frame):not(:is([data-art="moon"], [data-art="lights"], [data-art="eclipse"], [data-art="aurora"]))::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from -45deg, #eadbf3, #f9edff, #a481b5, #f2d7ff, #9374a8, #d5b6e4, #eadbf3);
  mask-image: radial-gradient(circle closest-side, transparent calc(100% - var(--decoration-width)), #000 calc(100% - var(--decoration-width) + .6px));
  box-shadow: inset 0 0 0 1px #f5dffc;
}
.profile-equipped-decoration:not(.is-custom-frame):not(:is([data-art="moon"], [data-art="lights"], [data-art="eclipse"], [data-art="aurora"]))::after {
  content: "";
  position: absolute;
  top: 7%;
  right: 9%;
  width: 9%;
  aspect-ratio: 1;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
  background: linear-gradient(145deg, #fff, #e8c8ff 64%, #9879ab);
}

/* Align the off-center shop artwork around the full-size avatar. */
#public-profile-avatar:has(> .profile-equipped-decoration:is([data-art="moon"], [data-art="lights"], [data-art="eclipse"], [data-art="aurora"])) {
  border-color: transparent;
  background-clip: padding-box;
}
#public-profile-avatar > .profile-equipped-decoration[data-art="moon"] {
  inset: -17%;
  border-radius: 0;
  background: url("../images/store-moon.png") 66% 61% / 123% no-repeat;
  mask-image: radial-gradient(circle closest-side, transparent 74.6269%, #000 calc(74.6269% + .5px));
}
#public-profile-avatar:has(> .profile-equipped-decoration:is([data-art="moon"], [data-art="lights"], [data-art="eclipse"], [data-art="aurora"])) > :first-child:not(.profile-equipped-decoration) {
  overflow: hidden;
}

#public-profile-avatar > .profile-equipped-decoration:is([data-art="lights"], [data-art="eclipse"], [data-art="aurora"]) {
  inset: -16%;
  border-radius: 0;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  mask-image: radial-gradient(circle closest-side, transparent 75.7576%, #000 calc(75.7576% + .5px));
}
#public-profile-avatar > .profile-equipped-decoration[data-art="lights"] { background-image: url("../images/store-lights.webp"); }
#public-profile-avatar > .profile-equipped-decoration[data-art="eclipse"] { background-image: url("../images/store-eclipse.webp"); }
#public-profile-avatar > .profile-equipped-decoration[data-art="aurora"] { background-image: url("../images/store-aurora.webp"); }

.profile-equipped-decoration.is-custom-frame::before,.profile-equipped-decoration.is-custom-frame::after { content: none; }
#public-profile-avatar > .profile-equipped-decoration.is-custom-frame,.dev-frame-avatar > .is-custom-frame {
  position:absolute;inset:auto;left:50%;top:50%;width:var(--custom-frame-size);height:var(--custom-frame-size);transform:translate(-50%,-50%);
  background-position:center;background-size:contain;background-repeat:no-repeat;border-radius:0;pointer-events:none;
  -webkit-mask-image:radial-gradient(circle closest-side,transparent var(--custom-frame-hole),#000 calc(var(--custom-frame-hole) + .5px));
  mask-image:radial-gradient(circle closest-side,transparent var(--custom-frame-hole),#000 calc(var(--custom-frame-hole) + .5px));
}
#public-profile-avatar:has(> .is-custom-frame) { border-color:transparent;background-clip:padding-box; }

#store-gift-dialog { width: min(calc(100% - 24px), 420px); }
#store-gift-form { display: grid; gap: 10px; }
#store-gift-art { display: block; margin-inline: auto; object-fit: contain; }
#store-gift-title, #store-gift-price { margin: 0; text-align: center; }
#store-gift-target { margin: 0; text-align: center; overflow-wrap: anywhere; }
#store-gift-price { margin-bottom: 6px; color: var(--theme-muted, #cfc4dc); }
#store-gift-form label { font-size: 14px; font-weight: 650; }
#store-gift-recipient { width: 100%; padding: 9px; border: 1px solid var(--theme-border, #5c506e); border-radius: 10px; background: var(--theme-surface, #21192f); color: inherit; font: inherit; }
.store-gift-feedback { margin: 0; min-height: 1em; font-size: 13px; }
.store-gift-actions { display: flex; justify-content: flex-end; gap: 8px; }
.store-gift-actions .store-gift-send { background: var(--theme-action, #7631bd); color: #fff; }
#profile-gift-picker { width: min(calc(100% - 24px), 460px); }
#profile-gift-picker :is(h2, p) { margin: 0 0 12px; overflow-wrap: anywhere; }
#profile-gift-picker-status:empty { display: none; }
.profile-gift-picker-list { display: grid; gap: 7px; margin: 0 0 12px; padding: 0; list-style: none; }
.profile-gift-picker-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--theme-border, #5c506e);
  border-radius: 12px;
  background: var(--theme-surface, #21192f);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.profile-gift-picker-list button:hover { background: var(--theme-tint, #34264b); }
.profile-gift-picker-list img { flex: 0 0 48px; object-fit: contain; }
.profile-gift-picker-list span { min-width: 0; overflow-wrap: anywhere; }
.profile-gift-picker-list small { display: block; margin-top: 4px; color: var(--theme-muted, #cfc4dc); }
.profile-gift-details { width: min(calc(100% - 24px), 390px); }
.profile-gift-details :is(h2, p) { margin: 0 0 12px; overflow-wrap: anywhere; }
#profile-gift-details-art { display: block; margin: 0 auto 14px; object-fit: contain; }
.profile-gift-sender-link { display: inline-flex; align-items: center; gap: 8px; color: var(--theme-accent, #c291f6); vertical-align: middle; text-decoration: underline; }
.profile-gift-sender-avatar { display: grid; width: 32px; height: 32px; flex: 0 0 32px; overflow: hidden; border-radius: 50%; }
.profile-gift-sender-avatar > * { width: 100%; height: 100%; object-fit: cover; }
.chat-bubble.chat-gift-bubble:not(.is-selected) { background: transparent; border-color: transparent; box-shadow: none; }
.chat-gift-art { display: block; grid-column: 1 / -1; grid-row: 1; max-width: 100%; object-fit: contain; }
.chat-gift-bubble :is(.chat-bubble-text, .message-more, .message-select-check) { grid-row: 2; }
.chat-gift-bubble .chat-bubble-meta { grid-row: 3; }

@media (max-width: 820px) {
  #store-view { padding-inline: clamp(16px, 4vw, 32px); }
  .store-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .dev-store-price { grid-template-columns: minmax(0, 1fr) auto; }
  .dev-store-price label { grid-column: 1 / -1; }
  #store-view { --store-banner-height: 230px; }
  #store-view::before { background-size: auto 100%; opacity: .45; }
  .store-categories { margin-block: 16px 22px; gap: 7px; }
  .store-categories button, .store-item-gift { padding-inline: 11px; }
  .store-products { grid-template-columns: minmax(0, 1fr); max-width: 340px; margin-inline: auto; }
  .profile-nav-button .profile-nav-label, #settings-nav .games-nav-compact { font-size: clamp(9px, 2.65vw, 11px); }
  #welcome-screen #preferences-nav { min-width: 42px; }
}

.service-page {
  --service-text: #f6f1fc;
  --service-muted: #c8bed8;
  --service-accent: #d6b9ff;
  --service-border: #c2a3e431;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 65% 390px at 72% 0, #34214f, transparent), #100d1d;
  color: var(--service-text);
  color-scheme: dark;
  font: 16px/1.55 system-ui, sans-serif;
}

.service-page * { box-sizing: border-box; }
.service-page a { color: var(--service-accent); text-underline-offset: 4px; }
.service-page a:focus-visible, a.service-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.service-page p { margin: 0; color: var(--service-muted); }
.service-page h1, .service-page h2, .service-page h3 { margin: 0; line-height: 1.2; }
.service-wrap { width: min(100% - 36px, 1050px); margin-inline: auto; }

.service-header, .service-nav { display: flex; align-items: center; }
.service-header { justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; padding-block: 20px; border-bottom: 1px solid var(--service-border); }
.service-nav { flex-wrap: wrap; gap: 6px 22px; }
.service-nav a { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; text-decoration: none; }
.service-nav a:hover, .service-nav a[aria-current] { color: var(--service-text); text-decoration: underline; }
a.service-brand { color: var(--service-text); font-size: 20px; font-weight: 700; text-decoration: none; }

.service-main { padding-block: clamp(32px, 5vw, 60px) 36px; }
.service-heading { margin-bottom: clamp(24px, 4vw, 44px); }
.service-heading h1 { font-size: clamp(27px, 5vw, 50px); letter-spacing: -.04em; overflow-wrap: anywhere; }
.service-heading p { max-width: 54ch; margin-top: 12px; }
a.service-primary { display: inline-block; margin-top: 20px; padding: 10px 16px; border-radius: 11px; background: #c7a3fb; color: #201035; font-weight: 700; text-decoration: none; }
a.service-primary:hover { background: #ddc2ff; }

.service-section h2 { margin-bottom: 14px; font-size: clamp(22px, 3vw, 28px); }
.service-section .service-exchange { margin-bottom: 8px; }
.service-exchange strong { color: var(--service-text); }
.service-section .service-unavailable { margin-bottom: 16px; }
.service-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.service-card { padding: clamp(16px, 3vw, 26px); border: 1px solid var(--service-border); border-radius: 17px; background: #1b1529; overflow-wrap: anywhere; }
.service-card h3, .service-privacy h2 { margin-bottom: 8px; font-size: 19px; }
.service-card .service-category { margin-bottom: 8px; color: var(--service-accent); font-size: 14px; }
.service-card .service-price { margin-top: 16px; color: var(--service-text); font-size: 23px; font-weight: 700; }
.service-price-equivalent { color: var(--service-muted); font-size: 16px; font-weight: 500; }
.service-details { margin: 12px 0 0; }
.service-details dt { font-weight: 650; }
.service-details dd { margin: 0 0 8px; color: var(--service-muted); }
.service-details dd:last-child { margin-bottom: 0; }
.service-refunds { margin-top: 14px; }
.service-refunds a { display: inline-block; margin-top: 10px; }
.service-document, .service-privacy { max-width: 78ch; }
.service-document { white-space: pre-wrap; }
.service-privacy h2:not(:first-child) { margin-top: 20px; }

.service-footer { display: flex; flex-wrap: wrap; gap: 22px 44px; padding-block: 22px 38px; border-top: 1px solid var(--service-border); overflow-wrap: anywhere; }
.service-footer h2 { margin-bottom: 8px; font-size: 15px; }
.service-footer a { display: block; width: fit-content; min-height: 28px; }
.service-footer p, .service-footer a { font-size: 14px; }

@media (max-width: 540px) {
  .service-products { grid-template-columns: minmax(0, 1fr); }
  .service-nav { column-gap: 16px; }
}
