/* Collections follow the Talk gallery: spacious cards, clear tabs, readable controls. */
.yu-collection { color: var(--youuay-text); font-family: var(--youuay-body); min-width: 0; }
.yu-collection-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.yu-collection-header h2 { font: 600 26px/1.35 var(--youuay-heading); letter-spacing: -.5px; margin: 0 0 8px; }
.yu-collection-header p { margin: 0; font-size: 14px; color: var(--youuay-muted); line-height: 1.7; max-width: 640px; }
.yu-collection-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.yu-collection-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.yu-collection-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; min-height: 46px; border: 1px solid var(--youuay-border); border-radius: 12px; background: var(--youuay-surface); color: var(--youuay-muted); font: 500 14px var(--youuay-body); cursor: pointer; }
.yu-collection-tabs button[aria-pressed="true"] { background: var(--youuay-accent); border-color: var(--youuay-accent); color: white; }
.yu-collection-search { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 180px; min-height: 46px; border: 1px solid var(--youuay-border-strong); background: var(--youuay-surface); border-radius: 12px; padding: 0 14px; color: var(--youuay-muted); }
.yu-collection-search svg { width: 18px; height: 18px; flex: none; }
.yu-collection-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--youuay-text); padding: 12px 0; font: 400 14px var(--youuay-body); }
.yu-collection-search:focus-within { outline: 2px solid var(--youuay-accent); outline-offset: 2px; }
.yu-collection-search input:focus-visible { outline: none; }
.yu-collection-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(250px,100%),1fr)); gap: 24px; margin-top: 24px; }
.yu-collection-card { min-width: 0; display: flex; flex-direction: column; background: var(--youuay-surface); border: 1px solid var(--youuay-border-strong); border-radius: 16px; overflow: hidden; transition: border-color .18s ease; }
.yu-collection-card:hover { border-color: var(--youuay-accent); }
.yu-collection-card[data-current="true"] { border-color: var(--youuay-accent); box-shadow: 0 0 0 1px var(--youuay-accent); }
.yu-collection-preview { display: grid; place-items: center; aspect-ratio: 4/3; width: 100%; background: var(--youuay-surface2); color: var(--youuay-muted); overflow: hidden; }
.yu-collection-preview > img, .yu-collection-preview > video { width: 100%; height: 100%; object-fit: cover; }
.yu-collection-preview > svg { width: 40px; height: 40px; opacity: .6; }
.yu-collection-preview.yu-project-preview { aspect-ratio: 16/6; background: linear-gradient(135deg,#d32f2f0a,transparent),var(--youuay-surface2); color: var(--youuay-accent-text); }
.yu-collection-card-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.yu-collection-card h3, .yu-collection-card h4 { color: var(--youuay-text); font: 500 16px/1.5 var(--youuay-heading); margin: 0; overflow-wrap: anywhere; }
.yu-collection-card p { color: var(--youuay-muted); font-size: 14px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.yu-collection-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.yu-collection-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--youuay-border-strong); border-radius: 10px; padding: 10px 14px; min-height: 44px; font: 500 14px var(--youuay-body); background: var(--youuay-surface2); color: var(--youuay-text); cursor: pointer; text-decoration: none; }
.yu-collection-button:hover { border-color: var(--youuay-accent); }
.yu-collection-button-primary { background: var(--youuay-accent); border-color: var(--youuay-accent); color: white; }
.yu-collection-button-primary:hover { background: var(--youuay-accent-hover); }
.yu-collection-button:disabled { opacity: .5; cursor: not-allowed; }
.yu-collection :is(button,a,input,summary):focus-visible { outline: 2px solid var(--youuay-accent); outline-offset: 3px; }
.yu-collection-empty { grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 240px; padding: 40px 24px; gap: 12px; background: var(--youuay-surface); border: 1px dashed var(--youuay-border-strong); border-radius: 20px; }
.yu-collection-empty svg { width: 40px; height: 40px; color: var(--youuay-muted); margin-bottom: 8px; }
.yu-collection-empty h3 { margin: 0; font: 500 18px var(--youuay-heading); }
.yu-collection-empty p { margin: 0; color: var(--youuay-muted); font-size: 14px; max-width: 400px; line-height: 1.7; }
.yu-collection-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--youuay-muted); font-size: 13px; }
.yu-collection-meta svg { width: 15px; height: 15px; }
.yu-collection-count { color: var(--youuay-muted); font-size: 13px; padding: 4px 9px; border: 1px solid var(--youuay-border); border-radius: 20px; white-space: nowrap; }
.yu-collection-note { font-size: 14px; color: var(--youuay-muted); line-height: 1.7; padding: 16px; border: 1px solid var(--youuay-border); border-radius: 12px; }
.yu-collection-dialog { width: min(1000px,calc(100vw - 48px)); max-height: calc(100dvh - 48px); border: 1px solid var(--youuay-border-strong); border-radius: 20px; background: var(--youuay-bg); color: var(--youuay-text); margin: auto; padding: 0; box-shadow: 0 24px 80px #0006; }
.yu-collection-dialog::backdrop { background: #000a; backdrop-filter: blur(8px); }
.yu-collection-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.yu-collection-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 28px; border-bottom: 1px solid var(--youuay-border); background: var(--youuay-bg); flex-shrink: 0; }
.yu-collection-dialog-header h2 { font: 500 22px var(--youuay-heading); margin: 0; }
.yu-collection-dialog-body { padding: 28px; min-height: 0; overflow-y: auto; flex: 1; }
@media(max-width:767px) {
  .yu-collection-header { gap: 16px; margin-bottom: 20px; }
  .yu-collection-header h2 { font-size: 24px; }
  .yu-collection-toolbar { align-items: stretch; gap: 16px; }
  .yu-collection-search { flex-basis: 100%; }
  .yu-collection-search input { font-size: 16px; }
  .yu-collection-tabs { gap: 8px; width: 100%; }
  .yu-collection-tabs button { flex: 1; font-size: 13px; padding: 10px 12px; }
  .yu-collection-grid { gap: 16px; grid-template-columns: minmax(0,1fr); margin-top: 20px; }
  .yu-collection-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .yu-collection-dialog-header { padding: 20px; flex-wrap: wrap; }
  .yu-collection-dialog-header h2 { font-size: 20px; }
  .yu-collection-dialog-body { padding: 20px; }
}
.yu-collection .yu-collection-search input:focus-visible { outline: none; box-shadow: none; }
