.ac-root .ac-dialog.ac-library-dialog { width:min(670px,calc(100vw - 40px)); height:min(660px,calc(100dvh - 48px)); max-height:none; padding:0; overflow:hidden; background:var(--ac-white); border-color:var(--ac-border); }
.ac-root .ac-library-dialog[open] { display:flex; flex-direction:column; }
.ac-root .ac-library-dialog::backdrop { background:#0009; backdrop-filter:blur(3px); }
.ac-root .ac-library-dialog > .ac-dialog-heading { margin:0; padding:16px 20px 8px; flex-shrink:0; }
.ac-root .ac-library-dialog .ac-dialog-heading .ac-icon-button { width:36px; height:36px; }
.ac-root .ac-library-dialog .ac-dialog-heading h2 { margin-right:auto; }
.ac-root .ac-library-select { padding:6px 4px; min-height:36px; border:0; color:var(--ac-link,#78b8ff); background:transparent; font-size:13px; }
.ac-root .ac-library-content { display:flex; flex-direction:column; min-height:0; flex:1; }
.ac-root .ac-library-subtitle { color:var(--ac-muted); padding:0 20px 13px; font-size:12px; }
.ac-root .ac-library-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:1px solid var(--ac-border); padding:0 12px; flex-shrink:0; }
.ac-root .ac-library-tab { min-height:44px; padding:9px 3px 11px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:var(--ac-muted); font-size:13px; }
.ac-root .ac-library-tab[aria-selected="true"] { color:var(--ac-link,#78b8ff); border-bottom-color:var(--ac-link,#78b8ff); }
.ac-root .ac-library-search { display:flex; align-items:center; gap:9px; margin:15px 20px 0; padding:0 11px; min-height:42px; background:var(--ac-soft); border:1px solid var(--ac-border); border-radius:9px; color:var(--ac-muted); flex-shrink:0; }
.ac-root .ac-library-search svg { width:17px; height:17px; }
.ac-root .ac-library-search input { width:100%; min-width:0; border:0; padding:9px 0; background:transparent; color:var(--ac-ink); font-size:14px; }
.ac-root .ac-library-search .ac-icon-button { height:28px; width:28px; flex-shrink:0; }
.ac-root .ac-library-meta { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 20px 9px; color:var(--ac-muted); font-size:12px; flex-shrink:0; }
.ac-root .ac-library-meta select { max-width:150px; font:inherit; border:0; background:var(--ac-white); color:var(--ac-muted); padding:5px 0 5px 5px; }
.ac-root .ac-library-scroll { flex:1; min-height:0; overflow:auto; padding:0 20px 18px; overscroll-behavior:contain; scrollbar-width:thin; }
.ac-root .ac-library-day { font-size:12px; color:var(--ac-muted); margin:7px 0 10px; font-weight:500; }
.ac-root .ac-library-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin:0 0 20px; }
.ac-root .ac-library-tile { position:relative; display:block; min-width:0; aspect-ratio:1; border:0; border-radius:10px; overflow:hidden; background:var(--ac-soft); padding:0; text-align:left; color:var(--ac-ink); }
.ac-root .ac-library-tile img { display:block; width:100%; height:100%; object-fit:cover; }
.ac-root .ac-library-tile::after { content:''; position:absolute; inset:55% 0 0; background:linear-gradient(transparent,#000b); pointer-events:none; }
.ac-root .ac-library-duration { position:absolute; right:7px; bottom:7px; z-index:1; font-size:11px; color:#fff; }
.ac-root .ac-library-tile-kind { display:flex; align-items:center; gap:4px; position:absolute; bottom:7px; left:7px; z-index:1; font-size:11px; color:#fff; }
.ac-root .ac-library-tile-kind svg { width:13px; height:13px; }
.ac-root .ac-library-mark { position:absolute; top:7px; right:7px; display:grid; place-items:center; width:23px; height:23px; border:1px solid #ffffffa0; background:#1119; border-radius:50%; z-index:2; }
.ac-root .ac-library-mark svg { width:14px; height:14px; }
.ac-root .ac-library-tile[aria-pressed="true"] .ac-library-mark { border-color:#0875db; background:#0875db; color:#fff; }
.ac-root .ac-library-tile[aria-pressed="true"] { outline:2px solid #78b8ff; outline-offset:-2px; }
.ac-root .ac-library-row { display:flex; align-items:center; gap:12px; width:100%; padding:13px 0; border:0; border-bottom:1px solid var(--ac-border); border-radius:0; background:transparent; color:var(--ac-ink); text-align:left; }
.ac-root .ac-library-row-icon { display:grid; place-items:center; flex-shrink:0; width:42px; height:48px; border-radius:8px; background:var(--ac-soft); color:var(--ac-link,#78b8ff); font-size:11px; font-weight:500; }
.ac-root .ac-library-row-icon svg { width:21px; height:21px; }
.ac-root .ac-library-row-copy { flex:1; min-width:0; }
.ac-root .ac-library-row-title { display:block; font-size:14px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ac-root .ac-library-row-info { display:block; color:var(--ac-muted); font-size:11px; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ac-root .ac-library-row-check { flex-shrink:0; width:23px; height:23px; display:grid; place-items:center; border:1px solid var(--ac-muted); border-radius:50%; }
.ac-root .ac-library-row-check svg { width:14px; height:14px; }
.ac-root .ac-library-row[aria-pressed="true"] .ac-library-row-check { background:#0875db; border-color:#0875db; color:white; }
.ac-root .ac-library-row > svg { width:16px; height:16px; color:var(--ac-muted); }
.ac-root .ac-library-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; min-height:64px; padding:12px 20px; border-top:1px solid var(--ac-border); background:var(--ac-white); font-size:13px; }
.ac-root .ac-library-actions .ac-primary { width:auto; min-height:38px; padding:8px 14px; font-size:13px; }
.ac-root .ac-library-empty { text-align:center; padding:45px 12px; color:var(--ac-muted); font-size:13px; }
.ac-root .ac-library-empty strong { display:block; color:var(--ac-ink); margin-bottom:8px; font-weight:500; }
.ac-root .ac-library-feedback { padding:8px 20px; color:var(--ac-link,#78b8ff); font-size:12px; background:var(--ac-soft); }
.ac-root .ac-library-detail { flex:1; min-height:0; overflow:auto; padding:0 20px 20px; }
.ac-root .ac-library-back { display:flex; align-items:center; gap:7px; min-height:42px; padding:0; border:0; background:transparent; color:var(--ac-link,#78b8ff); font-size:13px; }
.ac-root .ac-library-back svg { width:17px; height:17px; }
.ac-root .ac-library-preview { display:flex; align-items:center; justify-content:center; min-height:190px; margin:10px 0 18px; border-radius:12px; overflow:hidden; background:var(--ac-soft); }
.ac-root .ac-library-preview img,.ac-root .ac-library-preview video { display:block; width:100%; max-height:300px; object-fit:contain; }
.ac-root .ac-library-preview audio { width:calc(100% - 28px); }
.ac-root .ac-library-preview > svg { width:62px; height:62px; color:var(--ac-muted); }
.ac-root .ac-library-detail h3 { font-size:16px; font-weight:500; overflow-wrap:anywhere; }
.ac-root .ac-library-detail p { color:var(--ac-muted); font-size:12px; margin-top:7px; }
.ac-root .ac-library-detail .ac-library-address { color:var(--ac-link,#78b8ff); overflow-wrap:anywhere; }
.ac-root .ac-library-detail-buttons { display:flex; gap:8px; flex-wrap:wrap; margin-top:20px; }
.ac-root .ac-library-detail-buttons button { min-height:42px; padding:8px 13px; border-radius:8px; font-size:13px; }
.ac-root .ac-library-secondary { border:1px solid var(--ac-border); background:var(--ac-soft); color:var(--ac-ink); }
.ac-root .ac-library-chat-highlight .ac-bubble { outline:2px solid var(--ac-link,#78b8ff); outline-offset:3px; }
@media(max-width:680px), (max-width:1024px) and (max-height:600px) and (pointer:coarse) {
  .ac-root.ac-chat-open .ac-dialog.ac-library-dialog { top:var(--ac-screen-top,0px); bottom:auto; left:0; right:0; transform:none; width:100%; height:var(--ac-screen-height,100dvh); max-height:none; margin:0; border:0; border-radius:0; }
  .ac-root .ac-library-dialog > .ac-dialog-heading { padding:10px 16px 4px; }
  .ac-root .ac-library-dialog .ac-dialog-heading .ac-icon-button { width:44px; height:44px; }
  .ac-root .ac-library-subtitle { padding:0 16px 12px; }
  .ac-root .ac-library-search { margin:14px 16px 0; }
  .ac-root .ac-library-search input { font-size:16px; }
  .ac-root .ac-library-meta { padding:10px 16px 7px; }
  .ac-root .ac-library-scroll { padding:0 16px 16px; }
  .ac-root .ac-library-grid { gap:4px; }
  .ac-root .ac-library-tile { border-radius:9px; }
  .ac-root .ac-library-actions { padding:12px 16px; }
  .ac-root .ac-library-select { min-height:44px; }
}
.ac-root .ac-dialog.ac-library-dialog { max-width:none; }
.ac-root .ac-composer-foot > .ac-chat-tools.ac-version-tools { grid-area:1/1; justify-self:start; gap:6px; }
.ac-root .ac-library-paging { display:flex; flex-shrink:0; justify-content:center; flex-wrap:wrap; gap:8px; }
.ac-root .ac-library-paging:has(button:not([hidden])) { padding:8px 16px; }
.ac-root .ac-library-paging button { min-height:36px; border-radius:8px; padding:6px 12px; font-size:13px; }
.ac-root .ac-library-tile > svg { width:32px; height:32px; margin:auto; color:var(--ac-muted); }
.ac-root .ac-library-tile:has(>svg) { display:grid; place-items:center; }
.ac-root .ac-library-caption { white-space:pre-wrap; overflow-wrap:anywhere; }
.ac-root .ac-library-detail-buttons a { display:inline-flex; align-items:center; min-height:42px; padding:8px 13px; border-radius:8px; font-size:13px; text-decoration:none; }
.ac-root .ac-library-secondary[aria-disabled="true"] { opacity:.5; pointer-events:none; }
.ac-root .ac-library-search input:focus-visible { outline:2px solid var(--ac-accent); outline-offset:3px; }
@media(prefers-reduced-motion:reduce){.ac-root .ac-library-chat-highlight .ac-bubble{transition:none}}

.ac-root .ac-library-tile .ac-library-video-thumb { display:block; width:100%; height:100%; object-fit:cover; pointer-events:none; }
