:root{--accent:#117b73;--ink:#202426;--border:#dfe3e6;--muted:#727b82}
.primary{color:#fff}#status{min-height:24px}#status.error{color:#b02a37}
*{box-sizing:border-box}
body{margin:0;background:#fff;color:var(--ink);font:15px/1.6 Tahoma,Arial,sans-serif}
button,input,select{font:inherit}button,.button{cursor:pointer;text-decoration:none;border:1px solid var(--border);border-radius:6px;background:#fff;color:inherit;padding:9px 14px}button:disabled{opacity:.5;cursor:wait}
header{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-bottom:1px solid var(--border)}
main{margin:auto}h1,h2{margin:0}h2{font-size:18px}.toolbar{display:flex;align-items:center;flex-wrap:wrap}label{display:inline-flex;align-items:center;gap:8px}.toolbar input,.toolbar select{padding:9px 12px;border:1px solid var(--border);border-radius:6px;max-width:100%;min-width:0;background:#fff}
.grid{display:grid}.album{text-align:left;padding:0;overflow:hidden}.album img,.album .placeholder{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}.album span{display:block;overflow-wrap:anywhere}.placeholder{display:grid!important;place-items:center;font-size:38px}.photo{margin:0}.photo>button{padding:0;width:100%;border:0;background:transparent}.photo img{display:block;width:100%;object-fit:cover}.photo figcaption{display:flex;gap:8px;justify-content:space-between;padding-top:8px;overflow-wrap:anywhere}.photo a{flex-shrink:0}.operator{border-top:1px solid var(--border);margin-top:32px}.empty{padding:40px 0;color:var(--muted)}[hidden]{display:none!important}
dialog{border:1px solid var(--border);border-radius:8px;max-width:min(92vw,1000px);max-height:92vh;padding:20px}dialog::backdrop{background:#0009}dialog img{max-width:100%;max-height:70vh;object-fit:contain}dialog video{display:block;width:min(70vw,480px)}#qr{display:block;margin:18px auto}progress{width:100%}button:focus-visible,a:focus-visible{outline:3px solid #087f79;outline-offset:3px}
.gallery-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 0 22px;border-bottom:1px solid var(--border)}.gallery-heading p{margin:4px 0 0;color:var(--muted);font-size:13px}.gallery-heading svg{width:20px;height:20px}header svg,.gallery-controls svg{width:18px;height:18px}header .button,header button,.gallery-controls button{display:inline-flex;align-items:center;justify-content:center;gap:8px}.gallery-count{white-space:nowrap;color:var(--muted);font-size:13px}.gallery-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:280px;border-top:1px solid var(--border);color:var(--muted);text-align:center}.gallery-empty svg{width:48px;height:48px;color:#9aa7ad;margin-bottom:16px}.gallery-empty strong{font-size:18px;color:var(--ink)}.gallery-empty p{margin:6px 0}.gallery-empty a{margin-top:14px;color:var(--accent)}
header{padding:15px max(20px,calc((100% - 1240px)/2));border-color:var(--border)}
header strong{display:flex;align-items:center;gap:10px;font-size:18px}
.brand-mark{display:grid;place-items:center;background:var(--accent);color:white;width:42px;height:36px;border-radius:6px;font-size:16px}
header nav{display:flex;gap:8px;flex-wrap:wrap}
main{max-width:1288px;padding:30px 24px}h1{font-size:26px;line-height:1.4;overflow-wrap:anywhere}
button,.button{border-color:var(--border);font-size:13px;min-height:38px;transition:background .15s}
button:hover,.button:hover{background:#eaf4f0}.primary{background:var(--accent);border-color:var(--accent)}.primary:hover{background:#06665f}
.toolbar{gap:8px;margin:14px 0}.toolbar select,.toolbar input{border-color:var(--border);font-size:13px;min-height:38px}
#albumSelect{flex:1;max-width:420px}#search{border-top:1px solid var(--border);padding:18px 0 8px}#search>label{font-size:12px;color:var(--muted)}
.gallery-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}
#photoTabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-right:auto}
#photoTabs button{border:0;border-bottom:2px solid transparent;background:transparent;border-radius:0;padding:10px 16px}
#photoTabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent);font-weight:700}
#eventSearchLabel{font-size:13px;color:var(--muted);flex:1;max-width:420px;white-space:nowrap}
#eventSearch{width:100%;min-width:0;border:1px solid var(--border);border-radius:6px;padding:9px 12px;background:white}
#status{font-size:12px;color:var(--muted);margin:16px 0}.grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}
.album{border-color:var(--border);border-radius:8px;box-shadow:0 2px 8px #18292505}.album:hover{background:white;border-color:var(--accent)}
.album span{font-size:14px;font-weight:700;padding:12px 14px}.album small{font-size:11px;font-weight:400;color:var(--muted)}
.album .placeholder{background:#e5f2ef;color:var(--accent)}
.photo img{aspect-ratio:4/3;border-radius:6px}.photo figcaption{font-size:11px;color:var(--muted)}.photo figcaption span{flex:1;min-width:0}
.photo a{color:var(--accent)}.photo-actions{display:flex;gap:8px;align-items:center}.photo-actions button{min-height:26px;padding:2px 6px;font-size:11px}
.operator{border-color:var(--border);padding-top:24px}.operator h2{font-size:16px}.operator .toolbar input{flex:1;max-width:440px}
#preview{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#fff;color:#182925;overflow:hidden}
#preview[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
body:has(#preview[open]){overflow:hidden}
.viewer-topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top));border-bottom:1px solid #ddd;background:white}.viewer-actions{display:flex;gap:8px}
#preview .viewer-topbar button,#preview .viewer-topbar .button{display:inline-flex;align-items:center;gap:6px;background:#fa9c45;color:#202124;border-color:#fa9c45;font-size:12px;min-height:32px;padding:5px 10px}
#preview svg,#preview [data-lucide]{width:18px;height:18px;flex:0 0 18px}.viewer-stage{position:relative;min-height:0;background:#101917;overflow:hidden}
#preview .viewer-stage>img{display:block;width:100%;height:100%;max-height:none;max-width:none;object-fit:contain}
#preview .viewer-arrow{position:absolute;top:50%;transform:translateY(-50%);width:42px;height:60px;padding:0;border:0;border-radius:0;background:#0005;color:#ffae5d;display:grid;place-items:center}
#preview .viewer-arrow:hover{background:#0009}#preview .viewer-arrow svg{width:34px;height:34px}.viewer-arrow.previous{left:0}.viewer-arrow.next{right:0}
#viewerQr{position:absolute;right:16px;top:16px;width:184px;max-width:30%;padding:4px;background:white;border-radius:4px}#viewerQrCanvas{display:block;width:100%;height:auto}#viewerQrStatus{font-size:11px;color:#b02a37;margin:0;overflow-wrap:anywhere}
.viewer-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 12px;padding-bottom:max(6px,env(safe-area-inset-bottom));font-size:12px;min-width:0}.viewer-caption #photoFilename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.viewer-caption #viewerStatus{color:#087f79;font-size:11px}
@media(max-width:600px){.viewer-topbar{padding:6px;gap:4px}.viewer-actions{gap:4px}#preview .viewer-topbar button,#preview .viewer-topbar .button{font-size:11px;gap:4px;padding:6px}#preview .viewer-arrow{width:32px;height:48px}#viewerQr{right:8px;top:8px;width:120px;max-width:32%}.viewer-caption{font-size:11px;gap:6px}}
#photoPosition{min-width:65px;text-align:center;font-size:12px}dialog{border-color:var(--border)}
@media(max-width:600px){header{padding:14px 16px;flex-direction:row;align-items:center;flex-wrap:wrap}header strong{font-size:16px}header nav{width:100%}main{padding:22px 16px}h1{font-size:23px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.album span{font-size:12px;padding:10px}.album small{font-size:10px}#albumSelect{max-width:none;flex-basis:100%;order:-1}.gallery-controls{gap:8px}#eventSearchLabel{max-width:none}#photoTabs{width:100%}#search .toolbar>label{width:100%;justify-content:flex-start}.photo figcaption{font-size:10px}.photo-actions{width:100%;justify-content:space-between}#preview .toolbar button{flex-grow:0}#preview>img{height:60vh}}
body{background:#f5f6f7;font:16px/1.6 Inter,'Noto Sans Thai',Arial,Tahoma,sans-serif;letter-spacing:0}
header{min-height:80px;padding:18px max(24px,calc((100% - 1360px)/2));box-shadow:0 1px 0 #00003}
header strong{font-size:22px;flex-wrap:wrap}.brand-mark{width:44px;height:44px;background:#202426;border-radius:6px}.brand-detail{font-size:10px;color:var(--muted);border-left:1px solid var(--border);padding-left:12px}
header .button,header button{font-size:14px;min-height:42px}main{max-width:1408px;padding:42px 24px 24px}
.gallery-heading{border-bottom:0;padding:0 0 26px;align-items:flex-end}.gallery-heading h1{font-size:34px;font-weight:700}.gallery-heading p{font-size:14px;margin-top:8px}.gallery-count{background:#e6ebe9;color:#286557;padding:6px 12px;border-radius:4px;font-size:14px}
main>.toolbar{border-top:1px solid var(--border);padding:20px 0 0;margin:0}.gallery-controls{margin-top:12px;border-bottom:1px solid var(--border);padding-bottom:20px}
button,.button{font-size:14px;min-height:42px;padding:9px 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px}button svg,.button svg{width:18px;height:18px;flex-shrink:0}
input,select{font:inherit;border:1px solid var(--border);border-radius:6px;background:#fff;color:var(--ink);padding:10px 12px;max-width:100%;min-width:0}.toolbar input,.toolbar select{font-size:14px;min-height:42px}#albumSelect{max-width:360px}#eventSearchLabel{font-size:14px;max-width:500px}#status{font-size:14px;margin:20px 0;min-height:0}
.grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px}.album{display:block;background:#fff;border:1px solid var(--border);box-shadow:0 3px 10px #20242606;transition:transform .2s,box-shadow .2s}.album:hover{transform:translateY(-3px);box-shadow:0 8px 20px #2024260c}.album img,.album .placeholder{aspect-ratio:3/2}.album span{font-size:17px;line-height:1.5;padding:18px 20px}.album small{display:inline-block;font-size:13px;margin-top:8px}.album .placeholder{background:#e9ebed;color:#8c959d;font-size:44px}
.gallery-empty{min-height:380px;border:0;background:#eef0f2;border-radius:8px;padding:32px}.gallery-empty svg{width:64px;height:64px;color:#89949d}.gallery-empty strong{font-size:22px}.gallery-empty p{font-size:15px}.gallery-empty a{background:var(--ink);color:#fff;padding:10px 18px;border-radius:6px;text-decoration:none;font-size:14px}
.gallery-footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--border);margin-top:48px;padding:22px 0;font-size:13px;color:var(--muted)}.gallery-footer a{color:var(--muted);text-decoration:none}.photo figcaption{font-size:12px}.photo img{background:#e9ebed}#search{background:#fff;border:1px solid var(--border);border-radius:6px;padding:20px;margin-top:20px}#search>label{font-size:14px}
.section-tag{display:block;font-size:11px;font-weight:700;color:#bc4d56;margin-bottom:12px}.customer-login{max-width:460px;margin:64px auto}.customer-login h1{font-size:32px}.customer-login form{margin-top:32px;display:grid;gap:20px}.customer-login label{display:grid;gap:8px;font-size:14px}.customer-login button{width:100%;min-height:48px}.customer-login input{min-height:48px}
.album .placeholder svg{width:44px;height:44px}
.gallery-page{--ink:#173e32;--muted:#667b70;--border:#d7e7de;background:#fff;color:var(--ink)}
.gallery-page header{background:#fff;border-bottom:1px solid #d7e7de;gap:24px}
.gallery-brand-link{color:var(--ink);text-decoration:none;min-width:0}
.gallery-page header strong{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:20px;line-height:1.4}
.gallery-page .brand-mark{background:#174d3b;color:#fff;border-radius:5px}
#galleryBrand{overflow-wrap:anywhere;max-width:420px}
.gallery-page .brand-detail{color:#658476;font-size:10px;border:0}
.gallery-page header nav{display:flex;gap:8px;flex-wrap:wrap}
.gallery-page button,.gallery-page .button{border-color:#d6e6dd;color:var(--ink);font-size:14px;border-radius:6px}
.gallery-page button:hover,.gallery-page .button:hover{background:#e4f6ec}
.gallery-page .primary{background:#184f3c;color:#fff;border-color:#184f3c}
.gallery-page main{max-width:1224px;padding:38px 32px 0;min-height:calc(100svh - 90px)}
.gallery-page .gallery-heading{border:0;border-left:4px solid #eb7893;padding:25px 28px;margin-bottom:24px;background:#eef9f2;align-items:center}
.gallery-eyebrow{font-size:10px;font-weight:700;color:#32735b;display:block;margin-bottom:9px}
.gallery-page .gallery-heading h1{font-size:32px;line-height:1.35;overflow-wrap:anywhere}
.gallery-page .gallery-heading p{font-size:14px;margin-top:10px}
.gallery-page .gallery-count{background:#ffdce5;color:#753047;padding:9px 14px;border-radius:5px;white-space:nowrap}
.gallery-page .toolbar{gap:10px;flex-wrap:wrap}
.gallery-page .gallery-controls{padding:16px 0 20px;border-bottom:1px solid #dcebe2;gap:12px;flex-wrap:wrap}
.gallery-page #eventSearchLabel{font-size:13px}
.gallery-page input,.gallery-page select{border-color:#d6e6dd;border-radius:5px;font-size:14px;min-height:42px}
.gallery-page .grid{gap:22px}
.gallery-page .album{border:1px solid #dcebe2;background:#fff;border-radius:8px;box-shadow:none;overflow:hidden;text-align:left;transition:border-color .18s}
.gallery-page .album:hover{border-color:#4c9d79}
.gallery-page .album>span{font-size:17px;color:#204735;padding:18px;overflow-wrap:anywhere}
.gallery-page .album small{font-size:12px;color:#6a8073}
.gallery-page .album .placeholder{background:#eaf5ee;color:#658876}
.gallery-page .gallery-empty{background:#f3faf6;border-radius:0;border-top:1px solid #dcebe2;min-height:290px;margin-top:12px}
.gallery-page .gallery-empty svg{color:#3d9676;width:56px;height:56px}
.gallery-page .gallery-empty strong{color:#234d3b;font-size:23px}
.gallery-page .gallery-empty a{background:#f17c96;color:#263d30;font-weight:600}
.gallery-page .gallery-footer{padding:28px 0 32px;border-top:2px solid #b8e8cf;align-items:center;margin-top:44px}
.gallery-footer>div{display:grid;gap:7px;min-width:0}
.gallery-footer strong{color:#184b37;font-size:16px;overflow-wrap:anywhere}
.gallery-footer>div>span{font-size:11px;color:#708578}
.gallery-footer nav{display:flex;gap:22px;flex-wrap:wrap}
.gallery-page #search{background:#f0f9f4;border-color:#d4e9db}
@media(max-width:760px){.gallery-page header{align-items:flex-start;padding:18px 16px;flex-wrap:wrap}.gallery-page header strong{font-size:17px}.gallery-page header nav{width:100%}.gallery-page header nav .button,.gallery-page header nav button{font-size:12px;flex:1;padding:9px 8px}.gallery-page main{padding:22px 16px 0}.gallery-page .gallery-heading{padding:20px 16px;gap:12px;flex-wrap:wrap}.gallery-page .gallery-heading h1{font-size:26px}.gallery-subtitle{display:block;margin-top:4px}.gallery-page .gallery-count{font-size:12px}.gallery-page .grid{gap:12px}.gallery-page .album>span{font-size:14px;padding:12px}.gallery-page .gallery-footer{flex-direction:column;align-items:flex-start;gap:22px}.gallery-footer nav{gap:18px}.gallery-page .gallery-empty{min-height:260px}.gallery-page .gallery-controls{align-items:stretch}.gallery-page #eventSearchLabel{flex:1;min-width:0}.gallery-page #eventSearch{width:100%;min-width:0}}
.customer-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:24px 0;margin-bottom:32px;gap:20px}.customer-stats section{border-right:1px solid var(--border);padding-right:20px;min-width:0}.customer-stats section:last-child{border:0}.customer-stats span{display:block;font-size:13px;color:var(--muted)}.customer-stats strong{display:block;font-size:19px;margin-top:6px;overflow-wrap:anywhere}.workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.workspace-heading form{display:flex;gap:8px;min-width:0}.workspace-heading h2{font-size:22px;flex-shrink:0}.workspace-heading input{width:240px}.customer-project{border:1px solid var(--border);border-radius:8px;overflow:hidden;background:#fff}.customer-project>img,.project-placeholder{width:100%;aspect-ratio:3/2;object-fit:cover;display:block}.project-placeholder{display:grid;place-items:center;background:#e9ebed;color:#929ba1}.project-placeholder svg{width:48px;height:48px}.project-content{padding:18px}.project-content h3{font-size:17px;margin:0;overflow-wrap:anywhere}.project-content p{font-size:13px;color:var(--muted);margin:6px 0 18px}.project-actions{display:flex;gap:6px;flex-wrap:wrap}.project-actions button{width:38px;min-height:38px;padding:8px}.project-actions .button{font-size:13px;min-height:38px;padding:8px 12px;margin-right:auto}.customer-empty{grid-column:1/-1;padding:64px;text-align:center;background:#eceef0;border-radius:6px;color:var(--muted)}#projectSettings{width:580px}#albumSettings{display:grid;gap:18px;margin-top:24px}#albumSettings label{display:grid;gap:6px;font-size:14px}#albumSettings .face-switch{display:flex;align-items:center;gap:10px}#globalFaceNotice,#settingsStatus{font-size:13px;color:var(--muted);margin:0}#customerStatus{font-size:14px;color:#a03944;overflow-wrap:anywhere}
@media(max-width:760px){header{padding:16px;gap:12px}header strong{font-size:20px}.brand-detail{display:none}header nav{width:auto;flex-wrap:wrap}header .button,header button{font-size:12px;padding:8px 10px}main{padding:28px 16px}.gallery-heading h1{font-size:28px}.gallery-heading{gap:14px;align-items:flex-start}.gallery-count{font-size:12px;flex-shrink:0}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.album span{font-size:14px;padding:12px}.album small{font-size:11px}.gallery-empty{min-height:300px;padding:24px}.gallery-empty strong{font-size:19px}.gallery-footer{font-size:12px;margin-top:32px}.customer-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.customer-stats section:nth-child(2){border:0}.customer-stats strong{font-size:16px}.workspace-heading{align-items:flex-start;flex-direction:column}.workspace-heading form{width:100%;flex-wrap:wrap}.workspace-heading input{flex:1;min-width:160px}.project-actions .button{width:100%}.customer-login{margin:36px auto}.customer-login h1{font-size:28px}.customer-main .gallery-heading{flex-direction:column}.project-content{padding:12px}.project-content h3{font-size:14px}}
.face-readiness{margin:.45rem 0 0;color:#8fa8c7;font-size:.82rem;line-height:1.5}.face-readiness.error{color:#ff9b9b}
