/* Album browsing shares the app's appearance tokens and type. */
dialog.photo-dialog { width: min(1020px,calc(100% - 40px)); max-width: none; height: min(790px,90dvh); max-height: 90dvh; overflow: hidden; }
dialog.photo-dialog[open] { display: flex; flex-direction: column; }
.photo-dialog .dialog-header { padding: 16px 22px 12px; flex: none; border-bottom: 1px solid var(--line); }
.photo-dialog .dialog-header h2 { font-size: 15px; font-weight: 550; }
.photo-dialog .dialog-body { flex: 1; min-height: 0; padding: 0 22px 16px; overflow: auto; overscroll-behavior: contain; }
.photo-dialog .dialog-footer { padding: 12px 22px; min-height: 47px; flex: none; align-items: center; justify-content: space-between; }
.photo-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.photo-albums { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.photo-albums button { display: flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 6px; padding: 6px 9px; font-size: 11px; background: transparent; color: var(--muted); white-space: nowrap; }
.photo-albums button[aria-pressed=true] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); color: var(--ink); }
.photo-albums button > span { font-size: 10px; color: var(--muted); }
.photo-client-id { font-family: 'Geist Mono',monospace; font-size: 10px; }
.photo-gallery-head { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0 15px; font-size: 11px; color: var(--muted); }
.photo-gallery { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 18px 12px; }
.photo-card { min-width: 0; }
.photo-open { display: block; position: relative; width: 100%; border: none; border-radius: 9px; padding: 0; background: var(--surface-soft); }
.photo-open .portrait { display: block; }
.photo-open:hover { outline: 2px solid var(--focus); outline-offset: 2px; }
.photo-card-caption { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 9px 0 0; }
.photo-card-caption strong { font-size: 11px; font-weight: 550; color: var(--ink); }
.photo-card-caption .image-id { font-size: 8px; padding-top: 2px; white-space: nowrap; }
.photo-star { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 50%; display: grid; place-items: center; flex: none; }
.photo-star .icon { width: 14px; height: 14px; }
.photo-star:hover { background: var(--surface-hover); }
.is-favorite { color: var(--green-ink); background: var(--green-bg); border-color: var(--green-line); }
.is-favorite .icon, .photo-favorite-badge .icon { fill: currentColor; }
.photo-favorite-badge { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--green-ink); box-shadow: var(--shadow); }
.photo-favorite-badge .icon { width: 12px; height: 12px; }
.photo-view-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.photo-back { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: none; padding: 4px 0; color: var(--muted); font-size: 11px; }
.photo-back .icon { width: 14px; height: 14px; }
.photo-position { font-family: 'Geist Mono',monospace; font-size: 11px; }
.photo-stage { --photo-size: clamp(160px,calc(90dvh - 392px),425px); position: relative; display: flex; align-items: center; justify-content: center; height: var(--photo-size); border-radius: 10px; background: var(--canvas); overflow: hidden; }
.portrait.viewer { display: block; flex: none; width: min(var(--photo-size),calc(100% - 80px)); height: auto; aspect-ratio: 1; border-radius: 0; border: none; }
.photo-arrow { position: absolute; top: calc(50% - 19px); width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); z-index: 1; }
.photo-arrow.previous { left: 14px; }
.photo-arrow.next { right: 14px; }
.photo-arrow:disabled { opacity: .3; box-shadow: none; cursor: default; }
.photo-arrow:not(:disabled):hover { background: var(--surface-hover); }
.photo-details { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; }
.photo-details strong { font-size: 13px; font-weight: 550; color: var(--ink); }
.photo-details .image-id { font-size: 10px; }
.photo-favorite { font-size: 11px; min-height: 34px; }
.photo-favorite .icon { width: 15px; height: 15px; }
.photo-filmstrip { display: flex; gap: 8px; overflow: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.photo-thumbnail { position: relative; flex: 0 0 58px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); padding: 3px; font-size: 9px; }
.photo-thumbnail.active { border-color: var(--focus); background: var(--selection); color: var(--ink); }
.portrait.film { display: block; width: 50px; height: 50px; border: none; border-radius: 4px; }
.photo-thumbnail > span:last-of-type { display: block; padding-top: 3px; }
.photo-thumbnail .thumbnail-star { position: absolute; top: 5px; right: 6px; color: #fff; text-shadow: 0 1px 3px #000a; font-size: 10px; }
.photo-shortcuts, .photo-demo-note { font-size: 10px; color: var(--muted); }
.photo-page-buttons { display: flex; gap: 9px; align-items: center; font-size: 10px; }
.photo-empty { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.photo-empty > .icon { width: 30px; height: 30px; margin-bottom: 14px; color: var(--faint); }
.photo-empty h3 { color: var(--ink); font-weight: 550; font-size: 17px; margin: 0 0 7px; }
.photo-empty p { max-width: 330px; color: var(--muted); margin: 0 0 20px; font-size: 12px; }
.order-photo-link { background: transparent; border: none; padding: 0; border-radius: 7px; }
.order-photo-link:hover { outline: 2px solid var(--focus); outline-offset: 2px; }
@media(max-width:900px) { .photo-gallery { grid-template-columns: repeat(4,minmax(0,1fr)); } .photo-client-id { display: none; } }
@media(max-width:600px) { dialog.photo-dialog { width: calc(100% - 20px); height: 91dvh; max-height: 91dvh; border-radius: 12px; } .photo-dialog .dialog-header { padding: 12px 14px 9px; } .photo-dialog .dialog-body { padding: 0 14px 12px; } .photo-dialog .dialog-footer { padding: 10px 14px; flex-wrap: wrap; gap: 8px; } .photo-albums { width: 100%; gap: 2px; } .photo-albums button { flex: 1; justify-content: center; padding: 6px 5px; gap: 5px; font-size: 10px; } .photo-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px; } .photo-gallery-head { padding-top: 0; } .photo-gallery-head > span:last-child { display: none; } dialog.photo-dialog[data-photo-mode=viewer] { height: fit-content; } dialog.photo-dialog[data-photo-mode=viewer] .dialog-body { flex: 0 1 auto; } .photo-stage { --photo-size: clamp(205px,35dvh,330px); height: min(var(--photo-size),calc(100vw - 112px)); } .portrait.viewer { width: min(var(--photo-size),calc(100% - 62px)); } .photo-arrow { width: 30px; height: 30px; top: calc(50% - 15px); } .photo-arrow.previous { left: 6px; } .photo-arrow.next { right: 6px; } .photo-shortcuts { display: none; } .photo-demo-note { font-size: 9px; } .photo-page-buttons { margin-left: auto; gap: 5px; } .photo-page-buttons .btn { font-size: 10px; padding: 6px 8px; } .photo-details .image-id { font-size: 9px; } }
