.mini-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.mini-stats > div { min-height:82px; display:grid; gap:7px; align-content:center; padding:14px 18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
.mini-stats span { color:var(--muted); font-size:12px; }.mini-stats strong { font-size:22px; font-weight:690; }
.editor-panel { margin-bottom:16px; }.editor-panel[hidden] { display:none; }
.form-grid, .cost-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:20px; }
.form-grid label, .cost-grid label, .binding-form label { display:grid; gap:7px; color:var(--muted); font-size:12px; }
.form-grid .input, .form-grid .select, .cost-grid .input, .binding-form .input { width:100%; }
.form-grid .span-2 { grid-column:span 2; }.form-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:4px; }
.plain-hint, .cell-sub { display:block; color:var(--muted); font-size:11px; font-weight:500; }.cell-sub { margin-top:5px; }
.product-cell { min-width:260px; display:flex; align-items:center; gap:11px; }.product-cell > span:last-child { min-width:0; }
.product-cell strong, .product-cell small { display:block; }.product-cell strong { max-width:340px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.product-cell small { margin-top:5px; color:var(--muted); font-size:11px; }
.product-thumb { width:42px; height:42px; display:grid; place-items:center; flex:0 0 auto; border:1px solid #dbeafe; border-radius:9px; color:#2563eb; background:#eff6ff; }
.row-actions { display:flex; align-items:center; gap:7px; white-space:nowrap; }.icon-action { width:30px; height:30px; display:grid; place-items:center; padding:0; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--muted); }.icon-action:hover { color:var(--text); background:var(--hover); }.icon-action.danger:hover { color:#b91c1c; border-color:#fecaca; background:#fef2f2; }
.empty-state.compact { min-height:290px; }.empty-state.compact > div:last-child { display:flex; gap:8px; }
.notice.neutral { border-color:#bfdbfe; color:#1e40af; background:#eff6ff; }
.calculator-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(350px,.75fr); gap:16px; align-items:start; }
.calculator-layout > .card { overflow:visible; }.cost-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.result-card { position:sticky; top:calc(var(--topbar) + var(--tabs) + 18px); overflow:hidden !important; }
.hero-result { display:grid; gap:7px; padding:24px; color:#fff; background:linear-gradient(135deg,#1d4ed8,#2563eb 55%,#3b82f6); }.hero-result span,.hero-result small { opacity:.82; }.hero-result strong { font-size:34px; letter-spacing:-.03em; }.hero-result small { font-size:12px; }
.breakdown { padding:8px 18px 16px; }.breakdown > div { min-height:36px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px dashed var(--line); font-size:12px; }.breakdown span { color:var(--muted); }.breakdown b { font-weight:620; }.breakdown .total { min-height:54px; margin-top:5px; border-bottom:0; font-size:13px; }.positive { color:#047857; }.negative { color:#b91c1c; }
.workflow-rail { display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto; align-items:center; gap:10px; margin-bottom:16px; padding:15px 18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.workflow-rail span { padding:7px 10px; border-radius:7px; color:var(--muted); font-size:12px; font-weight:650; }.workflow-rail span.done { color:#047857; background:#ecfdf5; }.workflow-rail span.active { color:#1d4ed8; background:#eff6ff; }.workflow-rail b { height:1px; background:var(--line); }
.settings-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(310px,.65fr); gap:16px; align-items:start; }
.connection-state { min-height:330px; display:grid; place-items:center; padding:24px; }.connection-state > p { margin-top:-100px; color:var(--muted); }
.spinner { width:28px; height:28px; border:3px solid var(--line); border-top-color:#2563eb; border-radius:999px; animation:spin .75s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.binding-form { width:min(560px,100%); display:grid; gap:18px; }.binding-form > .primary-btn { min-height:42px; }.form-help { margin:0; color:var(--muted); font-size:11px; line-height:1.7; }
.password-field { display:grid; grid-template-columns:1fr 38px; }.password-field .input { border-radius:8px 0 0 8px; }.password-field button { border:1px solid var(--line-strong); border-left:0; border-radius:0 8px 8px 0; background:var(--surface); color:var(--muted); }
.form-message { min-height:18px; font-size:12px; }.form-message.error { color:#b91c1c; }
.connected-shop { width:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:14px; padding:16px; border:1px solid var(--line); border-radius:12px; }.connected-shop strong,.connected-shop small { display:block; }.connected-shop small { margin-top:5px; color:var(--muted); font-size:11px; }
.shop-logo { width:44px; height:44px; display:grid; place-items:center; border-radius:11px; color:#fff; background:#1268f5; font-size:20px; font-weight:800; }.connection-success { width:100%; display:flex; align-items:center; gap:8px; margin-top:14px; padding:11px 13px; border-radius:9px; color:#047857; background:#ecfdf5; font-size:12px; }
.safety-list { display:grid; gap:4px; padding:14px; }.safety-list > div { display:grid; grid-template-columns:22px 1fr; gap:10px; padding:12px 8px; }.safety-list svg { color:#2563eb; }.safety-list strong,.safety-list small { display:block; }.safety-list strong { font-size:13px; }.safety-list small { margin-top:5px; color:var(--muted); font-size:11px; line-height:1.6; }
.inline-error { display:flex; align-items:flex-start; gap:9px; padding:12px 14px; border:1px solid #fecaca; border-radius:9px; color:#b91c1c; background:#fef2f2; text-align:left; }.inline-error svg { flex:0 0 auto; margin:0; }.inline-error code { padding:1px 4px; border-radius:4px; color:inherit; background:rgba(255,255,255,.7); }
button:disabled { cursor:not-allowed; opacity:.52; }

@media (max-width:1100px) { .calculator-layout,.settings-layout { grid-template-columns:1fr; }.result-card { position:static; }.mini-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { .form-grid,.cost-grid { grid-template-columns:1fr; }.form-grid .span-2 { grid-column:auto; }.mini-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }.workflow-rail { grid-template-columns:1fr; }.workflow-rail b { display:none; }.connected-shop { grid-template-columns:auto 1fr; }.connected-shop button { grid-column:1/-1; }.calculator-layout { display:block; }.result-card { margin-top:16px; } }
