.albums-page .site-header,.albums-page main,.albums-page .site-footer {width:min(1320px,calc(100% - 40px));}
.albums-page [hidden] {display:none!important;}
.albums-page button,.albums-page input,.albums-page select {font:inherit;}
.albums-page input[type=text],.albums-page input[type=search],.albums-page select {width:100%;min-width:0;padding:9px 10px;border:1px solid #aeb8ad;border-radius:3px;background:#fff;color:#27332e;}
.albums-page button {cursor:pointer;}
.albums-page button:disabled {cursor:default;opacity:.55;}
.album-name-row {display:flex;align-items:end;gap:24px;margin:24px 0 30px;}
.album-name-row label {max-width:420px;flex:1;font-weight:650;}
.album-name-row input {display:block;margin-top:6px;font-weight:400;}
#album-save-status {font-size:.8rem;max-width:500px;color:#5e6861;}
.album-workspace {display:grid;grid-template-columns:minmax(340px,460px) minmax(0,1fr);grid-template-areas:"settings preview" "settings download";grid-template-rows:auto 1fr;gap:20px 36px;align-items:start;}
.album-settings {grid-area:settings;min-width:0;}
.album-preview-panel {grid-area:preview;min-width:0;}
.album-download {grid-area:download;}
.album-preview-toolbar {display:flex;justify-content:space-between;align-items:baseline;gap:12px;}
.album-preview-toolbar h2 {margin-bottom:8px;}
.album-text-button {padding:0;border:0;background:none;color:#305d49;text-decoration:underline;text-underline-offset:.2em;white-space:nowrap;}
.album-help,.album-count,.album-storage-note,#album-export-status,#album-preview-status {font-size:.8rem;color:#5e6861;}
.album-count {margin:12px 0;}
.album-search {display:block;font-size:.85rem;}
.album-search input {display:block;margin-top:5px;}
.album-filters {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;font-size:.8rem;}
.album-filters select {display:block;margin-top:4px;}
.album-table-scroll {max-height:370px;overflow:auto;overscroll-behavior:contain;border:1px solid #d8ddd7;background:#fff;}
.album-picker-table {border-collapse:collapse;width:100%;font-size:.8rem;}
.album-picker-table th {text-align:left;background:#eef1e9;position:sticky;top:0;z-index:1;font-weight:600;}
.album-picker-table td,.album-picker-table th {padding:9px 7px;border-bottom:1px solid #e1e4dd;}
.album-picker-table td:first-child {width:88px;text-align:center;}
.album-picker-table img {display:block;height:60px;width:auto;max-width:84px;object-fit:contain;margin:auto;}
.album-picker-table strong,.album-picker-table small {display:block;}
.album-picker-table small {font-size:.72rem;color:#5e6861;line-height:1.45;margin-top:5px;}
.album-picker-table button {border:1px solid #8c9985;border-radius:3px;background:#f5f7f0;color:#305d49;padding:6px 9px;font-size:.75rem;}
.album-selected {margin:28px 0;}
.album-selected h2 {margin-bottom:10px;}
.album-selected h2 span {font:400 .9rem system-ui,sans-serif;color:#5e6861;}
#selected-list {padding:0;margin:0;list-style:none;max-height:260px;overflow:auto;}
#selected-list li {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #d8ddd7;font-size:.8rem;}
.album-order-actions {display:flex;gap:5px;flex-shrink:0;}
.album-order-actions button {border:1px solid #c9d0c6;background:#fff;border-radius:3px;color:#305d49;padding:4px 7px;min-height:32px;}
#album-options {padding-top:20px;border-top:1px solid #d8ddd7;}
.album-stage {container-type:inline-size;position:relative;width:100%;background:#f5efde;box-shadow:0 2px 14px #1b30221c;}
#album-paper {display:block;width:100%;height:100%;}
.album-stamps {position:absolute;inset:0;}
.album-canvas-stamp {position:absolute;border:0;padding:0;background:none;overflow:hidden;touch-action:none;cursor:grab!important;}
.album-canvas-stamp img {position:absolute;max-width:none;pointer-events:none;user-select:none;}
.album-canvas-stamp:hover,.album-canvas-stamp:focus-visible {outline:2px dashed #305d49;outline-offset:5px;}
.album-canvas-stamp.is-dragging {z-index:4;opacity:.8;cursor:grabbing!important;outline:2px solid #305d49;}
.album-canvas-stamp.is-drop-target {outline:4px solid #aa8b3d;outline-offset:6px;}
#album-stage-empty {position:absolute;top:45%;left:10%;right:10%;text-align:center;color:#5e6861;pointer-events:none;}
.album-storage-note {margin-top:32px;}
.album-list-item {display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 0;border-bottom:1px solid #d8ddd7;}
.album-list-item h2 {margin-bottom:6px;overflow-wrap:anywhere;}
.album-list-item p {font-size:.85rem;}
.album-list-actions,.album-dialog-actions {display:flex;gap:12px;}
.album-list-actions button,.album-dialog-actions button,.album-dialog-heading button {padding:8px 16px;background:#fff;border:1px solid #8c9985;border-radius:3px;color:#305d49;}
#album-list {margin-top:24px;}
.albums-page dialog {border:1px solid #aeb8ad;border-radius:4px;background:#faf9f5;color:#27332e;padding:24px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);}
.albums-page dialog::backdrop {background:#14261dcc;}
#arrange-dialog {width:min(1100px,calc(100vw - 24px));}
.album-dialog-heading {display:flex;justify-content:space-between;align-items:center;gap:20px;}
.album-dialog-heading h2 {margin:0;}
#arrange-dialog p {font-size:.85rem;margin:14px 0;}
#arrange-stage-host {width:min(780px,calc((100dvh - 180px)*var(--album-ratio,.7071)));max-width:100%;margin:auto;}
.albums-page .download-position button {font:400 .8rem/1.5 system-ui,sans-serif;}
.albums-page .download-position button[aria-pressed="true"] {font-weight:700;}
.album-sr-only {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
@media(max-width:900px) {
 .album-workspace {grid-template-columns:1fr;grid-template-areas:"settings" "preview" "download";grid-template-rows:auto;gap:28px;}
 .album-name-row {display:block;}.album-name-row label {display:block;max-width:none;}#album-save-status {margin-top:10px;}
 .album-table-scroll {max-height:320px;}.album-stage {max-width:650px;margin:auto;}
 .album-preview-panel {margin-top:8px;}#album-options {margin-top:24px;}
}
@media(max-width:440px) {
 .albums-page .site-header,.albums-page main,.albums-page .site-footer {width:calc(100% - 28px);}
 .album-picker-table td,.album-picker-table th {padding:8px 5px;}.album-picker-table td:first-child {width:67px;}.album-picker-table img {max-width:65px;}
 .album-order-actions button {padding:5px 6px;}.album-list-item {gap:12px;}.album-list-actions {gap:7px;}
 .albums-page dialog {padding:14px;}.album-preview-toolbar h2 {font-size:1.4rem;}.album-text-button {font-size:.85rem;}
}

#album-save-status:empty,.album-storage-note:empty {display:none;}

#album-templates {margin:32px 0 44px;}
#album-templates h2,#saved-albums-heading {margin:0 0 20px;}
#album-template-list {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,540px),1fr));gap:28px;}
.album-template-card {display:grid;grid-template-columns:minmax(160px,250px) minmax(0,1fr);align-items:center;gap:28px;padding:24px;border:1px solid #d8ddd7;background:#eef0e9;}
.album-template-card canvas {display:block;width:100%;height:auto;box-shadow:0 2px 12px #1b302224;}
.album-template-details h3 {font:400 1.6rem/1.2 Georgia,serif;margin:0 0 16px;color:#305d49;}
.album-template-details p {font-size:.9rem;line-height:1.6;margin:0 0 18px;}
.album-template-details .album-template-help {font-size:.8rem;color:#5e6861;}
#saved-albums-heading {padding-top:28px;border-top:1px solid #d8ddd7;}
.album-list-item h3 {margin:0 0 6px;font:400 1.4rem/1.3 Georgia,serif;overflow-wrap:anywhere;}
@media(max-width:620px) {
 .album-template-card {grid-template-columns:1fr;padding:20px;gap:24px;}
 .album-template-card canvas {max-width:300px;margin:auto;}
}

.album-template-preview {display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in!important;}
.album-template-preview:focus-visible {outline:3px solid #305d49;outline-offset:6px;}
#template-lightbox {width:min(1100px,96vw);height:94dvh;max-height:94dvh;padding:0;}
#template-lightbox .lightbox-toolbar h2 {overflow-wrap:anywhere;}
#template-lightbox .lightbox-toolbar button {flex-shrink:0;white-space:nowrap;}
#template-lightbox button {border:1px solid #8c9985;border-radius:3px;padding:6px 10px;background:#fff;color:#305d49;}
#template-lightbox-viewport canvas {display:block;max-width:none;margin:auto;}
#template-lightbox-status {padding:0 18px;font-size:.85rem;}
@media(max-width:620px) {.album-template-preview {max-width:300px;margin:auto;}}

#album-gallery {margin:44px 0;padding:28px 0;border-bottom:1px solid #d8ddd7;}
#album-gallery h2 {margin:0 0 12px;}
.album-gallery-intro {max-width:900px;font-size:.95rem;line-height:1.6;margin:0 0 24px;}
.album-gallery-slide {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);align-items:center;gap:32px;max-width:1120px;margin:auto;}
.album-gallery-slide[hidden] {display:none;}
.album-gallery-image {display:block;padding:0;border:0;background:#eef0e9;cursor:zoom-in!important;width:100%;aspect-ratio:16/9;touch-action:pan-y;}
.album-gallery-image img {display:block;width:100%;height:100%;object-fit:contain;}
.album-gallery-caption h3 {font:400 1.6rem/1.25 Georgia,serif;margin:0 0 14px;color:#305d49;}
.album-gallery-caption p {font-size:.9rem;line-height:1.6;margin:0 0 16px;}
.album-gallery-caption ul {list-style:none;padding:0;margin:0 0 16px;display:flex;flex-wrap:wrap;gap:8px 18px;font-size:.9rem;}
.album-gallery-caption .album-gallery-link-intro {margin-bottom:8px;}
.album-gallery-caption .album-gallery-note {font-size:.75rem;color:#5e6861;margin:18px 0 0;}
.album-gallery-controls {display:flex;align-items:center;justify-content:center;gap:14px;margin-top:16px;}
.album-gallery-controls>button {width:44px;height:44px;border:1px solid #8c9985;border-radius:3px;background:transparent;color:#305d49;font-size:1.2rem;}
.album-gallery-dots {display:flex;gap:2px;}
.album-gallery-dots button {display:grid;place-items:center;width:36px;height:44px;padding:0;background:none;border:0;}
.album-gallery-dots span {width:9px;height:9px;border:1px solid #305d49;border-radius:50%;}
.album-gallery-dots [aria-pressed=true] span {background:#305d49;box-shadow:0 0 0 3px #305d4926;}
#gallery-lightbox {width:min(1300px,96vw);max-width:96vw;max-height:94dvh;padding:16px;background:#faf9f5;border:1px solid #8c9985;}
#gallery-lightbox::backdrop {background:#14251fbb;}
.gallery-lightbox-toolbar {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;}
.gallery-lightbox-toolbar h2 {font:400 1.2rem/1.3 Georgia,serif;margin:0!important;}
.gallery-lightbox-toolbar button {flex-shrink:0;border:1px solid #8c9985;padding:8px 12px;background:white;color:#305d49;border-radius:3px;}
.gallery-lightbox-image img {display:block;max-width:100%;max-height:calc(94dvh - 115px);width:auto;height:auto;margin:auto;}
#gallery-lightbox [data-gallery-loading]:empty {display:none;}
@media(max-width:720px) {
 .album-gallery-slide {grid-template-columns:minmax(0,1fr);gap:20px;}
 .album-gallery-caption > :last-child {margin-bottom:0;}
 .album-gallery-caption h3 {font-size:1.4rem;}
 #album-gallery {margin:32px 0;padding:20px 0;}
}
