/* Shared storefront calculator finish, scoped away from shopping and checkout. */
.fs-storefront-tools{--lite-bg:#faf8f4;--lite-ink:#302a28;--lite-ink-soft:#514842;--lite-muted:#716760;--lite-line:#e7e0d7;--lite-line-strong:#d1c5b7;--lite-gold:#7b5b12;--lite-maroon:#6e1414;--matrix-brand-dark:#2b0202;font-family:inherit;color:var(--lite-ink)}
.fs-storefront-tools .fsm-results-section{background:#faf8f4;background-image:none}
.fs-storefront-tools .bazi-panel{max-width:1240px;margin:auto;padding:32px 24px 48px;background:transparent;box-shadow:none}
.fs-storefront-tools .bazi-section-card{border:1px solid var(--lite-line);border-radius:20px;background:linear-gradient(160deg,#fdf8f0,#faf3e7);box-shadow:0 4px 20px #783c0a0a;padding:26px;min-width:0;color:var(--lite-ink)}
.fs-storefront-tools .bazi-section-card::before{display:none}
.fs-storefront-tools .bazi-section-card:hover{box-shadow:0 1px 3px #2b020205}
.fs-storefront-tools .bazi-form-row{gap:16px;align-items:end}
.fs-storefront-tools .bazi-form-row.justify-between{flex-wrap:wrap}
.fs-storefront-tools .bazi-field{flex:1;min-width:90px}
.fs-storefront-tools :is(button,a,input,select,summary,[tabindex]):focus-visible{outline:2px solid var(--lite-gold);outline-offset:3px}
.fs-storefront-tools .bazi-btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.fs-storefront-tools .bazi-section-head{font-size:17px;font-weight:600;letter-spacing:-.02em;text-transform:none;color:var(--lite-ink)!important;border-color:var(--lite-line);padding-bottom:16px;margin-bottom:20px}
.fs-storefront-tools .bazi-section-head svg{color:var(--lite-gold);flex:none}
.fs-storefront-tools #bazi-results .bazi-two-col{display:flex;flex-direction:column;gap:24px}
.fs-storefront-tools #bazi-results .bazi-two-col>.bazi-section-card:first-child{order:2}
.fs-storefront-tools #bazi-results .bazi-two-col>.bazi-section-card:last-child{order:1}
.fs-storefront-tools #bazi-results .chart-watermark-wrapper:has(#b-pillars){border:0!important;border-radius:0!important;background:transparent}
.fs-storefront-tools #b-luck{display:block;margin:0}
.fs-storefront-tools .fsm-luck-scroll{overflow-x:auto;border:1px solid var(--lite-line);border-radius:10px;scrollbar-width:thin;overscroll-behavior-inline:contain}
.fs-storefront-tools .chart-watermark-logo{opacity:.035}
/* Keep BaZi branding legible over the chart without intercepting interaction. */
.fs-storefront-tools #bazi-results .chart-watermark-logo{opacity:.14}
.fs-storefront-tools #bazi-results .chart-watermark-wrapper:has(#b-pillars)>.chart-watermark-logo{width:clamp(180px,55%,300px);height:clamp(180px,55%,300px)}
.fs-storefront-tools .fsm-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.fs-storefront-tools .bazi-two-col{gap:20px;grid-template-columns:repeat(2,minmax(0,1fr))}
.fs-storefront-tools .kua-badge{background:#6e1414;color:#fff7e8;border:1px solid #c3a05266;border-radius:14px;box-shadow:none;font-weight:500}
.fs-storefront-tools :is(.kua-dir-item,.kua-direction,.fs-palace){border-radius:10px;box-shadow:none}
.fs-storefront-tools .fs-desc-panel{background:#fffdf8;border:1px solid var(--lite-line);border-radius:12px;box-shadow:none}
.fs-storefront-tools .fs-desc-close{width:40px;height:40px;border-radius:8px}
/* Native fields remain the source of truth behind the shared dropdown. */
.fs-storefront-tools .fsm-select{position:relative;width:100%;max-width:100%;min-width:0;display:block}
.fs-storefront-tools .fsm-select[hidden]{display:none!important}
.fs-storefront-tools .fsm-select-native{position:absolute!important;width:1px!important;min-width:0!important;max-width:1px!important;height:1px!important;min-height:0!important;padding:0!important;border:0!important;clip-path:inset(50%);overflow:hidden}
.fs-storefront-tools .fsm-select-btn{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:46px;padding:11px 12px;background:#fff;border:1px solid #d8cec1;border-radius:9px;font:inherit;font-size:14px;text-align:left;color:var(--lite-ink);cursor:pointer}
.fs-storefront-tools .fsm-select-btn svg{flex:none;width:15px;height:15px;color:#8b7860;transition:transform 180ms ease}
.fs-storefront-tools .fsm-select.open .fsm-select-btn{border-color:var(--lite-gold);box-shadow:0 0 0 3px #7b5b121a}
.fs-storefront-tools .fsm-select.open .fsm-select-btn svg{transform:rotate(180deg)}
.fs-storefront-tools .fsm-select-label{position:relative;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fs-storefront-tools .fsm-select-label-previous{position:absolute;inset:0;background:#fff}
.fs-storefront-tools .fsm-select-list{display:none;position:absolute;z-index:120;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;background:#fffefb;border:1px solid #d8cec1;border-radius:13px;padding:5px;box-shadow:0 12px 30px #2b020214,0 2px 6px #2b020208}
.fs-storefront-tools .fsm-select.open .fsm-select-list{display:block}
.fs-storefront-tools .fsm-select.closing .fsm-select-list{display:block;opacity:0;pointer-events:none}
.fs-storefront-tools .fsm-select-opt{display:flex;align-items:center;gap:14px;min-height:42px;padding:10px 12px;border-radius:7px;color:var(--lite-ink);font-size:13px;line-height:1.5;cursor:pointer}
.fs-storefront-tools .fsm-select-opt:hover,.fs-storefront-tools .fsm-select-opt:focus{background:#f5f0e7;outline:1px solid #b59a60;outline-offset:-1px}
.fs-storefront-tools .fsm-select-opt.sel{background:#f6eedb;color:#674b12;font-weight:600}
.fs-storefront-tools .fsm-select-opt.sel::after{content:"";width:8px;height:5px;flex:none;margin-left:auto;border-left:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg)}
.fs-storefront-tools .fsm-select-opt[aria-disabled=true],.fs-storefront-tools .fsm-select-btn:disabled{opacity:.5;cursor:not-allowed}
.fs-storefront-tools .fsm-select-heading{padding:10px 12px 4px;color:var(--lite-muted);font-size:11px;font-weight:600}
/* Mapper controls retain their dark canvas and established editing geometry. */
.fs-storefront-tools :is(.fse-card,.fye-card){border-radius:14px;border-color:#c3a05240;background:#2b0c0c;backdrop-filter:none;box-shadow:none}
.fs-storefront-tools :is(.fse-input,.fye-input,.fse-select,.fye-select){min-height:46px;border-radius:9px;border-color:#c3a05240;background:#ffffff08;box-shadow:none;font-weight:400}
.fs-storefront-tools :is(.fse-btn,.fye-btn){min-height:46px;border-radius:9px;font-size:14px;font-weight:600;letter-spacing:0;box-shadow:none}
.fs-storefront-tools :is(.fse-detail-panel,.fye-detail-panel){border-radius:12px;border-color:#c3a05240;box-shadow:none}
.fs-storefront-tools :is(.fpm-particle,.fpm-ember,.fpm-glow-orb){display:none}
.fs-storefront-tools .fpm-tool-card{border-radius:14px;box-shadow:none;transition:border-color 160ms ease}
.fs-storefront-tools .fpm-tool-card:hover{transform:none;box-shadow:none;border-color:#c3a05266}
.fs-storefront-tools .fpm-title-shimmer{animation:none}
.fs-storefront-tools .fpm-tool-card a{border-radius:9px;box-shadow:none!important;letter-spacing:0;font-weight:600}
@media(max-width:640px){
 .fs-storefront-tools .bazi-panel{padding:22px 16px 36px}
 .fs-storefront-tools .bazi-section-card{padding:20px 16px}
 .fs-storefront-tools .bazi-form-row{gap:14px}
 .fs-storefront-tools .bazi-field{flex:1 1 calc(50% - 14px);min-width:0}
 .fs-storefront-tools .bazi-form-row.justify-between{flex-direction:column;align-items:stretch}
 .fs-storefront-tools :is(.bazi-input,.fsm-select-btn){font-size:16px;min-height:48px}
 .fs-storefront-tools .bazi-btn{width:100%;min-height:48px;margin-left:0!important}
 .fs-storefront-tools .bazi-two-col{grid-template-columns:minmax(0,1fr)}
 .fs-storefront-tools .bazi-section-head{font-size:16px}
 .fs-storefront-tools .fsm-select-opt{min-height:46px;font-size:14px}
 .fs-storefront-tools .fs-palace{padding:12px 6px}
}
@media(prefers-reduced-motion:reduce){.fs-storefront-tools :is(.bazi-btn,.fsm-select-btn svg,.fpm-tool-card){transition:none}}
.fs-storefront-tools .kua-dir-row{border:1px solid var(--lite-line);border-radius:10px;background:#fff;box-shadow:none;padding:14px;transition:border-color 160ms ease}
.fs-storefront-tools .kua-dir-row:hover{transform:none;box-shadow:none;border-color:#c3a052}
.fs-storefront-tools .kua-dir-badge{border-radius:8px;font-weight:600}
.fs-storefront-tools .kua-compass-cell{border-radius:10px;box-shadow:none;transition:border-color 160ms ease}
.fs-storefront-tools .kua-compass-cell:hover{transform:none;box-shadow:none}
.fs-storefront-tools .kua-compass-lucky{background:#faf3df;border-color:#d3b977}
.fs-storefront-tools .kua-compass-unlucky{background:#f3f2ef;border-color:#d8d3cb}
.fs-storefront-tools .kua-compass-center{background:#6e1414;box-shadow:none}
.fs-storefront-tools :is(.fse-btn-primary,.fye-btn-primary,.fse-btn-secondary,.fye-btn-secondary){min-height:46px;border-radius:9px;box-shadow:none;font-size:14px;letter-spacing:0;font-weight:600}
.fs-storefront-tools :is(.fse-btn-primary,.fye-btn-primary):hover{transform:none;box-shadow:none}
.fs-storefront-tools :is(.fse-btn-secondary,.fye-btn-secondary){border-color:#c3a05240;background:#ffffff05}
.fs-storefront-tools :is(.fse-card,.fye-card) .fsm-select-btn{background:#fffaf2}

/* Keep the storefront's original maroon forms, translucent fields and yellow actions. */
.fs-storefront-tools .bazi-form-card{border-color:#c3a05233}
.fs-storefront-tools .bazi-form-card .bazi-input{width:100%;min-height:46px}
.fs-storefront-tools .bazi-form-card .bazi-label{color:#e4c7b6}
.fs-storefront-tools .bazi-form-card .bazi-form-title{color:#e4c7b6}
.fs-storefront-tools .bazi-form-card .fsm-select-btn{min-height:46px;border-radius:12px;background:#ffffff12;border-color:#ffffff30;color:#fff;font-weight:600}
.fs-storefront-tools .bazi-form-card .fsm-select-btn svg{color:var(--mdm-yellow,#ffe600)}
.fs-storefront-tools .bazi-form-card .fsm-select-label-previous{background:#581313}
.fs-storefront-tools .bazi-form-card .fsm-select.open .fsm-select-btn{border-color:var(--mdm-yellow,#ffe600);box-shadow:0 0 0 3px #ffe6001f}
.fs-storefront-tools .bazi-form-card .fsm-select-list{background:#3b0808;border-color:#ad833b;color:#fff;box-shadow:0 12px 30px #22000040}
.fs-storefront-tools .bazi-form-card .fsm-select-opt{color:#fff1e9}
.fs-storefront-tools .bazi-form-card .fsm-select-opt:hover,.fs-storefront-tools .bazi-form-card .fsm-select-opt:focus{background:#ffffff12;outline-color:#bd9a55}
.fs-storefront-tools .bazi-form-card .fsm-select-opt.sel{background:#ffe600;color:#2b0202}
.fs-storefront-tools .bazi-form-card .fsm-select-heading{color:#d4b77a}
.fs-storefront-tools .bazi-form-card .bazi-btn{min-height:46px}
/* Traditional nine-palace charts share the BaZi parchment and ruled-table treatment. */
.fs-storefront-tools #fs-app .fs-chart-title{color:#6e1414;font-size:15px;letter-spacing:.03em;margin-bottom:8px}
.fs-storefront-tools .fs-chart-guidance{text-align:center;font-size:12px;color:#786650;margin:0 0 22px;line-height:1.6}
.fs-storefront-tools #fs-grid{max-width:620px;gap:1px;padding:0;border:1px solid #cbb894;border-radius:10px;background:#cbb894;overflow:hidden;box-shadow:none}
.fs-storefront-tools #fs-grid .fs-palace{border:0;border-radius:0;min-height:150px;padding:0 0 15px;background:#fffdf8;box-shadow:none;color:#342b29;transform:none;outline:none;animation:none;transition:background-color .18s,box-shadow .18s}
.fs-storefront-tools #fs-grid .fs-palace-dir{color:#fff5e7;background:#2b0202;padding:10px 4px;margin-bottom:13px;font-size:11px;letter-spacing:.12em;font-weight:700}
.fs-storefront-tools #fs-grid .fs-palace-stars{padding:0 18px}
.fs-storefront-tools #fs-grid .fs-star-mountain{color:#713329;font-size:24px;font-weight:700}
.fs-storefront-tools #fs-grid .fs-star-water{color:#79602e;font-size:24px;font-weight:700}
.fs-storefront-tools #fs-grid .fs-star-base{color:#342b29;font-size:46px;font-weight:700;text-shadow:none;margin-top:9px}
.fs-storefront-tools #fs-grid .fs-palace-facing{box-shadow:inset 0 0 0 2px #b18b3b;background:#fbf5e8}
.fs-storefront-tools #fs-grid .fs-palace-facing .fs-palace-dir{background:#c3a052;color:#2b0202}
.fs-storefront-tools #fs-grid .fs-facing-label{font-size:9px;letter-spacing:.06em;margin-left:5px}
.fs-storefront-tools #fs-grid .fs-palace:hover{background:#f9f0df;box-shadow:inset 0 0 0 2px #b18b3b}
.fs-storefront-tools #fs-grid .fs-palace--active{background:#f5e9d2;box-shadow:inset 0 0 0 3px #6e1414}
.fs-storefront-tools #fs-grid .fs-palace:focus-visible{box-shadow:inset 0 0 0 3px #6e1414}
.fs-storefront-tools #fs-app .fs-legend{gap:10px 18px;margin-top:22px}
.fs-storefront-tools #fs-app .fs-legend-item{font-size:11px;color:#63513f}
.fs-storefront-tools #fs-app .fs-legend-dot{border:1px solid #00000030}
.fs-storefront-tools #fs-app .fs-desc-panel{margin-top:24px;padding:22px;background:#fffaf2;border:1px solid #c3a05280;border-radius:16px}
.fs-storefront-tools #fs-app .fs-desc-header{background:none;border-bottom:1px solid #c3a05240;padding-bottom:14px}
.fs-storefront-tools #fs-app .fs-desc-title{color:#6e1414}
.fs-storefront-tools #fs-app .fs-desc-interaction{color:#573c2c;background:#c3a05214}
@media(max-width:640px){
 .fs-storefront-tools .bazi-form-card{padding:24px 20px;border-radius:20px}
 .fs-storefront-tools .bazi-form-card .bazi-input{font-size:16px;min-height:48px}
 .fs-storefront-tools #fs-app .bazi-form-title+.bazi-form-row{flex-direction:column;align-items:stretch}
 .fs-storefront-tools #fs-app .bazi-field{flex:auto;width:100%}
 .fs-storefront-tools #fs-grid .fs-palace{min-height:115px;padding-bottom:12px}
 .fs-storefront-tools #fs-grid .fs-palace-dir{padding:9px 2px;margin-bottom:10px;font-size:10px}
 .fs-storefront-tools #fs-grid .fs-palace-stars{padding:0 10px}
 .fs-storefront-tools #fs-grid .fs-star-mountain,.fs-storefront-tools #fs-grid .fs-star-water{font-size:19px}
 .fs-storefront-tools #fs-grid .fs-star-base{font-size:35px;margin-top:6px}
 .fs-storefront-tools #fs-grid .fs-facing-label{display:block;margin:2px 0 0;font-size:8px}
 .fs-storefront-tools #fs-app .fs-desc-panel{padding:16px}
}

.fs-storefront-tools #fs-grid .fs-star-base{font-family:'Noto Serif','Songti SC',Georgia,serif;font-weight:500}
.fs-storefront-tools #fs-app .fs-legend-dot{background:#342b29!important}
.fs-storefront-tools #fs-app .fs-legend-item:nth-child(2) .fs-legend-dot{background:#713329!important}
.fs-storefront-tools #fs-app .fs-legend-item:nth-child(3) .fs-legend-dot{background:#79602e!important}
.fs-storefront-tools #fs-app .fs-legend-item:last-child .fs-legend-dot{background:#c3a052!important}
.fs-storefront-tools #fs-app .chart-watermark-logo{opacity:.12}
.fs-storefront-tools #kua-results .kua-badge{background:#fffdf8;color:#342b29;border:1px solid #cbb894;border-radius:0;box-shadow:none;font-family:'Noto Serif',Georgia,serif;font-weight:500}
.fs-storefront-tools #kua-results #k-gua-name{color:#967333;font-weight:500}
.fs-storefront-tools #kua-results :is(#k-lucky-dirs,#k-directions){border:1px solid #d8cab2;background:#fffdf8}
.fs-storefront-tools #kua-results .kua-dir-row{padding:0;gap:0;margin:0;border:0;border-bottom:1px solid #d8cab2;border-radius:0;background:transparent;box-shadow:none;transform:none}
.fs-storefront-tools #kua-results .kua-dir-row:last-child{border-bottom:0}
.fs-storefront-tools #kua-results .kua-dir-badge{align-self:stretch;height:auto;width:64px;border:0;border-right:1px solid #d8cab2;border-radius:0;background:#fcfaf5!important;color:#6e1414!important;font-weight:600}
.fs-storefront-tools #kua-results .kua-dir-info{padding:16px}
.fs-storefront-tools #kua-results .kua-dir-name{font-weight:500;color:#342b29;font-size:14px}
.fs-storefront-tools #kua-results .kua-dir-label{color:#79602e;font-weight:400}
.fs-storefront-tools #kua-results .kua-compass-wrapper{max-width:620px}
.fs-storefront-tools #k-compass-grid{gap:1px;background:#cbb894;border:1px solid #cbb894;border-radius:10px;overflow:hidden}
.fs-storefront-tools #k-compass-grid .kua-compass-cell{aspect-ratio:auto;min-height:160px;padding:0 0 20px;gap:0;border:0;border-radius:0;background:#fffdf8;box-shadow:none;transform:none;justify-content:flex-start}
.fs-storefront-tools #k-compass-grid .kua-compass-dir{width:100%;padding:10px 3px;background:#2b0202;color:#fff5e7;font-size:11px;letter-spacing:.03em;font-weight:500}
.fs-storefront-tools #k-compass-grid .kua-compass-lucky{background:#fbf5e8}
.fs-storefront-tools #k-compass-grid .kua-compass-lucky .kua-compass-dir{background:#c3a052;color:#2b0202}
.fs-storefront-tools .kua-palace-name{font-family:'Noto Serif','Songti SC','SimSun',serif;font-size:30px;font-weight:500;line-height:1.5;margin-top:14px;color:#342b29}
.fs-storefront-tools .kua-palace-roman{font-size:12px;color:#967333;margin-top:3px}
.fs-storefront-tools #k-compass-grid .kua-compass-kua{font-family:'Noto Serif',Georgia,serif;color:#342b29;font-size:40px;font-weight:500;margin-top:12px}
.fs-storefront-tools #kua-results .kua-compass-overlay-logo{opacity:.12}
@media(max-width:640px){
 .fs-storefront-tools #k-compass-grid .kua-compass-cell{min-height:125px;padding-bottom:12px}
 .fs-storefront-tools .kua-palace-name{font-size:24px;margin-top:12px}
 .fs-storefront-tools .kua-palace-roman{font-size:10px}
 .fs-storefront-tools #k-compass-grid .kua-compass-kua{font-size:34px}
 .fs-storefront-tools #k-compass-grid .kua-compass-dir{font-size:10px;min-height:34px}
}
