.gallery-page {--gallery-ink:#624d3b;--gallery-muted:#8f7b67;--gallery-line:#dfd2c0;--gallery-paper:#fffbf4;max-width:1304px;margin:24px auto 0;padding:0 20px 36px;color:var(--gallery-ink);}
.gallery-hero {display:flex;align-items:center;justify-content:space-between;gap:28px;padding:24px 32px;border:1px solid var(--gallery-line);border-radius:14px;background:linear-gradient(115deg,#faf2e5,#f2e8d8);overflow:hidden;}
.gallery-hero-copy {min-width:0;}
.gallery-eyebrow {display:flex;align-items:center;gap:15px;font-size:10px;letter-spacing:1.8px;color:#9b8062;}
.gallery-eyebrow span+span {padding-left:15px;border-left:1px solid #c8b599;letter-spacing:.4px;}
.gallery-hero h1 {display:flex;align-items:baseline;gap:22px;margin:16px 0 9px;font:500 32px/1.5 Georgia,"SimSun",serif;letter-spacing:2px;}
.gallery-hero h1 span {font:400 17px/1.8 "Segoe UI","Microsoft YaHei",sans-serif;letter-spacing:.5px;color:#80654b;}
.gallery-hero p {font-size:12px;line-height:1.9;color:var(--gallery-muted);margin:0;}
.gallery-hero-bottom {display:flex;gap:23px;flex-wrap:wrap;font-size:11px;margin-top:22px;color:#9a8065;}
.gallery-hero-bottom b {font:19px/1 Georgia,serif;color:#705135;margin-right:4px;}
.gallery-hero-bottom>span:last-child {padding-left:20px;border-left:1px solid #d4c2a9;}
.gallery-hero-art {flex:0 0 175px;text-align:center;}
.gallery-hero-art img {display:block;margin:-8px auto -6px;object-fit:contain;filter:drop-shadow(0 8px 6px #6f563217);}
.gallery-hero-art span {font:italic 11px/1.7 Georgia,serif;color:#9e8064;}
.gallery-toolbar {display:flex;align-items:center;justify-content:space-between;gap:18px;margin:24px 0;}
.gallery-search {display:flex;align-items:center;gap:10px;width:min(440px,55%);min-width:0;border:1px solid var(--gallery-line);border-radius:8px;background:var(--gallery-paper);padding-left:13px;overflow:hidden;}
.gallery-search>.icon {width:16px;height:16px;flex:none;color:#ad9275;}
.gallery-search input {flex:1;min-width:0;width:0;border:0;background:transparent;box-shadow:none;font-size:12px;height:44px;padding:8px 0;color:var(--gallery-ink);}
.gallery-search:focus-within {outline:2px solid #b69674;outline-offset:2px;}
.gallery-search input:focus {outline:none;box-shadow:none;}
.gallery-search>button {align-self:stretch;background:transparent;border:0;border-left:1px solid #e6dbc9;min-width:58px;padding:9px 14px;color:#806449;font-size:12px;}
.gallery-toolbar-actions {display:flex;gap:9px;flex:none;}
.gallery-page :is(.gallery-primary,.gallery-secondary,.gallery-more),#gallery-viewer button {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:1px solid #c7ab88;border-radius:7px;padding:10px 16px;font-size:12px;color:#6e5037;background:#fff9ef;}
.gallery-page .gallery-primary {background:#866246;color:#fffaf1;border-color:#866246;box-shadow:0 3px 0 #654a3612;}
.gallery-page :is(.gallery-primary,.gallery-secondary,.gallery-more):hover {filter:brightness(.97);}
.gallery-page .icon {width:16px;height:16px;flex:none;}
.gallery-layout {display:grid;grid-template-columns:188px minmax(0,1fr);gap:30px;}
.gallery-sidebar {border-right:1px solid var(--gallery-line);padding-right:20px;min-width:0;}
.gallery-sidebar-label {display:flex;align-items:center;justify-content:space-between;font-size:12px;padding:9px 3px 20px;}
.gallery-sidebar-label span {font:8px/1.6 Georgia,serif;letter-spacing:1px;color:#a28b72;}
.gallery-sidebar nav {display:flex;flex-direction:column;gap:5px;}
.gallery-sidebar nav button {display:flex;align-items:center;gap:9px;text-align:left;border:1px solid transparent;border-radius:6px;padding:10px 9px;min-height:44px;min-width:0;color:#947a60;background:transparent;font-size:12px;}
.gallery-sidebar nav button>span {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.gallery-sidebar nav button>b {font:11px/1.5 var(--mono);font-weight:400;}
.gallery-sidebar nav button:hover {background:#eee4d5;}
.gallery-sidebar nav button.is-active {background:#ebe0ce;border-color:#d6c1a5;color:#6d4d33;}
.gallery-album-divider {border-top:1px dashed #deceb9;margin:12px 4px;}
.gallery-sidebar-note {margin:35px 9px 10px;font:14px/1.9 Georgia,"SimSun",serif;color:#a28c73;}
.gallery-sidebar-note span {display:block;margin-top:18px;font:10px/1.9 "Segoe UI",sans-serif;color:#aa967f;}
.gallery-collection {min-width:0;}
.gallery-collection-heading {display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:19px;}
.gallery-collection-heading h2 {font:500 21px/1.5 Georgia,"SimSun",serif;margin:0 0 6px;letter-spacing:.6px;}
.gallery-collection-heading p {margin:0;font-size:11px;color:#9b856e;line-height:1.7;}
.gallery-sort-label {display:flex;gap:9px;align-items:center;font-size:11px;color:#a18a71;white-space:nowrap;}
.gallery-sort-label select {min-width:115px;min-height:42px;max-width:100%;border:1px solid var(--gallery-line);border-radius:6px;background:#fffaf2;padding:8px;color:#84674c;font-size:12px;}
.gallery-filter-summary {display:flex;gap:12px;align-items:center;justify-content:space-between;border:1px solid #dfcdb3;border-radius:7px;background:#f6eddf;padding:10px 14px;margin-bottom:18px;font-size:12px;overflow-wrap:anywhere;}
.gallery-filter-summary>button {color:#876243;background:transparent;border:0;text-decoration:underline;min-height:30px;flex:none;font-size:12px;}
.gallery-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 18px;}
.gallery-card {min-width:0;border:1px solid #e0d3bf;border-radius:5px;padding:8px 8px 0;background:#fffbf4;box-shadow:0 4px 10px #6d513608;transition:transform .18s,box-shadow .18s;}
.gallery-card:hover {transform:translateY(-3px);box-shadow:0 8px 16px #6d513612;}
.gallery-card-open {display:block;border:0;padding:0;background:transparent;width:100%;text-align:left;color:var(--gallery-ink);border-radius:3px;}
.gallery-card-media {display:block;position:relative;aspect-ratio:1;overflow:hidden;background:repeating-conic-gradient(#f1ece3 0 25%,#f7f3eb 0 50%) 0/16px 16px;}
.gallery-card-media>img {display:block;width:100%;height:100%;object-fit:cover;}
.gallery-card-enlarge {display:flex;align-items:center;gap:5px;position:absolute;bottom:8px;right:8px;padding:6px 8px;border:1px solid #f7efde9c;border-radius:4px;background:#fff8ece8;font-size:10px;color:#785c44;opacity:0;transition:opacity .18s;}
.gallery-card-open:is(:hover,:focus-visible) .gallery-card-enlarge {opacity:1;}
.gallery-card-title {display:block;margin:13px 6px 6px;font-size:13px;font-weight:500;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.gallery-card-meta {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 3px 7px;}
.gallery-card-meta>span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:#9b8267;line-height:1.7;}
.gallery-card-meta time {display:block;font:9px/1.8 var(--mono);color:#b39e86;}
.gallery-card-cloud {margin:0 3px 9px;padding-top:6px;border-top:1px solid #eee1ce;color:#8c7054;font-size:10px;line-height:1.5;overflow-wrap:anywhere;}
.gallery-card-meta .gallery-favorite {display:grid;place-items:center;flex:none;width:40px;height:40px;background:transparent;color:#bfa68b;border:1px solid transparent;border-radius:50%;}
.gallery-card-meta .gallery-favorite:hover {background:#f5e9d9;}
.gallery-favorite.is-favorite {color:#b17c61!important;}
.gallery-favorite.is-favorite .icon {fill:#c4947433;}
.gallery-empty {border:1px dashed #d7c5ab;border-radius:10px;text-align:center;padding:49px 20px 44px;background:linear-gradient(155deg,#fcf7eea1,#f2e9daa8);}
.gallery-empty-prints {position:relative;width:110px;height:90px;margin:0 auto 21px;}
.gallery-empty-prints span {position:absolute;width:74px;height:82px;left:8px;top:0;background:#ede3d2;border:1px solid #d8c5aa;transform:rotate(-12deg);border-radius:2px;}
.gallery-empty-prints span+span {left:31px;top:5px;transform:rotate(8deg);border:6px solid #fffaf0;border-bottom-width:20px;background:#e9dfcc;box-shadow:0 0 0 1px #d9c8b0,0 5px 12px #8c6c4212;display:grid;place-items:center;}
.gallery-empty-prints .icon {width:28px;height:28px;color:#b99d79;}
.gallery-empty .gallery-empty-kicker {font:9px/1.8 Georgia,serif;letter-spacing:1.7px;color:#ae9271;}
.gallery-empty h3 {margin:12px 0 10px;font:500 22px/1.6 Georgia,"SimSun",serif;letter-spacing:1px;color:#7b5a3c;}
.gallery-empty>p:not(.gallery-empty-kicker) {font-size:12px;line-height:2.1;color:#a38b71;margin:0 0 23px;}
.gallery-footnote {display:flex;gap:8px;font-size:10px;line-height:1.9;color:#ab957c;padding:20px 1px;}
.gallery-footnote .icon {width:13px;height:13px;margin-top:2px;}
.gallery-page .gallery-more {display:flex;margin:25px auto 0;}
#gallery-viewer {width:min(1100px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border:1px solid #d4c1a8;border-radius:12px;background:#f9f2e6;color:#6c503b;box-shadow:0 18px 90px #39261155;}
#gallery-viewer::backdrop {background:#2e261ecc;backdrop-filter:blur(5px);}
.gallery-viewer-toolbar {display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 17px;border-bottom:1px solid #dfcfb9;font-size:12px;}
.gallery-viewer-layout {display:grid;grid-template-columns:minmax(0,1fr) 266px;}
.gallery-viewer-image {display:flex;align-items:center;justify-content:center;min-width:0;min-height:320px;height:min(68vh,650px);padding:24px;background:#e9e1d5;}
.gallery-viewer-image img,img.gallery-viewer-image {display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;}
.gallery-viewer-info {padding:26px 23px;min-width:0;overflow-wrap:anywhere;}
.gallery-viewer-info h2 {margin:0 0 20px;font:500 22px/1.6 Georgia,"SimSun",serif;color:#634932;}
.gallery-viewer-info p {font-size:12px;line-height:1.9;white-space:pre-wrap;}
.gallery-viewer-info :is(dl,small) {font-size:11px;color:#9b836a;line-height:1.8;}
.gallery-viewer-info dt {margin-top:16px;color:#b0987d;}
.gallery-viewer-info dd {margin:3px 0 0;}
.gallery-viewer-actions {display:flex;gap:8px;flex-wrap:wrap;margin-top:24px;}
.gallery-cloud-original {margin-top:20px;padding:13px;border:1px solid #e1cdb4;border-radius:7px;background:#fff8ee;}
.gallery-cloud-original strong {font-size:12px;color:#76583c;}
.gallery-cloud-original p {margin:5px 0 10px;color:#8c7054;overflow-wrap:anywhere;}
.gallery-cloud-actions {display:flex;flex-wrap:wrap;gap:8px;}
#gallery-viewer .gallery-cloud-actions button {width:100%;padding:9px 10px;}
#gallery-viewer button:disabled {opacity:.4;cursor:default;}
#gallery-viewer button .icon {width:16px;height:16px;}
#gallery-viewer [data-gallery-viewer=delete] {color:#a77358;background:#faeee3;border-color:#dbbda5;}
#gallery-viewer [data-gallery-viewer=close] {padding:8px;width:44px;}
#gallery-import-form input[type=file] {width:100%;min-height:44px;border:1px dashed #d4bca0;border-radius:8px;padding:15px;background:#f8f0e2;}
#gallery-import-form :is(ul,ol) {padding-left:20px;max-height:180px;overflow:auto;font-size:12px;line-height:1.9;overflow-wrap:anywhere;}
#gallery-import-form [role=status] {font-size:12px;line-height:1.9;color:#8d7052;}
#gallery-edit-form textarea {min-height:100px;}
@media(max-width:1150px){.gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.gallery-layout{grid-template-columns:160px minmax(0,1fr);gap:22px;}.gallery-sidebar{padding-right:14px;}}
@media(max-width:760px){
 .gallery-page{margin-top:14px;padding:0 12px 24px;}.gallery-hero{padding:21px 18px;gap:10px;}.gallery-hero-art{flex-basis:95px;}.gallery-hero-art img{width:102px;height:125px;}.gallery-hero-art span{display:none;}.gallery-hero h1{display:block;font-size:28px;margin-top:12px;}.gallery-hero h1 span{display:block;font-size:13px;margin-top:5px;}.gallery-hero p{font-size:11px;}.gallery-eyebrow{font-size:8px;gap:9px;letter-spacing:1px;}.gallery-eyebrow span+span{padding-left:9px;}.gallery-hero-bottom{gap:16px;margin-top:16px;}.gallery-hero-bottom>span:last-child{display:none;}
 .gallery-toolbar{flex-wrap:wrap;gap:12px;margin:17px 0;}.gallery-search{width:100%;}.gallery-toolbar-actions{width:100%;justify-content:flex-end;}.gallery-toolbar-actions .gallery-primary{flex:1;}.gallery-layout{grid-template-columns:minmax(0,1fr);gap:20px;}.gallery-sidebar{border:0;padding:0;}.gallery-sidebar-label,.gallery-sidebar-note,.gallery-album-divider{display:none;}.gallery-sidebar nav{flex-direction:row;overflow-x:auto;padding:1px 1px 8px;gap:7px;}.gallery-sidebar nav button{flex:none;max-width:190px;background:#f8f1e6;border-color:#e0cfb7;}.gallery-sidebar nav button>span{flex:initial;}.gallery-collection-heading{margin-bottom:15px;}.gallery-collection-heading h2{font-size:20px;}.gallery-sort-label{font-size:0;gap:0;}.gallery-sort-label select{min-width:106px;min-height:44px;}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 11px;}.gallery-card{padding:6px 6px 0;}.gallery-card-title{font-size:12px;margin:9px 3px 3px;}.gallery-card-meta{margin:0 0 3px;gap:3px;}.gallery-card-meta .gallery-favorite{width:44px;height:44px;}.gallery-card-enlarge{display:none;}.gallery-filter-summary>button{min-height:44px;}.gallery-empty{padding:38px 15px;}.gallery-empty h3{font-size:19px;}.gallery-footnote{font-size:10px;}
 #gallery-viewer{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);}.gallery-viewer-layout{grid-template-columns:minmax(0,1fr);}.gallery-viewer-image{height:42vh;min-height:200px;padding:13px;}.gallery-viewer-info{padding:19px;}.gallery-viewer-info h2{font-size:20px;margin-bottom:12px;}.gallery-viewer-info dl{display:grid;grid-template-columns:80px minmax(0,1fr);gap:6px 10px;}.gallery-viewer-info :is(dt,dd){margin:0;}.gallery-viewer-actions{margin-top:18px;}.gallery-viewer-toolbar{padding:9px 11px;}
}
@media(prefers-reduced-motion:reduce){.gallery-card,.gallery-card-enlarge{transition:none;}.gallery-card:hover{transform:none;}}

.gallery-page button:disabled {opacity:.45;cursor:default;filter:none;}
.gallery-viewer-paging {display:flex;gap:8px;flex-wrap:wrap;margin-top:20px;padding-top:18px;border-top:1px solid #dfcfb9;}
.gallery-viewer-paging button {flex:1;padding:8px!important;white-space:nowrap;}
.gallery-import-error {color:#a45d40;}
#gallery-import-ack:not([hidden]) {display:flex;align-items:flex-start;gap:9px;padding:12px;border:1px solid #d9b995;border-radius:7px;background:#f9eddc;font-size:12px;line-height:1.9;}
#gallery-import-ack input {margin-top:5px;}
.settings-record-counts {grid-template-columns:repeat(6,minmax(0,1fr));}
@media(max-width:480px){.settings-record-counts {grid-template-columns:repeat(3,minmax(0,1fr));row-gap:18px;}.settings-record-counts div:nth-child(4){border-left:0;}.gallery-toolbar-actions .gallery-undo span{display:none;}.gallery-toolbar-actions .gallery-undo{padding:8px 12px;}}

@media(max-width:420px){.gallery-hero-art{display:none;}.gallery-hero-copy{width:100%;}.gallery-hero h1 span{font-size:14px;}.gallery-hero p{font-size:11px;}}
