/* === Stardew Valley Bundles Guide === */

:root {
  --cc: #5a9e4b;          /* junimo green */
  --cc-dark: #437a37;
  --cc-bg: #eaf5e6;
  --gold: #d9a93a;
}

main { max-width: 820px; }

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.45rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.tab {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--ink); background: var(--cc-bg); transform: none; border-color: transparent; }
.tab.picked { background: var(--cc-bg); border-color: var(--cc); color: var(--cc-dark); }

/* --- Toolbar --- */
.bd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.bd-overall {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  color: var(--cc-dark);
}
.bd-overall.all-done { color: var(--cc); }
.bd-reset {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.bd-reset:hover { border-color: var(--primary); color: var(--primary-dark); transform: none; }

/* --- Room sections --- */
.bd-room {
  margin-bottom: 0.8rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-left: 5px solid var(--cc);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-left-color 0.2s ease;
}
.bd-room.room-done { border-left-color: var(--gold); }
.bd-room-head {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.05rem;
}
.bd-room-head::-webkit-details-marker { display: none; }
.bd-room-head::after {
  content: "\25BC";
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.bd-room[open] .bd-room-head::after { transform: rotate(180deg); }
.bd-room-name {
  margin: 0;
  flex: 1;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--cc-dark);
}
.bd-room-progress { font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.room-done .bd-room-progress { color: var(--gold); }
.bd-room-unlock { margin: 0 1.05rem 0.9rem; font-size: 0.86rem; color: var(--muted); }

/* --- Bundle cards --- */
.bd-bundle-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.8rem;
  padding: 0 1.05rem 1.05rem;
}
.bd-bundle {
  background: #fffdfa;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 0.9rem 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.bd-bundle.done { border-color: var(--cc); background: var(--cc-bg); }
.bd-bundle-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.bd-bundle-name {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.bd-progress { font-size: 0.78rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.bd-bundle.done .bd-progress { color: var(--cc-dark); }

.bd-bundle-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.7rem; }
.bd-choose {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cc-dark);
  background: var(--cc-bg);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}
.bd-reward {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9a7415;
  background: #faf0d6;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}

/* --- Item toggles --- */
.bd-items { display: flex; flex-direction: column; gap: 0.35rem; }
.bd-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
}
.bd-item:hover { border-color: var(--cc); transform: none; }
.bd-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  position: relative;
  transition: all 0.12s ease;
}
.bd-item.got { border-color: var(--cc); background: var(--cc-bg); }
.bd-item.got .bd-check { background: var(--cc); border-color: var(--cc); }
.bd-item.got .bd-check::after {
  content: "";
  position: absolute;
  left: 4px; top: 0px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.bd-item.got .bd-item-label { color: var(--cc-dark); }

/* --- Find an item --- */
.bd-search {
  width: 100%;
  padding: 0.7rem 0.95rem;
  margin-bottom: 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  font: inherit;
  background: var(--card);
  transition: border-color 0.15s ease;
}
.bd-search:focus { outline: none; border-color: var(--cc); }
.bd-hint { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.75rem; }
.bd-none { color: var(--muted); padding: 1rem; text-align: center; }
.suggest { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.src { display: block; margin-top: 0.3rem; font-size: 0.92em; opacity: 0.85; }

.bd-item-title {
  margin: 0 0 0.2rem;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--cc-dark);
}
.bd-item-sub { margin: 0 0 0.8rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.bd-hit-list { display: flex; flex-direction: column; gap: 0.6rem; }
.bd-hit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-left: 5px solid var(--cc);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.bd-hit.got { border-left-color: var(--gold); background: var(--cc-bg); }
.bd-hit-bundle { font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; color: var(--ink); }
.bd-hit-room { text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--cc-dark); }
.bd-hit-qty { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); }

.bd-toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

@media (max-width: 500px) {
  .bd-bundle-list { grid-template-columns: 1fr; }
}

/* ---- Print: clean checklist ---- */
@media print {
  .crumb, .tabs, #m-find, .bd-toolbar-actions, footer { display: none !important; }
  body { background: #fff !important; padding: 0.4rem 0 0; }
  .bd-overall { font-size: 1rem; color: #000; }
  .bd-room {
    box-shadow: none !important;
    border: 1px solid #999 !important;
    break-inside: avoid;
    margin-bottom: 0.5rem;
  }
  .bd-room-head { padding: 0.3rem 0.4rem; }
  .bd-room-head::after { display: none !important; }
  .bd-room-name { font-size: 1.1rem; color: #000; }
  .bd-room-unlock { display: block !important; margin: 0 0.4rem 0.5rem; }
  .bd-bundle-list { display: grid !important; padding: 0 0.4rem 0.5rem; gap: 0.4rem; }
  .bd-bundle, .bd-bundle.done { background: #fff !important; box-shadow: none !important; border: 1px solid #bbb !important; break-inside: avoid; }
  .bd-item { background: #fff !important; border: 1px solid #999 !important; }
  .bd-check { background: #fff !important; border: 1.5px solid #333 !important; }
  .bd-item.got .bd-check::after { border-color: #333 !important; }
  .bd-reward, .bd-choose { border: 1px solid #ccc; }
}
