:root {
    color-scheme: dark;
    --ink: #101516;
    --panel: #191f20;
    --gold: #dec18b;
    --gold2: #b99960;
    --text: #f1eee6;
    --muted: #a2aaa7;
    --line: #303737;
    --font: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
    --display: "STIX Two Text", "Songti SC", "SimSun", serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font-family: var(--font); font-size: 14px; }
button, input, select { font: inherit; }
button, a, label, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 4px; }
p, h1, h2 { margin: 0; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--gold); }
.brand-mark {
    display: inline-flex; flex: none; align-items: center; justify-content: center;
    width: 40px; height: 44px; border: 1px solid #a88b55; border-radius: 3px 3px 14px 14px;
    font: italic 700 30px var(--display); color: var(--gold);
    background: linear-gradient(140deg, #3e3b2c, #171e1e);
}

/* Recharge center */
.shop-body { padding: 0; background: radial-gradient(ellipse at 50% 0, #29302b 0, #101516 65%); }
.container.shop-shell { width: min(1180px, 100%); margin: 0 auto; padding: 0 36px 28px; }
.shop-shell > .row { margin: 0; }
.shop-shell > .row > .col-xs-12 { padding: 0; }
.shop-top { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shop-top__brand { display: flex; align-items: center; gap: 13px; }
.shop-top__brand strong { display: block; font-size: 23px; letter-spacing: .06em; font-weight: 800; }
.brand-caption { display: block; font-size: 10px; color: var(--muted); letter-spacing: .22em; margin-top: 2px; }
.shop-chip { padding: 9px 17px; border-radius: 5px; border: 1px solid #49504a; background: transparent; color: #d0d3ca; font-size: 12px; }
.shop-chip:hover { background: #30382f; border-color: var(--gold); }
.shop-hero {
    position: relative; min-height: 266px; overflow: hidden; border: 1px solid #484a3c; border-radius: 10px;
    background: linear-gradient(90deg, rgba(15,24,24,.83), rgba(15,24,24,.18) 60%, rgba(15,24,24,.04)), url("./adventure-hero.webp") 50% 15% / cover;
    margin-bottom: 32px;
}
.hero-copy { position: relative; padding: 34px 40px; }
.hero-copy h1 { margin: 13px 0 12px; font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; letter-spacing: .08em; line-height: 1.25; }
.hero-copy h1 span { color: var(--gold); margin-left: 16px; }
.hero-copy > p:not(.eyebrow) { font-size: 12px; color: #c1c7bd; letter-spacing: .12em; }
.hero-link { display: inline-flex; align-items: center; gap: 32px; margin-top: 22px; padding-bottom: 7px; border-bottom: 1px solid #8d825e; color: var(--gold); font-size: 12px; }
.hero-link:hover, .hero-link:focus { color: #fff0cd; text-decoration: none; }
.shop-form { margin: 0 0 28px; }
.shop-form fieldset { display: grid; grid-template-columns: 242px minmax(0, 1fr); gap: 28px; min-width: 0; border: 0; padding: 0; }
.shop-toolbar { align-self: start; padding: 24px 20px; border: 1px solid var(--line); border-radius: 8px; background: #181f1f; }
.toolbar-heading { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.toolbar-heading p { margin-top: 9px; font-size: 17px; overflow-wrap: anywhere; }
.tool > label { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin: 0 0 10px; }
.shop-toolbar .form-control { width: 100%; height: 44px; padding: 0 12px; border-radius: 4px; border: 1px solid #414943; color: var(--text); background: #111819; box-shadow: none; }
.pay-tool { margin-top: 24px; }
#payways { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
#payways > label { margin: 0; font-weight: 500; }
.paylist li { position: relative; display: flex; gap: 10px; align-items: center; min-height: 46px; padding: 9px 12px; border: 1px solid #363e3c; border-radius: 4px; background: #202727; color: #c7cdc7; cursor: pointer; }
.paylist li input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.paylist li.sl, .paylist li:has(input:checked) { border-color: #b09a6e; background: #303128; }
.paylist li:has(input:checked)::after { content: "✓"; margin-left: auto; color: var(--gold); }
.paylist li .name { font-size: 12px; }
.payment-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; color: white; font-size: 13px; font-weight: 700; }
.alipay { background: #168ddd; }
.wechat { background: #2aa76b; }
.delivery-note { display: flex; gap: 9px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); }
.delivery-note > span { color: var(--gold); font-size: 18px; }
.delivery-note strong { font-size: 11px; color: #d2d3c5; font-weight: 500; }
.delivery-note p { font-size: 11px; line-height: 1.9; color: var(--muted); margin-top: 7px; }
.shop-section { min-width: 0; }
.shop-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.shop-section__head h2 { font-size: 23px; letter-spacing: .03em; margin-top: 8px; font-weight: 600; }
.shop-section__head > span { font-size: 11px; color: var(--muted); padding-bottom: 3px; }
.shop-tabs { display: flex; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 20px; scroll-margin-top: 16px; }
.shop-tab { position: relative; padding: 10px 18px; border: 1px solid #626b5e; border-radius: 6px; background: #202b27; color: #d6d9cf; font-size: 13px; font-weight: 500; transition: border-color .18s, background .18s; }
.shop-tab:hover { border-color: var(--gold); background: #30382f; }
.shop-tab.on { border-color: var(--gold); background: #3b3b2b; color: #f2dba8; box-shadow: inset 0 0 0 1px #dec18b33; }
.game-pay-mask { position: fixed; inset: 0; z-index: 2147483640; display: flex; align-items: center; justify-content: center; padding: 16px; background: #060c0bcc; backdrop-filter: blur(5px); }
.game-pay-dialog { width: min(400px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px 24px 12px; border: 1px solid #8c7953; border-radius: 16px; background: linear-gradient(145deg, #29342e, #18221f 72%); color: #f1eee6; box-shadow: 0 24px 80px #0008, inset 0 1px 0 #dec18b20; }
.game-pay-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; margin-bottom: 18px; border-bottom: 1px solid #dec18b24; }
.game-pay-header h3 { margin: 0; color: #f1e7d3; font-size: 18px; font-weight: 600; line-height: 1.5; }
.game-pay-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.game-pay-label { color: #a7b0a7; font-size: 11px; }
.game-pay-amount { color: #e8cc95; font: 500 30px/1.2 var(--display); white-space: nowrap; }
.game-pay-methods { display: grid; gap: 10px; }
.game-pay-method { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 62px; padding: 12px 15px; border: 1px solid #46564a; border-radius: 10px; background: #26342dcc; color: #f1eee6; text-align: left; font-size: 14px; font-weight: 500; transition: background .18s, border-color .18s; }
.game-pay-method:hover, .game-pay-method:focus-visible { border-color: #c2a56d; background: #344236; }
.game-pay-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; color: #fff; font-size: 20px; font-weight: 700; }
.game-pay-method.alipay .game-pay-icon { background: #1678d3; }
.game-pay-method.wx .game-pay-icon { background: #15984d; }
.game-pay-arrow { margin-left: auto; color: #a5ad9c; font-size: 24px; font-weight: 400; }
.game-pay-cancel { display: block; width: 100%; min-height: 40px; margin-top: 10px; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: #b3b9af; font-size: 12px; }
.game-pay-cancel:hover, .game-pay-cancel:focus-visible { background: #dec18b0b; color: #e8cc95; }
.recharge-category { border: 0; margin: 0; padding: 0; background: transparent; box-shadow: none; }
.category-content { padding: 0; }
.recharge-options-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.recharge-option-wrapper { min-width: 0; }
.recharge-option-item { position: relative; display: flex; flex-direction: column; min-height: 157px; padding: 22px 17px; margin: 0; border: 1px solid #3b4240; border-radius: 7px; background: linear-gradient(135deg, #252d2b, #192021); cursor: pointer; transition: border-color .18s, background .18s; }
.recharge-option-item::before { content: "✧"; position: absolute; right: 16px; top: 16px; font-size: 26px; line-height: 1; color: #6c705d; }
.recharge-option-item input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.recharge-option-item:hover { border-color: #a68e62; background: #2d332d; }
.recharge-option-item.checked, .recharge-option-item:has(input:checked) { border-color: var(--gold); background: linear-gradient(135deg, #3c3a2b, #242b26); box-shadow: inset 0 0 0 1px #dec18b26; }
.recharge-option-item.checked::before { content: "✓"; font-size: 15px; color: var(--gold); }
.shop-price { display: flex; align-items: baseline; gap: 5px; color: var(--gold); margin-top: 13px; }
.shop-price em { font: 400 38px/1.1 var(--display); }
.shop-price i { font-size: 11px; font-style: normal; font-weight: 400; }
.option-text { display: block; font-size: 11px; font-weight: 400; line-height: 1.8; color: #c4c7bb; margin-top: 12px; }
.disabled-limit { opacity: .45; cursor: not-allowed; }
.option-reward { margin-top: 10px; padding: 15px 12px; border: 1px solid #414536; border-radius: 6px; color: #d7cfb6; background: #1b2220; font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; }
.option-reward::before { content: "礼包奖励"; display: block; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #343b32; font-weight: 600; letter-spacing: .1em; color: var(--gold); }
.option-reward span { color: #d7cfb6 !important; }
.option-reward p { margin: 0; }
.recharge-category[data-idx="0"] .recharge-options-list { grid-template-columns: 1fr; }
.recharge-category[data-idx="0"] .recharge-option-wrapper { display: grid; grid-template-columns: minmax(180px, .85fr) minmax(0, 1.15fr); gap: 16px; }
.recharge-category[data-idx="0"] .recharge-option-item { min-height: 225px; padding: 28px 24px; justify-content: center; }
.recharge-category[data-idx="0"] .shop-price em { font-size: 58px; }
.recharge-category[data-idx="0"] .option-reward { margin: 0; padding: 21px; }
.help-block:empty { display: none; }
.checkout-bar { display: flex; align-items: center; gap: 24px; clear: both; margin: 0; padding: 22px 24px; border: 1px solid #484b3d; background: #1c2321; border-radius: 8px; }
.checkout-summary { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1; }
.checkout-summary > span { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.checkout-summary > strong { font-size: 26px; font-family: var(--display); font-weight: 500; line-height: 1.2; color: var(--gold); }
.checkout-note { color: var(--muted); font-size: 11px; }
.checkout-bar .layui-btn { width: 230px; height: 48px; line-height: 48px; flex-shrink: 0; border-radius: 5px; background: linear-gradient(110deg, #e9d3a5, #c2a164); color: #25271f; font-size: 14px; letter-spacing: .1em; font-weight: 700; border: 1px solid #ebd4a7; }
.checkout-bar .layui-btn:hover { background: #f0d9a7; color: #111819; opacity: 1; }
.hide { display: none !important; }
.footer { display: none; }
.modal-content { color: var(--text); background: var(--panel); border: 1px solid var(--line); }
.modal-header, .modal-footer { border-color: var(--line); }
.layui-layer { max-width: calc(100vw - 24px); }
.layui-layer-dialog, .layui-layer-page { background: var(--panel) !important; border: 1px solid #54513e; border-radius: 8px !important; }
.layui-layer-content { color: var(--text); }
.layui-layer-title { background: #242c29 !important; color: var(--gold) !important; border-color: var(--line) !important; }
.layui-layer-btn a { background: #d9bd86 !important; color: #21251f !important; border-color: #d9bd86 !important; border-radius: 4px; }
.coin-modal { padding: 24px; }
.coin-title { color: var(--gold); text-align: center; font-size: 22px; }
.coin-balance, .coin-tip { text-align: center; margin: 12px 0; }
.coin-tip { font-size: 11px; color: var(--muted); }
.coin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coin-btn { border: 1px solid #756647; background: #35372b; color: var(--gold); padding: 13px; border-radius: 4px; }

/* Login */
.login-body { min-height: 100vh; background: radial-gradient(ellipse at 25% 20%, #303a32, #0f1516 70%); }
.splash { display: grid; align-items: center; min-height: 100vh; min-height: 100svh; padding: 40px max(24px, env(safe-area-inset-left)) 40px max(24px, env(safe-area-inset-right)); }
.splash-main { width: min(1080px, 100%); margin: auto; display: grid; grid-template-columns: 1.2fr 1fr; border: 1px solid #4a4d40; border-radius: 12px; overflow: hidden; background: #191f1f; box-shadow: 0 30px 100px #0005; }
.splash-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 600px; padding: 36px; background: linear-gradient(180deg, #0a15184d, #0e1917a8), url("./adventure-hero.webp") 65% center / cover; }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-brand strong { font-size: 22px; letter-spacing: .08em; }
.login-art-copy { margin-top: auto; margin-bottom: 70px; }
.login-art-copy h1 { font-size: 42px; line-height: 1.5; letter-spacing: .12em; margin: 15px 0; font-weight: 600; }
.login-art-copy > p:last-child { font-size: 12px; letter-spacing: .2em; color: #c9cabc; }
.art-caption { font-size: 10px; color: #bfc3b3; letter-spacing: .12em; }
.dock { align-self: center; padding: 48px; min-width: 0; }
.dock-title { font-size: 27px; font-weight: 600; margin: 12px 0; }
.dock-description { font-size: 12px; color: var(--muted); margin-bottom: 32px; }
.field { position: relative; margin-bottom: 20px; }
.field > label { display: block; font-size: 12px; color: #c6cbbf; margin-bottom: 9px; }
.field input { display: block; width: 100%; height: 50px; padding: 0 14px; border: 1px solid #414a43; border-radius: 5px; background: #121a1b; color: var(--text); font-size: 15px; }
.field input::placeholder { color: #717c78; }
.field input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px #dec18b13; }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: inset 0 0 0 1000px #121a1b; }
.field.pwd input { padding-right: 60px; }
.eye { position: absolute; right: 10px; bottom: 10px; height: 30px; border: 0; border-radius: 3px; padding: 0 8px; background: #29312c; color: var(--gold); font-size: 11px; }
.eye .on, .eye.active .off { display: none; }
.eye.active .on { display: inline; }
.dock .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; margin: 0 0 28px; }
.remember { display: flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.remember input { width: 15px; height: 15px; accent-color: var(--gold); margin: 0; }
.remember .box { display: none; }
.dock a { color: var(--gold); text-decoration: none; }
.login { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 50px; padding: 0 20px; border: 1px solid #e5cea0; border-radius: 5px; color: #24291f; background: linear-gradient(110deg, #e9d3a5, #c2a164); font-weight: 600; font-size: 14px; }
.login:hover { background: #ecd5a5; }
.tip { text-align: center; font-size: 10px; color: #8e9892; margin-top: 20px; }
.dnf-error-text { color: var(--text); }

/* Tablet and phone landscape */
@media (max-width: 1000px) {
    .container.shop-shell { padding-right: 24px; padding-left: 24px; }
    .shop-form fieldset { grid-template-columns: 210px minmax(0, 1fr); gap: 22px; }
    .shop-toolbar { padding: 20px 16px; }
    .shop-section__head > span { display: none; }
    .recharge-options-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recharge-category[data-idx="0"] .recharge-option-wrapper { grid-template-columns: 1fr 1fr; gap: 10px; }
    .recharge-category[data-idx="0"] .recharge-option-item { padding: 20px 16px; }
    .recharge-category[data-idx="0"] .option-reward { padding: 18px 12px; }
    .checkout-note { display: none; }
    .dock { padding: 36px 28px; }
    .splash-art { padding: 28px; }
}
/* Phone portrait */
@media (max-width: 640px) {
    .container.shop-shell { padding: 0 max(16px, env(safe-area-inset-right)) calc(122px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
    .shop-top { min-height: 76px; }
    .brand-mark { width: 31px; height: 35px; font-size: 24px; }
    .shop-top__brand { gap: 10px; }
    .shop-top__brand strong { font-size: 19px; }
    .brand-caption { font-size: 9px; }
    .shop-chip { padding: 7px 11px; font-size: 10px; }
    .shop-hero { min-height: 202px; margin-bottom: 20px; background-position: 60% 38%; }
    .hero-copy { padding: 24px 22px; }
    .hero-copy .eyebrow { font-size: 9px; }
    .hero-copy h1 { font-size: 29px; line-height: 1.35; margin-top: 10px; }
    .hero-copy h1 span { display: block; margin-left: 0; }
    .hero-copy > p:not(.eyebrow) { font-size: 10px; letter-spacing: 0; }
    .hero-link { font-size: 10px; margin-top: 12px; gap: 20px; }
    .shop-form fieldset { display: block; }
    .shop-toolbar { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; padding: 16px; margin-bottom: 25px; }
    .toolbar-heading { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin: 0; align-items: center; }
    .toolbar-heading .eyebrow { font-size: 10px; }
    .toolbar-heading p { font-size: 12px; margin: 0; }
    .tool > label { font-size: 10px; margin-bottom: 8px; }
    .shop-toolbar .form-control { height: 40px; font-size: 13px; }
    .pay-tool { margin-top: 0; min-width: 0; }
    #payways { grid-template-columns: 1fr 1fr; gap: 6px; }
    .paylist li { min-height: 40px; padding: 6px; justify-content: center; gap: 5px; }
    .paylist li .name { font-size: 10px; white-space: nowrap; }
    .paylist li:has(input:checked)::after { display: none; }
    .payment-icon { width: 17px; height: 18px; font-size: 10px; border-radius: 3px; }
    .delivery-note { display: none; }
    .shop-section__head { margin-bottom: 20px; }
    .shop-section__head h2 { font-size: 21px; }
    .shop-tabs { gap: 8px; margin-bottom: 16px; }
    .shop-tab { flex: 1; padding: 10px 12px; font-size: 12px; }
    .recharge-option-item { min-height: 145px; padding: 16px; }
    .recharge-category[data-idx="0"] .recharge-option-wrapper { grid-template-columns: 1fr; }
    .recharge-category[data-idx="0"] .recharge-option-item { min-height: 150px; padding: 20px; }
    .recharge-category[data-idx="0"] .shop-price em { font-size: 46px; }
    .recharge-category[data-idx="0"] .option-reward { padding: 18px 20px; columns: 2; column-gap: 16px; }
    .recharge-category[data-idx="0"] .option-reward::before { column-span: all; }
    .checkout-bar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; gap: 12px; margin: 0; padding: 14px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-radius: 0; border-width: 1px 0 0; box-shadow: 0 -10px 35px #0a111530; background: #1c2321fa; }
    .checkout-summary > span { font-size: 10px; line-height: 1.6; }
    .checkout-summary > strong { font-size: 23px; }
    .checkout-bar .layui-btn { width: 43%; max-width: 200px; font-size: 13px; }
    .splash { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
    .splash-main { display: block; max-width: 440px; }
    .splash-art { min-height: 210px; padding: 22px; background-position: 60% 38%; }
    .login-brand strong { font-size: 18px; }
    .login-art-copy { margin: 24px 0 0; }
    .login-art-copy .eyebrow, .login-art-copy > p:last-child, .art-caption { display: none; }
    .login-art-copy h1 { font-size: 28px; line-height: 1.4; margin: 0; }
    .dock { padding: 28px 24px; }
    .dock-title { font-size: 24px; }
    .dock-description { margin-bottom: 24px; font-size: 11px; }
}
@media (orientation: landscape) and (max-height: 540px) and (min-width: 641px) {
    .shop-top { min-height: 70px; }
    .shop-hero { min-height: 158px; margin-bottom: 20px; }
    .hero-copy { padding: 20px 28px; }
    .hero-copy h1 { font-size: 30px; margin: 8px 0; }
    .hero-link { margin-top: 10px; }
    .container.shop-shell { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
    .checkout-bar { padding: 16px; }
    .splash { padding: 20px max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left)); }
    .splash-main { grid-template-columns: .95fr 1fr; }
    .splash-art { min-height: 430px; padding: 24px; }
    .login-art-copy { margin-bottom: 40px; }
    .login-art-copy h1 { font-size: 31px; }
    .dock { padding: 26px; }
    .dock-title { font-size: 24px; }
    .dock-description { margin-bottom: 20px; }
    .field { margin-bottom: 14px; }
    .dock .row { margin-bottom: 20px; }
}
@media (max-width: 360px) {
    .shop-toolbar { padding: 12px; gap: 10px; grid-template-columns: .9fr 1.3fr; }
    .payment-icon { display: none; }
    .shop-tab { padding-left: 8px; padding-right: 8px; }
    .recharge-category[data-idx="0"] .option-reward { columns: auto; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
