/* 设置面板 */
.settings-modal{position:fixed;inset:0;z-index:200;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;font-family:var(--sans,system-ui)}
.settings-modal[hidden]{display:none}
.settings-panel{width:min(600px,calc(100% - 32px));max-height:min(86vh,720px);background:var(--paper);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 12px 40px rgba(0,0,0,.18)}
.settings-head{flex:none;display:flex;justify-content:space-between;align-items:center;padding:14px 18px 8px}
.settings-frame{flex:1 1 auto;min-height:0;display:flex}
.settings-nav{flex:none;width:148px;border-right:1px solid var(--hairline);padding:10px;display:flex;flex-direction:column;gap:3px}
.snav{display:block;border:none;background:none;text-align:left;padding:9px 12px;border-radius:10px;font-size:13.5px;color:var(--muted);cursor:pointer;font-family:inherit;font-weight:600;transition:.12s}
.snav:hover{color:var(--ink);background:rgba(23,23,23,.05)}
.snav.active{color:var(--accent);background:rgba(216,11,36,.08)}
.settings-body{flex:1 1 auto;min-width:0;overflow-y:auto;padding:14px 16px 18px;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin;scrollbar-color:rgba(23,23,23,.18) transparent}
.settings-body::-webkit-scrollbar{width:8px}
.settings-body::-webkit-scrollbar-thumb{background:rgba(23,23,23,.16);border-radius:99px;border:2px solid var(--paper)}
.settings-body::-webkit-scrollbar-thumb:hover{background:rgba(23,23,23,.3)}
.settings-body::-webkit-scrollbar-track{background:transparent}
.set-pane{display:none}
.set-pane.active{display:flex;flex-direction:column;gap:12px}
@media(max-width:600px){
  .settings-frame{flex-direction:column}
  .settings-nav{flex-direction:row;width:auto;overflow-x:auto;border-right:none;border-bottom:1px solid var(--hairline);padding:8px 12px;gap:6px}
  .snav{flex:none;padding:7px 12px;font-size:13px}
}
.settings-title{margin:0;font-size:18px;font-weight:800}
.settings-x{background:none;border:none;color:var(--muted);font-size:18px;cursor:pointer;line-height:1;padding:4px 8px;border-radius:8px}
.settings-x:hover{color:var(--ink)}
.settings-x{min-width:44px;min-height:44px}
.set-section{border:1px solid var(--hairline);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px}
.set-section h4{margin:0;font-size:12.5px;color:var(--muted);font-weight:700;letter-spacing:.04em}
.set-profile{display:flex;align-items:center;gap:14px}
.set-avatar{width:64px;height:64px;border-radius:50%;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;flex:none;background-size:cover;background-position:center}
.set-help{color:var(--faint);font-size:11px;line-height:1.6}
.set-actions{display:flex;gap:8px;flex-wrap:wrap}
.set-redeem-actions{align-items:center;flex-wrap:nowrap}
.set-redeem-actions .btn{flex:none}
.set-redeem-actions .set-msg{flex:1;min-width:0;min-height:0;line-height:1.6;overflow-wrap:anywhere}
.set-fields{display:flex;flex-direction:column;gap:8px}
.set-field{display:flex;flex-direction:column;gap:3px;font-size:12.5px;color:var(--muted)}
.set-field b{font-size:14px;color:var(--ink);font-weight:600;word-break:break-all}
.set-input{border:1px solid var(--hairline);border-radius:10px;padding:9px 12px;font-size:14px;font-family:inherit;outline:none;background:var(--paper);color:var(--ink);width:100%}
.set-input:focus{border-color:var(--accent)}
.wallet-heading{display:flex;justify-content:space-between;align-items:center}
.wallet-info-link{display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;margin-inline-start:.4em;vertical-align:-.12em;font-size:inherit;line-height:1;color:#8a8a8a;text-decoration:none;flex:none}
.wallet-info-link svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.wallet-info-link .wallet-info-dot{fill:currentColor;stroke:none}
.wallet-info-link:hover{color:#626262}
.wallet-info-link:focus-visible{outline:2px solid var(--accent,#d80b24);outline-offset:4px;border-radius:50%}
.wallet-recharge-action{display:inline-flex;align-items:center;font-size:inherit}
.toast.show:has(.wallet-info-link){pointer-events:auto}
.wallet-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.wallet-cell{padding:12px 8px;border-radius:10px;background:color-mix(in srgb,var(--ink) 4%,var(--paper));min-width:0}
.wallet-cell b{display:block;min-width:0;max-width:100%;color:var(--ink);font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;overflow-wrap:normal;word-break:normal;overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(23,23,23,.3) transparent}
.wallet-cell b::-webkit-scrollbar{height:6px}
.wallet-cell b::-webkit-scrollbar-thumb{background:rgba(23,23,23,.3);border-radius:99px}
.wallet-cell b::-webkit-scrollbar-track{background:transparent}
.wallet-cell:first-child b{color:var(--accent)}
.wallet-cell span{font-size:11px;color:var(--muted)}
.payment-state,.payment-record{font-size:12.5px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere}
.payment-record{border-bottom:1px solid var(--hairline);padding:8px 0;display:flex;justify-content:space-between;align-items:center;gap:8px}
.payment-record:last-child{border-bottom:none}
.settings-panel [hidden]{display:none!important}
.settings-panel .btn{min-height:40px}
.set-usage{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.use-cell{border:1px solid var(--hairline);border-radius:10px;padding:10px 8px;text-align:center}
.use-cell b{display:block;font-size:18px;font-weight:800;color:var(--ink)}
.use-cell span{font-size:11px;color:var(--muted)}
.set-orders{font-size:12.5px;color:var(--muted);display:flex;flex-direction:column;gap:6px}
.order-row{display:flex;justify-content:space-between;gap:8px;border-bottom:1px dashed var(--hairline);padding-bottom:6px}
.order-row:last-child{border-bottom:none;padding-bottom:0}
.order-status{font-weight:700}
.order-status.paid{color:#0a7}
.order-status.pending{color:var(--muted)}
.order-status.failed{color:var(--accent)}
.set-msg{min-height:16px;font-size:12.5px;color:var(--muted)}
.set-msg.ok{color:#0a7}
.set-msg.err{color:var(--accent)}
@media(max-width:520px){.set-usage{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){
  .settings-body{padding:14px 16px 18px}
  .settings-panel .btn{min-height:44px}
  .wallet-grid{grid-template-columns:minmax(0,1fr)}
  .wallet-cell{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:4px 12px;padding:12px}
  .wallet-cell b{grid-column:2;grid-row:1;font-size:17px;width:max-content;justify-self:end;text-align:left}
  .wallet-cell span{grid-column:1;grid-row:1;white-space:nowrap}
  .wallet-cell:first-child{grid-template-columns:minmax(0,1fr)}
  .wallet-cell:first-child b{grid-column:1;font-size:22px;width:auto;justify-self:stretch}
  .wallet-cell:first-child span{grid-row:2}
}
