/* swm.css 2026-10-20 big Demo/SCDO switch + fit-to-viewport + short explanation.
   Rollback: /root/backups/wheel-modetabs-20261020/rollback.sh */
#swm-tabs{order:-3;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
#swm-tabs button{min-height:54px;border-radius:14px;border:2px solid #475569;background:#0b1220;color:#cbd5e1;font:900 18px/1.15 system-ui,-apple-system,"PingFang TC","Noto Sans TC",sans-serif;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 10px}
#swm-tabs button .i{font-size:20px}
#swm-tabs button[data-m=demo].on{background:#e2e8f0;border-color:#e2e8f0;color:#0b0f19}
#swm-tabs button[data-m=scdo]{border-color:#f59e0b;color:#fcd34d;background:#1a1405;box-shadow:0 0 14px rgba(245,158,11,.25)}
#swm-tabs button[data-m=scdo].on{background:linear-gradient(180deg,#fcd34d,#f59e0b);color:#1a1000;border-color:#fcd34d;box-shadow:0 0 22px rgba(245,158,11,.45)}
#swm-line{order:-2;display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:4px 10px;font:700 13px/1.35 system-ui,sans-serif;color:#cbd5e1;text-align:center}
#swm-line .k{color:#fff}
#swm-line button{border:0;background:none;color:#7dd3fc;text-decoration:underline;text-underline-offset:2px;font:700 13px/1.3 system-ui,sans-serif;cursor:pointer;padding:0}
#swm-more{order:-1;border:1px solid #475569;background:#0d1322;border-radius:12px;padding:8px 12px;font-size:13px;line-height:1.45;color:#cbd5e1}
#swm-more[hidden]{display:none}
html.swm [data-testid=demo-banner]{display:none!important}
html.swm .swr-seg{opacity:.75;transform:scale(.92);transform-origin:right center}
/* wheel scales with viewport height so SPIN stays on-screen */
html.swm [data-swl=wheel]{width:min(56vh,380px,90vw)!important;max-width:min(56vh,380px,90vw)!important;height:auto!important}
html.swm .swm-max{border-color:#f59e0b!important;color:#fcd34d!important;background:#1a1405!important;font-size:13px!important;min-width:64px}
@media (max-height:950px){
  html.swm [data-swl=sec]{gap:8px!important}
  html.swm [data-swl=sec]>[data-swr=hist]{order:10!important}
  html.swm [data-swl=sec] .swr-coach{display:none!important}
  html.swm [data-swl=sec]>[data-swl=note]{order:10!important}
  html.swm [data-swl=au]{font-size:12px!important;line-height:1.3!important;padding:4px 10px!important}
}
@media (min-width:1024px) and (max-height:950px){
  html.swm .swr-head{flex-direction:row!important;align-items:center;justify-content:space-between;padding-top:4px!important;padding-bottom:4px!important}
  html.swm .swr-row1{order:2;flex:0 0 auto}
  html.swm .swr-title{display:none}
  html.swm .swr-row2{flex:1 1 auto;align-items:center;flex-wrap:nowrap}
  html.swm .swr-bal{display:flex;align-items:baseline;gap:10px}
  html.swm .swr-bal-n{font-size:24px}
  html.swm main[data-swl=main]{display:flex!important;flex-direction:column!important;gap:12px}
  html.swm main>[data-swl=sec]{width:100%;max-width:760px;margin:0 auto}
  html.swm main>aside{order:2;width:100%;max-width:760px;margin:0 auto}
}
@media (max-height:700px){
  html.swm [data-swl=wheel]{width:min(42vh,280px,90vw)!important;max-width:min(42vh,280px,90vw)!important}
  html.swm #swm-tabs button{min-height:48px;font-size:16px}
  html.swm .swr-bal-n{font-size:22px}
}
@media (max-width:639px){
  #swm-tabs button{font-size:15px;min-height:52px;gap:6px;padding:4px 6px}
  #swm-line{font-size:12px}
  html.swm [data-swl=wheel]{width:min(48vh,300px,88vw)!important;max-width:min(48vh,300px,88vw)!important}
  html.swm .swr-title p{display:none}
}
html.swm aside #swo-chip{margin:0 0 4px!important}
/* short screens: hide bulky tip/cat column so wheel+chips+spin fit */
@media (max-height:950px){
  html.swm [data-swl=catcol],
  html.swm [data-testid=cat-open],
  html.swm [data-testid=tip-captain],
  html.swm #swl5-pill{display:none!important}
  html.swm [data-swl=sec]>[data-swr=fair]{order:5!important}
  html.swm [data-swl=sec] [data-swl=wheelcol]{order:4!important}
  html.swm [data-swl=sec]>[data-swl=actions]{order:6!important}
}
@media (max-height:700px){
  html.swm [data-swl=sec]>[data-swr=hist]{display:none!important}
  html.swm [data-swr=fair]{transform:scale(.9);transform-origin:center}
}
html.swm [data-swl=sec]{display:flex!important;flex-direction:column}
html.swm #swm-tabs{order:-30!important}
html.swm #swm-line{order:-29!important}
html.swm #swm-more{order:-28!important}
html.swm [data-swl=sec]>[data-swl=bal],
html.swm [data-swl=sec]>[data-swl=au]{order:-20!important}
html.swm [data-swl=sec] [data-swl=wheelcol]{order:10!important}
html.swm [data-swl=sec]>[data-swr=fair]{order:20!important}
html.swm [data-swl=sec]>[data-swl=actions]{order:30!important}
html.swm [data-swl=sec]>[data-swr=hist]{order:40!important}
html.swm [data-swl=sec] [data-swl=catcol]{order:50!important}
