:root {
  --ink: #111713;
  --ink-soft: #34413a;
  --paper: #f2f0e7;
  --paper-bright: #fbfaf5;
  --line: #d2d0c5;
  --jade: #1f6657;
  --jade-dark: #174c42;
  --cinnabar: #a13b32;
  --gold: #ae843f;
  --muted: #70776f;
  --shadow: 0 18px 50px rgba(10, 22, 16, 0.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  letter-spacing: 0;
}
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.app-shell[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 68px);
  display: flex;
  align-items: center;
  gap: 28px;
  color: #f7f6ef;
  background: rgba(10, 18, 14, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28)); }
.brand span { display: grid; gap: 1px; }
.brand strong { font-family: KaiTi, STKaiti, serif; font-size: 20px; font-weight: 700; }
.brand small { color: #aebbb3; font-size: 10px; }
.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #ccd5cf;
  font-size: 13px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6bc495; box-shadow: 0 0 0 4px rgba(107, 196, 149, 0.12); }
.member-nav { display: flex; align-items: stretch; height: 72px; gap: 4px; margin-left: 14px; }
.nav-tab, .account-button {
  border: 0;
  background: transparent;
  color: #cbd4ce;
  padding: 0 15px;
  cursor: pointer;
  white-space: nowrap;
}
.nav-tab { border-bottom: 2px solid transparent; font-size: 14px; }
.nav-tab:hover, .nav-tab.is-active { color: #fff; border-bottom-color: #b69a60; }
.account-button { display: inline-flex; gap: 9px; align-items: center; }
.account-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff6df;
  background: var(--cinnabar);
  font-family: KaiTi, STKaiti, serif;
}

.portal-banner {
  position: fixed;
  z-index: 19;
  top: 58px;
  left: 0;
  right: 0;
  min-height: 42px;
  padding: 9px clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #4f3c1e;
  background: #eadab8;
  border-bottom: 1px solid #b9a172;
  font-size: 13px;
}
.portal-banner strong { color: #8c452f; white-space: nowrap; }
.portal-banner.is-maintenance { color: #f1dfd1; background: #65332d; border-bottom-color: #a65d4f; }
.portal-banner.is-maintenance strong { color: #fff4e9; }
.has-portal-banner .portal-view { padding-top: 100px; }

main { min-height: calc(100vh - 64px); }
.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(390px, 0.75fr); background: var(--paper-bright); }
.auth-scene {
  min-height: 720px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: clamp(80px, 10vw, 148px) clamp(28px, 6vw, 96px);
  color: white;
  background-image: url("/static/img/game/login_bg.png");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.auth-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 246, 236, 0.05) 35%, rgba(16, 29, 24, 0.78) 100%);
}
.scene-copy { position: relative; z-index: 1; max-width: 560px; }
.official-game-logo { width: min(420px, 82%); height: auto; margin: 0 0 18px; display: block; filter: drop-shadow(0 2px 1px rgba(255, 255, 255, 0.2)); }
.realm-kicker, .section-mark { margin: 0 0 12px; color: #a9d0c5; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; }
.scene-copy h1 {
  margin: 0;
  font-family: KaiTi, STKaiti, serif;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: 0 7px 25px rgba(0, 0, 0, 0.24);
}
.scene-note { margin: 22px 0 0; color: rgba(255, 255, 255, 0.82); font-size: 16px; }
.auth-workspace {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 510px);
  min-height: 720px;
  padding: 116px clamp(30px, 5vw, 72px) 70px;
}
.auth-heading h2 { margin: 0 0 8px; font-family: KaiTi, STKaiti, serif; font-size: 36px; font-weight: 700; }
.auth-heading > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.section-mark { color: var(--cinnabar); }
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 34px;
  border-bottom: 1px solid var(--line);
}
.segment {
  position: relative;
  border: 0;
  padding: 13px 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.segment::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px; background: transparent; }
.segment.is-active { color: var(--ink); }
.segment.is-active::after { background: var(--cinnabar); }
.auth-form { display: grid; gap: 18px; margin-top: 26px; }
.field { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c8cbc5;
  border-radius: 4px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  padding: 0 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input:focus, .role-picker select:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(31, 102, 87, 0.12); }
.field input[aria-invalid="true"] { border-color: var(--cinnabar); }
.field-error { min-height: 15px; color: var(--cinnabar); font-size: 11px; font-weight: 500; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 50px; }
.reveal-button {
  position: absolute;
  right: 7px;
  top: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--jade);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.check-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.check-row input { width: 17px; height: 17px; accent-color: var(--jade); }
.primary-button, .secondary-button, .danger-button {
  min-height: 48px;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  font-weight: 800;
}
.primary-button { color: white; background: var(--jade); }
.primary-button:hover { background: var(--jade-dark); }
.primary-button:disabled { opacity: 0.55; cursor: wait; }
.auth-form .primary-button { width: 100%; justify-content: space-between; margin-top: 2px; padding: 0 20px; }
.secondary-button { color: var(--jade); border-color: var(--jade); background: transparent; }
.danger-button { color: var(--cinnabar); border-color: #dfc5c1; background: #fff; }
.auth-footnote { margin: 24px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.portal-view {
  min-height: 100vh;
  padding: 72px 0 90px;
  background: #eee8dc url("/static/img/game/charge_shop_bg.png") center top / cover fixed no-repeat;
}
.portal-hero {
  max-width: 1240px;
  min-height: 182px;
  margin: 0 auto;
  padding: 46px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  color: #332c22;
}
.portal-hero .realm-kicker { margin-bottom: 5px; color: #9a6b2e; font-family: KaiTi, STKaiti, serif; font-size: 15px; }
.portal-hero h1, .page-heading h1 { margin: 0 0 8px; font-family: KaiTi, STKaiti, serif; font-size: 44px; line-height: 1; }
.portal-hero p:last-child { margin: 0; color: #776b5a; font-size: 13px; }
.page-heading > p:last-child { margin: 0; color: rgba(255, 255, 255, 0.75); }
.role-summary {
  min-width: min(520px, 50vw);
  display: grid;
  grid-template-columns: 56px repeat(3, minmax(90px, 1fr));
  gap: 18px;
  align-items: center;
  padding: 17px 22px;
  border: 1px solid #bdb09b;
  background: rgba(248, 245, 236, 0.82);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.48), 0 5px 18px rgba(76, 57, 32, 0.08);
}
.role-orbit { width: 42px; height: 42px; border: 1px solid #998b73; border-radius: 50%; position: relative; }
.role-orbit::before { content: ""; position: absolute; inset: 8px; border: 1px solid #c6983e; transform: rotate(45deg); }
.role-summary div, .role-picker { min-width: 0; display: grid; gap: 5px; }
.role-summary small { color: #887c68; font-size: 11px; }
.role-summary strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-picker select {
  width: 100%;
  min-height: 30px;
  border: 1px solid #b5aa97;
  padding: 3px 26px 3px 7px;
  color: #40382d;
  background: rgba(255, 252, 243, 0.88);
  font: inherit;
}
.role-picker select:disabled { color: #887c68; opacity: 0.8; }
.shop-toolbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(126, 108, 78, 0.24);
  border-bottom: 1px solid rgba(126, 108, 78, 0.28);
}
.role-warning { max-width: 1192px; margin: 24px auto 0; padding: 16px 18px; display: flex; gap: 12px; color: #754a18; background: #f4e6c9; border-left: 3px solid var(--gold); }
.role-warning span { color: #786a51; }
.product-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.product-card {
  min-height: 390px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 30px 42px;
  color: #413727;
  background: url("/static/img/game/charge_shop_item_bg.png") center / 100% 100% no-repeat;
  transition: transform 140ms ease, filter 140ms ease;
}
.product-card:hover { transform: translateY(-2px); filter: drop-shadow(0 9px 7px rgba(73, 54, 27, 0.15)); }
.rarity-jade { --rarity: #3f8877; --rarity-rgb: 63, 136, 119; }
.rarity-bronze { --rarity: #8b6545; --rarity-rgb: 139, 101, 69; }
.rarity-gold { --rarity: #b58a38; --rarity-rgb: 181, 138, 56; }
.rarity-moon { --rarity: #79918f; --rarity-rgb: 121, 145, 143; }
.rarity-spirit { --rarity: #aa4a3e; --rarity-rgb: 170, 74, 62; }
.rarity-void { --rarity: #303d39; --rarity-rgb: 48, 61, 57; }
.product-art {
  height: 108px;
  margin: 0 0 5px;
  display: grid;
  place-items: center;
}
.item-icon-frame {
  width: 90px;
  height: 104px;
  position: relative;
  display: grid;
  place-items: center;
}
.product-icon { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 4px 2px rgba(64, 40, 15, 0.2)); }
.product-copy { display: grid; place-items: center; text-align: center; }
.product-eyebrow { margin: 4px 0 0; color: #967a53; font-size: 11px; }
.product-card h2 { margin: 0; font-family: KaiTi, STKaiti, serif; font-size: 22px; }
.product-badge { position: absolute; z-index: 2; top: 36px; left: 24px; padding: 4px 9px; color: #fff9e9; background: #9c5c34; border: 1px solid rgba(88, 47, 24, 0.28); font-size: 10px; white-space: nowrap; }
.product-card.is-recommended .product-badge { top: 30px; right: 20px; left: auto; width: 44px; height: 114px; overflow: hidden; color: transparent; background: url("/static/img/game/wz_tj.png") center / contain no-repeat; border: 0; }
.product-description { margin: 9px 0 5px; color: #826633; font-weight: 800; text-align: center; font-size: 13px; }
.product-items { display: grid; gap: 7px; margin: 4px 0 14px; padding: 7px 9px; background: rgba(255, 252, 241, 0.46); border-top: 1px solid rgba(129, 100, 55, 0.22); border-bottom: 1px solid rgba(129, 100, 55, 0.22); }
.product-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 6px; color: #645642; font-size: 12px; }
.product-item img { width: 28px; height: 32px; object-fit: contain; }
.product-item strong { color: #a24727; }
.product-buy { margin-top: auto; display: flex; justify-content: center; }
.buy-button { width: 124px; min-height: 46px; border: 0; padding: 0 15px; color: #533517; background: url("/static/img/game/item_btn.png") center / 100% 100% no-repeat; cursor: pointer; font-weight: 800; text-shadow: 0 1px rgba(255, 255, 255, 0.75); }
.buy-button:hover:not(:disabled) { filter: brightness(1.06) saturate(1.08); }
.buy-button:disabled { filter: grayscale(1); opacity: 0.62; cursor: not-allowed; }

.page-heading { min-height: 230px; padding: 66px clamp(20px, 6vw, 96px) 48px; color: white; background: #16251f; }
.order-table-wrap { max-width: 1192px; margin: 28px auto 0; padding: 0 24px; overflow-x: auto; }
.order-table { width: 100%; min-width: 820px; border-collapse: collapse; background: var(--paper-bright); }
.order-table th, .order-table td { padding: 16px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.order-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.order-id { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: Consolas, monospace; }
.delivery-status { display: inline-flex; align-items: center; gap: 7px; color: var(--jade); font-weight: 800; }
.delivery-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #50a47d; }
.delivery-status.is-claimed { color: #337b62; }
.delivery-status.is-pending { color: #9a6b2e; }
.delivery-status.is-pending::before { background: #c39036; }
.delivery-status.is-failed { color: #a2473d; }
.delivery-status.is-failed::before { background: #b84f44; }
.order-detail-button, .heading-action {
  min-height: 34px;
  border: 1px solid currentColor;
  padding: 6px 13px;
  color: var(--jade);
  background: transparent;
  cursor: pointer;
}
.order-detail-button:hover, .heading-action:hover { background: rgba(31, 102, 87, 0.07); }
.heading-action { position: absolute; right: clamp(20px, 6vw, 96px); bottom: 42px; color: #efe7d2; }
.page-heading { position: relative; }
.empty-state { padding: 72px 20px; text-align: center; background: var(--paper-bright); }
.empty-seal { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid var(--cinnabar); color: var(--cinnabar); font-family: KaiTi, STKaiti, serif; font-size: 22px; transform: rotate(-4deg); }
.empty-state h2 { font-family: KaiTi, STKaiti, serif; font-size: 28px; margin: 0; }
.empty-state p { color: var(--muted); }

.account-menu {
  position: fixed;
  z-index: 30;
  top: 64px;
  right: clamp(18px, 4vw, 64px);
  width: 230px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.account-menu p { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.account-menu strong, .account-menu small { display: block; }
.account-menu small { margin: 4px 0 16px; color: var(--muted); }
.account-menu .danger-button { width: 100%; min-height: 38px; }

.purchase-dialog { width: min(520px, calc(100vw - 28px)); border: 0; padding: 0; background: transparent; }
.purchase-dialog::backdrop { background: rgba(9, 15, 12, 0.7); backdrop-filter: blur(4px); }
.dialog-shell { position: relative; padding: 30px; background: var(--paper-bright); border-top: 4px solid var(--cinnabar); }
.dialog-shell h2 { margin: 0 0 18px; font-family: KaiTi, STKaiti, serif; font-size: 30px; }
.dialog-product-art { width: 92px; height: 106px; margin: 0 0 12px; }
.dialog-product-art img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 2px rgba(64, 40, 15, 0.18)); }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; font-size: 24px; }
.dialog-items { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dialog-item { display: flex; justify-content: space-between; gap: 12px; }
.dialog-role, .dialog-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-role { padding: 14px 0 0; color: var(--muted); font-size: 13px; }
.dialog-role strong { max-width: 70%; overflow: hidden; color: #40382d; text-overflow: ellipsis; white-space: nowrap; }
.dialog-total { padding: 16px 0 10px; }
.dialog-total strong { color: var(--cinnabar); font-size: 28px; }
.dialog-note { color: var(--muted); font-size: 12px; line-height: 1.65; }
.dialog-shell .primary-button { width: 100%; margin-top: 10px; }
.order-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.order-detail-heading h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-status { flex: 0 0 auto; padding: 5px 9px; color: #8e5f25; border: 1px solid #b89d6d; font-size: 12px; }
.order-status.is-claimed, .order-status.is-mail_sent { color: #276853; border-color: #79a08e; }
.order-status.is-failed { color: #9b3f35; border-color: #c58b84; }
.order-detail-list, .success-identifiers { margin: 18px 0; display: grid; gap: 0; }
.order-detail-list div, .success-identifiers div { min-width: 0; padding: 10px 0; display: grid; grid-template-columns: 92px 1fr; gap: 14px; border-bottom: 1px solid rgba(126, 108, 78, 0.22); }
.order-detail-list dt, .success-identifiers dt { color: var(--muted); }
.order-detail-list dd, .success-identifiers dd { min-width: 0; margin: 0; overflow-wrap: anywhere; text-align: right; }

.success-view { display: grid; place-items: center; }
.success-window {
  width: min(760px, calc(100vw - 32px));
  padding: clamp(28px, 5vw, 52px);
  color: #40382d;
  text-align: center;
  background: #ece8dc url("/static/img/game/gift_pack_bg.png") center / 100% 100% no-repeat;
  border: 1px solid #777166;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 14px 44px rgba(0,0,0,.22);
}
.success-seal { width: 62px; height: 62px; margin: 0 auto 14px; display: grid; place-items: center; color: #f6ead0; background: #9f493b; border: 1px solid #71302a; font-family: KaiTi, STKaiti, serif; font-size: 29px; }
.success-window h1 { margin: 0; font-family: KaiTi, STKaiti, serif; font-size: 38px; font-weight: 500; }
.success-copy { margin: 10px 0 24px; color: var(--muted); }
.success-product { padding: 18px; display: grid; grid-template-columns: 86px repeat(2, minmax(0, 1fr)); gap: 14px 20px; align-items: center; text-align: left; border-top: 1px solid #b6ad9e; border-bottom: 1px solid #b6ad9e; }
.success-product img { grid-row: 1 / 3; width: 82px; height: 96px; object-fit: contain; }
.success-product div { min-width: 0; display: grid; gap: 5px; }
.success-product small { color: var(--muted); }
.success-product strong { overflow-wrap: anywhere; }
.success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.success-actions button { min-width: 132px; }

.toast-region { position: fixed; z-index: 50; right: 24px; bottom: 24px; width: min(360px, calc(100vw - 48px)); display: grid; gap: 10px; }
.toast { padding: 14px 16px; color: white; background: #193129; border-left: 3px solid #68b08f; box-shadow: var(--shadow); animation: toast-in 180ms ease-out; }
.toast.is-error { background: #482522; border-left-color: #d7776e; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

footer { min-height: 64px; padding: 0 clamp(20px, 4vw, 68px); display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #abb5ae; background: #101713; font-size: 11px; }

@media (max-width: 980px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-scene { min-height: 430px; align-items: flex-end; padding-top: 120px; }
  .scene-copy h1 { font-size: 36px; }
  .auth-workspace { width: min(100%, 620px); min-height: auto; margin: 0 auto; padding-top: 56px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portal-hero { align-items: flex-start; flex-direction: column; }
  .role-summary { min-width: 0; width: 100%; }
}

@media (max-width: 700px) {
  .topbar { height: 62px; padding: 0 16px; gap: 12px; }
  .brand strong { font-size: 17px; }
  .brand small, .server-pill { display: none; }
  .member-nav { margin-left: auto; height: 62px; }
  .nav-tab { padding: 0 8px; font-size: 12px; }
  .account-button { padding: 0 4px; }
  .account-button > span:last-child { display: none; }
  .auth-scene { min-height: 390px; padding: 100px 24px 50px; }
  .scene-copy h1 { font-size: 32px; }
  .auth-workspace { padding: 44px 24px 60px; }
  .portal-view { padding-top: 62px; }
  .portal-hero { min-height: 285px; padding: 42px 20px 24px; }
  .portal-hero h1, .page-heading h1 { font-size: 38px; }
  .role-summary { grid-template-columns: 40px 1fr 1fr; gap: 12px; padding: 14px; }
  .role-summary > div:last-child { grid-column: 2 / 4; }
  .role-orbit { width: 34px; height: 34px; }
  .shop-toolbar { align-items: flex-start; flex-direction: column; padding-inline: 18px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 18px 9px; }
  .product-card { min-height: 320px; padding: 36px 16px 34px; }
  .product-art { height: 82px; }
  .item-icon-frame { width: 70px; height: 84px; }
  .product-card h2 { font-size: 17px; }
  .product-eyebrow { font-size: 10px; }
  .product-description { margin-top: 7px; font-size: 12px; }
  .product-items { padding-inline: 5px; }
  .product-item { grid-template-columns: 24px 1fr; gap: 4px; }
  .product-item img { width: 22px; height: 27px; }
  .product-item strong { grid-column: 1 / 3; text-align: center; }
  .product-badge { top: 28px; left: 17px; padding-inline: 6px; }
  .product-card.is-recommended .product-badge { top: 23px; right: 13px; width: 36px; height: 94px; }
  .buy-button { width: min(110px, 100%); min-height: 42px; }
  .portal-view { background-attachment: scroll; }
  .role-warning { margin-inline: 18px; flex-direction: column; }
  .page-heading { min-height: 210px; padding: 56px 20px 38px; }
  .account-menu { right: 12px; top: 58px; }
  footer { align-items: flex-start; flex-direction: column; padding-block: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Official client UI pass */
body.is-auth-view { overflow-x: hidden; background: #d9ddd7; }
.is-auth-view footer { display: none; }
.auth-view {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: end center;
  padding: 140px 20px 38px;
  background: #dfe4df url("/static/img/game/login_bg.png") center 62% / cover no-repeat;
  overflow: hidden;
}
.auth-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(247, 249, 245, 0.05), rgba(21, 36, 31, 0.08) 58%, rgba(16, 30, 25, 0.5));
  pointer-events: none;
}
.auth-view > .official-game-logo {
  position: absolute;
  z-index: 1;
  top: clamp(34px, 7vh, 74px);
  left: 50%;
  width: min(510px, 72vw);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 1px rgba(255, 255, 255, 0.7));
}
.auth-scene { display: none; }
.auth-workspace {
  position: relative;
  z-index: 2;
  width: min(430px, calc(100vw - 28px));
  min-height: 0;
  padding: 31px 46px 25px;
  display: block;
  color: #e9eee8;
  background:
    linear-gradient(rgba(11, 23, 20, 0.88), rgba(18, 31, 27, 0.92)),
    url("/static/img/game/ui_an_1.png") center / cover;
  border: 1px solid rgba(222, 206, 168, 0.72);
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.05), 0 14px 38px rgba(7, 18, 14, 0.28);
}
.auth-workspace::before,
.auth-workspace::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c6aa6c, transparent);
}
.auth-workspace::before { top: 11px; }
.auth-workspace::after { bottom: 11px; }
.auth-heading { position: relative; text-align: center; }
.auth-heading h2 { margin: 0; color: #f5eedb; font-family: KaiTi, STKaiti, serif; font-size: 27px; font-weight: 500; }
.auth-heading > p:last-child { margin: 4px 0 0; color: #9ba9a2; font-size: 11px; }
.auth-emblem {
  width: 12px;
  height: 12px;
  display: block;
  margin: 0 auto 7px;
  border: 1px solid #d7b771;
  transform: rotate(45deg);
}
.segmented { margin-top: 17px; border-bottom-color: rgba(208, 190, 149, 0.28); }
.segment { min-height: 38px; padding: 7px; color: #8d9993; font-family: KaiTi, STKaiti, serif; font-size: 16px; font-weight: 500; }
.segment.is-active { color: #f1e5c8; }
.segment.is-active::after { background: #c6a45d; }
.auth-form { gap: 9px; margin-top: 14px; }
.field { gap: 4px; color: #bdc5c0; font-size: 11px; font-weight: 500; }
.game-input { position: relative; display: block; }
.game-input > i {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 20px;
  transform: translateY(-50%);
  background: center / contain no-repeat;
  opacity: 0.72;
  pointer-events: none;
}
.input-user-icon { background-image: url("/static/img/game/ui_login_icon.png") !important; }
.input-lock-icon { background-image: url("/static/img/game/ui_reg_icon.png") !important; }
.field input {
  min-height: 43px;
  border: 1px solid rgba(181, 169, 139, 0.44);
  border-radius: 2px;
  color: #f1f3ee;
  background: rgba(2, 10, 8, 0.68);
  padding: 0 42px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.28);
}
.field input::placeholder { color: #727e78; }
.field input:focus { border-color: #c2a86e; box-shadow: 0 0 0 1px rgba(194, 168, 110, 0.26), inset 0 0 12px rgba(0, 0, 0, 0.3); }
.password-wrap input { padding-right: 48px; }
.reveal-button { top: 4px; right: 6px; color: #c2aa74; }
.field-error { min-height: 11px; color: #e8927f; font-size: 10px; }
.check-row { color: #a8b0ac; font-size: 10px; }
.check-row input { accent-color: #a5503f; }
.auth-form .primary-button {
  width: min(270px, 100%);
  min-height: 49px;
  margin: 3px auto 0;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: #4b351b;
  background: url("/static/img/game/ui_select_server_db_4_high.png") center / 100% 100% no-repeat;
  font-family: KaiTi, STKaiti, serif;
  font-size: 19px;
  font-weight: 700;
  text-shadow: 0 1px rgba(255, 244, 208, 0.85);
}
.auth-form .primary-button:hover { filter: brightness(1.08); background-color: transparent; }
.auth-footnote { margin: 10px 0 0; color: #8d9892; font-size: 10px; text-align: center; }

.topbar {
  height: 58px;
  padding: 0 clamp(14px, 3vw, 44px);
  color: #eee8d8;
  background: rgba(15, 27, 23, 0.94);
  border-bottom-color: #947b4d;
  backdrop-filter: none;
}
.brand img { width: 32px; height: 32px; border-radius: 4px; }
.brand strong { color: #e9dcb9; font-size: 18px; }
.brand small { color: #849189; }
.member-nav { height: 58px; }
.nav-tab { font-family: KaiTi, STKaiti, serif; font-size: 15px; }
.nav-tab:hover, .nav-tab.is-active { border-bottom-color: #c09d56; }

.portal-view {
  padding: 58px 18px 36px;
  background-position: center top;
}
.shop-window {
  max-width: 1320px;
  min-height: calc(100vh - 96px);
  margin: 20px auto 0;
  overflow: hidden;
  background: rgba(240, 236, 225, 0.9);
  border: 1px solid #988f80;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.48), 0 14px 36px rgba(70, 54, 32, 0.16);
}
.portal-hero {
  max-width: none;
  min-height: 112px;
  padding: 18px 28px;
  background: rgba(234, 229, 215, 0.84);
  border-bottom: 1px solid #b5aa97;
}
.shop-title { min-width: 220px; }
.portal-hero .realm-kicker { margin: 0 0 1px; color: #9a4a36; font-size: 12px; }
.portal-hero h1 { margin: 0 0 5px; font-size: 34px; font-weight: 500; }
.role-summary {
  min-width: min(520px, 48vw);
  padding: 11px 16px;
  border-color: #b5aa97;
  background: rgba(250, 247, 238, 0.68);
  box-shadow: none;
}
.role-orbit {
  display: grid;
  place-items: center;
  color: #f5e7c8;
  border: 1px solid #7f342d;
  border-radius: 2px;
  background: #9f493b;
  font-family: KaiTi, STKaiti, serif;
}
.role-orbit::before { display: none; }
.shop-body { min-height: 600px; display: block; }
.shop-content { min-width: 0; padding: 0 22px 24px; }
.shop-toolbar {
  max-width: none;
  min-height: 58px;
  padding: 9px 13px;
  border-top: 0;
  border-bottom-color: #b6ad9e;
}
.shop-section-title { color: #594a39; font-family: KaiTi, STKaiti, serif; font-size: 22px; }
.role-warning { max-width: none; margin: 14px 13px 0; }
.product-grid {
  max-width: none;
  padding: 18px 8px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}
.product-card { min-height: 360px; padding: 40px 27px 38px; }
.product-card:hover { transform: none; filter: brightness(1.025) drop-shadow(0 6px 5px rgba(73, 54, 27, 0.12)); }

.purchase-dialog { width: min(480px, calc(100vw - 24px)); }
.purchase-dialog::backdrop { background: rgba(8, 15, 12, 0.68); backdrop-filter: none; }
.dialog-shell {
  padding: 30px 38px;
  color: #40382d;
  background: #ece8dc url("/static/img/game/gift_pack_bg.png") center / 100% 100% no-repeat;
  border: 1px solid #777166;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 14px 44px rgba(0,0,0,.3);
}
.dialog-shell .section-mark { color: #9d4a37; letter-spacing: 0; }
.dialog-shell .primary-button { border-radius: 0; color: #4e351a; background: url("/static/img/game/ui_select_server_db_4_high.png") center / 100% 100% no-repeat; }
.dialog-shell .primary-button:hover { filter: brightness(1.06); background-color: transparent; }

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}

@media (max-width: 760px) {
  .auth-view { min-height: 100svh; padding: 118px 12px 18px; background-position: center 70%; }
  .auth-view > .official-game-logo { top: 22px; width: min(390px, 82vw); }
  .auth-workspace { width: min(390px, calc(100vw - 24px)); padding: 24px 24px 20px; }
  .auth-heading h2 { font-size: 24px; }
  .auth-form { gap: 7px; }
  .field input { min-height: 41px; }
  .topbar { height: 54px; padding-inline: 10px; }
  .portal-banner { top: 54px; min-height: 0; padding: 8px 12px; align-items: flex-start; flex-direction: column; gap: 2px; font-size: 11px; }
  .has-portal-banner .portal-view { padding-top: 112px; }
  .member-nav { height: 54px; }
  .nav-tab { padding-inline: 7px; font-size: 13px; }
  .portal-view { padding: 54px 5px 18px; }
  .shop-window { min-height: calc(100vh - 70px); margin-top: 8px; }
  .portal-hero { min-height: 0; padding: 14px; gap: 12px; }
  .portal-hero h1 { font-size: 28px; }
  .portal-hero p:last-child { font-size: 11px; }
  .role-summary { grid-template-columns: 34px 1fr 1fr; min-width: 0; width: 100%; padding: 8px; gap: 8px; }
  .shop-body { min-height: 520px; }
  .shop-content { padding: 0 4px 14px; }
  .shop-toolbar { min-height: 50px; padding-inline: 8px; }
  .shop-section-title { font-size: 19px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 10px 1px; }
  .product-card { min-height: 304px; padding: 34px 13px 31px; }
  .product-card h2 { font-size: 16px; }
  .product-badge { top: 27px; left: 13px; }
  .product-card.is-recommended .product-badge { top: 22px; right: 10px; }
  .heading-action { right: 20px; bottom: 20px; }
  .success-window { padding: 28px 18px; }
  .success-window h1 { font-size: 30px; }
  .success-product { grid-template-columns: 70px 1fr; }
  .success-product img { grid-row: 1 / 5; width: 66px; height: 82px; }
  .success-actions { display: grid; }
  .success-actions button { width: 100%; }
}

@media (max-height: 720px) and (min-width: 761px) {
  .auth-view { padding-bottom: 18px; }
  .auth-view > .official-game-logo { top: 20px; width: 390px; }
  .auth-workspace { padding-block: 23px 20px; }
  .auth-form { gap: 6px; }
  .field input { min-height: 39px; }
}
.product-original-price { margin-top:5px; display:block; color:#8d8172; font-size:11px; text-align:center; }
