.lw-gallery {
  --gallery-bg: #fcfcfc; --gallery-card: #fff; --gallery-ink: #161616;
  --gallery-muted: #696969; --gallery-line: #ebebeb; --gallery-wash: #f0f0f0;
  display: flex; flex-direction: column; height: 100%; min-height: 0;
  position: relative; background: var(--gallery-bg); color: var(--gallery-ink);
  font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden; isolation: isolate; --gallery-columns: 4;
}
.lw-gallery *, .lw-gallery *::before, .lw-gallery *::after { box-sizing: border-box; }
.lw-gallery [hidden] { display: none !important; }
.lw-gallery button, .lw-gallery input, .lw-gallery select { font: inherit; color: inherit; }
.lw-gallery button { cursor: pointer; }
.lw-gallery button:disabled { opacity: .45; cursor: wait; }
.lw-gallery button:focus-visible, .lw-gallery a:focus-visible, .lw-gallery input:focus-visible, .lw-gallery select:focus-visible { outline: 2px solid #397bb4; outline-offset: 3px; }
.lw-gallery svg { width: 23px; height: 23px; flex: 0 0 auto; }
.lw-gallery-head { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; padding: 30px 34px 22px; }
.lw-gallery-head h1 { margin: 0 auto 0 0; font: 600 29px/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.035em; }
.lw-gallery-controls { display: flex; align-items: center; gap: 9px; }
.lw-gallery-icon { display: inline-grid; place-items: center; background: transparent; border: 0; border-radius: 50%; width: 42px; height: 42px; padding: 8px; }
.lw-gallery-icon:hover, .lw-gallery-icon[aria-pressed="true"], .lw-gallery-icon[aria-expanded="true"] { background: var(--gallery-wash); }
.lw-gallery-search { display: flex; align-items: center; gap: 10px; border: 1.5px solid #dedede; border-radius: 99px; height: 44px; padding: 0 16px; width: clamp(170px, 23vw, 315px); color: var(--gallery-muted); }
.lw-gallery-search input { min-width: 0; width: 100%; border: 0; background: transparent; outline: none; }
.lw-gallery-search input::placeholder { color: #8b8b8b; }
.lw-gallery-primary { border: 0; border-radius: 99px; background: var(--gallery-ink); color: var(--gallery-card) !important; padding: 10px 19px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.lw-gallery-primary svg { width: 16px; height: 16px; }
.lw-gallery-tabs { display: flex; gap: 7px; align-items: center; padding: 0 34px 25px; overflow-x: auto; flex: 0 0 auto; scrollbar-width: none; }
.lw-gallery-tab { border: 0; background: transparent; border-radius: 99px; padding: 10px 21px; white-space: nowrap; color: var(--gallery-muted) !important; font-weight: 500 !important; }
.lw-gallery-tab[aria-selected="true"] { background: var(--gallery-wash); color: var(--gallery-ink) !important; }
.lw-gallery-scroll { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; padding: 10px 34px 34px; }
.lw-gallery-crumbs { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 18px; }
.lw-gallery-crumbs button, .lw-gallery-link { color: var(--gallery-muted); background: transparent; border: 0; padding: 3px; text-decoration: underline; text-underline-offset: 3px; }
.lw-gallery-grid { display: grid; grid-template-columns: repeat(var(--gallery-active-columns, 4), minmax(0, 1fr)); column-gap: 20px; align-items: start; }
.lw-gallery-column { min-width: 0; }
.lw-gallery-grid > .lw-gallery-empty { grid-column: 1 / -1; }
.lw-gallery-card { position: relative; display: inline-flex; width: 100%; flex-direction: column; break-inside: avoid; margin: 0 0 20px; border: 1px solid var(--gallery-line); border-radius: 20px; overflow: hidden; background: var(--gallery-card); box-shadow: 0 7px 22px #00000005; }
.lw-gallery-card-open { display: flex; flex-direction: column; padding: 0; border: 0; background: transparent; text-align: left; width: 100%; }
.lw-gallery-card-title { display: flex; gap: 11px; padding: 15px 17px; width: 100%; min-width: 0; align-items: center; border-bottom: 1px solid var(--gallery-line); }
.lw-gallery-card-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-gallery-card-art { width: 100%; min-height: 178px; aspect-ratio: 1 / 1.12; display: grid; place-items: center; }
.lw-gallery-card-art > svg { width: 58px; height: 58px; stroke-width: 1.5; }
.lw-gallery-card--image .lw-gallery-card-art { display: block; aspect-ratio: auto; min-height: 0; }
.lw-gallery-card--image .lw-gallery-card-title { position: absolute; opacity: 0; background: #ffffffed; top: 0; transition: opacity .15s; }
.lw-gallery-card--image:hover .lw-gallery-card-title, .lw-gallery-card--image:focus-within .lw-gallery-card-title { opacity: 1; }
.lw-gallery-card-art img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; min-height: 140px; }
.lw-gallery-card--folder .lw-gallery-card-art { aspect-ratio: 1.6; color: #89836f; }
.lw-gallery-file--pdf { color: #fc514f; }
.lw-gallery-file--text { color: #1982fb; }
.lw-gallery-file--audio { color: #6564b8; }
.lw-gallery-file--video { color: #4e759a; }
.lw-gallery-card-actions { display: flex; justify-content: flex-end; gap: 1px; position: absolute; bottom: 8px; right: 9px; border-radius: 99px; background: #fffffff0; opacity: 0; transition: opacity .15s; }
.lw-gallery-card:hover .lw-gallery-card-actions, .lw-gallery-card:focus-within .lw-gallery-card-actions { opacity: 1; }
.lw-gallery-card-actions .lw-gallery-icon { height: 32px; width: 32px; padding: 7px; }
.lw-gallery-card-actions svg { width: 18px; height: 18px; }
.lw-gallery-card-actions [aria-pressed="true"] { color: #936c16; }
.lw-gallery-list { display: flex; flex-direction: column; border: 1px solid var(--gallery-line); border-radius: 16px; overflow: hidden; }
.lw-gallery-list .lw-gallery-card { flex-direction: row; align-items: center; box-shadow: none; margin: 0; border: 0; border-bottom: 1px solid var(--gallery-line); border-radius: 0; }
.lw-gallery-list .lw-gallery-card:last-child { border-bottom: 0; }
.lw-gallery-list .lw-gallery-card-open { flex-direction: row; min-width: 0; padding-right: 76px; }
.lw-gallery-list .lw-gallery-card-title { border: 0; position: static; opacity: 1; background: transparent; flex: 1; min-width: 0; }
.lw-gallery-list .lw-gallery-card-art { display: none; }
.lw-gallery-list .lw-gallery-card-actions { opacity: 1; bottom: auto; }
.lw-gallery-status { font-size: 13px; margin: 0 0 16px; color: var(--gallery-muted); }
.lw-gallery-empty { text-align: center; max-width: 390px; margin: 8vh auto; padding: 20px; color: var(--gallery-muted); }
.lw-gallery-empty > svg { width: 56px; height: 56px; margin-bottom: 12px; opacity: .6; }
.lw-gallery-empty h2 { font-family: inherit; font-size: 19px; font-weight: 600; line-height: 1.4; margin: 0 0 8px; color: var(--gallery-ink); }
.lw-gallery-empty p { margin: 0 0 18px; }
.lw-gallery-menu { position: absolute; top: 80px; right: 33px; z-index: 3; min-width: 200px; max-width: calc(100% - 32px); border: 1px solid var(--gallery-line); border-radius: 16px; background: var(--gallery-card); box-shadow: 0 14px 50px #0002; padding: 8px; }
.lw-gallery-menu button, .lw-gallery-menu label { display: flex; width: 100%; align-items: center; gap: 10px; background: transparent; border: 0; padding: 10px 11px; border-radius: 10px; text-align: left; }
.lw-gallery-menu button:hover { background: var(--gallery-wash); }
.lw-gallery-menu select { width: 100%; border: 1px solid var(--gallery-line); background: var(--gallery-card); padding: 8px; border-radius: 8px; }
.lw-gallery-overlay { position: absolute; inset: 0; background: #0006; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 18px; }
.lw-gallery-dialog { width: min(520px, 100%); max-height: 100%; overflow: auto; border: 1px solid var(--gallery-line); background: var(--gallery-card); border-radius: 24px; padding: 24px; box-shadow: 0 25px 90px #0003; }
.lw-gallery-dialog h2 { margin: 0 0 17px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-family: inherit; }
.lw-gallery-dialog p { color: var(--gallery-muted); }
.lw-gallery-dialog label { display: block; font-size: 13px; margin: 13px 0 6px; }
.lw-gallery-dialog input:not([type="checkbox"]), .lw-gallery-dialog select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #dedede; border-radius: 10px; background: var(--gallery-card); }
.lw-gallery-dialog input[type="checkbox"] { width: auto; margin-right: 6px; }
.lw-gallery-dialog .lw-gallery-check { display: flex; align-items: center; }
.lw-gallery-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; justify-content: flex-end; margin-top: 19px; }
.lw-gallery-secondary { border: 1px solid #dedede; border-radius: 99px; background: transparent; padding: 8px 15px; }
.lw-gallery-dialog-error { font-size: 13px; color: #a42e2e !important; }
.lw-gallery-dialog--preview { width: min(850px, 100%); }
.lw-gallery-preview { text-align: center; max-height: min(55vh, 560px); overflow: auto; border-radius: 12px; background: var(--gallery-wash); }
.lw-gallery-preview img, .lw-gallery-preview video { display: block; margin: auto; max-width: 100%; max-height: 54vh; }
.lw-gallery-preview audio { margin: 35px auto; max-width: 95%; }
.lw-gallery-preview pre { padding: 20px; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: 13px/1.6 ui-monospace, monospace; }
.lw-gallery-preview iframe { display: block; width: 100%; height: 50vh; border: 0; background: white; }
.lw-gallery-preview .lw-gallery-icon { height: 100px; width: 100%; }
.lw-gallery-preview .lw-gallery-icon svg { width: 60px; height: 60px; }
.lw-gallery-dialog a { color: inherit; text-decoration: none; }
.lw-gallery-share-link { font-size: 12px; overflow-wrap: anywhere; padding: 10px; border: 1px solid var(--gallery-line); border-radius: 10px; margin-top: 17px; }
.lw-gallery-share-person { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.lw-gallery-share-person > span { flex: 1; overflow-wrap: anywhere; min-width: 0; font-size: 13px; }
.lw-gallery-share-person select { width: auto; }
.lw-gallery-upload { margin: 12px 0; padding: 11px 14px; border: 1px solid var(--gallery-line); border-radius: 12px; font-size: 13px; }
.lw-gallery-upload progress { display: block; width: 100%; height: 5px; margin-top: 7px; accent-color: #424242; }
.lw-gallery-more { display: block; margin: 18px auto 0; }
.lw-gallery-drop { pointer-events: none; position: absolute; inset: 10px; z-index: 8; display: grid; place-items: center; border: 2px dashed var(--gallery-muted); border-radius: 24px; background: #fffffff0; font-size: 22px; }
.lw-gallery-standalone { height: 100dvh; margin: 0; background: #fcfcfc; }
.lw-gallery-standalone #galleryRoot { height: 100%; }
body.gallery-library-mode { overflow: hidden; }
body.gallery-library-mode > .app, body.gallery-library-mode > footer { display: none !important; }
#galleryLibraryRoot { height: 100dvh; }
body:not(.gallery-library-mode) > #galleryLibraryRoot { display: none; }
@media (min-width: 1650px) { .lw-gallery { --gallery-columns: 5; font-size: 18px; } .lw-gallery-head { padding: 38px 54px 29px; } .lw-gallery-head h1 { font-size: 34px; } .lw-gallery-head .lw-gallery-icon { width: 48px; height: 48px; } .lw-gallery-search { height: 49px; } .lw-gallery-primary { padding: 12px 21px; } .lw-gallery-tabs { padding: 0 54px 29px; } .lw-gallery-tab { padding: 11px 24px; } .lw-gallery-scroll { padding: 10px 54px 40px; } }
@media (hover: none) { .lw-gallery-card-actions { opacity: 1; } }
@media (max-width: 800px) { .lw-gallery { --gallery-columns: 3; } .lw-gallery-head { padding: 24px 22px 20px; gap: 16px; } .lw-gallery-head h1 { font-size: 25px; } .lw-gallery-controls { gap: 2px; } .lw-gallery-search { width: 220px; } .lw-gallery-tabs { padding: 0 22px 18px; gap: 0; } .lw-gallery-tab { padding: 9px 16px; } .lw-gallery-scroll { padding: 8px 22px 25px; } .lw-gallery-grid { column-gap: 15px; } .lw-gallery-card { margin-bottom: 15px; } }
@media (max-width: 600px) { .lw-gallery { --gallery-columns: 2; } .lw-gallery-head { padding: 20px 16px 16px; gap: 14px; } .lw-gallery-controls { display: contents; } .lw-gallery-head h1 { order: 0; } .lw-gallery-search { order: 2; width: calc(100% - 58px); } .lw-gallery-head [data-action="filter"] { order: 3; } .lw-gallery-head [data-action="sort"], .lw-gallery-head [data-action="grid"], .lw-gallery-head [data-action="list"], .lw-gallery-head [data-action="new"] { order: 1; } .lw-gallery-head [data-action="sort"] { display: none; } .lw-gallery-tabs { padding: 0 16px 15px; } .lw-gallery-tab { padding: 8px 13px; font-size: 14px; } .lw-gallery-scroll { padding: 8px 16px 22px; } .lw-gallery-grid { column-gap: 12px; } .lw-gallery-card { border-radius: 15px; margin-bottom: 12px; } .lw-gallery-card-title { padding: 12px; font-size: 12px; gap: 7px; } .lw-gallery-card-title svg { width: 19px; height: 19px; } .lw-gallery-card-art { min-height: 148px; } .lw-gallery-card-art > svg { width: 48px; height: 48px; } .lw-gallery-card-art img { min-height: 120px; } .lw-gallery-menu { top: 75px; right: 16px; } .lw-gallery-overlay { padding: 10px; } .lw-gallery-dialog { padding: 20px; border-radius: 20px; } }
@media (prefers-reduced-motion: reduce) { .lw-gallery * { transition: none !important; } }
.lw-gallery-search-mode { border: 0; border-right: 1px solid var(--gallery-line); border-radius: 0; background: transparent; padding: 0 7px 0 0; max-width: 100px; font-size: 12px !important; }
.lw-gallery-semantic { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 0 34px 18px; }
.lw-gallery-semantic p { margin: 0; flex: 1; min-width: min(220px, 100%); color: var(--gallery-muted); font-size: 12px; }
.lw-gallery-semantic button { font-size: 12px; padding: 7px 12px; }
[data-index-file-list] { max-height: 35vh; overflow: auto; }
.lw-gallery-dialog [data-index-file-list] .lw-gallery-check { overflow-wrap: anywhere; }
@media (min-width: 1650px) { .lw-gallery-semantic { padding-right: 54px; padding-left: 54px; } }
@media (max-width: 800px) { .lw-gallery-semantic { padding-right: 22px; padding-left: 22px; } }
@media (max-width: 600px) { .lw-gallery-semantic { padding: 0 16px 16px; } .lw-gallery-search { padding: 0 10px; gap: 5px; } .lw-gallery-search-mode { max-width: 81px; } .lw-gallery-search input { font-size: 13px; } }
