:root {
  color: #1c2a38;
  background: #f8fbff;
  font-family: system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  --ink: #1c2a38;
  --muted: #5b7185;
  --sky: #5bbcff;
  --grass: #57c785;
  --sun: #ffd45c;
  --coral: #ff7e67;
  --ai: #45e2ff;
  --violet: #8a6cff;
  --paper: #fffaf0;
  --panel: #ffffff;
  --line: #d7e7f3;
  --shadow: 0 18px 45px rgba(42, 88, 130, 0.16);
  --bounce: all 0.24s ease;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 212, 92, 0.32), transparent 24rem),
    radial-gradient(circle at 90% 6%, rgba(69, 226, 255, 0.26), transparent 22rem),
    linear-gradient(180deg, #e8f8ff 0%, #f8fbff 38%, #fff8e6 100%);
}

.release-identity {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 1000;
  max-width: min(420px, calc(100vw - 24px));
  border: 2px solid #5135a7;
  border-radius: 14px;
  color: #22143d;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(31, 16, 61, 0.24);
  font-size: 0.78rem;
}

.release-identity summary {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 5px 9px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.release-identity summary::-webkit-details-marker {
  display: none;
}

.release-identity-badge {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 22px;
  padding: 1px 7px;
  border-radius: 6px;
  color: #fff;
  background: #5135a7;
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.release-identity dl {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(81, 53, 167, 0.24);
}

.release-identity dl div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
}

.release-identity dt {
  font-weight: 800;
}

.release-identity dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.release-identity[data-environment="publicTest"] {
  border: 3px solid #151026;
  color: #151026;
  background: #ffe600;
  box-shadow: 0 7px 0 #ff3cc7, 0 12px 24px rgba(21, 16, 38, 0.3);
}

.release-header-environment {
  position: absolute;
  top: 8px;
  right: max(12px, env(safe-area-inset-right));
  z-index: 6;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 2px solid #151026;
  border-radius: 8px;
  color: #151026;
  background: #ffe600;
  box-shadow: 3px 3px 0 #ff3cc7;
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.release-header-environment[data-environment="lanTest"] {
  color: #32e6ff;
  background: #071d29;
  box-shadow: 3px 3px 0 #fff;
}

.release-header-environment[data-environment="localTest"] {
  color: #5dff91;
  background: #092119;
  box-shadow: 3px 3px 0 #fff;
}

.release-identity[data-environment="publicTest"] .release-identity-badge {
  color: #fff;
  background: #151026;
}

.release-identity[data-environment="lanTest"] {
  border-color: #071d29;
  color: #071d29;
  background: #32e6ff;
}

.release-identity[data-environment="lanTest"] .release-identity-badge {
  color: #32e6ff;
  background: #071d29;
}

.release-identity[data-environment="localTest"] {
  border-color: #092119;
  color: #092119;
  background: #5dff91;
}

.release-identity[data-environment="localTest"] .release-identity-badge {
  color: #5dff91;
  background: #092119;
}

.release-identity[data-environment="production"] {
  border-width: 1px;
  opacity: 0.88;
}

.release-identity[data-environment="production"] .release-identity-badge {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 150px;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 28px, rgba(87, 199, 133, 0.14) 0) 0 0 / 62px 62px,
    linear-gradient(225deg, transparent 28px, rgba(91, 188, 255, 0.12) 0) 0 0 / 62px 62px;
  opacity: 0.7;
}

.privacy-policy-page {
  background:
    radial-gradient(circle at 12% 4%, rgba(69, 226, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 2%, rgba(138, 108, 255, 0.14), transparent 25rem),
    #f6fbff;
}

.privacy-policy-header,
.privacy-policy-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.privacy-policy-header {
  padding: 20px 0 10px;
}

.privacy-policy-header nav {
  margin: 0;
}

.privacy-policy-brand img {
  display: block;
  width: 86px;
  height: 62px;
  object-fit: contain;
}

.privacy-policy-main {
  width: min(920px, calc(100% - 32px));
  padding-top: 20px;
}

.privacy-policy-hero,
.privacy-policy-content {
  padding: clamp(22px, 5vw, 46px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(202, 225, 241, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.privacy-policy-hero {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(69, 226, 255, 0.16), rgba(138, 108, 255, 0.1)),
    rgba(255, 255, 255, 0.94);
}

.privacy-policy-kicker {
  margin: 0 0 12px;
  color: #7254dc;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.privacy-policy-date {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid #d7e7f3;
}

.privacy-policy-content {
  margin-top: 24px;
}

.privacy-policy-content h2 {
  margin: 30px 0 8px;
  color: #1e526f;
  font-size: 1.3rem;
}

.privacy-policy-content section:first-of-type h2 {
  margin-top: 12px;
}

.privacy-policy-content li {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.7;
}

.privacy-policy-footer {
  padding: 8px 0 42px;
}

.privacy-policy-footer p {
  margin: 0;
}

a {
  color: #0c65a8;
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: #ff6a4b;
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 12px;
  color: #173247;
  background: linear-gradient(180deg, #ffe681, #ffc83d);
  box-shadow: 0 4px 0 #d99314, 0 12px 24px rgba(240, 157, 36, 0.22);
  cursor: pointer;
  font-weight: 800;
  transition: var(--bounce);
}

button:hover,
.button-link:hover {
  color: #173247;
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 2px solid #cae1f1;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ai);
  box-shadow: 0 0 0 4px rgba(69, 226, 255, 0.18);
  outline: none;
}

main {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.home-page.user-mode main {
  width: 100%;
  min-height: calc(100vh - 1px);
  padding: 28px max(16px, calc((100vw - 1120px) / 2)) 52px;
  overflow: clip;
  isolation: isolate;
}

.home-page.user-mode main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.4) 34%, rgba(255, 255, 255, 0.66) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.46) 44%, rgba(255, 255, 255, 0.2) 100%);
}

.main-bg-video {
  display: none;
}

.home-page.user-mode .main-bg-video {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center center;
}

.home-page.user-mode .headline-card,
.home-page.user-mode .feature-card,
.home-page.user-mode .portal-card,
.home-page.user-mode dl,
.home-page.user-mode #status {
  background: #fff;
}

.home-page.user-mode .headline-card-primary {
  background: linear-gradient(135deg, #fff0ec, #fff);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.02;
  color: #18405e;
}

h2 {
  margin: 30px 0 14px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  color: #214d6d;
}

p {
  color: var(--muted);
  line-height: 1.75;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #cae1f1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

form,
fieldset,
section,
dl {
  border-radius: 18px;
}

form {
  display: grid;
  gap: 14px;
  max-width: 620px;
  padding: 20px;
  border: 2px solid #dcecf6;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

form + form {
  margin-top: 18px;
}

.register-submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.privacy-consent {
  margin: 0;
  white-space: nowrap;
}

.privacy-consent a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.register-status {
  margin: 0;
}

label {
  display: grid;
  gap: 6px;
  color: #24465f;
  font-weight: 800;
}

label:has(input[type="radio"]),
label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  min-height: 0;
  padding: 0;
  accent-color: #ff7e67;
}

fieldset {
  border: 2px dashed #b8dced;
  background: #f6fcff;
}

legend {
  padding: 0 8px;
  color: #214d6d;
  font-weight: 900;
}

ul {
  line-height: 1.8;
}

code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #eaf7ff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#sessionHeader {
  position: sticky;
  top: 0;
  z-index: 10;
  --header-logo-left: max(16px, calc((100vw - 1120px) / 2));
  --header-logo-top: 8px;
  --header-logo-width: min(720px, calc(100vw - 32px));
  --header-logo-height: calc(var(--header-logo-width) * 828 / 1900);
  --header-logo-click-reserve: 0px;
  --header-nav-height: 42px;
  --header-nav-overlap: 36px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
  min-height: calc(var(--header-logo-top) + var(--header-logo-height) + var(--header-nav-height) - var(--header-nav-overlap));
  padding: calc(var(--header-logo-top) + var(--header-logo-height) - var(--header-nav-overlap)) max(16px, calc((100vw - 1120px) / 2)) 0;
  border-bottom: 2px solid rgba(184, 220, 237, 0.7);
  background:
    radial-gradient(circle at min(1060px, 88vw) 34px, rgba(255, 31, 45, 0.22), transparent 122px),
    radial-gradient(circle at 64% 18px, rgba(138, 108, 255, 0.24), transparent 180px),
    linear-gradient(105deg, transparent 0 56%, rgba(255, 240, 236, 0.18) 56% 59%, transparent 59% 64%, rgba(69, 226, 255, 0.2) 64% 67%, transparent 67%),
    linear-gradient(105deg, #fff0ec 0%, #e9d9ff 44%, #cbe9ff 100%);
  backdrop-filter: blur(14px);
}

#sessionHeader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("/assets/logo/speedmind-logo-chibi-transparent-v1.png") left var(--header-logo-left) top var(--header-logo-top) / var(--header-logo-width) auto no-repeat;
}

.target-rain-canvas {
  position: absolute;
  top: 0;
  right: max(0px, calc((100vw - 1120px) / 2 + 72px));
  z-index: 0;
  width: min(360px, 50vw);
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.72;
  mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 100%);
}

.brand-mark {
  position: absolute;
  left: var(--header-logo-left);
  top: var(--header-logo-top);
  z-index: 3;
  display: block;
  width: max(0px, calc(var(--header-logo-width) - var(--header-logo-click-reserve)));
  height: var(--header-logo-height);
  color: #173247;
  font-size: 1.2rem;
  font-weight: 1000;
}

.user-mode #sessionHeader {
  --header-logo-click-reserve: 96px;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sun), var(--coral));
  box-shadow: 0 4px 0 #d99314;
}

.site-nav {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
}

.header-user-badge {
  position: absolute;
  z-index: 0;
  top: 18px;
  right: max(16px, calc((100vw - 1120px) / 2));
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding: 0;
  border: 2px solid rgba(255, 127, 24, 0.88);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #173247;
  overflow: hidden;
}

.header-user-badge .identity-avatar {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border: 0;
  box-shadow: none;
}

.header-user-badge .identity-avatar.preset-avatar-image {
  inset: 2px;
  width: calc(100% - 4px) !important;
  height: calc(100% - 4px) !important;
}

.header-user-badge .identity-avatar-fallback {
  display: none;
}

.header-user-badge .identity-name {
  display: none;
}

.site-nav a,
.nav-logout-button,
.session-user {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(84, 0, 0, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 240, 236, 0.48), rgba(255, 0, 0, 0.08));
  color: #ff1f2d;
  box-shadow: 0 1px 0 rgba(84, 0, 0, 0.14);
  font-size: 0.94rem;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 240, 236, 0.88);
  transform: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-logout-button:hover,
.nav-logout-button:focus-visible {
  color: #ff1f2d;
  background: linear-gradient(180deg, rgba(255, 240, 236, 0.64), rgba(255, 0, 0, 0.12));
  box-shadow: 0 1px 0 rgba(84, 0, 0, 0.18);
  transform: none;
}

.session-user {
  border: 1px solid #cae1f1;
  font-weight: 700;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  padding: 28px max(16px, calc((100vw - 1120px) / 2));
  color: #315a74;
  background: #e5f6ff;
  border-top: 2px solid #c8e7f8;
}

.site-footer nav {
  margin: 10px 0 0;
}

.footer-release-version {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  color: currentColor;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0.48;
  white-space: nowrap;
}

.shell-contract-error {
  margin: 0 auto;
  color: #8b1e2d;
  font-weight: 800;
  text-align: center;
}

.footer-language-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.footer-language-control label {
  font-weight: 900;
}

.footer-language-control select {
  width: auto;
  min-width: 150px;
  margin: 0;
  padding: 8px 34px 8px 10px;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.footer-social-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #315a74;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(49, 90, 116, 0.16);
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(49, 90, 116, 0.1);
}

.footer-social-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.footer-social-icon-discord {
  color: #5865f2;
}

.footer-social-icon-youtube {
  color: #ff0033;
}

.footer-social-icon-instagram {
  color: #c13584;
}

.footer-social-icon-twitch {
  color: #9146ff;
}

.guest-mode:not(.auth-page) main {
  display: none;
}

.auth-page main > h1,
.auth-page main > .page-character,
.auth-page main > form,
.auth-page main > #status {
  margin-left: auto;
  margin-right: auto;
}

.auth-page main > h1 {
  display: none;
  max-width: 620px;
  text-align: center;
}

.auth-page main > .page-character {
  float: none;
  display: block;
  width: clamp(110px, 15vw, 170px);
  margin-top: 20px;
  margin-bottom: 16px;
}

.auth-page main > .auth-hero-character {
  width: min(440px, 72vw);
  max-height: 150px;
  object-fit: contain;
  object-position: center center;
}

.login-page main {
  width: 100%;
  padding-right: max(16px, calc((100vw - 1120px) / 2));
  padding-left: max(16px, calc((100vw - 1120px) / 2));
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.72)),
    url("/assets/hero/web-login-character-targets-bg-800x1400.png") center top / cover no-repeat;
}

.membership-hero-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2048 / 845;
  margin: 0 0 22px;
  border-radius: 8px;
  background: #fff7d9;
  box-shadow: var(--shadow);
}

.membership-hero-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.membership-hero-banner p {
  position: absolute;
  left: clamp(18px, 5vw, 56px);
  top: 50%;
  max-width: min(48%, 520px);
  margin: 0;
  color: #18405e;
  font-size: clamp(1.45rem, 4.8vw, 4.2rem);
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8), 0 10px 28px rgba(24, 64, 94, 0.18);
  transform: translateY(-50%);
}

.membership-renewal-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 900;
  line-height: 1.45;
}

.membership-renewal-consent[hidden] {
  display: none;
}

.membership-renewal-consent input {
  width: auto;
  min-width: 18px;
  margin-top: 3px;
}

.membership-payment-note,
.membership-extension-note {
  margin: 0;
  color: #315a74;
  font-weight: 900;
  line-height: 1.5;
}

.membership-page main.membership-dashboard {
  width: 100%;
  padding-top: 12px;
  padding-right: max(16px, calc((100vw - 1120px) / 2));
  padding-left: max(16px, calc((100vw - 1120px) / 2));
  border-radius: 0;
}

.settings-page main.settings-dashboard {
  width: 100%;
  padding-right: max(16px, calc((100vw - 1120px) / 2));
  padding-left: max(16px, calc((100vw - 1120px) / 2));
  background:
    linear-gradient(180deg, rgba(246, 252, 255, 0.72), rgba(246, 252, 255, 0.84)),
    url("/assets/settings/settings-control-room-v1.png") center top / cover no-repeat,
    linear-gradient(180deg, #f7fcff 0%, #fffdf4 58%, #e8f8ff 100%);
}

.settings-title-block {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 18px;
}

.settings-title-block h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.settings-display-name-button {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: 1.08;
  text-align: left;
}

.settings-display-name-button:hover,
.settings-display-name-button:focus-visible {
  transform: none;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}

.settings-title-avatar {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  min-height: 0;
  flex: 0 0 72px;
  padding: 0;
  overflow: hidden;
  border: 3px solid rgba(255, 127, 24, 0.9);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 230, 129, 0.82));
  box-shadow: 0 8px 18px rgba(42, 88, 130, 0.16);
  color: #173247;
  font-size: 1.35rem;
  font-weight: 1000;
}

.settings-title-avatar:hover,
.settings-title-avatar:focus-visible {
  transform: translateY(-1px);
}

.settings-title-avatar img,
.settings-title-avatar span {
  width: 100%;
  height: 100%;
}

.settings-title-avatar img {
  display: block;
  object-fit: cover;
}

.preset-avatar-image {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
}

.settings-title-avatar span {
  display: grid;
  place-items: center;
  padding: 8px;
  line-height: 1;
  text-align: center;
  word-break: break-all;
}

.settings-avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 18px;
  padding: 10px;
  border: 1px solid #a8d0e4;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.settings-avatar-picker[hidden] {
  display: none;
}

.settings-name-dialog,
.settings-phone-dialog,
.settings-account-delete-dialog {
  width: min(420px, calc(100vw - 36px));
  padding: 0;
  border: 2px solid #bddff0;
  border-radius: 8px;
  background: #fff;
  color: #214d6d;
  box-shadow: 0 24px 60px rgba(31, 92, 132, 0.28);
}

.settings-name-dialog::backdrop,
.settings-phone-dialog::backdrop,
.settings-account-delete-dialog::backdrop {
  background: rgba(18, 58, 87, 0.28);
}

.settings-name-dialog form,
.settings-phone-dialog form,
.settings-account-delete-dialog form {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-name-dialog h2,
.settings-phone-dialog h2,
.settings-account-delete-dialog h2 {
  margin: 0;
  font-size: 1.2rem;
}

.settings-name-field,
.settings-phone-field {
  display: grid;
  gap: 8px;
}

.settings-profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.settings-profile-row {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border: 2px solid rgba(189, 223, 240, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.settings-profile-row dt {
  color: #214d6d;
  font-weight: 900;
}

.settings-profile-row dd {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
  margin: 0;
  color: #5d768d;
}

.settings-profile-row dd > span,
.settings-profile-row dd#settingsEmailValue {
  overflow-wrap: anywhere;
}

.settings-inline-edit {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.settings-danger-zone {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 22px;
  padding: 16px;
  border: 2px solid rgba(195, 47, 58, 0.38);
  border-radius: 8px;
  background: rgba(255, 244, 245, 0.86);
}

.settings-danger-zone h3,
.settings-danger-zone p,
.settings-account-delete-dialog p {
  margin: 0;
}

.settings-danger-zone h3,
.settings-account-delete-warning,
.settings-account-delete-status {
  color: #8b1e2d;
}

.settings-danger-button {
  color: #fff;
  background: linear-gradient(180deg, #e85b61, #bd2632);
  box-shadow: 0 4px 0 #861721, 0 12px 24px rgba(189, 38, 50, 0.2);
}

.settings-danger-button:hover,
.settings-danger-button:focus-visible {
  color: #fff;
}

.settings-account-delete-acknowledgement {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.settings-account-delete-acknowledgement input {
  margin-top: 4px;
}

.settings-account-delete-dialog [hidden] {
  display: none;
}

.settings-account-delete-status {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff1f2;
  font-weight: 800;
}

.settings-security-form {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-security-form label {
  display: grid;
  gap: 6px;
}

.settings-password-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef8fc;
  color: #214d6d;
  font-weight: 800;
}

.settings-password-status[hidden] {
  display: none;
}

.settings-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.settings-security-form,
.settings-two-factor-panel {
  align-content: start;
  min-width: 0;
  padding: 16px;
  border: 2px solid rgba(189, 223, 240, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.settings-two-factor-panel {
  display: grid;
  gap: 14px;
}

.settings-two-factor-panel .settings-security-switch-row {
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 860px) {
  .settings-security-grid {
    grid-template-columns: 1fr;
  }
}

.settings-select-stack {
  display: grid;
  gap: 14px;
}

.settings-select-stack label {
  display: grid;
  gap: 8px;
}

.settings-daily-new-marks-form {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-daily-new-marks-form label {
  display: grid;
  gap: 8px;
}

.settings-daily-new-marks-form label > span {
  color: #214d6d;
  font-weight: 900;
}

.settings-daily-new-marks-form input {
  width: 112px;
  min-width: 0;
  text-align: center;
}

.settings-voice-form {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-voice-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-voice-form legend,
.settings-voice-rate-field > span {
  width: 100%;
  margin-bottom: 8px;
  color: #214d6d;
  font-weight: 900;
}

.settings-voice-form fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.settings-voice-rate-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  width: min(100%, 420px);
}

.settings-voice-rate-field > span {
  grid-column: 1 / -1;
}

.settings-voice-rate-field input {
  width: 100%;
  min-width: 0;
}

.settings-voice-rate-field output {
  min-width: 3.4em;
  color: #163d5a;
  font-weight: 900;
  text-align: right;
}

.settings-voice-hint {
  color: #49697f;
  font-size: 0.9rem;
  line-height: 1.55;
}

.settings-cockpit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-cockpit-card {
  position: relative;
  display: grid;
  padding: 0;
  border: 2px solid #bddff0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #214d6d;
  font-weight: 900;
  overflow: hidden;
}

.settings-cockpit-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.settings-cockpit-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  background: #e9f3f8;
}

.settings-cockpit-card.is-selected {
  border-color: #ff7f18;
  box-shadow: 0 10px 22px rgba(42, 88, 130, 0.18);
}

.settings-security-form label > span,
.settings-security-switch-row > span,
.settings-select-stack label > span {
  color: #214d6d;
  font-weight: 900;
}

.settings-security-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding-top: 6px;
  border-top: 1px solid rgba(168, 208, 228, 0.72);
}

.settings-switch {
  position: relative;
  display: inline-grid;
  width: 58px;
  height: 32px;
  flex: 0 0 auto;
}

.settings-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.settings-switch-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid #bddff0;
  border-radius: 999px;
  background: #e9f3f8;
}

.settings-switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 92, 132, 0.22);
  content: "";
}

.settings-switch input:checked + .settings-switch-track {
  border-color: #35b5d8;
  background: #88def4;
}

.settings-switch input:checked + .settings-switch-track::after {
  transform: translateX(26px);
}

.settings-switch input:disabled + .settings-switch-track {
  opacity: 0.55;
}

.settings-avatar-option {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  min-height: 0;
  padding: 4px;
  border: 2px solid #b8dced;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 14px rgba(42, 88, 130, 0.12);
  overflow: hidden;
}

.settings-avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-panel {
  margin: 0 0 24px;
}

.settings-panel-heading h2 {
  margin: 0;
}

.settings-tab-list {
  display: flex;
  align-items: end;
  gap: 0;
  padding: 0;
  overflow: visible;
  isolation: isolate;
}

.settings-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 10px 8px;
  border: 1px solid #a8d0e4;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #ffffff 0%, #e8f6fc 100%);
  color: #2d6587;
  box-shadow:
    inset 10px 0 12px -14px rgba(18, 58, 87, 0.5),
    inset -10px 0 12px -14px rgba(18, 58, 87, 0.5);
}

.settings-tab + .settings-tab {
  margin-left: -8px;
}

.settings-tab.is-active {
  z-index: 2;
  color: #123a57;
  background: #fff;
  box-shadow: 0 -8px 20px rgba(72, 121, 153, 0.12);
}

.settings-tab-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #a8d0e4;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.settings-tab-panel[hidden] {
  display: none;
}

.settings-tab-panel p {
  margin: 0;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.membership-dashboard > h2:first-child {
  margin-top: 8px;
}

.membership-tabs {
  margin: 18px 0 24px;
}

.membership-tab-list {
  display: flex;
  align-items: end;
  gap: 0;
  padding: 0;
  overflow: visible;
  isolation: isolate;
}

.membership-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 10px 8px;
  border: 1px solid #a8d0e4;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #ffffff 0%, #e8f6fc 100%);
  color: #2d6587;
  box-shadow:
    inset 10px 0 12px -14px rgba(18, 58, 87, 0.5),
    inset -10px 0 12px -14px rgba(18, 58, 87, 0.5),
    inset 0 -10px 18px rgba(31, 92, 132, 0.08);
  font-size: clamp(0.86rem, 2.4vw, 1.05rem);
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  transform: skewX(-4deg);
}

.membership-tab + .membership-tab {
  margin-left: -10px;
}

.membership-tab:first-child {
  z-index: 4;
}

.membership-tab:nth-child(2) {
  z-index: 3;
}

.membership-tab:nth-child(3) {
  z-index: 2;
}

.membership-tab:nth-child(4) {
  z-index: 1;
}

.membership-tab::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 7px;
  bottom: 0;
  left: 7px;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.membership-tab > span {
  display: inline-block;
  transform: skewX(4deg);
}

.membership-tab.is-active {
  z-index: 10;
  min-height: 46px;
  background: #fff;
  color: #123a57;
  box-shadow:
    0 -8px 18px rgba(31, 92, 132, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.membership-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #fff;
}

.membership-tab-panel {
  position: relative;
  z-index: 1;
  min-height: 150px;
  margin-top: -1px;
  padding: clamp(16px, 3.2vw, 24px);
  border: 1px solid #b9d6e5;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 92, 132, 0.1);
}

.membership-tab-panel h2 {
  margin: 0 0 8px;
  color: #214d6d;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.membership-tab-panel p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #5b748a;
  line-height: 1.7;
}

.track-pass-purchase {
  display: grid;
  gap: 18px;
}

.track-pass-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.track-pass-fieldset legend,
.track-pass-selection h3 {
  margin: 0 0 10px;
  color: #214d6d;
  font-size: 1rem;
  font-weight: 900;
}

.track-pass-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 2px 0;
}

.track-pass-option {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 24px;
  color: #214d6d;
  font-size: 0.88rem;
  font-weight: 900;
}

.track-pass-option input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.track-pass-option small {
  color: #6b8292;
  font-size: 0.78rem;
  font-weight: 800;
}

.track-pass-selection {
  padding: 12px;
  border: 1px solid #cce5f2;
  border-radius: 8px;
  background: #f8fcff;
}

.track-pass-selection p {
  margin: 0;
  font-size: 0.92rem;
}

.mark-library-selection {
  padding: 14px;
  border: 1px solid #cce5f2;
  border-radius: 8px;
  background: #f8fcff;
}

.mark-library-selection h3 {
  margin: 0 0 10px;
  color: #214d6d;
  font-size: 1rem;
  font-weight: 900;
}

.mark-library-selection p {
  margin: 0;
  font-size: 0.92rem;
}

.mark-library-select-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.mark-library-select {
  display: grid;
  gap: 8px;
  color: #214d6d;
  font-weight: 900;
}

.mark-library-select select {
  min-height: 44px;
  border-color: #bddff0;
  background: #fff;
}

.team-member-panel p {
  margin: 0;
}

.settings-security-switch-row > span small {
  display: block;
  margin-top: 4px;
  color: #57788f;
  font-size: 0.72em;
  font-weight: 700;
}

.settings-two-factor-manage {
  margin-top: 0;
}

.settings-two-factor-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 2px solid #bddff0;
  border-radius: 18px;
  color: #214d6d;
}

.login-two-factor-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 2px solid #bddff0;
  border-radius: 18px;
  padding: 24px;
  color: #214d6d;
  box-shadow: var(--shadow);
}

.login-two-factor-dialog::backdrop {
  background: rgba(25, 61, 82, 0.42);
  backdrop-filter: blur(2px);
}

.login-two-factor-dialog form {
  display: grid;
  gap: 16px;
}

.login-two-factor-dialog p {
  margin: 0;
  font-weight: 900;
  text-align: center;
}

.login-two-factor-dialog input {
  width: 100%;
}

.login-two-factor-dialog form > div {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.settings-two-factor-dialog form,
.settings-two-factor-dialog fieldset,
.settings-two-factor-dialog [id$="CodeFields"] {
  display: grid;
  gap: 12px;
}

.settings-two-factor-dialog [hidden] {
  display: none;
}

.settings-two-factor-dialog fieldset {
  border: 0;
  padding: 0;
}

.settings-authenticator-enrollment output,
.settings-recovery-codes pre {
  display: block;
  margin-top: 6px;
  padding: 10px;
  border-radius: 8px;
  background: #eef8fc;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.settings-authenticator-enrollment > img {
  display: block;
  width: min(240px, 75vw);
  height: auto;
  margin: 0 auto;
  image-rendering: pixelated;
}

.settings-switch input:focus-visible + .settings-switch-track {
  outline: 3px solid #ffb52b;
  outline-offset: 3px;
}

.settings-switch input:disabled + .settings-switch-track {
  cursor: wait;
  opacity: 0.55;
}

.organization-summary-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #cce5f2;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcff, #f4fff9);
  color: #214d6d;
}

.organization-summary-panel h3,
.organization-summary-panel h4 {
  margin: 0;
  color: #173f5a;
}

.organization-summary-panel h4 {
  margin-top: 16px;
  font-size: 0.95rem;
}

.organization-summary-panel p {
  margin: 0;
}

.organization-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.organization-summary-metric.is-ranking {
  grid-column: 1 / -1;
}

.organization-summary-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgb(33 77 109 / 8%);
}

.organization-summary-label {
  color: #6c8798;
  font-size: 0.78rem;
  font-weight: 800;
}

.organization-summary-metric strong {
  color: #155c84;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.organization-summary-metric small {
  color: #6c8798;
  font-weight: 700;
}

.organization-race-participation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.organization-race-participation li {
  padding: 6px 10px;
  border: 1px solid #cce5f2;
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 900;
}

@media (max-width: 480px) {
  .organization-summary-metrics {
    gap: 6px;
  }

  .organization-summary-metric {
    padding: 9px 6px;
    text-align: center;
  }

  .organization-summary-label {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .organization-summary-metric strong {
    font-size: 0.98rem;
  }
}

.team-member-summary {
  color: #53748a;
  font-weight: 800;
}

.team-member-table-viewport {
  max-height: min(58vh, 520px);
  margin-top: 14px;
  overflow: auto;
  border: 1px solid #cce5f2;
  border-radius: 10px;
  background: #fff;
}

.team-member-table {
  width: 100%;
  border-collapse: collapse;
  color: #214d6d;
}

.team-member-table th,
.team-member-table td {
  border-bottom: 1px solid #dcecf6;
  text-align: left;
  vertical-align: middle;
}

.team-member-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 14px;
  background: #f1f8fc;
  font-weight: 900;
}

.team-member-table td {
  padding: 7px 14px;
}

.team-member-table tbody tr:last-child td {
  border-bottom: 0;
}

.team-member-table tbody tr:nth-child(even) {
  background: #f8fcff;
}

.team-member-table-name {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #126ca4;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-shadow: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.team-member-table-name:hover,
.team-member-table-name:focus-visible {
  color: #084b76;
}

.team-member-table-action {
  width: 1%;
  white-space: nowrap;
}

.team-member-delete-button {
  min-height: 28px;
  padding: 4px 9px;
  border-color: #efb5b5;
  background: #fff5f5;
  box-shadow: none;
  color: #a32626;
  text-shadow: none;
}

.team-member-details-dialog {
  width: min(680px, calc(100vw - 28px));
}

.team-member-details-content {
  max-height: min(58vh, 560px);
  overflow: auto;
}

.team-member-entitlement-section + .team-member-entitlement-section {
  margin-top: 20px;
}

.team-member-entitlement-section h3,
.team-member-library-progress-card h4 {
  margin: 0;
  color: #214d6d;
}

.team-member-track-pass-list {
  margin: 8px 0 0;
  line-height: 1.7;
}

.team-member-library-progress-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.team-member-library-progress-card {
  padding: 12px;
  border: 1px solid #d5e9f4;
  border-radius: 10px;
  background: #f8fcff;
}

.team-member-library-progress-details {
  margin: 10px 0 0;
  color: #214d6d;
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: nowrap;
}

.team-member-consent {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
}

.team-member-table-name,
.team-member-delete-button,
.team-member-table .team-member-consent {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.team-member-consent.is-accepted {
  background: #dff5e8;
  color: #17683c;
}

.team-member-consent.is-pending {
  background: #fff0c7;
  color: #825900;
}

.team-member-consent.is-revoked,
.team-member-consent.is-expired {
  background: #edf1f4;
  color: #5e6d77;
}

.team-members-load-more {
  display: block;
  margin: 16px auto 0;
}

.add-member-form {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.add-member-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) auto;
  gap: 10px;
  align-items: center;
}

.add-member-entry input[type="email"] {
  min-width: 0;
}

.add-member-entry input[type="email"].is-invalid {
  border-color: #d92d20;
  color: #d92d20;
}

#addMemberButton {
  justify-self: end;
}

.membership-tab-panel .add-member-status {
  min-height: 1.4em;
  margin: -8px 0 0;
  color: #b42318;
  font-weight: 800;
}

.add-member-status:empty {
  display: none;
}

.add-member-preview-title {
  margin: 4px 0 -6px;
  color: #214d6d;
  font-size: 1rem;
  font-weight: 900;
}

.add-member-list {
  min-height: 84px;
  padding: 12px;
  border: 1px solid #cce5f2;
  border-radius: 8px;
  background: #f8fcff;
  color: #214d6d;
  font-weight: 900;
}

.add-member-list ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.membership-tab-panel .add-member-dialog-status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 800;
}

.add-member-list-header,
.add-member-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.8fr) auto;
  align-items: center;
  gap: 8px;
}

.add-member-list-header {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #cce5f2;
  color: #456b84;
  font-size: 0.78rem;
  font-weight: 900;
}

.add-member-list-header span:last-child {
  text-align: center;
}

.membership-tab-panel .add-member-empty {
  margin: 0;
  color: #214d6d;
  font-weight: 900;
}

.add-member-email {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 3px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: text;
}

.add-member-email:focus {
  text-overflow: clip;
}

.add-member-language {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 3px 26px 3px 8px;
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.2;
}

.add-member-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.membership-tab-panel .add-member-payment-note {
  margin: 0;
  color: #5b748a;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
}

.add-member-submit-row > button[type="submit"] {
  justify-self: end;
}

.add-member-remove {
  flex: 0 0 auto;
  width: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid #f1a3a3;
  border-radius: 50%;
  background: #fff5f5;
  box-shadow: none;
  color: #c62828;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.add-member-remove:hover,
.add-member-remove:focus-visible {
  background: #ffe3e3;
  transform: none;
}

.add-member-dialog {
  width: min(420px, calc(100vw - 36px));
  padding: 0;
  border: 2px solid #bddff0;
  border-radius: 8px;
  background: #fff;
  color: #214d6d;
  box-shadow: 0 24px 60px rgba(31, 92, 132, 0.28);
}

.add-member-dialog::backdrop {
  background: rgba(18, 58, 87, 0.28);
}

.add-member-dialog form {
  margin: 0;
  padding: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.add-member-dialog h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.add-member-dialog p {
  margin: 0 0 16px;
}


.account-page main.account-dashboard {
  width: 100%;
  padding-right: max(16px, calc((100vw - 1120px) / 2));
  padding-left: max(16px, calc((100vw - 1120px) / 2));
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(232, 248, 255, 0.68)),
    url("/assets/hero/account-coin-burst-bg-800x1400.png") center top / 100% auto no-repeat,
    linear-gradient(180deg, #dff7ff 0%, #fff5d1 42%, #e8f8ff 100%);
}

.auth-page main > #status {
  max-width: 620px;
}

.guest-landing {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(340px, 1fr);
  gap: 34px;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  min-height: min(720px, calc(100vh - 90px));
  margin: 0 auto;
  padding: 34px 0 58px;
}

.guest-copy {
  display: grid;
  justify-items: start;
}

.home-logo-banner {
  display: block;
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 980px);
  height: auto;
  margin: 0 auto -8px;
}

.guest-copy p {
  max-width: 640px;
  font-size: 1.1rem;
}

.guest-copy h1 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 4vw, 2.45rem);
  line-height: 1.08;
}

.game-center-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  min-height: clamp(150px, 18vw, 230px);
  margin: 0 0 18px;
  padding: clamp(10px, 2vw, 22px) 0 clamp(14px, 2.2vw, 24px);
}

.game-center-hero::before {
  content: none;
}

.game-center-copy {
  position: relative;
  z-index: 1;
  max-width: 660px;
}

.game-center-art {
  position: relative;
  z-index: 1;
  display: block;
  align-self: center;
  justify-self: end;
  width: clamp(320px, 34vw, 480px);
  max-width: 100%;
  height: auto;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: clamp(18px, 2.2vw, 28px);
  box-shadow: 0 18px 44px rgba(24, 64, 94, 0.22);
}

.game-center-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9), 0 14px 30px rgba(24, 64, 94, 0.24);
}

.game-center-hero p:last-child {
  max-width: 760px;
  font-size: 1.08rem;
  color: #315a74;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 18px rgba(24, 64, 94, 0.12);
}

.account-dashboard {
  --account-primary-line-font-size: 0.95rem;
  display: grid;
  gap: 26px;
}

.account-dashboard > nav {
  margin-bottom: 0;
}

.account-dashboard > section {
  min-width: 0;
}

.account-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 24px;
  border: 2px solid #dcecf6;
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 31, 45, 0.18), transparent 9rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 248, 255, 0.88));
  box-shadow: var(--shadow);
}

.account-hero h1 {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.08em;
  justify-content: center;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(1.7rem, 4vw, 3rem);
  white-space: nowrap;
}

#accountGreetingName {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #173f5b;
  font-size: 0.72em;
  font-weight: 900;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
}

.account-greeting-line {
  display: flex;
  align-self: flex-start;
  align-items: center;
  gap: 0;
  width: max-content;
  max-width: 100%;
  min-width: 0;
}

#accountGreetingTime + .account-weather {
  margin-left: 4px;
}

#accountGreetingTime {
  flex: 0 0 auto;
  color: #9a3f70;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 0.62em;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.account-greeting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

.account-hero > div {
  min-width: 0;
}

.account-hero-avatar {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border: 3px solid rgba(255, 127, 24, 0.9);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 230, 129, 0.78));
  box-shadow: 0 8px 18px rgba(42, 88, 130, 0.16);
  overflow: hidden;
}

.account-hero-avatar:hover,
.account-hero-avatar:focus-visible {
  color: #173247;
  transform: translateY(-1px);
}

.account-hero-avatar img,
.account-hero-avatar-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-hero-avatar-fallback {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #173247;
  font-size: 1.15rem;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  word-break: break-all;
}

.account-weather {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  margin: 0;
}

.weather-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 127, 24, 0.88);
  border-radius: 50%;
  background: #ffd45c;
  box-shadow: 0 0 10px rgba(255, 212, 92, 0.62);
}

.weather-sunny .weather-icon::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background:
    linear-gradient(#ff7f18, #ff7f18) 50% 0 / 2px 5px no-repeat,
    linear-gradient(#ff7f18, #ff7f18) 50% 100% / 2px 5px no-repeat,
    linear-gradient(90deg, #ff7f18, #ff7f18) 0 50% / 5px 2px no-repeat,
    linear-gradient(90deg, #ff7f18, #ff7f18) 100% 50% / 5px 2px no-repeat;
}

.account-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  color: #315a74;
  font-size: 0.98rem;
  font-weight: 900;
}

.account-member-actions[hidden] {
  display: none;
}

.account-member-actions a,
.text-link-button {
  color: #ff1f2d;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  padding: 0;
  font-weight: 1000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link-button:hover,
.text-link-button:focus-visible {
  color: #ff1f2d;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.account-summary-grid,
.account-action-grid {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.account-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
  border: 2px solid rgba(84, 0, 0, 0.24);
  border-radius: 999px;
  color: #540000;
  background: linear-gradient(180deg, #fff0ec 0%, #ffebdd 48%, #ffb84d 100%);
  box-shadow: 0 4px 0 rgba(84, 0, 0, 0.22), 0 12px 24px rgba(255, 31, 45, 0.12);
  font-weight: 1000;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: var(--bounce);
}

.account-action-button:hover,
.account-action-button:focus-visible {
  color: #540000;
  transform: translateY(-1px);
}

.account-metric-card {
  border: 2px solid #dcecf6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.account-metric-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 130px;
  padding: 18px;
}

.account-metric-card span {
  color: #5b7185;
  font-size: 0.95rem;
  font-weight: 900;
}

.account-metric-card strong {
  align-self: end;
  color: #18405e;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.account-balance-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 0;
  padding: 16px 18px;
}

.account-balance-card .balance-label {
  min-width: 0;
  overflow: hidden;
  color: #5b7185;
  font-size: clamp(0.68rem, 2.8vw, 0.95rem);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-balance-card strong {
  min-width: 0;
  overflow: hidden;
  align-self: auto;
  margin-right: auto;
  font-size: clamp(0.9rem, 4.4vw, 1.8rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-balance-card a {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #ff1f2d;
  font-size: clamp(0.65rem, 3vw, 0.95rem);
  font-weight: 1000;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.account-challenge-card {
  grid-column: 1 / -1;
  min-height: 0;
  padding: 12px 18px;
}

.account-challenge-card strong {
  display: flex;
  align-self: center;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(0.66rem, 2.8vw, 0.9rem);
  white-space: nowrap;
}

.account-challenge-card strong > span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.account-challenge-card strong > .challenge-progress-details {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(0.5rem, 0.82em, 1.05rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-progress-progress {
  flex: 0 0 auto;
}

.account-prize-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  padding: 14px 18px;
}

.account-prize-card section {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account-prize-card span {
  min-width: 0;
  overflow: hidden;
  color: #5b7185;
  font-size: clamp(0.62rem, 2.2vw, 0.9rem);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-prize-card strong {
  align-self: auto;
  min-width: 0;
  overflow: hidden;
  color: #18405e;
  font-size: var(--account-primary-line-font-size);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-pass-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  height: 46px;
  min-height: 0;
  padding: 0 14px;
  overflow: hidden;
}

.account-metric-card .pass-label {
  min-width: 0;
  overflow: hidden;
  color: #5b7185;
  font-size: var(--account-primary-line-font-size);
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pass-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px 9px;
  min-width: 0;
  max-height: 1.35em;
  overflow: hidden;
  line-height: 1.35;
}

.pass-links.is-expanded {
  flex-wrap: wrap;
  max-height: none;
  overflow: visible;
}

.account-pass-card:has(.pass-links.is-expanded) {
  height: auto;
  min-height: 46px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.pass-links a {
  flex: 0 0 auto;
  color: #0c65a8;
  font-size: clamp(0.66rem, 2.8vw, 0.9rem);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.pass-expand-button {
  min-height: 0;
  padding: 0 4px;
  border: 0;
  color: #ff1f2d;
  background: transparent;
  box-shadow: none;
  font-weight: 1000;
  line-height: 1.35;
}

.pass-expand-button[hidden] {
  display: none;
}

.pass-expand-button:hover,
.pass-expand-button:focus-visible {
  color: #ff1f2d;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.coin-icon {
  display: block;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  object-fit: contain;
}

.account-diagnostic {
  color: #9c1c24;
  font-weight: 900;
}

.account-info-dialog {
  width: min(420px, calc(100vw - 36px));
  padding: 0;
  border: 2px solid rgba(255, 31, 45, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 70px rgba(42, 88, 130, 0.28);
}

.account-info-dialog::backdrop {
  background: rgba(24, 64, 94, 0.28);
  backdrop-filter: blur(3px);
}

.account-info-dialog form {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
  box-shadow: none;
}

.account-info-dialog h2 {
  margin: 0;
}

.account-info-dialog p {
  margin: 0;
}

.dialog-close-button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  width: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #540000;
  font-size: 1.35rem;
}

.dialog-close-button:hover,
.dialog-close-button:focus-visible {
  background: rgba(255, 31, 45, 0.08);
  box-shadow: none;
  transform: none;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}

.section-heading h2 {
  margin-top: 0;
}

.section-kicker,
.headline-tag {
  width: fit-content;
  margin: 0;
  border: 1px solid rgba(84, 0, 0, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 240, 236, 0.68), rgba(255, 0, 0, 0.1));
  color: #ff1f2d;
  font-size: 0.85rem;
  font-weight: 1000;
  line-height: 1.2;
}

.section-kicker {
  display: inline-block;
  padding: 6px 10px;
}

a.section-kicker:hover,
a.section-kicker:focus-visible {
  color: #ff1f2d;
  background: linear-gradient(180deg, rgba(255, 240, 236, 0.86), rgba(255, 0, 0, 0.16));
}

.headline-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
  margin: 14px 0 10px;
}

.headline-card {
  min-height: 170px;
  padding: 18px;
  border: 1px solid #d7e7f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(42, 88, 130, 0.1);
}

.headline-card-primary {
  border-color: rgba(84, 0, 0, 0.22);
  background: linear-gradient(135deg, rgba(255, 240, 236, 0.9), rgba(255, 255, 255, 0.9));
}

.headline-tag {
  display: inline-block;
  padding: 5px 9px;
}

.headline-card h3 {
  margin: 14px 0 8px;
  color: #214d6d;
}

.headline-card p {
  margin: 0;
}

.headline-card h3 a {
  color: inherit;
}

.content-card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 14px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef6fb;
}

.content-article {
  max-width: 860px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: #486b7f;
  font-weight: 800;
}

.article-breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  color: #8aa6b7;
}

.content-article-header {
  margin-bottom: 22px;
}

.content-article-header h1 {
  margin: 12px 0 10px;
}

.content-article-header p:last-child {
  max-width: 720px;
  color: #315a74;
  font-size: 1.05rem;
}

.content-article-body {
  display: grid;
  gap: 16px;
  color: #244b63;
  font-size: 1.02rem;
  line-height: 1.78;
}

.content-article-body h2,
.content-article-body h3,
.content-article-body h4 {
  margin: 16px 0 0;
  color: #214d6d;
}

.content-article-body p,
.content-article-body ul {
  margin: 0;
}

.content-article-figure {
  margin: 6px 0;
}

.content-article-figure img {
  display: block;
  width: 100%;
  max-height: 720px;
  border-radius: 8px;
  object-fit: contain;
  background: #eef6fb;
  box-shadow: 0 12px 28px rgba(42, 88, 130, 0.12);
}

.content-article-figure figcaption {
  margin-top: 8px;
  color: #5d7a8e;
  font-size: 0.92rem;
  text-align: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 34px;
  align-items: center;
  min-height: min(680px, calc(100vh - 86px));
  padding: 24px 0 46px;
}

.hero-copy {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #174760;
  background: #dff7ff;
  font-weight: 900;
}

.identity-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sun), var(--ai));
  color: #123a57;
  box-shadow: 0 4px 10px rgba(31, 92, 132, 0.16);
  font-size: 0.95rem;
  font-weight: 1000;
  object-fit: cover;
}

.hero p {
  max-width: 640px;
  color: #315a74;
  font-size: 1.1rem;
}

.hero-actions,
.quick-grid,
.feature-grid,
.portal-grid {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-items: stretch;
  margin-top: 22px;
}

.hero-actions .button-link,
.hero-actions .secondary-link {
  min-width: 0;
  width: 100%;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 2px solid #b8dced;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(72, 121, 153, 0.12);
}

.adventure-scene {
  position: relative;
  min-height: 470px;
  border: 4px solid #fff;
  border-radius: 26px;
  overflow: hidden;
  background: #dff7ff;
  box-shadow: var(--shadow);
}

.adventure-scene::before {
  content: none;
  position: absolute;
  inset: 42% -8% -16%;
  height: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 20% 55%, #ffdb5c 0 9px, transparent 10px),
    radial-gradient(circle at 48% 48%, #ff7e67 0 9px, transparent 10px),
    radial-gradient(circle at 72% 58%, #45e2ff 0 9px, transparent 10px),
    linear-gradient(90deg, #fff3a3, #ffd45c 28%, #ff9f62 48%, #8a6cff 73%, #45e2ff);
  transform: rotate(-8deg);
  box-shadow: 0 16px 0 rgba(61, 121, 79, 0.22);
}

.hero-scene-image {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-dialogue-bubble {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  min-width: 112px;
  max-width: 190px;
  min-height: 66px;
  padding: 14px 20px;
  border: 4px solid rgba(255, 255, 255, 0.96);
  border-radius: 50% 46% 52% 44% / 52% 44% 56% 48%;
  color: #173247;
  background: #fff7d8;
  box-shadow: 0 12px 24px rgba(23, 50, 71, 0.18);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 1000;
  line-height: 1.25;
  text-align: center;
  transform: translate(-50%, -50%);
}

.hero-dialogue-bubble[data-role="boy"] {
  left: 14%;
  top: 50%;
}

.hero-dialogue-bubble[data-role="girl"] {
  left: 64%;
  top: 68%;
}

.hero-dialogue-bubble[data-role="parent"] {
  left: 30%;
  top: 12%;
}

.hero-dialogue-bubble[data-role="teacher"] {
  left: 70%;
  top: 12%;
}

.hero-character-hotspot {
  position: absolute;
  z-index: 6;
  min-height: 0;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  appearance: none;
  color: transparent;
}

.hero-character-hotspot:hover,
.hero-character-hotspot:focus-visible {
  outline: 3px solid rgba(69, 226, 255, 0.78);
  outline-offset: 3px;
  background: transparent !important;
  box-shadow: none !important;
  transform: none;
}

.hotspot-boy {
  left: 22.5%;
  top: 48%;
  width: 19%;
  height: 43%;
}

.hotspot-girl {
  left: 57%;
  top: 51%;
  width: 18%;
  height: 41%;
}

.hotspot-parent {
  left: 42%;
  top: 12%;
  width: 18%;
  height: 42%;
}

.hotspot-teacher {
  left: 76%;
  top: 18%;
  width: 16%;
  height: 50%;
}

.adventure-scene::after {
  content: none;
  position: absolute;
  top: 82px;
  right: 72px;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  color: #174760;
  background: radial-gradient(circle, #ffffff 0 22px, #aef5ff 23px, #45e2ff 100%);
  box-shadow: 0 0 28px rgba(69, 226, 255, 0.7);
  font-weight: 1000;
}

.character-sprite {
  position: absolute;
  z-index: 3;
  width: clamp(96px, 23%, 170px);
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(23, 50, 71, 0.2));
}

.sprite-boy {
  left: 10%;
  bottom: 34px;
  transform: rotate(-4deg);
}

.sprite-girl {
  left: 31%;
  bottom: 92px;
  width: clamp(92px, 21%, 158px);
  z-index: 4;
  transform: rotate(3deg);
}

.sprite-parent {
  right: 26%;
  bottom: 22px;
  width: clamp(100px, 22%, 164px);
  z-index: 5;
  transform: rotate(-2deg);
}

.sprite-teacher {
  right: 7%;
  bottom: 80px;
  width: clamp(108px, 24%, 178px);
  transform: rotate(4deg);
}

.chibi {
  position: absolute;
  bottom: 78px;
  width: 92px;
  height: 122px;
}

.chibi::before {
  content: "";
  position: absolute;
  inset: 0 11px auto;
  height: 72px;
  border: 4px solid #173247;
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 34% 46%, #173247 0 4px, transparent 5px),
    radial-gradient(circle at 64% 46%, #173247 0 4px, transparent 5px),
    radial-gradient(circle at 50% 66%, #ff7e67 0 7px, transparent 8px),
    #ffe0bb;
}

.chibi::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 62px;
  border: 4px solid #173247;
  border-radius: 22px 22px 18px 18px;
}

.chibi-a {
  left: 64px;
}

.chibi-a::after {
  background: var(--coral);
}

.chibi-b {
  left: 178px;
  bottom: 116px;
  transform: scale(0.9);
}

.chibi-b::after {
  background: var(--sky);
}

.chibi-c {
  right: 148px;
  transform: scale(1.04);
}

.chibi-c::after {
  background: var(--violet);
}

.speech {
  position: absolute;
  left: 34px;
  top: 42px;
  max-width: 230px;
  padding: 14px 16px;
  border: 3px solid #173247;
  border-radius: 18px;
  background: #fff;
  color: #214d6d;
  font-weight: 900;
}

.collectible {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 4px solid #fff;
  border-radius: 16px;
  color: #173247;
  background: var(--sun);
  box-shadow: 0 8px 18px rgba(23, 50, 71, 0.2);
  font-weight: 1000;
}

.mark-a {
  left: 260px;
  top: 250px;
}

.mark-b {
  right: 56px;
  bottom: 145px;
  background: var(--ai);
}

.mark-c {
  left: 55%;
  top: 112px;
  background: #fff;
}

.quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 18px 0 34px;
}

.feature-grid,
.portal-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card,
.portal-card,
dl,
#status {
  border: 2px solid #dcecf6;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.feature-card,
.portal-card {
  min-height: 150px;
  padding: 20px;
  border-radius: 18px;
}

.feature-card h3,
.portal-card h3 {
  margin: 0 0 8px;
  color: #214d6d;
}

.feature-card p,
.portal-card p {
  margin: 0;
}

dl {
  display: grid;
  grid-template-columns: minmax(100px, 180px) minmax(0, 1fr);
  gap: 10px 18px;
  padding: 20px;
}

dt {
  color: #214d6d;
  font-weight: 900;
}

dd {
  margin: 0;
  min-width: 0;
}

#status {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #24465f;
  font-weight: 800;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 28px;
  align-items: start;
}

.page-shell::after {
  content: "AI伙伴提示\a服务端读取的数据会在这里完成校验后展示";
  white-space: pre-line;
  display: block;
  min-height: 220px;
  padding: 22px;
  border: 2px solid #dcecf6;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 36px, #fff 0 30px, transparent 31px),
    linear-gradient(180deg, #dff7ff, #fffaf0);
  color: #315a74;
  box-shadow: var(--shadow);
  font-weight: 900;
  line-height: 1.7;
}

body:not(.home-page) main > h1:first-of-type {
  padding: 26px;
  border: 2px solid #dcecf6;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 212, 92, 0.42), transparent 8rem),
    linear-gradient(135deg, #ffffff, #e8f8ff);
  box-shadow: var(--shadow);
}

.page-character {
  float: right;
  width: clamp(110px, 18vw, 190px);
  margin: -112px 22px 18px 28px;
  filter: drop-shadow(0 18px 20px rgba(23, 50, 71, 0.18));
}

.page-character-small {
  width: clamp(90px, 15vw, 150px);
}

.payment-methods-page main.payment-methods-dashboard,
.coin-packages-page main.coin-packages-dashboard,
.send-coins-page main.send-coins-dashboard {
  display: grid;
  gap: 18px;
}

.payment-methods-hero,
.payment-methods-panel,
.coin-packages-hero,
.coin-packages-panel,
.send-coins-hero,
.send-coins-panel {
  border: 2px solid #dcecf6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.payment-methods-hero,
.coin-packages-hero,
.send-coins-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 180px);
  gap: 18px;
  align-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 94% 18%, rgba(255, 212, 92, 0.42), transparent 8rem),
    linear-gradient(135deg, #ffffff, #e8f8ff);
}

.coin-packages-hero {
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 127, 24, 0.2), transparent 8rem),
    linear-gradient(135deg, #ffffff, #fff8dc 48%, #e8f8ff);
}

.send-coins-hero {
  background:
    radial-gradient(circle at 92% 18%, rgba(87, 199, 133, 0.22), transparent 8rem),
    linear-gradient(135deg, #ffffff, #eafcff 52%, #fff8dc);
}

.payment-methods-hero h1,
.coin-packages-hero h1,
.send-coins-hero h1 {
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.payment-methods-hero p:last-child,
.coin-packages-hero p:last-child,
.send-coins-hero p:last-child {
  max-width: 680px;
  margin: 0;
}

.payment-methods-character,
.coin-packages-character,
.send-coins-character {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(23, 50, 71, 0.18));
}

.payment-methods-panel,
.coin-packages-panel,
.send-coins-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.payment-methods-panel-heading,
.coin-packages-panel-heading,
.send-coins-panel-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.payment-methods-panel-heading h2,
.coin-packages-panel-heading h2,
.send-coins-panel-heading h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.payment-methods-panel-heading p,
.coin-packages-panel-heading p,
.send-coins-panel-heading p {
  margin: 0;
}

.send-coins-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.send-coins-panel {
  max-width: none;
}

.receive-code-result,
.send-code-preview,
.coin-transfer-list {
  min-height: 76px;
  padding: 14px;
  border: 2px dashed #b8dced;
  border-radius: 8px;
  background: #f6fcff;
  color: #315a74;
  font-weight: 900;
  line-height: 1.55;
}

.send-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coin-transfer-list {
  display: grid;
  gap: 12px;
}

.coin-transfer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 2px solid rgba(189, 223, 240, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.coin-transfer-card-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.coin-transfer-card-body strong {
  color: #214d6d;
  font-size: 1.12rem;
}

.coin-transfer-card-body span {
  color: #5b7185;
  font-weight: 900;
  line-height: 1.45;
}

.coin-dispute-dialog {
  max-width: min(92vw, 520px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #173247;
  background: transparent;
}

.coin-dispute-dialog::backdrop {
  background: rgba(23, 50, 71, 0.42);
}

.coin-dispute-dialog form {
  margin: 0;
  border-radius: 8px;
}

.coin-dispute-dialog h2 {
  margin: 0;
  color: #214d6d;
  font-size: 1.35rem;
}

.payment-methods-list {
  display: grid;
  gap: 12px;
}

.payment-method-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) max-content;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 2px solid rgba(189, 223, 240, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.payment-method-card.is-default {
  border-color: rgba(255, 126, 103, 0.82);
  background: linear-gradient(135deg, rgba(255, 240, 236, 0.82), rgba(255, 255, 255, 0.92));
}

.payment-method-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  color: #173247;
  background: linear-gradient(135deg, #ffe681, #45e2ff);
  font-size: 0.82rem;
  font-weight: 1000;
}

.payment-method-body {
  min-width: 0;
}

.payment-method-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.payment-method-title-row h3 {
  margin: 0;
  color: #214d6d;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.payment-method-body p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.payment-method-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #7b2d1f;
  background: #ffe2d9;
  font-size: 0.82rem;
  font-weight: 900;
}

.payment-method-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.payment-method-actions button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.92rem;
}

.payment-method-danger {
  color: #9a2a23;
}

.payment-methods-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 2px dashed #b8dced;
  border-radius: 8px;
  background: #f6fcff;
  color: #5b7185;
  font-weight: 900;
  text-align: center;
}

.payment-setup-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coin-package-filter-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.coin-package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.coin-package-quantity-control {
  max-width: 240px;
}

.coin-package-quantity-control input {
  max-width: 120px;
  font-size: 1.05rem;
  font-weight: 900;
}

.coin-package-order-summary {
  margin: -6px 0 0;
  color: #214d6d;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.45;
}

.coin-package-card {
  display: grid;
  grid-template-columns: 22px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 14px;
  border: 2px solid rgba(189, 223, 240, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.coin-package-card:hover,
.coin-package-card:focus-within,
.coin-package-card.is-selected {
  border-color: rgba(255, 127, 24, 0.88);
  background: linear-gradient(135deg, rgba(255, 248, 220, 0.92), rgba(255, 255, 255, 0.94));
}

.coin-package-card input {
  width: 18px;
  height: 18px;
}

.coin-package-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
}

.coin-package-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.coin-package-card-body strong {
  color: #214d6d;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.coin-package-card-body span {
  color: #5b7185;
  font-weight: 900;
  line-height: 1.35;
}

.coin-package-card-body .coin-package-price {
  color: #ff1f2d;
  font-size: 1.05rem;
  font-weight: 1000;
}

.coin-package-empty {
  grid-column: 1 / -1;
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 2px dashed #b8dced;
  border-radius: 8px;
  background: #f6fcff;
  color: #5b7185;
  font-weight: 900;
  text-align: center;
}

.coin-order-result-dialog,
.membership-order-result-dialog {
  max-width: min(92vw, 520px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #173247;
  background: transparent;
}

.coin-order-result-dialog::backdrop,
.membership-order-result-dialog::backdrop {
  background: rgba(23, 50, 71, 0.42);
}

.coin-order-result-dialog form,
.membership-order-result-dialog form {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 2px solid #bddff0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 248, 255, 0.96));
  box-shadow: var(--shadow);
}

.coin-order-result-dialog[data-state="success"] form,
.membership-order-result-dialog[data-state="success"] form {
  border-color: rgba(55, 158, 95, 0.72);
  background: linear-gradient(135deg, rgba(235, 255, 241, 0.98), rgba(255, 255, 255, 0.96));
}

.coin-order-result-dialog[data-state="pending"] form,
.membership-order-result-dialog[data-state="pending"] form {
  border-color: rgba(53, 181, 216, 0.72);
}

.coin-order-result-dialog[data-state="failed"] form,
.membership-order-result-dialog[data-state="failed"] form {
  border-color: rgba(255, 31, 45, 0.58);
  background: linear-gradient(135deg, rgba(255, 240, 236, 0.98), rgba(255, 255, 255, 0.96));
}

.coin-order-result-dialog[data-state="cancelled"] form,
.membership-order-result-dialog[data-state="cancelled"] form {
  border-color: rgba(168, 208, 228, 0.9);
  background: linear-gradient(135deg, rgba(246, 252, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.coin-order-result-dialog h2,
.membership-order-result-dialog h2 {
  margin: 0;
  color: #214d6d;
  font-size: 1.35rem;
}

.coin-order-result-dialog p,
.membership-order-result-dialog p {
  margin: 0;
  color: #315a74;
  font-weight: 900;
  line-height: 1.5;
}

.coin-order-result-dialog .coin-order-result-countdown,
.membership-order-result-dialog .membership-order-result-countdown {
  color: #5b7185;
  font-size: 0.95rem;
}

.coin-order-result-dialog .dialog-actions,
.membership-order-result-dialog .dialog-actions {
  justify-content: center;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.header-message-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  margin-left: 3px;
  padding: 0 3px;
  border-radius: 999px;
  color: #fff;
  background: #d93636;
  font-size: 0.58rem;
  line-height: 1;
}

.header-message-count[hidden] {
  display: none;
}

.customer-service-page main.customer-service-dashboard {
  width: min(1040px, calc(100% - 32px));
  margin: 28px auto 72px;
}

.customer-service-hero,
.customer-service-panel {
  border: 1px solid rgba(112, 158, 191, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.customer-service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
}

.customer-service-hero h1,
.customer-service-panel h2,
.customer-service-panel h3,
.customer-service-hero p {
  margin-top: 0;
}

.customer-service-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.customer-service-hero .page-character {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.customer-service-status,
.customer-service-ticket-status,
.customer-service-verification-status {
  color: var(--muted);
  font-weight: 800;
}

.customer-service-status {
  margin: 14px 4px;
}

.customer-service-status[data-state="error"],
.customer-service-ticket-status[data-state="error"],
.customer-service-verification-status[data-state="error"] {
  color: #b3261e;
}

.customer-service-status[data-state="success"],
.customer-service-ticket-status[data-state="success"] {
  color: #18794e;
}

.customer-service-panel {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding: 22px;
}

.customer-service-panel-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.customer-service-panel-heading h2 {
  margin-bottom: 0;
  color: #214d6d;
}

.customer-service-limit {
  max-width: 340px;
  color: #5b7185;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: right;
}

.customer-service-compose {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.customer-service-category {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.customer-service-category legend,
.customer-service-editor > span {
  width: 100%;
  margin-bottom: 8px;
  color: #214d6d;
  font-weight: 900;
}

.customer-service-category label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #bddff0;
  border-radius: 999px;
  background: #f8fcff;
  font-weight: 800;
}

.customer-service-category input {
  width: 17px;
  height: 17px;
}

.customer-service-editor {
  display: grid;
}

.customer-service-editor textarea {
  resize: vertical;
}

.customer-service-editor small {
  margin-top: 5px;
  color: #5b7185;
  font-weight: 800;
  text-align: right;
}

.customer-service-attachments {
  display: grid;
  gap: 9px;
}

.customer-service-attachments > p {
  margin: 0;
  color: #5b7185;
  font-size: 0.88rem;
}

.customer-service-file-button {
  justify-self: start;
  padding: 8px 12px;
  border: 1px solid #8fcce8;
  border-radius: 8px;
  color: #214d6d;
  background: #f1faff;
  font-weight: 900;
  cursor: pointer;
}

.customer-service-thumbnail-list,
.customer-service-ticket-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-service-thumbnail,
.customer-service-ticket-attachment {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: min(230px, 100%);
  min-height: 66px;
  padding: 6px;
  border: 1px solid #bddff0;
  border-radius: 10px;
  color: #214d6d;
  background: #f8fcff;
  text-decoration: none;
}

.customer-service-thumbnail img,
.customer-service-ticket-attachment img,
.customer-service-file-type {
  width: 54px;
  height: 54px;
  border-radius: 7px;
  object-fit: cover;
}

.customer-service-file-type {
  display: grid;
  place-items: center;
  color: #9a2a23;
  background: #ffe6e2;
  font-size: 0.78rem;
  font-weight: 1000;
}

.customer-service-thumbnail > span:not(.customer-service-file-type),
.customer-service-ticket-attachment > span:not(.customer-service-file-type) {
  min-width: 0;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-service-remove-attachment {
  grid-column: 2;
  min-height: 26px;
  justify-self: start;
  padding: 3px 8px;
  color: #9a2a23;
  background: transparent;
  box-shadow: none;
  font-size: 0.78rem;
}

.customer-service-actions {
  display: flex;
  gap: 10px;
}

.customer-service-actions button {
  min-width: 92px;
  box-shadow: none;
}

.customer-service-ticket-heading > label {
  display: grid;
  gap: 5px;
  min-width: min(420px, 52%);
  color: #214d6d;
  font-weight: 900;
}

.customer-service-ticket-detail {
  display: grid;
  gap: 16px;
}

.customer-service-ticket-detail[hidden] {
  display: none;
}

.customer-service-ticket-detail > header,
.customer-service-reply header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.customer-service-ticket-detail > header > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.customer-service-ticket-category,
.customer-service-ticket-state {
  padding: 5px 9px;
  border-radius: 999px;
  color: #214d6d;
  background: #dff3ff;
  font-size: 0.84rem;
  font-weight: 900;
}

.customer-service-ticket-state {
  color: #6f4c00;
  background: #fff0a8;
}

.customer-service-ticket-detail > section,
.customer-service-reply {
  padding: 15px;
  border: 1px solid #cbe4f1;
  border-radius: 12px;
  background: #f8fcff;
}

.customer-service-ticket-detail h3 {
  margin-bottom: 10px;
  color: #214d6d;
  font-size: 1rem;
}

.customer-service-ticket-body,
.customer-service-reply p {
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.customer-service-reply-list {
  display: grid;
  gap: 10px;
}

.customer-service-reply-compose {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bddff0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.customer-service-reply-compose[hidden] {
  display: none;
}

.customer-service-reply-compose > label {
  display: grid;
  gap: 6px;
  color: #214d6d;
  font-weight: 900;
}

.customer-service-reply-compose small {
  color: #5b7185;
  text-align: right;
}

.customer-service-reply-compose > button {
  justify-self: start;
  box-shadow: none;
}

.customer-service-reply header time,
.customer-service-ticket-detail > header time,
.customer-service-timeline span {
  color: #5b7185;
  font-size: 0.84rem;
}

.customer-service-empty {
  margin: 0;
  color: #5b7185;
}

.customer-service-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.customer-service-timeline li {
  padding-left: 4px;
}

.customer-service-timeline strong,
.customer-service-timeline span {
  display: block;
}

.customer-service-verification-dialog {
  width: min(92vw, 480px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #173247;
  background: transparent;
}

.customer-service-verification-dialog::backdrop {
  background: rgba(23, 50, 71, 0.48);
}

.customer-service-verification-dialog form {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 22px;
  border: 2px solid #bddff0;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.customer-service-verification-dialog h2,
.customer-service-verification-dialog p {
  margin: 0;
}

@media (max-width: 680px) {
  .customer-service-hero {
    grid-template-columns: minmax(0, 1fr) 96px;
    padding: 18px;
  }

  .customer-service-panel-heading,
  .customer-service-ticket-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-service-limit {
    max-width: none;
    text-align: left;
  }

  .customer-service-ticket-heading > label {
    min-width: 0;
  }

  .customer-service-category label {
    flex: 1 1 calc(50% - 10px);
  }
}

.messages-page main.messages-dashboard {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 72px;
}

.messages-hero,
.messages-section {
  border: 1px solid rgba(112, 158, 191, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.messages-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
}

.messages-section h2,
.messages-section h3 {
  margin-top: 0;
}

.messages-hero .section-kicker,
.messages-unread-summary {
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
}

.messages-support-unread {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: #d93636;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.messages-hero .section-kicker {
  flex: 0 0 auto;
}

.messages-unread-summary {
  min-width: 0;
  border-radius: 999px;
  color: #173247;
  background: #fff0a8;
  text-align: right;
}

.messages-page-status,
.messages-panel-status {
  color: var(--muted);
}

.messages-page-status {
  margin: 14px 4px 22px;
}

.messages-page-status[data-state="error"],
.messages-panel-status[data-state="error"] {
  color: #a42121;
  font-weight: 700;
}

.messages-page-status[data-state="success"],
.messages-panel-status[data-state="success"] {
  color: #187245;
}

.messages-section {
  margin-top: 22px;
  padding: 24px;
}

.messages-section-heading,
.messages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.messages-toolbar select {
  min-width: 120px;
}

.messages-official-heading {
  gap: 8px;
}

.messages-official-heading .messages-toolbar {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.messages-official-heading .messages-toolbar label {
  flex: 0 1 76px;
  min-width: 0;
}

.messages-official-heading .messages-toolbar select {
  width: 76px;
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.85rem;
}

.messages-official-heading .messages-toolbar button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: none;
}

.messages-thread-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.messages-thread-filter-row label {
  min-width: 0;
}

.messages-thread-filter-row select {
  width: min(128px, 32vw);
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.85rem;
}

.messages-thread-filter-row select.has-unread,
.messages-thread-filter-row option.has-unread {
  color: #c52222;
  font-weight: 800;
}

.thread-selected-unread-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  color: #526b7d;
  background: #edf5fa;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.thread-selected-unread-count.has-unread {
  color: #fff;
  background: #d93636;
}

.message-card-list {
  display: grid;
  gap: 12px;
}

.message-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sky);
  border-radius: 16px;
  background: #fff;
}

.message-card.is-unread {
  border-left-color: var(--coral);
  background: #fffdf4;
}

.message-card.notification-priority-urgent {
  border-left-color: #d93636;
}

.message-card header,
.message-card-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.message-card-labels {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.message-card time,
.message-card-sender,
.conversation-message time {
  color: var(--muted);
  font-size: 0.84rem;
}

.message-card h3 {
  margin: 12px 0 6px;
}

.message-card-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-card-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  color: #31536a;
  background: #e8f5ff;
  font-size: 0.76rem;
  font-weight: 800;
}

.message-card-badge.priority-urgent {
  color: #fff;
  background: #d93636;
}

.messages-load-more {
  margin-top: 14px;
}

.messages-load-more[hidden] {
  display: none;
}

.messages-empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed #b9cfde;
  border-radius: 14px;
  color: var(--muted);
  background: #f8fcff;
}

.broadcast-compose,
.message-compose {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fcff;
}

.broadcast-compose[hidden],
.message-compose[hidden] {
  display: none;
}

.broadcast-compose label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.conversation-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fcff;
}

.conversation-panel {
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.conversation-message-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  max-height: 560px;
  padding: 8px;
  overflow-y: auto;
}

.conversation-history-button {
  align-self: center;
  margin: 0 0 8px;
}

.conversation-message {
  width: min(78%, 620px);
  padding: 10px 13px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(42, 88, 130, 0.08);
}

.conversation-message.is-own {
  align-self: flex-end;
  background: #fff0a8;
}

.conversation-message p {
  margin: 0 0 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.conversation-message.message-status-withdrawn,
.conversation-message.message-status-moderated {
  color: var(--muted);
  font-style: italic;
}

.message-compose {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin: 14px 0 0;
  padding: 12px;
}

.message-compose textarea {
  resize: vertical;
}

@media (max-width: 760px) {
  .messages-section-heading,
  .messages-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .messages-official-heading,
  .messages-official-heading .messages-toolbar {
    align-items: center;
    flex-direction: row;
  }

  .conversation-panel {
    min-height: 420px;
  }

  .message-compose {
    grid-template-columns: 1fr;
  }

  .conversation-message {
    width: 90%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .target-rain-canvas {
    display: none;
  }

  .main-bg-video {
    display: none;
  }
}

@media (max-width: 860px) {
  #sessionHeader,
  .hero,
  .game-center-hero,
  .page-shell,
  .guest-landing {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-end;
  }

  #sessionHeader {
    --header-logo-left: 14px;
    --header-logo-width: min(560px, calc(100vw - 28px));
    --header-nav-height: 42px;
    --header-nav-overlap: 36px;
    background:
      radial-gradient(circle at 78% 24px, rgba(255, 31, 45, 0.2), transparent 116px),
      linear-gradient(105deg, #fff0ec 0%, #e9d9ff 52%, #cbe9ff 100%);
  }

  .header-user-badge {
    top: 10px;
    right: 10px;
  }

  .hero {
    min-height: auto;
  }

  .game-center-hero {
    gap: 14px;
  }

  .game-center-art {
    justify-self: center;
    width: min(100%, 560px);
  }

  .home-page.user-mode main::before {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.68) 38%, rgba(255, 255, 255, 0.82) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.4));
  }

  .headline-grid {
    grid-template-columns: 1fr;
  }

  .account-hero,
  .account-summary-grid {
    grid-template-columns: 1fr;
  }

  .account-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .membership-tab-list {
    display: flex;
  }

  .account-member-actions {
    justify-content: flex-start;
  }

  .headline-card {
    min-height: 0;
  }

  .home-logo-banner {
    width: min(100%, 760px);
    margin-bottom: 0;
  }

  .adventure-scene {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .hero-scene-image {
    object-fit: fill;
    object-position: center center;
  }

  .hero-dialogue-bubble {
    min-width: 82px;
    max-width: 130px;
    min-height: 48px;
    padding: 9px 12px;
    border-width: 3px;
    font-size: 0.9rem;
  }

  .guest-landing {
    min-height: auto;
  }

  .page-shell::after {
    display: none;
  }

  .payment-methods-hero,
  .coin-packages-hero,
  .send-coins-hero,
  .send-coins-grid {
    grid-template-columns: 1fr;
  }

  .payment-methods-character,
  .coin-packages-character,
  .send-coins-character {
    justify-self: center;
    width: min(46vw, 150px);
  }

  .payment-method-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .payment-method-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .coin-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .privacy-policy-header,
  .privacy-policy-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .privacy-policy-header nav {
    width: 100%;
  }

  .privacy-policy-main {
    width: min(100% - 20px, 920px);
  }

  .privacy-policy-hero,
  .privacy-policy-content {
    border-radius: 18px;
  }

  .register-submit-row {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .register-submit-row button {
    flex: 0 1 auto;
  }

  .privacy-consent {
    flex: 0 0 auto;
    font-size: 0.88rem;
  }

  main {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .login-page main {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
    border-radius: 0;
  }

  #sessionHeader {
    --header-logo-left: 10px;
    --header-logo-width: calc(100vw - 20px);
    --header-nav-height: 42px;
    --header-nav-overlap: 36px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .user-mode #sessionHeader {
    --header-logo-click-reserve: 84px;
  }

  .target-rain-canvas {
    display: none;
  }

  .site-nav a,
  .nav-logout-button,
  .session-user {
    font-size: 0.88rem;
  }

  .game-center-hero {
    min-height: 170px;
    padding: 12px 0 16px;
  }

  .hero-actions {
    width: min(100%, 340px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
  }

  .hero-actions .button-link,
  .hero-actions .secondary-link {
    min-height: 40px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.92rem;
  }

  .header-user-badge {
    width: 68px;
    height: 68px;
  }

  .header-user-badge .identity-avatar {
    inset: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
  }

  .header-user-badge .identity-avatar.preset-avatar-image {
    inset: 2px;
    width: calc(100% - 4px) !important;
    height: calc(100% - 4px) !important;
  }

  .guest-landing {
    padding-top: 22px;
  }

  .guest-copy h1 {
    margin-bottom: 8px;
    font-size: 1.35rem;
  }

  .guest-copy p {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .account-dashboard {
    gap: 18px;
  }

  .account-hero {
    padding: 18px;
  }

  .account-hero h1 {
    font-size: clamp(1.25rem, 6vw, 1.8rem);
  }

  #accountGreetingTime {
    font-size: 0.68em;
  }

  .account-greeting-row {
    gap: 10px;
  }

  .account-hero-avatar {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .account-metric-card {
    min-height: 104px;
    padding: 14px;
  }

  .account-balance-card {
    min-height: 0;
    padding: 14px;
    gap: 7px;
  }

  .account-balance-card strong {
    margin-right: auto;
    font-size: clamp(0.9rem, 4.4vw, 1.2rem);
  }

  .account-balance-card a {
    font-size: clamp(0.65rem, 3vw, 0.88rem);
  }

  .account-challenge-card {
    min-height: 0;
    padding: 10px 14px;
  }

  .account-challenge-card strong {
    font-size: clamp(0.66rem, 2.8vw, 0.9rem);
  }

  .account-prize-card {
    gap: 8px;
    padding: 12px;
  }

  .account-prize-card span {
    font-size: clamp(0.58rem, 2.5vw, 0.78rem);
  }

  .account-prize-card strong {
    font-size: var(--account-primary-line-font-size);
  }

  .account-pass-card {
    height: 40px;
    min-height: 0;
    padding: 0 12px;
  }

  .account-action-grid .account-action-button {
    padding-right: 8px;
    padding-left: 8px;
    font-size: clamp(0.7rem, 3.4vw, 0.9rem);
  }

  .membership-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding-right: 5px;
    padding-left: 5px;
    font-size: clamp(0.7rem, 3vw, 0.82rem);
    line-height: 1.05;
    white-space: normal;
  }

  .membership-tab > span {
    max-width: 100%;
    overflow-wrap: normal;
    text-align: center;
  }

  .settings-tab {
    min-height: 42px;
    padding-right: 5px;
    padding-left: 5px;
    font-size: clamp(0.76rem, 3.6vw, 0.9rem);
  }

  .settings-profile-list {
    grid-template-columns: 1fr;
  }

  .settings-title-block {
    gap: 12px;
  }

  .settings-title-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 1rem;
  }

  .settings-avatar-option {
    width: 54px;
    height: 54px;
  }

  .settings-tab + .settings-tab {
    margin-left: -8px;
  }

  .settings-tab-panel {
    padding: 14px;
  }

  .membership-tab.is-active {
    min-height: 58px;
  }

  .membership-tab + .membership-tab {
    margin-left: -8px;
  }

  .mark-library-select-row {
    grid-template-columns: 1fr;
  }

  .add-member-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pass-label,
  .pass-links a {
    font-size: 0.86rem;
  }

  form,
  dl {
    padding: 14px;
  }

  dl {
    grid-template-columns: 1fr;
  }

  .adventure-scene {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .hero-scene-image {
    object-fit: fill;
    object-position: center center;
  }

  .hero-dialogue-bubble[data-role="boy"] {
    left: 14%;
    top: 50%;
  }

  .hero-dialogue-bubble[data-role="girl"] {
    left: 64%;
    top: 68%;
  }

  .hero-dialogue-bubble[data-role="parent"] {
    left: 30%;
    top: 12%;
  }

  .hero-dialogue-bubble[data-role="teacher"] {
    left: 70%;
    top: 12%;
  }

  .character-sprite {
    width: clamp(80px, 28vw, 126px);
  }

  .sprite-boy {
    left: 4%;
    bottom: 28px;
  }

  .sprite-girl {
    left: 26%;
    bottom: 82px;
  }

  .sprite-parent {
    right: 24%;
    bottom: 22px;
  }

  .sprite-teacher {
    right: 2%;
    bottom: 70px;
  }

  .speech {
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .page-character {
    float: none;
    display: block;
    width: min(46vw, 150px);
    margin: -6px auto 18px;
  }

  .payment-methods-hero,
  .payment-methods-panel,
  .coin-packages-hero,
  .coin-packages-panel,
  .send-coins-hero,
  .send-coins-panel {
    padding: 14px;
  }

  .payment-methods-hero h1,
  .coin-packages-hero h1,
  .send-coins-hero h1 {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .payment-method-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .payment-method-icon {
    width: 48px;
    height: 48px;
  }

  .payment-method-actions,
  .payment-setup-grid,
  .send-history-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .payment-method-actions button,
  .payment-setup-grid button,
  .send-history-actions button,
  .coin-transfer-card button {
    width: 100%;
  }

  .coin-transfer-card {
    grid-template-columns: 1fr;
  }

  .coin-package-grid {
    grid-template-columns: 1fr;
  }

  .coin-package-card {
    grid-template-columns: 22px 48px minmax(0, 1fr);
    min-height: 96px;
  }

  .coin-package-card img {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 360px) {
  .account-dashboard {
    --account-primary-line-font-size: 0.7rem;
  }

  .account-hero {
    padding: 12px;
  }

  .account-greeting-row {
    gap: 6px;
  }

  .account-hero-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .account-weather .weather-icon {
    width: 16px;
    height: 16px;
  }

  .account-pass-card .pass-label,
  .account-pass-card .pass-links a,
  .account-prize-card strong {
    font-size: 0.7rem;
  }

  .account-challenge-card strong {
    font-size: 0.7rem;
  }
}
