.nav-shell[data-shared-nav-shell="true"] {
  width: 100%;
  background: rgba(16, 19, 21, 0.76);
  border-bottom: 1px solid var(--line, rgba(229, 255, 245, 0.13));
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"],
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] {
  background: linear-gradient(90deg, var(--nav-light-edge), var(--nav-light-center) 50%, var(--nav-light-edge));
  border-bottom-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 34px var(--nav-light-shadow);
}

.nav-shell[data-shared-nav-shell="true"] .nav {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 42px);
  padding: 8px clamp(16px, 2.4vw, 32px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.nav-shell[data-shared-nav-shell="true"] .nav-primary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.nav-shell[data-shared-nav-shell="true"] .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text, #f2fff8);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-shell[data-shared-nav-shell="true"] .brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-shell[data-shared-nav-shell="true"] .brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
}

.nav-shell[data-shared-nav-shell="true"] .nav-links,
.nav-shell[data-shared-nav-shell="true"] .nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-shell[data-shared-nav-shell="true"] .nav-links {
  flex: 0 1 auto;
  justify-content: flex-start;
  min-width: 0;
}

.nav-shell[data-shared-nav-shell="true"] .nav-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.nav-shell[data-shared-nav-shell="true"] .nav-link {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--muted, rgba(242, 255, 248, 0.68));
  text-decoration: none;
  white-space: nowrap;
  transition: 160ms ease;
}

.nav-shell[data-shared-nav-shell="true"] .nav-link.is-active,
.nav-shell[data-shared-nav-shell="true"] .nav-link:hover {
  color: var(--text, #f2fff8);
  background: rgba(var(--accent-rgb, 154, 242, 201), 0.08);
}

.nav-shell[data-shared-nav-shell="true"] .theme-toggle,
.nav-shell[data-shared-nav-shell="true"] .nav-wallet,
.nav-shell[data-shared-nav-shell="true"] .account-button {
  min-height: 40px;
  border: 1px solid var(--line, rgba(229, 255, 245, 0.13));
  border-radius: 12px;
  color: var(--text, #f2fff8);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font: inherit;
  transition: 160ms ease;
}

.nav-shell[data-shared-nav-shell="true"] .nav-wallet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--text, #f2fff8);
  background: rgba(var(--accent-rgb, 154, 242, 201), 0.08);
}

.nav-shell[data-shared-nav-shell="true"] .nav-wallet[hidden] {
  display: none !important;
}

.nav-shell[data-shared-nav-shell="true"] .nav-wallet-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--accent, #9af2c9);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-shell[data-shared-nav-shell="true"] .theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 8px 11px;
}

.nav-shell[data-shared-nav-shell="true"] .theme-toggle::before {
  content: "";
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border-radius: 0;
  background: var(--accent, #9af2c9);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9A9 9 0 1 1 12 3Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9A9 9 0 1 1 12 3Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 11px rgba(var(--accent-rgb, 154, 242, 201), 0.42));
}

.nav-shell[data-shared-nav-shell="true"] .theme-toggle.is-preview-light {
  color: var(--text, #101315);
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .theme-toggle,
:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .nav-wallet,
:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .account-button,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .theme-toggle,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .nav-wallet,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .account-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .theme-toggle::before,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .theme-toggle.is-preview-light::before {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  -webkit-mask: none;
  mask: none;
  filter: none;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.34);
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .nav-link,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .nav-link {
  color: rgba(255, 255, 255, 0.72);
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .brand,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .brand {
  color: #ffffff;
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .nav-link.is-active,
:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .nav-link:hover,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .nav-link.is-active,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .nav-wallet-icon,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .nav-wallet-icon {
  stroke: #ffffff;
}

:root:not([data-theme="dark"]) .nav-shell[data-shared-nav-shell="true"] .nav-membership-badge,
:root[data-theme="light"] .nav-shell[data-shared-nav-shell="true"] .nav-membership-badge {
  color: var(--membership-badge-text);
  border-color: var(--membership-badge-border);
  background: var(--membership-badge-bg);
}

.nav-shell[data-shared-nav-shell="true"] .account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  text-decoration: none;
}

.nav-shell[data-shared-nav-shell="true"] .nav-account-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.nav-shell[data-shared-nav-shell="true"] .nav-account-avatar[hidden] {
  display: none !important;
}

.nav-shell[data-shared-nav-shell="true"] .account-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-shell[data-shared-nav-shell="true"] .nav-membership-badge,
.gcai-account-tier {
  --membership-badge-text: #48505a;
  --membership-badge-bg: linear-gradient(180deg, #f5f7f9, #dfe4e9);
  --membership-badge-border: rgba(91, 103, 116, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--membership-badge-border);
  color: var(--membership-badge-text);
  background: var(--membership-badge-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.nav-shell[data-shared-nav-shell="true"] .nav-membership-badge::before,
.gcai-account-tier::before {
  content: none;
  display: none;
}

.nav-shell[data-shared-nav-shell="true"] .nav-membership-badge[data-membership-tier="vip"],
.gcai-account-tier[data-membership-tier="vip"] {
  --membership-badge-text: #6b4300;
  --membership-badge-bg: #efc45b;
  --membership-badge-border: rgba(174, 119, 14, 0.42);
}

.nav-shell[data-shared-nav-shell="true"] .nav-membership-badge[data-membership-tier="svip"],
.gcai-account-tier[data-membership-tier="svip"] {
  --membership-badge-text: #ffe1a3;
  --membership-badge-bg: linear-gradient(135deg, #201224, #5b2865 58%, #9d6b1f);
  --membership-badge-border: rgba(255, 211, 138, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 5px 14px rgba(45, 18, 55, 0.18);
}

.nav-shell[data-shared-nav-shell="true"] .nav-membership-badge[data-membership-tier="gc-vip"],
.gcai-account-tier[data-membership-tier="gc-vip"] {
  --membership-badge-text: #f7e8ff;
  --membership-badge-bg: linear-gradient(135deg, #241033, #7a2e8f 52%, #d39a2d);
  --membership-badge-border: rgba(227, 178, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 6px 16px rgba(86, 26, 108, 0.22);
}

.nav-shell[data-shared-nav-shell="true"] .nav-membership-badge[hidden] {
  display: none !important;
}

.site-footer[data-shared-footer] {
  margin-top: 34px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line, rgba(229, 255, 245, 0.13));
  color: var(--muted, rgba(242, 255, 248, 0.62));
  font-size: 12px;
  line-height: 1.8;
}

.site-footer[data-shared-footer] .footer-links,
.site-footer[data-shared-footer] .footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  flex-wrap: wrap;
}

.site-footer[data-shared-footer] .footer-links {
  margin-bottom: 8px;
}

.site-footer[data-shared-footer] a {
  color: rgba(var(--text-rgb, 242, 255, 248), 0.76);
  text-decoration: none;
}

.site-footer[data-shared-footer] a:hover {
  color: var(--text, #f2fff8);
}

.gcai-login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 8, 13, 0.6);
  z-index: 1000;
}

.gcai-login-overlay[hidden] {
  display: none !important;
}

.gcai-login-modal {
  width: min(520px, calc(100vw - 24px));
  border-radius: 22px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: var(--panel-strong, #211a28);
  color: var(--text, #f3edf7);
  box-shadow: 0 18px 50px var(--shadow, rgba(0, 0, 0, 0.35));
}

.gcai-login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.gcai-login-head h2 {
  margin: 6px 0 0;
  font-size: 28px;
}

.gcai-login-kicker {
  color: var(--muted, rgba(243, 237, 247, 0.6));
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gcai-login-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: rgba(var(--text-rgb, 243, 237, 247), 0.06);
  color: var(--text, #f3edf7);
  font: inherit;
  cursor: pointer;
}

.gcai-login-body {
  padding: 16px 18px 18px;
}

.gcai-login-body p {
  margin: 0;
  color: var(--muted, rgba(243, 237, 247, 0.68));
  line-height: 1.7;
}

.gcai-login-field {
  margin-top: 16px;
}

.gcai-login-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted, rgba(243, 237, 247, 0.68));
  font-size: 14px;
}

.gcai-login-field input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: rgba(var(--text-rgb, 243, 237, 247), 0.035);
  color: var(--text, #f3edf7);
  font: inherit;
}

.gcai-login-field input::placeholder {
  color: rgba(var(--text-rgb, 243, 237, 247), 0.42);
}

.gcai-login-field input:focus {
  border-color: rgba(var(--accent-rgb, 154, 242, 201), 0.52);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 154, 242, 201), 0.12);
  outline: none;
}

.gcai-login-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding: 5px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  background: rgba(var(--text-rgb, 243, 237, 247), 0.035);
}

.gcai-login-tabs[hidden] {
  display: none;
}

.gcai-login-tab {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  color: var(--muted, rgba(243, 237, 247, 0.72));
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.gcai-login-tab.is-active {
  color: #161019;
  background: var(--accent, #9ef3c6);
  font-weight: 800;
}

:root[data-theme="light"] .gcai-login-tab.is-active {
  color: #ffffff;
}

.gcai-login-tab.is-disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.gcai-login-panel {
  display: none;
  margin-top: 16px;
}

.gcai-login-panel.is-active {
  display: block;
}

.gcai-login-methods {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 88px));
  gap: 6px;
  margin-top: 2px;
  padding: 4px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  background: rgba(var(--text-rgb, 243, 237, 247), 0.035);
}

.gcai-login-method {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  color: var(--muted, rgba(243, 237, 247, 0.72));
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.gcai-login-method.is-active {
  color: #161019;
  background: var(--accent, #9ef3c6);
  font-weight: 800;
}

:root[data-theme="light"] .gcai-login-method.is-active {
  color: #ffffff;
}

.gcai-login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: end;
}

.gcai-login-code-row .gcai-login-button {
  min-height: 48px;
}

.gcai-login-button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.gcai-login-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted, rgba(243, 237, 247, 0.6));
}

.gcai-login-switch-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent, #9ef3c6);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.gcai-login-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.gcai-login-button {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: rgba(var(--text-rgb, 243, 237, 247), 0.055);
  color: var(--text, #f3edf7);
  font: inherit;
  cursor: pointer;
}

.gcai-login-button.is-primary {
  background: rgba(var(--accent-rgb, 154, 242, 201), 0.18);
  border-color: rgba(var(--accent-rgb, 154, 242, 201), 0.32);
}

:root[data-theme="light"] .gcai-login-button.is-primary {
  color: #ffffff;
  background: var(--accent, #5a2f62);
  border-color: var(--accent, #5a2f62);
}

.gcai-login-third-party {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.gcai-wechat-login-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  border: 0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.gcai-wechat-login-button img {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 999px;
}

.gcai-wechat-login-button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.gcai-wechat-mini-scan-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  background: rgba(var(--panel-rgb, 20, 20, 24), 0.72);
}

:root[data-theme="light"] .gcai-wechat-mini-scan-panel {
  background: rgba(255, 255, 255, 0.86);
}

.gcai-wechat-mini-scan-panel[hidden] {
  display: none;
}

.gcai-wechat-mini-scan-main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.gcai-wechat-mini-scan-qr {
  min-height: 132px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  color: #332840;
}

.gcai-wechat-mini-scan-qr img {
  width: 132px;
  height: 132px;
  display: block;
}

.gcai-wechat-mini-scan-qr span {
  padding: 12px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.gcai-wechat-mini-scan-meta {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--text, #f3edf7);
}

.gcai-wechat-mini-scan-meta strong {
  font-size: 14px;
}

.gcai-wechat-mini-scan-meta span {
  color: var(--muted, rgba(243, 237, 247, 0.66));
  font-size: 13px;
  line-height: 1.5;
}

.gcai-wechat-mini-scan-meta code {
  display: block;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(var(--text-rgb, 243, 237, 247), 0.07);
  color: var(--text, #f3edf7);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  word-break: break-all;
}

.gcai-wechat-mini-scan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.gcai-login-result {
  margin-top: 14px;
  min-height: 22px;
  color: var(--muted, rgba(243, 237, 247, 0.68));
}

.gcai-login-result[data-state="error"] {
  color: var(--danger, #ff9aa8);
}

.gcai-login-result[data-state="success"] {
  color: var(--accent, #9ef3c6);
}

.gcai-account-popover {
  position: fixed;
  width: 292px;
  border-radius: 18px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: var(--panel-strong, #262027);
  color: var(--text, #f3edf7);
  box-shadow: 0 18px 50px var(--shadow, rgba(0, 0, 0, 0.35));
  padding: 14px;
  z-index: 1000;
}

.gcai-account-popover[hidden] {
  display: none !important;
}

.gcai-account-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.gcai-account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(var(--text-rgb, 243, 237, 247), 0.08);
}

.gcai-account-name {
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gcai-account-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gcai-account-name-row .gcai-account-name {
  min-width: 0;
}

:root[data-theme="light"] .gcai-account-tier {
  color: var(--membership-badge-text);
  border-color: var(--membership-badge-border);
  background: var(--membership-badge-bg);
}

.gcai-account-meta {
  margin-top: 6px;
  color: var(--muted, rgba(243, 237, 247, 0.6));
  font-size: 13px;
}

.gcai-account-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.gcai-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  background: rgba(var(--text-rgb, 243, 237, 247), 0.035);
  color: var(--text, #f3edf7);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-shell[data-shared-nav-shell="true"] .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-shell[data-shared-nav-shell="true"] .nav-primary {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-shell[data-shared-nav-shell="true"] .nav-links,
  .nav-shell[data-shared-nav-shell="true"] .nav-actions {
    justify-content: flex-start;
  }

  .gcai-login-code-row,
  .gcai-wechat-card,
  .gcai-wechat-mini-scan-main {
    grid-template-columns: 1fr;
  }

  .gcai-wechat-mini-scan-qr {
    width: 132px;
    margin: 0 auto;
  }
}
