/* Open-needs page: mini giving cards on the red paper. Builds on style.css. */

.wrap.wide { max-width: 1040px; }
.intro { max-width: 560px; margin: 10px auto 0; font-size: 16px; color: rgba(255, 255, 255, .92); }

.banner {
  max-width: 560px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--yellow);
  color: #4a3500;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}

/* ---------- category chips ---------- */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin: 0 -2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(80, 8, 18, .25);
}
.chip .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cat, var(--red)); flex: none; }
.chip .ct { font-weight: 600; opacity: .65; }
.chip[aria-pressed="true"] {
  background: var(--cat, var(--yellow));
  color: #fff;
  box-shadow: 0 0 0 2.5px #fff, 0 3px 8px rgba(80, 8, 18, .35);
}
.chip[aria-pressed="true"] .dot { background: #fff; }
.chip.all[aria-pressed="true"] { background: var(--yellow); color: #4a3500; }
.chip.all[aria-pressed="true"] .dot { background: #4a3500; }
.chip.saved .hico { width: 16px; height: 16px; fill: var(--red); }
.chip.saved[aria-pressed="true"] { background: #fff; color: var(--red); box-shadow: 0 0 0 2.5px var(--yellow), 0 3px 8px rgba(80, 8, 18, .35); }

/* ---------- board ---------- */

.status { text-align: center; color: rgba(255, 255, 255, .92); font-weight: 600; margin: 30px 0; }

.group { margin: 22px 0 0; }
.group h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}
.group h2::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cat);
  box-shadow: 0 0 0 2.5px #fff;
  flex: none;
}
.group h2 .ct { font-weight: 600; opacity: .8; letter-spacing: .04em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}

/* ---------- the mini card ---------- */

.gcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 286px;
  background: #fff url(card-bg.svg) center / cover no-repeat;
  color: var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(80, 8, 18, .38);
  transition: transform .15s ease, box-shadow .15s ease;
}
.gcard:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(80, 8, 18, .45); }

.gtop { padding: 14px 14px 0; text-align: center; }
.glogo { display: block; width: 82%; max-width: 132px; height: auto; margin: 0 auto; }

.gward {
  margin: 8px 14px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  color: var(--red);
}
.gcard hr { border: 0; border-top: 1px solid rgba(215, 27, 52, .35); margin: 5px 14px 0; width: auto; }

.gneed {
  flex: 1;
  margin: 0;
  padding: 10px 14px 4px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
  color: var(--red);
  overflow-wrap: anywhere;
}
.gamt {
  align-self: center;
  margin: 0 14px 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 800;
}

.gfoot { display: flex; align-items: flex-end; justify-content: space-between; padding: 4px 8px 8px 14px; }
.gnum { color: var(--red); font-weight: 800; line-height: 1; font-size: 34px; letter-spacing: -.01em; }
.gnum small { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--red); opacity: .85; }

.gcat {
  padding: 6px 10px;
  background: var(--cat);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
}

.heart {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: transparent;
  color: var(--red);
}
.heart svg { width: 28px; height: 28px; fill: transparent; stroke: var(--red); stroke-width: 2; stroke-linejoin: round; transition: transform .15s ease, fill .15s ease; }
.heart:hover svg { transform: scale(1.1); }
.heart[aria-pressed="true"] svg { fill: var(--red-top); animation: pop .28s ease; }
.gcard.is-saved { box-shadow: 0 0 0 3px var(--yellow), 0 12px 24px rgba(80, 8, 18, .42); }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.heart:focus-visible, .chip:focus-visible, .btn-main:focus-visible, .btn-ghost:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.swap { text-align: center; margin: 30px 0 0; font-size: 15px; color: rgba(255, 255, 255, .9); }
.swap a { color: #fff; font-weight: 700; }

body { padding-bottom: 8px; }
body.has-bar { padding-bottom: 96px; }

/* ---------- saved bar ---------- */

.savebar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  color: var(--ink);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 24px rgba(80, 8, 18, .35);
}
.saved-count { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 17px; margin-right: auto; max-width: 480px; }
.hico { width: 22px; height: 22px; fill: var(--red-top); flex: none; }
.btn-main, .btn-ghost { min-height: 46px; padding: 10px 18px; font-size: 16px; border-radius: 12px; }
.btn-main { color: #fff; background: linear-gradient(180deg, var(--red-top), var(--red)); box-shadow: 0 2px 0 var(--red-deep); }
.btn-ghost { color: var(--red); background: #fff; box-shadow: inset 0 0 0 1.5px var(--red); }
.btn-main:active { transform: translateY(1px); box-shadow: none; }
@media (max-width: 460px) {
  .savebar { gap: 8px; }
  .saved-count { flex: 1 0 100%; margin: 0; justify-content: center; }
  .btn-main, .btn-ghost { flex: 1; padding: 10px 8px; }
}

.toast {
  position: fixed;
  left: 50%; bottom: 110px;
  z-index: 40;
  transform: translate(-50%, 20px);
  max-width: 90vw;
  padding: 11px 18px;
  border-radius: 999px;
  background: #26262b;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- register sheet ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(40, 6, 12, .62);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.panel {
  width: 100%;
  max-width: 520px;
  max-height: 94vh;
  max-height: 94dvh;
  overflow-y: auto;
  background: #fff;
  color: var(--ink);
  border-radius: 20px 20px 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
}
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 24px; }
  .panel { border-radius: 20px; }
}
.panel h2 { font-weight: 800; font-size: 23px; line-height: 1.2; color: var(--red); margin: 0 0 6px; }
.panel .lead { color: var(--muted); margin: 0 0 12px; }

.picklist, .donelist { list-style: none; margin: 0 0 8px; padding: 0; }
.picklist li { border: 1.5px solid var(--line); border-left: 6px solid var(--cat); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.picklist label { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.picklist input[type=checkbox] { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--red); }
.picklist .n { font-weight: 800; color: var(--red); margin-right: 4px; }
.picklist .sub { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cat); margin-top: 2px; }
.picklist .pledge { display: block; margin: 8px 0 0 32px; }
.picklist .pledge input { font-size: 17px; padding: 10px 12px; }
.picklist .pledge span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }

.donelist { text-align: left; margin: 12px 0; }
.donelist li { border: 1.5px solid var(--line); border-left: 6px solid var(--cat); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.donelist .n { font-weight: 800; color: var(--red); margin-right: 4px; }
.panel .center { text-align: center; }
.panel .badge { margin-bottom: 10px; }
