/* Phone-first photo workspace; filters and actions stay with the photo grid. */
.modal.library-modal.allphotos-workspace { position:fixed; display:flex; padding:20px; gap:0; isolation:isolate; animation:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
.allphotos-workspace input,.allphotos-workspace textarea,.allphotos-workspace select,.allphotos-workspace [contenteditable="true"] { -webkit-user-select:text; user-select:text; -webkit-touch-callout:default; }
.allphotos-workspace .visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.allphotos-workspace .modal-header { gap:8px; align-items:center; margin-bottom:16px; }
.allphotos-workspace .library-heading { min-width:0; }
.allphotos-workspace .library-heading h2 { font-size:26px; overflow-wrap:anywhere; }
.allphotos-workspace .library-header-actions { gap:8px; }
.allphotos-workspace .library-header-actions .icon-button { min-width:48px; width:48px; min-height:48px; }
.allphotos-workspace .allphotos-select-entry { padding:0 10px; min-width:56px; }
.allphotos-search-row { display:flex; gap:8px; flex:none; align-items:center; }
.allphotos-search-label { flex:1; min-width:0; }
.allphotos-search-label input { width:100%; min-width:0; height:48px; border:1px solid var(--line-dark,#414341); background:var(--black-raised,#1c1f1c); color:var(--white,#fffef7); border-radius:14px; padding:0 14px; font:inherit; font-size:16px; }
.allphotos-search-row .library-filter-toggle { min-width:48px; height:48px; border-radius:14px; flex:none; gap:6px; }
.allphotos-search-row .library-filter-toggle b[hidden] { display:none; }
.allphotos-toolbar { display:flex; flex:none; justify-content:space-between; align-items:center; gap:8px; padding-block:10px; }
.allphotos-workspace .library-modes { flex:none; background:transparent; }
.allphotos-workspace .library-modes .filter-pill { min-height:44px; padding-inline:12px; font-size:13px; }
.allphotos-sort { min-width:0; }
.allphotos-sort select { max-width:150px; min-width:0; min-height:44px; padding:8px 22px 8px 8px; border:0; border-radius:10px; background:var(--black-raised,#1c1f1c); color:var(--white,#fffef7); font:inherit; font-size:13px; }
.allphotos-chips { flex:none; display:flex; gap:6px; flex-wrap:wrap; padding-bottom:8px; }
.allphotos-chips:empty { padding:0; }
.allphotos-chip { display:flex; align-items:center; gap:6px; max-width:100%; min-height:40px; padding:7px 10px; border:1px solid #525b36; border-radius:10px; background:#d8ff3e12; color:var(--white,#fffef7); font:inherit; font-size:12px; cursor:pointer; }
.allphotos-chip span { overflow-wrap:anywhere; text-align:left; }
.allphotos-chip svg { flex:none; width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; }
.allphotos-workspace .library-list { margin-inline:-4px; padding:4px 4px 16px; scroll-padding-block:12px; }
.allphotos-filters { border:1px solid var(--line-dark,#414341); border-radius:16px; background:var(--black-raised,#1c1f1c); padding:14px 12px 4px; margin-bottom:16px; }
.allphotos-filters[hidden] { display:none; }
.allphotos-filter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 10px; }
.allphotos-filter-grid label { display:flex; flex-direction:column; min-width:0; gap:5px; }
.allphotos-filter-grid label>span { font-size:12px; color:var(--muted,#b3b7ad); }
.allphotos-filter-grid input,.allphotos-filter-grid select { width:100%; max-width:100%; min-width:0; min-height:48px; padding:8px; border:1px solid var(--line-dark,#414341); border-radius:10px; font:inherit; font-size:16px; color:var(--white,#fffef7); background:var(--black,#090a0a); color-scheme:dark; }
.allphotos-filter-grid input[type="date"] { display:block; appearance:none; overflow:hidden; }
.allphotos-filter-grid input[type="date"]::-webkit-date-and-time-value { min-width:0; text-align:left; }
.allphotos-filter-grid input[aria-invalid="true"] { border-color:var(--coral,#ff6447); }
.allphotos-filter-footer { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.allphotos-filter-footer small { color:var(--muted,#b3b7ad); font-size:11px; line-height:1.4; }
.allphotos-filter-footer .text-button { flex:none; font-size:12px; padding:0; min-height:48px; }
.allphotos-date-error { color:#ffb5a6; font-size:12px; line-height:1.5; margin:10px 0 0; }
.allphotos-date-error[hidden] { display:none; }
.allphotos-workspace .library-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.allphotos-photo { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; touch-action:pan-y; transition:border-color .16s ease,box-shadow .16s ease; position:relative; border:1px solid var(--line-dark,#414341); }
.allphotos-photo .library-image img { -webkit-user-drag:none; transition:transform .18s ease; }
.allphotos-photo.is-selected { border-color:var(--acid,#d8ff3e); box-shadow:0 0 0 2px var(--acid,#d8ff3e); }
.allphotos-selection-check { display:none; position:absolute; top:8px; right:8px; width:24px; height:24px; border:1.5px solid #ffffffe0; border-radius:50%; background:#090a0a66; box-shadow:0 1px 5px #0004; }
.is-selecting .allphotos-selection-check { display:grid; place-items:center; }
.allphotos-photo.is-selected .allphotos-selection-check { color:var(--black,#090a0a); background:var(--acid,#d8ff3e); border-color:var(--acid,#d8ff3e); }
.allphotos-selection-check svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2.5; }
.allphotos-status { position:absolute; bottom:6px; left:6px; max-width:calc(100% - 12px); padding:4px 6px; border-radius:6px; background:#090a0ae8; color:var(--white,#fffef7); font-size:11px; line-height:1.3; overflow-wrap:anywhere; }
.allphotos-workspace .library-photo-copy { gap:3px; padding:9px 8px; }
.allphotos-workspace .library-photo-copy strong { font-size:12px; }
.allphotos-workspace .library-photo-copy small { font-size:11px; }
.allphotos-selection-toolbar { display:flex; flex:none; align-items:center; justify-content:space-between; gap:8px; padding:0 0 8px; min-height:48px; }
.allphotos-selection-toolbar>span { color:var(--acid,#d8ff3e); font-size:13px; line-height:1.4; }
.allphotos-selection-toolbar small { display:block; color:var(--muted,#b3b7ad); font-size:11px; }
.allphotos-selection-toolbar>div { display:flex; gap:10px; }
.allphotos-selection-toolbar .text-button { padding:0; font-size:12px; white-space:normal; }
.allphotos-summary { flex:none; display:flex; justify-content:space-between; gap:6px 12px; flex-wrap:wrap; padding:12px 0 0; border-top:1px solid var(--line-dark,#414341); color:var(--muted,#b3b7ad); font-size:12px; line-height:1.4; }
.allphotos-summary small { font-size:11px; }
.allphotos-workspace .library-empty p { font-size:14px; line-height:1.5; color:var(--muted,#b3b7ad); }
.allphotos-workspace button:focus-visible,.allphotos-workspace input:focus-visible,.allphotos-workspace select:focus-visible { outline:2px solid var(--acid,#d8ff3e); outline-offset:2px; }
@media(min-width:720px){ .allphotos-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px){
  .modal.library-modal.allphotos-workspace { width:100vw; height:var(--visual-height,100dvh); max-height:var(--visual-height,100dvh); border:0; border-radius:0; padding:calc(env(safe-area-inset-top,0px) + 16px) 16px calc(env(safe-area-inset-bottom,0px) + 12px); }
  .allphotos-workspace .library-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .allphotos-workspace .modal-header { margin-bottom:12px; }
  .allphotos-workspace .library-heading h2 { font-size:24px; }
  .allphotos-workspace .library-heading .eyebrow { margin-bottom:5px; }
  .allphotos-workspace .library-header-actions { gap:8px; }
  .allphotos-workspace .library-header-actions .icon-button { padding:10px; }
  .allphotos-search-row .library-filter-toggle>span { display:none; }
  .allphotos-workspace .library-photo-copy { padding:7px 6px; }
}
@media(max-width:350px){
  .modal.library-modal.allphotos-workspace { padding-inline:12px; }
  .allphotos-workspace .library-header-actions { gap:4px; }
  .allphotos-workspace .library-heading h2 { font-size:21px; }
  .allphotos-workspace .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
}
@media(prefers-reduced-motion:reduce){ .allphotos-photo,.allphotos-photo .library-image img { transition:none; } }
