/* Idea gallery and the viewer. Uses the site's spruce, copper and paper. */
.ideas { background: var(--paper); }
.ideas-head { display: grid; gap: 12px; margin-bottom: 22px; }
.ideas-head .intro { max-width: 52ch; }
.ideas-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--spruce); background: transparent; color: var(--spruce); font: 600 15px/1 var(--sans); cursor: pointer; }
.chip:hover { background: var(--paper-2); }
.chip[aria-pressed="true"] { background: var(--spruce); color: var(--white); }
.chip-saved { border-color: var(--copper); color: var(--copper-dk); }
.chip-saved[aria-pressed="true"] { background: var(--copper); color: var(--white); }
.ideas-count { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.ideas-grid { list-style: none; margin: 0; padding: 0; columns: 4 240px; column-gap: 14px; }
.idea { position: relative; break-inside: avoid; margin: 0 0 14px; background: var(--white); border: 1px solid var(--rule); }
.idea-open { display: block; width: 100%; padding: 0; border: 0; background: var(--paper-2); cursor: zoom-in; }
.idea-open img { display: block; width: 100%; height: auto; }
.idea-title { margin: 0; padding: 9px 12px 11px; font: 500 14px/1.3 var(--sans); color: var(--ink); }
.idea-heart, .viewer-btn, .viewer-nav { font-family: var(--sans); }
.idea-heart { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--spruce); cursor: pointer; box-shadow: 0 1px 4px rgba(15,36,41,.25); }
.idea-heart svg, .viewer-heart svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.idea-heart.on, .viewer-heart.on { color: var(--copper); }
.idea-heart.on svg, .viewer-heart.on svg { fill: currentColor; }
.ideas-empty { column-span: all; padding: 28px 0; color: var(--ink-2); }
.ideas-more { text-align: center; margin: 22px 0 0; }
.ideas-next { margin-top: 36px; padding: 26px; background: var(--spruce); color: var(--white); display: grid; gap: 14px; }
.ideas-next p { margin: 0; font: 500 20px/1.3 var(--display); color: var(--white); }
.ideas-viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #0a1a1e; color: var(--white); }
.ideas-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.ideas-viewer::backdrop { background: #0a1a1e; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.viewer-title { margin: 0; font: 500 18px/1.25 var(--display); }
.viewer-actions { display: flex; gap: 8px; }
.viewer-btn { min-height: 44px; min-width: 44px; padding: 0 16px; border: 1.5px solid rgba(255,255,255,.55); background: transparent; color: var(--white); font-weight: 600; font-size: 15px; cursor: pointer; display: inline-grid; place-items: center; }
.viewer-btn:hover { border-color: var(--white); }
.viewer-heart { padding: 0; }
.viewer-stage { position: relative; min-height: 0; overflow: hidden; display: grid; place-items: center; padding: 0 56px; }
.viewer-img { max-width: 100%; max-height: calc(100dvh - 210px); width: auto; height: auto; object-fit: contain; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; background: rgba(255,255,255,.1); color: var(--white); font-size: 40px; line-height: 1; cursor: pointer; }
.viewer-nav:hover { background: rgba(255,255,255,.22); }
.viewer-prev { left: 4px; } .viewer-next { right: 4px; }
.viewer-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
  .ideas-grid { columns: 2 140px; column-gap: 10px; }
  .idea { margin-bottom: 10px; }
  .idea-title { font-size: 13px; padding: 7px 9px 9px; }
  .chip { padding: 0 14px; font-size: 14px; }
  .viewer-stage { padding: 0; }
  .viewer-nav { width: 44px; height: 56px; font-size: 32px; background: rgba(10,26,30,.55); }
  .viewer-foot .btn { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: no-preference) { .idea-open img { transition: opacity .25s; } }
