.container { max-width: 1200px; margin: auto; padding: 16px; }
@media (max-width:600px){ .container{ width:97%; } }
#pageHeader { background:#1e0a00; color:#fff; padding:16px; border-radius:16px; margin-bottom:16px; }
#mainBudgetDisplay { font-size:32px; font-weight:800; margin-bottom:8px; text-align:center; color:#f87216; line-height:1.1; }
.header-buttons { display:flex; justify-content:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.header-buttons button, .set-btn { padding:8px 14px; font-weight:700; color:#1e0a00; background:#f87216; border:none; border-radius:8px; cursor:pointer; transition:.2s; font-size:14px; }
.header-buttons button:hover, .set-btn:hover { background:#fb8f42; }
.progress-bar-container { background:#4a3b32; height:10px; border-radius:6px; overflow:hidden; margin-bottom:10px; }
.progress-bar-fill { height:100%; background:#f87216; width:0%; transition:width .5s ease-in-out; }
.control-panel { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-bottom:10px; }
.control-panel input, .control-panel select { padding:8px; font-size:14px; border-radius:8px; border:1px solid #ccc; }
#exchangeRateDisplay { text-align:center; margin-top:2px; font-weight:700; color:#f87216; }
.fsp-toolbar { background:#140700; border-radius:12px; padding:12px; margin:12px auto; width:97%; max-width:1200px; }
.fsp-toolbar-row { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.fsp-toolbar-group { display:flex; align-items:center; gap:8px; }
.fsp-price-filter { display:flex; align-items:center; gap:8px; }
.fsp-dash { color:#fff; opacity:.6; }
.product-grid { display:grid; grid-template-columns: 1fr; gap:16px; }
@media (min-width:600px){ .product-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (min-width:992px){ .product-grid{ grid-template-columns: repeat(3, 1fr); } }
.product-card { border:1px solid #eee; border-radius:12px; padding:14px; box-shadow:0 2px 10px rgba(0,0,0,0.08); text-align:center; background:#fff; }
.product-card img { width:100%; height:160px; object-fit:contain; margin-bottom:8px; }
.product-card h3 { font-size:16px; margin:6px 0; }
.product-price { color:#f87216; font-weight:800; margin-bottom:8px; }
.owned { margin-bottom:8px; font-weight:600; }
.action-group { display:flex; flex-direction:column; gap:8px; margin-top:6px; }
.action-group input { width:100%; border:1px solid #ccc; border-radius:8px; padding:8px; text-align:center; font-size:14px; }
.button-row { display:flex; gap:8px; justify-content:center; margin-top:4px; }
.buy-btn, .sell-btn { flex:1; padding:8px; font-weight:800; border-radius:8px; font-size:13px; cursor:pointer; border:none; }
.buy-btn { background:#28a745; color:#fff; }
.sell-btn { background:#dc3545; color:#fff; }
.sticky-header { position:fixed; top:0; left:50%; transform:translateX(-50%); width:92%; max-width:1000px; background:#1e0a00; color:#fff; padding:12px 14px; z-index:999; border-radius:0 0 14px 14px; box-shadow:0 4px 10px rgba(0,0,0,0.4); display:none; transition:all 0.3s ease; }
.sticky-content { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; }
.sticky-left { font-size:18px; font-weight:800; color:#f87216; }
.sticky-right { display:flex; gap:8px; }
.sticky-right button { padding:6px 10px; font-weight:800; color:#1e0a00; background:#f87216; border:none; border-radius:8px; }
.sticky-progress { width:100%; margin-top:8px; }
.sticky-bar { height:8px; background:#4a3b32; border-radius:6px; overflow:hidden; }
.sticky-fill { height:100%; background:#f87216; width:0%; transition:width 0.5s ease-in-out; }
.sticky-labels { display:flex; justify-content:space-between; font-size:12px; color:#ccc; }
.modal { display:none; position:fixed; z-index:999; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.5); justify-content:center; align-items:center; padding:10px; }
.modal-content { background:#fff; padding:16px; border-radius:12px; width:100%; max-width:640px; text-align:center; }
.modal-content .table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:10px 0; }
.receipt-table { width:100%; border-collapse:collapse; font-size:13px; min-width:520px; }
.receipt-table th, .receipt-table td { border:1px solid #ddd; padding:6px; text-align:center; }
.receipt-table th { background:#f87216; color:#fff; }
.receipt-actions button { padding:8px 14px; border:0; border-radius:8px; background:#111; color:#fff; margin:4px; cursor:pointer; }
.popup { position:fixed; top:30%; left:50%; transform:translate(-50%, -50%); background:#f87216; color:#fff; padding:16px 20px; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,0.3); z-index:2000; display:none; animation: popup-fade 0.5s ease; font-size:14px; text-align:center; }
@keyframes popup-fade { from { opacity: 0; transform: translate(-50%, -60%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (max-width:600px){ #mainBudgetDisplay { font-size:24px; } .product-card img { height:130px; } .sticky-left { font-size:16px; } }

/* Toolbar responsiveness */
.fsp-toolbar-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.fsp-toolbar-group{display:flex;align-items:center;gap:8px}
.fsp-toolbar-filter{margin-left:auto}
@media(max-width:768px){
  .fsp-toolbar-row{flex-direction:column;align-items:stretch}
  .fsp-toolbar-group{justify-content:space-between}
  .fsp-price-filter{width:100%}
  .fsp-price-filter input{flex:1;min-width:0}
}

/* === Toolbar visual fixes (labels white, inputs readable) === */
.fsp-toolbar, .fsp-toolbar label, .fsp-toolbar strong { color:#fff; }
.fsp-toolbar .fsp-dash { color:#fff; opacity:.75; }
.fsp-toolbar select, .fsp-toolbar input[type="number"] {
  background:#fff; color:#111; border:1px solid #ccc; border-radius:8px; padding:8px;
}

/* === Mobile layout for toolbar (stacked, full width) === */
@media(max-width:768px){
  .fsp-toolbar-row{flex-direction:column; align-items:stretch; gap:10px;}
  .fsp-toolbar-group{flex-direction:column; align-items:flex-start; gap:6px;}
  .fsp-toolbar-group label{margin:0 0 2px 2px;}
  #sortSelect{width:100%;}
  .fsp-price-filter{display:grid; grid-template-columns:1fr auto 1fr; gap:8px; width:100%; align-items:center;}
  .fsp-price-filter input{width:100%; min-width:0;}
  .fsp-price-filter .set-btn{grid-column:1 / -1;}
}
