:root{font-family:Inter,'Malgun Gothic',system-ui,sans-serif;color:#183246;background:#f3f6f9;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}button:disabled{cursor:wait;opacity:.5}button:focus-visible,a:focus-visible{outline:3px solid #46c0bf;outline-offset:3px}input,select,textarea{border:1px solid #d3dee6;border-radius:7px;padding:11px;background:#fff;max-width:100%;color:#183246}textarea{width:100%;min-height:340px;font-family:monospace;font-size:13px}label{display:grid;gap:7px;font-size:13px;color:#526b7b}h1,h2,h3,p{margin-top:0}h1{font-size:27px;letter-spacing:-1px;margin-bottom:9px}h2{font-size:17px}h3{font-size:15px}p{line-height:1.7}.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}.sidebar{background:#102a3b;color:#9cb0be;padding:30px 18px;position:fixed;inset:0 auto 0 0;width:230px;display:flex;flex-direction:column}.brand{color:#fff;font-size:23px;font-weight:800;letter-spacing:-1px;padding:0 14px 30px}.brand span{color:#55d5c2}.eyebrow{font-size:10px;letter-spacing:2px;color:#7390a1;margin:12px 14px}.nav{display:grid;gap:5px}.nav button{background:transparent;color:#a9bdca;text-align:left;padding:12px 14px;border-radius:7px;font-size:13px}.nav button.active{color:#76e3d1;background:#1c4350}.nav button:hover{background:#1a3b4e}.sidefoot{margin-top:auto;font-size:11px;line-height:1.8;padding:15px;border-top:1px solid #244252}.main{grid-column:2;min-width:0}.topbar{height:77px;border-bottom:1px solid #dde5eb;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 40px;font-size:12px;color:#637c8b}.topbar strong{color:#253e4e}.content{padding:33px 40px;max-width:1600px;margin:auto}.heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:12px}.sub{color:#788e9d;font-size:13px;margin:0}.pill{font-size:11px;padding:6px 10px;border-radius:5px;color:#187e6d;background:#e5f6f0;white-space:nowrap}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px}.card{border:1px solid #e0e8ee;border-radius:12px;background:#fff;padding:23px;box-shadow:0 3px 8px #16314403}.stat small{color:#7d909e;font-size:12px}.stat strong{display:block;font-size:27px;letter-spacing:-1px;margin:15px 0}.stat .foot{font-size:11px;color:#219583}.grid{display:grid;grid-template-columns:1.65fr 1fr;gap:23px;margin-bottom:24px}.cardhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.cardhead h2{margin:0}.muted{font-size:12px;color:#8b9dab}.chart{width:100%;height:210px}.chart text{font-size:10px;fill:#8a9aa7}.chart .line{stroke:#22aa97;fill:none;stroke-width:3}.chart .axis{stroke:#eaf0f4}.legend{display:flex;gap:18px;font-size:11px;color:#79919e;margin-top:12px}.dot{color:#21a998}.row{display:flex;justify-content:space-between;align-items:center;padding:13px 0;border-bottom:1px solid #eef2f5;gap:10px;font-size:13px}.row:last-child{border:0}.row strong{font-weight:600}.actions{display:flex;flex-wrap:wrap;gap:9px}.btn{padding:10px 15px;border-radius:6px;background:#183d50;color:white;font-size:12px}.btn.primary{background:#168b79}.btn.light{background:#edf3f6;color:#3e596b}.btn.danger{background:#a84932}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:12px}th{text-align:left;color:#7a8f9d;font-weight:500;background:#f7f9fb;padding:13px}td{padding:14px 13px;border-bottom:1px solid #edf2f5}td.name{font-weight:600}.badge{display:inline-block;background:#eef4f8;color:#57758a;border-radius:5px;padding:5px 8px;font-size:10px}.badge.green{background:#e7f6ef;color:#20876c}.badge.amber{background:#fff4de;color:#a57820}.form{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;align-items:end;margin-bottom:24px}.form .wide{grid-column:1/-1}.form button{height:42px}.empty{text-align:center;padding:45px;color:#8495a1;font-size:13px}.login{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:#fff}.login-brand{background:#102e40;color:white;padding:12vh 10%;display:flex;flex-direction:column;justify-content:center}.login-brand h1{font-size:48px;line-height:1.25;margin-top:70px}.login-brand p{color:#a6bdcb;max-width:380px}.login-box{display:grid;place-content:center;padding:35px}.login-box form{display:grid;gap:19px;min-width:310px;max-width:400px}.login-box h1{font-size:25px}.login-box .btn{padding:15px}.demo-note{background:#f3f7f9;padding:14px;border-radius:8px;font-size:11px;line-height:1.9;color:#637b89}.tree{display:grid;gap:8px}.node{background:#f5f8fa;border-left:3px solid #29a38f;padding:12px;font-size:12px}.depth1{margin-left:20px}.depth2{margin-left:40px}.depth3{margin-left:60px}.depth4{margin-left:80px}.depth5{margin-left:100px}progress{width:100%;height:11px;accent-color:#199a87}.big{font-size:36px;letter-spacing:-1px}pre{white-space:pre-wrap;font-size:12px;line-height:1.8;overflow-wrap:anywhere}.mobile-only{display:none}#toast{position:fixed;bottom:25px;right:25px;max-width:460px;padding:14px 22px;background:#183b4d;color:white;border-radius:8px;box-shadow:0 5px 25px #0002;z-index:20;display:none}#toast.show{display:block}.note{font-size:12px;line-height:1.8;color:#647f90;margin:15px 0}.preview-total{background:#e8f6f1;border-radius:10px;padding:20px;margin:20px 0}.member .stats{grid-template-columns:repeat(3,1fr)}.member .content{max-width:1100px}.spacer{height:20px}.footer{font-size:10px;color:#8ca0ad;margin:25px 0}.check{display:flex;align-items:center;gap:8px}.check input{width:18px;height:18px}
@media(max-width:1100px){.stats{grid-template-columns:repeat(2,1fr)}.content{padding:25px}.topbar{padding:0 25px}.grid{grid-template-columns:1fr}.form{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.shell{display:block}.sidebar{position:static;width:auto;padding:20px 15px}.brand{padding:0 0 18px;font-size:21px}.eyebrow,.sidefoot{display:none}.nav{display:flex;overflow:auto;gap:5px;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav button{white-space:nowrap;padding:10px}.topbar{height:55px;padding:0 18px}.content{padding:22px 16px}.heading{align-items:start;flex-wrap:wrap}.heading>div{width:100%}h1{font-size:23px}.stats,.member .stats{grid-template-columns:repeat(2,1fr);gap:10px}.stat{padding:16px}.stat strong{font-size:23px}.grid{gap:15px}.card{padding:17px}.login{grid-template-columns:1fr}.login-brand{padding:35px}.login-brand h1{font-size:28px;margin-top:10px}.login-brand p{margin-bottom:0}.login-box{padding:30px 20px}.form{grid-template-columns:1fr}.node{margin-left:0}.depth1{margin-left:8px}.depth2{margin-left:16px}.depth3{margin-left:24px}.depth4{margin-left:32px}.depth5{margin-left:40px}.big{font-size:29px}#toast{left:15px;right:15px;bottom:15px}}
.shell{display:block}
.sidebar{position:static;inset:auto;width:100%;padding:20px 40px 0;display:block}
.sidebar .brand{padding:0;font-size:23px}
.sidebar .eyebrow,.sidebar .sidefoot{display:none}
.nav{display:flex;flex-wrap:wrap;gap:4px 6px;margin-top:18px;padding-bottom:12px}
.nav button{white-space:nowrap;padding:11px 14px;text-align:center}
.main{width:100%}
@media(max-width:720px){
 .sidebar{padding:20px 16px 0}
 .nav{flex-wrap:nowrap;overflow-x:auto;margin-top:15px;padding-bottom:12px;scrollbar-width:none}
 .nav button{flex:0 0 auto;padding:10px 12px}
}
.plan-form{display:grid;gap:20px}
.plan-intro,.plan-save{display:flex;align-items:center;justify-content:space-between;gap:18px}
.plan-intro h2{font-size:21px;margin-bottom:5px}
.plan-intro .note{margin:0}

.plan-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}
.plan-fields .wide{grid-column:1/-1}
.plan-fields input:not([type=checkbox]),.plan-fields select{width:100%}
.plan-fields .check{min-height:40px}
.rollup-grid{display:grid;grid-template-columns:70px repeat(3,minmax(0,1fr));gap:15px;align-items:center}
.rollup-grid label,.rank-condition-grid label{font-size:11px}
.rank-condition-grid{display:grid;grid-template-columns:65px repeat(4,minmax(0,1fr));gap:14px;align-items:center;font-size:12px;overflow:auto}
.tier-row{display:grid;grid-template-columns:1fr .8fr 1fr 1.3fr 1.5fr auto;gap:12px;align-items:end;padding:18px 0;border-bottom:1px solid #e6eef2}
.plan-notes{min-height:95px;font:inherit}
.plan-save{position:sticky;bottom:0;background:#fff;border:1px solid #dae6e9;border-radius:10px;padding:17px 22px;box-shadow:0 -4px 18px #132e3b09;z-index:2;font-size:12px;color:#647f90}
@media(max-width:1000px){.tier-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.plan-fields{grid-template-columns:1fr}.rollup-grid{grid-template-columns:45px repeat(3,minmax(85px,1fr));overflow:auto}.rank-condition-grid{grid-template-columns:45px repeat(4,110px)}.tier-row{grid-template-columns:1fr 1fr}.plan-intro,.plan-save{align-items:stretch;flex-direction:column}.plan-save{gap:10px}.plan-fields .wide{min-width:0}}
.package-grid{display:grid;grid-template-columns:75px repeat(3,minmax(0,1fr));gap:16px;align-items:center;font-size:12px;overflow:auto}
.tier-row{grid-template-columns:repeat(4,minmax(0,1fr));background:#f8fbfc;padding:18px;border:1px solid #dfebf0;border-radius:9px;margin-bottom:12px}
@media(max-width:720px){.package-grid{grid-template-columns:65px repeat(3,140px)}.tier-row{grid-template-columns:1fr 1fr}}
@font-face{font-family:'Noto Sans KR';src:local('Noto Sans KR'),url('/hybrid/fonts/NotoSansKR-VF.ttf') format('truetype');font-style:normal;font-weight:100 900;font-display:swap}
:root{font-family:'Noto Sans KR',sans-serif;font-size:13px;line-height:1.45}
input,button,select,textarea,pre{font-family:inherit}
[hidden]{display:none!important}
.sidebar{padding:10px 24px 0}
.sidebar .brand{font-size:20px;line-height:1.25}
.nav{margin-top:6px;padding-bottom:6px;gap:2px 4px}
.nav button{padding:6px 9px;font-size:12px;min-height:30px}
.topbar{height:42px;padding:0 24px;font-size:11px}
.content{padding:16px 24px;max-width:1800px}
.heading{margin-bottom:12px;gap:8px}
h1{font-size:22px;margin-bottom:4px;letter-spacing:-.6px}
h2{font-size:15px;margin-bottom:8px}
h3{font-size:13px;margin-bottom:7px}
p{line-height:1.45}
.sub{font-size:12px}
.card{padding:14px;border-radius:9px}
.cardhead{margin-bottom:10px}
.stats{gap:12px;margin-bottom:14px}
.stat strong{font-size:24px;margin:8px 0}
.grid{gap:14px;margin-bottom:14px}
.chart{height:145px}
.row{padding:8px 0;font-size:12px}
.btn{padding:7px 12px;font-size:12px;min-height:32px}
input,select,textarea{font-size:12px;padding:6px 9px;border-radius:5px}
input:not([type=checkbox]),select{min-height:32px}
label{font-size:12px;gap:4px}
.form{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 12px;margin-bottom:14px}
.form button{height:32px}
th,td{padding:7px 10px}
th{position:sticky;top:0;z-index:1}
.tablewrap{max-height:calc(100dvh - 270px)}
.badge{padding:3px 6px}
.note{font-size:11px;line-height:1.45;margin:5px 0 10px}
.legend{margin-top:6px}
.spacer{height:10px}
.footer{margin:10px 0;font-size:10px}
.plan-form{gap:10px}
.plan-intro{gap:12px}
.plan-intro h2{font-size:17px;margin-bottom:3px}
.plan-fields{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 14px}
.plan-fields .check{min-height:32px}
.package-grid{grid-template-columns:60px repeat(3,minmax(0,1fr));gap:6px 12px}
.rollup-grid{grid-template-columns:55px repeat(3,minmax(0,1fr));gap:6px 12px}
.rank-condition-grid{grid-template-columns:55px repeat(4,minmax(0,1fr));gap:6px 10px}
.tier-row{grid-template-columns:1fr .7fr 1fr 1.2fr 1.2fr .7fr .85fr auto;gap:7px;padding:9px;margin-bottom:6px}
.tier-row label{font-size:11px}
#plan-tiers{max-height:calc(100dvh - 375px);overflow:auto;min-height:40px}
.plan-notes{min-height:70px}
.plan-save{padding:9px 14px;font-size:11px;gap:12px}
.plan-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:#e7eef3;border-radius:7px}
.plan-tabs button{background:transparent;color:#567183;padding:6px 10px;font-size:11px;border-radius:5px;min-height:30px;white-space:nowrap}
.plan-tabs button.active{background:#fff;color:#147c6c;box-shadow:0 1px 4px #18324615;font-weight:700}
.plan-tabs button:hover{background:#f6fafc}
@media(min-width:1450px){.form{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1000px){.form,.plan-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.tier-row{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:720px){
 .sidebar{padding:10px 14px 0}.sidebar .brand{font-size:19px}.nav{margin-top:6px;padding-bottom:6px}.nav button{padding:6px 9px}
 .topbar{height:40px;padding:0 14px}.content{padding:12px 14px}.heading{gap:6px}h1{font-size:21px}.heading>div{width:auto;flex:1;min-width:190px}
 .form,.plan-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.card{padding:12px}.stats{gap:8px}.stat strong{font-size:22px}
 .package-grid{grid-template-columns:50px repeat(3,125px)}.rollup-grid{grid-template-columns:42px repeat(3,95px)}.rank-condition-grid{grid-template-columns:45px repeat(4,110px)}
 .tier-row{grid-template-columns:1fr 1fr}.plan-intro{flex-direction:row;align-items:center}.plan-intro>div{flex:1}.plan-intro .btn{max-width:140px}
 .plan-tabs{flex-wrap:nowrap;overflow:auto;scrollbar-width:none}.plan-tabs button{flex:0 0 auto;padding:7px 10px}
 .plan-save{flex-direction:row;align-items:center}.plan-save>span{flex:1}#plan-tiers{max-height:calc(100dvh - 330px)}
 .check{font-size:11px}.login-box{padding:24px 18px}.login-box form{min-width:0;width:100%}
}
@media(min-width:721px){
 .plan-form>[role=tabpanel]{max-height:calc(100dvh - 345px);overflow:auto}
 #plan-tiers{max-height:none;overflow:visible}
 .plan-form:has(.plan-tabs button:last-child.active)>[role=tabpanel]{max-height:none;overflow:visible}
}
@media(min-width:721px) and (max-height:800px){
 .sidebar{padding-top:8px}.sidebar .brand{font-size:18px}.nav button{min-height:28px;padding-top:5px;padding-bottom:5px}
 .topbar{height:36px}.content{padding-top:10px;padding-bottom:10px}.heading{margin-bottom:8px}
 .card{padding:12px}.plan-form{gap:8px}.plan-fields{gap:7px 12px}.package-grid{gap:4px 10px}
 .package-grid label{font-size:11px;gap:2px}.plan-intro h2{margin-bottom:2px}.note{margin-bottom:7px}
 .plan-save{padding:6px 12px}.footer{margin:6px 0}.plan-tabs{padding:4px}
}
.shell:not(.member){min-width:1100px}
.plan-overview-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:repeat(4,minmax(110px,1fr));gap:8px;height:calc(100dvh - 380px);min-height:464px}
.plan-overview-grid>.card{grid-column:span 4;margin:0;padding:10px;min-width:0;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#b9ccd7 transparent}
.plan-overview-grid>[data-plan-section="3"],.plan-overview-grid>[data-plan-section="9"],.plan-overview-grid>[data-plan-section="12"],.plan-overview-grid>[data-plan-section="13"]{grid-column:span 3}
.plan-overview-grid>[data-plan-section="4"],.plan-overview-grid>[data-plan-section="5"],.plan-overview-grid>[data-plan-section="6"]{grid-column:span 2}
.plan-overview-grid [data-plan-section="10"]{grid-column:span 6;grid-row:4}
.plan-overview-grid>[data-plan-section="9"]{grid-row:2;grid-column:10/span 3}
.plan-overview-grid>[data-plan-section="11"]{grid-row:3;grid-column:9/span 4}
.plan-overview-grid>[data-plan-section="12"]{grid-row:4;grid-column:7/span 3}
.plan-overview-grid>[data-plan-section="13"]{grid-row:4;grid-column:10/span 3}
.plan-overview-grid h2{font-size:13px;margin:0 0 7px;line-height:1.4}
.plan-overview-grid h3{font-size:11px;margin:4px 0}
.plan-overview-grid .note{display:none}
.plan-overview-grid .plan-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 8px}
.plan-overview-grid label{font-size:11px;gap:3px;min-width:0}
.plan-overview-grid input:not([type=checkbox]),.plan-overview-grid select{height:28px;min-height:28px;padding:3px 5px;font-size:11px;width:100%;min-width:0}
.plan-overview-grid .check{font-size:11px;line-height:1.4;gap:5px}
.plan-overview-grid .package-grid{grid-template-columns:42px repeat(3,minmax(0,1fr));gap:5px;font-size:10px}
.plan-overview-grid .package-grid label,.plan-overview-grid .rollup-grid label,.plan-overview-grid .rank-condition-grid label{font-size:0;gap:0}
.plan-overview-grid .rollup-grid{grid-template-columns:36px repeat(3,minmax(0,1fr));gap:5px;font-size:10px}
.plan-overview-grid .rank-condition-grid{grid-template-columns:30px repeat(4,minmax(0,1fr));gap:5px;font-size:10px}
.plan-overview-grid .tier-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:7px;margin:0 0 6px}
.plan-overview-grid .btn{font-size:10px;padding:4px 7px;min-height:28px}
.plan-overview-grid .plan-notes{min-height:48px;height:48px;font-size:11px}
.plan-overview .plan-save{position:static}
.plan-overview .plan-tabs{padding:0;background:transparent;border:0}
.plan-overview .plan-intro .note{margin-bottom:0}
.plan-overview-grid>[data-plan-section="0"]{grid-row:1;grid-column:1/span 4}
.plan-overview-grid>[data-plan-section="1"]{grid-row:1;grid-column:5/span 3}
.plan-overview-grid>[data-plan-section="2"]{grid-row:1;grid-column:8/span 2}
.plan-overview-grid>[data-plan-section="3"]{grid-row:1;grid-column:10/span 3}
.plan-overview-grid>[data-plan-section="1"] .plan-fields,
.plan-overview-grid>[data-plan-section="2"] .plan-fields,
.plan-overview-grid>[data-plan-section="3"] .plan-fields{grid-template-columns:minmax(0,1fr)}
.plan-overview-grid>[data-plan-section="4"]{grid-row:2;grid-column:1/span 3}
.plan-overview-grid>[data-plan-section="5"]{grid-row:2;grid-column:4/span 3}
.plan-overview-grid>[data-plan-section="6"]{grid-row:2;grid-column:7/span 3}
.plan-overview-grid>[data-plan-section="6"]{grid-column:4/span 3}
.plan-overview-grid>[data-plan-section="9"]{grid-column:7/span 3}
.plan-overview-grid>[data-plan-section="5"]{grid-column:10/span 3}
.plan-overview-grid>[data-plan-section="4"] .plan-fields,
.plan-overview-grid>[data-plan-section="6"] .plan-fields,
.plan-overview-grid>[data-plan-section="9"] .plan-fields{grid-template-columns:minmax(0,1fr)}
.plan-overview-grid>[data-plan-section="5"] .plan-fields{gap:3px 8px;align-items:start}
.plan-overview-grid>[data-plan-section="5"] .check{min-height:20px;margin:0;padding:0;line-height:1.2;gap:5px}
.plan-overview-grid>[data-plan-section="5"] input[type=checkbox]{width:14px;height:14px;min-height:14px;margin:0;flex:0 0 14px}
.member-portal{background:#eaf0f4}
.shell.member{width:100%;max-width:480px;margin:0 auto;min-height:100dvh;background:#f3f6f9;box-shadow:0 0 25px #173b5010}
.member .sidebar{padding:14px 18px;position:sticky;top:0;z-index:5}
.member .sidebar .brand{font-size:21px}
.member .nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;margin:0;padding:6px 5px max(10px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;background:#fff;border-top:1px solid #dce6eb;box-shadow:0 -3px 15px #16374c08;z-index:10;overflow:visible}
.member .nav button{color:#6b8391;background:transparent;font-size:11px;white-space:normal;min-height:42px;padding:6px 2px;border-radius:7px}
.member .nav button.active{color:#147f6d;background:#e5f4ef;font-weight:700}
.member .topbar{height:40px;padding:0 16px}
.member .content{padding:18px 16px 90px;width:100%;min-width:0}
.member .heading{align-items:start;flex-wrap:wrap;gap:8px}
.member .heading>div{min-width:0;width:100%}
.member h1{font-size:23px}
.member h2{font-size:16px}
.member .sub{font-size:12px}
.member .card{padding:15px;margin-bottom:14px}
.member .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}
.member .stat{margin-bottom:0}
.member .stat:last-child:nth-child(odd){grid-column:1/-1}
.member .stat strong{font-size:25px;margin:10px 0}
.member .grid{display:block;margin-bottom:0}
.member .form{grid-template-columns:1fr;gap:12px}
.member input:not([type=checkbox]),.member select{min-height:42px;font-size:15px}
.member .form button{height:42px}
.member .btn{min-height:36px}
.member .node{padding:12px 10px;margin-left:0;font-size:12px;overflow-wrap:anywhere}
.member .depth1{margin-left:6px}.member .depth2{margin-left:12px}.member .depth3{margin-left:18px}.member .depth4{margin-left:24px}.member .depth5{margin-left:30px}
.member .footer{line-height:1.6}
.member-records{display:grid;gap:10px}
.member-record{padding:13px;background:#f8fafb;border:1px solid #e1e9ee;border-radius:9px;min-width:0}
.record-heading,.record-meta{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}
.record-heading{font-size:13px}
.record-amount{display:block;font-size:23px;letter-spacing:-.6px;margin:10px 0}
.record-meta{font-size:11px;color:#728998;line-height:1.7;overflow-wrap:anywhere}
.member-portal .login{max-width:480px;margin:auto;display:block;min-height:100dvh}
.member-portal .login-brand{padding:28px 24px}
.member-portal .login-brand h1{font-size:25px;margin-top:20px}
.member-portal .login-brand p{font-size:12px}
.member-portal .login-box{padding:28px 24px;display:block}
.member-portal .login-box form{width:100%;min-width:0;max-width:none}
.member-portal .login-box input{min-height:44px;font-size:16px}

.number-input{font-variant-numeric:tabular-nums;text-align:right}
.plan-overview-grid{height:auto;min-height:0;grid-template-rows:repeat(4,auto);align-items:start}
.plan-overview-grid>.card{height:auto;max-height:none;overflow:visible}
.plan-overview-grid #plan-tiers{max-height:none;overflow:visible}
.plan-overview-grid [data-plan-section="10"]{grid-column:1/-1;grid-row:4}
.plan-overview-grid>[data-plan-section="12"]{grid-column:1/span 6;grid-row:5}
.plan-overview-grid>[data-plan-section="13"]{grid-column:7/span 6;grid-row:5}
.plan-overview-grid .tier-row{grid-template-columns:minmax(100px,1fr) minmax(100px,.85fr) minmax(110px,1fr) minmax(130px,1.15fr) minmax(170px,1.5fr) minmax(100px,.85fr) minmax(110px,1fr) auto;align-items:end}
.plan-overview-grid .tier-row label{white-space:nowrap}
.purchase-settings-group{grid-column:1/span 4;grid-row:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start;min-width:0}
.purchase-settings-group>.card{margin:0;padding:10px;min-width:0;height:auto;max-height:none;overflow:visible;grid-column:auto;grid-row:auto}
.purchase-settings-group>[data-plan-section="0"]{grid-column:1/-1}
.purchase-settings-group>[data-plan-section="4"] .plan-fields,
.purchase-settings-group>[data-plan-section="6"] .plan-fields{grid-template-columns:minmax(0,1fr);gap:5px}
.purchase-settings-group>[data-plan-section="4"],.purchase-settings-group>[data-plan-section="6"]{padding:9px}
.plan-overview-grid>[data-plan-section="9"]{grid-column:1/span 6}
.plan-overview-grid>[data-plan-section="5"]{grid-column:7/span 6}
.plan-overview-grid>[data-plan-section="1"] .check{min-height:18px;margin:0;padding:0;line-height:1.2;gap:5px;display:flex;align-items:center}
.plan-overview-grid>[data-plan-section="1"] .check input[type=checkbox]{width:14px;height:14px;min-height:14px;margin:0;flex:0 0 14px}
.plan-overview-grid>[data-plan-section="1"] .check+.check{margin-top:-3px}
.bonus-settings-group{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:1fr .8fr 1.45fr 1.45fr 1.3fr;gap:8px;align-items:start;min-width:0}
.bonus-settings-group>.card{grid-column:auto;grid-row:auto;margin:0;padding:10px;min-width:0;height:auto;max-height:none;overflow:visible}
.bonus-settings-group>[data-plan-section="9"] .plan-fields,
.bonus-settings-group>[data-plan-section="5"] .plan-fields{grid-template-columns:minmax(0,1fr)}
.bonus-settings-group>[data-plan-section="5"] .plan-fields{gap:3px}
.bonus-settings-group .check{display:flex;align-items:center;min-height:18px;margin:0;padding:0;line-height:1.3}
.bonus-settings-group .check input[type=checkbox]{width:14px;height:14px;min-height:14px;margin:0;flex:0 0 14px}
.bonus-settings-group .rollup-grid,.bonus-settings-group .rank-condition-grid{gap:4px;font-size:9px}
.bonus-settings-group .rank-condition-grid{grid-template-columns:25px repeat(4,minmax(0,1fr))}
.bonus-settings-group .plan-fields{gap:6px}
.bonus-settings-group{align-items:stretch}
.bonus-settings-group>.card{display:flex;flex-direction:column;height:100%}
.bonus-settings-group>.card>.plan-fields{flex:1;align-content:space-between;align-items:start}
.bonus-settings-group>[data-plan-section="5"]>.plan-fields{row-gap:6px}
.bonus-settings-group>[data-plan-section="9"]>.plan-fields>.wide.plan-fields{display:contents}
.plan-overview-grid [data-plan-section="10"]{grid-row:4;grid-column:1/span 8}
.plan-overview-grid>[data-plan-section="12"]{grid-row:4;grid-column:9/span 2}
.plan-overview-grid>[data-plan-section="13"]{grid-row:4;grid-column:11/span 2}
.plan-overview-grid>[data-plan-section="12"] .plan-fields{grid-template-columns:minmax(0,1fr)}
.plan-overview-grid>[data-plan-section="13"] .plan-notes{height:150px}
.plan-overview-grid [data-plan-section="10"] .tier-row{grid-template-columns:minmax(70px,.85fr) minmax(60px,.7fr) minmax(85px,1fr) minmax(85px,1fr) minmax(100px,1.2fr) minmax(60px,.7fr) minmax(65px,.8fr) auto;gap:4px;padding:6px}
.plan-overview-grid [data-plan-section="10"] .tier-row label{white-space:normal;font-size:10px}
.plan-overview-grid [data-plan-section="10"]{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.plan-overview-grid [data-plan-section="10"]>.plan-fields{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px}
.plan-overview-grid [data-plan-section="10"] #plan-tiers{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#b9ccd7 transparent}
.plan-overview-grid [data-plan-section="10"] #plan-tiers+div{flex:0 0 auto}
.plan-overview .plan-intro{justify-content:flex-end}
.plan-overview-grid [data-plan-section="10"] .tier-row{grid-template-columns:minmax(85px,1fr) minmax(95px,1.1fr) minmax(100px,1fr) minmax(85px,1fr) minmax(120px,1.3fr) auto;align-items:start}
.tier-qualification{min-width:0;display:grid;gap:3px}
.tier-qualification details{font-size:10px}
.tier-qualification summary{cursor:pointer;color:#658092}
.tier-qualification details label{margin-top:4px}
.settings-heading>.btn{flex:0 0 auto;margin-left:8px}
body[data-admin-theme] .plan-form>.settings-floating-save{position:fixed;right:18px;top:50%;transform:translateY(-50%);z-index:25;min-height:46px;padding:12px 18px;border-radius:10px;border:1px solid #28b9a2;box-shadow:0 5px 20px #0005;font-size:14px;font-weight:700;white-space:nowrap}
body[data-admin-theme] .plan-form>.settings-floating-save:not(:disabled):hover{background:#096b5d;box-shadow:0 6px 24px #0007}
body[data-admin-theme] .plan-form>.settings-floating-save:disabled{opacity:.65;cursor:wait}
@media(max-width:640px){body[data-admin-theme] .plan-form>.settings-floating-save{right:8px;padding:10px 12px;font-size:13px}}
@media print{.settings-floating-save{display:none!important}}
.plan-overview-grid [data-plan-section="10"] .tier-row{grid-template-columns:minmax(85px,1fr) minmax(100px,1.1fr) minmax(90px,1fr) minmax(140px,1.5fr) auto}
.purchase-settings-group{align-self:stretch;grid-template-rows:auto minmax(0,1fr);align-items:stretch}
.purchase-settings-group>[data-plan-section="4"],.purchase-settings-group>[data-plan-section="6"]{display:flex;flex-direction:column}
.purchase-settings-group>[data-plan-section="4"]>.plan-fields,
.purchase-settings-group>[data-plan-section="6"]>.plan-fields{flex:1;align-content:space-between;align-items:start}
.plan-overview-grid>[data-plan-section="1"],
.plan-overview-grid>[data-plan-section="2"],
.plan-overview-grid>[data-plan-section="3"]{align-self:stretch;display:flex;flex-direction:column}
.plan-overview-grid>[data-plan-section="1"]>.plan-fields,
.plan-overview-grid>[data-plan-section="2"]>.plan-fields,
.plan-overview-grid>[data-plan-section="3"]>.plan-fields{flex:1;align-content:space-between;align-items:start}
.plan-overview-grid>[data-plan-section="1"]{grid-column:5/span 2}
.plan-overview-grid>[data-plan-section="2"]{grid-column:7/span 2}
.plan-overview-grid>[data-plan-section="3"]{grid-column:9/span 2}
.plan-overview-grid>[data-plan-section="11"]{grid-row:1;grid-column:11/span 2;align-self:stretch;display:flex;flex-direction:column}
.plan-overview-grid>[data-plan-section="11"]>.plan-fields{flex:1;grid-template-columns:minmax(0,1fr);align-content:space-between;align-items:start}
.plan-overview-grid>[data-plan-section="11"] .check{min-height:18px;margin:0;padding:0;line-height:1.3;display:flex;align-items:center}
.plan-overview-grid>[data-plan-section="11"] .check input{width:14px;height:14px;min-height:14px;margin:0;flex:0 0 14px}
.plan-overview-grid>[data-plan-section="11"] .wide>.plan-fields{grid-template-columns:minmax(0,1fr);gap:4px}
.bonus-settings-group{grid-template-columns:1fr .8fr 1.45fr 1.45fr}
.bonus-settings-group{grid-template-columns:1.45fr 1fr .8fr 1.45fr}
.cap-policy-summary{font-size:10px;line-height:1.6;color:#658092}
.purchase-settings-group{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;align-content:start}
.purchase-settings-group>[data-plan-section="4"],.purchase-settings-group>[data-plan-section="6"]{grid-column:1/-1}
.purchase-settings-group>[data-plan-section="4"]>.plan-fields,
.purchase-settings-group>[data-plan-section="6"]>.plan-fields{grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:6px}
.plan-overview-grid .rollup-grid{grid-template-columns:30px repeat(4,minmax(0,1fr));gap:4px}
.promotion-sheet{border:1px solid #cddbe4;border-radius:4px;background:#fff}
.plan-overview-grid [data-plan-section="10"] .tier-row,.tier-sheet-head{display:grid;grid-template-columns:110px 120px 100px 115px 140px minmax(150px,1fr) 48px;gap:0;min-width:783px;margin:0;padding:0;border:0;border-radius:0;align-items:stretch}
.tier-sheet-head{position:sticky;top:0;z-index:2;background:#e6edf3}
.tier-sheet-head strong{font-size:10px;padding:7px 5px;border-right:1px solid #cddbe4;white-space:nowrap}
.plan-overview-grid [data-plan-section="10"] .tier-row>label{display:flex;font-size:0;gap:0;border-top:1px solid #dce5ec;border-right:1px solid #dce5ec;padding:0;min-width:0}
.plan-overview-grid [data-plan-section="10"] .tier-row:nth-child(odd){background:#f6f9fb}
.plan-overview-grid [data-plan-section="10"] .tier-row input:not([type=hidden]),.plan-overview-grid [data-plan-section="10"] .tier-row select{border:0;border-radius:0;background:transparent;min-height:30px;height:30px;font-size:11px;padding:4px 6px;box-shadow:none}
.plan-overview-grid [data-plan-section="10"] .tier-row input:focus,.plan-overview-grid [data-plan-section="10"] .tier-row select:focus{outline:2px solid #168675;outline-offset:-2px;background:#eefaf5}
.plan-overview-grid [data-plan-section="10"] .tier-row>.btn{border-radius:0;background:transparent;border-top:1px solid #dce5ec;color:#9b4050}
.sheet-shortcuts{font-size:10px;color:#658092;margin-left:8px}
.plan-overview-grid [data-plan-section="10"]{grid-column:1/span 6}
.plan-overview-grid>[data-plan-section="12"]{grid-column:7/span 2}
.plan-overview-grid>[data-plan-section="13"]{grid-column:9/span 4}
.plan-overview-grid>[data-plan-section="5"],
.plan-overview-grid>[data-plan-section="12"],
.plan-overview-grid>[data-plan-section="13"]{align-self:stretch}
.plan-overview-grid [data-plan-section="10"] .promotion-sheet{width:100%;max-width:100%}
.plan-overview-grid [data-plan-section="10"] .tier-row,.tier-sheet-head{grid-template-columns:minmax(65px,1fr) minmax(80px,1.1fr) minmax(65px,.9fr) minmax(80px,1fr) minmax(100px,1.2fr) minmax(100px,1.2fr) 36px;min-width:550px}
.tier-sheet-head strong{white-space:normal;line-height:1.3}
.plan-overview-grid [data-plan-section="10"] #plan-tiers+div{display:flex;align-items:flex-start;gap:8px}
.plan-overview-grid [data-plan-section="10"] #plan-tiers+div>.btn{flex:0 0 auto}
.plan-overview-grid [data-plan-section="10"] .sheet-shortcuts{margin-left:0;line-height:1.5}
/* System settings: increase every visible text style by 2px. */
.plan-overview{font-size:15px}
.settings-heading h1{font-size:24px}
.settings-heading .sub{font-size:14px}
.settings-heading .pill{font-size:13px}
.settings-heading>.btn,.plan-overview .plan-save .btn{font-size:14px}
.plan-overview-grid h2{font-size:15px}
.plan-overview-grid h3,.plan-overview-grid label,.plan-overview-grid .check,
.plan-overview-grid .plan-notes,.plan-overview .plan-save{font-size:13px}
.plan-overview-grid input:not([type=checkbox]),.plan-overview-grid select,
.plan-overview-grid [data-plan-section="10"] .tier-row input:not([type=hidden]),
.plan-overview-grid [data-plan-section="10"] .tier-row select{font-size:13px;min-height:32px;height:32px}
.plan-overview-grid .package-grid,.plan-overview-grid .btn,.plan-overview-grid .cap-policy-summary,
.plan-overview-grid .sheet-shortcuts,.plan-overview-grid .tier-sheet-head strong{font-size:12px}
.plan-overview-grid .rollup-grid,.plan-overview-grid .rank-condition-grid{font-size:11px}
.plan-overview-grid .muted{font-size:14px}
.plan-overview-grid>[data-plan-section="1"] .check,.plan-overview-grid>[data-plan-section="5"] .check{font-size:13px}
.plan-overview-grid .package-grid label,.plan-overview-grid .rollup-grid label,
.plan-overview-grid .rank-condition-grid label,.plan-overview-grid [data-plan-section="10"] .tier-row>label{font-size:0}
.content:has(.plan-overview)>.footer{font-size:12px}
.plan-overview-grid h2,.plan-overview-grid h3,.plan-overview-grid label,
.plan-overview-grid .check,.plan-overview-grid .muted,.cap-policy-summary,.sheet-shortcuts{word-break:keep-all;overflow-wrap:break-word}
.plan-overview-grid h2{line-height:1.5;margin-bottom:10px}
.plan-overview-grid label{line-height:1.45}
.plan-overview-grid .package-grid{grid-template-columns:60px repeat(3,minmax(0,1fr))}
.plan-overview-grid input:not([type=checkbox]),.plan-overview-grid select{min-height:36px;height:36px}
.plan-overview-grid .check{height:auto;min-height:22px}
.plan-overview-grid [data-plan-section="10"] .tier-row,.tier-sheet-head{grid-template-columns:110px 110px 105px 120px 150px minmax(150px,1fr) 45px;min-width:790px}
.tier-sheet-head strong{white-space:nowrap;padding:8px 6px}
.plan-overview-grid [data-plan-section="10"] #plan-tiers{overflow-x:auto}
@media(max-width:1599px){
 .plan-overview-grid{grid-template-rows:auto auto auto auto}
 .purchase-settings-group{grid-row:1;grid-column:1/span 4}
 .plan-overview-grid>[data-plan-section="1"]{grid-row:1;grid-column:5/span 4}
 .plan-overview-grid>[data-plan-section="2"]{grid-row:1;grid-column:9/span 4}
 .plan-overview-grid>[data-plan-section="3"]{grid-row:2;grid-column:1/span 6}
 .plan-overview-grid>[data-plan-section="11"]{grid-row:2;grid-column:7/span 6}
 .plan-overview-grid>[data-plan-section="3"]>.plan-fields,
 .plan-overview-grid>[data-plan-section="11"]>.plan-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;align-content:start}
 .plan-overview-grid>[data-plan-section="11"] .wide>.plan-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px}
 .bonus-settings-group{grid-row:3;grid-template-columns:1.5fr 1fr .8fr 1.5fr}
}
.plan-overview-grid .rank-condition-grid{grid-template-columns:42px repeat(4,minmax(0,1fr));gap:5px}
.plan-overview-grid .rank-condition-grid>strong{white-space:nowrap;align-self:center}
.plan-overview-grid .rank-condition-grid>div,.plan-overview-grid .rollup-grid>div{word-break:keep-all;line-height:1.5;align-self:end}
.plan-overview-grid .rollup-grid{grid-template-columns:38px repeat(4,minmax(0,1fr))}
.plan-overview-grid [data-plan-section="10"]{grid-column:1/span 5}
.plan-overview-grid>[data-plan-section="12"]{grid-column:6/span 3}
.plan-overview-grid>[data-plan-section="13"]{grid-column:9/span 4}
.plan-overview-grid .plan-notes{line-height:1.65;padding:8px}
.plan-overview-grid [data-plan-section="10"] #plan-tiers+div{flex-wrap:wrap;gap:5px}
.plan-overview-grid [data-plan-section="10"] .sheet-shortcuts{flex-basis:100%;line-height:1.6}
.bonus-settings-group>[data-plan-section="8"]>.plan-fields>.check{grid-column:1/-1}
.bonus-settings-group{grid-template-columns:repeat(12,minmax(0,1fr))}
.bonus-settings-group>[data-plan-section="8"]{grid-row:1;grid-column:1/span 5}
.bonus-settings-group>[data-plan-section="9"]{grid-row:1;grid-column:6/span 4}
.bonus-settings-group>[data-plan-section="5"]{grid-row:1;grid-column:10/span 3}
.bonus-settings-group>[data-plan-section="7"]{grid-row:2;grid-column:1/span 5}
.bonus-settings-group>[data-plan-section="10"]{grid-row:2;grid-column:6/span 7;align-self:start}
.plan-overview-grid>[data-plan-section="12"]{grid-column:1/span 4}
.plan-overview-grid>[data-plan-section="13"]{grid-column:5/span 8}
.bonus-settings-group>[data-plan-section="8"]{grid-column:1/span 6}
.bonus-settings-group>[data-plan-section="9"]{grid-column:7/span 6}
.plan-overview-grid>[data-plan-section="5"]{grid-row:4;grid-column:1/span 3}
.plan-overview-grid>[data-plan-section="12"]{grid-row:4;grid-column:4/span 3}
.plan-overview-grid>[data-plan-section="13"]{grid-row:4;grid-column:7/span 6}
.plan-overview-grid>[data-plan-section="5"]>.plan-fields{grid-template-columns:minmax(0,1fr);gap:6px}
.bonus-settings-group{grid-template-columns:minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.2fr) minmax(0,1.5fr);align-items:stretch}
.bonus-settings-group>[data-plan-section="8"]{grid-row:1;grid-column:1}
.bonus-settings-group>[data-plan-section="9"]{grid-row:1;grid-column:2}
.bonus-settings-group>[data-plan-section="7"]{grid-row:1;grid-column:3}
.bonus-settings-group>[data-plan-section="10"]{grid-row:1;grid-column:4;align-self:stretch;height:100%;min-height:0}
.bonus-settings-group>[data-plan-section="10"] #plan-tiers{height:0;flex:1 1 0;min-height:0}
.bonus-settings-group{grid-template-columns:minmax(0,1.1fr) minmax(160px,.6fr) minmax(0,1.2fr) minmax(0,1.7fr)}
.plan-overview-grid>[data-plan-section="5"]{grid-column:1/span 4}
.plan-overview-grid>[data-plan-section="12"]{grid-column:5/span 4}
.plan-overview-grid>[data-plan-section="13"]{grid-column:9/span 4}
/* Compact utility cards and a wider policy review area. */
.plan-overview-grid>[data-plan-section="5"]{grid-column:1/span 2}
.plan-overview-grid>[data-plan-section="12"]{grid-column:3/span 3}
.plan-overview-grid>[data-plan-section="13"]{grid-column:6/span 7}
.plan-overview-grid>[data-plan-section="13"] h2{font-size:17px}
.plan-overview-grid>[data-plan-section="13"] label,
.plan-overview-grid>[data-plan-section="13"] .check,
.plan-overview-grid>[data-plan-section="13"] .plan-notes{font-size:15px}
.plan-overview-grid>[data-plan-section="13"] .plan-notes{height:200px;line-height:1.7}
.plan-overview-grid .rank-condition-grid{grid-template-columns:52px repeat(4,minmax(0,1fr))}
.plan-overview-grid .rank-condition-grid>strong{font-size:15px;font-weight:700;white-space:nowrap}
.genealogy{min-width:0}
.gene-tabs{display:flex;gap:6px;margin-bottom:7px}
.gene-tabs button{padding:10px 24px;border:1px solid #aabed2;border-radius:7px;color:#233f5a;background:#f8fafc;font-size:13px;font-weight:700}
.gene-tabs button.active{background:#2c64eb;border-color:#2c64eb;color:#fff;box-shadow:0 2px 5px #2c64eb25}
.gene-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px;background:#fff;border:1px solid #cbd9e6;border-radius:9px}
.gene-zoom{display:flex;gap:5px}
.gene-zoom button{height:32px;min-width:34px;padding:0 8px;background:#f8fafd;border:1px solid #b2c7dd;border-radius:5px;color:#32567a;font-size:12px}
.gene-depth{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px}
.gene-depth select{padding:4px 8px;height:32px;width:58px}
.gene-search{display:flex;gap:6px;flex:1;min-width:220px;max-width:430px}
.gene-search input{width:100%;min-width:0;padding:5px 9px;height:32px;font-size:12px}
.gene-search .btn{flex:0 0 auto;background:#2449c5}
.gene-controls>[data-gene=print]{color:#fff;background:#11816c}
.gene-legend{display:flex;gap:9px;align-items:center;margin-left:auto;flex-wrap:wrap;font-size:10px;color:#658092}
.gene-legend span{display:flex;gap:4px;align-items:center;white-space:nowrap}
.gene-legend i{display:inline-block;width:8px;height:8px;border-radius:2px}
.gene-left{background:#ee7383}.gene-right{background:#64afce}.gene-empty-color{background:#079b39}
.gene-status{font-size:11px;color:#71889b;padding:8px 3px;min-height:30px}
.gene-results{padding:10px;background:#fff;border:1px solid #ccdbe6;border-radius:7px;margin-top:7px;font-size:12px}
.gene-results[hidden]{display:none}
.gene-results button{padding:6px 10px;margin:4px;background:#edf4fb;color:#305775;border-radius:4px;font-size:12px}
.gene-viewport{width:100%;height:calc(100dvh - 310px);min-height:500px;overflow:auto;position:relative;background:#fff;border:1px solid #cbd9e6;border-radius:10px;cursor:grab;touch-action:none}
.gene-viewport.dragging{cursor:grabbing;user-select:none}
.gene-stage{position:relative;transform-origin:top left;margin:0 auto}
.gene-lines{position:absolute;inset:0;pointer-events:none;overflow:visible}
.gene-lines path{stroke:#a8bbd1;stroke-width:1.3;fill:none;stroke-linejoin:round}
.gene-node{position:absolute;width:116px;height:88px;padding:0;background:#fff;border:1px solid #ef7381;border-radius:5px;box-shadow:0 2px 5px #173a5e1a;text-align:center;color:#19384b;display:flex;flex-direction:column;overflow:visible;line-height:1.4;font-size:11px}
.gene-node-top{display:flex;justify-content:space-between;gap:3px;background:#ed7280;color:#fff;font-size:9px;padding:3px 4px;border-radius:3px 3px 0 0;white-space:nowrap}
.gene-node.right{border-color:#62adce}.gene-node.right .gene-node-top{background:#62adce}
.gene-node.sponsor{border-color:#7286d8}.gene-node.sponsor .gene-node-top{background:#7286d8}
.gene-node.inactive{opacity:.65;border-style:dashed}
.gene-node.root-node{border-color:#111}
.gene-node.root-node .gene-node-top{background:#111;color:#fff}
.gene-node>strong{font-size:13px;padding:3px 4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}
.gene-node-rank{font-size:10px;color:#637f94}
.gene-node-count{margin-top:auto;width:100%;padding:3px;border-top:1px solid #e0e9f0;font-size:11px;font-weight:700;background:#f5f9fc;border-radius:0 0 4px 4px}
.gene-more{position:absolute;top:91px;left:24px;background:#fff;color:#52708b;border:1px solid #b2c4d5;border-radius:10px;padding:1px 5px;font-size:9px}
.gene-empty{position:absolute;background:#07952d;color:#fff;border-radius:4px;padding:6px 9px;font-size:11px;font-weight:700;white-space:nowrap}
.gene-empty:disabled{opacity:.8;cursor:default}
.gene-help{font-size:11px;color:#738c9c;margin:8px 2px}
.simulator{min-width:0}
.sim-inputs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.sim-inputs>label{padding:12px;background:#fff;border:1px solid #c8d8e6;border-radius:7px;font-size:12px;gap:7px;word-break:keep-all}
.sim-input{position:relative;display:flex;align-items:center}
.sim-input input{width:100%;height:36px;padding:7px 29px 7px 8px;font-size:13px;text-align:right;border-radius:4px}
.sim-input>span{position:absolute;right:8px;font-size:11px;color:#6e879b;pointer-events:none}
.sim-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin:10px 0;flex-wrap:wrap}
.sim-version{margin-right:auto;font-size:11px;color:#6a8296}
.sim-live{font-size:11px;color:#678398;min-height:23px}
.sim-estimate-note{font-size:11px;line-height:1.6;color:#71869a;margin:0 0 12px}
.sim-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.sim-metric{margin:0;padding:15px;display:flex;flex-direction:column;gap:7px;min-width:0}
.sim-metric small{font-size:12px;font-weight:700;color:#617f97}
.sim-metric strong{font-size:23px;letter-spacing:-.6px;overflow-wrap:anywhere;line-height:1.3}
.sim-metric>span{font-size:11px;color:#7d92a3}
.sim-metric.sales strong,.sim-metric.profit strong{color:#159b78}
.sim-metric.cost strong,.sim-metric.payout strong{color:#d2942b}
.sim-metric.loss strong,.negative{color:#e45570}
.sim-panels{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:12px;margin-bottom:12px}
.sim-panels>.card{margin:0;padding:15px;min-width:0}
.sim-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.sim-card-head h2,.sim-policy h2{font-size:16px;margin:0}
.sim-card-head>span{font-size:11px;color:#8195a5}
.sim-bars{max-height:395px;overflow:auto;padding-right:8px}
.sim-bar-row{display:grid;grid-template-columns:65px minmax(0,1fr) 65px;align-items:center;gap:10px;width:100%;padding:7px 0;background:transparent;text-align:left;font-size:11px;color:#35536e}
.sim-bar-row strong{text-align:right;font-size:11px}
.sim-bar-track{height:10px;border-radius:3px;background:#f0f4fa;overflow:hidden}
.sim-bar-track i{height:100%;display:block;background:#3472e7;border-radius:3px;min-width:3px}
.sim-bar-row:hover{background:#f5f9fc}
.sim-caption{font-size:11px;color:#8195a5;margin:10px 0 0}
.sim-breakdown-row{display:grid;grid-template-columns:minmax(0,1fr) 140px 65px;align-items:center;gap:8px;border-bottom:1px solid #dce6ef;padding:9px 0;font-size:12px}
.sim-breakdown-row>strong{text-align:right;white-space:nowrap;font-size:12px}
.sim-breakdown-row>span:last-child{text-align:right;color:#ae7f26;font-size:11px}
.sim-breakdown-row.expense{background:#f7f9fc}
.sim-mini-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:14px}
.sim-mini-stats>div{background:#f6f9fc;border:1px solid #d5e1ed;border-radius:5px;padding:9px;min-width:0}
.sim-mini-stats span{display:block;color:#7890a3;font-size:10px;margin-bottom:7px}
.sim-mini-stats strong{font-size:13px;overflow-wrap:anywhere}
.sim-policy{margin-bottom:12px;padding:15px}
.sim-policy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;font-size:12px;color:#4f7089;margin-top:12px}
.sim-rate-bands{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;font-size:10px;color:#6e86a0}
.sim-rate-bands span{padding:5px 7px;border-radius:4px;background:#edf3fa}
.sim-detail{padding:15px;margin-bottom:12px}
.sim-table-wrap{overflow:auto;max-height:480px;border:1px solid #ccdbe8;border-radius:5px}
.sim-table-wrap table{min-width:1950px;margin:0}
.sim-table-wrap th{background:#dfe8f2;color:#31506d;white-space:nowrap;font-size:11px;padding:10px 8px}
.sim-table-wrap td{text-align:right;font-size:11px;padding:9px 8px;white-space:nowrap}
.sim-table-wrap th:first-child,.sim-table-wrap td:first-child{position:sticky;left:0;background:#edf3f9;text-align:left}
.sim-table-wrap th:first-child{z-index:3}
.sim-table-wrap tbody tr.selected td{background:#e4f3ed}
.sim-assumptions{font-size:12px;color:#688296;background:#fff;border:1px solid #dce6ee;padding:12px 15px;border-radius:8px;line-height:1.8}
.sim-assumptions summary{cursor:pointer;font-weight:700;color:#41657d}
.sim-assumptions li{margin:6px 0}
.sim-person-inputs{display:grid;grid-template-columns:1.3fr 1fr;gap:8px;padding:10px;background:#f6f9fc;border-radius:6px}
.sim-person-inputs label{font-size:11px;gap:4px}
.sim-person-inputs input:not([type=checkbox]),.sim-person-inputs select{width:100%;font-size:12px;min-height:34px;height:34px;padding:5px 7px}
.sim-person-inputs .check{grid-column:1/-1;display:flex;align-items:center;gap:6px}
.sim-person-inputs input[type=checkbox]{width:15px;height:15px}
.sim-person-total{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:7px;margin:12px 0;padding:12px;border:1px solid #cde5dc;background:#f0f9f5;border-radius:6px}
.sim-person-total>span{font-size:11px;color:#557c70}
.sim-person-total>strong{font-size:23px;color:#19876f}
.sim-person-total>span:last-child{flex-basis:100%}
.sim-person-facts{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px;font-size:11px;color:#6e879b}
.sim-person-facts span{padding:7px;background:#f6f9fc;border-radius:5px}
.sim-person-facts b{color:#2d5068;display:block;margin-top:3px}
.sim-person-detail{font-size:11px;color:#678096;line-height:1.7;margin-top:10px}
.sim-person-detail summary{cursor:pointer;font-weight:700;color:#42667e}
.sim-person-detail p{margin:6px 0}
.shell:not(.member) .nav button{font-size:16px;min-height:38px;line-height:1.4;padding:8px 11px}
.shell:not(.member) .nav{gap:4px 5px}
@media(max-width:1300px){.sim-inputs{grid-template-columns:repeat(3,minmax(0,1fr))}.sim-metric strong{font-size:21px}.sim-breakdown-row{grid-template-columns:minmax(0,1fr) 125px 50px;gap:5px}}
.member .gene-controls{gap:7px;padding:8px}
.member .gene-legend{margin-left:0}.member .gene-search{min-width:100%;max-width:none}
.member .gene-viewport{min-height:470px;height:65dvh}
.member .gene-tabs button{padding:9px 20px}
@media print{
 body:has(.genealogy) .sidebar,body:has(.genealogy) .topbar,body:has(.genealogy) .heading,body:has(.genealogy) .footer,.gene-controls,.gene-results,.gene-help{display:none!important}
 body:has(.genealogy) .content{padding:0;max-width:none}
 body:has(.genealogy) .shell{min-width:0}
 .gene-viewport{height:auto;min-height:0;overflow:visible;border:0}
 .gene-stage{margin:0}
 .gene-node,.gene-node-top,.gene-empty{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
.member-account-switch{display:grid;gap:6px;margin:0 0 14px;padding:12px;background:white;border:1px solid #d5e1ed;border-radius:10px}.member-account-switch label{display:grid;gap:6px;font-weight:600}.member-account-switch select{width:100%;min-width:0}.member-account-switch span{font-size:12px;color:#657d96;line-height:1.5}.group-account-line{display:flex;justify-content:space-between;gap:16px;padding:6px 0;white-space:nowrap}#group-payments details{min-width:220px}#group-payments summary{cursor:pointer}
/* Keep bonus switches directly below referral settings, in two compact rows. */
.purchase-settings-group{grid-template-rows:repeat(4,auto)}
.purchase-settings-group>[data-plan-section="5"]{grid-column:1/-1;grid-row:auto;align-self:start}
.purchase-settings-group>[data-plan-section="5"]>.plan-fields{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px 5px;align-content:start}
.purchase-settings-group>[data-plan-section="5"] .check{grid-column:span 4;display:flex;align-items:center;gap:4px;min-height:20px;margin:0;padding:0;white-space:nowrap;line-height:1.3;font-size:13px;letter-spacing:-.3px}
.purchase-settings-group>[data-plan-section="5"] .check:nth-child(n+4){grid-column:span 3}
.purchase-settings-group>[data-plan-section="5"] input[type=checkbox]{width:14px;height:14px;min-height:14px;margin:0;flex:0 0 14px}
.plan-overview-grid>[data-plan-section="12"]{grid-row:4;grid-column:1/span 3}
.plan-overview-grid>[data-plan-section="13"]{grid-row:4;grid-column:4/span 9}
.purchase-settings-group>[data-plan-section="6"],.purchase-settings-group>[data-plan-section="5"]{min-height:112px}
.purchase-settings-group>[data-plan-section="5"]>.plan-fields{grid-template-columns:minmax(0,1fr);gap:8px}
.purchase-settings-group>[data-plan-section="5"] .bonus-cycle-row{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0}
.purchase-settings-group>[data-plan-section="5"] .bonus-cycle-row>strong{font-size:13px;color:#24465c;white-space:nowrap;flex:0 0 40px}
.purchase-settings-group>[data-plan-section="5"] .bonus-cycle-row>.check{gap:3px;letter-spacing:-.4px;flex:0 0 auto}
/* Transfer space from closing settings to qualification text. */
.plan-overview-grid>[data-plan-section="1"]{width:calc(100% + 56px)}
.plan-overview-grid>[data-plan-section="2"]{width:calc(100% - 56px);margin-left:56px;min-width:0}
.plan-overview-grid>[data-plan-section="1"]>h2,.plan-overview-grid>[data-plan-section="2"]>h2,
.plan-overview-grid>[data-plan-section="1"]>.plan-fields>label,.plan-overview-grid>[data-plan-section="2"]>.plan-fields>label{white-space:nowrap}
.purchase-settings-group>[data-plan-section="5"] .bonus-cycle-row+.bonus-cycle-row{border-top:1px solid #dce5ec;padding-top:8px}
.member-registration{display:grid;gap:14px}.member-registration fieldset{min-width:0;border:1px solid #dce5ec;border-radius:8px;padding:12px 14px;margin:0}.member-registration legend{font-size:14px;font-weight:700;padding:0 6px;color:#24465c}.member-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px;align-items:start}.member-registration label{display:grid;gap:6px;min-width:0;font-size:13px}.member-registration input,.member-registration select{width:100%;min-width:0;height:38px}.member-registration small{font-size:12px;color:#658092;line-height:1.5;min-height:16px}.inline-input{display:flex;align-items:center;gap:5px;min-width:0}.inline-input>input{flex:1;min-width:0}.inline-input>.btn{white-space:nowrap;flex:0 0 auto;min-height:38px;padding:6px 8px}.resident-input{display:grid;grid-template-columns:1fr auto 1fr;gap:6px;align-items:center}.member-address-grid{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(0,1.4fr) minmax(0,1fr);gap:12px 16px}.member-registration>.actions{align-items:center}.member-registration>.actions>span{font-size:12px;color:#658092}.member-registration [hidden]{display:none!important}.address-dialog{width:min(550px,92vw);border:1px solid #cbd9e6;border-radius:12px;padding:14px;box-shadow:0 15px 70px #102e4033}.address-dialog::backdrop{background:#102e4055}.address-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.postcode-frame{height:480px;width:100%}.member-registration select:disabled{opacity:.75}
@media(max-width:1350px){.member-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Compact PC member entry form. */
.member-registration{gap:7px}
.member-registration fieldset{padding:6px 10px 8px}
.member-registration legend{font-size:13px}
.member-registration .member-form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 12px}
.member-registration .member-address-grid{grid-template-columns:minmax(220px,.85fr) minmax(0,1.4fr) minmax(0,1fr);gap:5px 12px}
.member-registration label{gap:3px;font-size:13px;line-height:1.35}
.member-registration input,.member-registration select{height:30px;min-height:30px;padding:4px 7px;font-size:13px}
.member-registration .inline-input{gap:4px}
.member-registration .inline-input>.btn{height:30px;min-height:30px;padding:4px 6px;font-size:11px}
.member-registration .resident-input{gap:4px}
.member-registration small{font-size:11px;line-height:1.3;min-height:0}
.member-registration small:empty{display:none}
.member-registration>.actions{gap:7px}
.member-registration>.actions>.btn{min-height:30px;padding:6px 12px}
.card:has(>.member-registration){padding:14px}
.card:has(>.member-registration)>.cardhead{margin-bottom:9px}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="name"]){grid-row:1;grid-column:1}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="birth"]){grid-row:1;grid-column:2}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="password"]){grid-row:1;grid-column:3}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="login"]){grid-row:2;grid-column:1}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="phone"]){grid-row:2;grid-column:2}
.member-registration input[readonly]{background:#f3f7f9;color:#637b89}
/* All five basic member fields share one PC row. */
.member-registration fieldset:first-of-type .member-form-grid{grid-template-columns:minmax(85px,.7fr) minmax(180px,1.2fr) minmax(165px,1.05fr) minmax(220px,1.4fr) minmax(195px,1.25fr);gap:5px 8px}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="name"]){grid-row:1;grid-column:1}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="birth"]){grid-row:1;grid-column:2}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="password"]){grid-row:1;grid-column:3}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="login"]){grid-row:1;grid-column:4}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="phone"]){grid-row:1;grid-column:5}
.member-registration fieldset:first-of-type label{white-space:nowrap;font-size:12px}
.member-registration fieldset:first-of-type .inline-input>.btn{padding:4px;font-size:10px}
.member-registration fieldset:first-of-type .member-form-grid{grid-template-columns:minmax(85px,.7fr) minmax(195px,1.25fr) minmax(180px,1.2fr) minmax(165px,1.05fr) minmax(220px,1.4fr)}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="phone"]){grid-column:2}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="birth"]){grid-column:3}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="password"]){grid-column:4}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="login"]){grid-column:5}
.member-registration fieldset:has([name="sponsorId"]) .member-form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr)}
.member-registration fieldset:has([name="sponsorId"]) label:has([data-sponsor-query]){grid-row:1;grid-column:1}
.member-registration fieldset:has([name="sponsorId"]) label:has([name="sponsorId"]){grid-row:1;grid-column:2}
.member-registration fieldset:has([name="sponsorId"]) label:has([data-parent-query]){grid-row:2;grid-column:1}
.member-registration fieldset:has([name="sponsorId"]) label:has([name="parentId"]){grid-row:1/span 3;grid-column:3;align-self:stretch}
.member-registration fieldset:has([name="sponsorId"]) label:has([name="side"]){grid-row:2;grid-column:2}
.member-registration fieldset:has([name="sponsorId"]) label:has([name="centerId"]){grid-row:3;grid-column:1/span 2}
.member-registration select[name="parentId"][size]{height:154px;min-height:154px;background:#fff;padding:3px;overflow-y:auto}
.member-registration select[name="parentId"][size] option{padding:5px 7px;line-height:1.4}
.member-registration fieldset:has([name="sponsorId"]) label.placement-slot-field{grid-row:1/span 2;grid-column:3;align-self:stretch}
.member-registration fieldset:has([name="sponsorId"]) label:has([data-placement-summary]){grid-row:2;grid-column:2}
.member-registration fieldset:has([name="sponsorId"]) label:has([name="centerId"]){grid-row:2;grid-column:1}
.member-registration select[name="placementSlot"][size]{height:140px;min-height:140px;background:#fff;padding:3px;overflow-y:auto}
.member-registration select[name="placementSlot"][size] option{padding:5px 7px;line-height:1.4}
.member-registration [data-more-placements]{padding:4px 8px;font-size:11px}
/* Keep all referral and placement controls on one compact row. */
.member-registration fieldset:has([name="sponsorId"]) .member-form-grid{grid-template-columns:minmax(165px,1fr) minmax(145px,.9fr) minmax(250px,1.55fr) minmax(130px,.8fr) minmax(180px,1.1fr);gap:5px 8px}
.member-registration fieldset:has([name="sponsorId"]) label:has([data-sponsor-query]){grid-row:1;grid-column:1}
.member-registration fieldset:has([name="sponsorId"]) label:has([name="sponsorId"]){grid-row:1;grid-column:2}
.member-registration fieldset:has([name="sponsorId"]) label.placement-slot-field{grid-row:1;grid-column:3;align-self:start}
.member-registration fieldset:has([name="sponsorId"]) label:has([name="centerId"]){grid-row:1;grid-column:4}
.member-registration fieldset:has([name="sponsorId"]) label:has([data-placement-summary]){grid-row:1;grid-column:5}
.member-registration fieldset:has([name="sponsorId"]) label{white-space:nowrap;font-size:12px}
.member-registration select[name="placementSlot"]{height:30px;min-height:30px;padding:4px 7px}
/* PC member management: two equal-height cards within the viewport. */
.member-management-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:12px;height:calc(100dvh - 275px);min-height:280px;min-width:0}
.member-management-grid>.card{display:flex;flex-direction:column;min-width:0;min-height:0;padding:12px;overflow:hidden}
.member-management-grid>.card>.cardhead{margin-bottom:8px;flex:0 0 auto}
.member-management-grid .member-registration{flex:1;min-height:0;overflow:auto;align-content:start;padding-right:4px}
.member-management-grid .member-registration .member-form-grid,
.member-management-grid .member-registration fieldset:first-of-type .member-form-grid,
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) .member-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px}
.member-management-grid .member-registration fieldset label{grid-row:auto!important;grid-column:auto!important;white-space:normal;font-size:12px}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="name"]){order:1}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="phone"]){order:2}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="birth"]){order:3}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="password"]){order:4}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="login"]){order:5;grid-column:1/-1!important}
.member-management-grid .member-registration .member-address-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label.placement-slot-field{grid-column:1/-1!important}
.member-management-grid .member-registration>.actions{position:sticky;bottom:0;background:#fff;padding:6px 0 2px;z-index:1}
.member-management-grid>#member-list{min-width:0}
.member-management-grid #member-list{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.member-management-grid #member-list>.note{margin:6px 0;flex:0 0 auto}
.member-management-grid #member-list>.tablewrap{flex:1;min-height:0;overflow:auto;max-height:none}
.member-management-grid #member-list table{font-size:11px}
.member-management-grid #member-list th{position:sticky;top:0;z-index:1;padding:8px}
.member-management-grid #member-list td{padding:7px 8px}
.member-management-grid #member-list .btn{padding:5px 7px;white-space:nowrap}
.member-management-grid #search{flex-wrap:nowrap;gap:5px}
.member-management-grid #search>input{min-width:0;flex:1}
.member-management-grid>.card>.actions{flex:0 0 auto;margin-top:7px}
.content:has(.member-management-grid)>.footer{display:none}
@media(min-width:1600px){.member-management-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}.member-management-grid .member-registration .member-form-grid,.member-management-grid .member-registration fieldset:first-of-type .member-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.member-management-grid .member-registration fieldset:first-of-type label:has([name="login"]){grid-column:auto!important}}
.member-management-grid .member-registration .member-form-grid,
.member-management-grid .member-registration fieldset:first-of-type .member-form-grid,
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) .member-form-grid,
.member-management-grid .member-registration .member-address-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="login"]){grid-column:auto!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([data-sponsor-query]){grid-row:1!important;grid-column:1!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([name="sponsorId"]){grid-row:1!important;grid-column:2!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([name="centerId"]){grid-row:1!important;grid-column:3!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label.placement-slot-field{grid-row:2!important;grid-column:1/span 2!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([data-placement-summary]){grid-row:2!important;grid-column:3!important}
.member-management-grid .member-registration .inline-input>.btn{padding:4px;font-size:10px}
.member-management-grid #member-list td:last-child,.member-management-grid #member-list th:last-child{position:sticky;right:0;background:#fff;box-shadow:-1px 0 #e1e9ee;z-index:2}
.member-management-grid #member-list th:last-child{z-index:3;background:#f7f9fb}
.member-management-grid{grid-template-columns:minmax(0,3fr) minmax(0,5fr)}
.member-management-grid .member-registration .member-form-grid,
.member-management-grid .member-registration fieldset:first-of-type .member-form-grid,
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) .member-form-grid,
.member-management-grid .member-registration .member-address-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="login"]){grid-column:1/-1!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([data-sponsor-query]){grid-row:1!important;grid-column:1!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([name="sponsorId"]){grid-row:1!important;grid-column:2!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label.placement-slot-field{grid-row:2!important;grid-column:1/-1!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([name="centerId"]){grid-row:3!important;grid-column:1!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([data-placement-summary]){grid-row:3!important;grid-column:2!important}
.address-dialog{max-height:calc(100dvh - 32px);overflow:hidden}
.address-dialog .postcode-frame{height:min(540px,calc(100dvh - 115px));min-height:240px;position:relative}
.address-dialog .postcode-frame>iframe{display:block;width:100%;height:100%;border:0}
/* Dense member rows and an unmistakable edit state. */
.member-management-grid #member-list th{padding:6px;line-height:1.3}
.member-management-grid #member-list td{padding:4px 6px;line-height:1.3}
.member-management-grid #member-list .badge{padding:2px 5px;line-height:1.3}
.member-management-grid #member-list td:last-child{position:static;right:auto;box-shadow:none;background:transparent}
.member-management-grid #member-list th:last-child{right:auto;box-shadow:none}
.member-management-grid #member-list tr[data-member-edit]{cursor:pointer}
.member-management-grid #member-list tr[data-member-edit]:hover{background:#f0f7fb}
.member-management-grid #member-list tr.is-selected{background:#fff0bf}
.member-management-grid #member-list tr:focus-visible{outline:2px solid #168b79;outline-offset:-2px}
.member-management-grid>.card.is-editing-member{background:#fff5da;border-color:#d8ab49;box-shadow:inset 0 0 0 1px #e5bf69}
.member-management-grid>.card.is-editing-member h2{color:#89530c}
.member-management-grid .is-editing-member fieldset{background:#fffbef;border-color:#e5d3a4}
.member-management-grid .is-editing-member .member-registration>.actions{background:#fff5da}
.member-management-grid .is-editing-member [data-save-member]{background:#9b650e}
.member-management-grid .is-editing-member [data-member-mode]{color:#89530c}
.member-management-grid #member-list tr.is-selected:hover{background:#fff0bf}
.rank-center-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
.rank-center-grid>.card{min-width:0}
.rank-center-grid .form{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}
.rank-center-grid .form>.btn{grid-column:1/-1;height:34px}
.rank-center-grid .tablewrap{max-height:calc(100dvh - 470px);min-height:100px;overflow:auto}
.rank-center-grid th{position:sticky;top:0;z-index:1}
.rank-center-grid td,.rank-center-grid th{padding:8px 10px}
.payout-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;width:max-content;max-width:100%;gap:6px;margin-bottom:12px;border-bottom:1px solid #dce5ec;padding-bottom:8px}
.payout-tabs>button{padding:9px 16px;border-radius:6px;background:#eaf0f5;color:#38566b;font-size:14px;font-weight:600}
.payout-tabs>button[aria-selected="true"]{background:#168b79;color:#fff}
#caps-panel[hidden],#payments-panel[hidden]{display:none}
#caps-panel .tablewrap{max-height:calc(100dvh - 440px);overflow:auto}
#caps-panel th{position:sticky;top:0;z-index:1}
#caps-panel td,#caps-panel th{padding:8px 10px}
.closing-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.closing-cards>.card{min-width:0;padding:16px}
.closing-bonus-types{margin:0 0 14px;color:#168b79;font-weight:600;font-size:13px}
.closing-cards .form{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.closing-cards .form label{min-width:0;font-size:12px}
.closing-cards .form input{min-width:0;width:100%;padding:7px 6px}
.closing-cards .form>.btn{grid-column:1/-1;height:34px}
.closing-cards .preview-total{padding:14px;margin:12px 0}
.closing-cards .big{font-size:28px}
.closing-cards .note{margin:8px 0;font-size:11px}
.closing-cards .tablewrap{max-height:270px;overflow:auto}
.closing-cards td,.closing-cards th{padding:7px;font-size:11px}
.closing-cards th{position:sticky;top:0;z-index:1}
.closing-history{border-top:1px solid #e1e9ee;margin-top:14px;padding-top:10px}
.closing-history h3{font-size:14px;margin:0 0 8px}
/* Closing cards stay inside the PC viewport, regardless of history size. */
.closing-cards{height:calc(100dvh - 275px);min-height:280px;align-items:stretch}
.closing-cards>.card{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:12px}
.closing-cards>.card>.cardhead{flex:0 0 auto;margin-bottom:8px}
.closing-cards .closing-bonus-types{flex:0 0 auto;margin-bottom:8px;font-size:12px}
.closing-cards .form{flex:0 0 auto;gap:6px;margin-bottom:6px}
.closing-cards .form input{height:30px;min-height:30px;padding:4px 5px;font-size:12px}
.closing-cards .form>.btn{height:30px;padding:5px 10px}
.closing-preview{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
.closing-preview:empty{display:none}
.closing-cards .closing-preview>.tablewrap{max-height:none;overflow:visible}
.closing-cards .preview-total{padding:10px;margin:6px 0}
.closing-cards .big{font-size:25px}
.closing-cards .closing-history{display:flex;flex-direction:column;flex:0 1 35%;min-height:72px;overflow:hidden;margin-top:8px;padding-top:8px}
.closing-cards .closing-preview:empty+.closing-history{flex:1 1 0}
.closing-history>h3{flex:0 0 auto;margin-bottom:5px}
.closing-cards .closing-history>.tablewrap{flex:1 1 0;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}
.closing-history>.empty{padding:16px}
.content:has(.closing-cards)>.footer{display:none}
.subaccount-dialog{width:min(1000px,94vw);max-height:90dvh;padding:16px;border:1px solid #bed1df;border-radius:12px;color:#183246;overflow:hidden}
.subaccount-dialog::backdrop{background:#102e4066}
.subaccount-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.subaccount-dialog h2{font-size:19px;margin:0}.subaccount-dialog h3{font-size:15px;margin:0 0 10px}
.subaccount-dialog-body{max-height:calc(90dvh - 80px);overflow:auto;padding-right:4px}
.subaccount-owner{font-size:15px;font-weight:700;margin:8px 0}
.subaccount-dialog .tablewrap{max-height:220px;overflow:auto}
.subaccount-dialog th{position:sticky;top:0;z-index:1}
.subaccount-dialog td,.subaccount-dialog th{padding:7px 9px;font-size:12px}
.subaccount-editor{margin-top:12px;border:1px solid #dce5ec;border-radius:8px;padding:12px;background:#f8fafb}
.subaccount-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;margin-bottom:10px}
.subaccount-fields label{display:grid;gap:5px;font-size:12px;min-width:0}
.subaccount-fields input,.subaccount-fields select{height:34px;min-width:0;width:100%;font-size:13px}
.subaccount-wide{grid-column:1/-1}
.subaccount-dialog fieldset{border:0;padding:0;margin:0;min-width:0}
.subaccount-dialog [hidden]{display:none!important}
.subaccount-dialog .inline-input>.btn{min-height:34px;padding:5px 8px;font-size:12px}
.subaccount-dialog .note{margin:8px 0;font-size:12px}
.sponsor-picker{position:fixed;z-index:1000;max-height:320px;display:flex;flex-direction:column;background:#fff;border:1px solid #aebfce;border-radius:9px;padding:9px;box-shadow:0 8px 28px #173b5033;color:#183246}
.sponsor-picker-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex:0 0 auto;padding-bottom:6px;border-bottom:1px solid #e1e9ee}
.sponsor-picker-head strong{font-size:14px}
.sponsor-picker .btn{font-size:11px;padding:5px 8px;min-height:26px}
.sponsor-picker-list{overflow:auto;min-height:0;max-height:245px;padding:4px 0;font-size:12px}
.sponsor-picker-list>[role=option]{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;background:#fff;color:#24465c;border:0;border-bottom:1px solid #eef2f5;padding:8px 7px}
.sponsor-picker-list>[role=option]:hover,.sponsor-picker-list>[role=option]:focus{background:#eaf7f2;outline:1px solid #168b79;outline-offset:-1px}
.sponsor-picker-list>[role=option]>strong{font-size:12px;font-weight:600}.sponsor-picker-list>[role=option]>span{font-size:11px;color:#657d96;white-space:nowrap}
.sponsor-picker [hidden]{display:none!important}
/* Short postcode and a wider base address in member management. */
.member-management-grid .member-registration .member-address-grid{grid-template-columns:145px minmax(0,1fr)}
.member-management-grid .member-registration .member-address-grid label:has([name="postalCode"]){grid-column:1!important}
.member-management-grid .member-registration .member-address-grid label:has([name="address"]){grid-column:2!important}
.member-management-grid .member-registration .member-address-grid label:has([name="addressDetail"]){grid-column:1/-1!important}
.member-management-grid .member-registration .member-address-grid [name="postalCode"]{width:62px;flex:0 0 62px;padding:4px}
.member-management-grid .member-registration .member-address-grid [data-address-search]{flex:1;min-width:0;padding:4px 2px;font-size:10px}
/* Swap phone and login ID positions in the member registration card. */
.member-management-grid .member-registration fieldset:first-of-type label:has([name="login"]){order:2;grid-column:auto!important}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="phone"]){order:5;grid-column:1/-1!important}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="login"]){grid-column:2}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="phone"]){grid-column:5}
/* Swap resident number and phone positions. */
.member-management-grid .member-registration fieldset:first-of-type label:has([name="phone"]){order:3;grid-column:auto!important}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="birth"]){order:5;grid-column:1/-1!important}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="phone"]){grid-column:3}
.member-registration fieldset:first-of-type .member-form-grid>label:has([name="birth"]){grid-column:5}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="birth"]){order:5;grid-column:auto!important}
.member-management-grid .member-registration fieldset:first-of-type label:has([name="email"]){order:6;grid-column:auto!important}
.main-account-numbers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.main-account-numbers label{display:grid;gap:4px;font-size:12px;color:#526e83}
.main-account-numbers input{height:32px;background:#f3f7f9;font-family:monospace;font-size:12px;min-width:0;width:100%;padding:5px 7px}
.subaccount-dialog .account-number-cell{font-family:monospace;font-size:11px;user-select:all}
/* Manual sales entry fits a single PC row. */
#sale-create.form{grid-template-columns:minmax(150px,1.25fr) minmax(100px,1fr) minmax(100px,1fr) minmax(100px,1fr) minmax(135px,1.15fr) minmax(110px,1fr) minmax(135px,1.1fr);gap:8px;align-items:end;margin-bottom:0}
#sale-create.form>label{min-width:0;white-space:nowrap;font-size:12px}
#sale-create.form input,#sale-create.form select{min-width:0;width:100%;height:34px;min-height:34px;padding:5px 7px;font-size:12px}
#sale-create.form>.btn{height:34px;padding:6px 9px;font-size:12px;white-space:nowrap}
.sales-search-form{display:grid;grid-template-columns:minmax(240px,2fr) repeat(2,minmax(125px,1fr)) repeat(2,minmax(95px,.8fr)) repeat(3,auto);gap:8px;align-items:end;margin-bottom:12px}
.sales-search-form label{display:grid;gap:5px;font-size:12px;min-width:0}
.sales-search-form input,.sales-search-form select{height:34px;min-width:0;width:100%;padding:5px 7px;font-size:12px}
.sales-search-form>.btn{height:34px;padding:6px 10px;white-space:nowrap}
.sales-search-summary{font-size:12px;color:#526e83;margin:10px 0;line-height:1.7}
.sales-pages{align-items:center;margin-top:10px}
.sales-pages>span{font-size:12px;color:#657d96}
.sales-pages button:disabled{opacity:.4;cursor:default}
#sales-search-result>.tablewrap{max-height:calc(100dvh - 470px);min-height:100px;overflow:auto}
#sales-search-result th{position:sticky;top:0;z-index:1}
#sales-search-result th,#sales-search-result td{padding:7px 9px;font-size:12px}
/* Dense sales rows with the full management page bounded by the viewport. */
.content:has(#sales-search){display:flex;flex-direction:column;height:calc(100dvh - 125px);min-height:0;padding-top:16px;padding-bottom:16px;overflow:hidden}
.content:has(#sales-search)>.heading{flex:0 0 auto;margin-bottom:12px}
.content:has(#sales-search)>#page{display:flex;flex-direction:column;flex:1;min-height:0;gap:10px}
.content:has(#sales-search)>#page>.spacer{display:none}
.content:has(#sales-search)>#page>.card{padding:12px;min-width:0}
.content:has(#sales-search)>#page>.card:first-child{flex:0 0 auto}
.content:has(#sales-search)>#page>.card:last-child{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.content:has(#sales-search) .cardhead{margin-bottom:8px;flex:0 0 auto}
.content:has(#sales-search)>.footer{display:none}
.content:has(#sales-search) #sale-create+.note{margin:7px 0 0;font-size:11px;line-height:1.4}
.sales-search-form{flex:0 0 auto;margin-bottom:6px}
#sales-search-result{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.sales-search-summary{flex:0 0 auto;margin:5px 0;font-size:11px}
#sales-search-result>.tablewrap{flex:1;min-height:0;max-height:none;overflow:auto}
#sales-search-result td,#sales-search-result th{padding:4px 7px;font-size:11px;line-height:1.25}
#sales-search-result .badge{padding:2px 5px;line-height:1.2}
#sales-search-result .btn{padding:4px 7px;font-size:11px;min-height:24px}
#sales-search-result .muted{font-size:10px}
.sales-pages{flex:0 0 auto;margin-top:6px}
body:has(#sales-search) .shell{height:100dvh;min-height:0;display:flex;flex-direction:column}
body:has(#sales-search) .sidebar{flex:0 0 auto}
body:has(#sales-search) .main{display:flex;flex-direction:column;flex:1;min-height:0}
body:has(#sales-search) .topbar{flex:0 0 auto}
body:has(#sales-search) .content{height:auto;flex:1;min-height:0;width:100%;margin:0 auto}
/* Increase all sales-management text by 2px. */
.content:has(#sales-search)>.heading h1{font-size:26px}
.content:has(#sales-search)>.heading .sub{font-size:15px}
.content:has(#sales-search)>.heading .pill{font-size:13px}
.content:has(#sales-search) .cardhead h2{font-size:18px}
.content:has(#sales-search) #sale-create.form>label,
.content:has(#sales-search) #sale-create.form input,
.content:has(#sales-search) #sale-create.form select,
.content:has(#sales-search) #sale-create.form>.btn{font-size:14px}
.content:has(#sales-search) #sale-create+.note{font-size:13px}
.content:has(#sales-search) .sales-search-form label,
.content:has(#sales-search) .sales-search-form input,
.content:has(#sales-search) .sales-search-form select{font-size:14px}
.content:has(#sales-search) .sales-search-form>.btn{font-size:14px}
.content:has(#sales-search) .sales-search-summary{font-size:13px}
.content:has(#sales-search) #sales-search-result td,
.content:has(#sales-search) #sales-search-result th{font-size:13px}
.content:has(#sales-search) #sales-search-result .muted{font-size:12px}
.content:has(#sales-search) #sales-search-result .badge{font-size:12px}
.content:has(#sales-search) #sales-search-result .btn{font-size:13px}
.content:has(#sales-search) .sales-pages>.btn{font-size:14px}
.content:has(#sales-search) .sales-pages>span{font-size:14px}
.content:has(#sales-search)>.heading h1{font-size:24px}
.content:has(#sales-search) .cardhead h2{font-size:17px}

/* Shared content typography matches sales management, excluding system settings. */
.content.standard-type{font-size:14px}
.content.standard-type>.heading h1{font-size:24px}
.content.standard-type>.heading .sub{font-size:15px}
.content.standard-type>.heading .pill{font-size:13px}
.content.standard-type .cardhead h2{font-size:17px}
.content.standard-type :is(label,input,select,textarea,.btn){font-size:14px!important}
.content.standard-type :is(td,th){font-size:13px!important}
.content.standard-type :is(.note,.sales-search-summary,.foot,.legend){font-size:13px!important}
.content.standard-type :is(.muted,.badge){font-size:12px!important}
.content.standard-type :is(.stat small,.row,.closing-bonus-types){font-size:14px}
.content.standard-type :is(label,input,select,textarea){min-width:0}
.content.standard-type input:not([type=checkbox]):not([type=radio]),
.content.standard-type select{max-width:100%}
.content.standard-type #sales-search-result .btn{font-size:13px!important}

/* Sales and product management share a bounded two-card workspace. */
.content:has(#sales-search)>#page{display:grid;grid-template-columns:minmax(0,3fr) minmax(290px,1fr);align-items:stretch}
.sales-management-main{display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0;border:1px solid #e0e8ee;border-radius:12px;background:#fff;padding:12px}
.sales-management-main>.card{padding:0;border:0;box-shadow:none;min-width:0}
.sales-management-main>.spacer{display:none}
.sales-management-aside{display:grid;grid-template-rows:minmax(0,4fr) minmax(0,6fr);gap:10px;min-width:0;min-height:0;overflow:hidden}
.sales-management-aside>.card{padding:12px;min-width:0;min-height:0}
.sales-management-aside>.sale-detail-card{display:flex;flex-direction:column;flex:4 1 0;min-height:0;overflow:hidden}
.sales-management-aside>.product-management{display:flex;flex-direction:column;flex:6 1 0;min-height:0;overflow:auto}
#sale-detail{flex:1;min-height:0;overflow:auto;padding-right:4px}
#sale-detail>.empty{padding:22px 8px;margin:0;white-space:normal;font-size:13px}
#sale-detail h3{font-size:14px;margin:14px 0 6px;padding-bottom:6px;border-bottom:1px solid var(--admin-line,#ccd9e4)}
#sale-detail h3:first-child{margin-top:0}
.sale-detail-fields{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.sale-detail-fields>div{display:flex;flex-direction:column;gap:4px;min-width:0;padding:7px 0;border-bottom:1px solid var(--admin-line,#e0e8ee)}
.sale-detail-fields dt{font-size:12px;color:var(--admin-muted,#526b80)}
.sale-detail-fields dd{margin:0;font-size:13px;font-weight:600;overflow-wrap:anywhere;color:var(--admin-text,#183246)}
.sales-management-aside #product-editor{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(76px,.65fr);align-items:end;flex:none;margin-bottom:8px}
.sales-management-aside #product-editor>.product-identity-row{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,3fr) minmax(0,7fr);gap:8px;min-width:0}
.sales-management-aside #product-editor>.product-identity-row>label{grid-column:auto;min-width:0}
.sales-management-aside #product-editor>.actions{grid-column:1/-1}
.sales-management-aside .product-management>.note{margin:6px 0;font-size:12px!important;line-height:1.45}
.sales-management-aside .product-list{flex:none;max-height:160px;overflow:auto}
#sales-search-result tbody tr{cursor:pointer}
#sales-search-result tbody tr:focus-visible{outline:2px solid #159b8a;outline-offset:-2px}
body[data-admin-theme] #sales-search-result tr.is-selected,body[data-admin-theme] #sales-search-result tr.is-selected>td{background:var(--admin-hover);color:var(--admin-text)}
body[data-admin-theme] .sales-management-aside #product-editor.is-editing-product{background:var(--admin-muted-surface)}
.sales-management-main>.card:last-child{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.sales-management-main #sale-create.form{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.sales-management-main .sales-search-form{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.sales-management-main .sales-search-form>label:first-child{grid-column:1/-1}
.sales-management-main .sales-search-form>.btn{height:30px}
.content:has(#sales-search)>#page>.product-management{display:flex;flex-direction:column;overflow:hidden;min-height:0;padding:12px}
#product-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#product-editor label{display:grid;gap:4px;min-width:0}
#product-editor label:has([name=name]),#product-editor>.actions{grid-column:1/-1}
#product-editor input,#product-editor select{height:32px;min-width:0;width:100%;padding:4px 6px}
#product-editor.is-editing-product{background:#fff5da;border-radius:6px;padding:8px}
.product-management .product-list{overflow:auto;min-height:0;flex:1}
.product-management .note{margin:8px 0}
.product-list td,.product-list th{padding:6px;white-space:nowrap}
.product-pick{display:block;background:transparent;color:#183d50;text-align:left;padding:0;font-size:14px}
.product-pick small{display:block;color:#788e9d;font-size:12px}
.product-list th{position:sticky;top:0}

/* Sales and products use a 6:4 column ratio. */
.content:has(#sales-search)>#page{grid-template-columns:minmax(0,6fr) minmax(0,4fr)}

.product-list tbody tr{cursor:pointer}
.product-list tbody tr:hover{background:#f0f7fb}
.product-list tbody tr.is-selected{background:#fff0bf}
.product-list tbody tr:focus-visible{outline:2px solid #168b79;outline-offset:-2px}

.product-pick small{display:inline;margin-left:6px}
.product-list td,.product-list th{padding:5px 6px;line-height:1.4}
.product-list .product-pick{white-space:nowrap}

.content:has(#sales-search)>#page{grid-template-columns:minmax(0,7fr) minmax(0,3fr)}

.sales-management-main #sale-create.form{grid-template-columns:minmax(90px,1.25fr) minmax(85px,1.2fr) minmax(65px,.8fr) minmax(75px,.95fr) minmax(70px,.9fr) minmax(112px,1.05fr) minmax(75px,.85fr) minmax(105px,1fr);gap:5px}
.sales-management-main #sale-create.form input,.sales-management-main #sale-create.form select{padding:4px;min-width:0}
.sales-management-main #sale-create.form>.btn{padding:5px;min-width:0}

.sales-management-main .sales-search-form{grid-template-columns:minmax(150px,2fr) repeat(2,minmax(112px,1.1fr)) repeat(2,minmax(72px,.8fr)) repeat(3,auto);gap:5px;align-items:end}
.sales-management-main .sales-search-form>label:first-child{grid-column:auto}
.sales-management-main .sales-search-form input,.sales-management-main .sales-search-form select{padding:4px;min-width:0}
.sales-management-main .sales-search-form>.btn{height:34px;padding:5px 8px}

.member-management-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

.member-management-grid .member-registration fieldset:has([name=accountHolder]) .member-form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);gap:8px}
.member-management-grid .member-registration fieldset:has([name=accountHolder]) .member-form-grid>label{grid-column:auto!important}

.member-management-grid .member-registration fieldset:has([name="sponsorId"]) .member-form-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([data-sponsor-query]){grid-row:1!important;grid-column:1/span 3!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([name=sponsorId]){grid-row:1!important;grid-column:4/span 3!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label.placement-slot-field{grid-row:2!important;grid-column:1/span 2!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([name=centerId]){grid-row:2!important;grid-column:3/span 2!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label:has([data-placement-summary]){grid-row:2!important;grid-column:5/span 2!important}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label{min-width:0}
.member-management-grid .member-registration fieldset:has([name="sponsorId"]) select{min-width:0;width:100%}

.member-management-grid .member-registration fieldset:has([name="sponsorId"]) label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Keep member form actions beside the card title while retaining form events. */
.member-management-grid>.card:first-child{position:relative}
.member-management-grid>.card:first-child>.cardhead{min-height:34px;padding-right:290px}
.member-management-grid>.card:first-child>.cardhead h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.member-management-grid .member-registration>.actions{position:absolute;top:10px;right:12px;bottom:auto;display:flex;flex-wrap:nowrap;gap:6px;width:auto;margin:0;padding:0;background:transparent;box-shadow:none;border:0;z-index:3}
.member-management-grid .member-registration>.actions>.btn{white-space:nowrap;padding:6px 9px;min-height:32px}
.member-management-grid .member-registration>.actions>[data-member-mode]{display:none}

.member-registration .enrollment-sale-grid{display:grid;grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr));gap:8px}
.member-registration .enrollment-sale-grid label{display:grid;gap:4px;min-width:0}
.member-registration [data-enrollment-sale] small{font-size:12px;color:#647f90}
.member-registration [data-enrollment-sale][hidden]{display:none}

.member-management-grid>.card:not(:has(#member-create))>.cardhead{padding-right:0}
.member-management-grid>.card.is-editing-member [data-add-member]{display:none}


.member-form-placeholder :is(input,select):disabled{background:#f7f9fb;color:#788e9d;opacity:1}
.member-form-placeholder button{display:none}
.member-management-grid>.card:has(.member-form-placeholder)>.cardhead{padding-right:0}

#member-editor-slot{display:flex;flex:1;min-height:0;overflow:hidden}
#member-editor-slot>.member-registration{flex:1;min-height:0;width:100%;overflow:auto;padding-right:6px}

.member-management-grid>.card.is-adding-member{background:#eaf8f0;border-color:#72b999;box-shadow:inset 0 0 0 1px #a5d4bc}
.member-management-grid>.card.is-adding-member h2{color:#176644}
.member-management-grid .is-adding-member fieldset{background:#f7fdf9;border-color:#b5d9c6}
.member-management-grid .is-adding-member [data-save-member]{background:#208052}
.member-management-grid>.card.is-adding-member [data-add-member]{display:none}
.member-management-grid .is-adding-member .member-registration>.actions{background:transparent}

.member-management-grid .member-registration fieldset:has([name=sponsorId]) label:has([data-placement-summary]){grid-row:1!important;grid-column:4/span 3!important}
.member-management-grid .member-registration fieldset:has([name=sponsorId]) label:has([name=sponsorId]){grid-row:2!important;grid-column:1/span 2!important}
.member-management-grid .member-registration fieldset:has([name=sponsorId]) label.placement-slot-field{grid-row:2!important;grid-column:3/span 2!important}
.member-management-grid .member-registration fieldset:has([name=sponsorId]) label:has([name=centerId]){grid-row:2!important;grid-column:5/span 2!important}

#rank-search{display:flex;flex-wrap:nowrap;margin-bottom:8px}
#rank-search input{flex:1;min-width:0}
#rank-member-list tr{cursor:pointer}
#rank-member-list tbody tr:hover{background:#f0f7fb}
#rank-member-list tr.is-selected{background:#fff0bf}
#rank-member-list tr:focus-visible{outline:2px solid #168b79;outline-offset:-2px}
.rank-center-grid>.card.is-editing-rank{background:#fff5da;border-color:#d8ab49}
@media screen{
 body[data-admin-theme] .rank-center-grid>.card:is(.is-editing-rank,.is-editing-center){background:var(--admin-surface);color:var(--admin-text);border-color:#159b8a;box-shadow:inset 0 3px #159b8a}
 body[data-admin-theme] .rank-center-grid tbody tr:is(:hover,.is-selected),
 body[data-admin-theme] .rank-center-grid tbody tr:is(:hover,.is-selected)>td{background:var(--admin-hover);color:var(--admin-text)}
}
.rank-member-pages{align-items:center;margin-top:8px;font-size:13px}
#rank-update [data-rank-save]:disabled{opacity:.45;cursor:default}
#rank-member-list .tablewrap{max-height:calc(100dvh - 540px)}

.rank-center-grid #rank-update.form{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) auto;align-items:end;gap:8px}
.rank-center-grid #rank-update.form>.btn{grid-column:auto;height:36px;padding:6px 12px;white-space:nowrap}
.rank-center-grid #rank-update input,.rank-center-grid #rank-update select{height:36px;min-width:0;width:100%}

.member-readonly :is(input,select):disabled{background:#f7f9fb;color:#38566b;opacity:1}
.member-readonly button{display:none}
.member-management-grid>.card:has(.member-readonly)>.cardhead{padding-right:0}

.rank-center-grid>.card.is-editing-center{background:#fff5da;border-color:#d8ab49}
.rank-center-grid .is-editing-center tr.is-selected{background:#fff0bf}
#center-create .inline-input{display:flex;gap:5px}
#center-create .inline-input input{flex:1;min-width:0;width:100%}
#center-create .inline-input button{flex:none;white-space:nowrap;padding:5px 8px}
#center-create [hidden]{display:none!important}
.rank-center-grid .card:has(#center-create) tbody tr{cursor:pointer}
.rank-center-grid .card:has(#center-create) tbody tr:hover{background:#f0f7fb}

.subaccount-dialog [data-sub-placement]>.subaccount-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:start}
.subaccount-dialog [data-sub-placement] .subaccount-wide{grid-column:auto}
.subaccount-dialog [data-sub-placement] .inline-input{display:flex;gap:5px}
.subaccount-dialog [data-sub-placement] .inline-input>input{flex:1;min-width:0}
.subaccount-dialog [data-sub-placement] .inline-input>.btn{flex:none;white-space:nowrap}
.subaccount-dialog [data-sub-placement] label{min-width:0}

#subaccount-sale-form>.subaccount-fields{grid-template-columns:minmax(0,1.1fr) minmax(0,1.5fr) repeat(2,minmax(0,1fr));gap:8px}
.subaccount-dialog [data-main-accounts][hidden]{display:none!important}

#subaccount-sale-form .subaccount-fields{align-items:end}
#subaccount-sale-form .subaccount-fields>button[type=submit]{height:34px;padding:6px 10px;white-space:nowrap;grid-column:3}

/* Bound genealogy controls and canvas to a single screen. */
@media screen{
 body:has(.genealogy) .shell{height:100dvh;min-height:0;display:flex;flex-direction:column}
 body:has(.genealogy) .sidebar,body:has(.genealogy) .topbar{flex:none}
 body:has(.genealogy) .main{display:flex;flex-direction:column;flex:1;min-height:0}
 body:has(.genealogy) .content{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:14px 24px}
 body:has(.genealogy) .heading{flex:none;margin-bottom:12px}
 body:has(.genealogy) .content>.footer{display:none}
 body:has(.genealogy) #page{display:flex;flex:1;min-height:0}
 .genealogy{display:flex;flex-direction:column;flex:1;min-height:0}
 .gene-tabs,.gene-controls,.gene-results,.gene-status,.gene-help{flex:none}
 .genealogy .gene-viewport{flex:1;min-height:0;height:auto}
 .gene-help{margin:7px 0 0}
}

@media screen{
.genealogy{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto;column-gap:10px}
.genealogy>.gene-tabs{grid-column:1;grid-row:1;align-self:center;margin:0;white-space:nowrap}
.genealogy>.gene-controls{grid-column:2;grid-row:1;min-width:0;gap:6px;padding:7px}
.genealogy>.gene-results{grid-column:1/-1;grid-row:2}
.genealogy>.gene-status{grid-column:1/-1;grid-row:3}
.genealogy>.gene-viewport{grid-column:1/-1;grid-row:4;min-height:0;height:100%}
.genealogy>.gene-help{grid-column:1/-1;grid-row:5}
.gene-controls .gene-search{flex:1;min-width:160px}
.gene-controls .gene-search input{min-width:0;width:100%}
.gene-controls .gene-legend{margin-left:auto}
}

.closing-detail-dialog{width:min(1150px,95vw);max-height:90dvh;border:1px solid #c5d6e2;border-radius:12px;padding:18px;color:#183246}
.closing-detail-dialog::backdrop{background:#102e4066}
.closing-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.closing-detail-head h2{font-size:18px;margin:0}
.closing-detail-dialog .tablewrap{max-height:calc(90dvh - 190px);overflow:auto}
.closing-detail-dialog td,.closing-detail-dialog th{font-size:13px;padding:7px}
.closing-detail-dialog th{position:sticky;top:0}

.closing-name-sort{padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.closing-name-sort:hover{color:#168b79;text-decoration:underline}

.closing-pay-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.closing-pay-field>[data-closing-excel]{align-self:flex-end;min-height:28px;padding:4px 10px}
.closing-cards [data-closing-form]{align-items:end}

.closing-output-actions{display:flex;justify-content:flex-end;gap:5px}
.closing-output-actions>.btn{height:28px!important;padding:4px 9px;white-space:nowrap}
.closing-print-dialog{width:96vw;max-width:none;max-height:94dvh;padding:0;border:1px solid #c5d6e2;border-radius:8px;background:#e4e8ec;color:#111}
.closing-print-dialog::backdrop{background:#102e4066}
.closing-print-toolbar{position:sticky;top:0;z-index:2;display:flex;gap:12px;align-items:center;padding:12px;background:#fff;font-size:13px}
.closing-print-toolbar span{flex:1}
.closing-print-toolbar button{background:#168b79;color:#fff;padding:7px 14px;border-radius:5px}
.closing-print-pages{width:max-content;min-width:100%;padding:12px}
.closing-print-sheet{box-sizing:border-box;width:277mm;height:189mm;margin:0 auto 15px;padding:0;display:flex;flex-direction:column;background:white;overflow:hidden;color:#000;font-size:11pt;line-height:1.3;box-shadow:0 2px 10px #0002}
.closing-print-sheet header{flex:none;padding:5mm 0 3mm}
.closing-print-sheet h1{font-size:20pt;line-height:1.2;margin:0 0 3mm;text-align:center}
.closing-print-sheet header p{font-size:11pt;margin:0}
.closing-print-body{flex:1;min-height:0;overflow:hidden}
.closing-print-sheet table{table-layout:fixed;width:100%;border-collapse:collapse;white-space:normal;font-size:11pt}
.closing-print-sheet td,.closing-print-sheet th{border:1px solid #999;padding:1.5mm 1mm;font-size:11pt;line-height:1.3;overflow-wrap:anywhere;vertical-align:middle;color:#000}
.closing-print-sheet th{background:#eee;font-weight:600}
.closing-print-sheet .print-number{text-align:right}
.closing-print-sheet footer{flex:none;min-height:8mm;display:flex;align-items:center;justify-content:center;font-size:11pt}
@media print{
 @page{size:A4 landscape;margin:10mm}
 body:has(.closing-print-dialog)>:not(.closing-print-dialog){display:none!important}
 .closing-print-dialog{position:static!important;display:block!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;padding:0!important;margin:0!important;border:0!important;background:white!important;overflow:visible!important}
 .closing-print-dialog::backdrop{display:none}
 .closing-print-toolbar{display:none!important}
 .closing-print-pages{padding:0;margin:0;width:auto;min-width:0}
 .closing-print-sheet{width:277mm;height:189mm;margin:0;box-shadow:none;break-after:page;break-inside:avoid}
 .closing-print-sheet:last-child{break-after:auto}
}

@media print{body:has(.closing-print-dialog){min-width:0!important;width:auto!important;margin:0!important;padding:0!important;background:white!important}}

/* Shared closing print: 20 data rows per page, horizontal rules only. */
.closing-print-sheet td,.closing-print-sheet th{border:0;border-bottom:1px solid #aaa;padding:1mm 1mm;line-height:1.2;height:7mm;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.closing-print-sheet thead th{border-top:1px solid #777;border-bottom:1px solid #777}

/* Compact 25-row A4 closing reports. */
.closing-print-sheet td{font-size:10pt;line-height:1.15;height:5.6mm;padding:.7mm 1mm}
.closing-print-sheet th{font-size:11pt;text-align:center;line-height:1.15;height:6mm;padding:.8mm 1mm}
.closing-print-sheet header p,.closing-print-sheet footer{font-size:10pt}

.sale-approve-methods{display:inline-flex;gap:4px;white-space:nowrap}

.payout-closing-select{margin-bottom:12px;padding:12px}.payout-closing-select label{display:flex;align-items:center;gap:10px}.payout-closing-select select{min-width:300px;max-width:100%;font-size:14px}

@media screen{
 body:has(.payout-tabs) .shell{height:100dvh;min-height:0;display:flex;flex-direction:column}
 body:has(.payout-tabs) .sidebar,body:has(.payout-tabs) .topbar{flex:none}
 body:has(.payout-tabs) .main{display:flex;flex-direction:column;flex:1;min-height:0}
 body:has(.payout-tabs) .content{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:14px 24px}
 body:has(.payout-tabs) .heading{flex:none;margin-bottom:12px}
 body:has(.payout-tabs) .footer{display:none}
 body:has(.payout-tabs) #page{display:flex;flex-direction:column;flex:1;min-height:0}
 .payout-tabs{flex:none;margin-bottom:8px}
 #payments-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:10px;flex:1;min-height:0}
 #payments-panel>.payout-closing-select{grid-column:1/-1;grid-row:1;margin:0;padding:9px 12px}
 #payments-panel>.card:not(.payout-closing-select){grid-row:2;min-width:0;min-height:0;padding:12px;display:flex;flex-direction:column;overflow:hidden}
 #payments-panel>.spacer{display:none}
 #payments-panel .cardhead{margin-bottom:8px;flex:none}
 #payments-panel .note{margin:6px 0;font-size:12px}
 #group-payments,#payout-entry-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
 #payments-panel td,#payments-panel th{padding:5px 7px;line-height:1.3}
 #payments-panel th{position:sticky;top:0;z-index:1}
 #payments-panel .btn{padding:5px 8px}
 #group-payments td:first-child{white-space:nowrap}
 #group-payments details{min-width:130px}
 #group-payments h3{font-size:14px;margin:12px 0 6px}
 #caps-panel{flex:1;min-height:0;overflow:auto}
}

#group-payments-query{display:flex;align-items:center;flex-wrap:nowrap;gap:8px}
#group-payments-query>label{display:flex;align-items:center;gap:8px;white-space:nowrap;margin:0}
#group-payments-query input{width:140px;height:34px;min-width:0}
#group-payments-query>.btn{height:34px;white-space:nowrap}

.payout-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex:1;min-width:0;margin-left:3px;font-size:11px;color:#647f90}
.payout-totals span{min-width:0;white-space:nowrap}
.payout-totals strong{display:block;color:#183d50;font-size:12px}
.payout-totals span:last-child strong,.payout-net{color:#168b79}
#group-payments-query>label{gap:5px;font-size:12px!important}
#group-payments-query input{width:125px}

.payout-totals{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.payout-totals span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.payout-totals strong{display:inline;font-size:12px}

#group-payments-query{overflow-x:auto;flex-shrink:0;padding-bottom:3px}
#group-payments-query>.btn,#group-payments-query>label{flex-shrink:0}
.payout-totals{flex-wrap:nowrap;flex:0 0 auto}

.payout-totals,.payout-totals strong{font-size:12px}

#group-payments-query>.btn,#group-payments-query .payout-totals,#group-payments-query .payout-totals span,#group-payments-query .payout-totals strong{font-size:14px!important;line-height:1.4}

#group-payments input[type=checkbox]{width:16px;height:16px;cursor:pointer}
#payments-panel .card:has(#group-payments)>.cardhead{gap:8px}
[data-selected-paid]{white-space:nowrap}
[data-selected-paid]:disabled{opacity:.45;cursor:default}
.payout-complete-dialog{width:min(650px,92vw);border:1px solid #c5d6e2;border-radius:12px;padding:20px;color:#183246}
.payout-complete-dialog::backdrop{background:#102e4066}
.payout-complete-dialog h2{font-size:18px;margin:0 0 12px}
.payout-complete-dialog p,.payout-complete-dialog label{font-size:14px}
.payout-complete-dialog input{display:block;width:100%;margin:6px 0 14px}

#paid-panel[hidden]{display:none!important}
#paid-panel{flex:1;min-height:0}
#paid-panel>.card{height:100%;display:flex;flex-direction:column;min-height:0;padding:12px}
#paid-history-search{align-items:end;flex:none;margin-bottom:8px}
#paid-history-search label{display:grid;gap:4px}
#paid-history-list{overflow:auto;flex:1;min-height:0}
#paid-history-list th{position:sticky;top:0}
#paid-history-list th,#paid-history-list td{padding:6px 8px}

.payout-status-label{display:inline-block;margin-left:4px;font-size:12px;white-space:nowrap}#group-payments td:first-child{white-space:nowrap}

#paid-history-search{gap:7px;flex-wrap:wrap}#paid-history-search input[type=date]{width:135px}#paid-history-search select{max-width:240px}#paid-history-search .btn{white-space:nowrap}#paid-history-list input[type=checkbox]{width:16px;height:16px}
/* Member portal: larger navigation and content bounded by the viewport. */
@media screen {
 body.member-portal:has(.shell.member){height:100dvh;overflow:hidden}
 body.member-portal .shell.member{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 .member .sidebar{position:static;flex:none;padding:10px 16px}
 .member .nav{font-size:16px;padding-top:5px;padding-bottom:max(7px,env(safe-area-inset-bottom));min-height:62px}
 .member .nav button{font-size:16px;font-weight:600;line-height:1.25;min-height:48px;padding:4px 2px;word-break:keep-all}
 .member .main{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}
 .member .topbar{flex:none;height:38px}
 body.member-portal .member .content{display:flex;flex:1;flex-direction:column;min-height:0;max-width:480px;margin:0 auto;padding:10px 12px calc(70px + env(safe-area-inset-bottom))}
 .member .heading{flex:none;margin-bottom:8px;gap:5px}
 .member .heading h1{font-size:22px;margin-bottom:3px}
 .member .heading .pill{padding:3px 7px}
 .member .member-account-switch{flex:none;gap:3px;margin-bottom:8px;padding:8px 10px}
 .member .member-account-switch label{gap:3px}
 .member .member-account-switch select{min-height:34px;padding:5px 8px}
 .member .member-account-switch span{font-size:11px;line-height:1.35}
 .member .content>.footer{display:none}
 .member #page{display:flex;flex:1;flex-direction:column;gap:8px;min-height:0;overflow:auto;overscroll-behavior:contain}
 .member #page>.stats{flex:none;margin:0;gap:8px}
 .member #page>.card{flex:1;min-height:0;overflow:auto;margin:0;padding:12px}
 .member #page>.spacer{display:none}
 .member #page>.grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none;margin:0}
 .member #page>.grid>.card{padding:10px;margin:0;min-width:0;max-height:180px;overflow:auto}
 .member .cardhead{margin-bottom:8px}
 .member .stat{padding:10px}
 .member .stat strong{font-size:22px;margin:5px 0}
 .member .stat:last-child:nth-child(odd){grid-column:auto}
 .member .big{font-size:25px;margin:7px 0}
 .member .note{margin:8px 0;line-height:1.5}
 .member .row{padding:7px 0;flex-wrap:wrap}
 .member .spacer{height:8px}
 .member-records{gap:7px}
 .member-record{padding:9px}
 .record-amount{font-size:21px;margin:5px 0}
 .member #page:has(.genealogy){overflow:hidden}
 .member .genealogy{min-width:0;min-height:0;width:100%;overflow:hidden}
 .member .gene-viewport{min-height:0;height:100%}
 .member .gene-controls{flex-wrap:wrap;min-width:0}
}
.portal-brand-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.portal-demo-notice{flex:none;font-size:11px;font-weight:600;line-height:1.4;color:#9de6d6;background:#1c4350;border:1px solid #35616a;padding:4px 8px;border-radius:5px;white-space:nowrap}
.member .portal-demo-notice{font-size:11px}
@media screen {
 .member #page>.stats{grid-template-columns:minmax(0,1fr)}
 .member #page>.stats>.stat{display:flex;align-items:center;gap:10px;padding:10px 12px;min-width:0}
 .member #page>.stats>.stat small{flex:1;min-width:0;white-space:nowrap;font-size:13px}
 .member #page>.stats>.stat strong{flex:none;white-space:nowrap;font-size:22px;margin:0}
 .member #page>.stats>.stat .foot{flex:none;white-space:nowrap;font-size:11px}
}
@media screen and (max-width:380px){
 .member #page>.stats>.stat{gap:6px;padding:9px 8px}
 .member #page>.stats>.stat small{font-size:12px}
 .member #page>.stats>.stat strong{font-size:19px}
 .member #page>.stats>.stat .foot{font-size:10px}
}
@media screen{.member #page>.grid>.card:only-child{grid-column:1/-1}}
.member .member-cap-amount{font-size:clamp(18px,5vw,25px);white-space:nowrap;letter-spacing:-.6px}
/* Compact member cards while preserving the current text sizes. */
@media screen{
 .member #page{gap:6px}
 .member #page>.stats{gap:5px}
 .member #page>.stats>.stat{padding:6px 10px;line-height:1.25}
 .member #page>.stats>.stat strong{line-height:1.25}
 .member #page>.card,.member #page>.grid>.card{padding:9px 10px}
 .member #page>.grid{gap:6px}
 .member .cardhead{margin-bottom:5px}
 .member .cardhead h2{line-height:1.3}
 .member .big{margin:4px 0;line-height:1.3}
 .member .sub{line-height:1.35}
 .member .note{margin:5px 0;line-height:1.4}
 .member .spacer{height:4px}
 .member .row{padding:5px 0;line-height:1.35}
 .member-records{gap:5px}
 .member-record{padding:7px 9px}
 .member .record-heading{line-height:1.3}
 .member .record-amount{margin:4px 0;line-height:1.25}
 .member .record-meta{line-height:1.4}
 .member .badge{padding:3px 6px;line-height:1.3}
}
.member .cardhead:has(.member-cap-guidance){gap:8px;align-items:center}
.member .cardhead:has(.member-cap-guidance) h2{flex:none}
.member-cap-guidance{font-size:10px;line-height:1.35;color:#647f90;text-align:right;word-break:keep-all}
.member .member-account-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.member .member-account-heading>label,.member #page .cardhead h2,.member #page>.stats>.stat small{font-size:16px;font-weight:700;line-height:1.3;color:#183246;letter-spacing:0}
.member .member-account-heading>label{flex:none;white-space:nowrap}
.member .member-account-heading>span{font-size:10px;font-weight:400;line-height:1.35;text-align:right;word-break:keep-all;min-width:0}
.member .content.standard-type .member-account-heading>label{font-size:16px!important}
@media screen{
 .member #page>.card:has(.member-recent-sales){flex:none;overflow:hidden}
 .member-recent-sales{max-height:108px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 .member-recent-sale{display:flex;align-items:center;gap:7px;height:36px;min-height:36px;border-bottom:1px solid #e4edf2;font-size:12px;white-space:nowrap}
 .member-recent-sale>.recent-product{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
 .member-recent-sale>strong,.member-recent-sale>.badge{flex:none}
 .member #page>.card:has(.member-downline-sales){display:flex;flex-direction:column;min-height:90px;overflow:hidden}
 .member-downline-sales{flex:1;min-height:0;overflow:auto}
 .member-downline-sales .tablewrap{overflow:visible}
 .member-downline-sales table{font-size:12px;width:100%}
 .member-downline-sales th{position:sticky;top:0;z-index:1;background:#eef4f7;font-weight:600}
 .member-downline-sales th,.member-downline-sales td{padding:6px 7px;border:1px solid #dce6ec;line-height:1.35}
 .member-downline-sales td:last-child{text-align:right}
}
.member #own-profile{display:flex;flex-direction:column;gap:8px;margin:0;align-items:stretch}
.member .own-profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.member .own-profile-fields label{min-width:0;gap:4px}
.member .own-profile-fields input{width:100%;min-width:0;padding:7px 8px;min-height:34px}
.member .own-profile-fields input[readonly]{background:#f0f4f7;color:#637b89}
/* Member genealogy controls use the full card width in stacked rows. */
@media screen{
 .member .genealogy{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto minmax(0,1fr) auto;gap:5px}
 .member .genealogy>.gene-tabs{grid-column:1;grid-row:1;display:grid;grid-template-columns:1fr 1fr;width:100%;gap:6px}
 .member .gene-tabs button{padding:7px 10px;min-height:34px;font-size:14px}
 .member .genealogy>.gene-controls{grid-column:1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) auto;padding:7px;gap:6px;width:100%}
 .member .gene-controls>.gene-zoom{grid-column:1;grid-row:1;gap:4px}
 .member .gene-zoom button{height:30px;min-width:29px;padding:0 6px}
 .member .gene-controls>.gene-depth{grid-column:2;grid-row:1;display:flex;gap:4px;font-size:12px}
 .member .gene-depth select{min-height:30px;height:30px;width:48px;padding:3px 5px}
 .member .gene-controls>.gene-search{grid-column:1;grid-row:2;width:100%;min-width:0;max-width:none;gap:5px}
 .member .gene-search input{min-height:32px;height:32px;padding:5px 7px}
 .member .gene-search .btn,.member .gene-controls>[data-gene=print]{min-height:32px;padding:5px 9px;height:32px;white-space:nowrap}
 .member .gene-controls>[data-gene=print]{grid-column:2;grid-row:2}
 .member .gene-controls>.gene-legend{grid-column:1/-1;grid-row:3;justify-content:flex-start;margin:0;gap:8px;font-size:10px}
 .member .genealogy>.gene-results{grid-column:1;grid-row:3;max-height:100px;overflow:auto;margin:0}
 .member .genealogy>.gene-status{grid-column:1;grid-row:4;padding:2px;min-height:18px}
 .member .genealogy>.gene-viewport{grid-column:1;grid-row:5;min-height:0;height:100%}
 .member .genealogy>.gene-help{grid-column:1;grid-row:6;margin:0;font-size:10px;line-height:1.35}
}
.member .own-address-search{display:flex;align-items:center;gap:5px;min-width:0}
.member .own-address-search>input{flex:1;min-width:0;width:65px}
.member .own-address-search>.btn{flex:none;min-height:34px;height:34px;padding:5px 7px;white-space:nowrap}
.member .own-registration-actions{display:flex;gap:8px;margin-top:8px}
.member .own-registration-actions>.btn{flex:1}
.member-enrollment-dialog{width:min(920px,96vw);max-height:92dvh;overflow:auto;border:1px solid #cbd9e6;border-radius:12px;padding:16px;color:#183246}
.member-enrollment-dialog::backdrop{background:#102e4055}
@media(max-width:600px){.member-enrollment-dialog .member-form-grid,.member-enrollment-dialog .member-address-grid{grid-template-columns:1fr}.member-enrollment-dialog .enrollment-sale-grid{grid-template-columns:1fr}}
/* Registration dialogs follow the member portal's phone-sized layout. */
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog){width:min(480px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:auto;padding:12px;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border-radius:12px}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) .subaccount-dialog-head{position:sticky;top:-12px;z-index:3;background:#fff;padding:8px 0;margin:0 0 8px;gap:8px;min-width:0}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) h2{font-size:18px;margin:0}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) :is(input,select){min-height:40px;font-size:16px;width:100%;min-width:0}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) label{min-width:0;font-size:13px}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) .btn{min-height:38px;font-size:14px;padding:7px 10px}
.member-portal .member-enrollment-dialog .member-registration{gap:9px}
.member-portal .member-enrollment-dialog .member-registration fieldset{padding:9px;min-width:0}
.member-portal .member-enrollment-dialog .member-registration :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid){grid-template-columns:minmax(0,1fr);gap:9px}
.member-portal .member-enrollment-dialog .member-registration :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid)>*{grid-column:auto!important;min-width:0}
.member-portal .member-enrollment-dialog .member-registration .inline-input{flex-wrap:wrap}
.member-portal .member-enrollment-dialog .member-registration .inline-input>input{flex:1 1 130px;width:130px}
.member-portal .member-enrollment-dialog .member-registration .actions{position:sticky;bottom:-12px;background:#fff;padding:9px 0;margin:0;z-index:2}
.member-portal .member-enrollment-dialog .member-registration .actions>.btn{flex:1}
.member-portal .subaccount-dialog .subaccount-dialog-body{overflow:visible;max-height:none;min-width:0}
.member-portal .subaccount-dialog :is(.subaccount-fields,[data-sub-placement]>.subaccount-fields,#subaccount-sale-form>.subaccount-fields){grid-template-columns:minmax(0,1fr);gap:9px}
.member-portal .subaccount-dialog .subaccount-fields>*{grid-column:auto!important;min-width:0}
.member-portal .subaccount-dialog .inline-input{display:flex;min-width:0;gap:5px}
.member-portal .subaccount-dialog .inline-input>input{flex:1;width:100px;min-width:0}
.member-portal .subaccount-dialog .tablewrap{max-width:100%;overflow:auto;max-height:180px}
.member-portal .subaccount-dialog :is(.subaccount-editor,.subaccount-owner,.note){min-width:0;overflow-wrap:anywhere}
@media(max-width:360px){.member-portal :is(.member-enrollment-dialog,.subaccount-dialog){padding:9px}.member-portal .member-enrollment-dialog .member-registration fieldset{padding:7px}}
.member-portal .member-enrollment-dialog .member-registration fieldset .member-form-grid{grid-template-columns:minmax(0,1fr)!important}
.member-portal .member-enrollment-dialog .member-registration fieldset .member-form-grid>label{grid-column:1/-1!important}
.member-portal .member-enrollment-dialog .member-registration .member-address-grid{grid-template-columns:minmax(0,1fr)!important}
.member-portal .member-enrollment-dialog .member-registration .member-address-grid>label{grid-column:1/-1!important}
/* Phone registration labels sit beside their input controls. */
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid,.subaccount-fields)>label{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;column-gap:8px;row-gap:4px;line-height:1.35}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid,.subaccount-fields)>label>:is(input,select,.inline-input,.resident-input){grid-column:2;min-width:0}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid,.subaccount-fields)>label>:is(small,button){grid-column:2}
.member-portal .member-enrollment-dialog .member-registration .inline-input{flex-wrap:wrap}
.member-portal .member-enrollment-dialog .member-registration .inline-input>input{flex:1 1 80px;width:80px}
.member-portal .member-enrollment-dialog .member-registration .resident-input{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:3px}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) input::placeholder{font-size:12px}
@media(max-width:380px){.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid,.subaccount-fields)>label{grid-template-columns:82px minmax(0,1fr);column-gap:6px;font-size:12px}}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid,.subaccount-fields)>label{white-space:normal;word-break:keep-all;overflow-wrap:anywhere;min-width:0}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) .modal-field-caption{min-width:0;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;line-height:1.4;grid-column:1;grid-row:1;align-self:center}
.member-portal .member-enrollment-dialog .member-registration fieldset:first-of-type .member-form-grid>label:has([name=login]),.member-portal .member-enrollment-dialog .member-registration fieldset:first-of-type .member-form-grid>label:has([name=password]){display:none}
.member-portal .member-enrollment-dialog .member-registration fieldset:first-of-type .member-form-grid>label:has([name=name]){order:1}
.member-portal .member-enrollment-dialog .member-registration fieldset:first-of-type .member-form-grid>label:has([name=phone]){order:2}
.member-portal .member-enrollment-dialog .member-registration fieldset:first-of-type .member-form-grid>label:has([name=birth]){order:3}
.member-portal .member-enrollment-dialog .member-registration fieldset:first-of-type .member-form-grid>label:has([name=email]){order:4}
/* Clear desktop row assignments in phone registration forms. */
.member-portal .member-enrollment-dialog .member-registration fieldset :is(.member-form-grid,.member-address-grid,.enrollment-sale-grid)>label{grid-row:auto!important}
.member-portal .subaccount-dialog .subaccount-fields>label{grid-row:auto!important}
/* Match registration input text to its field caption. */
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) label{font-size:13px}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) label :is(input,select,textarea){font-size:13px;font-weight:700}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) input::placeholder{font-size:13px;font-weight:700}
@media(max-width:380px){
 .member-portal :is(.member-enrollment-dialog,.subaccount-dialog) label{font-size:12px}
 .member-portal :is(.member-enrollment-dialog,.subaccount-dialog) label :is(input,select,textarea),.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) input::placeholder{font-size:12px;font-weight:700}
}
.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) label,.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) .modal-field-caption{font-size:13px!important}
@media(max-width:380px){.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) label,.member-portal :is(.member-enrollment-dialog,.subaccount-dialog) .modal-field-caption{font-size:12px!important}}
.member-portal .member-enrollment-dialog .member-registration label:has([name=sponsorId]){display:none!important}
.member-portal .member-enrollment-dialog .member-registration .enrollment-sale-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px}
.member-portal .member-enrollment-dialog .member-registration .enrollment-sale-grid>label:first-child{grid-column:1/-1!important}
.member-portal .member-enrollment-dialog .member-registration .enrollment-sale-grid>label:not(:first-child){grid-column:auto!important;grid-template-columns:auto minmax(0,1fr);column-gap:5px}
.member-portal .member-enrollment-dialog .enrollment-sale-grid [data-enrollment-price],.member-portal .member-enrollment-dialog .enrollment-sale-grid [data-enrollment-pv]{padding:6px;text-align:right}
.member-portal .member-enrollment-dialog .member-registration label:has([name=centerId]){display:none!important}
.member-portal .subaccount-dialog #subaccount-sale-form>.subaccount-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.member-portal .subaccount-dialog #subaccount-sale-form>.subaccount-fields>label{grid-column:1/-1!important}
.member-portal .subaccount-dialog #subaccount-sale-form>.subaccount-fields>label:has([data-sub-sale-price]),.member-portal .subaccount-dialog #subaccount-sale-form>.subaccount-fields>label:has([data-sub-sale-pv]){grid-column:auto!important;grid-template-columns:minmax(0,1fr);gap:4px}
.member-portal .subaccount-dialog #subaccount-sale-form label:has([data-sub-sale-price])>input,.member-portal .subaccount-dialog #subaccount-sale-form label:has([data-sub-sale-pv])>input{grid-column:1;grid-row:2;text-align:right}
.member-portal .member-enrollment-dialog .member-registration .enrollment-sale-grid>label:not(:first-child){grid-template-columns:minmax(0,1fr);gap:4px}
.member-portal .member-enrollment-dialog .enrollment-sale-grid>label:not(:first-child)>input{grid-column:1;grid-row:2}
.member-portal .subaccount-dialog #subaccount-sale-form>.subaccount-fields>label:has([name=saleDate]),.member-portal .subaccount-dialog #subaccount-sale-form>.subaccount-fields>label:has([name=saleKind]){grid-column:auto!important;grid-template-columns:minmax(0,1fr);gap:4px}
.member-portal .subaccount-dialog #subaccount-sale-form label:has([name=saleDate])>input,.member-portal .subaccount-dialog #subaccount-sale-form label:has([name=saleKind])>select{grid-column:1;grid-row:2}
.member-portal .subaccount-dialog label:has([name=centerId]){display:none!important}
.member-portal .subaccount-card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
.member-portal .subaccount-card-heading h3{margin:0;font-size:16px;min-width:0}
.member-portal .subaccount-card-heading>.btn{flex:none;white-space:nowrap;padding:6px 9px;font-size:13px;min-height:34px}
.member-portal #owner-subaccount-form>.actions:empty{display:none}
.member-portal .subaccount-dialog label:has([name=sponsorId]),.member-portal .subaccount-dialog label:has([data-sub-sponsor-query]){display:none!important}
.member-recent-sale{gap:5px;font-size:11px}
.recent-sale-kind{color:#168b79;font-size:10px;flex:none;white-space:nowrap}
.member-entry-list{min-width:0}
.member-entry-row{display:flex;align-items:center;gap:7px;min-height:36px;padding:6px 0;border-bottom:1px solid #e1e9ee;white-space:nowrap;font-size:12px}
.member-entry-type{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.member-entry-date{color:#728998;font-size:11px}
.member-entry-amount,.member-entry-row>.badge{flex:none}
@media(max-width:380px){.member-entry-row{gap:4px;font-size:11px}.member-entry-date{font-size:10px}}
.member-allowance-search{display:grid;grid-template-columns:1fr 1fr auto auto;gap:5px;align-items:end;border-top:1px solid #e1e9ee;padding-top:7px;margin-top:4px}
.member .member-allowance-search label{font-size:11px;gap:3px;min-width:0}
.member .member-allowance-search input{width:100%;min-width:0;min-height:34px;padding:4px;font-size:12px!important}
.member .member-allowance-search .btn{min-height:34px;padding:5px 7px;font-size:12px!important}
.member-welcome{height:100dvh;width:100%;background:#020d17;display:flex;justify-content:center;overflow:hidden}
.member-welcome-image{display:block;height:100%;max-width:100%;padding:0;background:#020d17;line-height:0;cursor:pointer}
.member-welcome-image img{display:block;height:100%;width:auto;max-width:100vw;object-fit:contain;margin:auto}
.member-login-dialog{width:min(400px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:1px solid #d8b566;border-radius:14px;background:#fff;color:#183246;box-shadow:0 15px 60px #0006}
.member-login-dialog::backdrop{background:#0009}
.member-login-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}
.member-login-heading h2{font-size:20px;margin:0}
.member-login-dialog form{display:grid;gap:14px}
.member-login-dialog input{width:100%;font-size:16px;min-height:44px}
.member-login-dialog form>.btn{min-height:44px;font-size:16px;font-weight:700}
.local-member-preview{width:100%;margin-top:12px;min-height:40px}
/* Administrator themes: semantic colors shared by screens and dialogs. */
.portal-header-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.admin-theme-switch{display:flex;gap:3px;padding:3px;border:1px solid #50717f;border-radius:7px;background:#102a3b}
.admin-theme-switch button{padding:4px 12px;min-height:29px;border-radius:4px;font-size:13px;font-weight:600;color:#e2eaf0;background:transparent}
.admin-theme-switch button[aria-pressed=true]{background:#d9f6ed;color:#075849}
@media screen{
 body[data-admin-theme]{--admin-bg:#f0f4f8;--admin-surface:#fff;--admin-muted-surface:#eaf0f5;--admin-text:#183246;--admin-muted:#526b80;--admin-line:#ccd9e4;--admin-input:#fff;--admin-hover:#e6f3f5;background:var(--admin-bg);color:var(--admin-text);color-scheme:light}
 body[data-admin-theme=dark]{--admin-bg:#101820;--admin-surface:#1a2632;--admin-muted-surface:#243443;--admin-text:#e6edf5;--admin-muted:#b4c5d4;--admin-line:#42576b;--admin-input:#12202d;--admin-hover:#254958;color-scheme:dark}
 body[data-admin-theme] :is(.main,.content){background:var(--admin-bg);color:var(--admin-text)}
 body[data-admin-theme] :is(.card,.topbar,dialog,.gene-controls,.gene-results,.gene-viewport,.simulator-panel){background:var(--admin-surface);color:var(--admin-text);border-color:var(--admin-line)}
 body[data-admin-theme] :is(h1,h2,h3,h4,.topbar strong,td,.row strong,legend){color:var(--admin-text)}
 body[data-admin-theme] :is(label,.sub,.muted,.note,.foot,.legend,.footer,.stat small,small,th,.gene-status,.gene-help){color:var(--admin-muted)}
 body[data-admin-theme] :is(input,select,textarea){background:var(--admin-input);color:var(--admin-text);border-color:var(--admin-line)}
 body[data-admin-theme] input::placeholder,body[data-admin-theme] textarea::placeholder{color:var(--admin-muted);opacity:1}
 body[data-admin-theme] :is(input[readonly],input:disabled,select:disabled,th,thead,.preview-total,.demo-note){background:var(--admin-muted-surface);color:var(--admin-text)}
 body[data-admin-theme] :is(td,th,.row,fieldset,.subaccount-editor,.group-account-line){border-color:var(--admin-line)}
 body[data-admin-theme] .btn.light{background:var(--admin-muted-surface);color:var(--admin-text);border:1px solid var(--admin-line)}
 body[data-admin-theme] :is(.btn.primary,.btn){color:#fff}
 body[data-admin-theme] .btn.light{color:var(--admin-text)}
 body[data-admin-theme] .btn.primary{background:#087d6c}
 body[data-admin-theme=dark] .btn.primary{background:#087d6c}
 body[data-admin-theme] .btn.danger{background:#ad3e36;color:#fff}
 body[data-admin-theme] tbody tr:hover td{background:var(--admin-hover)}
 body[data-admin-theme] :is(tr.is-selected,.is-selected td){background:var(--admin-hover);color:var(--admin-text)}
 body[data-admin-theme] :is(.badge,.pill){background:#e2edf6;color:#294e6a}
 body[data-admin-theme] :is(.badge.green,.pill){background:#d8f3e8;color:#075e47}
 body[data-admin-theme] .badge.amber{background:#fff0c8;color:#754600}
 body[data-admin-theme=dark] .badge{background:#31485c;color:#d7e9fa}
 body[data-admin-theme=dark] :is(.badge.green,.pill){background:#174d40;color:#a8f0d4}
 body[data-admin-theme=dark] .badge.amber{background:#60471e;color:#ffe3a2}
 body[data-admin-theme=dark] .card.is-adding-member{background:#183d33;border-color:#4b967c}
 body[data-admin-theme=dark] .card.is-editing-member,body[data-admin-theme=dark] .card.is-editing-center{background:#443c24;border-color:#a38d4b}
 body[data-admin-theme=dark] .member-registration fieldset{background:transparent;border-color:var(--admin-line)}
 body[data-admin-theme=dark] .gene-node{background:var(--admin-surface);color:var(--admin-text);border-color:var(--admin-line)}
 body[data-admin-theme=dark] :is(.gene-tabs button,.gene-zoom button,.payout-tabs button,.plan-tabs button){background:var(--admin-muted-surface);color:var(--admin-text);border-color:var(--admin-line)}
 body[data-admin-theme=dark] :is(.gene-tabs button.active,.payout-tabs button[aria-selected=true],.plan-tabs button[aria-selected=true]){background:#126b60;color:#fff}
 body[data-admin-theme=dark] .chart text{fill:var(--admin-muted)}
 body[data-admin-theme=dark] .chart .axis{stroke:var(--admin-line)}
 body[data-admin-theme=dark] :is(a,.payout-net,.payout-totals strong){color:#79e1cf}
 body[data-admin-theme=dark] dialog::backdrop{background:#0009}
}
@media screen{
 body[data-admin-theme=dark] .member-management-grid>.card:is(.is-adding-member,.is-editing-member) h2{color:#e6edf5}
 body[data-admin-theme=dark] :is(.gene-node-count,.gene-node-rank){background:var(--admin-muted-surface);color:var(--admin-muted);border-color:var(--admin-line)}
 body[data-admin-theme=dark] .gene-node.right{border-color:#72b9df}
 body[data-admin-theme=dark] .gene-node.sponsor{border-color:#9bafff}
 body[data-admin-theme] .closing-print-sheet{background:#fff;color:#000;color-scheme:light}
 body[data-admin-theme] .closing-print-sheet :is(h1,h2,h3,p,span,td,th,strong,small){color:#000}
 body[data-admin-theme] .closing-print-sheet th{background:#eef0f2}
 body[data-admin-theme] .closing-print-sheet td{background:#fff}
}
/* Complete theme coverage for sales and simulator nested surfaces. */
@media screen{
 body[data-admin-theme] .sales-management-main{background:var(--admin-surface);border-color:var(--admin-line)}
 body[data-admin-theme] .product-pick{color:var(--admin-text)}
 body[data-admin-theme] :is(.product-pick small,.sales-search-summary,.sales-pages,.sales-pages span){color:var(--admin-muted)}
 body[data-admin-theme] :is(.sim-inputs>label,.sim-person-inputs,.sim-mini-stats>div,.sim-person-facts>span,.sim-assumptions,.sim-breakdown-row.expense,.sim-rate-bands>span){background:var(--admin-muted-surface);border-color:var(--admin-line);color:var(--admin-text)}
 body[data-admin-theme] :is(.sim-version,.sim-live,.sim-estimate-note,.sim-caption,.sim-card-head>span,.sim-person-detail,.sim-person-detail summary,.sim-policy-grid,.sim-rate-bands,.sim-assumptions summary,.sim-input>span,.sim-person-facts,.sim-metric>span,.sim-mini-stats span){color:var(--admin-muted)}
 body[data-admin-theme] :is(.sim-mini-stats strong,.sim-person-facts b,.sim-bar-row){color:var(--admin-text)}
 body[data-admin-theme] :is(.sim-breakdown-row,.sim-table-wrap){border-color:var(--admin-line)}
 body[data-admin-theme] .sim-person-total{background:#e5f4ed;border-color:#a5cfbe;color:#145943}
 body[data-admin-theme] .sim-person-total>span{color:#356953}
 body[data-admin-theme=dark] .sim-person-total{background:#173e34;border-color:#397861;color:#b9f5dd}
 body[data-admin-theme=dark] .sim-person-total>span{color:#b9d9cd}
 body[data-admin-theme=dark] .sim-person-total>strong{color:#89efd0}
 body[data-admin-theme=dark] :is(.sim-metric.sales strong,.sim-metric.profit strong){color:#75dec2}
 body[data-admin-theme=dark] :is(.sim-metric.cost strong,.sim-metric.payout strong,.sim-breakdown-row>span:last-child){color:#f5c46a}
 body[data-admin-theme=dark] :is(.sim-metric.loss strong,.negative){color:#ff9bb0}
 body[data-admin-theme=dark] :is(.sim-table-wrap th,.sim-table-wrap th:first-child,.sim-table-wrap td:first-child){background:var(--admin-muted-surface);color:var(--admin-text)}
 body[data-admin-theme=dark] .sim-table-wrap tbody tr.selected td{background:var(--admin-hover);color:var(--admin-text)}
 body[data-admin-theme=dark] .sim-bar-track{background:#344a5d}
 body[data-admin-theme=dark] .sim-bar-row:hover{background:var(--admin-hover)}
}
.dashboard-member-counts .member-count-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}
.dashboard-member-counts .member-count-columns>div{min-width:0}
.dashboard-member-counts .member-count-columns>div+div{border-left:1px solid var(--admin-line,#d7e2ea);padding-left:9px}
.dashboard-member-counts .member-count-columns span{font-size:12px;color:var(--admin-muted,#526b80);white-space:nowrap}
.dashboard-member-counts .member-count-columns strong{font-size:25px;margin:4px 0 0;white-space:nowrap}
.dashboard-member-counts .member-count-columns strong small{font-size:12px;font-weight:400;margin-left:2px}
.dashboard-payout-counts .payout-card-values{display:grid;gap:5px;margin:8px 0}
.dashboard-payout-counts .payout-card-values>div{display:flex;align-items:center;justify-content:space-between;gap:5px}
.dashboard-payout-counts .payout-card-values span{color:var(--admin-muted,#526b80);font-size:12px;white-space:nowrap}
.dashboard-payout-counts .payout-card-values strong{font-size:21px;margin:0;white-space:nowrap}
.dashboard-payout-counts .payout-card-values>div:last-child strong{color:#946000}
@media screen{body[data-admin-theme=dark] .dashboard-payout-counts .payout-card-values>div:last-child strong{color:#f5c46a}}
@media screen{
 .closing-detail-dialog>[data-detail-search]{margin-bottom:8px}
 .closing-detail-dialog .detail-pages{margin-top:9px;align-items:center;font-size:13px}
 #group-payments>.actions,#payout-entry-list>.actions,#paid-history-list>.actions{flex:none;align-items:center;gap:8px;padding-top:6px;font-size:12px}
}
/* Member screens use the phone's installed Korean font: no large font download. */
body.member-portal{font-family:-apple-system,BlinkMacSystemFont,'Malgun Gothic','Apple SD Gothic Neo',system-ui,sans-serif}
.member-list-pages{display:flex;justify-content:space-between;align-items:center;gap:6px;padding-top:5px;font-size:11px;color:#526b80}
.member .member-list-pages .btn{min-height:27px;padding:3px 7px;font-size:11px!important}
.member #page>.card:has([data-member-recent]){flex:none;overflow:hidden}
.member-downline-sales{display:flex;flex-direction:column;overflow:hidden}
.member-downline-sales>.tablewrap{flex:1;min-height:0;overflow:auto}
.member-downline-sales>.member-list-pages{flex:none}
.member-recent-sale{height:30px;min-height:30px}
.member-recent-sales{max-height:90px}

/* Dashboard: five summary cards in one row. */
.dashboard-summary-cards{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1.15fr) minmax(0,.85fr) minmax(0,1.3fr);align-items:stretch;gap:10px}
.dashboard-summary-cards>.card{min-width:0;margin:0;padding:14px}
.dashboard-summary-cards .stat>strong{font-size:26px;white-space:nowrap}
.dashboard-summary-cards .member-count-columns{gap:5px}
.dashboard-summary-cards .member-count-columns strong{font-size:22px}
.dashboard-summary-cards .payout-card-values strong{font-size:18px}
.dashboard-summary-cards .foot{font-size:11px}
.dashboard-operation,[data-dashboard-view]{cursor:pointer}
[data-dashboard-view]:focus-visible{outline:2px solid #149b8a;outline-offset:2px}
.dashboard-operation .cardhead{margin-bottom:6px}
.dashboard-operation h2{font-size:15px}
.dashboard-operation .row{padding:5px 0;font-size:11px;gap:5px}
.dashboard-operation .row strong{white-space:nowrap}
.dashboard-operation .badge{font-size:10px;padding:3px 5px}
.dashboard-operation:focus-visible{outline:2px solid #149b8a;outline-offset:2px}
@media(max-width:1000px){.dashboard-summary-cards{overflow-x:auto;grid-template-columns:200px 230px 230px 170px 250px}}

.dashboard-summary-cards{grid-template-columns:minmax(0,1.15fr) minmax(0,1.15fr) minmax(0,1.1fr) minmax(0,1.25fr)}
.dashboard-sales-summary .sales-card-values{display:grid;gap:10px;margin:10px 0}
.dashboard-sales-summary .sales-card-values>div{display:flex;align-items:center;justify-content:space-between;gap:8px}
.dashboard-sales-summary .sales-card-values span{font-size:12px;color:var(--admin-muted,#526b80);white-space:nowrap}
.dashboard-sales-summary .sales-card-values strong{font-size:22px;margin:0;white-space:nowrap}
@media(max-width:1000px){.dashboard-summary-cards{grid-template-columns:250px 230px 230px 250px}}

.dashboard-sales-summary .sales-card-values>div:last-child strong{font-size:18px}

.dashboard-member-counts .member-count-columns{grid-template-columns:minmax(0,1fr);gap:7px;margin:8px 0}
.dashboard-member-counts .member-count-columns>div{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dashboard-member-counts .member-count-columns>div+div{border-left:0;padding-left:0}
.dashboard-member-counts .member-count-columns strong{margin:0;font-size:22px}

/* Shared dashboard summary styling, matching operation status. */
.dashboard-summary-cards>.stat>small{display:block;font-size:15px;font-weight:700;line-height:1.4;color:var(--admin-text,#183246);margin:0 0 6px}
.dashboard-summary-cards .sales-card-values,.dashboard-summary-cards .member-count-columns,.dashboard-summary-cards .payout-card-values{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:0}
.dashboard-summary-cards .sales-card-values>div,.dashboard-summary-cards .member-count-columns>div,.dashboard-summary-cards .payout-card-values>div{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:5px 0;border:0;border-bottom:1px solid var(--admin-line,#d7e2ea);font-size:11px;line-height:1.5}
.dashboard-summary-cards .sales-card-values>div:last-child,.dashboard-summary-cards .member-count-columns>div:last-child,.dashboard-summary-cards .payout-card-values>div:last-child{border-bottom:0}
.dashboard-summary-cards .sales-card-values span,.dashboard-summary-cards .member-count-columns span,.dashboard-summary-cards .payout-card-values span{font-size:11px;color:var(--admin-text,#183246)}
.dashboard-summary-cards .sales-card-values strong,.dashboard-summary-cards .sales-card-values>div:last-child strong,.dashboard-summary-cards .member-count-columns strong,.dashboard-summary-cards .payout-card-values strong{font-size:11px;line-height:1.5;font-weight:700;margin:0;letter-spacing:0}
.dashboard-summary-cards .member-count-columns strong small{font-size:11px;font-weight:700;margin-left:2px}
.dashboard-summary-cards .stat .foot{display:block;margin-top:8px;font-size:11px;color:var(--admin-muted,#526b80)}

body[data-admin-theme] .dashboard-summary-cards>.stat>small,body[data-admin-theme] .dashboard-operation h2{font-size:17px!important;font-weight:700;line-height:1.45;margin:0}
body[data-admin-theme] .dashboard-summary-cards>.stat>small{margin-bottom:6px}
body[data-admin-theme] .dashboard-summary-cards .sales-card-values span,body[data-admin-theme] .dashboard-summary-cards .member-count-columns span,body[data-admin-theme] .dashboard-summary-cards .payout-card-values span,body[data-admin-theme] .dashboard-summary-cards .sales-card-values strong,body[data-admin-theme] .dashboard-summary-cards .member-count-columns strong,body[data-admin-theme] .dashboard-summary-cards .member-count-columns strong small,body[data-admin-theme] .dashboard-summary-cards .payout-card-values strong{font-size:14px!important;line-height:1.45;font-weight:400}
body[data-admin-theme] .dashboard-summary-cards .sales-card-values strong,body[data-admin-theme] .dashboard-summary-cards .member-count-columns strong,body[data-admin-theme] .dashboard-summary-cards .member-count-columns strong small,body[data-admin-theme] .dashboard-summary-cards .payout-card-values strong{font-weight:600}

body[data-admin-theme] .dashboard-summary-cards .sales-card-values strong,body[data-admin-theme] .dashboard-summary-cards .member-count-columns strong,body[data-admin-theme] .dashboard-summary-cards .member-count-columns strong small,body[data-admin-theme] .dashboard-summary-cards .payout-card-values strong,body[data-admin-theme] .dashboard-summary-cards .dashboard-operation .row strong{font-size:var(--dashboard-number-size,20px)!important;line-height:1.3;font-weight:700;white-space:nowrap;flex-shrink:0}

/* Equal headings and separators across every dashboard summary row. */
body[data-admin-theme] .dashboard-summary-cards>.stat>small,body[data-admin-theme] .dashboard-summary-cards .dashboard-operation h2{font-family:inherit!important;font-size:17px!important;font-weight:700!important;line-height:1.45!important;letter-spacing:0!important;color:var(--admin-text,#183246)!important}
body[data-admin-theme] .dashboard-summary-cards .sales-card-values>div,body[data-admin-theme] .dashboard-summary-cards .member-count-columns>div,body[data-admin-theme] .dashboard-summary-cards .payout-card-values>div,body[data-admin-theme] .dashboard-summary-cards .dashboard-operation .row{border-bottom:1px solid var(--admin-line,#d7e2ea)!important}

.operations-memo{display:block;width:100%;min-height:90px;max-height:240px;resize:vertical;white-space:pre-wrap;line-height:1.6;padding:10px;border:1px solid var(--admin-line,#ccd9e4);border-radius:6px;background:var(--admin-surface,#fff);color:var(--admin-text,#183246)}
.operations-memo[readonly]{cursor:text}
.operations-memo:not([readonly]){outline:2px solid #149b8a;outline-offset:1px}

body[data-admin-theme] #page:has(>.dashboard-summary-cards){display:flex;flex-direction:column;height:calc(100dvh - 260px);min-height:480px;gap:12px}
body[data-admin-theme] #page>.dashboard-summary-cards{flex:none;margin:0}
body[data-admin-theme] #page>.card:has([data-operations-memo]){display:flex;flex-direction:column;flex:1 1 auto;min-height:110px;margin:0;overflow:hidden}
body[data-admin-theme] #page>.card:has([data-operations-memo]) .cardhead{flex:none;margin-bottom:6px}
body[data-admin-theme] .operations-memo{flex:1;min-height:0;max-height:none;resize:none;font-size:28px!important;line-height:1.4}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{flex:0 1 230px;min-height:150px;overflow:auto;margin:0}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child .cardhead{margin-bottom:8px}

body[data-admin-theme] #page textarea.operations-memo[data-operations-memo]{font-size:28px!important}
body[data-admin-theme] #page:has(>.dashboard-summary-cards){height:calc(100dvh - 285px);min-height:0}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{flex-basis:190px}


body[data-admin-theme] .content:has(.dashboard-summary-cards) .heading>div{display:flex;align-items:center;gap:16px}
body[data-admin-theme] .content:has(.dashboard-summary-cards) .heading h1,body[data-admin-theme] .content:has(.dashboard-summary-cards) .heading .sub{margin:0}
body[data-admin-theme] #page:has(>.dashboard-summary-cards){height:calc(100dvh - 260px)}

body[data-admin-theme] #page>.card:has([data-operations-memo]){flex:0 0 150px;min-height:0}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{flex:1 1 auto;min-height:150px}

body[data-admin-theme] #page textarea.operations-memo[data-operations-memo]{font-size:17px!important}
body[data-admin-theme] #page>.card:has([data-operations-memo]){flex-basis:195px}

body[data-admin-theme] #page .dashboard-summary-cards .dashboard-operation .row strong,body[data-admin-theme] #page .dashboard-summary-cards .payout-card-values strong{font-family:inherit!important;font-size:var(--dashboard-number-size,20px)!important;font-weight:700!important;line-height:1.3!important;letter-spacing:0!important}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child td .btn{min-height:0!important;height:auto!important;font-size:12px!important;line-height:1.45!important;padding:3px 5px!important;border-radius:5px;vertical-align:middle}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child td .btn{padding:2px 5px!important}

body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{display:flex;flex-direction:column;overflow:hidden;min-height:320px}
[data-dashboard-sales]{display:flex;flex-direction:column;min-height:0;flex:1}
.dashboard-sales-table{flex:1;min-height:0;overflow:auto}
body[data-admin-theme] .dashboard-sales-table th,body[data-admin-theme] .dashboard-sales-table td{padding:2px 7px!important;font-size:12px!important;line-height:1.35!important;height:24px}
body[data-admin-theme] .dashboard-sales-table .badge{padding:1px 5px!important;line-height:1.3!important}
.dashboard-sales-pages{flex:none;justify-content:center;gap:12px;margin-top:5px;font-size:12px}
.dashboard-sales-pages .btn{padding:3px 9px;font-size:12px}
body[data-admin-theme] #page>.card:has([data-operations-memo]){flex:1 1 130px;min-height:100px}
body[data-admin-theme] .dashboard-summary-cards .sales-card-values>div,body[data-admin-theme] .dashboard-summary-cards .member-count-columns>div,body[data-admin-theme] .dashboard-summary-cards .payout-card-values>div,body[data-admin-theme] .dashboard-summary-cards .dashboard-operation .row{padding-top:1px;padding-bottom:1px}body[data-admin-theme] #page>.card:has([data-operations-memo]){min-height:75px;flex:1 1 75px}body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{flex:0 0 360px;min-height:360px}
body[data-admin-theme] .dashboard-sales-table th,body[data-admin-theme] .dashboard-sales-table td{height:22px;padding-top:1px!important;padding-bottom:1px!important}body[data-admin-theme] #page>.card:has([data-operations-memo]){min-height:100px}body[data-admin-theme] #page:has(>.dashboard-summary-cards){height:calc(100dvh - 238px)}
body[data-admin-theme] .content:has(.dashboard-summary-cards)>.footer{margin:5px 0 0}body[data-admin-theme] .content:has(.dashboard-summary-cards){padding-bottom:5px}

body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child .cardhead{position:relative;min-height:38px;flex:none}
.dashboard-sales-pages{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0!important;white-space:nowrap;align-items:center;flex-wrap:nowrap;gap:12px;padding:4px;border:1px solid var(--admin-line,#ccd9e4);border-radius:9px;background:var(--admin-muted-surface,#eaf0f5)}
body[data-admin-theme] .dashboard-sales-pages,body[data-admin-theme] .dashboard-sales-pages span,body[data-admin-theme] .dashboard-sales-pages .btn{font-size:13px!important;line-height:1.45!important}
body[data-admin-theme] .dashboard-sales-pages .btn{display:inline-flex;align-items:center;justify-content:center;width:68px;min-height:28px;padding:3px 8px;background:var(--admin-surface);border:1px solid var(--admin-line);border-radius:6px;font-weight:600}
body[data-admin-theme] .dashboard-sales-pages .btn:disabled{opacity:.4;cursor:default}
body[data-admin-theme] .dashboard-sales-pages .btn:not(:disabled):hover{background:var(--admin-hover);border-color:#159b8a}
.dashboard-sales-page-count{display:inline-flex;gap:5px;align-items:baseline;font-variant-numeric:tabular-nums}
.dashboard-sales-page-count strong{color:var(--admin-text);font-size:14px;font-weight:800}
.dashboard-sales-page-count>span,.dashboard-sales-total{color:var(--admin-muted)}
.dashboard-sales-total{padding-left:12px;border-left:1px solid var(--admin-line)}
@media(max-width:640px){body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child .cardhead{flex-wrap:wrap;gap:8px}.dashboard-sales-pages{position:static;transform:none;margin-inline:auto!important;gap:7px}.dashboard-sales-total{padding-left:7px}}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{flex:0 0 310px;min-height:310px}body[data-admin-theme] #page>.card:has([data-operations-memo]){flex:1 1 auto;min-height:100px}
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{flex-basis:324px;min-height:324px}

.sale-approval-dialog{width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:1px solid #ccd9e4;border-radius:12px}
.sale-approval-dialog::backdrop{background:#0009}
.sale-approval-dialog form{display:grid;gap:16px}
.sale-approval-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sale-approval-heading h2{margin:0;font-size:19px}
.sale-approval-dialog label{display:grid;gap:7px;font-size:14px}
.sale-approval-dialog input{width:100%;min-height:42px;font-size:14px;font-weight:700}
.sale-approval-dialog .note{margin:0}
.sale-approval-dialog .actions{justify-content:flex-end}
.admin-password-screen{min-height:100dvh;display:grid;place-items:center;padding:24px}.admin-password-screen form{width:min(100%,440px);display:grid;gap:16px;background:white;padding:28px;border-radius:12px;border:1px solid #ccd9e4}.admin-password-screen h1{font-size:23px;margin:0}.admin-password-screen p{font-size:13px;line-height:1.6;margin:0}

.admin-welcome-portal{background:#030d17}.admin-welcome{height:100dvh;width:100%;display:grid;place-items:center;background:#030d17}.admin-welcome>button{display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:pointer}.admin-welcome img{display:block;width:100%;height:100%;object-fit:contain}.admin-login-dialog{width:min(440px,calc(100vw - 32px));border:1px solid #ccd9e4;border-radius:12px;padding:24px}.admin-login-dialog form{display:grid;gap:16px}

body[data-admin-theme] .topbar[hidden]{display:none!important}.admin-header-user{font-size:12px;white-space:nowrap}.portal-header-tools>.btn{padding:5px 10px;font-size:12px}

body[data-admin-theme] .portal-brand-row{position:relative}
body[data-admin-theme] .admin-top-title{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0!important;font-size:27px!important;line-height:1.3;font-weight:700;white-space:nowrap}
body[data-admin-theme] .content>.heading{display:none}
@media(max-width:900px){body[data-admin-theme] .admin-top-title{position:static;transform:none;order:3;width:100%;text-align:center}body[data-admin-theme] .portal-brand-row{flex-wrap:wrap}}

/* System settings theme contrast. */
body[data-admin-theme] .plan-form section.card.is-settings-dirty{background:#fff7e5;border-color:#cc9a35;box-shadow:inset 0 3px #cc9a35}
body[data-admin-theme=dark] .plan-form section.card.is-settings-dirty{background:#343021;border-color:#b48b43;box-shadow:inset 0 3px #b48b43}
.plan-form section.card.is-settings-dirty>h2::after{content:'수정 중';display:inline-block;margin-left:8px;padding:2px 6px;border-radius:4px;background:#fff0c8;color:#754600;font-size:11px;font-weight:600;vertical-align:middle;line-height:1.4}
body[data-admin-theme=dark] .plan-form section.card.is-settings-dirty>h2::after{background:#60471e;color:#ffe3a2}
body[data-admin-theme] .plan-form :is(.bonus-cycle-row>strong,.rank-condition-grid>strong,.rollup-grid>strong,.tier-sheet-head strong){color:var(--admin-text)}
body[data-admin-theme] .plan-form :is(.cap-policy-summary,.sheet-shortcuts,.tier-qualification summary,.plan-save,.plan-section>.note,.plan-fields>.muted){color:var(--admin-muted)}
body[data-admin-theme] .plan-form :is(.plan-save,.tier-row,.promotion-sheet){background:var(--admin-surface);border-color:var(--admin-line)}
body[data-admin-theme] .plan-form .tier-sheet-head{background:var(--admin-muted-surface);color:var(--admin-text);border-color:var(--admin-line)}
body[data-admin-theme] .plan-overview-grid [data-plan-section="10"] .tier-row:nth-child(odd){background:var(--admin-muted-surface)}
body[data-admin-theme] .plan-form :is(.bonus-cycle-row+.bonus-cycle-row,.tier-row,.rank-condition-grid,.rollup-grid){border-color:var(--admin-line)}
body[data-admin-theme] .plan-form .tier-row :is(input:not([type=hidden]),select){background:var(--admin-input,var(--admin-surface));color:var(--admin-text);border-color:var(--admin-line)}
body[data-admin-theme] .plan-form :is(input,select,textarea):focus{outline:2px solid #149b8a;outline-offset:1px}
body[data-admin-theme] .plan-form input[type=checkbox]{accent-color:#149b8a}
body[data-admin-theme=dark] .plan-form .tier-row>.btn{color:#ffb3be;border-color:var(--admin-line)}
body[data-admin-theme] .plan-tabs button.active{background:#126b60;color:white;border-color:#126b60}
body[data-admin-theme] .plan-overview-grid>.card{scrollbar-color:var(--admin-line) transparent}
body[data-admin-theme] .sidebar .admin-top-title{color:#edf5fb!important}body[data-admin-theme] .plan-form label{color:var(--admin-text)}body[data-admin-theme] .sidebar .admin-header-user{color:#c7dae8}

body[data-admin-theme] [data-admin-management] th,body[data-admin-theme] [data-admin-management] td{border:0!important;padding:4px 8px!important}
body[data-admin-theme] [data-admin-management] input{height:30px!important;min-height:30px;padding:4px 8px;width:100%}
body[data-admin-theme] [data-admin-management] .btn{min-height:30px;padding:4px 12px}
body[data-admin-theme] [data-admin-management] .note{margin:5px 0 8px}

.password-input-wrap{position:relative;display:block;width:100%;min-width:0}.password-input-wrap input{width:100%;padding-right:44px!important}.password-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:34px;height:34px;min-height:0!important;padding:6px!important;border:0;background:transparent;color:#526b80;cursor:pointer;border-radius:5px}.password-eye svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.password-eye-slash{display:none}.password-eye[aria-pressed=true] .password-eye-slash{display:block}.password-eye:focus-visible{outline:2px solid #149b8a}body[data-admin-theme=dark] .password-eye{color:#c3d6e5}

body[data-admin-theme] .member-management-grid{height:calc(100dvh - 145px);min-height:0}
body[data-admin-theme] .member-management-grid>.card.is-editing-member{background:var(--admin-surface);border-color:#159b8a;box-shadow:inset 0 3px #159b8a}
body[data-admin-theme] .member-management-grid fieldset{border-color:var(--admin-line);background:transparent}
body[data-admin-theme] #member-list th{background:var(--admin-muted-surface)!important;color:var(--admin-text)!important}
body[data-admin-theme] #member-list .tablewrap{max-height:none;flex:1;min-height:0;overflow:auto}
body[data-admin-theme] .member-management-grid label.member-email-reset{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:3px 8px;grid-column:1/-1!important}
.member-email-reset input{grid-column:1}.member-email-reset button{grid-column:2;grid-row:2;white-space:nowrap}
body[data-admin-theme] .member-management-grid .member-registration fieldset{padding:8px 10px;margin-bottom:8px}
body[data-admin-theme] .member-management-grid .member-registration{gap:6px}
body[data-admin-theme] .member-management-grid .member-registration fieldset:first-of-type .member-form-grid>label.member-email-reset{grid-column:1/-1!important;grid-template-columns:minmax(0,1fr) auto!important;width:100%}body[data-admin-theme] .member-management-grid .member-email-reset input{min-width:0;width:100%}
body[data-admin-theme] .member-management-grid #member-list tr[data-member-edit]:hover,body[data-admin-theme] .member-management-grid #member-list tr[data-member-edit]:hover>td,body[data-admin-theme] .member-management-grid #member-list tr.is-selected,body[data-admin-theme] .member-management-grid #member-list tr.is-selected>td{background:var(--admin-hover)!important;color:var(--admin-text)!important}body[data-admin-theme] .member-management-grid .member-registration>.actions{background:transparent!important;box-shadow:none!important;border:0!important}body[data-admin-theme] .member-management-grid .member-registration>.actions>.btn.light{background:var(--admin-muted-surface)!important;color:var(--admin-text)!important;border:1px solid var(--admin-line)!important}body[data-admin-theme] .member-management-grid .member-registration>.actions>.btn.primary{background:#087f71!important;color:white!important;border:1px solid #169b89!important}body[data-admin-theme] .member-management-grid .member-registration>.actions>.btn:hover{filter:brightness(1.12)}body[data-admin-theme] .member-management-grid #member-list td:focus-visible{outline:2px solid #149b8a;outline-offset:-2px}

@media screen{
body[data-admin-theme] dialog:not(.closing-print-dialog){background:var(--admin-surface);color:var(--admin-text);border-color:var(--admin-line);color-scheme:light}
body[data-admin-theme=dark] dialog:not(.closing-print-dialog){color-scheme:dark}
body[data-admin-theme] dialog:not(.closing-print-dialog) :is(.subaccount-editor,fieldset,.preview-total,.group-account-line){background:var(--admin-muted-surface)!important;border-color:var(--admin-line)!important;color:var(--admin-text)}
body[data-admin-theme] dialog:not(.closing-print-dialog) :is(h1,h2,h3,h4,legend,label,strong,summary){color:var(--admin-text)}
body[data-admin-theme] dialog:not(.closing-print-dialog) :is(.note,.sub,small,.muted,.sheet-shortcuts){color:var(--admin-muted)}
body[data-admin-theme] dialog:not(.closing-print-dialog) :is(input,select,textarea){background:var(--admin-input,var(--admin-surface));color:var(--admin-text);border-color:var(--admin-line)}
body[data-admin-theme] dialog:not(.closing-print-dialog) :is(input,select,textarea):disabled,body[data-admin-theme] dialog:not(.closing-print-dialog) input[readonly]{background:var(--admin-muted-surface);color:var(--admin-muted);opacity:1}
body[data-admin-theme] dialog:not(.closing-print-dialog) :is(.actions,.subaccount-dialog-head,.subaccount-card-heading){background:transparent!important}
body[data-admin-theme] dialog:not(.closing-print-dialog) th{background:var(--admin-muted-surface)!important;color:var(--admin-text)!important}
body[data-admin-theme] dialog:not(.closing-print-dialog) tbody tr:hover td{background:var(--admin-hover)!important;color:var(--admin-text)}
body[data-admin-theme] dialog:not(.closing-print-dialog) .btn.light{background:var(--admin-muted-surface);color:var(--admin-text);border-color:var(--admin-line)}
body[data-admin-theme] .sponsor-picker,body[data-admin-theme] .sponsor-picker-list>[role=option]{background:var(--admin-surface);color:var(--admin-text);border-color:var(--admin-line)}
body[data-admin-theme] .sponsor-picker-list>[role=option]>span{color:var(--admin-muted)}
body[data-admin-theme] .sponsor-picker-list>[role=option]:is(:hover,:focus){background:var(--admin-hover);outline-color:#149b8a}
}
@media screen{body[data-admin-theme] :is(#group-payments,#payout-entry-list,#paid-history-list){display:flex;flex-direction:column;overflow:hidden;min-height:0}body[data-admin-theme] :is(#group-payments,#payout-entry-list,#paid-history-list)>.tablewrap{flex:1 1 0;min-height:0;max-height:none!important;overflow:auto;overscroll-behavior:contain}body[data-admin-theme] :is(#group-payments,#payout-entry-list,#paid-history-list)>.actions{flex:0 0 auto;margin:5px 0 0}body[data-admin-theme] #payments-panel .tablewrap .tablewrap{overflow:visible;max-height:none}}

/* A shared viewport frame for every admin menu except system settings. */
@media screen{
body[data-admin-theme][data-admin-view]:not([data-admin-view=settings]){height:100dvh;overflow:hidden}
body[data-admin-theme][data-admin-view]:not([data-admin-view=settings]) .shell{height:100dvh;min-height:0;display:flex;flex-direction:column}
body[data-admin-theme][data-admin-view]:not([data-admin-view=settings]) .sidebar{flex:none}
body[data-admin-theme][data-admin-view]:not([data-admin-view=settings]) .main{display:flex;flex-direction:column;flex:1;min-height:0}
body[data-admin-theme][data-admin-view]:not([data-admin-view=settings]) .content{display:flex;flex-direction:column;flex:1;min-height:0;height:auto;width:100%;margin:0 auto;padding:14px 24px 8px;overflow:hidden}
body[data-admin-theme][data-admin-view]:not([data-admin-view=settings]) .content>.footer{flex:none;margin:5px 0 0;font-size:10px}
body[data-admin-theme][data-admin-view]:not([data-admin-view=settings]) #page{flex:1;min-height:0;height:auto!important;overflow:hidden}
body[data-admin-view=members] .member-management-grid,body[data-admin-view=ranks] .rank-center-grid,body[data-admin-view=settle] .closing-cards{height:100%;min-height:0;margin:0}
body[data-admin-view=ranks] .rank-center-grid>.card{display:flex;flex-direction:column;min-height:0;overflow:auto}
body[data-admin-view=ranks] #rank-member-list{flex:1;min-height:100px;overflow:auto}
body[data-admin-view=ranks] #rank-member-list .tablewrap{max-height:none;overflow:visible}
body[data-admin-view=audit] #page{display:flex;flex-direction:column;gap:10px}
body[data-admin-view=audit] #page>.card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
body[data-admin-view=audit] #page>.card:has([data-admin-management]){flex:none;max-height:48%;overflow:auto}
body[data-admin-view=audit] #page>.card:last-child{flex:1}
body[data-admin-view=audit] #page>.card:last-child>.tablewrap{flex:1;min-height:0;max-height:none;overflow:auto}
body[data-admin-view=simulator] .simulator{display:flex;flex-direction:column;height:100%;min-height:0}
body[data-admin-view=simulator] .simulator>.sim-form,body[data-admin-view=simulator] .simulator>.sim-live{flex:none}
body[data-admin-view=simulator] .sim-output{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:4px}
body[data-admin-view=tree] .genealogy{height:100%;min-height:0}
body[data-admin-view=tree] .gene-viewport{min-height:0}
body[data-admin-view=payouts] #caps-panel{height:100%;min-height:0;overflow:hidden}
body[data-admin-view=payouts] #caps-panel>.card{height:100%;display:flex;flex-direction:column;min-height:0}
body[data-admin-view=payouts] #caps-panel .tablewrap{flex:1;min-height:0;max-height:none;overflow:auto}
}

/* Keep the administrator genealogy canvas white in both themes. */
body[data-admin-theme] .gene-viewport{background:#fff;color:#183246}
body[data-admin-theme] .gene-node{background:#fff7f8;color:#19384b;border-color:#bd425c}
body[data-admin-theme] .gene-node .gene-node-top{background:#bd425c;color:#fff}
body[data-admin-theme] .gene-node.right{background:#f0f8ff;border-color:#287ca5}
body[data-admin-theme] .gene-node.right .gene-node-top{background:#287ca5}
body[data-admin-theme] .gene-node.sponsor{background:#f5f3ff;border-color:#6654ad}
body[data-admin-theme] .gene-node.sponsor .gene-node-top{background:#6654ad}
body[data-admin-theme] .gene-node.root-node{background:#edf8f5;border-color:#146b5b}
body[data-admin-theme] .gene-node.root-node .gene-node-top{background:#146b5b;color:#fff}
body[data-admin-theme] .gene-node-rank{background:transparent;color:#526b80}
body[data-admin-theme] .gene-node-count{background:#f0f5f9;color:#19384b;border-color:#ccd9e4}
body[data-admin-theme] .gene-more{background:#fff;color:#245976;border-color:#8ba9bd}
body[data-admin-theme] .gene-empty{background:#e8f5ee;color:#216547;border:1px solid #65a480}
body[data-admin-theme] .gene-node:hover{filter:brightness(.96);box-shadow:0 2px 7px #173a5e33}
body[data-admin-theme] :is(.gene-node,.gene-empty):focus-visible{outline:3px solid #d28b16;outline-offset:3px}
body[data-admin-theme] .gene-left{background:#bd425c}
body[data-admin-theme] .gene-right{background:#287ca5}
body[data-admin-theme] .gene-empty-color{background:#65a480}
body[data-admin-theme] .gene-node.root-node{background:#fff;border-color:#111}
body[data-admin-theme] .gene-node.root-node .gene-node-top{background:#111;color:#fff}
.member #page>.stats.member-summary-compact{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.member #page>.stats.member-summary-compact>.stat:first-child{grid-column:1/-1}
.member #page>.stats.member-summary-compact>.stat{min-width:0;flex-wrap:wrap}
.member #page>.stats.member-summary-compact>.stat .foot{display:none}
.member-repurchase-notices{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.member-repurchase-alert{background:#fff0d4;color:#813d00;border:1px solid #d59029;border-radius:8px;padding:10px 16px;font-size:16px;font-weight:700;animation:repurchase-pulse 1.6s ease-in-out infinite}
@keyframes repurchase-pulse{50%{background:#ffd275;box-shadow:0 0 0 3px #efa72d33}}
@media(prefers-reduced-motion:reduce){.member-repurchase-alert{animation:none}}
.member-repurchase-request form{display:grid;gap:12px}
/* Fifteen recent sales rows; the memo uses the remaining dashboard space. */
body[data-admin-theme] #page:has(>.dashboard-summary-cards)>.card:last-child{flex-basis:434px;min-height:434px}
body[data-admin-theme] #page>.card:has([data-operations-memo]){flex:1 1 auto;min-height:90px}
.dashboard-summary-cards{grid-template-columns:minmax(0,1.15fr) minmax(0,.75fr) minmax(0,1.1fr) minmax(0,1.65fr)}
@media(max-width:1000px){.dashboard-summary-cards{grid-template-columns:250px 180px 230px 360px}}
.notice-connection{flex:none!important;margin-bottom:10px}
.notice-connection p{margin:0;color:var(--admin-muted)}
.notice-workspace{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:12px;min-height:0;flex:1}
.notice-workspace>.card{display:flex;flex-direction:column;min-height:0}
.notice-workspace .tablewrap{flex:1;min-height:0;overflow:auto;max-height:45dvh}
.notice-workspace input[type=checkbox]{width:16px;height:16px;accent-color:#0a8a7b}
.notice-workspace form[data-notice-compose]{display:grid;gap:10px}
.notice-workspace textarea{resize:vertical;min-height:120px}
.notice-workspace [data-recipient-search] input{flex:1;min-width:100px}
.notice-message-preview{background:#fff2b8;color:#222;border-radius:9px;padding:14px;margin-top:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.notice-history{margin-top:12px;max-height:220px;overflow:auto;flex:none!important}
body[data-admin-view=notices] #page{display:flex;flex-direction:column;min-height:0;height:calc(100dvh - 160px);overflow:auto}
@media(max-width:900px){.notice-workspace{grid-template-columns:1fr}.notice-workspace .tablewrap{max-height:300px}}
.notice-recipient-column{display:flex;flex-direction:column;gap:12px;min-height:0}
.notice-recipient-card{display:flex;flex-direction:column;flex:1;min-height:0}
.notice-category-options{display:flex;flex-wrap:wrap;gap:10px 18px}
.notice-category-options label{display:flex;flex-direction:row;align-items:center;gap:6px;cursor:pointer;white-space:nowrap}
.notice-category-options input[type=radio]{width:16px;height:16px;accent-color:#0a8a7b}
.notice-category-card{flex:none}
.delivery-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.delivery-summary>.card{display:flex;align-items:center;justify-content:space-between;margin:0}
.delivery-summary strong{font-size:22px}
.delivery-workspace{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:12px;flex:1;min-height:0}
.delivery-workspace>.card{display:flex;flex-direction:column;min-height:0;margin:0}
.delivery-workspace .tablewrap{flex:1;overflow:auto;min-height:0}
.delivery-workspace [data-delivery-id]{cursor:pointer}
.delivery-workspace [data-delivery-id]:hover td{background:var(--admin-hover)}
.delivery-workspace [data-delivery-search] input{flex:1;min-width:120px}
.delivery-recipient{display:grid;grid-template-columns:80px minmax(0,1fr);gap:8px;margin:0 0 14px}
.delivery-recipient dt{color:var(--admin-muted)}
.delivery-recipient dd{margin:0;overflow-wrap:anywhere}
[data-delivery-detail]{overflow:auto}
[data-delivery-edit]{display:grid;gap:10px}
body[data-admin-view=deliveries] #page{display:flex;flex-direction:column;height:calc(100dvh - 160px);min-height:0}
@media(max-width:1000px){.delivery-workspace{grid-template-columns:1fr}body[data-admin-view=deliveries] #page{height:auto}.delivery-workspace .tablewrap{max-height:45dvh}}
.delivery-workspace [data-delivery-edit]{grid-template-columns:repeat(2,minmax(0,1fr))}
[data-delivery-edit]>p,[data-delivery-edit]>button,[data-delivery-edit]>label:has([name=address]),[data-delivery-edit]>label:has([name=addressDetail]),[data-delivery-edit]>label:has([name=memo]){grid-column:1/-1}
.delivery-workspace [data-delivery-edit]{gap:6px 10px}
.delivery-workspace [data-delivery-edit]>label{gap:3px;font-size:12px}
.delivery-workspace [data-delivery-edit] :is(input,select){height:30px;padding:4px 8px}
.delivery-workspace [data-delivery-edit]>p{margin:0 0 3px;font-size:11px;line-height:1.35}
.delivery-workspace [data-delivery-edit]>.delivery-address-search{grid-column:auto;align-self:end;height:30px;padding:4px 8px}
.delivery-workspace [data-delivery-edit]>label:has([name=memo]){grid-column:auto}
.delivery-workspace [data-delivery-edit] textarea[name=memo]{height:46px;min-height:46px;max-height:70px;resize:none;padding:5px 8px}
.delivery-workspace .delivery-recipient{gap:4px;margin-bottom:8px;font-size:12px}
.delivery-workspace [data-delivery-edit]>button[type=submit]{padding:6px 12px}

.delivery-member-cell{white-space:nowrap}
[data-delivery-list] table{border-collapse:collapse;width:100%}
body[data-admin-theme] [data-delivery-list] :is(th,td){border:1px solid var(--admin-line);padding:6px 8px}
[data-delivery-list] th{position:sticky;top:0;z-index:1}
body[data-admin-theme] [data-delivery-list] .delivery-selected td{background:var(--admin-hover)}
.delivery-tracking-cell{min-width:130px;font-variant-numeric:tabular-nums}
.delivery-tracking-input{width:100%;min-width:110px;height:28px;padding:3px 6px;border:2px solid #149b8a!important}
.delivery-tracking-input[aria-invalid=true]{border-color:#d76452!important}
.delivery-saved{box-shadow:inset 0 0 0 1px #149b8a}
[data-delivery-list] input[type=checkbox]{width:16px;height:16px;accent-color:#0a8a7b;cursor:pointer}
[data-delivery-list] th:first-child,[data-delivery-list] td:first-child{width:32px;text-align:center}
[data-delivery-complete][hidden]{display:none!important}
.delivery-workspace .delivery-recipient{font-size:15px;line-height:1.5;grid-template-columns:85px minmax(0,1fr);gap:6px}
.delivery-workspace .delivery-recipient dd{font-weight:600}
.delivery-workspace [data-delivery-edit]>label:has([name=memo]){grid-column:1/-1}
.delivery-workspace [data-delivery-edit] textarea[name=memo]{width:100%;box-sizing:border-box}
.delivery-workspace [data-delivery-search]{display:flex;align-items:flex-end;flex-wrap:nowrap;gap:6px}
.delivery-workspace [data-delivery-search]>input{min-width:100px;width:100%;flex:1}
.delivery-workspace [data-delivery-search]>select{width:110px;flex:none}
.delivery-date-filter{display:flex;flex-direction:column;gap:3px;font-size:11px;flex:0 0 136px}
.delivery-workspace [data-delivery-search] .delivery-date-filter input{width:136px;min-width:0;flex:none;padding-inline:5px}
.delivery-workspace [data-delivery-search]>.btn{flex:none}
@media(max-width:1200px){.delivery-workspace [data-delivery-search]{overflow-x:auto;padding-bottom:4px}}

/* Use the full desktop width for every administrator page. */
body[data-admin-theme] .content{width:100%;max-width:none;margin-left:0;margin-right:0}
.member-login-dialog .forgot-password{background:transparent;color:#c63434;text-align:center;text-decoration:underline;padding:7px 0;font-size:13px}
.password-reset-dialog>p{text-align:center;font-size:13px;color:#526b80;margin-bottom:16px}
.password-reset-dialog [hidden]{display:none!important}
.password-reset-dialog form{display:grid;gap:12px}
.password-reset-dialog [data-reset-message]{color:#a33131;font-size:12px;margin:12px 0}

/* Shared public homepage */
.public-home{height:100dvh;display:flex;flex-direction:column;background:#030d17;color:#f3d69c;overflow:hidden}.public-home-header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 32px;border-bottom:1px solid #a98a5540;flex-shrink:0}.public-home-header strong{font:700 24px Georgia,serif;letter-spacing:2px}.public-home-header nav{display:flex;gap:22px;align-items:center}.public-home-header button{background:transparent;border:1px solid transparent;color:#f3e5cd;font:inherit;font-size:16px;padding:10px 12px;border-radius:6px;cursor:pointer}.public-home-header button:hover,.public-home-header button:focus-visible{background:#b38b372e;color:#ffe1a0}.public-home-header [data-home-login]{border-color:#b18d54;padding:10px 24px}.public-home-image{flex:1;min-height:0;display:flex}.public-home-image img{display:block;width:100%;height:100%;object-fit:contain}.home-info-dialog{width:min(560px,calc(100vw - 32px));padding:28px;border:1px solid #a58c5f;border-radius:12px;background:#192a38;color:#edf4fa}.home-info-dialog p{font-size:17px;line-height:1.8}.home-login-tabs{display:flex;gap:8px;margin-bottom:20px}.home-login-tabs button{flex:1;border:1px solid #506373;border-radius:6px;background:#203341;color:#dceaf3;padding:10px;cursor:pointer}.home-login-tabs button[aria-pressed=true]{background:#087d72;color:white}@media(max-width:650px){.public-home-header{flex-wrap:wrap;padding:14px 16px;gap:12px}.public-home-header nav{width:100%;justify-content:space-between;gap:2px}.public-home-header button{font-size:14px;padding:8px 4px}.public-home-header [data-home-login]{padding:8px 14px}}

/* Company introduction */
.home-info-dialog.company-introduction-dialog{width:min(1160px,calc(100vw - 40px));max-width:1160px;max-height:calc(100dvh - 40px);padding:26px 30px 28px;box-sizing:border-box;overflow:auto;background:linear-gradient(135deg,#101d2a,#172b3b);color:#e7edf3;border-color:#937746;box-shadow:0 24px 80px #0008}
.company-intro-top{display:flex;justify-content:space-between;align-items:center;gap:16px}.company-intro-top>span{color:#c6aa73;font-size:12px;letter-spacing:3px}.company-intro-hero{position:relative;padding:10px 200px 24px 0;border-bottom:1px solid #b2955a55;margin-bottom:22px}.company-intro-brand{font-size:24px;font-weight:700;color:#f5dca7}.company-intro-brand span{font-size:16px;font-weight:400}.company-intro-hero h2{font-size:30px;line-height:1.4;color:#fff5df;margin:15px 0 10px;letter-spacing:-.6px}.company-intro-hero>p{font-size:14px;margin:0;color:#b9c9d7}.company-intro-route{position:absolute;right:0;top:42px;display:flex;flex-direction:column;align-items:center;justify-content:center;width:140px;height:140px;border:1px solid #a58a5366;border-radius:50%;font-size:14px;letter-spacing:3px;color:#efcf92;background:radial-gradient(circle,#57728b33,transparent)}.company-intro-route span{font-size:38px;line-height:1.3}.company-intro-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.company-intro-card{display:flex;gap:14px;padding:20px 18px;background:#ffffff05;border:1px solid #8297aa38;border-radius:10px;min-width:0}.company-intro-number{font-family:Georgia,serif;color:#bda16b;font-size:24px;flex-shrink:0}.company-intro-card h3{font-size:18px;color:#f0d49d;margin:0 0 12px}.company-intro-card p,.company-intro-card li{font-size:14px;line-height:1.7;color:#d6e1eb}.company-intro-card p{margin:0}.company-intro-card ul{padding-left:16px;margin:0}.company-intro-card li+li{margin-top:5px}.company-intro-flow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:18px;border:1px solid #a58a534a;border-radius:10px;background:#070f1933}.company-intro-flow>div{display:flex;gap:12px;align-items:center;padding:18px 14px;position:relative}.company-intro-flow>div+div{border-left:1px solid #a58a534a}.company-intro-flow span{font:22px Georgia,serif;color:#c9a765}.company-intro-flow strong{font-size:14px;color:#e6edf4}@media(max-width:900px){.company-intro-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.company-intro-hero h2{font-size:26px}.company-intro-flow{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.home-info-dialog.company-introduction-dialog{padding:18px;width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.company-intro-hero{padding-right:0}.company-intro-route{display:none}.company-intro-hero h2{font-size:23px}.company-intro-grid{grid-template-columns:1fr}.company-intro-flow>div{padding:14px 10px}.company-intro-flow strong{font-size:12px}}

/* Homepage sections */
.admin-welcome-portal{overflow:auto}.public-home{height:auto;min-height:100dvh;display:block;overflow:visible}.public-home-header{position:sticky;top:0;z-index:20;background:#040e19f5;backdrop-filter:blur(12px)}.public-home-brand-link{font:700 24px Georgia,serif;letter-spacing:2px;color:#f3d69c;text-decoration:none}.public-home-header nav a{display:inline-block;border:1px solid transparent;color:#f3e5cd;font:inherit;font-size:16px;padding:10px 12px;border-radius:6px;text-decoration:none}.public-home-header nav a:hover,.public-home-header nav a:focus-visible{background:#b38b372e;color:#ffe1a0}.public-home-image{height:calc(100dvh - 82px);min-height:320px;display:flex;scroll-margin-top:82px}.public-home-image img{width:100%;height:100%;object-fit:contain}.public-home-section{scroll-margin-top:100px;padding:64px max(32px,calc((100% - 1160px)/2));box-sizing:border-box}.public-home-section.company-introduction-dialog{background:linear-gradient(135deg,#101d2a,#172b3b);color:#e7edf3;border-top:1px solid #a58a534a;border-bottom:1px solid #a58a534a}.home-simple-section{min-height:420px;display:flex;flex-direction:column;justify-content:center;border-bottom:1px solid #a58a5340}.home-simple-section h2{font-size:34px;color:#f5dca7;margin:12px 0 22px}.home-simple-section p{font-size:18px;line-height:1.8;color:#d6e1eb;margin:6px 0}.home-section-eyebrow{font-size:12px;letter-spacing:3px;color:#c6aa73}#home-business{background:#102231}.public-home-footer{text-align:center;padding:28px 20px;color:#bca87d;font-size:13px;letter-spacing:1px}@media(max-width:650px){.public-home-brand-link{font-size:20px}.public-home-header nav a{font-size:14px;padding:8px 4px}.public-home-image{height:calc(100dvh - 120px);scroll-margin-top:120px}.public-home-section{padding:36px 20px;scroll-margin-top:125px}.home-simple-section{min-height:360px}.home-simple-section h2{font-size:28px}.home-simple-section p{font-size:16px}}

/* Company section matches the opening screen */
.public-home-section.company-introduction-dialog{min-height:calc(100dvh - 82px);padding:30px 32px;display:flex;flex-direction:column;justify-content:center;background:#030d17;color:#eee2c9;border-color:#a98a5538;scroll-margin-top:82px}
#home-company .company-intro-top{margin-bottom:8px}#home-company .company-intro-top>span{color:#c6aa73}#home-company .company-intro-hero{padding:8px 180px 22px;margin-bottom:20px;padding-left:0;border-color:#a98a5540}#home-company .company-intro-brand{color:#f3d69c}#home-company .company-intro-hero h2{font-size:clamp(26px,2.4vw,38px);color:#f3dfb4}#home-company .company-intro-hero>p{color:#bdb4a3}#home-company .company-intro-route{width:128px;height:128px;top:22px;background:radial-gradient(circle,#aa884017,transparent);border-color:#a98a554a;color:#d4b779}
#home-company .company-intro-grid{gap:14px}#home-company .company-intro-card{background:#ffffff03;border-color:#a98a5538;padding:20px;gap:16px}#home-company .company-intro-card h3{color:#e5c48a;font-size:19px}#home-company .company-intro-card p,#home-company .company-intro-card li{color:#dfd8cc;font-size:15px}#home-company .company-intro-number{color:#b9995e}#home-company .company-intro-flow{background:#ffffff03;border-color:#a98a5538;margin-top:20px}#home-company .company-intro-flow>div+div{border-color:#a98a5538}#home-company .company-intro-flow strong{color:#e8ddc8}
@media(min-width:1600px){.public-home-section.company-introduction-dialog{padding:40px 4vw}#home-company .company-intro-card{padding:26px}#home-company .company-intro-card p,#home-company .company-intro-card li{font-size:17px}#home-company .company-intro-card h3{font-size:22px}}
@media(max-width:900px){.public-home-section.company-introduction-dialog{padding:30px 24px}#home-company .company-intro-hero{padding-right:150px}}
@media(max-width:650px){.public-home-section.company-introduction-dialog{min-height:calc(100dvh - 120px);padding:28px 20px;scroll-margin-top:120px}#home-company .company-intro-hero{padding-right:0}#home-company .company-intro-route{display:none}#home-company .company-intro-card{padding:18px}#home-company .company-intro-card p,#home-company .company-intro-card li{font-size:14px}}

@media(min-width:901px) and (max-height:950px){.public-home-section.company-introduction-dialog{padding-top:20px;padding-bottom:20px}#home-company .company-intro-hero{padding-top:0;padding-bottom:14px;margin-bottom:14px}#home-company .company-intro-hero h2{font-size:28px;margin:10px 0 8px}#home-company .company-intro-brand{font-size:22px}#home-company .company-intro-card{padding:16px;gap:12px}#home-company .company-intro-card p,#home-company .company-intro-card li{font-size:14px;line-height:1.6}#home-company .company-intro-card h3{font-size:18px;margin-bottom:10px}#home-company .company-intro-flow{margin-top:14px}#home-company .company-intro-flow>div{padding:14px}}

#home-products{min-height:calc(100dvh - 82px);background:#030d17;padding-top:36px;padding-bottom:36px}#home-products h2{margin:10px 0 8px}.home-product-lead{color:#c6aa73!important;margin:0 0 22px!important}.home-product-catalog{background:white;border:1px solid #a98a5555;border-radius:12px;padding:20px;box-shadow:0 10px 40px #0003}.home-product-catalog img{display:block;width:100%;height:auto;border-radius:4px}@media(max-width:650px){#home-products{min-height:0;padding:32px 16px}.home-product-catalog{padding:8px;border-radius:8px}}

/* Business opportunity: three partnership values */
#home-business{min-height:calc(100dvh - 82px);background:radial-gradient(ellipse at 50% 48%,#172433 0,#030d17 72%);padding:40px 32px;scroll-margin-top:82px;box-sizing:border-box;justify-content:center}#home-business h2{margin:12px 0 8px;color:#f3d69c}.business-lead{color:#c5bdad!important;margin-bottom:36px!important}.business-pillars{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.business-pillar{text-align:center;padding:26px 16px 32px;border:1px solid #b494513b;border-radius:14px;background:#ffffff02}.business-icon{width:104px;height:104px;display:grid;place-items:center;margin:0 auto 24px;border:2px solid #c49a58;border-radius:50%;background:radial-gradient(circle,#b4945114,transparent);color:#e3bc76}.business-icon svg{width:58px;height:58px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}.business-pillar h3{font-size:clamp(24px,2.6vw,38px);color:#efc684;margin:0 0 8px;letter-spacing:-1px}.business-pillar>span{font-size:clamp(12px,1.3vw,17px);color:#bd965e}.business-pillar p{font-size:clamp(15px,1.6vw,21px);line-height:1.7;color:#e3d3b9;margin:24px 0 0!important}.business-motto{text-align:center;color:#c49c62;font-size:clamp(12px,1.4vw,19px);letter-spacing:6px;padding:28px 12px;margin-top:34px;border-top:1px solid #b4945155;border-bottom:1px solid #b4945130}@media(max-height:800px) and (min-width:901px){#home-business{padding:24px 32px}.business-lead{margin-bottom:20px!important}.business-pillar{padding:20px 14px}.business-icon{width:80px;height:80px;margin-bottom:16px}.business-icon svg{width:48px;height:48px}.business-pillar p{margin-top:16px!important}.business-motto{margin-top:22px;padding:20px}}@media(max-width:700px){#home-business{min-height:calc(100dvh - 120px);scroll-margin-top:120px;padding:32px 20px}.business-pillars{grid-template-columns:1fr;gap:14px}.business-pillar{padding:24px 14px}.business-motto{letter-spacing:3px;line-height:1.8}.business-lead{font-size:16px!important;margin-bottom:24px!important}}

/* Individual product cards, two rows per desktop screen */
#home-products{padding:24px 32px;min-height:calc(100dvh - 82px);scroll-margin-top:82px;justify-content:center}#home-products h2{font-size:30px;margin:8px 0 20px}.home-product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.home-product-card{min-width:0;overflow:hidden;border:1px solid #a98a5555;border-radius:12px;background:#0c1925;box-shadow:0 8px 24px #0002}.home-product-photo{height:clamp(120px,calc((100dvh - 330px)/2),260px);display:flex;align-items:center;justify-content:center;background:#fff;padding:10px;box-sizing:border-box}.home-product-crop{position:relative;overflow:hidden;height:100%;max-width:100%;width:auto}.home-product-crop img{position:absolute;display:block;max-width:none;object-fit:fill}.home-product-caption{padding:14px 16px}.home-product-caption h3{font-size:17px;line-height:1.4;color:#f0d39d;margin:0;overflow-wrap:anywhere}.home-product-caption p{font-size:14px!important;line-height:1.4!important;color:#c4cbd1!important;margin:6px 0 0!important}@media(min-width:1600px){#home-products{padding-left:4vw;padding-right:4vw}.home-product-caption h3{font-size:19px}}@media(max-width:900px){.home-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-product-photo{height:200px}#home-products{padding:30px 24px}}@media(max-width:650px){#home-products{scroll-margin-top:120px;padding:28px 16px}.home-product-grid{gap:12px}.home-product-photo{height:140px;padding:6px}.home-product-caption{padding:12px}.home-product-caption h3{font-size:14px}.home-product-caption p{font-size:12px!important}}@media(max-width:420px){.home-product-grid{grid-template-columns:1fr}.home-product-photo{height:200px}}

.home-product-crop{width:100%;max-width:428px;flex-shrink:0}.home-product-photo{height:clamp(120px,calc((100dvh - 380px)/2),240px)}@media(max-width:900px){.home-product-photo{height:200px}}@media(max-width:650px){.home-product-photo{height:140px}}@media(max-width:420px){.home-product-photo{height:200px}}

.home-product-card:nth-child(1) .home-product-crop img{width:338.2978723404255%;height:257%;left:-4.86322188449848%;top:-11%}
.home-product-card:nth-child(2) .home-product-crop img{width:338.2978723404255%;height:254.45544554455446%;left:-117.93313069908815%;top:-10.891089108910892%}
.home-product-card:nth-child(3) .home-product-crop img{width:338.2978723404255%;height:257%;left:-232.21884498480244%;top:-11%}
.home-product-card:nth-child(4) .home-product-crop img{width:338.2978723404255%;height:257%;left:-4.86322188449848%;top:-135%}
.home-product-card:nth-child(5) .home-product-crop img{width:338.2978723404255%;height:257%;left:-118.84498480243163%;top:-135%}
.home-product-card:nth-child(6) .home-product-crop img{width:338.2978723404255%;height:257%;left:-232.82674772036475%;top:-135%}
.home-product-crop{max-width:calc((100dvh - 400px)*.8225)}@media(max-width:900px){.home-product-crop{max-width:296px}}@media(max-width:650px){.home-product-crop{max-width:210px}}@media(max-width:420px){.home-product-crop{max-width:309px}}

#home-products h2{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}.home-products-subtitle{font-size:18px;font-weight:400;color:#c6aa73;letter-spacing:0}@media(max-width:650px){.home-products-subtitle{font-size:16px}}

/* Korea–China cross-border platform */
#home-platform{min-height:calc(100dvh - 82px);background:linear-gradient(145deg,#07121e,#102130);color:#e6dfd1;padding:30px 32px;scroll-margin-top:82px;display:flex;flex-direction:column;justify-content:center;border-block:1px solid #aa884433}#home-platform>h2{font-size:clamp(25px,2.4vw,38px);line-height:1.35;color:#f3d69c;margin:10px 0}.platform-subtitle{font-size:17px;color:#c6b692;margin:0 0 20px}.platform-goal{display:flex;align-items:center;gap:22px;border:1px solid #b2935550;border-radius:10px;background:#b2935509;padding:18px 22px;margin-bottom:16px}.platform-goal>span{color:#d4b374;white-space:nowrap;font-size:16px}.platform-goal strong{font-size:18px;font-weight:500;color:#efe6d5;border-left:1px solid #b2935550;padding-left:22px}.platform-grid{display:grid;grid-template-columns:1fr 1.25fr 1fr;gap:16px}.platform-grid article{padding:20px;border:1px solid #8297aa38;border-radius:12px;background:#ffffff03;position:relative}.platform-grid h3,.platform-strength h3,.platform-plan h3{font-size:18px;color:#e6c78e;margin:0 0 12px}.platform-number{float:right;font:24px Georgia,serif;color:#a78c5d}.platform-grid p{font-size:15px;line-height:1.7;margin:0;color:#d5dce0}.platform-market{display:flex;flex-direction:column;gap:4px;margin-top:16px;background:#b293550e;border-radius:8px;padding:12px 14px}.platform-market small{color:#b6c0ca}.platform-market strong{font-size:16px;color:#edd6ac}.platform-market>span{font-size:14px}.platform-barriers{display:flex;flex-wrap:wrap;gap:10px;padding:0;margin:18px 0 0;list-style:none}.platform-barriers li{padding:10px 12px;background:#b2935510;border:1px solid #b2935533;border-radius:8px;color:#dce2e5;font-size:14px}.platform-strength{display:grid;grid-template-columns:.85fr repeat(4,1fr);gap:18px;align-items:center;padding:18px 20px;border:1px solid #8297aa38;border-radius:10px;margin:16px 0}.platform-strength h3{margin:0}.platform-strength>div{display:flex;flex-direction:column;gap:5px;border-left:1px solid #b2935533;padding-left:16px}.platform-strength strong{font-size:14px;color:#ead5af}.platform-strength span{font-size:12px;color:#b9c4ce;line-height:1.6}.platform-plan h3{margin:0 0 12px}.platform-plan ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.platform-plan li{border:1px solid #b2935550;border-radius:10px;padding:14px 18px;background:#030d172b}.platform-plan li>span{display:block;color:#b39765;font-size:11px;letter-spacing:2px;margin-bottom:6px}.platform-plan strong{font-size:17px;color:#e8c689}.platform-plan p{font-size:14px;line-height:1.6;margin:7px 0 0;color:#cbd4dd}@media(min-width:1600px){#home-platform{padding:40px 4vw}.platform-grid article{padding:26px}.platform-grid p{font-size:17px}.platform-barriers li{font-size:16px}.platform-strength strong{font-size:16px}.platform-strength span{font-size:14px}}@media(max-width:1000px){.public-home-header nav{gap:8px}.public-home-header nav a{font-size:14px;padding:10px 6px}.platform-strength{grid-template-columns:repeat(2,1fr)}.platform-strength h3{grid-column:1/-1}}@media(max-width:700px){.public-home-header nav{flex-wrap:wrap;justify-content:flex-start;gap:2px}.public-home-header nav a{font-size:12px;padding:6px 4px}.public-home-header [data-home-login]{font-size:12px;padding:6px 12px}#home-platform{padding:30px 20px;scroll-margin-top:150px}.platform-grid,.platform-plan ol{grid-template-columns:1fr}.platform-goal{align-items:flex-start;flex-direction:column;gap:10px;padding:16px}.platform-goal strong{padding-left:0;border-left:0;font-size:16px}.platform-subtitle{font-size:15px}.platform-strength{gap:14px;padding:18px 14px}.platform-strength>div{padding-left:10px}.public-home-section{scroll-margin-top:150px}}

.platform-title-note{display:inline-block;font-size:.58em;color:#c9ad77;font-weight:500;vertical-align:baseline;margin-left:10px}.platform-permission-note{margin-top:18px;padding:18px 22px;border:1px solid #b2935545;border-left:3px solid #bfa166;border-radius:8px;background:#b2935508}.platform-permission-note p{font-size:15px;line-height:1.8;color:#ddd6c8;margin:0}.platform-permission-note p+p{margin-top:8px}@media(max-width:700px){.platform-title-note{display:block;margin:8px 0 0;font-size:18px}.platform-permission-note{padding:16px}.platform-permission-note p{font-size:14px}}

#home-platform .platform-title-note{font-size:inherit;font-weight:inherit}@media(max-width:700px){#home-platform .platform-title-note{font-size:inherit}}

/* Portrait product boxes: width 4, height 6 */
#home-products{padding-top:40px;padding-bottom:48px}.home-product-grid{width:100%;max-width:1100px;align-self:center;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.home-product-card{aspect-ratio:2/3;display:flex;flex-direction:column}.home-product-photo{height:auto;min-height:0;flex:1;padding:16px}.home-product-crop{height:auto;width:100%;max-width:none;aspect-ratio:329/200;flex-shrink:1}.home-product-caption{min-height:100px;box-sizing:border-box;padding:20px 18px;border-top:1px solid #a98a5538;display:flex;flex-direction:column;justify-content:center}.home-product-caption h3{font-size:17px;line-height:1.5}.home-product-caption p{margin-top:8px!important}@media(max-width:900px){.home-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:720px;gap:20px}.home-product-photo{height:auto}.home-product-crop{max-width:none}}@media(max-width:650px){.home-product-grid{gap:12px}.home-product-photo{height:auto;padding:8px}.home-product-crop{max-width:none}.home-product-caption{padding:14px 12px;min-height:94px}.home-product-caption h3{font-size:14px}}@media(max-width:420px){.home-product-grid{grid-template-columns:1fr;max-width:300px}.home-product-photo{height:auto}.home-product-crop{max-width:none}}

/* Fill portrait product photo areas without stretching */
.home-product-photo{padding:0;overflow:hidden;container-type:size;position:relative}.home-product-crop{width:max(100cqw,164.5cqh);max-width:none;height:auto;aspect-ratio:329/200;flex-shrink:0}.home-product-card:nth-child(2) .home-product-crop{aspect-ratio:329/202;width:max(100cqw,162.87cqh)}@media(max-width:900px){.home-product-photo{padding:0}.home-product-crop{max-width:none}}@media(max-width:650px){.home-product-photo{padding:0}.home-product-crop{max-width:none}}

/* Product layout matched to supplied reference */
#home-products{padding:24px 32px;min-height:calc(100dvh - 82px)}.home-product-grid{max-width:1160px;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.home-product-card{aspect-ratio:auto;display:flex;flex-direction:column}.home-product-photo{container-type:normal;flex:none;height:clamp(140px,calc((100dvh - 380px)/2),240px);padding:10px;overflow:hidden;display:flex;align-items:center;justify-content:center}.home-product-crop,.home-product-card:nth-child(2) .home-product-crop{width:100%;height:auto;max-width:calc((100dvh - 400px)*.8225);aspect-ratio:329/200;flex-shrink:1}.home-product-card:nth-child(2) .home-product-crop{aspect-ratio:329/202}.home-product-caption{min-height:78px;padding:14px 16px;display:block;border-top:0}.home-product-caption h3{font-size:17px;line-height:1.4}.home-product-caption p{margin-top:6px!important}@media(max-width:900px){.home-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.home-product-photo{height:200px}.home-product-crop,.home-product-card:nth-child(2) .home-product-crop{max-width:296px}}@media(max-width:650px){.home-product-grid{gap:12px}.home-product-photo{height:140px;padding:6px}.home-product-crop,.home-product-card:nth-child(2) .home-product-crop{max-width:210px}.home-product-caption{padding:12px;min-height:80px}.home-product-caption h3{font-size:14px}}@media(max-width:420px){.home-product-grid{grid-template-columns:1fr;max-width:360px}.home-product-photo{height:200px}.home-product-crop,.home-product-card:nth-child(2) .home-product-crop{max-width:309px}}

/* Mobile-specific welcome image; desktop artwork stays unchanged */
.public-home-picture{display:block;width:100%;height:100%;min-height:0}.public-home-picture img{display:block;width:100%;height:100%;object-fit:contain}@media(max-width:700px){#home-top{height:calc(100svh - 150px);min-height:340px}.public-home-picture img{object-fit:contain;object-position:center}}

/* Compact member workspace for the available screen height */
@media screen{
 body.member-portal:has(.shell.member){height:100dvh;height:100svh}
 body.member-portal .shell.member{height:100dvh;height:100svh}
 .member .sidebar{padding:8px 12px}.member .topbar{height:32px;padding:0 12px}
 body.member-portal .member .content{padding:8px 10px calc(62px + env(safe-area-inset-bottom))}
 .member .heading{margin-bottom:6px}.member .heading h1{font-size:19px;margin-bottom:0}.member .heading .sub{display:none}
 .member .member-account-switch{padding:6px 8px;margin-bottom:6px;gap:3px}.member .member-account-switch select{min-height:30px;padding:4px 7px}.member .member-account-switch span{font-size:10px}
 .member #page{gap:6px}.member #page>.stats{gap:5px}.member #page>.stats>.stat{padding:7px 9px;gap:6px}.member #page>.stats>.stat strong{font-size:18px}
 .member #page>.grid>.card{padding:8px 10px}.member #page>.grid .cardhead{margin-bottom:4px}.member #page>.grid .big{font-size:20px;margin:3px 0}.member #page>.grid .spacer{display:none}.member #page>.grid progress{height:7px}.member-cap-guidance{display:none}
 .member #page>.card{padding:9px 10px}.member .cardhead{margin-bottom:5px}.member .cardhead h2{font-size:15px}
 .member #page>.card:has([data-member-recent]){flex:0 1 auto;min-height:76px;max-height:clamp(90px,16svh,140px);display:flex;flex-direction:column}
 .member [data-member-recent]{min-height:0;overflow:auto}.member .member-recent-sale{padding-block:5px}
 .member #page>.card:has([data-downline-sales]){display:flex;flex-direction:column;flex:1 0 110px;min-height:110px;overflow:hidden}
 .member [data-downline-sales]{flex:1;min-height:0}.member .member-downline-sales>.tablewrap{min-height:0}.member .member-downline-sales th,.member .member-downline-sales td{padding:6px 7px;font-size:11px}
 .member .member-list-pages{flex:none}.member .nav{min-height:56px;padding-top:4px;padding-bottom:max(5px,env(safe-area-inset-bottom))}.member .nav button{min-height:44px;font-size:14px}
}
@media screen and (max-height:700px){.member .member-account-switch span{display:none}.member .member-account-switch label{font-size:12px}.member #page>.grid .sub{font-size:10px}.member #page>.stats>.stat small{font-size:11px}.member #page>.stats>.stat strong{font-size:16px}.member #page>.card:has([data-member-recent]){max-height:96px}.member .member-entry-row{min-height:30px;padding:4px 0}}

/* Galaxy-sized member screens: 360–412 CSS px, portrait and landscape */
@media screen and (max-width:480px){
 body.member-portal:has(.shell.member){width:100%;overflow:hidden}
 .shell.member{max-width:100%;width:100%}
 .member .sidebar{padding:7px 10px}.member .brand{font-size:20px}.member .portal-brand-row{gap:6px}.member .portal-demo-notice{font-size:9px;padding:3px 5px}
 .member .topbar{height:32px;padding:0 10px;font-size:11px}.member .topbar .btn{min-height:28px;padding:4px 8px}
 body.member-portal .member .content{width:100%;max-width:100%;padding:7px 8px calc(58px + env(safe-area-inset-bottom))}
 .member .heading h1{font-size:18px;line-height:1.35}.member .heading{margin-bottom:5px}
 .member .member-account-switch{padding:6px 8px}.member .member-account-switch label{font-size:12px}.member .member-account-switch select{font-size:16px!important;min-height:34px}.member .member-account-switch span{display:none}
 .member #page>.stats.member-summary-compact{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px}.member #page>.stats>.stat{padding:7px 8px;gap:4px}.member #page>.stats>.stat small{font-size:11px}.member #page>.stats>.stat strong{font-size:17px;letter-spacing:-.5px}.member #page>.stats.member-summary-compact>.stat:not(:first-child){display:flex;flex-wrap:nowrap;justify-content:space-between}.member #page>.stats.member-summary-compact>.stat:not(:first-child) strong{font-size:16px}
 .member #page>.grid>.card{padding:7px 9px}.member .member-cap-amount{font-size:18px!important;line-height:1.35}.member #page>.grid .sub{font-size:10px}.member .cardhead h2{font-size:14px}.member .cardhead .muted{font-size:10px}
 .member-repurchase-notices{gap:4px;margin-bottom:4px}.member-repurchase-alert{font-size:13px;padding:7px 9px}
 .member .member-recent-sale{font-size:10px;gap:4px}.member .member-recent-sale .badge{font-size:9px;padding:3px 4px}
 .member .member-downline-sales th,.member .member-downline-sales td{padding:6px;font-size:11px}.member .member-downline-sales>.tablewrap{overflow:auto;-webkit-overflow-scrolling:touch}
 .member .member-list-pages{padding-top:4px;font-size:10px}.member .member-list-pages .btn{min-height:32px;padding:5px 9px}
 .member .nav{min-height:54px;gap:2px;padding-top:3px;padding-bottom:max(4px,env(safe-area-inset-bottom))}.member .nav button{font-size:13px;min-height:44px;padding:4px 2px}
 .member :is(input,select,textarea){font-size:16px}.member .tablewrap{max-width:100%}
}
@media screen and (max-width:480px) and (max-height:740px){
 .member #page{gap:5px}.member .sidebar{padding-block:5px}.member .topbar{height:30px}.member .heading h1{font-size:16px}.member #page>.stats>.stat{padding-block:5px}.member #page>.grid .big{margin:0}.member #page>.grid>.card{padding-block:6px}.member #page>.card:has([data-member-recent]){max-height:82px;min-height:65px}.member #page>.card:has([data-downline-sales]){min-height:105px;flex-basis:105px}.member .member-recent-sale{padding-block:4px}
}
@media screen and (orientation:landscape) and (max-height:500px){
 body.member-portal .member .content{overflow:auto;display:block}.member #page{overflow:visible;flex:none}.member #page>.card:has([data-downline-sales]){min-height:170px;max-height:240px}.member #page:has(.genealogy){height:65dvh}.member .member-account-switch{margin-bottom:6px}
}

.member #page>.stats.member-summary-pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.member #page>.stats.member-summary-pair>.stat:first-child{grid-column:auto}.member #page>.stats.member-summary-pair>.stat{display:flex;flex-direction:column;align-items:flex-start;gap:5px;flex-wrap:nowrap}.member #page>.stats.member-summary-pair>.stat small{flex:none}.member #page>.stats.member-summary-pair>.stat strong{font-size:20px;max-width:100%;white-space:normal;overflow-wrap:anywhere;margin:0}@media(max-width:480px){.member #page>.stats.member-summary-pair>.stat{display:flex;flex-direction:column;align-items:flex-start}.member #page>.stats.member-summary-pair>.stat strong{font-size:18px}.member #page>.stats.member-summary-pair>.stat small{font-size:12px}}

.member .member-cap-caption{font-size:11px;color:#788e9d;line-height:1.4;text-align:right}.member #page>.grid .cardhead:has(.member-cap-caption){flex-wrap:nowrap;gap:8px;align-items:center}.member #page>.grid .cardhead:has(.member-cap-caption) h2{white-space:nowrap}.member #page>.grid .member-cap-amount{margin-bottom:0}

/* Member sales share a single tabbed card */
.member #page>.card.member-sales-tabs{flex:1 1 0;min-height:140px;max-height:none;display:flex;flex-direction:column;overflow:hidden;padding:10px}.member-sales-tabbar{display:flex;gap:6px;flex:none;border-bottom:1px solid #dce6ed;padding-bottom:8px;margin-bottom:8px}.member-sales-tabbar button{flex:1;min-height:38px;border-radius:7px;padding:8px 12px;font-size:14px;font-weight:700;background:#eef3f6;color:#526b80}.member-sales-tabbar button[aria-selected=true]{background:#087e72;color:white}.member-sales-panel{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}.member-sales-panel[hidden]{display:none!important}.member-sales-period{font-size:11px;color:#788e9d;margin:0 0 7px;flex:none}.member-sales-panel>[data-member-recent]{flex:1;min-height:0;overflow:auto}.member-sales-panel>[data-downline-sales]{display:flex;flex:1;flex-direction:column;min-height:0}.member-sales-panel .member-downline-sales>.tablewrap{flex:1;min-height:0;overflow:auto}.member-sales-panel .member-list-pages{flex:none;padding-top:8px}@media(max-width:480px){.member #page>.card.member-sales-tabs{padding:8px}.member-sales-tabbar button{min-height:40px;font-size:14px}}

/* Match member navigation to the brand header */
.member .sidebar,.member .nav{background:#102a3b}.member .nav{border-top:1px solid #244252;box-shadow:0 -3px 15px #102a3b15}.member .nav button{color:#b8cbd7;background:transparent}.member .nav button:hover{background:#1a3b4e;color:#fff}.member .nav button.active{color:#76e3d1;background:#1c4350;font-weight:700}

.member .member-account-switch.member-account-switch-inline{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px 10px}.member-account-switch-inline .member-account-heading{display:contents}.member-account-switch-inline .member-account-heading>label{grid-column:1;grid-row:1;white-space:nowrap}.member-account-switch-inline>[data-account-switch]{grid-column:2;grid-row:1;width:100%;min-width:0}.member-account-switch-inline .member-account-heading>span{grid-column:1/-1;grid-row:2}.member-account-switch-inline>.member-allowance-search{grid-column:1/-1;grid-row:3;width:100%}@media(max-width:480px){.member .member-account-switch.member-account-switch-inline{gap:5px 8px}.member-account-switch-inline .member-account-heading>label{font-size:12px}.member-account-switch-inline>[data-account-switch]{font-size:14px!important}}

.member #page>.stats>.stat:has([data-member-allowance-total])>small,.member #page>.stats>.stat:has([data-member-allowance-total])>strong{font-size:18px;font-weight:700}@media(max-width:480px){.member #page>.stats>.stat:has([data-member-allowance-total])>small,.member #page>.stats>.stat:has([data-member-allowance-total])>strong{font-size:17px}}

.member-repurchase-line{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center}.member-repurchase-line>label{font-size:13px;white-space:nowrap}.member-repurchase-line>select{min-width:0;width:100%;font-size:14px;padding:7px}.member-repurchase-line>.btn{white-space:nowrap;padding:8px 12px;min-height:38px}.member-repurchase-request form>.note{margin:0;font-size:11px}@media(max-width:480px){.member-repurchase-line{gap:6px}.member .member-repurchase-line>select{font-size:14px}.member-repurchase-line>.btn{padding-inline:10px}}

/* Repurchase cards should follow their content, not stretch equally */
.member #page:has(>.member-repurchase-request){justify-content:flex-start;gap:8px;overflow:auto}.member #page:has(>.member-repurchase-request)>.card{flex:0 0 auto;min-height:0;overflow:visible;padding:10px}.member #page>.member-repurchase-request .cardhead{margin-bottom:8px}.member-repurchase-request form{gap:8px}.member-repurchase-request form>.note{margin:0;line-height:1.5}.member #page:has(>.member-repurchase-request)>.card>.note{margin:4px 0 8px}.member #page:has(>.member-repurchase-request)>.card>.big{margin:6px 0}.member #page:has(>.member-repurchase-request)>.card>h3{margin:10px 0 6px}.member #page:has(>.member-repurchase-request) .empty{padding:20px 10px}.member #page:has(>.member-repurchase-request) .row{padding:6px 0}

/* Larger, bold member navigation labels */
.member .nav button,.member .nav button.active{font-size:17px;font-weight:700;line-height:1.3}@media(max-width:480px){.member .nav button,.member .nav button.active{font-size:16px;font-weight:700}}@media(max-width:360px){.member .nav button,.member .nav button.active{font-size:15px}}

/* Larger expansion control shared by all genealogy views */
.gene-more{top:92px;left:6px;width:104px;min-height:32px;display:flex;align-items:center;justify-content:center;gap:6px;padding:4px 8px;border-radius:8px;font-size:14px;font-weight:700;line-height:1.3;white-space:nowrap;box-shadow:0 2px 5px #173b5012}.gene-more-arrow{font-size:18px;line-height:1}.gene-more:hover{background:#e5f4ef;border-color:#168a79;color:#087466}

.audit-search-form{display:grid;grid-template-columns:1fr 150px 150px 1.2fr 1.2fr auto;gap:10px;align-items:end;margin-bottom:14px}.audit-search-form label{min-width:0}.audit-search-form input{width:100%;min-width:0;height:36px;padding:7px 9px}.audit-search-actions{display:flex;gap:6px}.audit-search-actions .btn{min-height:36px;white-space:nowrap}.audit-search-count{font-size:13px;margin:8px 0}.audit-search-results .tablewrap{max-height:55dvh;overflow:auto}.audit-search-results td{vertical-align:top}.audit-search-results td:last-child{white-space:normal;min-width:220px;max-width:540px;overflow-wrap:anywhere}.audit-search-results summary{cursor:pointer}.audit-search-pages{justify-content:flex-end;align-items:center;margin-top:10px}@media(max-width:1100px){.audit-search-form{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){.audit-search-form{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Homepage image notices, authored beside message composer */
.notice-compose-column{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0;overflow:auto}.notice-compose-column>.card{flex:none;min-height:0}.notice-compose-column .notice-compose-card textarea{min-height:120px;height:130px}.homepage-notice-card label{gap:7px}.homepage-notice-card input[type=file]{width:100%;padding:8px}.homepage-notice-preview{display:grid;place-items:center;background:#edf2f5;border:1px dashed #91a7b9;border-radius:8px;margin-top:10px;min-height:80px;color:#647f90;font-size:13px;overflow:hidden}.homepage-notice-preview img{display:block;max-width:100%;max-height:200px;object-fit:contain}.homepage-notice-card .note{margin:8px 0;overflow-wrap:anywhere}.homepage-notice-dialog{width:min(640px,calc(100vw - 24px));max-width:640px;max-height:calc(100dvh - 24px);padding:12px;border:1px solid #c7d7df;border-radius:12px;background:white;color:#183246;overflow:auto;box-sizing:border-box}.homepage-notice-dialog::backdrop{background:#0009}.homepage-notice-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;position:sticky;top:-12px;padding:8px 0;background:white;z-index:1}.homepage-notice-dialog h2{margin:0;font-size:18px}.homepage-notice-dialog-head button{min-height:40px;padding:8px 16px}.homepage-notice-dialog>img{display:block;width:auto;max-width:100%;max-height:calc(100dvh - 110px);object-fit:contain;margin:auto}body[data-admin-theme=dark] .homepage-notice-preview{background:#12212e;color:#b7cbdb;border-color:#496578}@media(max-width:900px){.notice-compose-column{overflow:visible}}

/* Balance notice composer and image announcement space */
.notice-recipient-column>.notice-history{width:100%;max-height:200px;min-height:100px;overflow:auto;margin:0;flex:none}.notice-compose-column .notice-compose-card textarea{min-height:74px;height:84px;max-height:140px}.notice-compose-column .notice-compose-card form{gap:8px}.notice-compose-column .notice-compose-card .note{margin-block:6px}.notice-compose-column>.homepage-notice-card{flex:1 0 260px;display:flex;flex-direction:column}.homepage-notice-card>.homepage-notice-preview{flex:1;min-height:160px;max-height:360px}.homepage-notice-preview img{max-height:300px}.homepage-notice-card>.actions{flex:none}.notice-recipient-column>.notice-recipient-card{min-height:180px}@media(max-width:900px){.notice-compose-column>.homepage-notice-card{min-height:320px;flex:none}}

.homepage-notice-dialog-actions{display:flex;align-items:center;gap:14px}.homepage-notice-hide-today{display:flex;align-items:center;gap:6px;font-size:13px;color:#526b80;white-space:nowrap;cursor:pointer}.homepage-notice-hide-today input{width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:#087e72}@media(max-width:480px){.homepage-notice-dialog-actions{gap:8px}.homepage-notice-hide-today{font-size:12px}.homepage-notice-dialog h2{font-size:16px}.homepage-notice-dialog-head button{padding:8px 12px}}

/* Notice composition above archive, compact recipient search and rows */
.notice-recipient-column>.notice-compose-card{flex:none;min-height:0}.notice-recipient-column .notice-compose-card textarea{min-height:74px;height:84px;max-height:140px}.notice-recipient-column .notice-compose-card form{gap:8px}.notice-recipient-column .notice-compose-card .note{margin-block:6px}.notice-recipient-card>.cardhead{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}.notice-recipient-card>.cardhead h2{white-space:nowrap}.notice-recipient-card [data-selected-count]{font-size:12px;white-space:nowrap}.notice-recipient-card>.cardhead>[data-recipient-search]{display:flex;flex:1;min-width:250px;gap:5px;justify-content:flex-end;flex-wrap:nowrap;margin:0}.notice-recipient-card>.cardhead>[data-recipient-search] input{width:100%;min-width:80px;flex:1;height:32px;padding:5px 7px;font-size:12px}.notice-recipient-card>.cardhead>[data-recipient-search] .btn{min-height:32px;padding:5px 8px;white-space:nowrap;font-size:12px}.notice-recipient-card [data-notice-recipients] th,.notice-recipient-card [data-notice-recipients] td{padding:4px 7px;height:28px;line-height:1.3;font-size:12px}.notice-recipient-card [data-notice-recipients] input[type=checkbox]{margin:0;vertical-align:middle}.notice-recipient-card>[data-recipient-criteria]{margin:3px 0 6px}.notice-compose-column>.homepage-notice-card{flex:1 0 auto;min-height:360px}.notice-compose-column>.homepage-notice-card>.homepage-notice-preview{max-height:none;min-height:220px}.notice-compose-column>.homepage-notice-card .homepage-notice-preview img{max-height:480px}.notice-recipient-column{overflow:auto}.notice-recipient-column>.notice-recipient-card{flex:0 0 auto;max-height:290px}.notice-recipient-column>.notice-history{min-height:100px}@media(max-width:900px){.notice-recipient-column{overflow:visible}.notice-recipient-card>.cardhead>[data-recipient-search]{min-width:220px}}@media(max-width:600px){.notice-recipient-card>.cardhead>[data-recipient-search]{flex-basis:100%;min-width:0}}

.notice-category-card>.cardhead{display:flex;align-items:center;gap:12px;margin-bottom:0;flex-wrap:wrap}.notice-category-card>.cardhead h2{flex:none;white-space:nowrap}.notice-category-card .notice-category-options{display:flex;flex:1;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.notice-category-card .notice-category-options label{font-size:12px;white-space:nowrap;gap:4px}.notice-category-card .notice-category-options input{margin:0;flex:none}.notice-category-card{padding-block:12px!important}@media(max-width:600px){.notice-category-card .notice-category-options{justify-content:flex-start}}

.notice-compose-card>.cardhead{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px}.notice-compose-card>.cardhead h2{white-space:nowrap}.notice-compose-card>.cardhead>.actions{display:flex;gap:5px;margin:0;align-items:center}.notice-compose-card>.cardhead>.actions .btn{min-height:32px;padding:5px 8px;font-size:12px;white-space:nowrap}.notice-compose-card [data-message-save-status]{display:none}

.notice-connection>.cardhead{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:0}.notice-connection>.cardhead h2{flex:none;white-space:nowrap}.notice-connection>.cardhead>.badge{flex:none}.notice-connection>.cardhead>p{flex:1;min-width:250px;margin:0;font-size:12px;line-height:1.6}.notice-connection{padding-block:12px!important}@media(max-width:650px){.notice-connection>.cardhead>p{flex-basis:100%;min-width:0}}

/* Fit the notice workspace to one desktop screen */
@media(min-width:901px){
 body[data-admin-theme][data-admin-view=notices] #page{overflow:hidden;gap:8px}.notice-connection{margin-bottom:0!important;flex:none}.notice-workspace{flex:1;min-height:0;overflow:hidden;gap:10px}
 .notice-recipient-column{display:grid;grid-template-rows:auto minmax(120px,1fr) minmax(200px,1fr) minmax(80px,.6fr);gap:8px;overflow:hidden;min-height:0}
 .notice-recipient-column>.card{margin:0;min-height:0;max-height:none;padding:10px 12px;overflow:hidden}.notice-recipient-column>.notice-category-card{padding:8px 12px!important}
 .notice-recipient-column>.notice-recipient-card{display:flex;flex-direction:column;max-height:none;min-height:0}.notice-recipient-card>.cardhead{margin-bottom:4px;gap:6px}.notice-recipient-card>[data-recipient-criteria]{font-size:10px;line-height:1.3;margin:2px 0 4px}.notice-recipient-card>.tablewrap{min-height:0;max-height:none;flex:1}.notice-recipient-card>.actions{flex:none;margin-top:4px;font-size:11px}.notice-recipient-card>.actions .btn{min-height:28px;padding:4px 8px}.notice-recipient-card [data-notice-recipients] td,.notice-recipient-card [data-notice-recipients] th{height:25px;padding:3px 6px}
 .notice-compose-card{display:flex;flex-direction:column}.notice-compose-card>.cardhead{flex:none;margin-bottom:7px}.notice-compose-card form[data-notice-compose]{display:flex;flex:1;flex-direction:column;gap:6px;min-height:0}.notice-compose-card form>label{font-size:12px;gap:4px}.notice-compose-card input[name=title]{height:30px;min-height:30px;padding:5px 8px}.notice-compose-card form>label:has(textarea){display:flex;flex:1;flex-direction:column;min-height:0}.notice-recipient-column .notice-compose-card textarea{flex:1;font-size:16px!important;line-height:1.5;font-family:inherit;min-height:60px;height:60px;max-height:none;padding:7px 9px;resize:none}
 .notice-recipient-column>.notice-history{display:flex;flex-direction:column;min-height:0;max-height:none}.notice-history>.cardhead{flex:none;margin-bottom:5px}.notice-history [data-notice-history]{flex:1;min-height:0;overflow:auto}.notice-history .empty{padding:12px 8px;margin:0}
 .notice-compose-column{overflow:hidden;min-height:0}.notice-compose-column>.homepage-notice-card{flex:1 1 0;min-height:0;padding:12px;overflow:hidden}.homepage-notice-card>.homepage-notice-preview{min-height:80px;max-height:none;flex:1;position:relative}.homepage-notice-card .homepage-notice-preview img{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}.homepage-notice-card .note{font-size:11px;margin:6px 0}.homepage-notice-card>.cardhead{margin-bottom:8px}
}
@media(max-width:900px){.notice-recipient-column .notice-compose-card textarea{font-size:16px!important;line-height:1.5;font-family:inherit}}

/* Recipient pagination: balanced buttons and clear page information */
.notice-recipient-card>.actions{display:grid;grid-template-columns:76px minmax(0,1fr) 76px;align-items:center;gap:12px;flex:none;padding:8px 0 0;margin:0!important;border-top:1px solid var(--admin-line,#dce6ed)}.notice-recipient-card>.actions .btn{width:100%;min-height:34px;height:34px;padding:6px 10px;font-size:13px;line-height:1.3}.notice-recipient-card [data-recipient-page]{text-align:center;font-size:13px;line-height:1.5;color:var(--admin-text,#24465c);font-weight:600;white-space:nowrap}.notice-recipient-card>.actions .btn:disabled{cursor:default;opacity:.45}@media(max-width:480px){.notice-recipient-card>.actions{grid-template-columns:64px minmax(0,1fr) 64px;gap:8px}.notice-recipient-card [data-recipient-page]{font-size:12px}}

/* Align notice input fields beside their captions */
.notice-compose-card form[data-notice-compose]>label{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:8px}.notice-compose-card form[data-notice-compose]>label:has(textarea){display:grid;grid-template-columns:34px minmax(0,1fr);align-items:start;gap:8px;flex:1;min-height:0}.notice-compose-card form[data-notice-compose]>label>input,.notice-compose-card form[data-notice-compose]>label>textarea{grid-column:2;width:100%;min-width:0}.notice-compose-card form[data-notice-compose]>label>textarea{height:100%;min-height:60px}@media(max-width:480px){.notice-compose-card form[data-notice-compose]>label,.notice-compose-card form[data-notice-compose]>label:has(textarea){grid-template-columns:30px minmax(0,1fr);gap:6px}}

/* Announcement preview: fit width and scroll vertically */
.homepage-notice-card>.homepage-notice-preview{display:block;position:relative;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;min-height:80px}.homepage-notice-card .homepage-notice-preview img{position:static;inset:auto;display:block;width:100%;height:auto;max-width:100%;max-height:none;object-fit:initial;margin:0}.homepage-notice-preview>span{display:block;text-align:center;padding:24px 12px}@media(min-width:901px){.homepage-notice-card>.homepage-notice-preview{min-height:80px;flex:1 1 0;max-height:none}}

/* Preserve image proportions while filling the preview height */
.homepage-notice-card>.homepage-notice-preview{display:flex;align-items:center;justify-content:center;overflow:auto;min-height:80px;scrollbar-gutter:auto}.homepage-notice-card .homepage-notice-preview img{position:static;inset:auto;display:block;flex:none;width:auto;height:100%;max-width:none;max-height:100%;object-fit:contain;margin:auto}.homepage-notice-preview>span{display:block;padding:24px 12px;text-align:center}@media(min-width:901px){.homepage-notice-card>.homepage-notice-preview{flex:1 1 0;min-height:80px;max-height:none}}@media(max-width:900px){.homepage-notice-card>.homepage-notice-preview{height:320px;max-height:50dvh;flex:none}}
