/* ── GALLERY 🖼️ — shared workflows, readable signed out ─────────────── */

.gal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gal-h1 { margin-bottom: 0; }
.gal-head .bubble-btn { margin-left: auto; }
.gal-lede { margin: 10px 0 14px; display: inline-block; }

/* The signed-out CREATE button is the whole point of the page — make it the
   loudest thing on screen. */
.gal-create { background: var(--riso-pink); }

.gal-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

/* ── grid ── */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 700px)  { .gal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .gal-grid { grid-template-columns: repeat(4, 1fr); } }

.gal-card {
  display: flex;
  flex-direction: column;
  border: var(--border-ink);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.gal-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-harder); }
.gal-card:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--panel-shadow); }
.gal-skel { aspect-ratio: 3 / 4; }

/* overflow:hidden is load-bearing, not decoration: if a media file ever goes
   missing the browser renders the img's alt text in place, and without this it
   spills across the card and over the title. */
.gal-cover { position: relative; aspect-ratio: 1 / 1; background: var(--paper-sunk); overflow: hidden; }
.gal-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  font-size: 10px; color: var(--newsprint-mute);   /* only ever seen as alt text */
}
.gal-cover-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.gal-kind {
  position: absolute; top: 6px; left: 6px;
  font-family: var(--f-head); font-weight: 700; font-size: 9px; letter-spacing: 0.06em;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink-line); border-radius: 999px;
  padding: 2px 7px;
}
.gal-hidden-tag {
  position: absolute; top: 6px; right: 6px;
  font-family: var(--f-head); font-weight: 700; font-size: 9px; letter-spacing: 0.06em;
  background: var(--locked); color: var(--paper-2);
  border: 2px solid var(--ink-line); border-radius: 999px;
  padding: 2px 7px;
}

.gal-meta { padding: 8px 10px 10px; border-top: 2.5px solid var(--ink-line); }
.gal-title {
  font-family: var(--f-head); font-weight: 700; font-size: 14px; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gal-by { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-stats { margin-top: 4px; color: var(--newsprint-mute); font-size: 11px; }

.gal-empty { grid-column: 1 / -1; padding: 26px 0; }
.gal-empty .bubble-btn { margin-top: 10px; }

/* ── share composer ── */
.gal-share-wrap { margin-bottom: 14px; }
.gal-share { margin-top: 10px; }
.gal-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 2px;
}
.gal-pick {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: var(--border-ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-sunk);
  cursor: pointer;
}
.gal-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-pick.is-picked { box-shadow: var(--shadow-harder); transform: translate(-1px, -1px); }
.gal-pick-tag { position: absolute; bottom: 2px; right: 3px; font-size: 12px; }

/* ── detail ── */
.gal-detail-head { margin-bottom: 14px; }
.gal-detail-kind {
  font-family: var(--f-head); font-weight: 700; font-size: 11px;
  letter-spacing: 0.08em; color: var(--newsprint-mute);
}
.gal-detail-title { font-size: 30px; line-height: 1.05; margin: 2px 0 4px; }
.gal-note { display: inline-block; margin-top: 10px; }
.gal-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.gal-like.is-on { background: var(--riso-pink); color: #fff; }
.gal-hidden-note {
  margin-top: 10px; padding: 8px 10px;
  border: 2px dashed var(--locked);
  border-radius: var(--radius);
  color: var(--newsprint-mute);
}

/* ── the recipe: a numbered vertical chain ── */
.gal-steps { position: relative; }
/* The rule down the left is what makes a list of panels read as a sequence —
   image, then that image became a video. */
.gal-steps::before {
  content: '';
  position: absolute;
  left: 15px; top: 12px; bottom: 12px;
  width: 2.5px;
  background: repeating-linear-gradient(var(--ink-line) 0 6px, transparent 6px 12px);
}
.gal-step { position: relative; padding-left: 42px; margin-bottom: 18px; }
.gal-step:last-child { margin-bottom: 0; }
.gal-step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gal-step-n {
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  background: var(--paper); color: var(--ink);
  border: var(--border-ink); border-radius: 50%;
  box-shadow: 2px 2px 0 var(--panel-shadow);
}
.gal-step--story .gal-step-n { background: var(--riso-yellow); }
.gal-step--video .gal-step-n { background: var(--riso-purple); color: #fff; }
.gal-step-emoji { font-size: 17px; }
.gal-step-title { font-family: var(--f-head); font-weight: 700; font-size: 15px; }

.gal-prompt-wrap {
  border: 2px dashed var(--ink-line);
  border-radius: var(--radius);
  background: var(--paper-sunk);
  padding: 8px 10px;
  margin-bottom: 8px;
}
.gal-prompt-label { font-size: 9px; letter-spacing: 0.1em; color: var(--newsprint-mute); }
.gal-prompt {
  font-size: 13px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
  max-height: 230px; overflow-y: auto;
}

.gal-settings { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.gal-setting {
  display: inline-flex; align-items: baseline; gap: 5px;
  border: 2px solid var(--ink-line); border-radius: 999px;
  padding: 2px 9px; background: var(--paper-2);
  font-size: 11px;
}
.gal-setting-k { color: var(--newsprint-mute); font-weight: 700; }
.gal-setting-v { font-weight: 700; }

.gal-step-shots { display: flex; gap: 6px; flex-wrap: wrap; }
.gal-step-shots img {
  width: 74px; height: 74px; object-fit: cover;
  border: 2px solid var(--ink-line); border-radius: 8px;
  cursor: zoom-in; background: var(--paper-sunk);
}

/* ── result ── */
.gal-out-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gal-out-grid img {
  width: 100%; border: 2px solid var(--ink-line); border-radius: 10px;
  cursor: zoom-in; display: block;
}
.gal-video, .gal-audio { width: 100%; border-radius: 10px; display: block; }
.gal-video { border: var(--border-ink); background: #000; }
.gal-audio { margin-top: 10px; }

.gal-join { margin-top: 14px; }
.gal-join .bubble-btn { margin-top: 10px; }

@media (max-width: 1023.98px) {
  .gal-right { margin-top: 14px; }
  .gal-detail-title { font-size: 25px; }
}
