/* 갤러리 목록·카드·메모 모달. */
.gallery { grid-column: 1 / -1; min-height: 55vh; }
.gallery-groups { display: grid; gap: 14px; }
.gallery-day {
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(17,19,23,.55); overflow: hidden;
}
.gallery-day-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.gallery-day-head strong { flex: 1; font-size: 14px; font-weight: 750; }
.gallery-day-head span { color: var(--muted); font-size: 12px; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; padding: 16px;
}
/* 접혀 있으면 그날의 첫 영상만 남긴다. 나머지는 display:none이라 로드되지 않는다. */
.gallery-grid:not(.expanded) > .gallery-card:nth-child(n+2) { display: none; }
.gallery-more {
  display: block; width: calc(100% - 32px); margin: 0 16px 16px; padding: 11px;
  border: 1px solid var(--line); border-radius: 13px;
  color: #b9a3ff; background: rgba(124,77,255,.1);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.gallery-more:active { background: rgba(124,77,255,.2); }
.gallery-note {
  margin: 0; padding: 10px 14px 0; color: #e7e3f5; font-size: 13px;
  line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.note-clip {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid rgba(124,77,255,.35); border-radius: 9px;
  color: #b9a3ff; background: rgba(124,77,255,.12); cursor: pointer;
}
.note-clip svg, .record-note svg {
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.note-clip svg { width: 16px; height: 16px; }
.note-modal {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
  padding: 20px; background: rgba(8,9,11,.78);
}
.note-card {
  width: min(100%, 420px); padding: 22px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--panel);
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}
.note-card h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.note-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.note-card textarea {
  width: 100%; margin-top: 14px; padding: 12px 13px; resize: vertical;
  border: 1px solid var(--line); border-radius: 13px;
  background: rgba(255,255,255,.04); color: var(--text); font: inherit;
}
.note-card textarea:focus { outline: none; border-color: rgba(124,77,255,.6); }
.note-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.note-save {
  padding: 10px 20px; border: none; border-radius: 999px;
  color: #fff; background: #7c4dff; font-weight: 750; cursor: pointer;
}
.note-save:disabled { opacity: .6; cursor: wait; }
.gallery-card {
  overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
}
.gallery-card video { display: block; width: 100%; aspect-ratio: 16/9; background: #000; }
.gallery-info { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.gallery-info strong { font-size: 13px; font-weight: 650; }
.gallery-info span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.gallery-actions { display: flex; align-items: center; gap: 10px; }
.delete-clip {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid rgba(255,73,109,.3); border-radius: 9px;
  color: #ff7892; background: rgba(255,73,109,.08); cursor: pointer;
}
.delete-clip:disabled { opacity: .45; cursor: wait; }
.delete-clip svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.gallery-empty { padding: 18vh 20px; color: var(--muted); text-align: center; }
