:root{--bg:#f5f7fb;--card:#fff;--text:#111827;--muted:#64748b;--line:#e5e7eb;--brand:#ff6a00;--brand2:#ff9d2e;--green:#16a34a;--red:#dc2626;--blue:#2563eb;--soft:#fff7ed}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;color:var(--text)}
a{text-decoration:none;color:inherit}
.hero{background:linear-gradient(135deg,#ff6a00,#ff9d2e);color:#fff;padding:28px 16px 42px}
.hero-inner{max-width:1180px;margin:auto;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px 22px;align-items:start}
.top-actions{grid-column:1;grid-row:1;display:flex;flex-wrap:wrap;gap:10px;margin-bottom:0;align-items:center}
.back{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:999px;background:rgba(255,255,255,.16);font-size:14px;border:0;color:#fff;cursor:pointer}
.rate-panel{grid-column:2;grid-row:1 / span 2;justify-self:end;width:100%;max-width:280px;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28);box-shadow:0 12px 30px rgba(0,0,0,.12);backdrop-filter:blur(8px)}
.rate-panel .rate-title{font-size:12px;opacity:.9;margin-bottom:5px}
.rate-panel .rate-value{font-size:16px;font-weight:950;line-height:1.48}
.rate-panel .rate-time{font-size:12px;color:#fff7ed;margin-top:5px;line-height:1.5}
.rate-panel button{margin-top:8px;border:0;border-radius:999px;padding:6px 10px;background:#fff;color:#ea580c;font-size:12px;font-weight:900;cursor:pointer}
.hero-main{grid-column:1;grid-row:2;display:flex;align-items:center;gap:16px;padding-right:0}
.hero-logo{width:72px;height:72px;border-radius:22px;background:#fff;box-shadow:0 14px 30px rgba(0,0,0,.14);display:flex;align-items:center;justify-content:center;color:#ff6a00;font-weight:950;font-size:34px}
.hero h1{margin:0;font-size:34px;line-height:1.2}
.hero p{margin:10px 0 0;max-width:830px;line-height:1.8;color:#fff7ed;font-size:15px}
.wrap{max-width:1180px;margin:-28px auto 50px;padding:0 16px}
.card{background:var(--card);border:1px solid rgba(226,232,240,.95);border-radius:22px;box-shadow:0 12px 36px rgba(15,23,42,.08);overflow:hidden}
.section{padding:22px;border-bottom:1px solid var(--line)}
.section:last-child{border-bottom:none}
.section-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}
.section-head h2{margin:0;font-size:20px}
.tips{font-size:13px;color:var(--muted);line-height:1.8}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.field label{display:block;font-size:13px;font-weight:800;color:#374151;margin-bottom:6px}
.field input,.field select{width:100%;height:42px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:0 11px;font-size:14px;outline:none}
.field input:focus,.field select:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,106,0,.12)}
.btn{border:0;border-radius:12px;padding:11px 15px;background:var(--brand);color:#fff;font-weight:900;cursor:pointer;font-size:14px}
.btn:hover{background:#ea580c}
.btn-soft{background:#fff7ed;color:#c2410c}
.btn-soft:hover{background:#ffedd5}
.btn-gray{background:#f1f5f9;color:#334155}
.btn-danger{background:#fee2e2;color:#dc2626}
.btn-danger:hover{background:#fecaca}
.toolbar{display:flex;gap:10px;flex-wrap:wrap}
.table-wrap{width:100%;overflow-x:auto}
table{border-collapse:collapse;width:100%}
.product-table{min-width:2140px}
.compact-mode .product-table{min-width:1420px}
.product-table th,.product-table td{border-bottom:1px solid var(--line);padding:9px 7px;text-align:left;font-size:13px;white-space:nowrap}
.product-table th{background:#f8fafc;color:#374151;font-weight:900;position:sticky;top:0;z-index:4}
.product-table td input{width:92px;height:36px;border:1px solid var(--line);border-radius:9px;padding:0 8px;outline:none}
.product-table td select{width:116px;height:36px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 7px;outline:none}
.product-table td input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,106,0,.1)}
.product-table td select:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,106,0,.1)}
.product-table input.input-invalid,.field input.input-invalid{border-color:#dc2626!important;box-shadow:0 0 0 3px rgba(220,38,38,.12)!important;background:#fff7f7}
.product-table td input.name{width:150px}
.platform-fee-hidden{display:none!important}
.platform-disabled{background:#f1f5f9!important;color:#94a3b8}
.validation-notice{display:none;border-color:#fecaca;background:#fff7f7;color:#991b1b}
.validation-notice.show{display:block}
.compact-mode .product-table th:nth-child(8),.compact-mode .product-table td:nth-child(8),
.compact-mode .product-table th:nth-child(9),.compact-mode .product-table td:nth-child(9),
.compact-mode .product-table th:nth-child(14),.compact-mode .product-table td:nth-child(14),
.compact-mode .product-table th:nth-child(15),.compact-mode .product-table td:nth-child(15),
.compact-mode .product-table th:nth-child(16),.compact-mode .product-table td:nth-child(16),
.compact-mode .product-table th:nth-child(17),.compact-mode .product-table td:nth-child(17),
.compact-mode .product-table th:nth-child(18),.compact-mode .product-table td:nth-child(18){display:none}
.product-table .row-profit{font-weight:900}
.product-table th:first-child,.product-table td:first-child{position:sticky;left:0;z-index:3;background:#fff;min-width:76px}
.product-table th:nth-child(2),.product-table td:nth-child(2){position:sticky;left:76px;z-index:3;background:#fff;box-shadow:7px 0 12px -12px rgba(15,23,42,.55)}
.product-table th:first-child,.product-table th:nth-child(2){z-index:6;background:#f8fafc}
.product-table tbody tr:hover td{background:#fffbeb}
.product-table tbody tr:hover td:first-child,.product-table tbody tr:hover td:nth-child(2){background:#fffbeb}
.sheet-workbar{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(330px,.8fr);gap:12px;margin:14px 0}
.batch-panel,.live-summary{border:1px solid var(--line);border-radius:15px;background:#f8fafc;padding:12px 14px}
.batch-panel summary{cursor:pointer;font-weight:900;color:#334155}
.batch-panel .batch-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}
.batch-panel select,.batch-panel input{height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 10px}
.batch-panel select{min-width:165px}.batch-panel input{width:130px}
.live-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;position:sticky;top:8px;z-index:8}
.live-summary div{min-width:0}.live-summary b{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}.live-summary span{display:block;font-weight:950;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-summary .profit span{color:#16a34a}.live-summary .draft span{font-size:12px;color:#64748b}
.paste-textarea{width:100%;min-height:260px;resize:vertical;border:1px solid var(--line);border-radius:14px;padding:12px;font:13px/1.7 Consolas,"Microsoft YaHei",monospace;outline:none}
.paste-textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,106,0,.1)}
.paste-example{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:10px 12px;font-size:12px;line-height:1.8;white-space:nowrap;color:#475569}
.paste-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.paste-actions select{height:40px;border:1px solid var(--line);border-radius:10px;padding:0 10px;background:#fff}
.keyboard-tip{display:inline-flex;align-items:center;gap:6px;color:#64748b;font-size:12px}.keyboard-tip kbd{border:1px solid #cbd5e1;background:#fff;border-radius:6px;padding:2px 6px;box-shadow:0 1px 0 #cbd5e1;color:#334155}
.result-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.result-box{background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:16px}
.result-box b{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}
.result-box span{display:block;font-size:24px;font-weight:950;color:#111827}
.result-box.main{background:#fff7ed;border-color:#fed7aa}
.result-box.main span{color:#ea580c}
.result-box.good span{color:var(--green)}
.result-box.bad span{color:var(--red)}
.reverse-section{background:linear-gradient(180deg,#fff,#fffaf5)}
.reverse-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:16px;border:1px solid #fed7aa;border-radius:16px;background:#fff7ed;color:#9a3412;font-size:13px;line-height:1.8}
.reverse-intro strong{display:block;color:#c2410c;font-size:15px;margin-bottom:3px}
.reverse-group-title{grid-column:1/-1;margin:4px 0 -2px;font-size:14px;color:#0f172a;font-weight:950}
.reverse-results{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:16px}
.reverse-result{border:1px solid var(--line);border-radius:16px;background:#fff;padding:15px;min-width:0}
.reverse-result.primary{background:linear-gradient(135deg,#fff7ed,#ffedd5);border-color:#fdba74}
.reverse-result b{display:block;color:var(--muted);font-size:12px;margin-bottom:7px}
.reverse-result span{display:block;color:#0f172a;font-size:21px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reverse-result.primary span{color:#ea580c}
.reverse-result small{display:block;margin-top:6px;color:#64748b;line-height:1.5}
.reverse-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:end}
.reverse-currency-label{display:inline-flex;margin-left:5px;padding:2px 7px;border-radius:999px;background:#ffedd5;color:#c2410c;font-size:11px;font-weight:900}
.reverse-notice.success{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
.reverse-notice.error{border-color:#fecaca;background:#fff7f7;color:#991b1b}
.notice{margin-top:14px;padding:13px 15px;border-radius:14px;border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;font-size:13px;line-height:1.8}
.detail{margin-top:14px;overflow-x:auto}
.detail table{width:100%;border-collapse:collapse;min-width:980px}
.detail th,.detail td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:left;font-size:13px}
.detail th{background:#f8fafc;color:#374151}
.article{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:0 10px 30px rgba(15,23,42,.06);padding:24px;margin-top:22px;color:#374151;line-height:1.9}
.article h2{margin-top:0;color:#111827;font-size:22px}
.article h3{color:#111827;margin-top:24px;font-size:18px}
.article ul{padding-left:22px}
.faq{display:grid;gap:12px}
.faq-item{background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:14px}
.faq-item b{display:block;color:#111827;margin-bottom:6px}
.footer{text-align:center;color:#94a3b8;font-size:13px;padding:20px 10px 40px}
body.protect-select-lock *{user-select:none;-webkit-user-select:none}
body.protect-select-lock input,body.protect-select-lock textarea,body.protect-select-lock select{user-select:text;-webkit-user-select:text}
.protect-mask{position:fixed;inset:0;z-index:999999;background:rgba(15,23,42,.96);color:#fff;display:none;align-items:center;justify-content:center;text-align:center;padding:24px}
.protect-mask.show{display:flex}
.protect-mask-box{max-width:520px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);border-radius:22px;padding:28px}
.protect-mask-box h2{margin:0 0 12px;font-size:24px}
.protect-mask-box p{margin:0 0 12px;line-height:1.8;color:#e5e7eb}
 .protect-mask-box a{display:inline-block;margin-top:12px;padding:10px 16px;border-radius:999px;background:#ff6a00;color:#fff;font-weight:900}
.protect-unlock{margin-top:16px;padding-top:16px;border-top:1px solid rgba(255,255,255,.14)}
.protect-unlock input{width:100%;height:42px;border:1px solid rgba(255,255,255,.28);border-radius:12px;background:rgba(255,255,255,.12);color:#fff;padding:0 12px;font-size:14px;outline:none;text-align:center}
.protect-unlock input::placeholder{color:rgba(255,255,255,.62)}
.protect-unlock button{margin-top:10px;border:0;border-radius:999px;padding:10px 18px;background:#ff6a00;color:#fff;font-weight:900;cursor:pointer}
.protect-unlock .protect-error{min-height:20px;margin-top:8px;font-size:13px;color:#fecaca}

.auth-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 13px;border-radius:999px;background:rgba(255,255,255,.16);font-size:14px;border:1px solid rgba(255,255,255,.18);color:#fff}
.auth-pill strong{font-weight:950}
.auth-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:999px;background:#fff;color:#ea580c;font-size:14px;font-weight:900;border:0;cursor:pointer}
.auth-btn.ghost{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.24)}
.user-only-tip{padding:12px 14px;border:1px dashed #fed7aa;background:#fff7ed;color:#9a3412;border-radius:14px;font-size:13px;line-height:1.8;margin-bottom:14px}
.library-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.library-table{min-width:980px}
.library-table th,.library-table td{border-bottom:1px solid var(--line);padding:10px 8px;text-align:left;font-size:13px;white-space:nowrap}
.library-table th{background:#f8fafc;color:#374151;font-weight:900}
.library-empty{padding:16px;border:1px dashed var(--line);background:#f8fafc;border-radius:14px;color:var(--muted);font-size:13px;line-height:1.8}
.library-compact{display:grid;grid-template-columns:1.1fr .9fr;gap:14px}
.library-compact-card{border:1px solid var(--line);background:linear-gradient(180deg,#fff,#f8fafc);border-radius:18px;padding:16px;min-height:112px}
.library-compact-card.light{background:#fff7ed;border-color:#fed7aa}
.library-compact-card b{display:block;font-size:15px;color:#111827;margin-bottom:8px}
.library-compact-card span{display:inline-flex;align-items:center;border-radius:999px;background:#f1f5f9;color:#334155;padding:6px 10px;font-size:13px;font-weight:900;margin-bottom:10px}
.library-compact-card.light span{background:#ffedd5;color:#c2410c}
.library-compact-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.8}
.match-list{display:grid;gap:10px;margin-top:12px}
.match-card{width:100%;border:1px solid var(--line);background:#f8fafc;border-radius:14px;padding:12px;text-align:left;cursor:pointer;transition:.18s}
.match-card:hover{border-color:#fed7aa;background:#fff7ed;transform:translateY(-1px)}
.match-card b{display:block;font-size:15px;color:#111827;margin-bottom:5px}
.match-card span{display:block;color:var(--muted);font-size:12px;line-height:1.7}
.match-hint{border:1px dashed #fed7aa;background:#fff7ed;color:#9a3412;border-radius:14px;padding:12px 14px;font-size:13px;line-height:1.8;margin-bottom:12px}
.library-picker-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}.library-picker-toolbar input{flex:1;min-width:220px}.library-picker-toolbar select{min-width:150px}.library-picker-list{display:grid;gap:10px;max-height:52vh;overflow:auto;padding-right:4px}.picker-card{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);background:#f8fafc;border-radius:14px;padding:12px;cursor:pointer}.picker-card:hover{border-color:#fed7aa;background:#fff7ed}.picker-card input{margin-top:4px}.picker-card b{display:block;color:#111827;margin-bottom:5px}.picker-card span{display:block;color:var(--muted);font-size:12px;line-height:1.7}
.modal-mask{position:fixed;inset:0;background:rgba(15,23,42,.62);z-index:1000000;display:none;align-items:center;justify-content:center;padding:18px}
.modal-mask.show{display:flex}
.modal-box{width:min(760px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:0 22px 80px rgba(0,0,0,.25);border:1px solid #e5e7eb}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line)}
.modal-head h3{margin:0;font-size:20px}
.modal-close{border:0;background:#f1f5f9;color:#334155;border-radius:999px;width:34px;height:34px;font-size:20px;cursor:pointer}
.modal-body{padding:20px}
.auth-tabs{display:flex;gap:10px;margin-bottom:16px}
.auth-tabs button{flex:1;border:1px solid var(--line);background:#f8fafc;border-radius:12px;padding:12px;font-weight:950;cursor:pointer;color:#334155}
.auth-tabs button.active{background:#fff7ed;border-color:#fed7aa;color:#ea580c}
.auth-form{display:none}.auth-form.active{display:block}
.modal-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.modal-grid .field.wide{grid-column:1/-1}
.saved-result-list{display:grid;gap:12px}
.saved-result-item{border:1px solid var(--line);background:#f8fafc;border-radius:14px;padding:14px}
.saved-result-item b{display:block;margin-bottom:6px;color:#111827}
.saved-result-meta{color:var(--muted);font-size:13px;line-height:1.8;margin-bottom:10px}
.saved-result-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:680px){.modal-grid{grid-template-columns:1fr}.auth-pill{width:100%;justify-content:center}.auth-btn{justify-content:center}.library-compact{grid-template-columns:1fr}}

.amount-cell{display:flex;align-items:center;gap:6px}.amount-cell input{width:84px!important}.currency-chip{display:inline-flex;align-items:center;height:24px;padding:0 7px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:900}.modal-money-row{display:flex;gap:8px}.modal-money-row input{flex:1}.modal-money-row select{flex:0 0 110px}
@media(max-width:920px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .result-grid{grid-template-columns:repeat(2,1fr)}
  .reverse-results{grid-template-columns:repeat(2,1fr)}
  .sheet-workbar{grid-template-columns:1fr}
  .live-summary{position:static}
  .hero h1{font-size:26px}
  .hero-logo{width:58px;height:58px;font-size:28px}
  .hero-inner{display:flex;flex-direction:column}
  .top-actions{order:1}
  .hero-main{order:2;padding-right:0}
  .rate-panel{order:3;width:100%;max-width:none;margin:0}
}
@media(max-width:560px){
  .hero-main{align-items:flex-start}
  .grid,.result-grid{grid-template-columns:1fr}
  .reverse-results{grid-template-columns:1fr}
  .live-summary{grid-template-columns:repeat(2,1fr)}
  .section{padding:16px}
  .hero{padding-top:22px}
  .hero p{font-size:13px}
  .card,.article{border-radius:16px}
  .rate-panel{max-width:none}
}

/* V5.41 visual cleanup: calmer SaaS look and clearer hierarchy. */
.hero{background:linear-gradient(135deg,#1d2939,#101828);padding:24px 16px 36px}.hero-inner{max-width:1220px}.hero-logo{width:62px;height:62px;border-radius:14px;box-shadow:none;color:#f97316}.hero h1{font-size:31px}.hero p{color:#d0d5dd;max-width:760px;line-height:1.7}.back,.auth-pill,.auth-btn.ghost{border-radius:9px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12)}.auth-btn{border-radius:9px}.rate-panel{border-radius:12px;background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.12);box-shadow:none}.rate-panel button{border-radius:8px}.wrap{max-width:1220px;margin:-18px auto 44px}.card{border-radius:14px;box-shadow:0 2px 10px rgba(16,24,40,.045)}.section{padding:20px}.section-head h2{font-size:18px}.field input,.field select{border-radius:9px}.btn{border-radius:9px}.notice{border-radius:10px}.article{border-radius:14px;box-shadow:0 2px 10px rgba(16,24,40,.04)}.first-use-note{background:#eff8ff;border-color:#b2ddff;color:#175cd3}
