/* Apple 液态玻璃配色：浅冷灰底 + 半透磨砂卡片 + 近黑文字 + 苹果蓝主色 */
:root {
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --paper: #ffffff;
    --paper-soft: #f5f5f7;
    --line: #d2d2d7;
    --deep: #1d1d1f;
    --deep-2: #2c2c2e;
    --teal: #0071e3;
    --gold: #0071e3;
    --gold-2: #2997ff;
    --red: #ff3b30;

    /* 液态玻璃质感令牌 */
    --accent: #0071e3;
    --accent-2: #2997ff;
    --accent-rgb: 0, 113, 227;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-strong: rgba(255, 255, 255, 0.74);
    --glass-bg-soft: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-hairline: rgba(0, 0, 0, 0.07);
    --glass-blur: saturate(180%) blur(22px);
    --glass-blur-lite: saturate(160%) blur(12px);
    --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    --glass-shadow: 0 8px 30px rgba(17, 24, 39, 0.10), 0 2px 8px rgba(17, 24, 39, 0.06);
    --glass-shadow-lg: 0 24px 70px rgba(17, 24, 39, 0.18), 0 6px 18px rgba(17, 24, 39, 0.08);
    --glass-tint: rgba(0, 113, 227, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    background: #f5f5f7;
}

body {
    margin: 0;
    min-width: 1320px;
    min-height: 100vh;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.003em;
    background: #f5f5f7;
}

.archive-topbar {
    min-width: 1320px;
    color: #dceeff;
    background: linear-gradient(180deg, #0475c8 0%, #00579d 48%, #003f78 100%);
    border-bottom: 1px solid #002f5b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 6px rgba(0, 58, 114, .22);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.archive-topbar-inner {
    width: 1300px;
    height: 28px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.archive-topbar-brand {
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.archive-topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.archive-topbar-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #89f7a1;
    box-shadow: 0 0 0 3px rgba(137, 247, 161, .18);
}

.archive-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.archive-language-switch a {
    min-height: 20px;
    padding: 0 10px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #e9f5ff;
    border: 1px solid rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .08);
    text-transform: none;
    letter-spacing: 0;
}

.archive-language-switch a.is-active,
.archive-language-switch a:hover {
    color: #00579d;
    background: #fff;
    border-color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

.site {
    width: 1300px;
    margin: 14px auto 48px;
}

.hero {
    position: relative;
    height: auto;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid rgba(39, 38, 35, .08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 26px 56px rgba(48, 46, 42, .24);
}

.hero-static-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    pointer-events: none;
    object-fit: contain;
    object-position: center;
}

.main-nav {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 8px 24px rgba(65, 62, 56, .06);
}

.main-nav a {
    min-height: 52px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #4f5052;
    background: transparent;
    font-size: 17px;
    font-weight: 700;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.main-nav a:hover {
    color: var(--gold);
    background: rgba(0, 113, 227, .1);
}

.main-nav a.is-active {
    color: #fff;
    font-weight: 800;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    box-shadow: 0 6px 14px rgba(0, 113, 227, .28);
}

.content-panel {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    margin-top: 18px;
    padding: 26px 34px 36px 20px;
    border: 1px solid rgba(39, 38, 35, .07);
    border-radius: 28px;
    background: rgba(252, 252, 253, .95);
    box-shadow: 0 30px 70px rgba(75, 71, 63, .15);
}

.side-column {
    display: grid;
    align-content: start;
    gap: 18px;
}

.account-card {
    position: relative;
    padding: 20px;
    border-radius: 16px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(75, 71, 63, .08);
    overflow: hidden;
}

.account-card h2 {
    padding-right: 50px;
    margin: 0 0 18px;
    font-size: 22px;
}

.account-card h2::before {
    margin-right: 10px;
    color: var(--gold);
    content: "◆";
    font-size: 14px;
    vertical-align: 2px;
}

.account-mascot {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 1;
    width: 44px;
    height: auto;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .22));
}

.account-guest[hidden],
.account-member[hidden],
.account-mascot[hidden],
.account-guild-icon[hidden] {
    display: none !important;
}

.account-body {
    position: relative;
    min-height: var(--account-body-h, auto);
}

.account-member {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: var(--account-body-h, auto);
    box-sizing: border-box;
}

.member-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.member-hero {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border: 1px solid rgba(0, 113, 227, .22);
    border-radius: 12px;
    background: rgba(0, 113, 227, .1);
}

.member-hero-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 2px solid var(--line);
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 2px 6px rgba(75, 71, 63, .12);
}

.member-hero-text {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 2px;
}

.member-hero-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.member-hero-name {
    overflow: hidden;
    color: var(--ink);
    font-size: 17px;
    font-weight: 1000;
    letter-spacing: .02em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-hero-dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b9bbbd;
    box-shadow: 0 0 0 2px rgba(0, 113, 227, .18);
    transition: background .25s ease, box-shadow .25s ease;
}

/* 游戏在线：圆点变绿并带轻微光晕 */
.member-hero-dot.is-online {
    background: #28c76f;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .22),
        0 0 6px rgba(40, 199, 111, .85);
}

.member-details {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper-soft);
}

.member-detail-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.member-detail-label {
    color: var(--gold);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.member-detail-label::after {
    content: "：";
}

.member-detail-value {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-detail-value--guild {
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-guild-icon {
    flex-shrink: 0;
    width: 12px;
    height: 13px;
    object-fit: contain;
    image-rendering: pixelated;
}

.account-guild-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-logout-btn {
    flex-shrink: 0;
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(180deg, #7892a4, #6b879b);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(70, 67, 60, .28);
}

.member-logout-btn:hover {
    filter: brightness(1.06);
}

.login-message {
    margin: 0 0 8px;
    color: #7c95a7;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.login-message:empty {
    display: none;
    margin: 0;
}

.login-message.is-error {
    color: #c0392b;
}

.login-message.is-success {
    color: #1f7a4d;
}

.login-form {
    display: grid;
    gap: 12px;
}

/* Invisible Cloudflare Turnstile for login: rendered so the silent challenge can run,
   but kept out of the form's grid flow so it never adds a visible control or gap. */
.login-turnstile {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.login-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.login-form input {
    width: 100%;
    height: 40px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .15);
}

.login-form button,
.create-account {
    min-height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.login-form button {
    color: #fff;
    background: linear-gradient(180deg, #7892a4, #6b879b);
}

.create-account {
    color: #fff;
    background: linear-gradient(180deg, #7e97a8, var(--gold));
}

.support-link {
    color: #7c95a7;
    font-size: 14px;
    font-weight: 900;
}

.download-card {
    min-height: 82px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 0 22px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #829aab, #6b879b);
    box-shadow: 0 14px 28px rgba(86, 113, 133, .2);
}

.download-card span {
    font-size: 22px;
    font-weight: 1000;
}

.download-card strong {
    font-size: 15px;
}

.server-status-card {
    display: grid;
    place-content: center;
    row-gap: 16px;
    padding: 14px 0 0;
    background: transparent;
}

.status-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.server-status-card img {
    display: block;
    width: 260px;
    height: auto;
    image-rendering: auto;
}

.server-status-card a {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.server-status-card a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.register-form {
    display: grid;
    gap: 22px;
    padding: 28px 32px 34px;
}

.register-intro {
    padding: 18px 22px;
    border: 1px solid rgba(109, 137, 157, .34);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(121, 146, 164, .2), rgba(252, 252, 253, .9));
}

.register-intro strong {
    display: block;
    margin-bottom: 6px;
    font-size: 22px;
    font-weight: 1000;
}

.register-intro p {
    margin: 0;
    color: #524e44;
    font-size: 16px;
    line-height: 1.7;
}

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

.register-field {
    display: grid;
    gap: 8px;
}

.register-field span {
    color: var(--ink);
    font-size: 17px;
    font-weight: 1000;
}

.register-field em {
    color: var(--red);
    font-style: normal;
}

.register-field input,
.register-field select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(39, 38, 35, .18);
    border-radius: 9px;
    color: var(--ink);
    background: #fcfcfd;
    font: inherit;
    font-size: 16px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(39, 38, 35, .06);
}

.register-field input:focus,
.register-field select:focus {
    border-color: rgba(82, 78, 69, .62);
    box-shadow: 0 0 0 3px rgba(82, 78, 69, .12);
}

.register-field small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.password-field-wrap {
    position: relative;
    width: 100%;
}

.password-field-wrap input {
    padding-right: 48px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #857d6a;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .15s ease, background-color .15s ease;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus-visible {
    color: var(--ink);
    background: rgba(82, 78, 69, .1);
    outline: none;
}

.password-toggle-icon {
    display: block;
}

.password-toggle-icon--hide {
    display: none;
}

.password-toggle-btn.is-visible .password-toggle-icon--show {
    display: none;
}

.password-toggle-btn.is-visible .password-toggle-icon--hide {
    display: block;
}

.register-actions {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: center;
    padding-top: 4px;
}

.register-actions button {
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    font-size: 18px;
    font-weight: 1000;
    cursor: pointer;
}

.register-actions button:hover,
.register-actions button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(86, 113, 133, .24);
}

.register-actions button[disabled] {
    cursor: wait;
    opacity: .68;
    transform: none;
    box-shadow: none;
}

.register-message {
    min-height: 24px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 900;
}

.register-message.is-error {
    color: var(--red);
}

.register-message.is-success {
    color: var(--teal);
}

.register-message a {
    color: var(--teal);
    font-weight: 900;
    text-decoration: underline;
}

/* 注册 · 服务条款 */
.register-tos {
    display: grid;
    gap: 10px;
}
.register-tos-head strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
}
.register-tos-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.register-tos-box {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    color: #4e4a41;
    font-size: 13.5px;
    line-height: 1.78;
}
.register-tos-box:focus-visible {
    outline: 2px solid rgba(109, 137, 157, .5);
    outline-offset: 2px;
}
.register-tos-title {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 19px;
    font-weight: 900;
}
.register-tos-box h4 {
    margin: 18px 0 6px;
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 800;
}
.register-tos-box p {
    margin: 0;
}

.register-view .register-form {
    display: grid !important;
    gap: 20px;
    max-width: 760px;
    margin: 0 auto;
    padding: 34px 0 40px;
}

.register-view .register-intro {
    position: relative;
    overflow: hidden;
    min-height: 134px;
    display: grid;
    align-content: center;
    padding: 26px 34px;
    border: 0;
    border-radius: 16px;
    background:
        radial-gradient(circle at 88% 20%, rgba(121, 146, 164, .22), transparent 150px),
        linear-gradient(135deg, #2c2c2e, #1d1d1f 72%);
    color: #edeff1;
    box-shadow: 0 18px 34px rgba(39, 38, 35, .2);
}

.register-view .register-intro::before {
    position: absolute;
    inset: auto -40px -80px auto;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(237, 239, 241, .14);
    border-radius: 50%;
    content: "";
}

.register-view .register-intro::after {
    position: absolute;
    top: 28px;
    right: 22px;
    color: rgba(121, 146, 164, .82);
    content: "SPLENGAME";
    font-size: 34px;
    font-weight: 1000;
    letter-spacing: 0.06em;
    opacity: .22;
}

.register-view .register-intro strong {
    color: #edeff1;
    font-size: 28px;
    letter-spacing: 0;
}

.register-view .register-intro p {
    max-width: 560px;
    color: rgba(237, 239, 241, .82);
    font-size: 17px;
}

.register-view .register-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 14px;
}

.register-view .register-field {
    display: grid !important;
    gap: 8px;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid rgba(203, 210, 215, .9);
    border-radius: 14px;
    background: #fcfcfd;
    box-shadow: 0 10px 22px rgba(69, 66, 58, .06);
}

.register-view .register-field span {
    display: block;
    color: var(--ink);
    font-size: 19px;
}

.register-view .register-field input,
.register-view .register-field select {
    display: block;
    width: 100%;
    height: 52px;
    border-color: rgba(39, 38, 35, .13);
    border-radius: 10px;
    font-size: 17px;
    background: #f8f9fa;
}

.register-view .password-field-wrap input {
    padding-right: 48px;
}

.register-view .register-field small {
    max-width: 620px;
    color: #857d6a;
    font-size: 14px;
}

.register-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 166px;
    gap: 18px;
    align-items: end;
    padding: 18px 22px;
    border: 1px solid rgba(82, 78, 69, .22);
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(82, 78, 69, .1), transparent 58%),
        #fcfcfd;
    box-shadow: 0 12px 26px rgba(69, 66, 58, .06);
}

.register-captcha .register-field {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.register-captcha-button {
    display: grid;
    width: 156px;
    height: 56px;
    padding: 2px;
    place-items: center;
    border: 1px solid rgba(109, 137, 157, .48);
    border-radius: 12px;
    background: #fcfcfd;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(82, 78, 69, .11);
}

.register-captcha-button img {
    display: block;
    width: 148px;
    height: 52px;
    border-radius: 10px;
}

.register-aliyun {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 18px 22px;
    border: 1px solid rgba(82, 78, 69, .22);
    border-radius: 14px;
    background: #fcfcfd;
    box-shadow: 0 10px 22px rgba(69, 66, 58, .06);
}

.register-aliyun-title {
    color: var(--ink);
    font-size: 19px;
    font-weight: 1000;
}

.register-aliyun-title em {
    color: var(--red);
    font-style: normal;
}

.register-aliyun-widget {
    min-height: 46px;
}

.register-aliyun-hint {
    color: #857d6a;
    font-size: 14px;
    line-height: 1.55;
}

.register-aliyun-trigger {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
}

.register-turnstile {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 65px;
}

.register-turnstile .cf-turnstile {
    min-height: 65px;
}

.register-view .register-actions {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
}

.register-view .register-actions button {
    width: 100%;
    max-width: 420px;
    min-height: 54px;
    margin: 0 auto;
    border-radius: 12px;
    font-size: 20px;
}

.register-view .register-message {
    min-height: 22px;
    text-align: center;
}

.download-view-body {
    display: grid;
    gap: 22px;
    padding: 26px;
}

.download-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 190px;
    padding: 30px 32px;
    border: 1px solid rgba(0, 113, 227, .18);
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 20%, rgba(84, 184, 255, .42), transparent 32%),
        linear-gradient(135deg, #006edb 0%, #004f9f 55%, #062b5f 100%);
    box-shadow: 0 18px 38px rgba(0, 79, 159, .22);
}

.download-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.download-hero-copy h3 {
    max-width: 620px;
    margin: 0;
    font-size: 38px;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.download-hero-copy p {
    max-width: 640px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 17px;
    line-height: 1.55;
}

.download-primary-button {
    min-width: 230px;
    min-height: 54px;
    padding: 0 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #005eb8;
    background: #fff;
    font-size: 16px;
    font-weight: 1000;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

.download-primary-button:hover,
.download-primary-button:focus-visible {
    transform: translateY(-1px);
    outline: 3px solid rgba(255, 255, 255, .35);
    outline-offset: 3px;
}

.download-banner-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(39, 38, 35, .18);
    border-radius: 12px;
    background: #171938;
    box-shadow: 0 18px 36px rgba(39, 38, 35, .22);
    cursor: pointer;
}

.download-banner-button::after {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.download-banner-button:hover,
.download-banner-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(39, 38, 35, .28);
    outline: 3px solid rgba(109, 137, 157, .32);
    outline-offset: 3px;
}

.download-banner-button img {
    display: block;
    width: 100%;
    height: auto;
}

.download-locale-note {
    padding: 22px 24px 24px;
    border: 1px solid rgba(109, 137, 157, .55);
    border-left: 6px solid var(--gold);
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(121, 146, 164, .28), transparent 52%),
        #f7f8f8;
}

.download-locale-note h3 {
    margin: 0 0 12px;
    color: #d4232a;
    font-size: 29px;
    letter-spacing: 0;
}

.download-locale-note p {
    margin: 0;
    color: #4a473f;
    font-size: 21px;
    line-height: 1.75;
}

.download-locale-note strong {
    font-weight: 900;
    color: var(--ink);
}

.download-locale-options {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: locale-step;
}

.download-locale-options li {
    position: relative;
    padding: 16px 18px 16px 56px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 11px;
    background: rgba(252, 252, 253, .9);
    counter-increment: locale-step;
}

.download-locale-options li::before {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    color: #50697b;
    background: rgba(121, 146, 164, .35);
    content: counter(locale-step);
    font-size: 17px;
    font-weight: 900;
}

.download-locale-options li > strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.6;
}

.download-locale-options li span {
    display: block;
    color: #4a473f;
    font-size: 20px;
    line-height: 1.75;
}

.download-locale-options li span strong {
    display: inline;
    color: var(--ink);
}

.download-requirements {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.download-requirements h3 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 24px;
    letter-spacing: -.02em;
}

.download-requirements p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.download-requirements ul {
    display: grid;
    gap: 10px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.download-requirements li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 9px;
    color: var(--ink);
    background: rgba(252, 252, 253, .88);
    font-size: 15px;
}

.download-requirements li::before {
    color: var(--gold);
    content: ">";
    font-size: 21px;
    font-weight: 1000;
}

.download-requirements strong {
    font-weight: 900;
}

.download-requirements li span {
    display: inline-grid;
    min-width: 68px;
    min-height: 34px;
    place-items: center;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(var(--accent-rgb), .1);
    font-size: 13px;
    font-weight: 900;
}

.download-security-note {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid rgba(0, 113, 227, .16);
    border-left: 5px solid var(--accent);
    border-radius: 14px;
    color: #1f4e79;
    background: rgba(var(--accent-rgb), .08);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
}

.download-mirrors {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.download-mirrors h3 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 29px;
    letter-spacing: 0;
}

.download-mirrors p {
    margin: 10px 0 0;
    color: #4a473f;
    font-size: 21px;
    line-height: 1.7;
}

.download-mirror-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 0;
}

.download-mirror-link {
    display: grid;
    align-items: center;
    gap: 12px;
    min-height: 120px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.download-mirror-link:hover,
.download-mirror-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(0, 113, 227, .35);
    box-shadow: 0 14px 28px rgba(0, 113, 227, .12);
    outline: 3px solid rgba(var(--accent-rgb), .18);
    outline-offset: 3px;
}

.download-mirror-link span {
    display: inline-grid;
    justify-self: start;
    min-height: 28px;
    padding: 0 10px;
    place-items: center;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(var(--accent-rgb), .1);
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 560px) {
    .download-mirror-list {
        grid-template-columns: 1fr;
    }
}

.main-column {
    display: grid;
    gap: 28px;
}

.content-view[hidden],
[hidden] {
    display: none !important;
}

.home-view {
    display: grid;
    gap: 28px;
}

.section-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 14px 32px rgba(69, 66, 58, .08);
}

.section-heading {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #f3f5f6, #e5e8eb);
}

.section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 30px;
    letter-spacing: 0;
}

.section-heading h2::before {
    display: inline-block;
    width: 8px;
    height: 30px;
    margin-right: 12px;
    content: "";
    border-radius: 999px;
    background: var(--gold);
    vertical-align: -5px;
}

.section-heading span {
    padding: 7px 14px;
    border: 1px solid rgba(109, 137, 157, .4);
    border-radius: 999px;
    color: #50697b;
    background: rgba(121, 146, 164, .16);
    font-size: 14px;
    font-weight: 900;
}

.section-link-button {
    padding: 7px 14px;
    border: 1px solid rgba(109, 137, 157, .4);
    border-radius: 999px;
    color: #50697b;
    background: rgba(121, 146, 164, .16);
    font-size: 14px;
    font-weight: 900;
}

.section-link-button:hover,
.section-link-button:focus-visible {
    color: var(--ink);
    background: rgba(121, 146, 164, .34);
}

.notice-list {
    padding: 22px 28px 28px;
}

.notice-item {
    width: 100%;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    display: grid;
    grid-template-columns: 112px 150px 1fr;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

.notice-item:last-child {
    border-bottom: 0;
}

.notice-item:hover strong,
.notice-item:focus-visible strong,
.notice-item.is-active strong {
    color: var(--teal);
}

.notice-item.is-active .notice-type {
    color: #fff;
    background: var(--gold);
    border-color: transparent;
}

.notice-item:focus-visible {
    outline: 3px solid rgba(109, 137, 157, .32);
    outline-offset: -3px;
}

.notice-type {
    display: inline-grid;
    min-height: 30px;
    padding: 0 16px;
    place-items: center;
    border-radius: 999px;
    color: var(--gold);
    background: rgba(0, 113, 227, .12);
    border: 1px solid rgba(0, 113, 227, .26);
    font-size: 15px;
    font-weight: 800;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.notice-item time {
    color: var(--muted);
    font-size: 18px;
}

.notice-item strong {
    font-size: 18px;
}

.notice-empty {
    margin: 0;
    padding: 20px 0;
    color: var(--muted);
    font-size: 16px;
}

/* 公告占位行：保留彩色红标签，日期与标题用骨架横条占位（不可点击） */
.notice-item--placeholder {
    cursor: default;
}
.notice-ph-line {
    display: inline-block;
    width: min(280px, 72%);
    height: 10px;
    border-radius: 999px;
    background: #d8dde1;
}
.notice-ph-line--date {
    width: 64px;
}

.notice-view-body {
    padding: 28px 32px 34px;
}

.notice-detail {
    display: block;
    padding: 22px 24px 24px;
    border: 1px solid rgba(109, 137, 157, .28);
    border-radius: 12px;
    color: var(--ink);
    background: #f7f8f8;
}

.notice-detail[hidden] {
    display: none;
}

.notice-view .notice-detail {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.notice-detail header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.notice-detail header span {
    display: inline-grid;
    min-width: 68px;
    min-height: 30px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 15px;
    font-weight: 900;
}

.notice-detail header time {
    color: var(--muted);
    font-size: 16px;
}

.notice-detail h2 {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    font-size: 28px;
    letter-spacing: 0;
}

.notice-detail-content {
    display: grid;
    gap: 14px;
    color: #3e3b35;
    font-size: 18px;
    line-height: 1.75;
}

.notice-detail-content h2,
.notice-detail-content h3 {
    margin: 0;
    color: var(--ink);
    font-size: 23px;
    letter-spacing: 0;
}

.notice-detail-content p,
.notice-detail-content ul,
.notice-detail-content ol {
    margin: 0;
}

.notice-detail-content ul,
.notice-detail-content ol {
    padding-left: 1.35em;
}

.notice-detail-content code {
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(39, 38, 35, .08);
}

.notice-detail-content hr {
    width: 100%;
    height: 1px;
    margin: 4px 0;
    border: 0;
    background: linear-gradient(90deg, transparent, rgba(109, 137, 157, .55), transparent);
}

.guide-body {
    padding: 20px 24px 26px;
}

.guide-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}

.guide-subnav-button {
    min-width: 132px;
    height: 42px;
    border: 1px solid rgba(109, 137, 157, .48);
    border-radius: 999px;
    color: #50697b;
    background: rgba(121, 146, 164, .14);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.guide-subnav-button:hover,
.guide-subnav-button.is-active {
    color: #fff;
    background: linear-gradient(180deg, #7e97a8, var(--gold));
}

.guide-panel {
    padding-top: 18px;
}

.character-tabs {
    display: flex;
    justify-content: center;
    padding: 0 0 18px;
}

.character-tabs img {
    display: block;
    width: min(100%, 567px);
    height: auto;
}

.character-list {
    display: grid;
    margin-top: 0;
}

.character-row {
    display: grid;
    grid-template-columns: 212px minmax(0, 1fr);
    grid-template-areas: "visual copy";
    align-items: center;
    gap: 22px;
    min-height: 158px;
    padding: 20px 12px;
    border-bottom: 2px dotted #bbb3a2;
    background: transparent;
}

.character-row:first-child {
    border-top: 2px dotted #bbb3a2;
}

.character-row.is-reverse {
    grid-template-columns: minmax(0, 1fr) 212px;
    grid-template-areas: "copy visual";
}

.character-visual {
    grid-area: visual;
    display: grid;
    justify-items: center;
    gap: 9px;
}

.character-portrait {
    width: 128px;
    height: 112px;
    object-fit: cover;
    border: 1px solid #c3bcad;
    background: #fff;
}

.character-copy {
    grid-area: copy;
}

.character-nameplate {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 6px;
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: 0;
    text-align: center;
}

.character-nameplate span {
    font-weight: 1000;
}

.character-nameplate small {
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.character-copy p {
    margin: 4px 0;
    color: #4a473f;
    font-size: 18px;
    line-height: 1.66;
}

.character-detail-button {
    width: 104px;
    height: 22px;
    margin-top: 5px;
    border: 0;
    padding: 0;
    overflow: hidden;
    color: transparent;
    background: url("game-assets/characters/surp/img/View_detail_normal.gif") center / 104px 22px no-repeat;
    cursor: pointer;
    text-indent: -999px;
}

.character-detail-button:hover,
.character-detail-button:focus-visible {
    background-image: url("game-assets/characters/surp/img/View_detail_over.gif");
    outline: 2px solid rgba(82, 78, 69, .28);
    outline-offset: 3px;
}

.character-detail-templates {
    display: none;
}

.modal-open {
    overflow: hidden;
}

.character-modal {
    width: 820px;
    max-width: none;
    max-height: calc(100vh - 64px);
    padding: 0;
    border: 0;
    color: var(--ink);
    background: transparent;
}

.character-modal::backdrop {
    background: rgba(21, 20, 19, .66);
}

.character-modal-panel {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 64px);
    margin: 0;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .32);
}

.character-modal-close {
    position: sticky;
    top: 12px;
    float: right;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 34px;
    margin: 12px 12px 0 0;
    place-items: center;
    border: 1px solid rgba(39, 38, 35, .16);
    border-radius: 50%;
    color: var(--ink);
    background: #fcfcfd;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.character-modal-body {
    clear: both;
    padding: 20px 24px 26px;
}

.character-detail-layout {
    display: grid;
    grid-template-columns: 54% minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.character-detail-art {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.character-detail-text {
    padding-top: 12px;
}

.character-detail-text h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 26px;
    letter-spacing: 0;
}

.character-detail-text strong {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #50697b;
    background: rgba(121, 146, 164, .2);
    font-size: 14px;
}

.character-detail-text p {
    margin: 0 0 10px;
    color: #4a473f;
    font-size: 15px;
    line-height: 1.7;
}

.character-detail-text a {
    display: inline-flex;
    margin-top: 8px;
    color: var(--teal);
    font-weight: 900;
}

.interface-guide-panel {
    padding-top: 4px;
}

.interface-list {
    display: grid;
}

.interface-row {
    display: grid;
    grid-template-columns: 64px 20px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 82px;
    padding: 15px 0;
    border-bottom: 2px dotted #bbb3a2;
}

.interface-row:first-child {
    border-top: 2px dotted #bbb3a2;
}

.interface-icon {
    display: block;
    justify-self: center;
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

.interface-bullet {
    display: block;
    width: 10px;
    height: 14px;
}

.interface-row p {
    margin: 0;
    color: #4a473f;
    font-size: 20px;
    line-height: 1.62;
}

.interface-row strong {
    color: var(--ink);
    font-weight: 900;
}

.key-guide-panel,
.item-guide-panel {
    padding-top: 14px;
}

.key-section {
    padding: 0 0 20px;
    border-bottom: 2px dotted #bbb3a2;
}

.key-section + .key-section {
    padding-top: 18px;
}

.key-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 22px;
    letter-spacing: 0;
}

.key-section h3 img {
    width: 9px;
    height: 9px;
}

.key-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 44px;
    align-items: start;
}

.key-action-grid figure {
    display: grid;
    gap: 10px;
    margin: 0;
    justify-items: center;
}

.key-action-grid img,
.key-map-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.key-action-grid figcaption {
    display: flex;
    width: 100%;
    justify-content: space-evenly;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}

.key-map-image {
    margin: 0 auto;
}

.scroll-table-note {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 18px;
}

.scroll-table-note img {
    width: 130px;
    height: 19px;
}

.scroll-table-wrap {
    overflow-x: auto;
}

.scroll-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
    color: #2c2a26;
    background: #d1d7db;
    font-size: 18px;
    line-height: 1.45;
}

.scroll-table th,
.scroll-table td {
    border: 2px solid #fff;
    padding: 8px 12px;
    text-align: center;
    vertical-align: middle;
}

.scroll-table th {
    color: #fff;
    background: #5e594e;
    font-size: 19px;
    font-weight: 900;
}

.scroll-table td:nth-child(1) {
    width: 48px;
}

.scroll-table td:nth-child(2) {
    width: 64px;
}

.scroll-table td:nth-child(3) {
    width: 210px;
}

.scroll-table td:nth-child(4) {
    width: 100px;
}

.scroll-table td:nth-child(5) {
    text-align: left;
}

.scroll-table img {
    display: block;
    width: 42px;
    height: 51px;
    margin: 0 auto;
}

.mode-guide-panel {
    padding-top: 8px;
}

.mode-section-list {
    display: grid;
    gap: 18px;
}

.mode-section h3 {
    display: inline-flex;
    min-width: 124px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    margin: 0 0 8px;
    padding: 0 18px;
    border-radius: 3px;
    color: #6b6127;
    background: #f4ed9c;
    font-size: 20px;
    letter-spacing: 0;
}

.mode-list {
    display: grid;
}

.mode-row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
    padding: 16px 0 20px;
    border-top: 2px dotted #bbb3a2;
}

.mode-row-featured {
    grid-template-columns: 176px minmax(0, 1fr);
}

.mode-visual {
    display: grid;
    justify-items: center;
    align-content: start;
    padding-top: 4px;
}

.mode-visual img {
    display: block;
    width: auto;
    height: auto;
    max-width: 107px;
    border-radius: 8px;
}

.mode-row-featured .mode-visual img {
    width: auto;
    height: auto;
    max-width: 107px;
}

.mode-visual span {
    display: grid;
    width: 108px;
    min-height: 74px;
    place-items: center;
    padding: 10px;
    border: 1px solid rgba(39, 38, 35, .12);
    border-radius: 8px;
    color: #6b6127;
    background: #f8f1cf;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.mode-copy h4 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: #121110;
    font-size: 21px;
    letter-spacing: 0;
}

.mode-copy h4 > img {
    width: 11px;
    height: 11px;
}

.mode-copy h4 span {
    color: #121110;
    font-weight: 900;
}

.mode-copy p {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    margin: 7px 0;
    color: #585349;
    font-size: 18px;
    line-height: 1.66;
}

.mode-copy p img {
    width: 10px;
    height: 14px;
    margin-top: 8px;
}

.map-guide-panel {
    padding-top: 12px;
}

.map-archive-sheet {
    display: grid;
    justify-items: start;
    width: min(100%, 760px);
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
}

.map-archive-sheet img {
    display: block;
    width: 100%;
    height: auto;
}

.map-split-row {
    display: grid;
    grid-template-columns: 235fr 350fr;
    width: 100%;
}

.map-split-row img {
    width: 100%;
}

.monster-image-nav {
    display: flex;
    justify-content: center;
    margin: 0 0 20px;
}

.monster-strip-frame {
    position: relative;
    width: min(100%, 610px);
    aspect-ratio: 362 / 31;
}

.monster-nav-strip {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    image-rendering: auto;
}

.monster-hotspot {
    position: absolute;
    top: 0;
    bottom: 0;
    border: 0;
    padding: 0;
    color: transparent;
    background: transparent;
    cursor: pointer;
}

.monster-hotspot span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.monster-hotspot-dungeon {
    left: 0;
    width: 33.333%;
}

.monster-hotspot-forest {
    left: 33.333%;
    width: 33.333%;
}

.monster-hotspot-volcano {
    left: 66.666%;
    width: 33.334%;
}

.monster-hotspot:hover,
.monster-hotspot:focus,
.monster-hotspot:focus-visible {
    outline: 0;
    box-shadow: none;
}

.monster-panel {
    display: grid;
    gap: 14px;
}

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

.monster-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
    min-height: 164px;
    padding: 14px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 12px;
    background: #fcfcfd;
}

.monster-image {
    display: block;
    width: 108px;
    height: 116px;
    object-fit: contain;
    align-self: start;
    border: 1px solid rgba(39, 38, 35, .08);
    border-radius: 10px;
    background: #fff;
}

.monster-copy h5 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: 0;
}

.monster-copy span {
    display: inline-flex;
    margin: 5px 0 8px;
    color: #50697b;
    font-size: 14px;
    font-weight: 900;
}

.monster-copy p {
    margin: 0;
    color: #4a473f;
    font-size: 16px;
    line-height: 1.62;
}

.card-archive-head {
    display: block;
    margin: -2px 0 12px;
    padding: 14px 16px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 12px;
    background: #f4f5f6;
}

.card-archive-head h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 24px;
    letter-spacing: 0;
}

.card-archive-head p {
    margin: 0;
    color: #4a473f;
    font-size: 16px;
    line-height: 1.62;
}

.card-archive-head img {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    justify-self: end;
    border-radius: 8px;
    background: #fff;
}

.card-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.card-subnav-button {
    min-width: 150px;
    min-height: 48px;
    border: 1px solid rgba(82, 78, 69, .24);
    border-radius: 10px;
    color: #47443c;
    background: #fcfcfd;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.card-subnav-button:hover,
.card-subnav-button.is-active {
    color: #edeff1;
    background: linear-gradient(180deg, #2c2c2e, #28282a);
}

.card-panel {
    margin-top: 8px;
}

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

.card-type-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    min-height: 168px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfcfd;
}

.card-type-visual {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 12px;
    background: #e9ebed;
}

.card-type-visual img {
    display: block;
    max-width: 60px;
    height: auto;
}

.card-type-white .card-type-visual img {
    width: 58px;
    max-width: 58px;
}

.card-type-visual span {
    display: grid;
    width: 48px;
    height: 54px;
    place-items: center;
    border: 2px solid #c6ced3;
    border-radius: 7px;
    color: #6f695b;
    background: #fff;
    font-size: 14px;
    font-weight: 1000;
}

.card-type-card h4,
.card-copy-block h4,
.utility-card h4,
.white-card h4 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    letter-spacing: 0;
}

.card-type-card p {
    margin: 7px 0 9px;
    color: #4a473f;
    font-size: 16px;
    line-height: 1.56;
}

.card-type-card ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    list-style: none;
}

.card-type-card li::before {
    margin-right: 6px;
    color: var(--gold);
    content: "◆";
    font-size: 9px;
}

.card-info-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.gold-black-intro {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 12px;
    background: #fcfcfd;
}

.gold-black-intro img {
    display: block;
    width: 126px;
    height: auto;
}

.gold-black-intro h4 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 22px;
    letter-spacing: 0;
}

.gold-black-intro p {
    margin: 0 0 7px;
    color: #3d3b35;
    font-size: 17px;
    line-height: 1.58;
}

.card-info-strip article {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border-radius: 10px;
    color: #edeff1;
    background: linear-gradient(135deg, #2e2c28, #50697b);
}

.card-info-strip strong {
    font-size: 18px;
}

.card-info-strip span {
    color: rgba(237, 239, 241, .82);
    font-size: 16px;
    line-height: 1.55;
}

.base-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.base-card-tile {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
    min-height: 112px;
    padding: 10px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 10px;
    background: #fcfcfd;
}

.base-card-art {
    display: block;
    width: 45px;
    height: 53px;
    object-fit: contain;
}

.base-card-copy {
    min-width: 0;
}

.base-card-number {
    display: inline-flex;
    margin-bottom: 4px;
    color: #50697b;
    font-size: 13px;
    font-weight: 1000;
}

.base-card-copy h4 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    letter-spacing: 0;
}

.base-card-copy p {
    margin: 2px 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.base-card-copy em {
    display: grid;
    gap: 4px;
    color: #4a473f;
    font-size: 14px;
    font-style: normal;
    line-height: 1.38;
}

.card-reference-box {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 12px;
    background: #fcfcfd;
}

.card-reference-sample {
    display: block;
    width: 96px;
    height: auto;
}

.card-reference-copy h4 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 18px;
    letter-spacing: 0;
}

.card-reference-copy p {
    margin: 0;
    color: #4a473f;
    font-size: 14px;
    line-height: 1.65;
}

.card-rule-images {
    display: grid;
    justify-items: start;
    gap: 14px;
    margin-bottom: 18px;
}

.card-rule-images img {
    display: block;
    width: min(100%, 760px);
    max-width: 760px;
    height: auto;
    border: 1px solid rgba(39, 38, 35, .08);
    border-radius: 10px;
    background: #fff;
}

.base-card-copy em img {
    display: block;
    width: 49px;
    height: auto;
}

.card-copy-block {
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(109, 137, 157, .32);
    border-radius: 12px;
    background: rgba(121, 146, 164, .12);
}

.card-copy-block p {
    margin: 8px 0 0;
    color: #4a473f;
    font-size: 16px;
    line-height: 1.65;
}

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

.utility-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    min-height: 126px;
    padding: 14px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 10px;
    background: #fcfcfd;
}

.utility-card > span {
    display: grid;
    width: 40px;
    height: 52px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(180deg, #c8cfd4, #958c78);
    font-size: 18px;
    font-weight: 1000;
}

.utility-card p {
    margin: 3px 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.utility-card strong {
    display: block;
    color: #4a473f;
    font-size: 15px;
    line-height: 1.55;
}

.white-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.white-card-showcase {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 12px;
    background: #fcfcfd;
}

.white-card-showcase img {
    display: block;
    width: 164px;
    height: auto;
    image-rendering: auto;
}

.white-card-showcase h4 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 18px;
    letter-spacing: 0;
}

.white-card-showcase p {
    margin: 0;
    color: #4a473f;
    font-size: 16px;
    line-height: 1.55;
}

.white-card {
    min-height: 130px;
    padding: 15px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 10px;
    background: #fcfcfd;
}

.white-card > img {
    display: block;
    width: 44px;
    height: auto;
    margin-bottom: 12px;
}

.white-card span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #50697b;
    background: rgba(121, 146, 164, .22);
    font-size: 13px;
    font-weight: 900;
}

.white-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.guild-highlight {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    margin: 24px;
    padding: 20px 24px;
    border-radius: 16px;
    color: #edeff1;
    background: linear-gradient(135deg, #302e2a, #50697b 58%, #678498);
}

.rank-badge {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--gold);
    font-size: 24px;
    font-weight: 1000;
}

.guild-highlight div span {
    display: block;
    color: rgba(237, 239, 241, .78);
    font-size: 14px;
    font-weight: 900;
}

.guild-highlight strong {
    display: block;
    margin-top: 3px;
    font-size: 34px;
}

.guild-highlight em {
    font-style: normal;
    font-size: 22px;
    font-weight: 1000;
}

.guild-highlight-icon {
    width: 26px;
    height: 28px;
    margin-right: 8px;
    vertical-align: -5px;
    image-rendering: pixelated;
    border-radius: 4px;
    background: rgba(255, 255, 255, .14);
    padding: 1px;
}

/* 排行榜：战盟名称（含标志）与盟主（含头像）单元格 */
.guild-rank-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.guild-rank-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--line);
}
.guild-rank-icon img {
    width: 12px;
    height: 13px;
    object-fit: contain;
    image-rendering: pixelated;
}
.guild-rank-leader {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.guild-rank-leader-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    background: transparent;
}
.guild-rank-empty {
    padding: 28px 16px !important;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
}

/* 排行榜占位行（刚开服 / 数据不足时补齐到 6 行）*/
.rank-mini--ph {
    background: #cdc7ba;
}
.guild-rank-leader-avatar--ph {
    opacity: .85;
}
.guild-rank-ph-bar {
    display: inline-block;
    height: 10px;
    border-radius: 999px;
    background: #d8dde1;
    vertical-align: middle;
}
.guild-rank-ph-bar--name { width: 150px; }
.guild-rank-ph-bar--score { width: 96px; }
.guild-rank-ph-bar--leader { width: 72px; }

table {
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    border-collapse: collapse;
    font-size: 16px;
}

th,
td {
    padding: 16px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--ink);
    font-size: 14px;
    font-weight: 1000;
}

.rank-mini {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    background: var(--teal);
    font-weight: 1000;
}

.site-footer {
    margin-top: 24px;
    padding: 42px 20px;
    border-radius: 24px;
    text-align: center;
    color: var(--muted);
    background: rgba(252, 252, 253, .9);
    box-shadow: 0 18px 40px rgba(75, 71, 63, .1);
}

.footer-animation {
    margin-bottom: 18px;
    text-align: center;
}

.footer-animation img {
    display: inline-block;
    width: 300px;
    max-width: 100%;
    height: auto;
}

.footer-mail-icon {
    display: inline-block;
    margin-right: 2px;
    font-size: 1.35em;
    line-height: 1;
    vertical-align: -0.08em;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
    color: var(--teal);
    font-size: 24px;
}

.site-footer p {
    margin: 0 0 10px;
    font-size: 15px;
}

.site-footer nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    color: var(--teal);
    font-size: 15px;
    font-weight: 900;
}

.footer-copyright {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
}
.footer-copyright p { margin: 0; }
.footer-copyright a {
    color: var(--teal);
    font-weight: 700;
    font-size: inherit;
    text-decoration: none;
}
.footer-copyright a:hover { text-decoration: underline; }

/* ============================================================
   战盟面板 #guild —— Apple 风高级重设计
   干净留白 · 超大标题排版 · 克制配色 · 无装饰图标
   配色沿用站点：米白底 + 金色点缀
   ============================================================ */

.guild-view {
    --gld-ink: #1d1d1f;
    --gld-sub: #6e6e73;
    --gld-gold: #0071e3;
    --gld-gold-soft: #e8f1fd;
    --gld-card: #ffffff;
    --gld-hair: rgba(0, 0, 0, 0.08);
    background: transparent;
}

.guild-view-body {
    display: block;
    padding: 0;
}

.guild-view-message {
    margin: 0;
    padding: 22px 40px 0;
    color: var(--gld-sub);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
.guild-view-message.is-error { color: var(--red); }
.guild-view-message.is-success { color: var(--teal); }
.guild-view-message:empty { display: none; }

/* ---------- 加载状态 ---------- */
.guild-state--loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 120px 22px;
    color: var(--gld-sub);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}
.guild-state--loading p { margin: 0; }

.guild-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(88, 116, 136, 0.1);
    border-top-color: var(--gld-gold);
    border-radius: 50%;
    animation: guild-spin 0.8s cubic-bezier(0.6, 0.2, 0.2, 0.8) infinite;
}

@keyframes guild-spin {
    to { transform: rotate(360deg); }
}

/* ---------- 未登录 / 空状态 ---------- */
.guild-empty-card {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 96px 40px;
    text-align: center;
}
.guild-empty-card strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--gld-ink); }
.guild-empty-card p { margin: 0; max-width: 440px; color: var(--gld-sub); font-size: 15px; line-height: 1.6; }

/* ---------- Minimal Buttons ---------- */
.guild-btn {
    min-height: 48px;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.guild-btn:hover:not([disabled]):not(.is-disabled) { transform: translateY(-1px); }
.guild-btn:active:not([disabled]):not(.is-disabled) { transform: translateY(0); }
.guild-btn[disabled],
.guild-btn.is-disabled { cursor: not-allowed; opacity: .45; transform: none !important; box-shadow: none !important; }

.guild-btn--primary {
    color: #fff;
    background: linear-gradient(180deg, #829aab, #6b879b);
    box-shadow: 0 6px 20px rgba(107, 135, 155, .18);
}
.guild-btn--primary:hover:not([disabled]) { 
    background: linear-gradient(180deg, #8299ab, #6f8a9e);
    box-shadow: 0 10px 24px rgba(107, 135, 155, .26); 
}

.guild-btn--ghost {
    color: var(--gld-ink);
    background: #f6f7f8;
    border: 1px solid var(--gld-hair);
}
.guild-btn--ghost:hover:not([disabled]) { 
    background: #e3e7e9; 
    border-color: #c0c8ce;
}

.guild-btn--ghost-danger {
    color: var(--red);
    background: #fff5f5;
    border: 1px solid rgba(206, 90, 76, .15);
}
.guild-btn--ghost-danger:hover:not([disabled]) {
    background: #fee2e2;
    border-color: rgba(206, 90, 76, .3);
}

.guild-btn--hero-danger {
    color: #ffd2cc;
    background: rgba(233, 117, 95, 0.08);
    border: 1px solid rgba(233, 117, 95, 0.2);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    min-height: 38px;
    padding: 0 18px;
}
.guild-btn--hero-danger:hover:not([disabled]) {
    color: #ffffff;
    background: #CE5A4C;
    border-color: #CE5A4C;
}

.guild-btn--danger { 
    color: #fff; 
    background: linear-gradient(180deg, #e9755f, #ce5a4c); 
    box-shadow: 0 6px 18px rgba(206, 90, 76, .18); 
}
.guild-btn--danger:hover:not([disabled]) { 
    box-shadow: 0 10px 22px rgba(206, 90, 76, .26); 
}

.guild-btn--small { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.guild-btn--block { width: 100%; }

/* ---------- Premium Hero Card ---------- */
.guild-hero-card {
    position: relative;
    overflow: hidden;
    margin: 40px;
    min-height: 134px;
    align-content: center;
    padding: 26px 34px;
    border-radius: 16px;
    background: radial-gradient(circle at 88% 20%, rgba(121, 146, 164, .22), transparent 150px), linear-gradient(135deg, #2c2c2e, #1d1d1f 72%);
    box-shadow: 0 18px 34px rgba(39, 38, 35, .2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.guild-hero-card::before {
    position: absolute;
    inset: auto -40px -80px auto;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(237, 239, 241, .14);
    border-radius: 50%;
    content: "";
    pointer-events: none;
    z-index: 1;
}

.guild-hero-card::after {
    position: absolute;
    top: 28px;
    right: 22px; /* Restore standard right alignment for perfect match with #register */
    color: rgba(121, 146, 164, .82);
    content: "SPLENGAME";
    font-size: 34px;
    font-weight: 1000;
    letter-spacing: 0.06em;
    opacity: .22;
    pointer-events: none;
    z-index: 1;
}

.guild-hero-bg-glow {
    display: none;
}

.guild-hero-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 2;
    flex: 1;
    min-width: 280px;
}

.guild-hero-crest {
    position: relative;
    width: 24px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(237, 239, 241, 0.2);
    flex-shrink: 0;
}
.guild-hero-crest[hidden] {
    display: none !important;
}
.guild-hero-icon { 
    width: 12px; 
    height: 13px; 
    object-fit: contain; 
    image-rendering: pixelated; 
}
.guild-hero-icon[hidden] { display: none !important; }

.guild-hero-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guild-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guild-role-tag { 
    font-size: 11px;
    font-weight: 700; 
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: .02em;
    color: #869dad;
    background: rgba(134, 157, 173, 0.1);
    border: 1px solid rgba(134, 157, 173, 0.15);
}

.guild-hero-duty { 
    font-size: 12px;
    font-weight: 600;
    color: rgba(237, 239, 241, 0.7);
}
.guild-hero-duty em { font-style: normal; color: #ffffff; font-weight: 700; }
.guild-hero-duty[hidden] { display: none !important; }

.guild-hero-name {
    margin: 0;
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.guild-hero-actions-container {
    position: absolute;
    right: 22px;
    bottom: 16px;
    z-index: 2;
}

/* ---------- Stat Cards Vertical Typography (No Icons, No Overflow) ---------- */
.guild-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0 40px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--gld-hair);
}

.guild-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 28px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--gld-hair);
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 0; /* Important: lets fluid clamp sizing do its job */
}
.guild-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 116, 136, 0.3);
    box-shadow: 0 8px 24px rgba(88, 116, 136, 0.04);
}

.guild-stat-label { 
    color: var(--gld-sub); 
    font-size: 13px; 
    font-weight: 600; 
    letter-spacing: .03em;
    margin-bottom: 8px;
}

.guild-stat-value {
    color: var(--gld-ink);
    font-size: clamp(20px, 2.5vw, 28px); /* Responsive sizing: large on desktops, gracefully smaller to prevent overflow */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

/* ---------- Solo State Hero ---------- */
.guild-hero--solo {
    position: relative;
    overflow: hidden;
    min-height: 134px;
    align-content: center;
    padding: 26px 34px;
    border-radius: 16px;
    background: radial-gradient(circle at 88% 20%, rgba(121, 146, 164, .22), transparent 150px), linear-gradient(135deg, #2c2c2e, #1d1d1f 72%);
    box-shadow: 0 18px 34px rgba(39, 38, 35, .2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 40px 40px 24px;
}

.guild-hero--solo::before {
    position: absolute;
    inset: auto -40px -80px auto;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(237, 239, 241, .14);
    border-radius: 50%;
    content: "";
    pointer-events: none;
    z-index: 1;
}

.guild-hero--solo::after {
    position: absolute;
    top: 28px;
    right: 22px;
    color: rgba(121, 146, 164, .82);
    content: "SPLENGAME";
    font-size: 34px;
    font-weight: 1000;
    letter-spacing: 0.06em;
    opacity: .22;
    pointer-events: none;
    z-index: 1;
}

.guild-hero--solo .guild-hero-name {
    color: #edeff1 !important;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    z-index: 1;
}

.guild-hero--solo .guild-hero-sub {
    color: rgba(237, 239, 241, 0.8) !important;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    max-width: 440px;
    line-height: 1.5;
    z-index: 1;
}

.guild-hero--solo .guild-hero-sub {
    color: var(--gld-sub);
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    max-width: 440px;
    line-height: 1.5;
}

/* ---------- Functional Panels (Premium Minimalist Grid) ---------- */
.guild-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
    padding: 34px 40px 50px;
}
.guild-panels--solo {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding-top: 12px;
}

.guild-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
    border-radius: 20px;
    background: var(--gld-card);
    border: 1px solid var(--gld-hair);
}
.guild-panel[hidden] { display: none !important; }

.guild-panel--info { 
    background: #f4f5f6; 
    border-color: #d1d6da;
}
.guild-panel.is-disabled { 
    opacity: .6; 
    pointer-events: none;
}

.guild-panel-header { display: flex; flex-direction: column; gap: 4px; }

.guild-panel-header h3 { 
    margin: 0; 
    color: var(--gld-ink); 
    font-size: 18px; 
    font-weight: 700; 
    letter-spacing: -.01em; 
}
.guild-panel-hint { 
    color: var(--gld-sub); 
    font-size: 13px; 
    font-weight: 600; 
}

/* Forms */
.guild-form { display: grid; gap: 16px; }
.guild-field { display: grid; gap: 8px; }
.guild-field > span { color: var(--gld-ink); font-size: 14px; font-weight: 700; }

.guild-field input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--gld-hair);
    border-radius: 10px;
    background: #fff;
    color: var(--gld-ink);
    font: inherit;
    font-size: 14.5px;
    outline: none;
    transition: all .2s ease;
}
.guild-field input[type="text"]:focus { 
    border-color: var(--gld-gold); 
    box-shadow: 0 0 0 3px rgba(88, 116, 136, .1); 
    background: #fff;
}
.guild-field input[type="text"]:disabled { 
    background: #e5e8ea; 
    color: var(--gld-sub); 
    cursor: not-allowed; 
}

.guild-field--file { gap: 8px; }
.guild-field input[type="file"] {
    width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--gld-hair);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.guild-field input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-right: 12px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(180deg, #829aab, #6b879b);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.guild-field input[type="file"]:disabled { cursor: not-allowed; opacity: .55; }
.guild-field small,
.guild-help { color: var(--gld-sub); font-size: 12.5px; line-height: 1.5; font-weight: 500; }
.guild-help { margin: 0; }

.guild-form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.guild-form-note {
    margin: 0;
    color: var(--gld-sub);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

/* Tips */
.guild-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guild-tips li {
    position: relative;
    padding-left: 18px;
    color: #6e6e73;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}
.guild-tips li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gld-gold);
}

/* 盟主面板：固定两列，实现 宣言|图标 / 申请|成员 的 2x2 布局 */
/* align-items: stretch 让同一行的两个面板高度一致（无论有无内容）*/
.guild-state--member.is-leader .guild-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

/* 战盟宣言 - 编辑（盟主）*/
.guild-field textarea {
    width: 100%;
    min-height: 92px;
    padding: 12px 16px;
    border: 1px solid var(--gld-hair);
    border-radius: 10px;
    background: #fff;
    color: var(--gld-ink);
    font: inherit;
    font-size: 14.5px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: all .2s ease;
}
.guild-field textarea:focus {
    border-color: var(--gld-gold);
    box-shadow: 0 0 0 3px rgba(88, 116, 136, .1);
}
.guild-field textarea:disabled {
    background: #e5e8ea;
    color: var(--gld-sub);
    cursor: not-allowed;
}
.guild-manifesto-counter {
    float: right;
    color: var(--gld-sub);
    font-weight: 700;
}

/* 战盟宣言 - 展示（成员）*/
.guild-manifesto-display {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #f7f8f8;
    border: 1px solid #cfd5da;
}
.guild-manifesto-display::before {
    content: "\201C";
    color: var(--gld-gold);
    font-size: 40px;
    font-weight: 900;
    line-height: .8;
    flex-shrink: 0;
}
.guild-manifesto-text {
    margin: 0;
    color: #47443c;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
    word-break: break-word;
}
.guild-manifesto-text.is-empty {
    color: var(--gld-sub);
    font-weight: 600;
    font-style: italic;
}

/* 战盟容量徽章（目录列表）- 固定尺寸，所有徽章大小一致 */
.guild-capacity-badge {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    flex-shrink: 0;
    width: 84px;
    min-height: 50px;
    padding: 8px 6px;
    border-radius: 10px;
    background: #f0f7f0;
    border: 1px solid #cfe6cf;
}
.guild-capacity-badge.is-high {
    background: #fff6e8;
    border-color: #f2dcb0;
}
.guild-capacity-badge.is-full {
    background: #fdecec;
    border-color: #f3c7c7;
}
.guild-capacity-num {
    color: #3f7a44;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.guild-capacity-badge.is-high .guild-capacity-num { color: #536d80; }
.guild-capacity-badge.is-full .guild-capacity-num { color: #c0504a; }
.guild-capacity-label {
    color: var(--gld-sub);
    font-size: 11.5px;
    font-weight: 600;
}
.guild-capacity-badge.is-full .guild-capacity-label { color: #c0504a; }

/* Logo Management */
.guild-mark-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.guild-mark-preview {
    width: 24px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--gld-hair);
    flex-shrink: 0;
}
.guild-mark-preview img { width: 12px; height: 13px; object-fit: contain; image-rendering: pixelated; }
.guild-mark-preview span { color: var(--gld-sub); font-size: 11px; font-weight: 600; text-align: center; }
.guild-mark-status { margin: 0; color: var(--gld-ink); font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.guild-form--mark { display: grid; gap: 14px; }
.guild-form--mark .guild-form-actions { display: flex; }

/* Requests Panel */
.guild-request-list { display: grid; gap: 8px; }
.guild-request-empty { display: grid; gap: 6px; padding: 30px 20px; text-align: center; }
.guild-request-empty strong { color: var(--gld-ink); font-size: 15px; font-weight: 700; }
.guild-request-empty p { margin: 0; color: var(--gld-sub); font-size: 13px; line-height: 1.4; }
.guild-request-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--gld-hair);
}
.guild-request-avatar { width: 34px; height: 38px; border-radius: 50%; object-fit: cover; background: transparent; }
.guild-request-info { display: grid; gap: 1px; min-width: 0; }
.guild-request-info strong { color: var(--gld-ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-request-info span { color: var(--gld-sub); font-size: 11.5px; font-weight: 500; }
.guild-request-actions { display: flex; gap: 6px; align-items: center; }
.guild-member-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gld-sub);
    background: #f6f7f8;
    border: 1px solid var(--gld-hair);
    white-space: nowrap;
}

/* Requests Pagination styling */
.guild-request-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--gld-hair);
}

.guild-request-page-indicator {
    color: var(--gld-sub);
    font-size: 13.5px;
    font-weight: 700;
}
/* Pending Banner */
.guild-pending-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 40px 24px;
    padding: 14px 20px;
    border-radius: 12px;
    background: #FFF9F0;
    border: 1px solid #FFE0C2;
}
.guild-pending-banner[hidden] { display: none !important; }

.guild-pending-content strong { display: block; margin-bottom: 2px; color: #a04000; font-size: 15px; font-weight: 700; }
.guild-pending-content p { margin: 0; color: #b25316; font-size: 13px; line-height: 1.4; font-weight: 600; }
.guild-pending-banner em { font-style: normal; color: #a04000; font-weight: 800; }

/* ---------- Embedded Inline Guild Directory (No More Absolute Dropdown) ---------- */
.guild-directory-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 4px 0 16px;
    background: #ffffff;
    border: 1px solid var(--gld-hair);
    border-radius: 12px;
    overflow: hidden;
    padding: 16px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.015);
}

.guild-directory-search-wrap {
    position: relative;
    width: 100%;
}

.guild-directory-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--gld-hair);
    border-radius: 8px;
    background: #f7f8f8;
    color: var(--gld-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
}
.guild-directory-search-input:focus {
    border-color: var(--gld-gold);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(88, 116, 136, 0.08);
}

.guild-directory-list-wrapper {
    width: 100%;
    max-height: 240px; /* Golden interaction height limit */
    overflow-y: auto;
    border: 1px solid #e3e7e9;
    border-radius: 8px;
    background: #fff;
}

.guild-select-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #e1e5e7; /* Elegant fine-bordered card */
    border-radius: 8px;
    background: #f9f9f7;
    text-align: left;
    cursor: pointer;
    transition: all .15s ease;
}
.guild-select-option.no-icon {
    /* To align perfectly, we should use a spacer instead of changing padding, or make padding-left exactly match */
    padding-left: 52px !important; /* Forces the padding value explicitly to override any hover/selected overrides */
}
.guild-select-option:hover { 
    background: #ffffff; 
    border-color: var(--gld-gold);
    box-shadow: 0 4px 12px rgba(88, 116, 136, 0.05);
}
.guild-select-option.is-selected { 
    background: var(--gld-gold-soft); 
    border-color: var(--gld-gold);
    box-shadow: 0 4px 12px rgba(88, 116, 136, 0.08);
}
.guild-select-option.is-selected .guild-select-option-name {
    color: #50697b;
}

.guild-select-option-icon {
    width: 24px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid var(--gld-hair);
    flex-shrink: 0;
}
.guild-select-option-icon img {
    width: 12px;
    height: 13px;
    object-fit: contain;
    image-rendering: pixelated;
}

.guild-select-option-body {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.guild-select-list {
    display: grid;
    gap: 6px; /* Elegant gap between boxed items */
    padding: 8px;
}
.guild-select-option-name { color: var(--gld-ink); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-select-option-meta { color: var(--gld-sub); font-size: 13.5px; font-weight: 500; }

.guild-select-state {
    padding: 36px 18px;
    text-align: center;
    color: var(--gld-sub);
    font-size: 13.5px;
    font-weight: 600;
}

.guild-selected-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f7f8f8;
    border: 1px solid var(--gld-hair);
    border-radius: 10px;
    margin-bottom: 12px;
}
.guild-selected-status-label {
    color: var(--gld-sub);
    font-size: 14px;
    font-weight: 600;
}
.guild-selected-status-value {
    color: #50697b;
    font-size: 16px;
    font-weight: 800;
}

.guild-join-actions { margin-top: 4px; }

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
}

.confirm-modal[hidden] {
    display: none !important;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(39, 38, 35, .58);
    backdrop-filter: none;
    cursor: pointer;
    animation: confirm-fade-in .16s ease;
}

.confirm-modal-panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 26px 28px 22px;
    border: 1px solid rgba(109, 137, 157, .5);
    border-radius: 16px;
    background:
        linear-gradient(180deg, #f3f5f6, #fcfcfd 36%, #fcfcfd);
    box-shadow:
        0 26px 60px rgba(39, 38, 35, .34),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    animation: confirm-pop-in .18s ease;
}

@keyframes confirm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes confirm-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.confirm-modal-title {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 1000;
    letter-spacing: 0;
}

.confirm-modal-title::before {
    display: inline-block;
    width: 6px;
    height: 22px;
    margin-right: 12px;
    content: "";
    border-radius: 999px;
    background: var(--gold);
    vertical-align: -5px;
}

.confirm-modal-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 18px 16px 14px;
    border: 1px solid rgba(109, 137, 157, .35);
    border-radius: 12px;
    background: rgba(243, 245, 246, .65);
}

.confirm-modal-preview[hidden] {
    display: none !important;
}

.confirm-modal-preview-stage {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 140px;
}

.confirm-modal-preview img {
    width: 120px;
    height: 130px;
    object-fit: contain;
    image-rendering: pixelated;
    border: 1px solid rgba(39, 38, 35, .12);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(39, 38, 35, .1);
}

.confirm-modal-preview-zoom {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(280px, 100%);
}

.confirm-modal-preview-zoom-label {
    color: #89816d;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.confirm-modal-preview-zoom-value {
    min-width: 34px;
    color: var(--ink, #2a2824);
    font-size: 13px;
    font-weight: 900;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.confirm-modal-preview-zoom input[type="range"] {
    flex: 1 1 auto;
    width: 100%;
    height: 6px;
    margin: 0;
    border-radius: 999px;
    background: rgba(39, 38, 35, .14);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    accent-color: var(--gold, #6d899d);
}

.confirm-modal-preview-zoom input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold, #6d899d);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(39, 38, 35, .3);
    cursor: pointer;
}

.confirm-modal-preview-zoom input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold, #6d899d);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(39, 38, 35, .3);
    cursor: pointer;
}

.confirm-modal-preview-caption {
    color: #89816d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-align: center;
}

.confirm-modal-body {
    margin: 0 0 22px;
    color: #5e594e;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.65;
}

.confirm-modal-field {
    display: grid;
    gap: 8px;
    margin: -4px 0 20px;
}

.confirm-modal-field[hidden] {
    display: none;
}

.confirm-modal-field span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.confirm-modal-field input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
}

.confirm-modal-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .16);
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.confirm-modal-actions .guild-btn {
    min-width: 100px;
}

body.modal-open {
    overflow: hidden;
}

/* 战盟图标设计器 */
.mark-designer {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: grid;
    place-items: center;
    padding: 20px;
}

.mark-designer[hidden] {
    display: none !important;
}

.mark-designer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(39, 38, 35, .58);
    backdrop-filter: none;
    cursor: pointer;
    animation: confirm-fade-in .16s ease;
}

.mark-designer-panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 22px 26px 20px;
    border: 1px solid rgba(109, 137, 157, .5);
    border-radius: 16px;
    background: linear-gradient(180deg, #f3f5f6, #fcfcfd 36%, #fcfcfd);
    box-shadow: 0 26px 60px rgba(39, 38, 35, .34), inset 0 1px 0 rgba(255, 255, 255, .8);
    animation: confirm-pop-in .18s ease;
}

.mark-designer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mark-designer-title {
    margin: 0;
    color: var(--ink, #2a2824);
    font-size: 20px;
    font-weight: 1000;
}

.mark-designer-close {
    flex: none;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(39, 38, 35, .06);
    color: #5e594e;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}

.mark-designer-close:hover {
    background: rgba(39, 38, 35, .12);
}

.mark-designer-tip {
    margin: 8px 0 16px;
    color: #89816d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.mark-designer-body {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: flex-start;
}

.mark-designer-canvas-col {
    flex: none;
}

.mark-designer-grid {
    display: grid;
    grid-template-columns: repeat(12, 22px);
    grid-template-rows: repeat(13, 22px);
    gap: 1px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(39, 38, 35, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
    touch-action: none;
    user-select: none;
}

.mark-designer-cell {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: #ffffff;
    cursor: crosshair;
    box-shadow: inset 0 0 0 1px rgba(39, 38, 35, .07);
}

.mark-designer-cell:hover {
    box-shadow: inset 0 0 0 2px rgba(109, 137, 157, .9);
}

.mark-designer-tools {
    flex: 1 1 200px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mark-designer-tool-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mark-designer-tool-label {
    color: #89816d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.mark-designer-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mark-designer-color-row input[type="color"] {
    width: 40px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(39, 38, 35, .2);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.mark-designer-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mark-designer-swatch {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(39, 38, 35, .2);
    border-radius: 6px;
    cursor: pointer;
    transition: transform .1s ease;
}

.mark-designer-swatch:hover {
    transform: scale(1.12);
}

.mark-designer-tool-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mark-designer-tool {
    padding: 7px 14px;
    border: 1px solid rgba(39, 38, 35, .16);
    border-radius: 9px;
    background: #fff;
    color: #5e594e;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all .15s ease;
}

.mark-designer-tool:hover {
    border-color: rgba(109, 137, 157, .8);
}

.mark-designer-tool.is-active {
    background: var(--gold, #6b879b);
    border-color: var(--gold, #6b879b);
    color: #fff;
}

.mark-designer-preview-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mark-designer-preview-1x {
    width: 12px;
    height: 13px;
    image-rendering: pixelated;
    border: 1px solid rgba(39, 38, 35, .12);
    background: #fff;
}

.mark-designer-preview-zoom {
    width: 60px;
    height: 65px;
    image-rendering: pixelated;
    border: 1px solid rgba(39, 38, 35, .12);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(39, 38, 35, .1);
}

.mark-designer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.mark-designer-actions .guild-btn {
    min-width: 110px;
}

/* 充值收款弹窗 */
.store-pay-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 20px;
}

.store-pay-modal[hidden] { display: none !important; }

.store-pay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(39, 38, 35, .58);
    backdrop-filter: none;
    cursor: pointer;
    animation: confirm-fade-in .16s ease;
}

.store-pay-panel {
    position: relative;
    z-index: 1;
    width: min(380px, 100%);
    padding: 24px 26px 22px;
    border: 1px solid rgba(109, 137, 157, .5);
    border-radius: 18px;
    background: linear-gradient(180deg, #f3f5f6, #fcfcfd 36%, #fcfcfd);
    box-shadow:
        0 26px 60px rgba(39, 38, 35, .34),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    animation: confirm-pop-in .18s ease;
    text-align: center;
}

.store-pay-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(39, 38, 35, .06);
    color: #5e594e;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .14s ease;
}

.store-pay-close:hover { background: rgba(39, 38, 35, .12); }

.store-pay-title {
    margin: 0 6px 6px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 1000;
}

.store-pay-amount {
    margin: 0 0 14px;
    color: #50697b;
    font-size: 15px;
    font-weight: 1000;
}

.store-pay-qr {
    display: grid;
    gap: 10px;
    place-items: center;
}

.store-pay-qr[hidden] { display: none; }

.store-pay-qr-frame {
    width: 240px;
    max-width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(39, 38, 35, .1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 8px 22px rgba(69, 66, 58, .08);
}

.store-pay-qr-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.store-pay-qr-tip {
    margin: 0;
    color: #4c4840;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.store-pay-paypal {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.store-pay-paypal[hidden] { display: none; }

.store-pay-paypal-text {
    margin: 0;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

.store-pay-usd {
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    text-align: center;
    color: #43403a;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.7;
    background: linear-gradient(180deg, #e8ebed, #f7f8f8);
    border: 1px solid rgba(109, 137, 157, .55);
}

.store-pay-usd strong {
    color: #c2410c;
    font-size: 17px;
    letter-spacing: .2px;
}

.store-pay-usd-time,
.store-pay-usd-stale {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 700;
}

.store-pay-usd-time { color: #777060; }
.store-pay-usd-stale { color: #c2410c; }

.store-pay-note {
    margin: 14px 0 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}

.store-pay-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.store-pay-actions .guild-btn { min-width: 110px; }

/* ============================================================
   商城（Store）
   ============================================================ */

.store-view {
    background:
        radial-gradient(circle at 96% -10%, rgba(121, 146, 164, .1), transparent 320px),
        linear-gradient(180deg, #f8f9f9, #f3f4f5);
}

.store-view-body {
    display: grid;
    gap: 26px;
    padding: 28px 32px 36px;
}

.store-view-message {
    min-height: 22px;
    margin: -4px 0 -4px;
    padding: 0 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.store-view-message.is-error { color: var(--red); }
.store-view-message.is-success { color: var(--teal); }
.store-view-message:empty { display: none; }

.store-state[hidden] { display: none !important; }

.store-state--member {
    display: grid;
    gap: 24px;
}

.store-state--loading {
    padding: 36px 22px;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}

.store-state--loading p { margin: 0; }

.store-hero {
    position: relative;
    overflow: hidden;
    padding: 20px 22px;
    border-radius: 18px;
    color: var(--ink);
    border: 1px solid rgba(91, 120, 140, .28);
    background:
        radial-gradient(circle at 96% 0%, rgba(121, 146, 164, .2), transparent 240px),
        linear-gradient(135deg, rgba(251, 251, 252, .98), rgba(239, 241, 243, .92));
    box-shadow:
        0 16px 34px rgba(75, 71, 63, .09),
        inset 0 1px 0 rgba(255, 255, 255, .92);
}

.store-hero::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
}

.store-hero-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
}

.store-hero-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.store-hero-crest {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(237, 239, 241, .24);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(252, 252, 253, .14), rgba(252, 252, 253, .04)),
        rgba(21, 20, 19, .42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .14),
        0 14px 28px rgba(21, 20, 19, .28);
}

.store-hero-crest-icon {
    color: var(--gold-2);
    font-size: 28px;
    font-weight: 1000;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.store-hero-info {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.store-hero-eyebrow {
    color: rgba(237, 239, 241, .58);
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.store-hero-name {
    margin: 0;
    color: #fff;
    font-size: 26px;
    font-weight: 1000;
    line-height: 1.15;
    letter-spacing: -.015em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .2);
    word-break: break-word;
}

.store-hero-tagline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    color: rgba(237, 239, 241, .78);
    font-size: 13px;
    font-weight: 900;
}

.store-role-tag {
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(237, 239, 241, .14);
    color: #edeff1;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .1em;
}

.store-hero-tip {
    color: rgba(237, 239, 241, .68);
    font-weight: 700;
}

.store-hero-stats {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 22px;
    align-items: center;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.store-hero-stat {
    position: relative;
    display: grid;
    gap: 7px;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    min-width: 0;
    box-shadow: none;
}

.store-hero-stat::before {
    display: none;
}

.store-hero-stat--cash::before {
    background: linear-gradient(180deg, #ffe39a, #d99928);
}

.store-hero-stat--recharge::before {
    background: linear-gradient(180deg, #839bac, #50697b);
}

.store-hero-stat-label {
    color: #50697b;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.store-hero-stat-value {
    color: var(--ink);
    font-size: clamp(32px, 4.2vw, 44px);
    font-weight: 1000;
    line-height: 1.05;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    text-shadow: none;
}

.store-hero-stat--recharge {
    min-width: 180px;
    justify-items: end;
    gap: 8px;
}

.store-hero-stat-action {
    align-self: center;
    min-height: 44px;
    margin-top: 0;
    padding: 0 28px;
    border: 1px solid rgba(86, 113, 133, .22);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    font: inherit;
    font-size: 14px;
    font-weight: 1000;
    letter-spacing: .04em;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(86, 113, 133, .2), inset 0 1px 0 rgba(255, 255, 255, .55);
    transition: transform .14s ease, box-shadow .14s ease;
}

.store-hero-stat-action:hover {
    box-shadow: 0 15px 26px rgba(86, 113, 133, .26), inset 0 1px 0 rgba(255, 255, 255, .62);
    transform: translateY(-1px);
}

@media (max-width: 720px) {
    .store-hero-stats {
        grid-template-columns: 1fr;
    }

    .store-hero-stat--recharge {
        min-width: 0;
    }
}

.store-tabs[hidden],
.store-panel[hidden] {
    display: none !important;
}

.store-messages {
    display: grid;
    gap: 12px;
}

.store-messages[hidden] { display: none; }

.store-message {
    position: relative;
    padding: 16px 20px 16px 18px;
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(121, 146, 164, .18), rgba(252, 252, 253, .92));
    box-shadow: 0 6px 18px rgba(39, 38, 35, .06);
}

.store-message--warning { border-left-color: #d99928; background: linear-gradient(90deg, rgba(217, 153, 40, .2), rgba(252, 252, 253, .92)); }
.store-message--error { border-left-color: var(--red); background: linear-gradient(90deg, rgba(206, 90, 76, .18), rgba(252, 252, 253, .92)); }
.store-message--success { border-left-color: var(--teal); background: linear-gradient(90deg, rgba(82, 78, 69, .18), rgba(252, 252, 253, .92)); }

.store-message header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.store-message header strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 1000;
}

.store-message-close {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: rgba(39, 38, 35, .06);
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    transition: background .14s ease;
}

.store-message-close:hover { background: rgba(39, 38, 35, .14); color: var(--ink); }

.store-message p {
    margin: 0 0 8px;
    color: #4c4840;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.store-message time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.store-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    width: fit-content;
}

.store-tab {
    min-width: 110px;
    min-height: 42px;
    padding: 0 24px;
    border: 1px solid rgba(91, 120, 140, .28);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(251, 251, 252, .74);
    font: inherit;
    font-size: 14px;
    font-weight: 1000;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.store-tab:hover {
    background: rgba(242, 243, 244, .95);
    transform: translateY(-1px);
}

.store-tab.is-active {
    color: #fff;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    box-shadow: 0 8px 18px rgba(86, 113, 133, .25);
}

.store-panel { display: none; }
.store-panel.is-active {
    display: block;
    margin-top: 0;
}

.store-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.store-grid--packages {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.store-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 38px 18px;
    border: 1px dashed rgba(39, 38, 35, .14);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

/* 「消息」标签未读角标 */
.store-tab-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    vertical-align: 1px;
}
.store-tab-badge[hidden] { display: none; }
.store-tab.is-active .store-tab-badge { background: #b3401f; }

/* 充值记录列表 */
.store-history-wrap {
    display: flex;
    flex-direction: column;
}
.store-history-wrap:has(.store-history-item) {
    min-height: calc((var(--store-history-row-height) * 10) + (var(--store-history-gap) * 9) + 54px);
}
.store-history {
    --store-history-row-height: 78px;
    --store-history-gap: 12px;
    display: grid;
    gap: var(--store-history-gap);
    align-content: start;
    flex: 1 1 auto;
}
.store-history-wrap:has(.store-history-item) .store-history {
    min-height: calc((var(--store-history-row-height) * 10) + (var(--store-history-gap) * 9));
}
.store-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 14px;
    background: #fcfcfd;
}
.store-history-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.store-history-main > strong { color: var(--ink); font-size: 16px; font-weight: 800; }
.store-history-main > span { color: var(--muted); font-size: 12.5px; }
.store-history-note { color: #50697b !important; }
.store-history-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 16px;
}
.store-history-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(39, 38, 35, .12);
    border-radius: 10px;
    background: #fcfcfd;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.store-history-page-btn:hover {
    border-color: var(--gold);
    background: #f2f4f5;
}
.store-history-page-btn.is-active {
    border-color: var(--gold);
    background: linear-gradient(180deg, #e8ebed, #829aab);
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(86, 113, 133, .18);
}
.store-history-status {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}
.store-history-status--pending { color: #50697b; background: #eaedef; }
.store-history-status--completed { color: #1f7a4d; background: #e4f6ec; }
.store-history-status--rejected { color: #c0504a; background: #fdecec; }

/* 「消息」标签页列表 */
.store-msglist { display: grid; gap: 12px; }
.store-message.is-read {
    opacity: .68;
    border-left-color: var(--line);
    background: #f6f7f8;
}
.store-message-read-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    border: 1px solid rgba(91, 120, 140, .4);
    border-radius: 999px;
    background: #fff;
    color: #50697b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.store-message-read-btn:hover { background: #eaedef; }

.store-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--gld-hair); /* 對标 #register 的灰金色描边 */
    box-shadow: 0 8px 24px rgba(40, 38, 35, 0.03); /* 更轻量、干净的浮雕微阴影 */
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}

.store-card:hover {
    transform: translateY(-2.5px);
    border-color: var(--gld-gold); /* 悬浮变为黄金边框 */
    box-shadow: 0 12px 30px rgba(88, 116, 136, 0.08); /* 散发极其细腻的黄金微光 */
}

.store-card-media {
    position: relative;
    aspect-ratio: 16 / 13; /* 更紧凑高贵的高宽比 */
    background: radial-gradient(circle at 50% 30%, rgba(121, 146, 164, .08) 0%, transparent 80%), #1d1d1f; /* 徹底改成与 #register 一致的 142236 纯净暗夜色，去除多余渐变和杂质 */
    border-bottom: 1px solid rgba(109, 137, 157, .14);
    overflow: hidden;
    isolation: isolate;
}

.store-card-media::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: store-card-shine 4.5s cubic-bezier(0.16, 1, 0.3, 1) infinite; /* 极具高级感的丝滑慢速扫光 */
    pointer-events: none;
    z-index: 2;
}

.store-card-media img {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: auto;
    height: auto;
    max-width: 62%;
    max-height: 80%;
    object-fit: contain;
    transform: translate(-50%, -50%);
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); /* 更轻盈的图片投影 */
}

@keyframes store-card-shine {
    0%   { left: -120%; }
    15%  { left: 150%; }
    100% { left: 150%; }
}

.store-card--package .store-card-media {
    background: radial-gradient(circle at 50% 30%, rgba(121, 146, 164, .12) 0%, transparent 80%), #1b1b19; /* 礼包使用独特的暗沉熟褐巧克力色，呼应金色礼包 */
    border-bottom: 1px solid rgba(109, 137, 157, .2);
}

.store-card--package .store-card-media::before {
    /* 礼包不走扫光，避免和金黄徽章互相抢视觉焦点 */
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .store-card-media::before {
        animation: none;
        display: none;
    }
}

.store-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .04em;
    box-shadow: 0 4px 10px rgba(206, 90, 76, .35);
}

.store-card-badge--package {
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    color: #fff;
    box-shadow: 0 4px 10px rgba(86, 113, 133, .3);
}

.store-card-meta {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--ink);
    background: rgba(252, 252, 253, .94);
    border: 1px solid rgba(109, 137, 157, .35);
    font-size: 10px;
    font-weight: 1000;
}

.store-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
}

.store-card-body h4 {
    margin: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 1000;
    line-height: 1.3;
    letter-spacing: -.01em;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-card-description {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-card-description:empty { display: none; }

.store-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.store-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    flex-wrap: wrap;
}

.store-card-currency {
    color: var(--muted);
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.store-card--cash .store-card-currency { color: #567185; }

.store-card-price strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 1000;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.store-card-original {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-decoration: line-through;
}

.store-card-buy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    box-shadow: 0 6px 14px rgba(86, 113, 133, .25);
    font: inherit;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .02em;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .18s ease;
}

.store-card-buy:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(86, 113, 133, .32);
}

.store-card-buy[disabled] {
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}

.store-card-buy svg {
    width: 14px;
    height: 14px;
}

/* —— 详情弹窗 —— */

.store-card { cursor: pointer; }

.store-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.store-detail-modal[hidden] { display: none !important; }

.store-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(39, 38, 35, .58);
    backdrop-filter: none;
    cursor: pointer;
    animation: confirm-fade-in .16s ease;
}

.store-detail-panel {
    position: relative;
    z-index: 1;
    width: min(480px, calc(100vw - 32px));
    max-height: min(680px, calc(100svh - 32px), calc(100vh - 32px));
    margin: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(109, 137, 157, .4);
    border-radius: 18px;
    background: linear-gradient(180deg, #f3f5f6, #fcfcfd 28%, #fcfcfd);
    box-shadow:
        0 28px 60px rgba(39, 38, 35, .36),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    animation: confirm-pop-in .2s ease;
}

.store-detail-close {
    position: absolute;
    top: 14px;
    right: 14px; /* Perfectly aligned to avoid scrollbar track clashing */
    z-index: 5;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(39, 38, 35, .06);
    border-radius: 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, .92);
    font-size: 20px;
    font-weight: 1000;
    line-height: 1;
    cursor: pointer;
    transition: background .14s ease, color .14s ease, transform .14s ease;
}

.store-detail-close:hover {
    color: var(--ink);
    background: #fff;
    transform: rotate(90deg);
}

.store-detail-image-wrap[hidden] {
    display: none !important;
}

.store-detail-image-wrap {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 8px auto 16px;
    overflow: hidden;
    padding: 6px;
    border-radius: 12px;
    background: #ffffff; /* Use elegant pure white instead of raw gradient */
    border: 1px solid var(--gld-hair);
    box-shadow: 
        0 8px 20px rgba(19, 18, 17, 0.05),
        inset 0 1px 0 #ffffff;
    flex-shrink: 0; /* CRITICAL: Prevents flex layout from compressing the image box on long text */
}

.store-detail-image-wrap img {
    position: relative;
    z-index: 0;
    display: block;
    margin: 0 auto;
    width: auto;
    height: 130px;
    max-width: 240px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.store-detail-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: transparent;
}

.store-detail-scroll {
    flex: 0 1 auto;
    min-height: 0;
    max-height: min(70svh, 500px, calc(100svh - 180px), calc(100vh - 180px)); /* Lifted maximum height limits significantly */
    padding: 18px 20px 10px 20px; /* Restored comfortable padding */
    margin-right: 0; /* Let scrollbar stretch to the very edge gracefully */
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 137, 157, .6) transparent;
    scrollbar-gutter: stable;
}

.store-detail-scroll::-webkit-scrollbar {
    width: 6px;
}

.store-detail-scroll::-webkit-scrollbar-track {
    margin: 4px 4px 4px 0; /* Add top and bottom margins to prevent the track from touching the top/bottom border radiuses */
    background: transparent;
}

.store-detail-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(109, 137, 157, .35); /* Elegant translucent thumb */
}

.store-detail-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(109, 137, 157, .6);
}

.store-detail-footer {
    flex: 0 0 auto;
    padding: 12px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(203, 210, 215, .56);
    background: #fcfcfd;
}

@keyframes store-detail-sweep {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    65% {
        transform: translate(33.33%, 33.33%) rotate(45deg);
        opacity: .9;
    }
    85% {
        opacity: .5;
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-detail-image-wrap::before {
        animation: none;
        display: none;
    }
}

.store-detail-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    box-shadow: 0 4px 10px rgba(86, 113, 133, .28);
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .04em;
}

.store-detail-badge[hidden] { display: none; }

.store-detail-name {
    align-self: stretch;
    width: 100%;
    margin: 0;
    color: var(--ink);
    font-size: 22px;
    font-weight: 1000;
    line-height: 1.25;
    letter-spacing: -.015em;
    word-break: break-word;
    text-align: left;
}

.store-detail-name::before {
    display: inline-block;
    width: 6px;
    height: 22px;
    margin-right: 12px;
    content: "";
    border-radius: 999px;
    background: var(--gold);
    vertical-align: -5px;
}

.store-detail-meta {
    align-self: flex-start;
    padding: 4px 11px;
    margin-left: 18px;
    border-radius: 999px;
    border: 1px solid rgba(109, 137, 157, .35);
    background: rgba(121, 146, 164, .14);
    color: #50697b;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .02em;
}

.store-detail-meta[hidden] { display: none; }

.store-detail-section {
    align-self: stretch;
    width: 100%;
}

.store-detail-section h4 {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.store-detail-description {
    margin: 0;
    color: #4c4840;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.store-detail-description:empty::before {
    content: "—";
    color: var(--muted);
}

.store-detail-price-section {
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(121, 146, 164, .18), rgba(252, 252, 253, .8));
    border: 1px solid rgba(109, 137, 157, .3);
}

.store-detail-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.store-detail-currency {
    color: #50697b;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.store-detail-price strong {
    color: var(--ink);
    font-size: 30px;
    font-weight: 1000;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.store-detail-price s {
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
    text-decoration: line-through;
}

.store-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 0 0 2px;
    border-top: 0;
}

.store-detail-actions .guild-btn {
    min-width: 100px;
}

@media (max-width: 560px) {
    .store-detail-modal {
        padding: 10px;
    }
    .store-detail-panel {
        width: min(480px, calc(100vw - 20px));
        max-height: calc(100svh - 20px);
    }
    .store-detail-scroll {
        max-height: min(50svh, calc(100svh - 220px));
        padding: 14px 16px 8px;
    }
    .store-detail-footer {
        padding: 10px 16px 14px;
    }
    .store-detail-image-wrap img {
        height: 118px;
        max-width: 220px;
    }
    .store-detail-name {
        font-size: 18px;
    }
    .store-detail-price strong {
        font-size: 24px;
    }
}

/* —— 充值 —— */

.store-recharge {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: stretch;
}

.store-recharge-card {
    padding: 22px 24px 24px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(39, 38, 35, .06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .96) inset,
        0 12px 28px rgba(39, 38, 35, .05);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.store-recharge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(203, 210, 215, .56);
}

.store-recharge-header h3 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 1000;
    letter-spacing: -.01em;
}

.store-recharge-header h3::before {
    display: inline-block;
    width: 4px;
    height: 17px;
    margin-right: 10px;
    content: "";
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    vertical-align: -2px;
}

.store-recharge-header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.store-recharge-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.store-recharge-tier {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(39, 38, 35, .1);
    background: linear-gradient(180deg, #fcfcfd, #f1f3f4);
    text-align: center;
    cursor: pointer;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.store-recharge-tier:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(39, 38, 35, .06);
}

.store-recharge-tier.is-active {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 12px 24px rgba(var(--accent-rgb), .28);
}

.store-recharge-tier.is-active .store-recharge-tier-money {
    color: #fff;
}

.store-recharge-tier.is-active .store-recharge-tier-unit {
    color: rgba(255, 255, 255, .82);
}

.store-recharge-tier.is-active .store-recharge-tier-points {
    color: rgba(255, 255, 255, .92);
}

.store-recharge-tier-money {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 1000;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.store-recharge-tier-unit {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .04em;
}

.store-recharge-tier-points {
    color: #50697b;
    font-size: 13px;
    font-weight: 900;
}

.store-recharge-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.store-recharge-method {
    display: grid;
    gap: 4px;
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid rgba(39, 38, 35, .1);
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.store-recharge-method:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

.store-recharge-method.is-active {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 12px 24px rgba(var(--accent-rgb), .28);
}

.store-recharge-method.is-active .store-recharge-method-icon i {
    color: #fff;
}

.store-recharge-method.is-active strong {
    color: #fff;
}

.store-recharge-method.is-active em {
    color: rgba(255, 255, 255, .82);
}

.store-recharge-method-icon {
    height: 38px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    line-height: 1;
}

.store-recharge-method-icon i {
    font-size: 30px;
    line-height: 1;
    transition: transform .14s ease;
}

.store-recharge-method:hover .store-recharge-method-icon i {
    transform: scale(1.06);
}

.store-recharge-method[data-recharge-method="alipay"] .store-recharge-method-icon {
    color: #1677ff;
}

.store-recharge-method[data-recharge-method="wechat"] .store-recharge-method-icon {
    color: #07c160;
}

.store-recharge-method[data-recharge-method="paypal"] .store-recharge-method-icon {
    color: #003087;
}

.store-recharge-method strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 1000;
}

.store-recharge-method em {
    color: var(--muted);
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
}

.store-recharge-tipline {
    margin: 0;
    padding: 11px 14px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.6;
    border: 1px dashed rgba(39, 38, 35, .16);
    border-radius: 12px;
    background: rgba(39, 38, 35, .02);
}

.store-recharge-qr {
    display: grid;
    gap: 10px;
    place-items: center;
    text-align: center;
}

.store-recharge-qr[hidden] { display: none; }

.store-recharge-qr-frame {
    width: 200px;
    height: 200px;
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px solid rgba(109, 137, 157, .3);
    border-radius: 14px;
    background:
        radial-gradient(circle at 80% 15%, rgba(121, 146, 164, .14), transparent 160px),
        #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 8px 22px rgba(69, 66, 58, .08);
}

.store-recharge-qr-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.store-recharge-qr-frame img[hidden] { display: none; }

.store-recharge-qr-frame span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.store-recharge-qr-tip {
    margin: 0;
    color: #4c4840;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.store-recharge-qr-tip em {
    color: #50697b;
    font-style: normal;
    font-weight: 1000;
}

.store-recharge-paypal {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f3f7ff, #e8efff);
    border: 1px solid rgba(102, 131, 151, .2);
}

.store-recharge-paypal[hidden] { display: none; }

.store-recharge-paypal p {
    margin: 0;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.store-recharge-paypal .guild-btn {
    justify-self: start;
}

.store-recharge-form {
    display: grid;
    gap: 14px;
}

.store-recharge-summary {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(121, 146, 164, .16), rgba(252, 252, 253, .8));
    border: 1px solid rgba(109, 137, 157, .26);
}

.store-recharge-summary span {
    color: #50697b;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.store-recharge-summary strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 1000;
}

.store-recharge-file {
    display: grid;
    gap: 8px;
}

.store-recharge-file[hidden] { display: none; }

.store-recharge-file > span {
    color: var(--ink);
    font-size: 14px;
    font-weight: 1000;
}

.store-recharge-file input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.store-recharge-file-control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px 12px;
    border: 1px solid rgba(39, 38, 35, .12);
    border-radius: 14px;
    background: #fcfcfd;
    cursor: pointer;
}

.store-recharge-file-button {
    min-height: 36px;
    padding: 0 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.store-recharge-file-name {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-recharge-file small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 1200px) {
    .store-recharge {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .guild-state--member.is-leader .guild-panels {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   抽奖 Lottery —— 高级开箱式滚动 + 卡牌翻开（非转盘）
   ============================================================ */

/* 稀有度配色：--rr 主色 / --rr-soft 浅底 / --rg 光晕 */
.lottery-rarity--common { --rr: #a59d89; --rr-soft: #f0f2f3; --rg: rgba(165, 157, 137, .35); }
.lottery-rarity--rare   { --rr: #3b82f6; --rr-soft: #e8f0fe; --rg: rgba(111, 138, 158, .50); }
.lottery-rarity--epic   { --rr: #a855f7; --rr-soft: #f3e8ff; --rg: rgba(168, 85, 247, .55); }
.lottery-rarity--legend { --rr: #e0a52e; --rr-soft: #fff4d6; --rg: rgba(244, 202, 92, .65); }

/* 「抽奖」标签提示小红点 */
.store-tab--lottery { position: relative; }
.store-tab--lottery::after {
    display: none;
    content: none;
}
.store-tab--lottery.is-active::after { display: none; }
@keyframes lottery-dot {
    0%   { box-shadow: 0 0 0 0 rgba(206, 90, 76, .5); }
    70%  { box-shadow: 0 0 0 7px rgba(206, 90, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(206, 90, 76, 0); }
}

.lottery { display: grid; gap: 20px; }
#lottery-loading { padding: 80px 22px; }

/* —— 大奖播报跑马灯 —— */
.lottery-ticker {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 14px;
    border: 1px solid rgba(109, 137, 157, .3);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(121, 146, 164, .16), rgba(251, 251, 252, .92));
    overflow: hidden;
}
.lottery-ticker[hidden] { display: none; }
.lottery-ticker-label {
    display: inline-flex; align-items: center; gap: 6px;
    flex: 0 0 auto;
    color: #50697b; font-size: 12px; font-weight: 1000; letter-spacing: .04em;
}
.lottery-ticker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.lottery-ticker-viewport {
    position: relative; flex: 1 1 auto; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.lottery-ticker-track { display: inline-flex; gap: 28px; white-space: nowrap; will-change: transform; }
.lottery-ticker-track.is-rolling { animation: lottery-ticker-roll 28s linear infinite; }
@keyframes lottery-ticker-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.lottery-ticker-item { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.lottery-ticker-item b { color: var(--ink); font-weight: 900; }
.lottery-ticker-rarity { font-style: normal; font-weight: 1000; color: var(--rr); }

/* —— 奖池切换 —— */
.lottery-pool-switch { display: flex; gap: 10px; flex-wrap: wrap; }
.lottery-pool-switch[hidden] { display: none; }
.lottery-pool-chip {
    display: grid; gap: 2px; text-align: left;
    padding: 9px 16px;
    border: 1px solid rgba(91, 120, 140, .28);
    border-radius: 12px;
    background: rgba(251, 251, 252, .8);
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.lottery-pool-chip strong { font-size: 14px; font-weight: 1000; color: var(--ink); }
.lottery-pool-chip em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); }
.lottery-pool-chip:hover { transform: translateY(-1px); background: rgba(242, 243, 244, .95); }
.lottery-pool-chip.is-active {
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(86, 113, 133, .25);
}
.lottery-pool-chip.is-active em { color: #43403a; }

/* 传说级标签金色渐变 */
.lottery-rarity--legend .lottery-prize-rarity,
.lottery-rarity--legend .lottery-reel-rarity,
.lottery-rarity--legend .lottery-result-rarity { background: linear-gradient(180deg, #ffe07a, #e0a52e); color: #3a2a06; }
.lottery-rarity--legend .lottery-prize-prob { color: #9a6b09; }

/* —— 主舞台 —— */
.lottery-stage {
    position: relative;
    display: grid; gap: 22px;
    padding: 24px;
    border: 1px solid rgba(91, 120, 140, .26);
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% -20%, rgba(121, 146, 164, .22), transparent 340px),
        linear-gradient(180deg, #fdfdfd, #eff1f2);
    box-shadow: 0 20px 46px rgba(75, 71, 63, .1), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.lottery-stage::before {
    content: ''; position: absolute; inset: 0 auto 0 0; width: 4px;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.lottery-stage[hidden] { display: none; }
/* 宣传图 Banner（封面横幅，建议 1044×300 等宽幅图） */
.lottery-hero {
    position: relative; border-radius: 16px; overflow: hidden;
    border: 1px solid rgba(91, 120, 140, .3);
    box-shadow: 0 16px 34px rgba(27, 27, 25, .14);
    background: linear-gradient(135deg, #393732, #242320);
}
/* 有封面时固定为宽幅横版（1044:300），任何尺寸图片都会等比铺满裁切，始终是干净的横幅 */
.lottery-hero.has-cover { aspect-ratio: 1044 / 300; }
.lottery-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lottery-hero-img[hidden] { display: none; }
.lottery-hero-fallback {
    display: grid; gap: 10px; place-content: center; justify-items: center;
    padding: 52px 24px; text-align: center;
    background:
        radial-gradient(circle at 50% -30%, rgba(121, 146, 164, .3), transparent 70%),
        linear-gradient(135deg, #393732, #242320);
}
.lottery-hero-fallback[hidden] { display: none; }
.lottery-hero-eyebrow { font-size: 12px; font-weight: 1000; letter-spacing: .34em; color: rgba(121, 146, 164, .82); }
.lottery-hero-name { font-size: 30px; font-weight: 1000; letter-spacing: -.02em; color: #fff; text-shadow: 0 4px 16px rgba(0, 0, 0, .35); }

/* 标题 + 余额 条 */
.lottery-headbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.lottery-headbar-info { display: grid; gap: 6px; min-width: 0; }
.lottery-eyebrow {
    width: fit-content; padding: 3px 11px; border-radius: 999px;
    font-size: 11px; font-weight: 1000; letter-spacing: .12em;
    color: #50697b; background: rgba(121, 146, 164, .2); border: 1px solid rgba(109, 137, 157, .32);
}
.lottery-name { margin: 0; font-size: 24px; font-weight: 1000; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.lottery-desc { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.lottery-desc[hidden] { display: none; }
.lottery-balance {
    flex: 0 0 auto; display: grid; gap: 3px; justify-items: end;
    padding: 11px 20px; border-radius: 14px;
    background: linear-gradient(135deg, #393731, #242320);
    box-shadow: 0 10px 22px rgba(39, 38, 35, .22);
}
.lottery-balance-label { font-size: 10px; font-weight: 1000; letter-spacing: .14em; text-transform: uppercase; color: rgba(121, 146, 164, .82); }
.lottery-balance-value { font-size: 24px; font-weight: 1000; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }

/* 保底进度 */
.lottery-pity { margin-top: 8px; display: grid; gap: 7px; }
.lottery-pity[hidden] { display: none; }
.lottery-pity-head { font-size: 12px; font-weight: 800; color: #50697b; }
.lottery-pity-head strong { color: var(--ink); }
.lottery-pity-top { color: #50697b; font-weight: 1000; }
.lottery-pity-bar { position: relative; height: 9px; border-radius: 999px; background: rgba(39, 38, 35, .08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(39, 38, 35, .12); }
.lottery-pity-fill {
    position: absolute; inset: 0 auto 0 0; width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #869dad, #668397);
    box-shadow: 0 0 12px rgba(102, 131, 151, .55);
    transition: width .6s cubic-bezier(.16, 1, .3, 1);
}

/* —— 滚动卷轴：典藏展示柜 —— */
.lottery-reel {
    position: relative; border-radius: 18px; overflow: hidden;
    background:
        radial-gradient(160px 120% at 50% 50%, rgba(121, 146, 164, .16), transparent 72%),
        linear-gradient(180deg, #23221f, #11100f);
    border: 1px solid rgba(121, 146, 164, .3);
    box-shadow: inset 0 2px 26px rgba(0, 0, 0, .6), 0 12px 28px rgba(27, 27, 25, .18);
}
.lottery-reel-viewport { overflow: hidden; padding: 20px 0; }
.lottery-reel-track { display: flex; gap: 12px; padding: 0 12px; will-change: transform; }
.lottery-reel-item {
    position: relative; flex: 0 0 auto;
    width: 116px; height: 146px;
    border-radius: 13px; overflow: hidden;
    display: grid; place-items: center;
    background:
        radial-gradient(circle at 50% 28%, var(--rg), transparent 72%),
        linear-gradient(180deg, #28282a, #171614);
    border: 1px solid var(--rr);
    box-shadow: inset 0 0 16px var(--rg), inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 14px rgba(0, 0, 0, .4);
}
.lottery-reel-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--rr); }
.lottery-reel-item img { max-width: 88%; max-height: 80%; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5)); }
.lottery-reel-ph { color: #fff; font-weight: 1000; font-size: 22px; opacity: .85; }
.lottery-reel-rarity {
    position: absolute; top: 7px; left: 7px;
    padding: 1px 7px; border-radius: 6px;
    font-size: 9px; font-weight: 1000; letter-spacing: .04em; color: #fff;
    background: var(--rr); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.lottery-reel-item.is-win { border-color: #fff; box-shadow: 0 0 0 2px #fff, inset 0 0 28px var(--rg), 0 0 30px var(--rg); }
.lottery-reel-item.is-landed { animation: lottery-win-pop .55s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes lottery-win-pop { 0% { transform: scale(1); } 45% { transform: scale(1.1); } 100% { transform: scale(1); } }
/* 中央高亮卡槽 */
.lottery-reel::after {
    content: ''; position: absolute; top: 9px; bottom: 9px; left: 50%; width: 124px;
    transform: translateX(-50%); z-index: 3; pointer-events: none; border-radius: 14px;
    box-shadow: inset 0 0 0 2px rgba(121, 146, 164, .5), 0 0 26px rgba(121, 146, 164, .22);
}
.lottery-reel-pointer { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; transform: translateX(-50%); z-index: 6; pointer-events: none; }
.lottery-reel-pointer::before {
    content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 13px; height: 13px; border-radius: 3px;
    background: linear-gradient(135deg, #dde1e4, var(--gold)); box-shadow: 0 0 12px var(--gold-2);
}
.lottery-reel-pointer::after {
    content: ''; position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 13px; height: 13px; border-radius: 3px;
    background: linear-gradient(135deg, var(--gold), #dde1e4); box-shadow: 0 0 12px var(--gold-2);
}
.lottery-reel-edge { position: absolute; top: 0; bottom: 0; width: 86px; z-index: 4; pointer-events: none; }
.lottery-reel-edge--l { left: 0; background: linear-gradient(90deg, #100f0e, transparent); }
.lottery-reel-edge--r { right: 0; background: linear-gradient(270deg, #100f0e, transparent); }

/* —— 操作台（深色单抽 + 金色十连，强对比不与背景融合） —— */
.lottery-console { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.lottery-btn {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    min-height: 78px; padding: 0 22px;
    border: 0; border-radius: 18px; cursor: pointer; font: inherit; text-align: left;
    transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}
.lottery-btn:hover:not([disabled]) { transform: translateY(-2px); }
.lottery-btn:active:not([disabled]) { transform: translateY(0); }
.lottery-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.lottery-btn-main, .lottery-btn-cost, .lottery-btn-badge { position: relative; z-index: 1; }
.lottery-btn-main { display: grid; gap: 1px; }
.lottery-btn-title { font-size: 20px; font-weight: 1000; letter-spacing: .04em; line-height: 1.1; }
.lottery-btn-sub { font-size: 11.5px; font-weight: 800; opacity: .72; }
.lottery-btn-cost { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 1000; }
.lottery-btn-cost svg { opacity: .82; }
.lottery-btn-cost strong { font-weight: 1000; font-variant-numeric: tabular-nums; }
.lottery-btn--single { color: #fff; background: linear-gradient(135deg, #434039, #242320); box-shadow: 0 14px 28px rgba(39, 38, 35, .26), inset 0 1px 0 rgba(255, 255, 255, .08); }
.lottery-btn--single .lottery-btn-cost { color: var(--gold-2); }
.lottery-btn--single:hover:not([disabled]) { filter: brightness(1.08); }
.lottery-btn--ten { color: #fff; background: linear-gradient(135deg, #869dad, var(--gold)); box-shadow: 0 16px 32px rgba(86, 113, 133, .36), inset 0 1px 0 rgba(255, 255, 255, .65); }
.lottery-btn--ten .lottery-btn-sub { opacity: .55; }
.lottery-btn--ten::after {
    content: ''; position: absolute; top: 0; left: -60%; width: 36%; height: 100%; z-index: 0;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent);
    transform: skewX(-20deg); animation: lottery-btn-shine 4.8s ease-in-out infinite;
}
@keyframes lottery-btn-shine { 0%, 100% { left: -60%; } 55% { left: 135%; } }
.lottery-btn-badge {
    position: absolute; top: -10px; right: 16px; z-index: 2;
    padding: 3px 11px; border-radius: 999px;
    font-size: 10px; font-weight: 1000; color: #fff;
    background: linear-gradient(180deg, #f0795f, #ce5a4c);
    box-shadow: 0 5px 12px rgba(206, 90, 76, .4);
}
.lottery-hint { margin: -8px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); text-align: center; }

/* —— 奖池一览 / 我的记录 —— */
.lottery-showcase, .lottery-myhistory { display: grid; gap: 12px; }
.lottery-showcase-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lottery-showcase-head h4 { margin: 0; font-size: 15px; font-weight: 1000; color: var(--ink); }
.lottery-myhistory-count { font-size: 12px; color: var(--muted); font-weight: 700; }
.lottery-link { border: 0; background: none; color: #557083; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.lottery-link:hover { background: rgba(109, 137, 157, .12); }
.lottery-link[hidden] { display: none; }

.lottery-prize-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
.lottery-prize-card {
    position: relative; display: grid; overflow: hidden;
    border-radius: 16px; background: #fff;
    border: 1px solid rgba(39, 38, 35, .08); border-top: 3px solid var(--rr);
    box-shadow: 0 8px 20px rgba(39, 38, 35, .06);
    transition: transform .16s ease, box-shadow .22s ease;
}
.lottery-prize-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px var(--rg); }
.lottery-prize-card.is-soldout { opacity: .5; filter: grayscale(.6); }
.lottery-prize-media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 32%, var(--rr-soft), #fff 74%); }
.lottery-prize-media img { max-width: 80%; max-height: 80%; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .2)); }
.lottery-prize-media.is-noimg::after { content: '?'; font-size: 26px; font-weight: 1000; color: var(--rr); opacity: .45; }
.lottery-prize-rarity { position: absolute; top: 7px; left: 7px; padding: 2px 8px; border-radius: 7px; font-size: 10px; font-weight: 1000; color: #fff; background: var(--rr); box-shadow: 0 2px 6px var(--rg); }
.lottery-prize-stock { position: absolute; top: 7px; right: 7px; padding: 2px 8px; border-radius: 7px; font-size: 10px; font-weight: 900; color: #fff; background: rgba(39, 38, 35, .72); }
.lottery-prize-info { display: grid; gap: 7px; padding: 10px 12px 12px; }
.lottery-prize-name { min-width: 0; font-size: 13px; font-weight: 900; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lottery-prize-prob {
    justify-self: start;
    padding: 2px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 1000; font-variant-numeric: tabular-nums;
    color: var(--rr); background: var(--rr-soft); border: 1px solid var(--rg);
}

.lottery-history-list { display: grid; gap: 8px; }
.lottery-history-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 15px;
    border: 1px solid rgba(39, 38, 35, .08); border-left: 3px solid var(--rr);
    border-radius: 12px; background: #fcfcfd;
    transition: box-shadow .18s ease;
}
.lottery-history-row:hover { box-shadow: 0 6px 16px var(--rg); }
.lottery-history-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.lottery-history-rarity { flex: 0 0 auto; padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 1000; color: #fff; background: var(--rr); }
.lottery-history-left strong { font-size: 13px; font-weight: 900; color: var(--ink); }
.lottery-history-pity { padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; color: #fff; background: #ce5a4c; }
.lottery-history-cash { font-size: 12px; font-weight: 900; color: #557083; }
.lottery-history-row time { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); font-weight: 700; }

/* —— 结果弹窗 —— */
.lottery-result-modal { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lottery-result-modal[hidden] { display: none !important; }
.lottery-result-backdrop { position: absolute; inset: 0; background: rgba(19, 18, 17, .72); backdrop-filter: none; animation: confirm-fade-in .18s ease; }
.lottery-result-panel {
    position: relative; display: flex; flex-direction: column;
    width: min(680px, 96vw); max-height: 90vh; overflow: hidden;
    border-radius: 22px; text-align: center;
    background: radial-gradient(circle at 50% -10%, rgba(121, 146, 164, .18), transparent 60%), linear-gradient(180deg, #fbfbfc, #f2f4f5);
    border: 1px solid rgba(121, 146, 164, .4);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
    animation: lottery-result-in .3s cubic-bezier(.2, 1, .3, 1);
}
.lottery-result-panel.is-single { width: min(440px, 92vw); }
@keyframes lottery-result-in { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.lottery-result-panel.is-legend { border-color: rgba(244, 202, 92, .7); box-shadow: 0 30px 80px rgba(224, 165, 46, .4); }
.lottery-result-panel.is-epic { border-color: rgba(168, 85, 247, .5); }
.lottery-result-rays {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: 22px;
    background: conic-gradient(from 0deg, rgba(121, 146, 164, .12), transparent 30deg, rgba(121, 146, 164, .12) 60deg, transparent 90deg, rgba(121, 146, 164, .12) 120deg, transparent 150deg, rgba(121, 146, 164, .12) 180deg, transparent 210deg, rgba(121, 146, 164, .12) 240deg, transparent 270deg, rgba(121, 146, 164, .12) 300deg, transparent 330deg);
    opacity: .5; animation: lottery-rays-spin 18s linear infinite;
}
.lottery-result-panel.is-common .lottery-result-rays { opacity: .16; }
@keyframes lottery-rays-spin { to { transform: rotate(360deg); } }
.lottery-result-head { position: relative; z-index: 1; flex: 0 0 auto; padding: 28px 26px 4px; }
.lottery-result-foot { position: relative; z-index: 1; flex: 0 0 auto; padding: 10px 26px 22px; }
.lottery-result-eyebrow { font-size: 12px; font-weight: 1000; letter-spacing: .18em; text-transform: uppercase; color: #557083; }
.lottery-result-title { margin: 6px 0 0; font-size: 26px; font-weight: 1000; letter-spacing: -.02em; color: var(--ink); word-break: break-word; }
.lottery-result-body { position: relative; z-index: 1; flex: 1 1 auto; display: grid; gap: 14px; padding: 16px 26px; overflow-y: auto; overflow-x: hidden; }
.lottery-result-body.is-single { justify-items: center; align-content: center; }
.lottery-result-body.is-multi { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 560px) { .lottery-result-body.is-multi { grid-template-columns: repeat(3, 1fr); } }

.lottery-result-card {
    position: relative; display: grid; gap: 8px; justify-items: center; overflow: hidden;
    border-radius: 14px; background: #fff;
    border: 1px solid rgba(39, 38, 35, .08); border-top: 3px solid var(--rr);
    opacity: 0; transform: translateY(14px) scale(.9);
    animation: lottery-card-in .5s cubic-bezier(.2, 1.2, .35, 1) forwards;
}
@keyframes lottery-card-in { to { opacity: 1; transform: none; } }
.lottery-result-card.is-single { width: min(230px, 76vw); }
.lottery-result-media { position: relative; width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, var(--rr-soft), #fff 78%); }
.lottery-result-card.is-single .lottery-result-media { aspect-ratio: 4 / 5; box-shadow: inset 0 0 46px var(--rg); }
.lottery-result-media img { max-width: 74%; max-height: 74%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .22)); }
.lottery-result-card.is-single .lottery-result-media img { max-width: 86%; max-height: 90%; }
.lottery-result-media.is-noimg span { font-size: 28px; font-weight: 1000; color: var(--rr); }
.lottery-result-card.lottery-rarity--legend .lottery-result-media { animation: lottery-legend-glow 2s ease-in-out infinite; }
@keyframes lottery-legend-glow { 0%, 100% { box-shadow: inset 0 0 30px var(--rg); } 50% { box-shadow: inset 0 0 58px var(--rg); } }
.lottery-result-rarity { position: absolute; top: 8px; left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 1000; color: #fff; background: var(--rr); box-shadow: 0 4px 10px var(--rg); }
.lottery-result-pity { position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 1000; color: #fff; background: #ce5a4c; }
.lottery-result-card figcaption { display: grid; gap: 3px; padding: 0 10px 12px; }
.lottery-result-card figcaption strong { font-size: 14px; font-weight: 1000; color: var(--ink); }
.lottery-result-card.is-single figcaption strong { font-size: 18px; }
.lottery-result-cash { font-size: 12px; font-weight: 900; color: #557083; }
.lottery-result-note { margin: 0 0 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.lottery-result-actions { display: flex; gap: 12px; justify-content: center; }

.lottery-result-confetti { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; border-radius: 22px; }
.lottery-confetti-bit { position: absolute; top: -14px; width: 8px; height: 14px; border-radius: 2px; opacity: .9; animation: lottery-confetti-fall linear forwards; }
@keyframes lottery-confetti-fall { to { transform: translateY(680px) rotate(540deg); opacity: 0; } }

@media (max-width: 720px) {
    .lottery-headbar { grid-template-columns: 1fr; }
    .lottery-balance { justify-items: start; }
    .lottery-console { grid-template-columns: 1fr; }
    .lottery-name { font-size: 20px; }
    .lottery-hero-name { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .lottery-ticker-track.is-rolling,
    .lottery-result-rays,
    .lottery-result-card.lottery-rarity--legend .lottery-result-media,
    .lottery-confetti-bit,
    .lottery-btn--ten::after,
    .store-tab--lottery::after { animation: none !important; }
    .lottery-result-card { opacity: 1; transform: none; animation: none; }
}

/* Lottery redesign 2026-06 */
.lottery {
    --lottery-ink: #1d1d1f;
    --lottery-muted: #6e6e73;
    --lottery-navy: #1d1d1f;
    --lottery-navy-2: #2c2c2e;
    --lottery-paper: #ffffff;
    --lottery-paper-2: #f0f3f7;
    --lottery-gold: #0071e3;
    --lottery-gold-2: #2997ff;
    --lottery-teal: #0a84ff;
    gap: 18px;
}

#lottery-loading {
    min-height: 240px;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 1px solid rgba(39, 38, 35, .08);
    border-radius: 18px;
    background:
        radial-gradient(circle at 72% 0, rgba(121, 146, 164, .18), transparent 260px),
        linear-gradient(180deg, #fcfcfd, #eff1f3);
}

.lottery-ticker {
    min-height: 44px;
    padding: 8px 14px;
    border-color: rgba(121, 146, 164, .24);
    border-radius: 14px;
    color: rgba(237, 239, 241, .86);
    background:
        linear-gradient(90deg, rgba(121, 146, 164, .1), transparent 35%),
        linear-gradient(135deg, #28282a, #3a3a3c);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 12px 24px rgba(39, 38, 35, .14);
}

.lottery-ticker-label {
    color: #869dad;
    letter-spacing: 0;
}

.lottery-ticker-dot {
    background: var(--lottery-teal);
    box-shadow: 0 0 10px rgba(82, 78, 69, .7);
}

.lottery-ticker-item {
    color: rgba(237, 239, 241, .74);
}

.lottery-ticker-item b {
    color: #fcfcfd;
}

.lottery-pool-switch {
    width: fit-content;
    max-width: 100%;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(91, 120, 140, .22);
    border-radius: 16px;
    background: rgba(251, 251, 252, .68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.lottery-pool-chip {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border-color: transparent;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}

.lottery-pool-chip strong {
    font-size: 13px;
}

.lottery-pool-chip em {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(39, 38, 35, .06);
    color: #978e79;
}

.lottery-pool-chip:hover {
    background: rgba(242, 243, 244, .9);
    box-shadow: 0 8px 18px rgba(39, 38, 35, .06);
}

.lottery-pool-chip.is-active {
    color: #fff;
    background: linear-gradient(180deg, #869dad, var(--lottery-gold));
    box-shadow:
        0 10px 20px rgba(86, 113, 133, .24),
        inset 0 1px 0 rgba(255, 255, 255, .62);
}

.lottery-pool-chip.is-active em {
    color: #43403a;
    background: rgba(251, 251, 252, .38);
}

.lottery-stage {
    gap: 18px;
    padding: 0 0 24px;
    border-color: rgba(91, 120, 140, .24);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0, rgba(82, 78, 69, .1), transparent 270px),
        radial-gradient(circle at 0 10%, rgba(121, 146, 164, .18), transparent 320px),
        linear-gradient(180deg, #fcfcfd 0, #f4f3f0 100%);
    box-shadow:
        0 24px 54px rgba(75, 71, 63, .12),
        inset 0 1px 0 rgba(255, 255, 255, .96);
}

.lottery-stage::before {
    inset: 0 0 auto;
    width: auto;
    height: 3px;
    background: linear-gradient(90deg, var(--lottery-gold-2), var(--lottery-teal), var(--lottery-gold));
}

.lottery-stage::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -90px;
    width: 260px;
    height: 260px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(121, 146, 164, .18), transparent 66%);
}

.lottery-hero {
    z-index: 1;
    margin: 18px 18px 0;
    min-height: 190px;
    border-color: rgba(39, 38, 35, .14);
    border-radius: 18px;
    background:
        radial-gradient(circle at 75% 20%, rgba(121, 146, 164, .26), transparent 300px),
        linear-gradient(135deg, #34322e, #1d1d1f 70%);
    box-shadow:
        0 18px 34px rgba(39, 38, 35, .2),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.lottery-hero.has-cover {
    aspect-ratio: 23 / 8;
    min-height: 0;
}

.lottery-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(17, 17, 16, .05), rgba(17, 17, 16, .26)),
        linear-gradient(90deg, rgba(17, 17, 16, .42), transparent 42%, rgba(17, 17, 16, .18));
}

.lottery-hero-img {
    filter: saturate(1.06) contrast(1.04);
}

.lottery-hero-fallback {
    min-height: 190px;
    padding: 44px 24px 58px;
    background:
        radial-gradient(circle at 30% 0, rgba(121, 146, 164, .28), transparent 64%),
        radial-gradient(circle at 78% 20%, rgba(82, 78, 69, .22), transparent 52%),
        linear-gradient(135deg, #34322e, #1d1d1f 74%);
}

.lottery-hero-eyebrow {
    position: relative;
    z-index: 1;
    color: rgba(121, 146, 164, .9);
    letter-spacing: 0;
}

.lottery-hero-name {
    position: relative;
    z-index: 1;
    color: #fcfcfd;
    font-size: 30px;
    letter-spacing: 0;
}

.lottery-headbar {
    display: none;
}

.lottery-headbar-info {
    gap: 7px;
}

.lottery-eyebrow {
    padding: 4px 10px;
    color: #50697b;
    background: linear-gradient(180deg, rgba(121, 146, 164, .2), rgba(121, 146, 164, .08));
    border-color: rgba(91, 120, 140, .25);
    letter-spacing: 0;
}

.lottery-name {
    font-size: 24px;
    letter-spacing: 0;
}

.lottery-desc {
    max-width: 640px;
    color: #706a5b;
}

.lottery-balance {
    min-width: 128px;
    padding: 12px 16px;
    border: 1px solid rgba(121, 146, 164, .16);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(121, 146, 164, .1), transparent 45%),
        linear-gradient(135deg, #28282a, #3a3a3c);
    box-shadow:
        0 12px 24px rgba(39, 38, 35, .2),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.lottery-balance-label {
    color: rgba(121, 146, 164, .82);
    letter-spacing: 0;
}

.lottery-balance-value {
    font-size: 25px;
}

.lottery-pity {
    grid-template-columns: max-content minmax(140px, 1fr);
    align-items: center;
    gap: 14px;
    margin: 0 34px;
    padding: 12px 14px;
    border: 1px solid rgba(91, 120, 140, .2);
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(121, 146, 164, .16), rgba(82, 78, 69, .05)),
        rgba(252, 252, 253, .72);
}

.lottery-pity-head {
    color: #4f4c43;
}

.lottery-pity-bar {
    height: 10px;
    background: rgba(39, 38, 35, .09);
}

.lottery-pity-fill {
    background: linear-gradient(90deg, var(--lottery-teal), var(--lottery-gold-2), var(--lottery-gold));
}

.lottery-reel {
    margin: 0 34px;
    border-color: rgba(121, 146, 164, .24);
    border-radius: 18px;
    background:
        radial-gradient(180px 100% at 50% 50%, rgba(121, 146, 164, .16), transparent 70%),
        linear-gradient(180deg, #35332e 0, #191917 52%, #121211 100%);
    box-shadow:
        inset 0 18px 36px rgba(255, 255, 255, .03),
        inset 0 -22px 36px rgba(0, 0, 0, .32),
        0 18px 34px rgba(39, 38, 35, .18);
}

.lottery-reel-viewport {
    padding: 18px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.lottery-reel-track {
    gap: 14px;
    padding: 0 16px;
}

.lottery-reel-item {
    width: 108px;
    height: 136px;
    border-color: rgba(255, 255, 255, .16);
    border-radius: 13px;
    background:
        radial-gradient(circle at 50% 30%, var(--rg), transparent 66%),
        linear-gradient(180deg, #2c2c2e, #1d1d1f);
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, .04),
        inset 0 0 18px var(--rg),
        0 10px 18px rgba(0, 0, 0, .36);
}

.lottery-reel-item::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rr), transparent);
}

.lottery-reel-item img {
    max-width: 82%;
    max-height: 78%;
}

.lottery-reel-rarity {
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0;
}

.lottery-reel::after {
    top: 10px;
    bottom: 10px;
    width: 116px;
    border-radius: 15px;
    box-shadow:
        inset 0 0 0 1px rgba(252, 252, 253, .52),
        inset 0 0 0 3px rgba(121, 146, 164, .38),
        0 0 26px rgba(121, 146, 164, .22);
}

.lottery-reel-pointer::before,
.lottery-reel-pointer::after {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.lottery-reel-edge {
    width: 110px;
}

.lottery-console {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 14px;
    margin: 0 34px;
}

.lottery-btn {
    min-height: 74px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 17px;
}

.lottery-btn-title {
    font-size: 19px;
    letter-spacing: 0;
}

.lottery-btn-sub {
    font-size: 12px;
}

.lottery-btn--single {
    border-color: rgba(255, 255, 255, .08);
    background:
        linear-gradient(135deg, rgba(121, 146, 164, .08), transparent 44%),
        linear-gradient(135deg, #28282a, #3d3a34);
    box-shadow:
        0 16px 30px rgba(39, 38, 35, .24),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.lottery-btn--ten {
    border-color: rgba(86, 113, 133, .24);
    background: linear-gradient(135deg, #869dad, #718ca0 48%, #648094);
    box-shadow:
        0 18px 32px rgba(86, 113, 133, .34),
        inset 0 1px 0 rgba(255, 255, 255, .64);
}

.lottery-btn-badge {
    top: 8px;
    right: 18px;
    letter-spacing: 0;
}

.lottery-hint {
    width: fit-content;
    max-width: calc(100% - 68px);
    justify-self: center;
    margin: -2px 34px 0;
    padding: 9px 14px;
    border: 1px solid rgba(39, 38, 35, .08);
    border-radius: 999px;
    background: rgba(252, 252, 253, .72);
    color: #706a5b;
}

.lottery-showcase,
.lottery-myhistory {
    margin: 0 34px;
}

.lottery-showcase-head h4 {
    font-size: 16px;
    letter-spacing: 0;
}

.lottery-link {
    color: #50697b;
}

.lottery-prize-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 12px;
}

.lottery-prize-card {
    border: 1px solid rgba(39, 38, 35, .08);
    border-top: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .95) inset,
        0 10px 22px rgba(39, 38, 35, .06);
}

button.lottery-prize-card {
    width: 100%;
    padding: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lottery-prize-card:focus-visible {
    outline: 3px solid rgba(109, 137, 157, .34);
    outline-offset: 3px;
}

.lottery-prize-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--rr), rgba(255, 255, 255, .1));
}

.lottery-prize-card:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .95) inset,
        0 16px 28px rgba(39, 38, 35, .08),
        0 0 22px var(--rg);
}

.lottery-prize-media {
    aspect-ratio: 16 / 13;
    background:
        radial-gradient(circle at 50% 28%, var(--rg), transparent 66%),
        linear-gradient(180deg, #2c2c2e, #1d1d1f);
}

.lottery-prize-media img {
    max-width: 70%;
    max-height: 78%;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35));
}

.lottery-prize-media.is-noimg::after {
    color: rgba(255, 255, 255, .72);
}

.lottery-prize-rarity,
.lottery-prize-stock {
    border-radius: 999px;
    letter-spacing: 0;
}

.lottery-prize-info {
    gap: 8px;
    padding: 11px 12px 13px;
}

.lottery-prize-name {
    font-size: 13px;
}

.lottery-prize-prob {
    padding: 3px 10px;
}

.lottery-history-list {
    gap: 9px;
}

.lottery-history-row {
    position: relative;
    padding: 12px 15px 12px 18px;
    border: 1px solid rgba(39, 38, 35, .08);
    border-left: 0;
    border-radius: 13px;
    background: rgba(252, 252, 253, .86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
}

.lottery-history-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: var(--rr);
}

.lottery-history-rarity,
.lottery-history-pity {
    letter-spacing: 0;
}

.lottery-result-backdrop {
    background: rgba(17, 17, 16, .74);
    backdrop-filter: none;
}

.lottery-result-panel {
    width: min(900px, 96vw);
    border-color: rgba(121, 146, 164, .36);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% -10%, rgba(121, 146, 164, .2), transparent 58%),
        radial-gradient(circle at 95% 10%, rgba(82, 78, 69, .1), transparent 34%),
        linear-gradient(180deg, #fcfcfd, #f4f3f0);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

.lottery-result-eyebrow {
    color: #50697b;
    letter-spacing: 0;
}

.lottery-result-title {
    letter-spacing: 0;
}

.lottery-result-body.is-multi {
    grid-template-columns: repeat(5, minmax(126px, 1fr));
    gap: 16px;
}

.lottery-result-card {
    min-width: 0;
    margin: 0;
    border: 1px solid rgba(39, 38, 35, .08);
    border-top: 0;
    border-radius: 14px;
    background: #fff;
}

.lottery-result-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--rr), rgba(255, 255, 255, .1));
}

.lottery-result-media {
    background:
        radial-gradient(circle at 50% 32%, var(--rg), transparent 68%),
        linear-gradient(180deg, #2c2c2e, #1d1d1f);
}

.lottery-result-card figcaption strong {
    overflow-wrap: anywhere;
}

.lottery-result-media.is-noimg span {
    color: rgba(255, 255, 255, .78);
}

.lottery-result-rarity,
.lottery-result-pity {
    letter-spacing: 0;
}

.lottery-prize-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 97;
    display: grid;
    place-items: center;
    padding: 18px;
}

.lottery-prize-detail-modal[hidden] {
    display: none !important;
}

.lottery-prize-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 16, .72);
    backdrop-filter: none;
}

.lottery-prize-detail-panel {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 36px);
    overflow: auto;
    border: 1px solid rgba(121, 146, 164, .38);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% -12%, var(--rr-soft), transparent 58%),
        linear-gradient(180deg, #fcfcfd, #f4f3f0);
    box-shadow: 0 32px 80px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.lottery-prize-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    color: #5e594e;
    background: rgba(39, 38, 35, .07);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.lottery-prize-detail-head {
    padding: 24px 26px 8px;
    text-align: center;
}

.lottery-prize-detail-eyebrow {
    color: #50697b;
    font-size: 12px;
    font-weight: 1000;
}

.lottery-prize-detail-title {
    margin: 6px 38px 0;
    color: var(--ink);
    font-size: 24px;
    font-weight: 1000;
}

.lottery-prize-detail-body {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding: 18px 26px 26px;
    align-items: start;
}

.lottery-prize-detail-media {
    position: relative;
    min-height: 220px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 32%, var(--rg), transparent 68%),
        linear-gradient(180deg, #2c2c2e, #1d1d1f);
    overflow: hidden;
}

.lottery-prize-detail-media img {
    max-width: 72%;
    max-height: 74%;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35));
}

.lottery-prize-detail-media.is-noimg span {
    color: rgba(255, 255, 255, .78);
    font-size: 26px;
    font-weight: 1000;
}

.lottery-prize-detail-info {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.lottery-prize-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lottery-prize-detail-meta span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(39, 38, 35, .08);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(252, 252, 253, .78);
    font-size: 12px;
    font-weight: 900;
}

.lottery-prize-detail-meta b {
    color: #50697b;
    font-size: 11px;
    font-weight: 1000;
}

.lottery-prize-detail-desc {
    margin: 0;
    color: #4c4840;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Lottery refinements: clean banner, cash buttons, paged history */
.lottery-stage {
    padding-top: 22px;
    padding-bottom: 22px;
}

.lottery-stage::before,
.lottery-stage::after {
    display: none;
}

.lottery-hero {
    min-height: 0;
    margin: 0 16px;
    border-color: rgba(39, 38, 35, .18);
    border-radius: 12px;
    background: #171938;
    box-shadow: 0 16px 32px rgba(39, 38, 35, .18);
}

.lottery-hero.has-cover {
    aspect-ratio: auto;
}

.lottery-hero::after {
    display: none;
}

.lottery-hero-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: none;
}

.lottery-hero-fallback {
    min-height: 112px;
    padding: 28px 18px;
}

.lottery-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.lottery-btn {
    min-height: 72px;
    padding: 0 24px;
    border-radius: 14px;
}

.lottery-btn-main {
    gap: 2px;
}

.lottery-btn-title {
    font-size: 22px;
    line-height: 1.05;
}

.lottery-btn-sub {
    font-size: 13px;
}

.lottery-btn-cost {
    display: grid;
    justify-items: end;
    gap: 3px;
    line-height: 1;
}

.lottery-btn-cost::before {
    content: "CASH";
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: 0;
}

.lottery-btn-cost svg {
    display: none;
}

.lottery-btn--single .lottery-btn-cost::before {
    color: rgba(121, 146, 164, .78);
}

.lottery-btn--ten .lottery-btn-cost::before {
    color: #50697b;
}

.lottery-btn--single .lottery-btn-cost strong,
.lottery-btn--ten .lottery-btn-cost strong {
    font-size: 24px;
}

.lottery-btn-badge {
    top: 7px;
    right: 14px;
}

.lottery-history-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-top: 4px;
}

.lottery-history-pages[hidden] {
    display: none !important;
}

.lottery-history-page {
    min-width: 36px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 10px;
    color: var(--ink);
    background: rgba(252, 252, 253, .88);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.lottery-history-page:hover:not([disabled]) {
    border-color: rgba(109, 137, 157, .7);
    background: #f2f4f5;
    transform: translateY(-1px);
}

.lottery-history-page.is-active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    box-shadow: 0 8px 18px rgba(86, 113, 133, .18);
}

.lottery-history-page[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

.lottery-history-page-gap {
    min-width: 22px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.lottery-result-panel {
    width: min(820px, calc(100vw - 32px));
}

.lottery-result-panel.is-single {
    width: min(440px, calc(100vw - 32px));
}

.lottery-result-body.is-multi {
    grid-template-columns: repeat(5, minmax(104px, 1fr));
    gap: 12px;
    padding: 14px 22px;
}

.lottery-result-foot {
    padding-bottom: 24px;
}

/* Lottery refinements: store-like action buttons and smaller single result */
.lottery-btn {
    min-height: 58px;
    padding: 10px 12px 10px 16px;
    border: 1px solid rgba(39, 38, 35, .08);
    border-radius: 12px;
    background: #ffffff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .95) inset,
        0 10px 22px rgba(39, 38, 35, .06);
}

.lottery-btn--single,
.lottery-btn--ten {
    color: var(--ink);
    background: #ffffff;
    border-color: rgba(39, 38, 35, .08);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .95) inset,
        0 10px 22px rgba(39, 38, 35, .06);
}

.lottery-btn:hover:not([disabled]) {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .95) inset,
        0 14px 26px rgba(86, 113, 133, .14);
}

.lottery-btn-cost {
    order: 1;
    display: flex;
    align-items: baseline;
    justify-items: start;
    gap: 5px;
    color: var(--ink);
}

.lottery-btn-cost::before {
    color: #567185;
    font-size: 13px;
    letter-spacing: 0;
}

.lottery-btn--single .lottery-btn-cost::before,
.lottery-btn--ten .lottery-btn-cost::before {
    color: #567185;
}

.lottery-btn--single .lottery-btn-cost strong,
.lottery-btn--ten .lottery-btn-cost strong {
    color: var(--ink);
    font-size: 23px;
    letter-spacing: 0;
}

.lottery-btn-main {
    order: 2;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 14px;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    box-shadow: 0 6px 14px rgba(86, 113, 133, .25);
}

.lottery-btn-main::before {
    display: none;
    content: none;
}

.lottery-btn-title {
    font-size: 14px;
    font-weight: 1000;
}

.lottery-btn-sub {
    display: none;
}

.lottery-btn-badge {
    display: none;
}

/* Show the gold target only while the reel is spinning. */
.lottery-reel::after,
.lottery-reel-pointer::before,
.lottery-reel-pointer::after {
    opacity: 0;
    transition: opacity .18s ease;
}

.lottery-reel::after {
    transform: translateX(-50%) scale(.98);
}

.lottery-reel.is-spinning::after {
    opacity: 1;
    animation: lottery-target-breathe .9s ease-in-out infinite;
}

.lottery-reel.is-spinning .lottery-reel-pointer::before,
.lottery-reel.is-spinning .lottery-reel-pointer::after {
    opacity: 1;
    animation: lottery-pointer-spark .72s ease-in-out infinite alternate;
}

@keyframes lottery-target-breathe {
    0%, 100% {
        transform: translateX(-50%) scale(.98);
        box-shadow:
            inset 0 0 0 1px rgba(252, 252, 253, .38),
            inset 0 0 0 3px rgba(121, 146, 164, .32),
            0 0 16px rgba(121, 146, 164, .16);
    }
    50% {
        transform: translateX(-50%) scale(1.03);
        box-shadow:
            inset 0 0 0 1px rgba(252, 252, 253, .72),
            inset 0 0 0 3px rgba(121, 146, 164, .58),
            0 0 34px rgba(121, 146, 164, .34);
    }
}

@keyframes lottery-pointer-spark {
    from { filter: brightness(.92); }
    to { filter: brightness(1.25) drop-shadow(0 0 8px rgba(121, 146, 164, .5)); }
}

.lottery-result-panel.is-single {
    width: min(380px, calc(100vw - 32px));
}

.lottery-result-panel.is-single .lottery-result-head {
    padding-top: 24px;
}

.lottery-result-panel.is-single .lottery-result-title {
    font-size: 24px;
}

.lottery-result-body.is-single {
    padding: 14px 22px 12px;
}

.lottery-result-card.is-single {
    width: min(180px, 62vw);
}

.lottery-result-card.is-single .lottery-result-media {
    aspect-ratio: 1 / 1.12;
}

.lottery-result-card.is-single .lottery-result-media img {
    max-width: 64%;
    max-height: 70%;
}

.lottery-result-card.is-single figcaption strong {
    font-size: 16px;
}

@media (max-width: 720px) {
    .lottery-pool-switch {
        width: 100%;
    }

    .lottery-pool-chip {
        flex: 1 1 150px;
        justify-content: center;
    }

    .lottery-hero {
        margin: 14px 14px 0;
        min-height: 0;
    }

    .lottery-headbar {
        grid-template-columns: 1fr;
        margin: -30px 18px 0;
        padding: 16px;
    }

    .lottery-balance {
        justify-items: start;
        width: 100%;
    }

    .lottery-pity,
    .lottery-console {
        grid-template-columns: 1fr;
    }

    .lottery-pity,
    .lottery-reel,
    .lottery-console,
    .lottery-showcase,
    .lottery-myhistory {
        margin-right: 18px;
        margin-left: 18px;
    }

    .lottery-hint {
        max-width: calc(100% - 36px);
        margin-right: 18px;
        margin-left: 18px;
        border-radius: 14px;
    }

    .lottery-reel-item {
        width: 98px;
        height: 124px;
    }

    .lottery-reel::after {
        width: 106px;
    }
}

@media (max-width: 560px) {
    .lottery-result-body.is-multi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lottery-prize-detail-body {
        grid-template-columns: 1fr;
    }

    .lottery-prize-detail-media {
        min-height: 190px;
    }
}

/* ============================================================
   装备仓库（warehouse 模块聚合视图）
   ============================================================ */

.warehouse-view-body {
    display: grid;
    gap: 14px;
}

.warehouse-notice {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid rgba(39, 38, 35, .12);
    background: var(--paper-soft);
}

.warehouse-notice code {
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(39, 38, 35, .08);
    font-weight: 800;
}

.warehouse-notice--error {
    border-color: rgba(206, 90, 76, .4);
    background: rgba(206, 90, 76, .09);
    color: #8c3328;
}

.warehouse-notice--warning {
    border-color: rgba(214, 176, 80, .55);
    background: rgba(240, 210, 110, .2);
    color: #7a5a14;
}

.warehouse-notice--info {
    border-color: rgba(82, 78, 69, .35);
    background: rgba(82, 78, 69, .08);
    color: #2c2c2e;
}

.warehouse-statbar {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.warehouse-online {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 18px;
    border: 1px solid rgba(39, 38, 35, .12);
    border-radius: 14px;
    background: #fcfcfd;
    font-size: 14px;
    font-weight: 900;
    color: var(--muted);
}

.warehouse-online.is-online {
    color: #157347;
    border-color: rgba(40, 167, 105, .4);
    background: rgba(40, 167, 105, .08);
}

.warehouse-online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c5bfb0;
}

.warehouse-online-dot.is-online {
    background: #19a974;
    box-shadow: 0 0 0 4px rgba(25, 169, 116, .18);
    animation: warehouse-dot-pulse 2s ease-in-out infinite;
}

@keyframes warehouse-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

.warehouse-stat {
    flex: 1;
}

.warehouse-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 14px;
    background: #fcfcfd;
}

.warehouse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.warehouse-table th {
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: .04em;
    background: var(--paper-soft);
    border-bottom: 1px solid rgba(39, 38, 35, .1);
}

.warehouse-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(39, 38, 35, .06);
    vertical-align: middle;
}

.warehouse-table tbody tr:last-child td {
    border-bottom: 0;
}

.warehouse-table tbody tr:hover {
    background: rgba(121, 146, 164, .08);
}

.warehouse-item-name {
    font-weight: 900;
    color: var(--deep);
}

.warehouse-skill-cell {
    max-width: 330px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.warehouse-time-cell {
    white-space: nowrap;
    color: var(--muted);
    font-size: 12.5px;
}

.warehouse-empty-cell {
    padding: 34px 14px !important;
    text-align: center;
    color: var(--muted);
}

/* ============================================================
   战盟命令说明（www.splengame.com/guild.php 聚合）
   ============================================================ */

.guild-commands-panel {
    margin-top: 14px;
}

.guild-cmd-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.guild-cmd-card {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 16px 18px;
    border: 1px solid rgba(39, 38, 35, .1);
    border-radius: 14px;
    background: #fcfcfd;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.guild-cmd-card:hover {
    border-color: rgba(109, 137, 157, .6);
    box-shadow: 0 10px 24px rgba(65, 62, 56, .12);
    transform: translateY(-2px);
}

.guild-cmd-card h4 {
    margin: 0;
    font-size: 15px;
    color: var(--deep);
}

.guild-cmd-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}

.guild-cmd-syntax {
    position: relative;
    display: block;
    width: 100%;
    padding: 11px 44px 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper-soft);
    color: var(--ink);
    font-family: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    text-align: left;
    word-break: break-all;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}

.guild-cmd-syntax::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background-color: var(--muted);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='11' height='11' rx='2'/><path d='M5 15V5a2 2 0 0 1 2-2h10'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='11' height='11' rx='2'/><path d='M5 15V5a2 2 0 0 1 2-2h10'/></svg>") center / contain no-repeat;
    opacity: .65;
    transition: background-color .16s ease, opacity .16s ease;
}

.guild-cmd-syntax:hover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), .06);
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), .10);
}

.guild-cmd-syntax:hover::after {
    background-color: var(--accent);
    opacity: 1;
}

.guild-cmd-syntax:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.guild-cmd-syntax.is-copied {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), .1);
    color: var(--accent);
}

.guild-cmd-syntax.is-copied::after {
    background-color: var(--accent);
    opacity: 1;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / contain no-repeat;
}

/* ============================================================
   Clean Flat Apple 主题层 —— apple.com 产品页式（2026 扁平重做）
   纯净留白 · 实色白卡 · 极细发丝线 · 苹果蓝点缀 · 无磨砂玻璃
   置于全部规则之后；仅视觉皮肤，不改动结构与交互逻辑
   ============================================================ */

/* —— 顶部导航：干净白条 —— */
.main-nav {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.main-nav a {
    color: #1d1d1f;
    font-weight: 600;
}
.main-nav a:hover {
    color: var(--accent);
    background: rgba(var(--accent-rgb), .08);
}
.main-nav a.is-active {
    color: #fff;
    font-weight: 600;
    background: var(--accent);
    box-shadow: none;
}

/* —— 首页横幅外框 —— */
.hero {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

/* —— 主内容面板：实色白 + 发丝线 + 极柔阴影 —— */
.content-panel {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

/* —— 卡片族：实色白 + 发丝线，去玻璃 / 去重投影 —— */
.account-card,
.guild-stat-card,
.guild-panel,
.guild-cmd-card,
.store-card,
.store-hero,
.store-recharge-card,
.store-recharge-method,
.rank-mini {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
    box-shadow: none;
}
.guild-panel--info {
    background: var(--paper-soft);
    border: 1px solid var(--line);
}

/* —— 主操作按钮：苹果蓝实色胶囊 —— */
.guild-btn {
    border-radius: 980px;
}
.guild-btn--primary,
.store-card-buy,
.guild-field input[type="file"]::file-selector-button {
    background: var(--accent);
    box-shadow: none;
}
.guild-btn--primary:hover:not([disabled]),
.store-card-buy:hover {
    background: #0077ed;
    box-shadow: none;
}

/* —— 次级按钮：白底蓝字描边胶囊 —— */
.guild-btn--ghost {
    color: var(--accent);
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
}
.guild-btn--ghost:hover:not([disabled]) {
    background: var(--paper-soft);
    border-color: #c7c7cc;
}

/* —— 分段控件 —— */
.store-tab {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
}
.store-tab.is-active {
    color: #fff;
    background: var(--accent);
    box-shadow: none;
}

.rank-mini {
    color: #fff;
    background: var(--accent);
    border: 0;
}

.rank-mini--ph {
    color: var(--muted);
    background: var(--paper-soft);
    border: 1px solid var(--line);
}

.warehouse-slot-badge {
    display: inline-grid;
    min-width: 46px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: #fff;
    font-size: 13px;
    font-weight: 900;
}

.warehouse-statbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* —— 输入框聚焦：苹果蓝细环 —— */
.guild-field input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18);
}

/* —— 弹窗：实色白面板 + 普通暗色遮罩（无磨砂） —— */
.character-modal-panel,
.confirm-modal-panel,
.store-pay-panel {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
    box-shadow: 0 12px 44px rgba(0, 0, 0, .18);
}
.confirm-modal-backdrop,
.store-pay-backdrop,
.store-detail-backdrop,
.mark-designer-backdrop,
.lottery-result-backdrop,
.lottery-prize-detail-backdrop,
.character-modal::backdrop {
    background: rgba(0, 0, 0, .42);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* —— 抽奖主舞台：干净浅底（去玻璃、去彩色光晕） —— */
.lottery-stage {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line);
    box-shadow: none;
}
.lottery-pool-switch {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--paper-soft);
}

/* —— 公告列表激活项：苹果蓝指示 —— */
.notice-item.is-active {
    background: rgba(var(--accent-rgb), .06);
}

/* ============================================================
   Wiki 视图（站内知识库）—— 扁平苹果风：左目录 + 右内容
   ============================================================ */
.wiki-layout {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 22px 28px 28px;
}
.wiki-toc {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.wiki-toc-item {
    text-align: left;
    padding: 9px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #1d1d1f;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.wiki-toc-item:hover { background: var(--paper-soft); color: var(--accent); }
.wiki-toc-item.is-active { background: var(--accent); color: #fff; }
.wiki-content {
    min-width: 0;
    padding: 2px 4px 4px;
    color: var(--ink);
    line-height: 1.72;
}
.wiki-article[hidden] { display: none; }
.wiki-article h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 18px; }
.wiki-article h2 { font-size: 19px; font-weight: 700; margin: 30px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.wiki-article h3 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.wiki-article p { margin: 10px 0; }
.wiki-article ul, .wiki-article ol { margin: 10px 0; padding-left: 22px; }
.wiki-article li { margin: 5px 0; }
.wiki-article a { color: var(--accent); text-decoration: none; }
.wiki-article a:hover { text-decoration: underline; }
.wiki-article hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.wiki-article code {
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    font-family: "SF Mono", Consolas, "JetBrains Mono", monospace;
    font-size: 13px;
    color: #c0392b;
}
.wiki-article blockquote {
    margin: 14px 0;
    padding: 10px 16px;
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    background: var(--paper-soft);
}
.wiki-article blockquote p { margin: 6px 0; }
.wiki-table,
.wiki-article .table-container { overflow-x: auto; margin: 14px 0; }
.wiki-article table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wiki-article th, .wiki-article td { padding: 9px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.wiki-article thead th { background: var(--paper-soft); font-weight: 700; }
.wiki-article tbody tr:nth-child(even) { background: #fafafa; }
.wiki-figure { margin: 14px 0; }
.wiki-figure img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.wiki-note { border-left-width: 3px; border-left-style: solid; }
.wiki-note--success { border-left-color: #34c759; }
.wiki-note--info { border-left-color: var(--accent); }
.wiki-note--warning { border-left-color: #ff9f0a; }
.wiki-note--danger { border-left-color: var(--red); }
.wiki-empty { color: var(--muted); padding: 40px; text-align: center; }

/* ============================================================
   Final UI polish: store balance, warehouse bounds, downloads, language switch
   ============================================================ */
.archive-language-switch button {
    min-height: 20px;
    padding: 0 10px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #e9f5ff;
    border: 1px solid rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .08);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
}

.archive-language-switch button.is-active,
.archive-language-switch button:hover {
    color: #00579d;
    background: #fff;
    border-color: #fff;
}

.content-panel,
.main-column,
.content-view,
.store-view,
.warehouse-view,
.download-view {
    min-width: 0;
}

.store-hero {
    padding: 22px;
    border: 1px solid rgba(0, 113, 227, .16);
    border-left: 6px solid var(--accent);
    border-radius: 22px;
    background:
        radial-gradient(circle at 95% 10%, rgba(0, 113, 227, .10), transparent 260px),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .045);
}

.store-hero::before {
    display: none;
}

.store-hero-stats {
    grid-template-columns: minmax(0, 1fr) minmax(150px, .46fr) minmax(210px, .5fr);
    gap: 16px;
    align-items: stretch;
}

.store-hero-stat {
    min-height: 118px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
    min-width: 0;
    overflow: hidden;
}

.store-hero-stat--cash {
    align-content: center;
}

.store-hero-stat-label {
    color: #5b6b7b;
    font-size: 12px;
    letter-spacing: .16em;
}

.store-hero-stat-value {
    margin-top: 2px;
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#store-balance-coins {
    font-size: clamp(26px, 2.7vw, 38px);
}

.store-hero-stat--recharge {
    min-width: 0;
    justify-items: stretch;
    align-content: center;
    gap: 10px;
    background:
        linear-gradient(180deg, rgba(0, 113, 227, .06), rgba(0, 113, 227, .02)),
        #fff;
}

.store-hero-stat-action {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(0, 113, 227, .16);
}

.store-hero-stat-action + .store-hero-stat-action {
    color: var(--accent);
    background: #fff;
    border-color: rgba(0, 113, 227, .24);
    box-shadow: none;
}

.warehouse-view {
    max-width: 100%;
}

.warehouse-view-body,
.warehouse-view .store-state,
.warehouse-table-wrap {
    max-width: 100%;
    min-width: 0;
}

.warehouse-view-body {
    padding: 22px;
}

.warehouse-statbar {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.warehouse-stat {
    min-width: 0;
}

.warehouse-table {
    min-width: 820px;
}

.download-view-body {
    gap: 18px;
    padding: 24px;
    background: linear-gradient(180deg, #fff, #fbfbfd);
}

.download-hero-card {
    min-height: 170px;
    padding: 28px;
    grid-template-columns: minmax(0, 1fr) auto;
    border-color: rgba(0, 113, 227, .18);
    color: var(--ink);
    background:
        radial-gradient(circle at 96% 0%, rgba(0, 113, 227, .14), transparent 250px),
        linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
    box-shadow: 0 10px 24px rgba(0, 113, 227, .08);
}

.download-kicker {
    color: var(--accent);
}

.download-hero-copy h3 {
    max-width: 680px;
    font-size: 34px;
    color: var(--ink);
}

.download-hero-copy p {
    color: var(--muted);
}

.download-primary-button {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 12px 22px rgba(0, 113, 227, .22);
}

.download-mirror-list {
    grid-template-columns: 1fr;
    gap: 12px;
}

.download-mirror-link {
    position: relative;
    min-height: 76px;
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1fr) auto auto;
    align-content: center;
    align-items: center;
    column-gap: 16px;
    padding: 14px 18px 14px 20px;
}

.download-mirror-link strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-mirror-link em {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.35;
}

.download-mirror-link::after {
    content: "Download";
    display: inline-grid;
    min-height: 34px;
    padding: 0 14px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.download-mirror-link span {
    grid-column: auto;
    justify-self: end;
}

.download-requirements {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .035);
}

@media (max-width: 900px) {
    .store-hero-stats,
    .download-hero-card,
    .download-mirror-list,
    .warehouse-statbar {
        grid-template-columns: 1fr;
    }

    .download-mirror-link {
        grid-template-columns: 1fr;
    }

    .download-mirror-link span,
    .download-mirror-link::after {
        justify-self: start;
    }
}

.login-form button,
.create-account,
.register-actions button {
    min-height: 44px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.login-form button:hover,
.create-account:hover,
.register-actions button:hover,
.register-actions button:focus-visible {
    background: #0077ed;
    box-shadow: 0 8px 18px rgba(0, 113, 227, .16);
}

.create-account {
    background: #fff;
    color: var(--accent);
    border: 1px solid rgba(0, 113, 227, .24);
}

.create-account:hover {
    color: #fff;
}
