#side-panels {
  width: 350px;
  flex: 0 0 350px;
  background: var(--cream);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

#panel-tabs {
  display: flex;
  background: var(--cream-2);
  padding: 6px 6px 0;
  gap: 4px;
  flex-wrap: wrap;
}
.tab-btn {
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px 10px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.12s, color 0.12s;
}
.tab-btn:hover { background: rgba(255, 255, 255, 0.6); }
.tab-btn.active { background: var(--cream); color: var(--ink); }

#panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 20px;
  min-height: 0;
}

.panel-title { margin: 10px 0 8px; font-size: 0.98rem; }
.panel-title:first-child { margin-top: 0; }

.shop-row {
  display: flex;
  flex-wrap: wrap; /* 按鈕擠不下時換行，避免文字被壓成直排 */
  align-items: center;
  gap: 10px;
  background: #fffdf6;
  border: 1px solid rgba(120, 84, 44, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.shop-row.locked { opacity: 0.6; }
.shop-icon { font-size: 1.6rem; }
.shop-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 150px;
  min-width: 0;
}
.shop-info .muted { font-size: 0.8rem; }
.qty-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.lock-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: #a08a6a;
  background: var(--cream-2);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 26px 10px;
  background: #fffdf6;
  border-radius: 12px;
  border: 1px dashed rgba(120, 84, 44, 0.2);
}

.hint { margin-top: 10px; }

/* 倉庫容量 */
.cap-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 600;
}
.cap-bar {
  flex: 1;
  min-width: 80px;
  height: 12px;
  background: #e8dcc4;
  border-radius: 999px;
  overflow: hidden;
}
.cap-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #ffcc80, #ffb74d);
  border-radius: 999px;
  transition: width 0.3s;
}

/* 訂單 */
.order-card {
  background: #fffdf6;
  border: 1px solid rgba(120, 84, 44, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.order-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.order-avatar { font-size: 1.4rem; }
.order-remain {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.order-need { font-size: 0.9rem; margin-bottom: 2px; }
.order-reward { font-size: 0.85rem; color: #8a6d3b; margin-bottom: 8px; }
.order-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* 每日任務 */
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffdf6;
  border: 1px solid rgba(120, 84, 44, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.task-row.claimed { opacity: 0.6; }
.task-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.task-bar {
  height: 8px;
  background: #e8dcc4;
  border-radius: 999px;
  overflow: hidden;
}
.task-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #9ccc65, #66bb6a);
  border-radius: 999px;
  transition: width 0.3s;
}
.claimed-tag { font-size: 0.82rem; font-weight: 700; color: var(--good); white-space: nowrap; }

/* 市場行情 */
.mkt { font-size: 0.75rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mkt.up { color: #2e7d32; }
.mkt.down { color: #c62828; }

/* 優質作物列 */
.quality-row {
  background: linear-gradient(90deg, #fff9e3, #fffdf6);
  border-color: rgba(212, 160, 23, 0.35);
}

/* 成就 */
.ach-earned { border-color: rgba(102, 187, 106, 0.5); }
.ach-locked { opacity: 0.65; }

/* 加工工坊 */
.machine-card {
  background: #fffdf6;
  border: 1px solid rgba(120, 84, 44, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.machine-card.ready {
  border-color: #ffd54f;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.35);
}
.machine-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.machine-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.recipe-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-top: 1px dashed rgba(120, 84, 44, 0.15);
}
.recipe-row.locked { opacity: 0.55; }
.recipe-icon { font-size: 1.3rem; }
.input-missing { color: #c62828; font-weight: 700; }
.slot-row {
  padding: 6px 8px;
  border-top: 1px dashed rgba(120, 84, 44, 0.15);
}
.slot-row.ready { background: #fff8dc; border-radius: 8px; }

/* 季節標籤 */
.season-tag {
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
  vertical-align: 1px;
}
.season-tag.in { background: #e3f4e4; color: #2e7d32; }
.season-tag.off { background: #fdecea; color: #c62828; }
