/* One primary capture action; the saved collection is the main destination. */
#app { max-width: 1080px; }
.library-topbar { height: 78px; border-bottom: 1px solid var(--line); }
.sharing-setup { color: var(--muted); font-size: .8rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.sharing-setup:hover { color: var(--green); }
.library-head { padding: 36px 0 34px; gap: 24px; align-items: center; }
.library-head h1 { font-size: clamp(2.25rem,4.6vw,3.8rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 700; }
.library-intro { margin: 14px 0 0; max-width: 320px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.capture-button { border-radius: 12px; padding: 14px 20px; min-height: 52px; gap: 10px; box-shadow: none; font-size: .92rem; font-weight: 650; justify-content: center; white-space: nowrap; }
.capture-button > span:first-child { font-size: 1.3rem; line-height: 1; font-weight: 400; }
.capture-button:hover { transform: none; background: #2c4933; }
.collection-head { margin-bottom: 20px; padding-bottom: 14px; }
.collection-head span { font-size: .78rem; }
.collection-actions { width:100%; }
.library-loading { color: var(--muted); font-size: .9rem; }
#recipes .empty { min-height: 230px; padding: 32px 22px; border: 1px dashed #d7d8cf; border-radius: 16px; }
#recipes .empty h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.025em; margin: 0 0 10px; }
#recipes .empty p { font-size: .88rem; max-width: 300px; line-height: 1.6; }
.recipe-grid { gap: 28px 20px; }
.card-image { border-radius: 14px; aspect-ratio: 4/3; }
.card-copy h3 { line-height: 1.25; font-size: 1.1rem; letter-spacing: -.025em; font-weight: 650; }
.card-source { text-transform: none; letter-spacing: 0; font-weight: 550; font-size: .75rem; }
.card-meta { line-height: 1.5; }
@media(max-width:760px) {
  #app { padding-left: max(20px,env(safe-area-inset-left)); padding-right: max(20px,env(safe-area-inset-right)); }
  .library-topbar { height: 66px; }
  .library-head { padding: 28px 0 30px; }
  .library-head h1 { font-size: clamp(2.2rem,8vw,3rem); }
  .library-intro { margin-top: 12px; font-size: .86rem; }
  .capture-button { margin-top: 22px; width: 100%; }
  .recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px 14px; }
}
@media(max-width:520px) {
  .recipe-grid { grid-template-columns: 1fr; }
  .card-image { aspect-ratio: 3/2; }
  .card-copy h3 { font-size: 1.15rem; }
}

/* A collection to browse, not a social feed. */
.library-tools { display:grid; grid-template-columns:minmax(0,1fr) 210px; gap:12px; margin:0 0 18px; }
.library-tools label>span { display:block; font-size:.75rem; color:var(--muted); margin-bottom:7px; }
.library-tools label>.filter-label { display:flex; align-items:baseline; justify-content:space-between; gap:4px 12px; flex-wrap:wrap; }
.filter-label>span { min-width:0; }
#count { margin-left:auto; color:var(--muted); font-size:.78rem; font-weight:400; }
.library-tools input,.library-tools select { width:100%; min-width:0; min-height:46px; padding:10px 12px; border:1px solid #d4d8d0; border-radius:10px; color:var(--ink); background:#fff; font:inherit; font-size:16px; }
.recipe-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; }
.recipe-card { display:grid; grid-template-columns:96px minmax(0,1fr); gap:16px; align-items:center; width:100%; padding:18px 0; border-radius:0; border-bottom:1px solid var(--line); text-align:left; }
.recipe-swipe { --swipe-x:0px; position:relative; min-width:0; overflow:hidden; border-bottom:1px solid var(--line); }
.recipe-swipe .recipe-card { position:relative; z-index:1; border-bottom:0; background:var(--paper); transform:translateX(var(--swipe-x)); transition:transform .18s ease; touch-action:pan-y; }
.recipe-swipe.is-busy { opacity:.55; pointer-events:none; }
.swipe-actions { position:absolute; inset:0; display:flex; align-items:stretch; justify-content:space-between; background:#e5eee2; }
.swipe-week { display:flex; align-items:center; min-width:0; padding:0 18px; color:var(--green); font-size:.82rem; font-weight:750; }
.swipe-delete { flex:0 0 96px; width:96px; border:0; border-radius:0; background:#a33d30; color:#fff; font:inherit; font-size:.82rem; font-weight:750; cursor:pointer; }
.swipe-delete:focus-visible { outline:2px solid #fff; outline-offset:-4px; }
.recipe-swipe[data-open="delete"] .recipe-card { transform:translateX(-96px); }
.recipe-card:hover { transform:none; }
.recipe-swipe .recipe-card:hover { transform:translateX(var(--swipe-x)); }
.card-image { width:96px; height:96px; aspect-ratio:1; border-radius:12px; }
.card-image img { width:100%; height:100%; object-fit:cover; }
.card-image.card-image--full { height:112px; background:#eeeee7; }
.card-image--full img { object-fit:contain; object-position:center!important; }
.recipe-card:hover .card-image--full img { transform:none; }
.card-placeholder { display:grid; place-items:center; height:100%; font-size:.7rem; font-weight:400; letter-spacing:0; color:var(--muted); background:#eeeee7; }
.card-copy { min-width:0; padding:0; }
.card-copy h3 { margin:4px 0 7px; font-size:1rem; line-height:1.35; overflow-wrap:anywhere; }
.card-source { margin:0; font-size:.68rem; }
.card-meta { margin:0; font-size:.72rem; }
.card-status { position:static; display:inline-block; margin-top:6px; padding:3px 7px; font-size:.7rem; }
.more-recipes { display:block; margin:24px auto; min-height:44px; padding:10px 22px; border:1px solid var(--line); border-radius:10px; background:transparent; color:var(--green); font:inherit; cursor:pointer; }
.more-recipes[hidden] { display:none; }
@media(max-width:760px) {
  .recipe-grid { grid-template-columns:1fr; }
  .library-tools { grid-template-columns:minmax(0,1fr); gap:12px; }
  .category-field { max-width:100%; }
  .recipe-card { grid-template-columns:84px minmax(0,1fr); gap:14px; padding:16px 0; }
  .card-image { width:84px; height:84px; }
  .card-copy h3 { font-size:1rem; }
}
@media(prefers-reduced-motion:reduce) { .recipe-swipe .recipe-card { transition:none; } }
