:root {
  --account-bg: #0d131d;
  --account-panel: #161f2c;
  --account-panel-2: #1b2736;
  --account-border: #34465c;
  --account-text: #edf3fb;
  --account-muted: #9aaac0;
  --account-accent: #c5a8ff;
  --account-accent-strong: #a987f8;
  --account-gold: #e4c182;
  --account-good: #65d59c;
  --account-danger: #fa7d7d;
}

/* Shared header entry. */
body .gugu-site-header .header-account-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  min-width: 116px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #607997;
  border-radius: 8px;
  background: #1a2b3e;
  color: #e5edf8;
  font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  vertical-align: middle;
  cursor: pointer;
}

body .gugu-site-header .header-account-button svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body .gugu-site-header .header-account-button:hover,
body .gugu-site-header .header-account-button:focus-visible {
  border-color: #86a7c8;
  background: #243a50;
  color: #fff;
}

body .gugu-site-header .header-account-button:focus-visible {
  outline: 2px solid var(--account-accent);
  outline-offset: 2px;
}

body .gugu-site-header .header-account-button {
  flex: 0 0 auto;
  align-self: center;
}

body .gugu-site-header .header-account-cluster {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  order: 5;
  min-width: 0;
  margin: 0;
}

body>header.gugu-site-header.gugu-site-header>.site-header-controls>.header-account-cluster>#gugu-rights-bar {
  box-sizing: border-box;
  display: inline-flex!important;
  align-items: center;
  gap: 7px;
  width: 300px!important;
  min-width: 300px!important;
  max-width: 300px!important;
  height: 44px!important;
  min-height: 44px!important;
  max-height: 44px!important;
  margin: 0!important;
  padding: 0 11px!important;
  overflow: hidden;
  border: 1px solid #415a72!important;
  border-radius: 8px!important;
  background: #132131!important;
  color: #dce9f5!important;
  font: 11px/1.25 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif!important;
  text-decoration: none!important;
  white-space: nowrap!important;
}

body>header.gugu-site-header.gugu-site-header>.site-header-controls>.header-account-cluster>#gugu-rights-bar:hover,
body>header.gugu-site-header.gugu-site-header>.site-header-controls>.header-account-cluster>#gugu-rights-bar:focus-visible {
  border-color: #8c73bd!important;
  background: #1c2d42!important;
  color: #fff!important;
}

body>header.gugu-site-header.gugu-site-header>.site-header-controls>.header-account-cluster>#gugu-rights-bar:focus-visible {
  outline: 2px solid var(--account-accent);
  outline-offset: 2px;
}

.header-account-status .rights-status-label {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: #3c3154;
  color: #d8c5ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}

body>header.gugu-site-header.gugu-site-header>.site-header-controls>.header-account-cluster>#gugu-rights-bar>#gugu-rights-summary {
  min-width: 0;
  overflow: hidden!important;
  display: block!important;
  color: inherit!important;
  font-size: 11px!important;
  line-height: 1.25!important;
  white-space: nowrap!important;
  text-overflow: ellipsis;
}

body .gugu-site-header .header-account-cluster .header-account-button {
  min-width: 104px;
}


/* The account center is the only modal for login, account settings and rights. */
html body .gugu-auth-dialog {
  box-sizing: border-box;
  width: min(900px, calc(100vw - 24px));
  height: min(820px, 92dvh);
  max-height: 92dvh;
  padding: 0;
  overflow: hidden;
  border: 1px solid #46536b;
  border-radius: 18px;
  background: var(--account-bg);
  color: var(--account-text);
  box-shadow: 0 30px 100px #000b;
}

html body .gugu-auth-dialog::backdrop {
  background: #050911c7;
  backdrop-filter: blur(4px);
}

html body .gugu-auth-dialog .gugu-auth-bar {
  box-sizing: border-box;
  height: 50px;
  margin: 0;
  padding: 0 16px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2b3849;
  background: #111925;
  color: #c7d2e1;
  font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html body .gugu-auth-dialog .gugu-auth-bar span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html body .gugu-auth-dialog .gugu-auth-bar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--account-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
}

html body .gugu-auth-dialog .gugu-auth-bar button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid #506078;
  border-radius: 7px;
  background: transparent;
  color: #c8d2df;
  font: 20px/1 Arial, sans-serif;
  cursor: pointer;
}

html body .gugu-auth-dialog .gugu-auth-bar button:hover {
  border-color: #ad96e8;
  color: #fff;
}

html body .gugu-auth-dialog iframe {
  display: block;
  width: 100%;
  height: calc(100% - 50px);
  margin: 0;
  border: 0;
  background: var(--account-bg);
}

/* Account page and embedded portal. */
html.account-page,
html.account-page body {
  min-height: 100%;
}

html.account-page body {
  box-sizing: border-box;
  margin: 0;
  background:
    radial-gradient(circle at 16% 10%, #27334d 0, transparent 30rem),
    linear-gradient(145deg, #0c121b, #111a26 58%, #0d141e);
  color: var(--account-text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html.account-page *,
html.account-page *::before,
html.account-page *::after {
  box-sizing: border-box;
}

html.account-page button,
html.account-page input,
html.account-page select {
  font: inherit;
}

html.account-page button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.account-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.account-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--account-text);
  text-decoration: none;
}

.account-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.account-brand span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-brand b {
  font-size: 20px;
}

.account-brand small,
.account-home-link {
  color: var(--account-muted);
  font-size: 12px;
}

.account-home-link {
  text-decoration: none;
}

.account-home-link:hover {
  color: var(--account-accent);
}

.account-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 8px auto 30px;
}

.auth-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--account-border);
  border-radius: 20px;
  background: var(--account-panel);
  box-shadow: 0 18px 50px #0005;
}

.auth-context {
  position: relative;
  padding: 42px 38px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #20233b 0%, #172237 58%, #121c2a 100%);
}

.auth-context::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border: 1px solid #9f84dc24;
  border-radius: 50%;
  box-shadow: 0 0 0 42px #9f84dc08, 0 0 0 92px #9f84dc05;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--account-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.auth-context h1,
.account-identity h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -1px;
}

.auth-context > p {
  margin: 18px 0 26px;
  color: #b4c0d1;
  line-height: 1.85;
}

.benefit-card {
  padding: 18px;
  border: 1px solid #5d527b;
  border-radius: 13px;
  background: #17162699;
}

.benefit-label {
  display: block;
  color: #9eaec1;
  font-size: 12px;
}

.benefit-card strong {
  display: block;
  margin: 5px 0 8px;
  color: #e4d7ff;
  font-size: 17px;
}

.guest-identity-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-identity-head > div {
  min-width: 0;
}

.guest-identity-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid #7c688d;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 5px 15px #0005;
}

.guest-identity-head .benefit-label,
.guest-identity-head strong {
  display: block;
}

.guest-identity-head strong {
  margin-bottom: 0;
}

#guest-rights-summary {
  color: #6dd69d;
}

.benefit-card p {
  margin: 0 0 9px;
  color: #aebbd0;
  font-size: 13px;
  line-height: 1.7;
}

.guest-limit-list {
  display: grid;
  gap: 7px;
  margin: 13px 0 15px;
  padding: 0;
  list-style: none;
}

.guest-limit-list li {
  position: relative;
  padding-left: 17px;
  color: #aebbd0;
  font-size: 12px;
  line-height: 1.65;
}

.guest-limit-list li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: #c5a8ff;
  font-weight: 800;
}

.auth-card {
  position: relative;
  padding: 34px 40px 30px;
  background: #141e2b;
}

.auth-card.auth-loading {
  box-shadow: inset 0 0 0 1px #67c5d6;
  animation: account-auth-frame-pulse 1.35s ease-in-out infinite;
}

.auth-card.auth-loading::after,
html.account-loading::after {
  content: "";
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, #73d1df 40%, #b9a1ff 60%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 40% 100%;
  animation: account-loading-slide 1.25s ease-in-out infinite;
}

html.account-loading::after {
  position: fixed;
}

.auth-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #b8c9dd;
  font-size: 12px;
}

.auth-status:empty {
  display: none;
}

.auth-inline-status {
  margin: 12px 0 4px;
  padding: 9px 11px;
  border: 1px solid #6b5a3c;
  border-radius: 7px;
  background: #2a251d;
  color: #f1d39a;
  font-size: 12px;
  line-height: 1.6;
}

.auth-inline-status:empty {
  display: none;
}

@keyframes account-loading-slide {
  from { background-position: -70% 0; }
  to { background-position: 170% 0; }
}

@keyframes account-auth-frame-pulse {
  0%, 100% {
    box-shadow: inset 0 0 0 1px #355169, 0 0 18px #55b8cb24;
  }
  50% {
    box-shadow: inset 0 0 0 1px #75cfe0, 0 0 28px #b9a1ff66;
  }
}

.auth-tabs,
.account-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid #2f4054;
  border-radius: 10px;
  background: #0e1722;
}

.auth-tabs button,
.account-tabs button {
  flex: 1;
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #94a6bb;
  font-weight: 600;
}

.auth-tabs button[aria-selected="true"],
.account-tabs button[aria-selected="true"] {
  background: #283a50;
  color: #fff;
  box-shadow: inset 0 0 0 1px #4d6885;
}

.auth-description {
  margin: 0 0 20px;
  color: var(--account-muted);
  font-size: 13px;
}

.auth-card label:not(.consent):not(.switch-row),
.profile-form label:not(.switch-row) {
  display: block;
  margin: 16px 0 0;
  color: #c1ccda;
  font-size: 13px;
  font-weight: 600;
}

.auth-card input:not([type="checkbox"]),
.profile-form input:not([type="checkbox"]) {
  width: 100%;
  height: 46px;
  margin-top: 7px;
  padding: 0 13px;
  border: 1px solid #40546b;
  border-radius: 8px;
  outline: 0;
  background: #0d1621;
  color: #eef4fc;
  font-size: 15px;
}

.auth-card input:focus,
.profile-form input:focus {
  border-color: #9c81dc;
  box-shadow: 0 0 0 3px #9c81dc1c;
}

.field-help {
  margin: 7px 0 0;
  color: #8295ad !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.7;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 15px 0 0;
  color: #98a9bd;
  font-size: 12px;
  line-height: 1.7;
}

.consent input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  accent-color: var(--account-accent-strong);
}

html.account-page .primary,
html.account-page .secondary-button,
html.account-page .code-row button,
html.account-page .captcha button,
html.account-page .text-button,
html.account-page .preview-actions button,
html.account-page .rights-actions button,
html.account-page .rights-dialog-actions button,
html.account-page .local-test button {
  border-radius: 8px;
  font-weight: 600;
}

html.account-page .primary {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid #b79af1;
  background: var(--account-accent-strong);
  color: #171322;
}

html.account-page .primary:hover:not(:disabled) {
  background: #ba9cf9;
}

html.account-page .primary:disabled {
  cursor: wait;
  opacity: .5;
}

html.account-page .text-button {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--account-accent);
  font-size: 12px;
}

.text-button:hover {
  color: #dfd0ff;
  text-decoration: underline;
}

.captcha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 162px;
  gap: 10px;
  align-items: center;
  margin-top: 7px;
}

.captcha input {
  margin: 0 !important;
}

.captcha button {
  width: 162px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #40546b;
  background: #202a38;
}

.captcha img {
  display: block;
  width: 160px;
  height: 46px;
  object-fit: cover;
  border-radius: 7px;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  margin-top: 7px;
}

.code-row input {
  margin: 0 !important;
}

.code-row button {
  height: 46px;
  padding: 0 10px;
  border: 1px solid #58728f;
  background: #24364a;
  color: #dce9f8;
}

.account-terms {
  margin-top: 20px;
  color: #899cb2;
  font-size: 12px;
}

.account-terms summary {
  cursor: pointer;
}

.account-terms p {
  margin: 10px 0 0;
  line-height: 1.8;
}

.preview-tools {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border: 1px dashed #465a72;
  border-radius: 11px;
  background: #111b28;
}

.preview-tools strong {
  color: #d8e1ed;
  font-size: 13px;
}

.preview-tools p {
  margin: 3px 0 0;
  color: #8194ab;
  font-size: 11px;
  line-height: 1.6;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.preview-actions button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #526982;
  background: #1d2b3b;
  color: #cbd8e7;
  font-size: 12px;
}

.preview-actions button:hover {
  border-color: #a999d1;
  color: #fff;
}

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #8d744a;
  border-radius: 9px;
  background: #2a251d;
  color: #ead7ae;
  font-size: 12px;
}

.preview-banner button {
  flex: none;
  padding: 5px 9px;
  border: 1px solid #a18b60;
  border-radius: 6px;
  background: transparent;
  color: #f1dfb5;
}

.preview-showcase {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--account-border);
  border-radius: 18px;
  background:
    linear-gradient(150deg, #172333 0%, #121c29 58%, #101925 100%);
  box-shadow: 0 16px 42px #0003;
}

.preview-showcase-heading {
  display: block;
  margin-bottom: 18px;
}

.preview-showcase-heading .eyebrow {
  margin-bottom: 5px;
}

.preview-showcase-heading h2 {
  margin: 0;
  color: #f3f7fc;
  font-size: 22px;
  line-height: 1.3;
}

.preview-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.preview-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 330px;
  padding: 18px;
  border: 1px solid #34475d;
  border-radius: 13px;
  background: #121d2a;
  box-shadow: inset 0 1px #ffffff08;
}

.preview-column-registered {
  border-color: #4d6381;
  background: linear-gradient(155deg, #18283a, #121d2a 72%);
}

.preview-column-donor {
  border-color: #65577e;
  background: linear-gradient(155deg, #241f35, #151d2c 72%);
}

.preview-column-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 14px;
  border-bottom: 1px solid #2b3a4d;
}

.preview-column-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid #60738d;
  border-radius: 10px;
  background: #1b2a3d;
  color: #c9d7e8;
  object-fit: cover;
  box-shadow: 0 3px 10px #0004;
}

.preview-column-donor .preview-column-icon {
  border-color: #7d68a0;
  background: #2b2440;
  color: #ddcdfb;
}

.preview-column-head small {
  display: block;
  color: #8296ad;
  font-size: 10px;
  letter-spacing: 1px;
}

.preview-column-head h3 {
  margin: 2px 0 0;
  color: #f0f5fb;
  font-size: 17px;
  line-height: 1.35;
}

.preview-column-registered h3 {
  color: #70aef5;
}

.preview-column-donor h3 {
  color: #c5a8ff;
}

.preview-column > p {
  margin: 14px 0 0;
  color: #a4b4c7;
  font-size: 12px;
  line-height: 1.7;
}

.preview-example-badge {
  align-self: flex-start;
  margin-top: 13px;
  padding: 3px 7px;
  border: 1px solid #675886;
  border-radius: 999px;
  background: #2b2540;
  color: #d7c7f3;
  font-size: 10px;
}

.preview-column ul {
  display: grid;
  gap: 8px;
  margin: 15px 0 20px;
  padding: 0;
  list-style: none;
}

.preview-column li {
  position: relative;
  padding-left: 18px;
  color: #aebdd0;
  font-size: 12px;
  line-height: 1.65;
}

.preview-column li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #7bd3ad;
  font-weight: 800;
}

.preview-column-donor li::before {
  color: #c5a8ff;
}

.preview-donation-statement {
  margin: 4px 0 18px !important;
  padding: 13px 14px;
  border: 1px solid #4e4864;
  border-radius: 9px;
  background: #1b1c2b;
  color: #b7bdd0 !important;
  font-size: 11px !important;
  line-height: 1.8 !important;
}

.preview-donation-statement strong {
  color: var(--account-gold);
  font-weight: 700;
}

.preview-column > button {
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  padding: 9px 12px;
  border: 1px solid #627a97;
  border-radius: 8px;
  background: #20344a;
  color: #e2edf9;
  font-size: 12px;
  font-weight: 650;
}

.donation-cta-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
  margin-top: auto;
}

.donation-provider-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0;
}

.donation-provider-logo img {
  display: block;
  width: 104px;
  height: 24px;
  object-fit: contain;
}

.donation-cta {
  width: 100%;
  min-height: 54px;
  padding: 10px 18px;
  border: 1px solid #65bd83;
  border-radius: 9px;
  background: linear-gradient(135deg, #177944, #1ca55a);
  color: #fff;
  box-shadow: 0 7px 18px #1a833d38;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.preview-column > button:hover,
.preview-column > button:focus-visible {
  border-color: #c1d0e2;
  background: #2a415a;
  color: #fff;
}

.donation-cta:hover,
.donation-cta:focus-visible {
  border-color: #a0e4b8;
  background: linear-gradient(135deg, #1b8b50, #24b968);
  color: #fff;
}

.guest-rights-preview {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #4a5d74;
  border-radius: 11px;
  background: #101a26;
}

.guest-rights-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guest-rights-heading h2 {
  margin: 0;
  font-size: 18px;
}

.guest-rights-heading button {
  padding: 6px 9px;
  border: 1px solid #536981;
  border-radius: 7px;
  background: transparent;
  color: #c5d2e2;
  font-size: 12px;
}

.guest-rights-preview .rights-content > h2 {
  display: none;
}

.guest-rights-preview .rights-summary-card {
  margin-top: 12px;
}

/* Signed-in account hub. */
.account-view {
  overflow: hidden;
  border: 1px solid var(--account-border);
  border-radius: 18px;
  background: var(--account-panel);
  box-shadow: 0 18px 50px #0004;
}

.account-hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 25px 28px 22px;
  border-bottom: 1px solid #2d3a4b;
  background: linear-gradient(120deg, #20283e, #162232 65%);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #73618f;
  border-radius: 16px;
  background: #211d32;
  color: var(--account-accent);
}

.account-avatar svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.account-identity .eyebrow {
  margin-bottom: 2px;
}

.account-identity h1 {
  font-size: 27px;
}

.account-identity p {
  margin: 4px 0 0;
  overflow: hidden;
  color: #9dafc3;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-divider {
  margin: 0 7px;
  color: #61758c;
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #315c49;
  border-radius: 999px;
  background: #142a23;
  color: #a9e4c4;
  font-size: 11px;
  white-space: nowrap;
}

.account-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--account-good);
  box-shadow: 0 0 9px #65d59c88;
}

.admin-link {
  padding: 7px 10px;
  border: 1px solid #5b4b7c;
  border-radius: 7px;
  color: #cdb9fa;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.account-tabs {
  margin: 18px 26px 0;
}

.account-panel {
  padding: 20px 26px 24px;
}

.settings-card {
  overflow: hidden;
  border: 1px solid #314156;
  border-radius: 12px;
  background: #121c28;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
}

.setting-row + .setting-row {
  border-top: 1px solid #29384a;
}

.setting-row strong,
.switch-row strong {
  color: #e2eaf4;
  font-size: 14px;
}

.setting-row p,
.switch-row small {
  display: block;
  margin: 3px 0 0;
  color: #8295ab;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
}

.setting-value {
  overflow-wrap: anywhere;
  color: #c8d5e4;
  font-size: 13px;
  text-align: right;
}

.profile-form {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #314156;
  border-radius: 12px;
  background: #121c28;
}

.account-name-settings {
  margin: 16px 26px 0;
}

.account-hero .account-name-settings {
  grid-column: 1 / -1;
  margin: 3px 0 0;
  padding: 15px 0 0;
  border: 0;
  border-top: 1px solid #334155;
  border-radius: 0;
  background: transparent;
}

.rights-standalone {
  padding-top: 16px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  color: #c3cedd;
}

.switch-row input {
  width: 21px;
  height: 21px;
  flex: none;
  accent-color: var(--account-accent-strong);
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form label {
  margin: 0 !important;
}

.profile-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.profile-actions .primary,
.profile-actions .secondary-button {
  width: auto;
  min-width: 118px;
  margin: 0;
}

.secondary-button {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #40536a;
  background: transparent;
  color: #aebdd0;
}

.secondary-button:hover {
  border-color: #687f99;
  color: #fff;
}

.message {
  min-height: 24px;
  margin: 0 26px 20px;
  color: #efc984;
  font-size: 12px;
  line-height: 1.7;
}

.message:empty {
  display: none;
}

/* Rights content, moved inside the account center. */
.rights-content h2 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 21px;
}

.rights-content > p {
  margin: 7px 0;
  color: #9eb0c4;
  font-size: 13px;
}

.rights-loading-card {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 20px 18px;
  overflow: hidden;
  border: 1px solid #485778;
  border-radius: 11px;
  background: linear-gradient(120deg, #1d2236, #172435);
}

.rights-loading-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #73d1df 40%, #b9a1ff 60%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 40% 100%;
  animation: account-loading-slide 1.25s ease-in-out infinite;
}

.rights-loading-card strong {
  color: #e8dcff;
  font-size: 15px;
}

.rights-loading-card span {
  color: #8fa2b8;
  font-size: 11px;
}

.rights-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #485778;
  border-radius: 11px;
  background: linear-gradient(120deg, #1d2236, #172435);
}

.rights-summary-card strong {
  display: block;
  margin-bottom: 3px;
  color: #e8dcff;
  font-size: 16px;
}

.rights-summary-card p {
  margin: 0;
  color: #a8b7ca;
  font-size: 12px;
}

.account-rights-status {
  grid-template-columns: minmax(0, 1fr);
}

.account-rights-status .rights-status-label {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 2px 7px;
  border: 1px solid #5b4b7c;
  border-radius: 999px;
  background: #29213d;
  color: #d8c5ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}

.account-rights-columns {
  margin-top: 16px;
}

.account-rights-card {
  min-height: 330px;
}

.account-rights-card > ul {
  margin-bottom: 18px;
}

.account-rights-donation {
  margin-top: auto;
}

.account-rights-details {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #314156;
  border-radius: 11px;
  background: #101a26;
}

.account-rights-details summary {
  color: #c8d6e6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.account-rights-details p {
  margin: 10px 0 0;
  color: #8fa2b8;
  font-size: 11px;
  line-height: 1.75;
}

.account-rights-details ul {
  display: grid;
  gap: 7px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.account-rights-details li {
  position: relative;
  padding-left: 20px;
  color: #aab8c9;
  font-size: 12px;
  line-height: 1.65;
}

.account-rights-details li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--account-danger);
  font-weight: 800;
}

.rights-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rights-actions button,
.rights-dialog-actions button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid #5d718c;
  background: #233448;
  color: #dce9f7;
}

.rights-actions .donation-button {
  border-color: #75b68f;
  background: #173529;
  color: #c9f0d8;
}

.rights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rights-section {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #314156;
  border-radius: 11px;
  background: #121c28;
}

.rights-section h3 {
  margin: 0 0 8px;
  color: #dce6f2;
  font-size: 14px;
}

.rights-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rights-section li {
  position: relative;
  padding-left: 20px;
  color: #aab8c9;
  font-size: 12px;
  line-height: 1.65;
}

.rights-owned li::before,
.rights-missing li::before {
  position: absolute;
  left: 0;
  font-weight: 800;
}

.rights-owned li::before {
  content: "✓";
  color: var(--account-good);
}

.rights-missing li::before {
  content: "×";
  color: var(--account-danger);
}

.rights-note {
  color: #8195aa !important;
  font-size: 11px !important;
}

.local-test {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #59677d;
  border-radius: 10px;
  background: #101925;
}

.local-test h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.local-test-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.local-test select {
  min-height: 38px;
  flex: 1 1 210px;
  border: 1px solid #455970;
  border-radius: 7px;
  background: #172435;
  color: #dbe7f5;
  padding: 6px 9px;
}

.local-test button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #58718d;
  background: #22354a;
  color: #dce9f7;
}

.account-footer {
  padding: 8px 16px 24px;
  color: #687b91;
  font-size: 11px;
  text-align: center;
}

html.account-loading .account-shell,
html.account-loading .account-page-header,
html.account-loading .account-footer {
  visibility: hidden;
}

html.account-loading body::before {
  content: "正在加载账户中心…";
  display: block;
  padding: 48px 20px;
  color: #879bb0;
  font: 13px/1.6 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .auth-card.auth-loading,
  .auth-card.auth-loading::after,
  html.account-loading::after,
  .rights-loading-card::after {
    animation: none;
  }

  .auth-card.auth-loading::after,
  html.account-loading::after,
  .rights-loading-card::after {
    background-position: 50% 0;
  }
}

html.embedded {
  background: var(--account-bg);
}

html.embedded body {
  padding: 16px;
  background: var(--account-bg);
}

html.embedded .account-page-header,
html.embedded .account-footer {
  display: none;
}

html.embedded .account-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

html.embedded .auth-layout,
html.embedded .account-view {
  min-height: 0;
  border-radius: 12px;
  box-shadow: none;
}

html.embedded .auth-context {
  padding: 30px 26px;
}

html.embedded .auth-context h1 {
  font-size: 34px;
}

html.embedded .auth-card {
  padding: 26px 28px 24px;
}

html.standalone .account-shell {
  margin-top: 18px;
}

@media (max-width: 820px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-context {
    padding: 28px 26px;
  }

  .auth-context > p {
    margin-bottom: 16px;
  }

  .preview-showcase-heading,
  .preview-columns {
    grid-template-columns: 1fr;
  }

  .preview-showcase-heading {
    gap: 8px;
  }

  .preview-showcase-heading > p {
    text-align: left;
  }

  .preview-column {
    min-height: 0;
  }

  .account-hero {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    padding: 20px;
  }

  .account-avatar {
    width: 52px;
    height: 52px;
  }

  .admin-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .account-tabs {
    margin: 14px 18px 0;
  }

  .account-panel {
    padding: 16px 18px 20px;
  }

  .account-name-settings {
    margin: 14px 18px 0;
  }

  .message {
    margin: 0 18px 16px;
  }
}

@media (max-width: 620px) {
  html body .gugu-auth-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }

  html body .gugu-auth-dialog iframe {
    height: calc(100% - 46px);
  }

  html body .gugu-auth-dialog .gugu-auth-bar {
    height: 46px;
  }

  html.embedded body {
    padding: 8px;
  }

  .account-page-header {
    padding: 16px 4px;
  }

  .account-brand b {
    font-size: 18px;
  }

  .account-shell {
    width: calc(100% - 16px);
  }

  .auth-card {
    padding: 22px 18px;
  }

  .auth-context {
    padding: 26px 20px;
  }

  .preview-tools {
    margin-top: 18px;
    padding: 13px;
  }

  .preview-showcase {
    padding: 15px;
    border-radius: 14px;
  }

  .captcha {
    grid-template-columns: minmax(0, 1fr) 128px;
  }

  .captcha button,
  .captcha img {
    width: 128px;
  }

  .code-row {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .account-hero {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }

  .account-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .account-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .account-tabs {
    margin: 12px 14px 0;
  }

  .account-panel {
    padding: 14px;
  }

  .setting-row,
  .password-grid,
  .rights-grid,
  .rights-summary-card {
    grid-template-columns: 1fr;
  }

  .setting-value {
    text-align: left;
  }

  .profile-form {
    padding: 14px;
  }

  .switch-row {
    align-items: flex-start;
  }

  .profile-actions {
    flex-direction: column-reverse;
  }

  .profile-actions .primary,
  .profile-actions .secondary-button {
    width: 100%;
  }

  .rights-actions {
    justify-content: flex-start;
  }

  .preview-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}
