:root{
  --bg:#f4f0e9;
  --surface:#fffdf9;
  --surface-2:#f8f5ef;
  --line:#ddd6cb;
  --ink:#22201d;
  --muted:#736d64;
  --brand:#e63b17;
  --brand-dark:#c92f0d;
  --success:#218356;
  --danger:#bd4339;
  --radius:5px;
}
*{box-sizing:border-box}
body{width:420px;min-height:600px;margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select{font:inherit}
.popup-shell{min-height:600px;display:grid;grid-template-rows:auto 1fr auto;background:var(--bg)}
.popup-header{display:flex;align-items:center;gap:8px;padding:12px 12px 10px;border-bottom:1px solid var(--line);background:var(--surface)}
.brand-lockup{display:flex;align-items:center;gap:8px;min-width:0}.brand-lockup img{width:28px;height:28px}.brand-lockup>div{display:grid;gap:1px}.brand-lockup strong{font-size:14px;letter-spacing:-.03em}.brand-lockup span{font-size:10px;color:var(--muted)}
.connection-chip{margin-left:auto;display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--line);background:#efebe4;color:var(--muted);font-size:10px;font-weight:700}.connection-chip i{width:7px;height:7px;background:#999}.connection-chip.ok{background:#edf7f2;color:var(--success);border-color:#b9dec8}.connection-chip.ok i{background:var(--success)}.connection-chip.error{background:#fbeceb;color:var(--danger);border-color:#eac0bc}.connection-chip.error i{background:var(--danger)}
.icon-button,.back-button{width:28px;height:28px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--muted);cursor:pointer}.icon-button:hover,.back-button:hover{background:var(--surface-2);color:var(--ink)}
.popup-content,.settings-view{padding:12px;overflow:auto}
.summary-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.summary-main{display:grid;gap:2px}.eyebrow{color:var(--brand);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.summary-main strong{font-size:13px}.summary-main small{color:var(--muted);font-size:10px;line-height:1.4}.summary-side{min-width:52px;padding:8px 7px;border:1px solid var(--line);background:var(--surface-2);text-align:center}.summary-side b{display:block;font-size:18px;color:var(--brand);line-height:1}.summary-side small{display:block;margin-top:4px;font-size:9px;color:var(--muted)}
.toolbar-row{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}.tool-button{min-height:30px;padding:0 8px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:11px;font-weight:700;cursor:pointer}.tool-button:hover{border-color:var(--brand);color:var(--brand)}
.list-section{margin-top:10px}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.section-head strong{font-size:12px}.section-head span{font-size:10px;color:var(--muted)}
.queue-list{display:grid;gap:7px}
.queue-item{display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px;padding:8px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.queue-item-image{width:56px;height:64px;border:1px solid var(--line);background:linear-gradient(145deg,#fff,#ece8e0);display:grid;place-items:center;overflow:hidden}.queue-item-image img{width:100%;height:100%;object-fit:contain;padding:3px}
.queue-item-main{min-width:0;display:grid;gap:5px}.queue-item-top{display:flex;align-items:start;justify-content:space-between;gap:8px}.queue-item-title{font-size:12px;font-weight:750;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.queue-item-price{white-space:nowrap;font-size:11px;font-weight:800}.queue-item-meta{font-size:10px;color:var(--muted);line-height:1.35}.queue-item-sku{font-size:9px;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.queue-item-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.item-action{min-height:26px;padding:0 6px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:10px;font-weight:700;cursor:pointer}.item-action:hover{border-color:var(--brand);color:var(--brand)}.item-action.primary{border-color:var(--brand);background:var(--brand);color:#fff}.item-action.primary:hover{background:var(--brand-dark)}
.empty-card{padding:28px 18px;text-align:center;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.empty-card strong{font-size:14px}.empty-card p{color:var(--muted);font-size:11px;line-height:1.5}.empty-card button{border:0;background:transparent;color:var(--brand);font-size:11px;font-weight:800;cursor:pointer}
.settings-view{display:grid;align-content:start;gap:10px}.settings-heading{display:flex;align-items:center;gap:8px}.settings-heading>div{display:grid}.settings-heading strong{font-size:14px}.settings-heading span{font-size:10px;color:var(--muted)}.setting{display:grid;gap:5px}.setting label{color:var(--muted);font-size:10px;font-weight:700}.setting input,.setting select{width:100%;height:34px;padding:0 9px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:11px}.setting-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.primary-action{min-height:34px;border:1px solid var(--brand);border-radius:var(--radius);background:var(--brand);color:#fff;font-size:11px;font-weight:800;cursor:pointer}.primary-action:hover{background:var(--brand-dark)}
footer{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-top:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:10px}
.hidden{display:none!important}
