:root{color-scheme:dark;--bg:#181818;--panel:#222120;--text:#eee8df;--muted:#bcb4ab;--accent:#d39473;--line:#4a4039}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at top,#302b26,var(--bg) 65%);color:var(--text);font:16px/1.5 system-ui,sans-serif;min-height:100vh}header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 3vw;border-bottom:1px solid var(--line)}.brand{font:clamp(20px,2.2vw,31px) Georgia,serif;letter-spacing:3px;white-space:nowrap}.brand small{display:block;font:10px system-ui;text-align:center;letter-spacing:5px;margin-top:6px}main{max-width:1900px;margin:auto;padding:28px 3vw 60px}h1,h2,h3{font-family:Georgia,serif;font-weight:400}h1{font-size:clamp(28px,3vw,45px);margin:12px 0}h2{font-size:25px}h3{font-size:23px;margin:0 0 12px}.muted{color:var(--muted);font-size:14px}button,input,textarea{font:inherit}button{border:1px solid var(--accent);border-radius:6px;background:linear-gradient(#b98062,#8d5e46);color:#fff5e9;padding:11px 18px;cursor:pointer}button:hover{filter:brightness(1.14)}button:disabled{opacity:.5;cursor:default}button.secondary{background:transparent;padding:8px 12px;border-color:var(--line)}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input,textarea{display:block;width:100%;padding:11px;margin:8px 0 18px;border:1px solid var(--line);border-radius:5px;background:#171717;color:var(--text)}label{display:block;margin-top:16px}textarea{resize:vertical}.panel{background:rgba(32,31,30,.92);border:1px solid var(--line);border-radius:8px;padding:24px}.admin-layout{display:grid;grid-template-columns:360px 1fr;gap:28px;margin-top:30px}.project{margin-bottom:18px}.actions{display:flex;flex-wrap:wrap;gap:10px}.gallery-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(330px,1fr);gap:24px;align-items:start}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.tile{padding:0;background:#242321;overflow:hidden;text-align:left;border-color:transparent}.tile.selected{border-color:var(--accent)}.tile img{width:100%;aspect-ratio:4/3;object-fit:contain;display:block;background:#151515;user-select:none}.tile span{display:flex;justify-content:space-between;gap:8px;padding:10px;font-size:13px;overflow-wrap:anywhere}.tile b{color:var(--accent);font-size:22px;line-height:1}.detail{position:sticky;top:15px;min-width:0}.detail-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.detail-head h2{overflow-wrap:anywhere;font-size:20px;margin:0}.zoom-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:16px 0}#viewport{overflow:auto;max-height:55vh;background:#151515;border-radius:6px}#large{display:block;user-select:none}#large:not([src]){display:none}.detail.expanded{position:fixed;inset:2vh 3vw;z-index:10;overflow:auto;background:#202020;box-shadow:0 0 0 5vw #000c}.expanded #viewport{max-height:67vh}#heart{width:100%;background:transparent}nav{display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--line);margin:28px 0 22px;padding-bottom:12px;flex-wrap:wrap}.tab{background:transparent;border-color:transparent}.tab.active{border-color:var(--accent);background:#694b3b}#saveStatus{margin-left:auto;color:var(--muted);font-size:13px}footer{padding:20px 3vw;border-top:1px solid var(--line);color:var(--muted);font-size:13px}.login{max-width:480px;margin:50px auto}#error{color:#ffbcaa;white-space:pre-line}dialog{max-width:500px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:28px}dialog::backdrop{background:#000b}[hidden]{display:none!important}hr{border:0;border-top:1px solid var(--line);margin:26px 0}@media(max-width:1050px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-layout{grid-template-columns:1fr}.gallery-layout{grid-template-columns:1fr 1fr}}@media(max-width:700px){header{flex-wrap:wrap;padding:18px}.brand{font-size:22px}.gallery-layout{display:flex;flex-direction:column}.grid{width:100%}.detail{position:static;width:100%}.tile span{font-size:11px}main{padding:20px 16px}.panel{padding:18px}header>span{font-size:13px}#saveStatus{margin-left:0}.detail.expanded{position:fixed;inset:8px;width:auto}.zoom-controls{justify-content:flex-start}.actions button{flex-grow:1}}@media print{body{display:none!important}}

#viewport.can-pan{cursor:grab;touch-action:pinch-zoom;overscroll-behavior:contain;user-select:none}
#viewport.is-panning{cursor:grabbing}
#viewport.can-pan #large{pointer-events:auto;-webkit-user-drag:none}

.feedback-dialog{width:min(1180px,94vw);max-width:1180px;max-height:92vh}.feedback-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}.feedback-image{border:1px solid var(--line);border-radius:6px;overflow:hidden;background:#171717}.feedback-image img{width:100%;height:210px;object-fit:contain;background:#111;display:block}.feedback-image p{margin:12px;white-space:pre-wrap;overflow-wrap:anywhere}.feedback-dialog select{background:#171717;color:var(--text);padding:10px;border:1px solid var(--line);border-radius:5px;margin-left:10px}.feedback-dialog .actions{align-items:center}.feedback-dialog label{margin:0}.button-link{display:inline-block;text-decoration:none;border:1px solid var(--accent);border-radius:6px;padding:8px 12px;color:var(--text)}.feedback-badge{color:var(--accent)}@media(max-width:800px){.feedback-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:500px){.feedback-grid{grid-template-columns:1fr}}

/* centered-gallery-view-v1 */
#viewport{display:flex;align-items:flex-start}
#large{flex:0 0 auto;margin:auto}
.detail.expanded .detail-head{position:sticky;top:0;z-index:2;background:var(--panel);padding:8px 0;flex-wrap:wrap}
.detail.expanded #close{order:-1;margin-right:auto}
.detail.expanded #expand{display:none}
.detail.expanded #viewport{height:65vh;max-height:67vh}

/* wheel-gallery-view-v1 */
.detail .detail-head{flex-wrap:wrap}
.detail .detail-head h2{flex:1 1 140px}
.detail #expand{min-height:44px;max-width:100%;padding:11px 18px;border:2px solid var(--accent);background:var(--accent);color:#181818;font-weight:650;box-shadow:0 2px 8px #0005}
.detail #expand:hover{filter:brightness(1.15)}
.zoom-help{display:none}
.detail.expanded .zoom-help{display:block;margin:8px 0}

/* favorites-brand-v1 */
.tile-card{position:relative;min-width:0}
.tile-card>.tile{display:block;width:100%;height:100%}
.tile-card .tile-heart{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:9px;border:1px solid #eee8df80;border-radius:50%;background:#171717df;color:#eee8df;box-shadow:0 2px 8px #0006}
.tile-card .tile-heart svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.tile-card .tile-heart.is-favorite{color:var(--accent);border-color:var(--accent)}
.tile-card .tile-heart.is-favorite svg{fill:currentColor}
.tile-card .tile-heart:disabled{opacity:.8;cursor:default}
.tile-card .tile-heart:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.site-footer{display:flex;align-items:flex-start;justify-content:space-between;gap:24px 48px;text-align:left;line-height:1.6}
.footer-label{padding-top:3px}
.footer-identity{margin-left:auto;max-width:560px;text-align:right;font-size:12px}
.footer-identity p{margin:0 0 7px}
.footer-identity .footer-brand{font-size:13px;letter-spacing:1.6px;color:var(--text)}
.footer-identity .footer-powered{margin-top:-5px;margin-bottom:12px;color:var(--accent)}
.footer-identity address{font-style:normal;margin:9px 0}
.site-footer a{color:var(--text);text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:3px;overflow-wrap:anywhere}
.site-footer a:hover{color:var(--accent)}
@media(max-width:700px){.site-footer{flex-direction:column;gap:20px}.footer-identity{margin-left:0;max-width:100%;text-align:left}.site-footer{padding:22px 16px}.footer-identity p,.footer-identity address{overflow-wrap:anywhere}}

/* mobile-portrait-v1 */
.mobile-gallery-hint{display:none}
body.gallery-detail-open{overflow:hidden;overscroll-behavior:none}
@media(max-width:700px){
 .gallery-page{min-width:0;-webkit-text-size-adjust:100%}
 .gallery-page>header{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:12px;text-align:center;padding:calc(16px + env(safe-area-inset-top,0px)) 16px 16px}
 .gallery-page .brand{font-size:25px;letter-spacing:2px;max-width:100%}
 .gallery-page .brand small{font-size:11px;letter-spacing:4px}
 .gallery-page #projectTitle{max-width:100%;font-size:14px;overflow-wrap:anywhere}
 .gallery-page #finish{width:100%;min-height:48px;white-space:normal}
 .gallery-page main{width:100%;min-width:0;padding:20px 12px 28px}
 .gallery-page #content>h1{font-size:29px;line-height:1.2}
 .gallery-page .mobile-gallery-hint{display:block;font-size:12px;line-height:1.6}
 .gallery-page #content>nav{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);position:sticky;top:0;z-index:4;gap:8px;margin:16px 0;padding:10px 0;background:var(--bg)}
 .gallery-page .tab{min-height:46px;padding:10px 6px;font-size:14px}
 .gallery-page #saveStatus{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
 .gallery-page .gallery-layout{display:block}
 .gallery-page #grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start;width:100%}
 .gallery-page .tile img{aspect-ratio:3/4;object-fit:contain}
 .gallery-page .tile span{min-height:42px;padding:9px 7px;font-size:12px;line-height:1.35;word-break:break-word}
 .gallery-page #detail:not(.expanded){display:none}
 .gallery-page .detail.expanded{inset:0;width:100%;height:100vh;height:100dvh;max-height:100dvh;z-index:40;border:0;border-radius:0;padding:calc(10px + env(safe-area-inset-top,0px)) calc(12px + env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) calc(12px + env(safe-area-inset-left,0px));overflow-y:auto;overscroll-behavior:contain;box-shadow:none}
 .gallery-page .detail.expanded .detail-head{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;top:0;padding:8px 0 10px;background:var(--panel)}
 .gallery-page .detail.expanded #close{order:-1;justify-self:start;margin:0;min-height:46px;max-width:100%;padding:10px 14px;font-size:14px}
 .gallery-page .detail-head #filename{font-size:16px;line-height:1.4;margin:0;overflow-wrap:anywhere}
 .gallery-page .zoom-controls{display:grid;grid-template-columns:46px minmax(46px,1fr) 46px minmax(80px,1fr);gap:7px;align-items:center;margin:10px 0}
 .gallery-page .zoom-controls button{min-height:46px;padding:9px 7px}
 .gallery-page #zoomLabel{text-align:center;font-size:13px}
 .gallery-page .detail.expanded #viewport{height:52vh;height:clamp(180px,52dvh,560px);max-height:none;width:100%;overscroll-behavior:contain}
 .gallery-page .detail.expanded .zoom-help{display:none}
 .gallery-page #panHint{font-size:12px}
 .gallery-page #heart{min-height:48px;margin:12px 0}
 .gallery-page input,.gallery-page textarea{font-size:16px}
 .gallery-page textarea{min-height:100px;line-height:1.5}
 .gallery-page .detail>.actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
 .gallery-page .detail>.actions button{min-height:46px}
 .gallery-page #count{font-size:13px}
 .gallery-page .login{width:100%;max-width:480px;margin:24px auto;padding:22px 18px}
 .gallery-page .login button{min-height:48px;width:100%}
 .gallery-page #confirm{width:calc(100% - 24px);max-width:480px;max-height:calc(100dvh - 32px);overflow:auto;padding:22px 18px}
 .gallery-page #confirm .actions{display:grid;grid-template-columns:1fr}
 .gallery-page #confirm button{min-height:48px;width:100%}
 .gallery-page .site-footer{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));line-height:1.7}
}
@media(max-width:350px){.gallery-page .brand{font-size:23px}.gallery-page #content>h1{font-size:26px}.gallery-page #grid{gap:8px}.gallery-page .tile span{font-size:11px}}

/* selection-quota-v1 */
.selection-progress{max-width:720px;margin:18px 0;padding:10px 0}
.quota-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 16px;font-size:13px;color:var(--muted);margin-bottom:7px}
#quotaCount{color:var(--text);font-variant-numeric:tabular-nums}
#quotaProgress{display:block;width:100%;height:4px;border:0;border-radius:4px;overflow:hidden;appearance:none;background:var(--line);accent-color:var(--accent)}
#quotaProgress::-webkit-progress-bar{background:var(--line)}
#quotaProgress::-webkit-progress-value{background:var(--accent);border-radius:4px}
#quotaProgress::-moz-progress-bar{background:var(--accent);border-radius:4px}
.quota-note{font-size:12px;line-height:1.5;color:var(--muted);margin:7px 0 0}
.quota-gift{font-size:13px;line-height:1.5;color:var(--accent);margin:8px 0 0}
.project-quota{border-top:1px solid var(--line);margin-top:18px;padding-top:10px}
.project-quota summary{cursor:pointer;color:var(--text);font-size:14px;padding:6px 0}
.project-quota-form{max-width:480px;padding:0 0 10px}
.project-quota-form>button{margin:4px 0}
@media(max-width:700px){.selection-progress{margin:12px 0;padding:8px 0}.quota-heading{font-size:13px}.quota-note,.quota-gift{font-size:12px}.project-quota-form button{min-height:44px}}

/* gift-popup-v1 */
#detail #selectionProgress{width:100%;max-width:none;margin:12px 0 8px;padding:10px 0 0}
#detail>#detailGift{display:none}
.mobile-quota{display:none}
.gift-dialog{width:calc(100% - 32px);max-width:520px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:38px 32px 30px;text-align:center;border:1px solid var(--accent);border-radius:16px;background:radial-gradient(ellipse at top,#443329,var(--panel) 65%);box-shadow:0 24px 80px #0009;color:var(--text)}
.gift-dialog[open]{animation:gift-appear .22s ease-out}
.gift-dialog::backdrop{background:#080705b8}
.gift-dialog .gift-close{position:absolute;top:8px;right:8px;min-width:44px;min-height:44px;font-size:26px;padding:0;border:0;background:transparent;color:var(--muted)}
.gift-symbol{margin:0 auto 10px;width:66px;height:66px;display:grid;place-items:center;border-radius:50%;background:#d394731a;color:var(--accent)}
.gift-symbol svg{width:44px;height:44px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.gift-dialog .gift-eyebrow{font-size:12px;letter-spacing:1.3px;color:var(--accent);margin:0 0 10px}
.gift-dialog h2{font-size:31px;line-height:1.2;margin:0 auto 12px;max-width:380px}
.gift-dialog .gift-amount{font-family:Georgia,serif;font-size:clamp(32px,7vw,48px);line-height:1.2;color:var(--accent);margin:18px 0 12px}
#giftDescription{font-size:15px;line-height:1.6;margin:0 auto 10px;max-width:360px}
#giftTotal{font-size:14px;line-height:1.5;margin:0 0 22px}
#giftContinue{min-height:48px;width:100%;font-weight:600}
@keyframes gift-appear{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.gift-dialog[open]{animation:none}}
@media(max-width:700px){.mobile-quota{display:block;font-size:13px;color:var(--muted);margin:12px 0}.mobile-quota progress{display:block;width:100%;height:4px;margin-top:7px;accent-color:var(--accent)}.gift-dialog{padding:34px 20px 24px}.gift-dialog h2{font-size:27px}.gift-symbol{width:60px;height:60px}#detail #selectionProgress{margin:10px 0 8px}}

/* compact-project-v1 */
.project.panel{padding:16px 18px}
.project>h3{font-size:20px;line-height:1.3;margin:0 0 7px}
.project>p{font-size:12px;line-height:1.5;margin:6px 0}
.project-credentials{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:10px 0}
.project-credentials>label{display:flex;align-items:center;gap:8px;min-width:0;flex:1;margin:0;color:var(--muted);font-size:12px}
.project-credentials input{flex:0 1 280px;min-width:0;max-width:320px;width:100%;height:32px;margin:0;padding:6px 8px;font:12px/1.3 ui-monospace,Consolas,monospace}
.project-credentials>button{font-size:12px;padding:6px 9px;min-height:32px}
.project-toolbar,.project-secondary-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:7px}
.project-toolbar>button,.project-secondary-actions>button,.project-secondary-actions>.button-link{font-size:12px;line-height:1.4;padding:7px 10px;min-height:33px;border-radius:5px}
.project-options{margin:0;min-width:0}
.project-options>summary{cursor:pointer;list-style-position:inside;font-size:12px;line-height:1.4;padding:7px 10px;min-height:33px;border:1px solid var(--line);border-radius:5px;color:var(--muted);width:max-content;max-width:100%}
.project-options[open]{flex-basis:100%;width:100%}
.project-options[open]>summary{color:var(--text);border-color:var(--accent)}
.project-options-body{border:1px solid var(--line);border-radius:6px;margin-top:8px;padding:12px;background:#17171755}
.project-quota-compact{margin-top:14px;padding-top:10px;border-top:1px solid var(--line)}
.project-quota-compact>h4{font-size:13px;font-weight:500;margin:0 0 7px}
.project-options .project-quota-form{max-width:480px;font-size:13px;padding-bottom:0}
.project-options .project-quota-form label{margin-top:10px}
.project-options .project-quota-form input{font-size:13px;padding:7px 9px;margin:6px 0 10px}
.project-options .project-quota-form button{font-size:12px;padding:7px 10px;min-height:33px}
.project-options .project-quota-form .muted{font-size:12px;line-height:1.5;margin:7px 0 10px}
.project-secondary-actions .project-danger{margin-left:auto}
@media(max-width:700px){.project-toolbar>button,.project-options>summary,.project-secondary-actions>button,.project-secondary-actions>.button-link,.project-credentials>button,.project-options .project-quota-form button{min-height:44px}.project-credentials input,.project-options .project-quota-form input{font-size:16px;height:auto;min-height:40px}.project-toolbar{gap:8px}.project-secondary-actions .project-danger{margin-left:0}.project-credentials>label{flex-wrap:wrap}.project-credentials input{flex:1 1 180px}.project.panel{padding:15px}}
