/* West Hempstead Gemachs — shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand (network defaults) */
  --primary: #1B3A4B;
  --primary-dark: #12293A;
  --accent: #E0A63A;
  --accent-text: #8A5D14;
  --bg: #FBF6EC;
  --bg-tint: #F3EADA;
  --border: #E6DCC8;
  --border-strong: #CDBE9F;   /* hover borders */
  --input-border: #9C8B6E;    /* form controls: >= 3:1 on white */
  --text: #1F2A30;
  --text-muted: #5E6B72;
  --on-primary: #FBF6EC;
  --on-primary-muted: #D5DEE3;
  --success: #2F6B4A;
  --success-tint: #E4F0E8;
  --error: #A63D2A;
  --error-tint: #F6E3DE;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Legacy names, aliased to the brand tokens */
  --navy:   var(--primary);
  --navy-2: #254d63;
  --navy-3: var(--primary-dark);
  --teal:   var(--bg-tint);
  --teal-2: #EBDFC9;
  --green:  var(--success);
  --green-bg: var(--success-tint);
  --red:    var(--error);
  --red-bg: var(--error-tint);
  --amber:  #B45309;
  --amber-bg: #FDF1E3;
  --cream:  var(--bg);
  --grey:   #FDFAF4;
  --muted:  var(--text-muted);
  --white:  #FFFFFF;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31,42,48,.05), 0 4px 14px rgba(31,42,48,.05);
  /* Per-gemach theme (set by gemach.js; defaults = network look) */
  --t: #1B3A4B;
  --t-on: #FBF6EC;
  --t-on-muted: #D5DEE3;
  --t-glass: rgba(255,255,255,.12);
  --t-chip: rgba(255,255,255,.14);
  --t-glass-2: rgba(255,255,255,.22);
  --t-glass-b: rgba(255,255,255,.28);
  --t-glass-b2: rgba(255,255,255,.45);
  --t-solid-bg: #FBF6EC;
  --t-solid-fg: #1B3A4B;
  --t-solid-hover: #F3EADA;
  --t-strong: #1B3A4B;
  --t-strong-2: #254d63;
  --t-tint: #F8F1E4;
  --t-tint-2: #F3EADA;
  --t-border: #CDBE9F;
  --t-accent: #E0A63A;        /* 3px rule under the gemach band */
  --t-eyebrow: #E0A63A;       /* mobile lockup eyebrow */
  --t-link: var(--accent-text);
  --t-link-hover: var(--primary);
  --pill-bg: #E0A63A;         /* Donate pill */
  --focus-c: #1B3A4B;
  --t-ring: rgba(27,58,75,.22);
  --focus:  0 0 0 3px #FFFFFF, 0 0 0 5px var(--focus-c);
  --serif:  var(--font-display);
  --sans:   var(--font-body);
}

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
body.has-cta { padding-bottom: 6rem; }
img { max-width: 100%; display: block; }
a { color: var(--t-link); }
a:hover { color: var(--t-link-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: .75rem; top: -3rem; z-index: 300;
  background: var(--white); color: var(--navy); padding: .6rem 1rem; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: .75rem; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 1rem; }
main { flex: 1; }

/* ── Top bar (sub pages) ── */
.topbar { background: var(--primary); color: var(--on-primary); }
.topbar-ruled { border-bottom: 3px solid var(--accent); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem; color: var(--on-primary);
  text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -.005em; min-height: 44px;
}
.brand:hover { color: var(--on-primary); }
.brand img { width: 26px; height: 26px; }
.topbar-link {
  color: var(--on-primary-muted); text-decoration: none; font-size: .88rem; font-weight: 500;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 .25rem;
}
.topbar-link:hover { color: var(--on-primary); text-decoration: underline; }

/* ── Hero ── */
.hero {
  background: var(--primary);
  background-image: radial-gradient(1200px 400px at 85% -10%, rgba(255,255,255,.09), transparent 60%),
                    radial-gradient(800px 300px at -10% 110%, rgba(255,255,255,.06), transparent 60%);
  color: var(--on-primary);
  padding: 2.25rem 0 2rem;
  border-bottom: 3px solid var(--accent);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em;
  font-size: clamp(1.85rem, 6vw, 2.75rem); line-height: 1.15; margin-bottom: .5rem;
}
.hero .lede { color: var(--on-primary-muted); font-size: 1rem; max-width: 36rem; }
.hero-home { text-align: center; padding: 2.5rem 0 2.25rem; }
.hero-home .lede { margin: 0 auto; }
.hero-mark { width: 44px; height: 44px; margin: 0 auto .85rem; }

/* ── Search ── */
.search-form { margin: 1.5rem auto 0; max-width: 36rem; position: relative; }
.search-form label {
  display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: .55rem; color: var(--on-primary);
}
.search-box { position: relative; display: flex; }
.search-box svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input {
  width: 100%; height: 56px; border-radius: 14px; border: 2px solid transparent;
  padding: 0 3.25rem 0 3rem; font-size: 1.05rem; background: var(--white); color: var(--text);
  box-shadow: 0 6px 24px rgba(0,0,0,.18); -webkit-appearance: none; appearance: none;
}
.search-box input::placeholder { color: #6E787D; }
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: none; color: var(--muted);
  border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.search-clear:hover { background: var(--teal); color: var(--text); }
.search-hint { margin-top: .6rem; font-size: .84rem; color: var(--on-primary-muted); }
.search-hint button {
  background: rgba(255,255,255,.12); color: var(--on-primary); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: .2rem .7rem; margin: .2rem .15rem; font-size: .82rem; min-height: 32px;
}
.search-hint button:hover { background: rgba(255,255,255,.2); }

/* ── Sections ── */
.section { padding: 1.75rem 0 .5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; }
.section-sub { font-size: .85rem; color: var(--muted); }

/* ── Category tiles ── */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; list-style: none; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 880px) { .cat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.cat-tile {
  width: 100%; height: 100%; min-height: 96px; text-align: left;
  display: flex; flex-direction: column; gap: .3rem; padding: .85rem .9rem;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s, background .15s;
  text-decoration: none; color: var(--text);
}
.cat-tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.cat-tile[aria-pressed="true"] { border-color: var(--primary); background: var(--bg-tint); box-shadow: inset 0 0 0 1px var(--primary); }
.cat-icon { font-size: 1.6rem; line-height: 1; }
.cat-name { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.cat-meta { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.cat-meta .ok { color: var(--green); font-weight: 500; }

/* compact chips when a filter is active */
.filtering .cat-grid {
  display: flex; overflow-x: auto; gap: .45rem; padding: .15rem .1rem .6rem; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.filtering .cat-grid li { flex: 0 0 auto; }
.filtering .cat-tile {
  flex-direction: row; align-items: center; min-height: 44px; padding: .35rem .85rem; border-radius: 999px;
  box-shadow: none; gap: .4rem; white-space: nowrap;
}
.filtering .cat-tile:hover { transform: none; }
.filtering .cat-icon { font-size: 1.15rem; }
.filtering .cat-name { font-size: .88rem; font-weight: 500; }
.filtering .cat-meta { display: none; }
.filtering #gemachs-section { display: none; }
.filtering .cat-grid { position: relative; }
.filtering #cats-section { padding-bottom: 0; }
.filtering #cats-section .section-head { margin-bottom: .5rem; }
.filtering #cats-section .section-title { font-size: 1.1rem; }
.filtering #results-section { padding-top: .25rem; }
.filtering .hero-home { padding: 1.25rem 0 1.4rem; }
.filtering .hero-home .hero-mark, .filtering .hero-home .lede { display: none; }
.filtering .hero-home h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
.filtering .search-form { margin-top: .9rem; }

/* ── Results ── */
.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  margin: .25rem 0 .9rem;
}
.results-count { font-size: .95rem; color: var(--muted); }
.results-count strong { color: var(--text); }
.btn-link {
  background: none; border: 0; color: var(--navy); font-weight: 600; font-size: .9rem;
  text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 .25rem;
}
.result-group {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: .85rem; overflow: hidden;
}
.result-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem; background: var(--teal); border-bottom: 1px solid var(--border);
}
.result-group-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.result-group-head a { font-size: .82rem; font-weight: 600; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.result-list { list-style: none; }
.result-list li + li { border-top: 1px solid var(--border); }
.result-row {
  display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; min-height: 56px;
  text-decoration: none; color: var(--text); transition: background .12s;
}
.result-row:hover { background: var(--grey); color: var(--text); }
.result-row:focus-visible { box-shadow: inset 0 0 0 3px var(--primary); border-radius: 0; }
.result-thumb {
  width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0; background: var(--teal);
  display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.3rem;
}
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-main { flex: 1; min-width: 0; }
.result-name { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.result-sub { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: #A89A80; flex-shrink: 0; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600;
  padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; flex-shrink: 0; line-height: 1.4;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--green); background: var(--green-bg); }
.badge-out { color: var(--red); background: var(--red-bg); }
.badge-dir { color: var(--amber); background: var(--amber-bg); }

/* ── Gemach cards ── */
.gemach-list { display: grid; grid-template-columns: 1fr; gap: .85rem; list-style: none; }
@media (min-width: 720px) { .gemach-list { grid-template-columns: 1fr 1fr; } }
.gemach-card {
  position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.1rem 1rem; display: flex; flex-direction: column; gap: .5rem;
  transition: border-color .15s, transform .15s; height: 100%;
}
.gemach-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.gemach-card:focus-within { border-color: var(--navy); }
.gemach-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; padding-right: .5rem; }
.gemach-card h3 a { color: var(--text); text-decoration: none; }
.gemach-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.gemach-card h3 a:focus-visible { box-shadow: none; }
.gemach-card h3 a:focus-visible::after { box-shadow: var(--focus); }
.gemach-tagline { font-size: .9rem; color: var(--muted); line-height: 1.45; }
.gemach-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; font-size: .82rem; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  padding: .15rem .55rem; border-radius: 999px; background: var(--bg-tint); color: var(--primary); text-transform: uppercase;
}
.stat strong { color: var(--text); font-weight: 600; }
.stat .ok { color: var(--green); font-weight: 600; }
.gemach-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .35rem; }
.gemach-actions a { position: relative; z-index: 1; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--white); color: var(--navy); font-weight: 600; font-size: .9rem; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s; line-height: 1.2;
}
.btn:hover { background: var(--bg-tint); border-color: var(--border-strong); color: var(--navy); }
.btn svg { flex-shrink: 0; }
.btn-sm { min-height: 44px; padding: .45rem .8rem; font-size: .84rem; }
.btn-primary { background: var(--t-strong); border-color: var(--t-strong); color: var(--white); }
.btn-primary:hover { background: var(--t-strong-2); border-color: var(--t-strong-2); color: var(--white); }
.btn-pill {
  border-radius: 999px; background: var(--pill-bg); border-color: var(--pill-bg); color: var(--primary); padding-left: 1.1rem; padding-right: 1.2rem;
}
.btn-pill:hover { background: var(--pill-bg); border-color: var(--primary); color: var(--primary); filter: brightness(1.05); }
.btn-wa { color: #11703A; }
.btn-wa:hover { color: #11703A; }
.btn-on-dark {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: var(--white);
}
.btn-on-dark:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.45); color: var(--white); }
.btn-on-dark.btn-solid { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-on-dark.btn-solid:hover { background: var(--teal); color: var(--navy); }

/* ── Gemach page header ── */
.back-link {
  display: inline-flex; align-items: center; gap: .35rem; color: var(--on-primary-muted);
  text-decoration: none; font-size: .88rem; font-weight: 500; min-height: 44px; margin: -.75rem 0 .6rem -.25rem; padding: 0 .25rem;
}
.back-link:hover { color: var(--on-primary); text-decoration: underline; }
.hero-gemach { padding: 1.5rem 0 1.6rem; background-color: var(--t); color: var(--t-on); border-bottom: 3px solid var(--t-accent); }
.hero-gemach .chip { background: var(--t-chip); color: var(--t-on); margin-bottom: .6rem; }
.hero-gemach .tagline { color: var(--t-on-muted); font-size: .875rem; line-height: 1.45; max-width: 40rem; margin-top: .2rem; }
.hero-gemach .back-link { color: var(--t-on-muted); }
.hero-gemach .back-link:hover { color: var(--t-on); }
.hero-gemach .btn-on-dark { background: var(--t-glass); border-color: var(--t-glass-b); color: var(--t-on); }
.hero-gemach .btn-on-dark:hover { background: var(--t-glass-2); border-color: var(--t-glass-b2); color: var(--t-on); }
.hero-gemach .btn-on-dark.btn-solid { background: var(--t-solid-bg); color: var(--t-solid-fg); border-color: var(--t-solid-bg); }
.hero-gemach .btn-on-dark.btn-solid:hover { background: var(--t-solid-hover); color: var(--t-solid-fg); }
/* Header lockup: logo, then name + tagline */
.g-lockup { display: flex; align-items: center; gap: .9rem; margin: .15rem 0 .1rem; }
.g-lockup-text { min-width: 0; }
.hero-gemach h1.g-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.2;
  letter-spacing: -.01em; margin: 0; color: var(--t-on); overflow-wrap: anywhere;
}
.g-logo {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; object-fit: cover; background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--t-glass-b), 0 2px 8px rgba(0,0,0,.12);
}
.g-logo-bare { width: 48px; height: 48px; border-radius: 0; object-fit: contain; background: none; box-shadow: none; }
.g-logo-initials {
  display: flex; align-items: center; justify-content: center; background: var(--t-on); color: var(--t);
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: .02em; line-height: 1;
  box-shadow: none;
}
@media (max-width: 639px) {
  .g-lockup { gap: .7rem; align-items: flex-start; }
  .g-logo, .g-logo-bare { width: 36px; height: 36px; border-radius: 9px; margin-top: .1rem; }
  .g-logo-bare { border-radius: 0; }
  .g-logo-initials { font-size: .95rem; }
  .hero-gemach h1.g-name { font-size: 1.1875rem; line-height: 1.25; }
  .g-eyebrow {
    display: block; font-family: var(--font-body); font-size: 10px; font-weight: 600; line-height: 1.4;
    letter-spacing: .16em; text-transform: uppercase; color: var(--t-eyebrow); margin-bottom: .1rem;
  }
  .g-rest { display: block; }
}
.contact-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
@media (max-width: 479px) {
  .contact-row .btn { flex: 1 1 calc(50% - .5rem); }
}

.info-panel {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.1rem 1.1rem; margin-top: 1.25rem; display: grid; gap: 1rem;
}
@media (min-width: 720px) { .info-panel.has-side { grid-template-columns: 1fr 15rem; gap: 1.5rem; } }
.prose p { margin-bottom: .7rem; }
.prose p:last-child { margin-bottom: 0; }
.prose { font-size: .95rem; overflow-wrap: anywhere; }
.info-side { display: flex; flex-direction: column; gap: .9rem; font-size: .9rem; }
@media (min-width: 720px) { .info-panel.has-side .info-side { border-left: 1px solid var(--border); padding-left: 1.5rem; } }
.info-label { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .15rem; }
.info-side a { overflow-wrap: anywhere; }
.donation-info p { margin: 0 0 .75rem; line-height: 1.55; }
.modal-narrow { max-width: 480px; }
.modal.modal-narrow h2 { margin-bottom: .9rem; }
.donate-actions { margin-top: 1.1rem; }
.donate-actions .btn { width: 100%; justify-content: center; }
@media (min-width: 600px) { .donate-actions .btn { width: auto; } }
.donation-info a[href^="tel:"] { white-space: nowrap; }

.notice {
  border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; margin-top: 1rem;
  background: var(--amber-bg); color: #6B3406; border: 1px solid #F1D3AE;
}
.notice-info { background: var(--teal); color: var(--text); border-color: var(--border); }

/* ── Inventory ── */
.inv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.75rem 0 .35rem; }
.inv-help { font-size: .86rem; color: var(--muted); margin-bottom: .6rem; }
.cat-block { margin-top: 1.1rem; }
.cat-block h3 {
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: .45rem; margin-bottom: .55rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border);
}
.cat-block h3 .ci { font-size: 1.05rem; letter-spacing: 0; }
.item-list { display: flex; flex-direction: column; gap: .55rem; list-style: none; }

.item-row {
  display: flex; align-items: flex-start; gap: .75rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem; position: relative;
  transition: border-color .15s, background .15s, box-shadow .3s;
}
.item-row.selectable { cursor: pointer; }
.item-row.selectable:hover { border-color: var(--border-strong); }
.item-row.selected { border-color: var(--t-strong); background: var(--t-tint); box-shadow: inset 0 0 0 1px var(--t-strong); }
.item-row.flash { animation: flash 2.2s ease-out 1; }
@keyframes flash {
  0%, 35% { box-shadow: 0 0 0 4px rgba(180,83,9,.35); border-color: var(--amber); }
  100% { box-shadow: 0 0 0 0 rgba(180,83,9,0); }
}
@media (prefers-reduced-motion: reduce) {
  .item-row.flash { animation: none; outline: 3px solid var(--amber); }
  * { transition: none !important; scroll-behavior: auto !important; }
}
.item-thumb {
  width: 92px; height: 72px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--teal);
  display: flex; align-items: center; justify-content: center; border: 0; padding: 0; color: var(--navy);
}
button.item-thumb { cursor: zoom-in; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
button.item-thumb:hover img { opacity: .88; }
.item-thumb .ph { opacity: .28; }
.item-content { flex: 1; min-width: 0; }
.item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.item-name { font-family: var(--font-display); font-size: 1.06rem; font-weight: 600; line-height: 1.3; }
.item-units { font-size: .76rem; color: var(--muted); margin-top: .1rem; }
.item-desc-toggle {
  font-size: .8rem; color: var(--muted); background: none; border: 0; padding: .35rem .1rem; margin-top: .1rem;
  display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; font-weight: 500;
}
.item-desc-toggle:hover { color: var(--t-strong); }
.item-desc-toggle .arr { transition: transform .15s; display: inline-block; }
.item-desc-toggle[aria-expanded="true"] .arr { transform: rotate(90deg); }
.item-desc { font-size: .86rem; color: var(--muted); line-height: 1.5; padding-bottom: .15rem; }
.item-check {
  flex-shrink: 0; width: 44px; height: 44px; margin: -.35rem -.35rem 0 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.item-check input { width: 22px; height: 22px; accent-color: var(--t-strong); cursor: pointer; }

/* ── Sticky CTA ── */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(31,42,48,.08);
  transform: translateY(110%); transition: transform .2s ease; visibility: hidden;
  padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom));
}
.sticky-cta.visible { transform: translateY(0); visibility: visible; }
.sticky-cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.cta-label { font-size: .9rem; color: var(--muted); }
.cta-label strong { color: var(--text); }
.cta-clear { font-size: .82rem; }
@media (max-width: 479px) {
  .sticky-cta .btn-primary { flex: 1; }
}

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; background: rgba(8,20,27,.9); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 3.5rem 1rem 4rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; background: #fff; }
.lightbox-close {
  position: absolute; top: .75rem; right: .75rem; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 0; color: #fff; font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.28); }
.lightbox-caption {
  position: absolute; bottom: 1.1rem; left: 1rem; right: 1rem; text-align: center;
  color: rgba(255,255,255,.88); font-size: .95rem;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8,20,27,.5); z-index: 100;
  display: none; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); width: 100%; max-width: 560px; max-height: 94vh; max-height: 94dvh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 1.5rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom)); position: relative;
  overscroll-behavior: contain;
}
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 1.25rem; }
  .modal { border-radius: 16px; padding: 2rem; max-height: 90vh; }
  .modal h2 { font-size: 1.5rem; }
}
.modal h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; line-height: 1.2; margin-bottom: .25rem; padding-right: 2.5rem; }
.modal-subtitle { font-size: .88rem; color: var(--muted); margin-bottom: 1.25rem; }
.modal-close {
  position: absolute; top: .6rem; right: .6rem; width: 44px; height: 44px; border-radius: 50%;
  background: none; border: 0; font-size: 1.6rem; color: var(--muted); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg-tint); color: var(--text); }

.form-group { margin-bottom: 1rem; }
.form-group > label, .form-group > .label, fieldset legend {
  display: block; font-size: .86rem; font-weight: 600; margin-bottom: .35rem; color: var(--text);
}
fieldset { border: 0; }
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 400; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; min-height: 46px; padding: .6rem .75rem; border: 1px solid var(--input-border); border-radius: 8px;
  font-size: 16px; color: var(--text); background: var(--white); transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--t-strong); box-shadow: 0 0 0 3px var(--t-ring);
}
.form-group input[aria-invalid="true"], .form-group textarea[aria-invalid="true"] { border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 88px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0 .75rem; }
@media (min-width: 480px) { .form-row { grid-template-columns: 1fr 1fr; } }
.items-grid { display: grid; grid-template-columns: 1fr; gap: .4rem; }
@media (min-width: 480px) { .items-grid { grid-template-columns: 1fr 1fr; } }
.item-check-label {
  display: flex; align-items: center; gap: .55rem; padding: .45rem .65rem; min-height: 44px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: .86rem; line-height: 1.3;
  transition: border-color .15s, background .15s;
}
.item-check-label:hover { border-color: var(--t-strong); }
.item-check-label.checked { border-color: var(--t-strong); background: var(--t-tint-2); }
.item-check-label input { width: 20px; height: 20px; min-height: 0; accent-color: var(--t-strong); flex-shrink: 0; }
.item-check-label small { display: block; color: var(--red); font-size: .72rem; }
@media (max-width: 479px) {
  .item-thumb { width: 72px; height: 60px; }
  .item-row { gap: .65rem; }
}
.items-more { margin-top: .5rem; }
.items-more summary {
  cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--t-strong); min-height: 44px;
  display: flex; align-items: center; gap: .4rem; list-style: none;
}
.items-more summary::-webkit-details-marker { display: none; }
.items-more summary::before { content: "+"; font-size: 1.15rem; width: 1.2rem; text-align: center; }
.items-more[open] summary::before { content: "−"; }
.items-more .items-grid { margin-top: .25rem; }
.duration-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .75rem; }
.duration-btn {
  min-height: 46px; padding: .5rem; border: 1px solid var(--input-border); border-radius: 8px; background: var(--white);
  font-size: .84rem; font-weight: 500; text-align: center; line-height: 1.25; transition: all .15s;
}
.duration-btn[aria-pressed="true"] { background: var(--t-strong); color: var(--white); border-color: var(--t-strong); }
.open-ended-msg { font-size: .86rem; color: var(--muted); padding: .2rem 0; }
.btn-submit { width: 100%; min-height: 50px; font-size: 1rem; margin-top: .35rem; border-radius: 10px; }
.btn-submit:disabled { background: var(--text-muted); border-color: var(--text-muted); cursor: not-allowed; }
.form-note { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .75rem; line-height: 1.5; }
.error-msg {
  font-size: .88rem; color: var(--red); background: var(--red-bg); border-radius: 8px;
  padding: .55rem .75rem; margin-top: .6rem; text-align: center;
}
.success-message { text-align: center; padding: 1.5rem 0 .5rem; }
.success-message .checkmark {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 2rem;
}
.success-message h2 { padding-right: 0; margin-bottom: .5rem; }
.success-message p { font-size: .92rem; color: var(--muted); margin-bottom: 1.25rem; }

/* ── States / skeleton ── */
.state-message { text-align: center; padding: 2.5rem 1rem; color: var(--muted); font-size: .95rem; }
.empty-state {
  text-align: center; background: var(--white); border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 2rem 1.25rem; color: var(--muted);
}
.empty-state .big { font-size: 2rem; margin-bottom: .4rem; }
.empty-state h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--text); margin-bottom: .35rem; }
.empty-state p { font-size: .92rem; max-width: 30rem; margin: 0 auto .5rem; }
.sk {
  background: linear-gradient(90deg, #EFE6D4 25%, #F7F0E3 37%, #EFE6D4 63%); background-size: 400% 100%;
  animation: sk 1.3s ease infinite; border-radius: 8px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: .9rem; margin: .35rem 0; }
.sk-dark { background: linear-gradient(90deg, rgba(255,255,255,.12) 25%, rgba(255,255,255,.2) 37%, rgba(255,255,255,.12) 63%); background-size: 400% 100%; }
.sk-title { width: 60%; height: 2rem; margin-bottom: .6rem; }
.sk-w40 { width: 40%; }
.sk-tile { min-height: 96px; border-radius: var(--radius); }
.sk-card { min-height: 150px; border-radius: var(--radius); }
.sk-row { min-height: 88px; border-radius: var(--radius); }

/* ── Content pages ── */
.page { padding-top: 1.75rem; padding-bottom: 2.5rem; }
#g-body > .empty-state { margin-top: 1.5rem; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.35rem 1.2rem;
}
@media (min-width: 640px) { .card { padding: 2rem 2.1rem; } }
.content { max-width: 44rem; }
.content h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 1.5rem 0 .5rem; }
.content p { margin-bottom: .9rem; }
.content ul { padding-left: 1.2rem; margin-bottom: .9rem; }
.content li { margin-bottom: .6rem; }
.content li::marker { color: var(--accent-text); }
.content .credit { font-style: italic; color: var(--muted); margin-top: 1.5rem; }
.lead-in { font-size: 1.05rem; }

/* ── Footer ── */
.site-footer { background: var(--primary-dark); color: var(--on-primary-muted); margin-top: 2.5rem; padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); font-size: .86rem; }
.site-footer .wrap { display: flex; flex-direction: column; gap: .6rem; align-items: center; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 .25rem; }
.footer-nav a { color: var(--on-primary); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 .5rem; font-weight: 500; }
.footer-nav a:hover { text-decoration: underline; }
.footer-nav .dot { opacity: .45; }
.footer-credit { font-size: .8rem; color: var(--on-primary-muted); max-width: 32rem; }
.footer-credit a { color: var(--on-primary); }
.footer-credit a:hover { color: var(--accent); }


/* ── v3: logos, theme stripes, contact emphasis ── */
.gemach-card { border-left: 5px solid var(--card-t, var(--navy)); }
.gemach-head { display: flex; align-items: center; gap: .8rem; }
.gemach-head h3 { min-width: 0; }
.g-avatar {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; object-fit: cover; background: #FFFFFF;
  border: 1px solid var(--border);
}
.g-initials {
  display: flex; align-items: center; justify-content: center; border: 0;
  background: var(--card-t, var(--navy)); color: var(--card-on, #FFFFFF);
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: .02em; line-height: 1;
}
.btn-sm.btn-primary .ic-wa, .btn-primary.btn-wa { color: var(--white); }
.tag {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600;
  padding: .15rem .55rem; border-radius: 999px; background: #F1ECF6; color: #4E3A6B;
}
.badge-appt { color: #4E3A6B; background: #F1ECF6; }

/* Gemach Info */
.ginfo {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.1rem; margin-top: 1rem; display: grid; gap: .9rem;
}
.ginfo h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; }
.ginfo-row { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; }
.ginfo-row > svg { color: var(--t-strong); margin-top: .15rem; }
.ginfo-row .info-label { margin-bottom: .1rem; }
.deposit-callout {
  border-radius: 10px; padding: .8rem .95rem; background: var(--amber-bg); border: 1px solid #F1D3AE; color: #5C2E06;
  font-size: .92rem;
}
.deposit-callout strong { display: flex; align-items: center; gap: .4rem; color: #7A3A05; font-size: .95rem; margin-bottom: .2rem; }
.deposit-callout .prose { font-size: .9rem; }

/* Request form (v3) */
.event-summary {
  margin-top: .5rem; padding: .6rem .8rem; border-radius: 8px; background: var(--t-tint-2); color: var(--text);
  font-size: .9rem; display: flex; flex-wrap: wrap; gap: .15rem .9rem;
}
.event-summary b { font-weight: 600; }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.deposit-form { margin-bottom: 1rem; }
.deposit-form .deposit-callout { margin-bottom: .6rem; }
.check-line {
  display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; font-weight: 500; cursor: pointer;
  padding: .55rem .7rem; border: 1px solid var(--input-border); border-radius: 8px; min-height: 46px;
}
.check-line input { width: 20px; height: 20px; min-height: 0; margin-top: .05rem; accent-color: var(--t-strong); flex-shrink: 0; }
.check-line[aria-invalid="true"], .check-line.invalid { border-color: var(--red); }
.form-group input[type="number"] { max-width: 9rem; }
.sticky-cta.always .cta-label { display: none; }
@media (min-width: 600px) { .sticky-cta.always .cta-label { display: block; } }

/* Request form (r5): inline field errors */
.field-error {
  display: flex; align-items: flex-start; gap: .35rem; margin-top: .35rem;
  font-size: .84rem; font-weight: 500; line-height: 1.35; color: var(--red);
}
.field-error svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: .1rem; }
.form-group select[aria-invalid="true"] { border-color: var(--red); }
.form-group input[aria-invalid="true"], .form-group select[aria-invalid="true"], .form-group textarea[aria-invalid="true"] {
  border-width: 2px; padding: calc(.6rem - 1px) calc(.75rem - 1px);
}
#items-group.invalid .item-check-label { border-color: #DDA597; }
#date-fields { row-gap: 1rem; }
#date-fields .form-group { margin-bottom: 0; }
#dates-group .field-hint { margin-top: .45rem; }

/* Quantity items (e.g. chairs): "How many?" rows in the request form */
#qty-list { display: grid; gap: .6rem; }
.qty-row { display: grid; grid-template-columns: 1fr 7rem; align-items: center; gap: .15rem .75rem; }
.qty-row label { font-size: .9rem; font-weight: 500; }
.form-group .qty-row input[type="number"] { max-width: none; }
.qty-row .qty-note, .qty-row .field-error { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--muted); }
.qty-row .qty-note.warn { color: var(--amber); }
.qty-row .field-error { color: var(--red); }
