:root{
  --bg:#070a10; --bg2:#0a0f18; --surface:rgba(15,22,33,.82); --surface-solid:#0f1724;
  --surface2:#121c2a; --line:rgba(180,198,220,.12); --line-gold:rgba(229,184,98,.26);
  --gold:#e8bd72; --gold-bright:#f6d99b; --gold-deep:#b98a44;
  --text:#f0f3f8; --text2:#b6c1d0; --muted:#77849a; --danger:#ff7186; --green:#59d6a3;
  --red:#d94a5f; --blue:#4c74d9;
  --accent:#e8bd72; --radius:18px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;min-height:100vh;background:var(--bg);color:var(--text);
  font-family:"Inter","SF Pro Display","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;font-size:14px;
}
body::before{
  content:"";position:fixed;inset:0;z-index:-3;pointer-events:none;
  background:
    radial-gradient(900px 600px at 8% -8%,rgba(64,93,133,.22),transparent 62%),
    radial-gradient(800px 500px at 100% 0%,rgba(175,126,58,.10),transparent 60%),
    linear-gradient(180deg,#080b12 0%,#070a10 55%,#06090e 100%);
}
.backdrop{position:fixed;inset:0;z-index:-2;overflow:hidden;pointer-events:none}
.grid{
  position:absolute;inset:0;opacity:.22;
  background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
  background-size:72px 72px;
  mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.5) 42%,transparent 88%);
}
.aurora{position:absolute;border-radius:50%;filter:blur(90px);opacity:.26}
.a1{width:440px;height:440px;left:-160px;top:-140px;background:#2f4f7c}
.a2{width:520px;height:520px;right:-220px;top:160px;background:#5b3d1b;opacity:.2}
button,input,select{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
.hidden{display:none!important}
.muted{color:var(--muted)}
.small{font-size:11px}
.warn{color:#e3a68e;font-size:11px;line-height:1.7}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* header */
.top{
  position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:30px;
  padding:16px clamp(18px,3vw,44px);
  background:linear-gradient(180deg,rgba(7,10,16,.94),rgba(7,10,16,.72));
  border-bottom:1px solid rgba(255,255,255,.055);
  backdrop-filter:blur(22px) saturate(140%);
}
.brand{display:flex;align-items:center;gap:12px;min-width:220px}
.brand-mark{position:relative;width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(145deg,#f6d99b,#c08e3e);box-shadow:0 8px 30px rgba(207,158,72,.24);transform:rotate(45deg)}
.brand-mark b{transform:rotate(-45deg);font-family:"Songti SC","Noto Serif SC",serif;font-size:19px;color:#231a0c;font-weight:900}
.brand-copy{display:flex;flex-direction:column;gap:3px}
.brand-copy strong{font-size:17px;letter-spacing:.16em;font-weight:800}
.brand-copy small{font-size:8px;letter-spacing:.34em;color:#8e7550;font-weight:600}
.nav-pill{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.025);margin:0 auto}
.nav{border:0;background:transparent;color:var(--muted);border-radius:9px;padding:9px 22px;font-weight:700;font-size:13px;letter-spacing:.08em;transition:.2s}
.nav:hover{color:var(--text2)}
.nav.active{color:#1e1609;background:linear-gradient(135deg,var(--gold-bright),#d8a951);box-shadow:0 4px 18px rgba(219,169,84,.18)}
.top-right{display:flex;align-items:center;gap:14px;min-width:220px;justify-content:flex-end}
.official{display:flex;align-items:center;gap:7px;color:#7e8ba0;font-size:10px;letter-spacing:.05em;white-space:nowrap}
.official i{width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(89,214,163,.08)}
.version{font-size:10px;color:#907b58;border:1px solid rgba(229,184,98,.16);padding:6px 10px;border-radius:7px;letter-spacing:.06em}

main{max-width:1320px;margin:0 auto;padding:26px clamp(18px,3vw,44px) 90px}
.view{display:none;animation:viewIn .38s ease both}
.view.active{display:block}
@keyframes viewIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* game switch */
.game-switch{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:18px}
.game-tab{
  position:relative;overflow:hidden;display:flex;align-items:center;gap:10px;
  border:1px solid rgba(255,255,255,.07);border-radius:12px;background:rgba(14,21,32,.58);
  color:var(--text2);padding:11px 14px;text-align:left;transition:.2s;
}
.game-tab .glyph{
  display:grid;place-items:center;width:28px;height:28px;border-radius:8px;flex:0 0 auto;
  background:rgba(255,255,255,.05);color:var(--muted);font-family:"Songti SC",serif;font-weight:800;
}
.game-tab .name{display:flex;flex-direction:column;gap:2px;line-height:1.15}
.game-tab .name b{font-size:12.5px;font-weight:700;letter-spacing:.03em}
.game-tab .name small{font-size:8px;letter-spacing:.13em;color:#68758a}
.game-tab:hover{border-color:rgba(255,255,255,.14);transform:translateY(-1px)}
.game-tab.active{border-color:var(--line-gold);background:linear-gradient(135deg,rgba(232,189,114,.14),rgba(232,189,114,.035));color:var(--text)}
.game-tab.active .glyph{background:linear-gradient(140deg,var(--gold-bright),#c79545);color:#22180a}
.game-tab.active:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent)}

/* hero */
.hero{display:grid;grid-template-columns:1.28fr .72fr;gap:16px;margin-bottom:16px}
.hero-copy{
  position:relative;overflow:hidden;padding:clamp(26px,4vw,46px);
  border:1px solid rgba(255,255,255,.075);border-radius:22px;
  background:
    radial-gradient(600px 300px at 0% 0%,rgba(68,100,145,.24),transparent 65%),
    linear-gradient(145deg,rgba(20,31,48,.94),rgba(10,16,25,.97));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 24px 60px rgba(0,0,0,.22);
}
.hero-copy:before{content:"";position:absolute;width:1px;height:120px;left:0;top:38px;background:linear-gradient(180deg,var(--gold),transparent);opacity:.55}
.hero-kicker{display:flex;align-items:center;gap:10px;color:var(--gold);font-size:10px;letter-spacing:.26em;font-weight:700}
.hero-kicker .line{width:30px;height:1px;background:linear-gradient(90deg,var(--gold),transparent)}
.hero h1{
  margin:20px 0 14px;font-family:"Songti SC","Noto Serif SC",serif;
  font-size:clamp(38px,4.4vw,58px);line-height:1.18;letter-spacing:.02em;font-weight:800;
}
.hero h1 em{font-style:normal;background:linear-gradient(100deg,#f9e2b1 5%,#e8bd72 42%,#b98237 92%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 8px 22px rgba(219,169,84,.12))}
.hero-copy>p{margin:0;color:#98a6ba;font-size:12.5px;letter-spacing:.04em}
.hero-meta{display:flex;gap:0;margin:28px 0 26px;border-top:1px solid rgba(255,255,255,.065);border-bottom:1px solid rgba(255,255,255,.065);padding:13px 0}
.hero-meta span{display:flex;align-items:baseline;gap:7px;padding:0 22px;border-right:1px solid rgba(255,255,255,.07)}
.hero-meta span:first-child{padding-left:0}
.hero-meta span:last-child{border-right:0}
.hero-meta b{font-size:21px;color:var(--gold-bright);font-family:"Georgia",serif;font-weight:500}
.hero-meta small{font-size:9px;color:#6f7e92;letter-spacing:.1em}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.btn{
  border:1px solid rgba(255,255,255,.1);border-radius:11px;padding:11px 18px;
  background:rgba(255,255,255,.025);color:var(--text);font-weight:700;font-size:12px;
  transition:transform .18s,background .2s,border-color .2s,box-shadow .2s;
}
.btn:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.05)}
.btn.primary{border:0;background:linear-gradient(135deg,#f8e0ac 0%,#e3b766 55%,#c18e3e 100%);color:#231808;box-shadow:0 10px 30px rgba(219,169,84,.22)}
.btn.primary:hover{box-shadow:0 14px 36px rgba(219,169,84,.3)}
.btn.ghost{background:rgba(255,255,255,.025)}
.btn.large{padding:14px 23px;font-size:13px}
.btn.small{padding:7px 11px;font-size:11px;border-radius:8px}
.btn.danger{color:var(--danger);border-color:rgba(255,113,134,.22)}
.btn:disabled{opacity:.55;cursor:wait;transform:none}
#generateBtn{display:inline-flex;align-items:center;gap:18px}
#generateBtn b{font-size:16px}
.hero-note{display:flex;align-items:center;gap:7px;margin-top:18px;color:#68768a;font-size:10px;letter-spacing:.04em}
.hero-note .spark{color:var(--gold)}
.orbit{position:absolute;right:34px;bottom:4px;width:200px;height:120px;pointer-events:none;opacity:.5}
.orbit:before,.orbit:after{content:"";position:absolute;border:1px solid rgba(232,189,114,.16);border-radius:50%;transform:rotate(-18deg)}
.orbit:before{width:190px;height:76px;right:0;bottom:14px}
.orbit:after{width:140px;height:54px;right:22px;bottom:25px;border-color:rgba(255,255,255,.07)}
.orbit i{position:absolute;border-radius:50%;background:radial-gradient(circle at 34% 26%,#fff4d8,#d6a44d 58%,#8a5d23);box-shadow:0 4px 14px rgba(0,0,0,.3)}
.orbit i:nth-child(1){width:15px;height:15px;right:24px;bottom:52px}
.orbit i:nth-child(2){width:9px;height:9px;right:112px;bottom:42px;opacity:.7}
.orbit i:nth-child(3){width:6px;height:6px;right:78px;bottom:86px;opacity:.5}

/* latest */
.latest-card{
  position:relative;overflow:hidden;min-height:100%;padding:22px;
  border:1px solid rgba(255,255,255,.075);border-radius:22px;
  background:radial-gradient(400px 220px at 100% 0%,rgba(202,153,72,.12),transparent 70%),linear-gradient(160deg,#111a28,#0a1019);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 24px 60px rgba(0,0,0,.2);
  display:flex;flex-direction:column;
}
.latest-card:before{content:"";position:absolute;left:22px;right:22px;top:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.65}
.latest-top{display:flex;align-items:center;gap:10px}
.latest-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.latest-title span:nth-child(2){font-size:10px;letter-spacing:.16em;color:#9b8660;font-weight:700}
.latest-title b{font-size:12px;color:var(--text2);font-weight:600;letter-spacing:.02em}
.live-dot{width:5px;height:5px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 4px rgba(232,189,114,.08)}
.refresh-btn{margin-left:auto;display:flex;align-items:center;gap:5px;border:1px solid rgba(232,189,114,.19);background:rgba(232,189,114,.05);color:#c8a66d;border-radius:8px;padding:5px 9px;font-size:10px}
.refresh-btn:hover{background:rgba(232,189,114,.11);color:var(--gold-bright)}
.refresh-icon{font-size:13px;line-height:1}
.latest-meta{display:flex;align-items:center;gap:8px;margin-top:8px;color:#68768a;font-size:9.5px}
.source-badge{border:1px solid rgba(255,255,255,.09);border-radius:4px;padding:1px 5px;color:#8190a4;font-size:8px}
.latest-balls{display:flex;flex-wrap:wrap;gap:7px;margin:20px 0 16px;align-content:flex-start;flex:1}
.latest-footer{display:flex;align-items:flex-end;gap:8px;border-top:1px solid rgba(255,255,255,.06);padding-top:12px;margin-top:auto}
.latest-footer .muted{font-size:9px;line-height:1.5;max-width:75%}
.latest-deco{margin-left:auto;text-align:right;font-size:8px;line-height:1.4;letter-spacing:.18em;color:rgba(232,189,114,.22);font-family:Georgia,serif}
.skeleton-line{height:32px;width:70%;border-radius:8px;background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.09),rgba(255,255,255,.04));background-size:200% 100%;animation:shimmer 1.4s infinite}
@keyframes shimmer{to{background-position:-200% 0}}

/* balls */
.balls{display:flex;flex-wrap:wrap;gap:6px}
.ball{
  display:inline-grid;place-items:center;border-radius:50%;width:34px;height:34px;
  font-weight:800;font-size:12px;color:#fff;background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.38),transparent 36%),var(--ball,var(--red));
  box-shadow:inset 0 -5px 9px rgba(0,0,0,.2),0 3px 9px rgba(0,0,0,.16);flex:0 0 auto;
}
.ball.blue{background:var(--blue)}.ball.gold{background:var(--gold);color:#201607}
.ball.small{width:29px;height:29px;font-size:10.5px}
.latest-balls .ball{width:32px;height:32px;font-size:11.5px}

/* workspace/panels */
.workspace{display:grid;grid-template-columns:minmax(340px,390px) 1fr;gap:16px;align-items:start}
.panel{
  border:1px solid rgba(255,255,255,.075);border-radius:var(--radius);
  background:linear-gradient(160deg,rgba(17,26,40,.9),rgba(9,15,24,.96));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 18px 50px rgba(0,0,0,.18);
}
.controls-panel{padding:22px}
.results-panel{padding:22px;min-height:420px}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:20px}
.kicker{font-size:8px;letter-spacing:.26em;color:#8b744f;font-weight:700}
.panel-head h2{margin:6px 0 0;font-family:"Songti SC","Noto Serif SC",serif;font-size:20px;letter-spacing:.06em}
.pill{font-size:9px;color:#caa76b;border:1px solid rgba(232,189,114,.18);background:rgba(232,189,114,.05);padding:5px 9px;border-radius:99px;white-space:nowrap;letter-spacing:.05em}
.result-summary{font-size:10px;color:#78869a;text-align:right}

/* form */
.field{margin:14px 0}
.field>label{display:flex;justify-content:space-between;align-items:center;color:#aeb9c8;font-size:11px;font-weight:600;margin-bottom:7px;letter-spacing:.03em}
.field>label span{color:#637187;font-size:9px;font-weight:400}
.field input,.field select{
  width:100%;background:#080e17;border:1px solid rgba(255,255,255,.09);color:var(--text);
  border-radius:9px;padding:10px 12px;outline:none;font-size:12px;transition:.2s;
}
.field input:hover,.field select:hover{border-color:rgba(255,255,255,.16)}
.field input:focus,.field select:focus{border-color:rgba(232,189,114,.45);box-shadow:0 0 0 3px rgba(232,189,114,.06)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{
  border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.02);color:#9eacbe;
  border-radius:7px;padding:7px 10px;font-size:11px;font-weight:600;transition:.18s;
}
.chip:hover{border-color:rgba(255,255,255,.2);color:var(--text2)}
.chip.active{color:#201607;border-color:transparent;background:linear-gradient(135deg,var(--gold-bright),#d5a650);box-shadow:0 4px 16px rgba(219,169,84,.16)}
.hint{color:#66758a;font-size:9.5px;line-height:1.65;margin:6px 0}
.inline{display:flex;gap:6px;align-items:center}.inline input{min-width:0}
.step-box{display:grid;grid-template-columns:84px 1fr;gap:8px;align-items:center;margin-top:8px}
.step-box input{margin:0}
.control-actions{border-top:1px solid rgba(255,255,255,.06);margin-top:18px;padding-top:16px}

/* results */
.results{display:flex;flex-direction:column;gap:10px;max-height:640px;overflow:auto;padding-right:5px}
.results::-webkit-scrollbar,.history-list::-webkit-scrollbar{width:5px}
.results::-webkit-scrollbar-thumb,.history-list::-webkit-scrollbar-thumb{background:#29364a;border-radius:9px}
.empty{border:1px dashed rgba(255,255,255,.11);border-radius:14px;padding:58px 20px;text-align:center;color:#69778b;display:flex;flex-direction:column;align-items:center;gap:7px}
.empty b{color:#9daabd;font-size:13px;font-weight:600}.empty small{font-size:10px}
.empty-mark{font-size:22px;color:rgba(232,189,114,.55);margin-bottom:4px}
.ticket{
  position:relative;border:1px solid rgba(255,255,255,.075);background:linear-gradient(160deg,#0d1623,#0a111b);
  border-radius:12px;padding:13px 14px;transition:.2s;
}
.ticket:hover{border-color:rgba(232,189,114,.18);transform:translateY(-1px)}
.ticket-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ticket-top b{font-size:11px;letter-spacing:.03em}
.ticket-top .alg{font-size:9px;color:#d1ac6d;border:1px solid rgba(232,189,114,.17);border-radius:5px;padding:2px 6px;background:rgba(232,189,114,.04)}
.ticket-top .meta{color:#68768a;font-size:9px;margin-left:auto}
.ticket-balls{margin:11px 0 9px;gap:5px}
.ticket-actions{display:flex;gap:6px;justify-content:flex-end}
.ticket-actions .btn{background:transparent;border-color:transparent;color:#78869a;padding:5px 7px;font-size:9px}
.ticket-actions .btn:hover{color:var(--gold);background:rgba(232,189,114,.05)}

/* history */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:8px 0 22px}
.page-head h1{margin:8px 0 4px;font-family:"Songti SC","Noto Serif SC",serif;font-size:34px;letter-spacing:.04em}
.page-head p{margin:0;color:#718096;font-size:11px}
.history-filter{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}
.stats-line{display:flex;gap:26px;flex-wrap:wrap;border:1px solid rgba(255,255,255,.075);background:rgba(15,23,35,.6);border-radius:12px;padding:15px 18px;color:#8d9bb0;font-size:11px;margin-bottom:14px}
.stats-line b{color:var(--gold-bright);font-size:16px;margin-left:5px;font-family:Georgia,serif;font-weight:500}
.history-list{display:flex;flex-direction:column;gap:9px}
.history-group{border:1px solid rgba(255,255,255,.075);background:rgba(13,21,32,.76);border-radius:12px;overflow:hidden;transition:.2s}
.history-group:hover{border-color:rgba(255,255,255,.13)}
.history-sum{display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;flex-wrap:wrap}
.history-sum b{font-size:12px}
.history-sum .muted{font-size:9.5px}
.history-sum .pill{margin-left:0}
.history-body{padding:2px 16px 14px;border-top:1px solid rgba(255,255,255,.05)}
.history-body .ticket{border:0;background:transparent;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.045);border-radius:0}
.history-body .ticket:last-of-type{border-bottom:0}

/* packages */
.package-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.package-card{
  position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.075);border-radius:16px;
  background:linear-gradient(160deg,#101a29,#0a111b);padding:20px;display:flex;flex-direction:column;gap:10px;
}
.package-card:hover{border-color:rgba(232,189,114,.2)}
.package-card:before{content:"";position:absolute;width:120px;height:120px;border:1px solid rgba(232,189,114,.09);border-radius:50%;right:-50px;top:-50px}
.package-card h4{margin:0;font-family:"Songti SC",serif;font-size:18px;color:var(--gold-bright);letter-spacing:.05em}
.package-card p{margin:0;color:#78869a;font-size:10px;line-height:1.7;min-height:34px}
.package-card .price{font-family:Georgia,serif;font-size:34px;color:#f2e6d1;line-height:1;margin-top:4px}
.package-card .price small{font-family:inherit;font-size:10px;color:#77849a;letter-spacing:.1em}
.package-card .btn{margin-top:auto}
#packageResult .panel{margin-top:18px}

/* modal */
.modal{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:20px;background:rgba(3,6,11,.76);backdrop-filter:blur(9px);animation:fadeIn .22s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal-card{position:relative;width:min(760px,100%);max-height:90vh;overflow:auto;border:1px solid rgba(232,189,114,.18);border-radius:20px;background:linear-gradient(160deg,#111b2a,#0a111b);padding:30px;box-shadow:0 40px 100px rgba(0,0,0,.5)}
.modal-close{position:absolute;right:16px;top:12px;width:30px;height:30px;border:0;background:transparent;color:#6e7c90;font-size:24px;line-height:1}
.modal-close:hover{color:var(--text)}
.modal-head h2{margin:9px 0 6px;font-family:"Songti SC","Noto Serif SC",serif;font-size:25px;letter-spacing:.04em}
.modal-head p{margin:0;color:#748298;font-size:10px;line-height:1.7}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}
.form-grid label{font-size:10px;color:#9ba8ba;display:flex;flex-direction:column;gap:6px;font-weight:600}
.form-grid input,.form-grid select{background:#080e17;border:1px solid rgba(255,255,255,.1);color:var(--text);border-radius:8px;padding:10px;outline:none}
.form-grid input:focus,.form-grid select:focus{border-color:rgba(232,189,114,.4)}
.modal-actions{justify-content:flex-end}
.bazi-result{margin-top:18px;border:1px solid rgba(255,255,255,.075);border-radius:12px;background:#09111c;padding:16px;line-height:1.9;font-size:11.5px;color:#b3c0d0}
.bazi-result b{color:var(--gold-bright)}
.toast{position:fixed;left:50%;bottom:30px;transform:translate(-50%,18px);z-index:90;max-width:90vw;padding:11px 20px;border:1px solid rgba(232,189,114,.22);border-radius:9px;background:#182333;color:#ece6d8;font-size:11px;opacity:0;pointer-events:none;transition:.22s;box-shadow:0 14px 40px rgba(0,0,0,.3)}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* responsive */
@media(max-width:1100px){
  .hero{grid-template-columns:1fr .8fr}.hero h1{font-size:40px}
  .game-switch{grid-template-columns:repeat(5,1fr)}.game-tab{padding:10px}
}
@media(max-width:900px){
  .top{gap:12px;padding:12px 16px;flex-wrap:wrap}
  .brand{min-width:0}.brand-copy strong{font-size:15px}.brand-copy small{display:none}
  .top-right{min-width:0}.official{display:none}
  .nav-pill{order:3;width:100%;margin-top:4px;justify-content:center}
  .nav{flex:1;padding:8px 10px}
  main{padding:18px 14px 70px}
  .hero{grid-template-columns:1fr}.hero-copy{padding:26px}.hero h1{font-size:36px}
  .latest-card{min-height:220px}.orbit{display:none}
  .game-switch{grid-template-columns:repeat(6,minmax(0,1fr));overflow:auto}
  .game-tab{grid-column:span 2}.game-tab:nth-child(4),.game-tab:nth-child(5){grid-column:span 3}
  .workspace{grid-template-columns:1fr}.results-panel{min-height:0}
  .results{max-height:none;padding-right:0}
  .package-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  body{font-size:13px}.brand-mark{width:37px;height:37px;border-radius:11px}
  .hero-copy{padding:22px}.hero h1{font-size:31px}.hero-meta span{padding:0 12px}.hero-meta b{font-size:18px}
  .latest-card{padding:18px}.latest-balls .ball{width:29px;height:29px;font-size:10.5px}
  .workspace{gap:12px}.controls-panel,.results-panel{padding:17px}
  .game-switch{grid-template-columns:repeat(2,1fr);overflow:visible}.game-tab{grid-column:span 1!important}
  .game-tab:nth-child(5){grid-column:span 2!important}
  .package-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}
  .page-head h1{font-size:27px}.stats-line{gap:16px}.history-sum{gap:8px}
  .modal-card{padding:22px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* ── refinement layer ───────────────────────────────────────── */
.nav svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;opacity:.8}
.nav{display:inline-flex;align-items:center;gap:7px}
.nav.active svg{opacity:1}
.game-tab{--tab-accent:var(--accent);padding:12px 14px;gap:11px}
.game-code{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;flex:0 0 auto;font-family:"SFMono-Regular",Consolas,monospace;font-size:9px;letter-spacing:.06em;color:#8b99ac;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.06);transition:.2s}
.game-tab .name small{color:#627086}
.game-tab .tab-arrow{margin-left:auto;color:#5b687b;font-size:13px;transition:.2s}
.game-tab:hover .tab-arrow{color:#aeb9c8;transform:translate(1px,-1px)}
.game-tab.active{--tab-accent:var(--accent);border-color:color-mix(in srgb,var(--tab-accent) 35%,transparent);background:linear-gradient(135deg,color-mix(in srgb,var(--tab-accent) 14%,transparent),rgba(255,255,255,.02))}
.game-tab.active .game-code{color:#160f07;background:linear-gradient(145deg,#f8e3b4,var(--tab-accent));border-color:transparent;font-weight:800}
.game-tab.active .tab-arrow{color:var(--tab-accent)}
.game-tab.active:after{background:linear-gradient(90deg,transparent,var(--tab-accent),transparent)}
.hero-kicker{color:var(--accent)}
.hero-kicker .line{background:linear-gradient(90deg,var(--accent),transparent)}
.hero h1 em{background:linear-gradient(100deg,#f9e2b1 5%,var(--gold) 42%,#a97a35 92%);-webkit-background-clip:text;background-clip:text}
.live-dot{background:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 10%,transparent)}
.latest-card:before{background:linear-gradient(90deg,transparent,var(--accent),transparent)}
.refresh-btn:hover{color:var(--accent)}
.chip.active{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 85%,#fff 15%),color-mix(in srgb,var(--accent) 72%,#000 28%));color:#1b1308;border-color:transparent;box-shadow:0 4px 16px color-mix(in srgb,var(--accent) 18%,transparent)}
.text-btn{display:flex;align-items:center;gap:7px;border:0;background:transparent;color:#9c865f;font-size:10px;padding:5px 0;font-weight:600;letter-spacing:.02em}
.text-btn span{transition:.2s}.text-btn:hover{color:var(--gold-bright)}.text-btn:hover span{transform:translateX(3px)}
.control-section{border-top:1px solid rgba(255,255,255,.06);padding-top:15px;margin-top:15px}
.control-section:first-child{border-top:0;padding-top:0;margin-top:0}
.control-section.compact{padding-top:13px}
.section-label{display:flex;align-items:center;gap:8px;margin-bottom:13px}
.section-label span{display:grid;place-items:center;width:19px;height:19px;border:1px solid rgba(232,189,114,.2);border-radius:5px;color:#b08e55;font-family:Georgia,serif;font-size:9px}
.section-label b{font-size:10px;letter-spacing:.12em;color:#aeb9c8;font-weight:700}
.section-label i{margin-left:auto;color:#566274;font-size:7px;letter-spacing:.24em;font-style:normal}
.qty-stepper{display:grid;grid-template-columns:38px 1fr 38px;height:39px;border:1px solid rgba(255,255,255,.09);border-radius:9px;overflow:hidden;background:#080e17}
.qty-stepper button{border:0;background:transparent;color:#9aa8ba;font-size:17px;line-height:1;transition:.16s}
.qty-stepper button:hover{background:rgba(232,189,114,.08);color:var(--gold-bright)}
.qty-stepper input{border:0!important;border-left:1px solid rgba(255,255,255,.07)!important;border-right:1px solid rgba(255,255,255,.07)!important;border-radius:0!important;text-align:center;font-family:Georgia,serif;font-size:16px;padding:0!important;background:transparent!important;color:#f1e8d8}
.qty-stepper input:focus{box-shadow:none!important}
.mini-field{position:relative;display:flex;flex-direction:column;gap:5px}
.mini-field small{font-size:9px;color:#7d8b9f;padding-left:2px}
.mini-field input{font-family:Georgia,serif;font-size:18px;padding:9px 12px!important;color:var(--gold-bright)}
.mini-field em{position:absolute;right:10px;bottom:13px;font-size:8px;color:#5f6c80;font-style:normal}
.positional-note{display:flex;flex-direction:column;gap:4px;border:1px dashed rgba(255,255,255,.1);border-radius:9px;padding:12px 13px;background:rgba(255,255,255,.015)}
.positional-note b{font-size:11px;color:#c3cedd}.positional-note span{font-size:9px;color:#78869a}.positional-note small{font-size:8px;color:#5e6b7e}
.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.mode-card{display:flex;align-items:center;gap:9px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:#080e17;padding:10px;text-align:left;transition:.18s}
.mode-card:hover{border-color:rgba(255,255,255,.17)}
.mode-card.active{border-color:color-mix(in srgb,var(--accent) 40%,transparent);background:color-mix(in srgb,var(--accent) 7%,#080e17)}
.mode-icon{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;border:1px solid rgba(255,255,255,.1);color:#8492a6;font-size:13px;flex:0 0 auto}
.mode-card.active .mode-icon{border-color:color-mix(in srgb,var(--accent) 45%,transparent);color:var(--accent)}
.mode-card span:last-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.mode-card b{font-size:10px;color:#c6d1df}.mode-card small{font-size:8px;color:#657287;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mode-card.active b{color:#f3e6cf}
.step-row{display:flex;align-items:center;gap:8px;margin-top:8px;background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.06);border-radius:8px;padding:7px 9px}
.step-row label{font-size:9px;color:#7d8b9f}.step-row input{width:62px;border:1px solid rgba(255,255,255,.09);background:#080e17;color:var(--gold-bright);border-radius:6px;padding:5px 7px;font-family:Georgia,serif;font-size:12px;text-align:center}
.step-row span{font-size:9px;color:#8c99ab}.step-row small{margin-left:auto;font-size:8px;color:#5e6b7e}
.setting-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.018);border-radius:9px;padding:9px 10px;margin-bottom:6px;transition:.18s}
.setting-row:hover{background:rgba(232,189,114,.045);border-color:rgba(232,189,114,.16)}
.setting-icon{display:grid;place-items:center;width:26px;height:26px;border-radius:7px;background:rgba(232,189,114,.06);color:#b79a68;font-size:12px;flex:0 0 auto}
.setting-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.setting-copy b{font-size:10px;color:#c3cedd;font-weight:600}.setting-copy small{font-size:8px;color:#657287;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.setting-arrow{margin-left:auto;color:#5f6c80;font-size:17px;line-height:1}
.footnote{font-size:8px;color:#586477;line-height:1.7;margin:10px 0 0}
.ticket{padding-left:50px}
.ticket-index{position:absolute;left:13px;top:13px;display:grid;place-items:center;width:25px;height:25px;border-radius:7px;border:1px solid rgba(232,189,114,.16);background:rgba(232,189,114,.045);color:#b99a66;font-family:Georgia,serif;font-size:9px}
.ticket-top b{font-size:11px;color:#dfe6ef}
.ticket-top .meta{font-size:9px}
.ticket-actions .btn{letter-spacing:.02em}
.history-sum .caret{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;background:rgba(255,255,255,.035);color:#8090a4;font-size:12px;transition:.2s;margin-left:4px}
.history-group.open .caret{transform:rotate(180deg)}
.package-card{min-height:210px}
.package-card .tag{position:absolute;right:14px;top:14px;font-size:8px;color:#c09a5d;border:1px solid rgba(232,189,114,.2);padding:3px 6px;border-radius:99px;letter-spacing:.08em}
.package-card.popular{border-color:rgba(232,189,114,.28);background:radial-gradient(300px 120px at 100% 0%,rgba(232,189,114,.1),transparent 70%),linear-gradient(160deg,#111b29,#0a111b)}
:focus-visible{outline:2px solid rgba(232,189,114,.55);outline-offset:2px}
@media(max-width:900px){.game-code{width:30px;height:30px}.game-tab .tab-arrow{display:none}.nav svg{width:13px;height:13px}}
@media(max-width:560px){.mode-grid{grid-template-columns:1fr}.qty-stepper{height:42px}.ticket{padding-left:45px}.ticket-index{left:11px;width:23px;height:23px}}
.history-body .ticket{padding-left:14px}
.history-body .ticket .ticket-index{display:none}
.package-card .btn span{transition:.2s}.package-card .btn:hover span{transform:translateX(3px)}

/* ── PC redesign: larger type, no latest draw ───────────────── */
body{font-size:16px}
main{max-width:1480px;padding:30px clamp(24px,3.4vw,54px) 100px}
.top{padding:18px clamp(24px,3.4vw,54px)}
.brand-copy strong{font-size:19px}
.nav{font-size:14px;padding:10px 24px}
.nav svg{width:15px;height:15px}
.official,.version{font-size:11px}
.game-switch{gap:10px;margin-bottom:22px}
.game-tab{padding:14px 16px}
.game-tab .name b{font-size:14px}
.game-tab .name small{font-size:9.5px}
.game-code{width:38px;height:38px;font-size:10px}
.hero{grid-template-columns:1.42fr .68fr;gap:18px;margin-bottom:18px}
.hero-copy{padding:clamp(32px,4.2vw,54px);min-height:430px;display:flex;flex-direction:column;justify-content:center}
.hero-kicker{font-size:11px}
.hero h1{font-size:clamp(44px,4.6vw,64px);margin:22px 0 16px}
.hero-copy>p{font-size:14px}
.hero-meta{margin:30px 0 28px;padding:16px 0}
.hero-meta b{font-size:24px}.hero-meta small{font-size:10.5px}
.btn{font-size:14px;padding:12px 20px}.btn.large{padding:16px 26px;font-size:15px}
.hero-note{font-size:11px;margin-top:22px}
.guide-card{
  position:relative;overflow:hidden;padding:28px;border:1px solid rgba(255,255,255,.08);border-radius:22px;
  background:radial-gradient(360px 240px at 100% 0%,rgba(232,189,114,.11),transparent 70%),linear-gradient(160deg,#111b28,#0a1018);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 24px 60px rgba(0,0,0,.2);display:flex;flex-direction:column;
}
.guide-card:before{content:"";position:absolute;left:28px;right:28px;top:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.55}
.guide-top{display:flex;align-items:center;justify-content:space-between}
.guide-badge{font-family:Consolas,monospace;font-size:9px;letter-spacing:.15em;color:#9d875f;border:1px solid rgba(232,189,114,.16);padding:4px 7px;border-radius:5px}
.guide-card h2{margin:18px 0 22px;font-family:"Songti SC","Noto Serif SC",serif;font-size:30px;line-height:1.35;letter-spacing:.03em}
.guide-card h2 em{font-style:normal;color:var(--gold)}
.steps{display:flex;flex-direction:column;gap:14px}
.step{display:flex;gap:12px;align-items:flex-start}
.step>span{display:grid;place-items:center;width:28px;height:28px;border:1px solid rgba(232,189,114,.18);border-radius:8px;color:#c09c64;font-family:Georgia,serif;font-size:10px;flex:0 0 auto}
.step b{font-size:13px;color:#d9e1ec;font-weight:600}
.step p{margin:4px 0 0;font-size:11px;line-height:1.65;color:#758399}
.guide-bottom{display:flex;gap:16px;flex-wrap:wrap;border-top:1px solid rgba(255,255,255,.07);margin-top:auto;padding-top:16px}
.guide-bottom span{font-size:10px;color:#6d7b90;display:flex;align-items:baseline;gap:5px}
.guide-bottom b{font-family:Georgia,serif;font-size:18px;color:var(--gold-bright);font-weight:500}
.guide-note{margin-top:12px;font-size:9.5px;color:#5a6679;line-height:1.6}
.workspace{grid-template-columns:minmax(400px,440px) 1fr;gap:18px}
.controls-panel{padding:26px 26px 24px}
.results-panel{padding:26px;min-height:520px}
.panel-head{margin-bottom:22px}
.panel-head h2{font-size:24px}
.kicker{font-size:9px}
.pill{font-size:10px;padding:6px 10px}
.field>label{font-size:13px;margin-bottom:8px}
.field>label span{font-size:10.5px}
.field input,.field select{font-size:14px;padding:12px 13px;border-radius:10px}
.chip{font-size:13px;padding:9px 12px;border-radius:8px}
.hint{font-size:11px;line-height:1.7}
.section-label{margin-bottom:16px}
.section-label b{font-size:12px}
.section-label span{width:23px;height:23px;font-size:10px}
.section-label i{font-size:8px}
.qty-stepper{height:46px;grid-template-columns:44px 1fr 44px}
.qty-stepper input{font-size:20px}
.mini-field small{font-size:11px}.mini-field input{font-size:21px}.mini-field em{font-size:9.5px}
.mode-card{padding:12px}.mode-card b{font-size:12px}.mode-card small{font-size:9.5px}.mode-icon{width:30px;height:30px}
.step-row label{font-size:11px}.step-row input{font-size:14px;width:70px}.step-row span{font-size:11px}
.setting-copy b{font-size:12px}.setting-copy small{font-size:9.5px}
.setting-row{padding:11px}.setting-icon{width:30px;height:30px;font-size:14px}
.footnote{font-size:9.5px}
.text-btn{font-size:12px}
.result-summary{font-size:12px}
.empty b{font-size:15px}.empty small{font-size:12px}
.ticket{padding:15px 16px 15px 56px}
.ticket-index{width:29px;height:29px;font-size:10px;left:15px;top:15px}
.ticket-top b{font-size:13px}.ticket-top .alg{font-size:10px}.ticket-top .meta{font-size:11px}
.ball{width:36px;height:36px;font-size:13px}
.ball.small{width:31px;height:31px;font-size:12px}
.ticket-actions .btn{font-size:10.5px;padding:6px 9px}
.page-head h1{font-size:40px}.page-head p{font-size:13px}
.stats-line{font-size:13px;padding:17px 20px}.stats-line b{font-size:19px}
.history-sum{padding:16px 18px}.history-sum b{font-size:14px}.history-sum .muted{font-size:11px}
.history-body{padding:4px 18px 16px}
.package-card{padding:24px;min-height:240px}.package-card h4{font-size:21px}.package-card p{font-size:12px}
.package-card .price{font-size:40px}.package-card .btn{font-size:13px;padding:11px 14px}
.form-grid label{font-size:12px}.form-grid input,.form-grid select{font-size:14px;padding:12px}
.bazi-result{font-size:13px}.modal-head h2{font-size:29px}.modal-head p{font-size:12px}
@media(min-width:1100px){
  .controls-panel{position:sticky;top:100px}
  .results{max-height:calc(100vh - 280px)}
}
@media(max-width:1100px){
  .hero{grid-template-columns:1.25fr .75fr}.hero h1{font-size:44px}.guide-card h2{font-size:26px}
  .workspace{grid-template-columns:minmax(340px,390px) 1fr}
}
@media(max-width:900px){
  .guide-card{min-height:0;padding:24px}.guide-card h2{font-size:27px}
  .hero-copy{min-height:0}.guides{display:none}
  .workspace{grid-template-columns:1fr}.controls-panel{position:static;padding:20px}.results-panel{padding:20px}
  body{font-size:15px}
  .hero h1{font-size:40px}.hero-copy{padding:28px}
  .game-tab{padding:11px 12px}.game-tab .name b{font-size:13px}
}
@media(max-width:560px){
  .guide-card{display:none}.hero-copy{padding:24px}.hero h1{font-size:34px}
  .hero-meta b{font-size:20px}.hero-meta small{font-size:9px}
  .controls-panel,.results-panel{padding:17px}.panel-head h2{font-size:21px}
  .field>label{font-size:12px}.chip{font-size:12px;padding:8px 10px}
  .ticket{padding:13px 13px 13px 47px}.ticket-index{left:11px;top:13px;width:24px;height:24px}
  .ball{width:32px;height:32px;font-size:12px}.ball.small{width:28px;height:28px;font-size:11px}
}
/* readable-text pass */
.kicker,.eyebrow{font-size:10.5px;letter-spacing:.2em}
.game-tab .name small{font-size:10.5px}
.game-tab .name b{font-size:14px}
.hero-kicker{font-size:11.5px}
.hero-copy>p{font-size:14.5px;line-height:1.8}
.hero-note{font-size:12px;line-height:1.7}
.hero-meta small{font-size:11px}
.btn.small{font-size:12px}
.pill{font-size:11px}
.field>label{font-size:13.5px}
.field>label span{font-size:11.5px}
.hint{font-size:12px}
.text-btn{font-size:12.5px}
.mode-card b{font-size:12.5px}
.mode-card small{font-size:10.5px}
.step-row label,.step-row span{font-size:11.5px}
.mode-card small{white-space:normal;line-height:1.4}
.setting-copy b{font-size:12.5px}
.setting-copy small{font-size:10.5px}
.footnote{font-size:11px}
.result-summary{font-size:12.5px}
.ticket-top b{font-size:13.5px}
.ticket-top .alg{font-size:11px}
.ticket-top .meta{font-size:12px}
.ticket-actions .btn{font-size:11.5px}
.history-sum b{font-size:14px}
.history-sum .muted{font-size:12px}
.history-body .ticket-top .meta{font-size:11.5px}
.guide-badge{font-size:10px}
.step b{font-size:13.5px}
.step p{font-size:12px}
.guide-bottom span{font-size:11px}
.guide-note{font-size:10.5px}
.latest-meta,.latest-footer .muted{font-size:11px}
.small{font-size:12px}
.muted{font-size:inherit}
/* ── readability: final pass ─────────────────────────────────── */
body{font-size:17px;line-height:1.65}
.nav{font-size:15px;padding:11px 24px}
.brand-copy strong{font-size:20px}
.brand-copy small{font-size:9.5px}
.official,.version{font-size:12px}
.game-tab .name b{font-size:15.5px}
.game-tab .name small{font-size:12px;line-height:1.4}
.game-tab .name{gap:3px}
.game-code{font-size:10.5px}
.hero-kicker{font-size:13px;letter-spacing:.18em}
.hero-copy>p{font-size:16px;line-height:1.8;color:#a3b2c6}
.hero-note{font-size:13px;line-height:1.8;color:#7f8da2}
.hero-meta small{font-size:12px}
.hero-meta b{font-size:25px}
.btn{font-size:15px;line-height:1.3}
.btn.large{font-size:16px}
.btn.small{font-size:13px;padding:8px 12px}
.kicker,.eyebrow{font-size:11px;letter-spacing:.18em}
.panel-head h2{font-size:26px}
.panel-head .pill{font-size:12px;padding:7px 11px}
.field{margin:16px 0}
.field>label{font-size:15px;font-weight:600;margin-bottom:9px}
.field>label span{font-size:12.5px}
.field input,.field select{font-size:15px;line-height:1.5}
.chip{font-size:14px;padding:10px 13px;line-height:1.4}
.hint{font-size:13px;line-height:1.8;color:#8492a6}
.section-label{margin-bottom:15px}
.section-label b{font-size:13.5px}
.section-label i{font-size:9px}
.section-label span{font-size:10.5px}
.section-label{margin-bottom:15px}
.mini-field small{font-size:12px}
.mini-field em{font-size:11px}
.mode-card{padding:14px 13px;align-items:flex-start;gap:10px}
.mode-icon{width:34px;height:34px;font-size:15px;margin-top:1px}
.mode-card b{font-size:14.5px;line-height:1.35}
.mode-card small{font-size:12.5px;line-height:1.55;color:#8492a6;white-space:normal}
.mode-card span:last-child{gap:3px}
.step-row{padding:9px 11px}
.step-row label,.step-row span{font-size:12.5px}
.step-row input{font-size:15px;width:76px}
.setting-row{padding:12px 13px;gap:12px}
.setting-copy b{font-size:14px}
.setting-copy small{font-size:12px;line-height:1.5}
.setting-icon{width:34px;height:34px;font-size:15px}
.setting-arrow{font-size:20px}
.text-btn{font-size:13.5px}
.footnote{font-size:12px;line-height:1.8;color:#69778c}
.guide-card h2{font-size:33px}
.step{border:0;padding:0;background:none;gap:13px}
.step>span{width:31px;height:31px;font-size:11px}
.step b{font-size:15px;line-height:1.4}
.step p{font-size:14px;line-height:1.75;color:#8998ad;margin-top:3px}
.steps{gap:16px}
.guide-bottom span{font-size:12.5px}
.guide-note{font-size:12px;line-height:1.7}
.result-summary{font-size:14px}
.empty b{font-size:16px}.empty small{font-size:13px}
.ticket-top b{font-size:14.5px}
.ticket-top .alg{font-size:12px;padding:3px 7px}
.ticket-top .meta{font-size:13px}
.ticket-actions .btn{font-size:12.5px;padding:7px 9px}
.ball{width:38px;height:38px;font-size:14px}
.ball.small{width:33px;height:33px;font-size:12.5px}
.page-head h1{font-size:42px}
.page-head p{font-size:14px}
.stats-line{font-size:14px}
.stats-line b{font-size:20px}
.history-sum b{font-size:15px}
.history-sum .muted{font-size:13px}
.history-body .ticket-top .meta{font-size:12.5px}
.package-card p{font-size:13.5px;line-height:1.8}
.package-card h4{font-size:22px}
.package-card .btn{font-size:14px}
.form-grid label{font-size:13px}
.form-grid input,.form-grid select{font-size:15px}
.modal-head p{font-size:13px;line-height:1.8}
.bazi-result{font-size:14px;line-height:2}
.warn{font-size:12.5px}
@media(max-width:900px){
  body{font-size:16px}
  .field>label{font-size:14px}
  .mode-card b{font-size:14px}.mode-card small{font-size:12px}
  .guide-card h2{font-size:28px}
  .step p{font-size:13.5px}
  .ticket-top .meta{font-size:12px}
}
@media(max-width:560px){
  body{font-size:16px}
  .hero-copy>p{font-size:14px}.hero-note{font-size:12px}
  .field>label{font-size:13.5px}.field>label span{font-size:11.5px}
  .chip{font-size:13px;padding:9px 11px}
  .mode-card b{font-size:13.5px}.mode-card small{font-size:12px}
  .ticket-top b{font-size:13.5px}.ticket-top .meta{font-size:12px}
  .ticket-actions .btn{font-size:12px}
  .ball{width:34px;height:34px;font-size:13px}.ball.small{width:30px;height:30px;font-size:12px}
}
/* ── PC scale & disclaimer emphasis ─────────────────────────── */
body{font-size:18px}
main{max-width:1560px;padding:34px clamp(28px,3.6vw,60px) 44px}
.top{padding:20px clamp(28px,3.6vw,60px)}
.brand-copy strong{font-size:21px;letter-spacing:.18em}
.brand-copy small{font-size:10px;letter-spacing:.3em}
.nav{font-size:15.5px;padding:12px 27px}
nav.nav-pill{padding:5px}
.official,.version{font-size:12.5px}
.version{padding:8px 12px}
.game-switch{gap:11px;margin-bottom:24px}
.game-tab{padding:16px 17px;border-radius:13px}
.game-code{width:41px;height:41px;font-size:11px;border-radius:10px}
.game-tab .name b{font-size:16.5px}
.game-tab .name small{font-size:12.5px}
.game-tab .tab-arrow{font-size:16px}
.hero{grid-template-columns:1.5fr .64fr;gap:20px;margin-bottom:20px}
.hero-copy{padding:clamp(38px,4.4vw,62px);min-height:500px;border-radius:24px}
.hero-kicker{font-size:13.5px}
.hero h1{font-size:clamp(50px,4.9vw,72px);line-height:1.14;margin:24px 0 18px}
.hero-copy>p{font-size:17px;line-height:1.8}
.hero-meta{padding:18px 0;margin:32px 0 30px}
.hero-meta b{font-size:29px}.hero-meta small{font-size:13px}
.btn{font-size:16px;padding:13px 22px;border-radius:12px}
.btn.large{padding:17px 29px;font-size:17px}
.hero-note{margin-top:24px;padding:11px 14px;border-left:2px solid var(--gold);border-radius:0 8px 8px 0;background:rgba(232,189,114,.045);color:#b9c4d3;font-size:13px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;line-height:1.7}
.hero-note span{color:#8a97aa}
.hero-note strong,.guide-note strong,.footnote strong,.warn strong,.site-footer strong{color:#f0c876;font-weight:800;letter-spacing:.02em}
.guide-card{padding:34px;border-radius:24px}
.guide-badge{font-size:10.5px;padding:5px 8px}
.guide-card h2{font-size:38px;line-height:1.3;margin:20px 0 26px}
.steps{gap:19px}
.step>span{width:34px;height:34px;font-size:11.5px;border-radius:9px}
.step b{font-size:16px;line-height:1.45}
.step p{font-size:15px;line-height:1.8;margin-top:4px}
.guide-bottom{gap:18px;padding-top:18px;margin-top:26px}
.guide-bottom span{font-size:13.5px}.guide-bottom b{font-size:22px}
.guide-note{margin-top:15px;padding-top:14px;border-top:1px solid rgba(232,189,114,.14);font-size:13px;line-height:1.75}
.workspace{grid-template-columns:minmax(430px,470px) 1fr;gap:20px}
.controls-panel,.results-panel{padding:30px}
.results-panel{min-height:600px}
.panel-head{margin-bottom:26px}
.panel-head h2{font-size:28px}
.kicker{font-size:12px}
.pill{font-size:12.5px;padding:7px 12px}
.field{margin:18px 0}.field>label{font-size:16px;margin-bottom:9px}.field>label span{font-size:13px}
.field input,.field select{font-size:16px;padding:13px 14px;border-radius:11px}
.chip{font-size:15px;padding:11px 14px;border-radius:9px}
.hint{font-size:14px;line-height:1.8}
.section-label{margin-bottom:17px}.section-label b{font-size:15px}.section-label span{width:25px;height:25px;font-size:11.5px}.section-label i{font-size:9.5px}
.qty-stepper{height:49px;grid-template-columns:48px 1fr 48px}.qty-stepper input{font-size:22px}
.mini-field small{font-size:13px}.mini-field input{font-size:23px}.mini-field em{font-size:11.5px}
.mode-card{padding:15px 14px;gap:11px;border-radius:11px}.mode-icon{width:37px;height:37px;font-size:17px}
.mode-card b{font-size:16px;line-height:1.4}.mode-card small{font-size:13.5px;line-height:1.6}
.step-row label,.step-row span{font-size:13px}.step-row input{font-size:16px;width:82px}
.setting-row{padding:13px;border-radius:11px}.setting-icon{width:37px;height:37px;font-size:17px}
.setting-copy b{font-size:15px}.setting-copy small{font-size:13px}
.text-btn{font-size:14.5px}.footnote{font-size:13px;line-height:1.8;padding-top:12px;border-top:1px solid rgba(255,255,255,.055)}
.result-summary{font-size:15px}
.empty b{font-size:18px}.empty small{font-size:14px}
.ticket{padding:17px 17px 17px 62px;border-radius:14px}.ticket-index{width:32px;height:32px;left:16px;top:16px;font-size:11px}
.ticket-top b{font-size:16px}.ticket-top .alg{font-size:13px;padding:3px 8px}.ticket-top .meta{font-size:14px}
.ticket-actions .btn{font-size:13.5px;padding:8px 10px}
.ball{width:41px;height:41px;font-size:15px}.ball.small{width:36px;height:36px;font-size:13.5px}
.page-head h1{font-size:48px}.page-head p{font-size:15px}
.stats-line{font-size:15px;padding:19px 22px}.stats-line b{font-size:22px}
.history-sum{padding:18px 20px}.history-sum b{font-size:16px}.history-sum .muted{font-size:14px}
.history-body .ticket-top .meta{font-size:13.5px}
.package-card{padding:27px;min-height:260px}.package-card h4{font-size:24px}.package-card p{font-size:14.5px;line-height:1.85}.package-card .price{font-size:44px}
.package-card .btn{font-size:15px;padding:12px 15px}
.form-grid label{font-size:14px}.form-grid input,.form-grid select{font-size:16px;padding:13px}
.modal-head h2{font-size:32px}.modal-head p{font-size:14px;line-height:1.8}.modal-card{padding:34px}
.bazi-result{font-size:15px;line-height:2}.warn{font-size:14px;line-height:1.8}
.site-footer{
  max-width:1560px;margin:0 auto;padding:22px clamp(28px,3.6vw,60px) 38px;
  display:flex;align-items:center;gap:18px;flex-wrap:wrap;border-top:1px solid rgba(232,189,114,.12);
}
.footer-mark{font-family:Consolas,monospace;font-size:10px;letter-spacing:.24em;color:#7d6c4f}
.site-footer strong{font-size:15px;flex:1;min-width:280px}
.footer-side{font-size:12px;color:#6e7b8f;letter-spacing:.08em}
@media(max-width:1100px){
  main,.site-footer{padding-left:24px;padding-right:24px}
  .hero{grid-template-columns:1.3fr .7fr}.hero h1{font-size:48px}.guide-card h2{font-size:30px}
  .workspace{grid-template-columns:390px 1fr}.controls-panel,.results-panel{padding:22px}
  .game-tab .name b{font-size:14.5px}.game-tab .name small{font-size:11px}.game-code{width:35px;height:35px}
}
@media(max-width:900px){
  body{font-size:17px}
  main{padding-top:20px}.hero{grid-template-columns:1fr}.hero-copy{min-height:0;padding:30px}
  .hero h1{font-size:42px}.hero-copy>p{font-size:15px}
  .hero-meta b{font-size:23px}.hero-note{font-size:12.5px}
  .guide-card{display:none}.game-switch{grid-template-columns:repeat(6,minmax(0,1fr))}
  .site-footer{padding:18px 20px 30px}.site-footer strong{font-size:13px}
  .workspace{grid-template-columns:1fr}.controls-panel{position:static;padding:22px}.results-panel{padding:22px}
}
@media(max-width:560px){
  body{font-size:16px}.hero h1{font-size:35px}.hero-copy{padding:23px}
  .hero-meta span{padding:0 10px}.hero-meta b{font-size:20px}
  .game-tab .name b{font-size:14px}.game-tab .name small{font-size:11px}.game-code{width:32px;height:32px}
  .controls-panel,.results-panel{padding:18px}.panel-head h2{font-size:23px}
  .field>label{font-size:14px}.field>label span{font-size:12px}.chip{font-size:13.5px}
  .mode-card b{font-size:14px}.mode-card small{font-size:12.5px}
  .ticket{padding:14px 14px 14px 50px}.ticket-top b{font-size:14px}.ticket-top .meta{font-size:12.5px}
  .ball{width:35px;height:35px;font-size:13px}.ball.small{width:31px;height:31px;font-size:12px}
  .site-footer{gap:8px}.site-footer strong{font-size:12.5px}
}
/* estimate + responsibility */
.estimate-bar{
  margin-top:16px;padding:16px 18px;border:1px solid rgba(232,189,114,.24);border-radius:13px;
  background:linear-gradient(135deg,rgba(232,189,114,.11),rgba(232,189,114,.035));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.estimate-main{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}
.estimate-label{font-size:12.5px;color:#a99470;font-weight:600;letter-spacing:.08em}
.estimate-main strong{font-family:Georgia,serif;font-size:30px;line-height:1;color:#f7dca3;font-weight:500}
.estimate-main em{font-style:normal;font-size:12.5px;color:#a99470}
.estimate-price{margin-left:auto;display:flex;align-items:baseline;gap:6px}
.estimate-price strong{color:#fff0ce}
.estimate-bar small{display:block;margin-top:7px;color:#9b8a6d;font-size:11.5px}
.site-footer{border-top:1px solid rgba(232,189,114,.2);background:linear-gradient(90deg,transparent,rgba(232,189,114,.035),transparent)}
.site-footer .footer-side{
  display:inline-flex;align-items:center;gap:9px;font-size:16px;font-weight:800;color:#f6d99b;
  border:1px solid rgba(232,189,114,.32);background:rgba(232,189,114,.08);
  padding:9px 16px;border-radius:999px;letter-spacing:.06em;
}
.site-footer .footer-side i{color:var(--gold);font-style:normal;font-size:10px}
.site-footer strong{font-size:15px}
@media(max-width:560px){
  .estimate-main strong{font-size:26px}.estimate-bar{padding:14px}
  .site-footer .footer-side{font-size:14px;padding:8px 13px}
}
/* ── mobile redesign ─────────────────────────────────────────── */
@media(max-width:680px){
  html{scroll-padding-top:120px}
  body{font-size:16px;overflow-x:hidden}
  .top{
    position:sticky;top:0;display:grid;grid-template-columns:1fr auto;gap:10px;
    padding:11px 14px 10px;align-items:center;
  }
  .brand{grid-column:1;grid-row:1;min-width:0;gap:9px}
  .brand-mark{width:36px;height:36px;border-radius:10px}
  .brand-mark b{font-size:16px}
  .brand-copy strong{font-size:16px;letter-spacing:.12em}
  .brand-copy small{display:none}
  .top-right{grid-column:2;grid-row:1;min-width:0;justify-content:flex-end}
  .official{display:none}
  .version{font-size:10.5px;padding:5px 8px}
  .nav-pill{
    grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,1fr);
    width:100%;margin:2px 0 0;padding:4px;border-radius:11px;
  }
  .nav{display:flex;justify-content:center;align-items:center;gap:6px;padding:9px 6px;font-size:13.5px;border-radius:8px}
  .nav svg{width:14px;height:14px}
  main{padding:12px 12px 30px;max-width:100%}
  .game-switch{
    display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;margin:0 -12px 12px;
    padding:2px 12px 7px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;
  }
  .game-switch::-webkit-scrollbar{display:none}
  .game-tab{
    flex:0 0 142px;min-width:142px;padding:10px 11px;gap:9px;border-radius:12px;
    scroll-snap-align:start;
  }
  .game-code{width:32px;height:32px;font-size:9px;border-radius:8px}
  .game-tab .name b{font-size:13.5px;white-space:nowrap}
  .game-tab .name small{font-size:10px;white-space:nowrap}
  .game-tab .tab-arrow{display:none}
  .hero{display:block;margin-bottom:12px}
  .hero-copy{
    min-height:0;padding:23px 20px 21px;border-radius:18px;
  }
  .hero-kicker{font-size:11px;letter-spacing:.13em}
  .hero h1{font-size:34px;line-height:1.24;margin:15px 0 11px}
  .hero-copy>p{font-size:13.5px;line-height:1.7;max-width:95%}
  .hero-meta{margin:18px 0 17px;padding:12px 0;display:grid;grid-template-columns:repeat(3,1fr)}
  .hero-meta span{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:0 10px;border-right:1px solid rgba(255,255,255,.08)}
  .hero-meta span:first-child{padding-left:0}
  .hero-meta span:last-child{border-right:0}
  .hero-meta b{font-size:20px;line-height:1.1}
  .hero-meta small{font-size:9.5px;white-space:nowrap}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:0}
  .hero-actions .btn{width:100%;min-height:47px;padding:11px 9px;font-size:14px}
  #generateBtn{grid-column:1/-1;justify-content:center;font-size:15px}
  #saveAllBtn{grid-column:1/-1}
  .hero-note{padding:9px 10px;font-size:11.5px;line-height:1.7;gap:5px;margin-top:14px}
  .hero-note strong{display:block;width:100%;padding-left:18px}
  .orbit{display:none}
  .guide-card{display:none}
  .workspace{display:block}
  .panel,.controls-panel,.results-panel{width:100%;padding:16px;border-radius:16px}
  .results-panel{margin-top:12px;min-height:0}
  .panel-head{margin-bottom:17px;align-items:flex-start}
  .panel-head h2{font-size:22px;margin-top:4px}
  .kicker{font-size:10px;letter-spacing:.17em}
  .pill{font-size:10.5px;padding:5px 8px}
  .result-summary{font-size:12px;max-width:48%;line-height:1.5}
  .field{margin:14px 0}
  .field>label{font-size:13.5px;margin-bottom:7px}
  .field>label span{font-size:11px}
  .field input,.field select{font-size:16px;padding:11px 12px}
  .qty-stepper{height:44px;grid-template-columns:44px 1fr 44px}
  .qty-stepper input{font-size:19px}
  .chips{gap:5px}
  .chip{font-size:13px;padding:8px 10px}
  .hint{font-size:11.5px;line-height:1.65}
  .section-label{margin-bottom:13px}
  .section-label b{font-size:12.5px}
  .section-label span{width:22px;height:22px;font-size:9.5px}
  .section-label i{font-size:8px}
  .two{gap:8px}
  .mini-field small{font-size:11px}
  .mini-field input{font-size:19px;padding:9px 11px!important}
  .mini-field em{font-size:9px;bottom:12px;right:8px}
  .mode-grid{grid-template-columns:1fr 1fr;gap:7px}
  .mode-card{padding:11px 10px;gap:8px;border-radius:9px}
  .mode-icon{width:29px;height:29px;font-size:14px}
  .mode-card b{font-size:13px;line-height:1.35}
  .mode-card small{font-size:11px;line-height:1.45}
  .step-row{padding:8px 9px;flex-wrap:wrap}
  .step-row label,.step-row span{font-size:11px}
  .step-row input{font-size:15px;width:68px}
  .setting-row{padding:10px;gap:9px}
  .setting-icon{width:31px;height:31px;font-size:14px}
  .setting-copy b{font-size:12.5px}.setting-copy small{font-size:11px;white-space:normal;line-height:1.45}
  .text-btn{font-size:12px}
  .footnote{font-size:11px;line-height:1.7}
  .estimate-bar{padding:13px;margin-top:13px}
  .estimate-label{font-size:11px}
  .estimate-main strong{font-size:26px}
  .estimate-main em{font-size:11px}
  .estimate-price{margin-left:auto}
  .estimate-bar small{font-size:10.5px}
  .results{gap:8px;max-height:none;overflow:visible;padding-right:0}
  .empty{padding:34px 14px}.empty b{font-size:15px}.empty small{font-size:11.5px}
  .ticket{padding:12px 12px 12px 45px;border-radius:11px}
  .ticket-index{left:10px;top:12px;width:24px;height:24px;font-size:9px}
  .ticket-top{gap:5px}
  .ticket-top b{font-size:12.5px}
  .ticket-top .alg{font-size:10px;padding:2px 5px}
  .ticket-top .meta{width:100%;margin-left:0;font-size:10.5px;line-height:1.5}
  .ticket-balls{gap:5px;margin:9px 0 6px}
  .ball{width:33px;height:33px;font-size:12px}
  .ball.small{width:29px;height:29px;font-size:11px}
  .ticket-actions{justify-content:flex-start;gap:2px;margin-top:2px}
  .ticket-actions .btn{font-size:11px;padding:6px 7px}
  .page-head{display:block;margin:2px 0 16px}
  .page-head h1{font-size:29px;margin:6px 0 4px}
  .page-head p{font-size:12px;line-height:1.6}
  .page-head .btn{margin-top:12px}
  .history-filter{overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px;margin-bottom:11px}
  .history-filter .chip{flex:0 0 auto}
  .stats-line{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:12px;font-size:11px;margin-bottom:11px}
  .stats-line span{display:flex;flex-direction:column;gap:2px}
  .stats-line b{font-size:17px;margin-left:0}
  .history-sum{padding:12px;gap:6px;align-items:flex-start}
  .history-sum b{width:calc(100% - 34px);font-size:13px;line-height:1.5}
  .history-sum .muted{font-size:10.5px;line-height:1.5}
  .history-sum .pill{font-size:9.5px;padding:4px 6px}
  .history-sum .caret{position:absolute;right:12px;margin-top:2px}
  .history-group{position:relative}
  .history-body{padding:2px 12px 12px}
  .history-body .ticket{padding-left:0;padding-right:0}
  .package-grid{grid-template-columns:1fr;gap:10px}
  .package-card{min-height:0;padding:18px}
  .package-card h4{font-size:19px}.package-card p{font-size:12.5px;min-height:0}
  .package-card .price{font-size:36px}
  .package-card .btn{font-size:13px;padding:11px}
  .modal{padding:0;align-items:end}
  .modal-card{width:100%;max-height:92vh;border-radius:18px 18px 0 0;padding:22px 18px 26px}
  .modal-head h2{font-size:24px}
  .modal-head p{font-size:11.5px;line-height:1.65}
  .form-grid{grid-template-columns:1fr;gap:9px;margin:15px 0}
  .form-grid label{font-size:11.5px}
  .form-grid input,.form-grid select{font-size:16px;padding:10px}
  .modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .modal-actions .btn{width:100%}
  .bazi-result{font-size:12.5px;line-height:1.9;padding:13px}
  .warn{font-size:12px;line-height:1.7}
  .site-footer{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:18px 16px 28px;margin-top:8px}
  .site-footer strong{font-size:12.5px;flex:none;line-height:1.6}
  .footer-mark{font-size:9px}
  .site-footer .footer-side{font-size:14px;padding:8px 13px;margin-top:2px}
  .footer-side{width:auto}
}
@media(max-width:390px){
  .hero h1{font-size:31px}
  .game-tab{flex-basis:132px;min-width:132px}
  .hero-meta b{font-size:18px}
  .hero-meta small{font-size:9px}
  .mode-grid{grid-template-columns:1fr}
  .mode-card{padding:11px 12px}
  .ticket-top .meta{font-size:10px}
  .ball{width:31px;height:31px;font-size:11.5px}
  .ball.small{width:27px;height:27px;font-size:10.5px}
}
