:root {
  color-scheme: light;
  --ink: #25332b;
  --muted: #858f88;
  --line: #e7ebe5;
  --paper: #f7f8f5;
  --green: #426650;
  --green-dark: #31533e;
  --mint: #eaf0e9;
  --peach: #f8eee8;
  --orange: #c77c5d;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: #fff; }
body { margin: 0; color: var(--ink); background: #fff; font: 14px/1.5 var(--sans); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #9bb9a1; outline-offset: 2px; }
[hidden] { display: none !important; }
.topbar { height: 68px; padding: 0 max(24px, calc((100vw - 1320px) / 2)); display: flex; align-items: center; gap: 18px; background: #fff; border-bottom: 1px solid #eff1ed; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #26352d; text-decoration: none; font-size: 19px; font-weight: 700; letter-spacing: -.7px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--green); color: white; font: 19px var(--serif); }
.topbar-note { margin-left: auto; color: #9aa39c; font-size: 10px; font-weight: 700; letter-spacing: 1.15px; }
.logout-button { margin-left: 0; }
.page { width: min(1320px, 100%); margin: 0 auto; padding: 42px 34px 72px; }
.login-card { width: min(420px, 100%); margin: 7vh auto; padding: 37px; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 16px 45px #2336290a; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.7px; }
.login-card h1 { margin-bottom: 7px; font-size: 32px; }
.muted { color: var(--muted); }
.login-card .muted { margin-bottom: 26px; font-size: 13px; }
.eyebrow { margin-bottom: 8px; color: #89968c; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.field-label { display: block; margin: 16px 0 7px; color: #4c5b51; font-size: 11px; font-weight: 650; }
.field-label span { color: #9ba39d; font-weight: 400; }
input { min-width: 0; width: 100%; border: 1px solid #dfe5de; border-radius: 7px; padding: 10px 11px; background: #fff; color: var(--ink); }
input::placeholder { color: #a9b0ab; }
.button { min-height: 39px; border: 1px solid transparent; border-radius: 7px; padding: 9px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 12px; font-weight: 650; text-decoration: none; transition: background .15s, border .15s; }
.button.primary { color: #fff; background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.quiet { border-color: var(--line); color: #5f6e63; background: #fff; }
.button.quiet:hover { background: var(--paper); }
.button.danger { border-color: #f0ded7; color: #a7634b; background: #fff9f6; }
.button.danger:hover { background: #f8eee8; }
.full-width { width: 100%; margin-top: 22px; }
.form-error { min-height: 18px; margin: 10px 0 0; color: #aa5147; font-size: 12px; }
.welcome-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 0 24px; }
.welcome-row h1 { margin: 0; font-size: 34px; }
.welcome-row p { margin: 8px 0 0; font-size: 13px; }
.storage-badge { display: flex; align-items: center; gap: 8px; color: #67806d; font-size: 11px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #72a27d; box-shadow: 0 0 0 3px #edf4ee; }
.storage-settings { margin: 0 0 17px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr); align-items: center; gap: 22px; border: 1px solid #e3e9e2; border-radius: 9px; background: #fafcf9; }
.storage-settings-copy h2 { margin: 0 0 4px; font-size: 20px; }
.storage-settings-copy p { margin: 0 0 5px; color: #707d73; font-size: 11px; }
.storage-settings-copy code { padding: 2px 5px; border-radius: 4px; color: #426650; background: #edf2ec; overflow-wrap: anywhere; }
.storage-settings-copy small, #storage-settings-form small { display: block; color: #99a29a; font-size: 9px; line-height: 1.5; }
#storage-settings-form .field-label { margin: 0 0 6px; }
#storage-settings-form input { padding: 8px 10px; font-size: 11px; }
#storage-settings-form .button { min-height: 34px; margin-top: 9px; }
#storage-settings-form .form-error { min-height: 0; margin: 4px 0 0; }
.stats-row { display: flex; gap: 12px; margin-bottom: 23px; }
.stat-card { min-width: 195px; padding: 13px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #54745d; background: var(--mint); font-size: 16px; }
.stat-icon.peach { color: var(--orange); background: var(--peach); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { margin-bottom: 1px; color: #929c94; font-size: 10px; }
.stat-card strong { font-size: 18px; font-weight: 600; line-height: 1.2; }
.workspace { min-height: 500px; display: grid; grid-template-columns: 300px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.gallery-sidebar { padding: 21px 18px; border-right: 1px solid var(--line); background: #fbfcfa; }
.create-form { padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.form-heading { display: flex; align-items: center; justify-content: space-between; }
.form-heading .eyebrow { margin-bottom: 3px; }
.form-heading h2 { margin: 0; font-size: 20px; }
.plus-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--mint); font-size: 20px; }
.create-form .field-label { margin-top: 12px; }
.create-form input { padding: 9px 10px; font-size: 12px; }
.create-form .button { margin-top: 16px; }
.create-form .form-error { margin-bottom: -8px; }
.list-heading { margin: 19px 2px 8px; display: flex; justify-content: space-between; color: #97a098; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.list-heading span:last-child { font-weight: 500; letter-spacing: 0; }
.gallery-list { display: grid; gap: 4px; }
.gallery-list button { width: 100%; min-height: 53px; padding: 8px 9px; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 9px; text-align: left; color: #5f6b62; background: transparent; }
.gallery-list button:hover, .gallery-list button.selected { color: #314c39; background: #edf2ec; }
.gallery-list .gallery-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #7d9a80; }
.gallery-list .gallery-dot.off { background: #c4c9c3; }
.gallery-list .gallery-list-copy { min-width: 0; flex: 1; }
.gallery-list strong, .gallery-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-list strong { font-size: 11px; font-weight: 650; }
.gallery-list small { margin-top: 2px; color: #9ba39c; font-size: 9px; }
.gallery-list .gallery-number { color: #8d978f; font-size: 10px; }
.sidebar-empty { padding: 5px 2px; color: #a0a8a1; font-size: 11px; line-height: 1.6; }
.gallery-panel { min-width: 0; padding: 27px 29px 32px; background: #fff; }
.empty-state { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 50px; height: 50px; margin-bottom: 16px; display: grid; place-items: center; border: 1px solid #e6ebe5; border-radius: 15px; color: #739079; background: #f7f9f6; font-size: 23px; }
.empty-state h2 { margin-bottom: 5px; font-size: 23px; }
.empty-state p { max-width: 330px; margin: 0; color: #929b94; font-size: 12px; }
.gallery-heading { display: flex; justify-content: space-between; align-items: start; gap: 17px; margin-bottom: 19px; }
.gallery-heading h2 { margin: 0; font-size: 27px; overflow-wrap: anywhere; }
.gallery-heading .eyebrow { margin-bottom: 4px; }
.gallery-heading .muted { margin: 5px 0 0; font-size: 11px; }
.expiry-field { width: 155px; flex: none; color: #849087; font-size: 9px; }
.expiry-field input { margin-top: 5px; padding: 7px 8px; font-size: 10px; }
.gallery-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 7px; }
.gallery-actions .button { min-height: 35px; padding: 7px 9px; font-size: 10px; }
.share-panel { margin: -2px 0 16px; padding: 14px; border: 1px solid #dce8dc; border-radius: 8px; background: #f6faf5; }
.share-panel strong { font-size: 12px; }
.share-panel p { margin: 3px 0 9px; color: #78867a; font-size: 10px; }
.share-copy-row { display: flex; gap: 7px; }
.share-copy-row input { font-size: 11px; }
.share-copy-row .button { flex: none; }
.upload-zone { min-height: 133px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #9bb39d; border-radius: 8px; color: #456650; background: #fafcf9; text-align: center; transition: background .15s, border .15s; }
.upload-zone.dragover { border-color: #426650; background: #eef5ee; }
.upload-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { width: 28px; height: 28px; margin-bottom: 6px; display: grid; place-items: center; border-radius: 8px; color: #477052; background: #e9f0e8; font-size: 19px; }
.upload-zone strong { font-size: 12px; }
.upload-zone small { margin-top: 4px; color: #98a199; font-size: 9px; }
.photo-heading { margin: 21px 0 12px; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.photo-heading h3 { margin: 0; font: 20px var(--serif); }
.photo-heading .muted { margin: 3px 0 0; font-size: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.admin-photo { min-width: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.admin-photo .photo-preview { width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; color: #99a299; background: #eef1ed; }
.admin-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-photo .file-mark { font-size: 28px; }
.admin-photo .photo-name { padding: 7px 8px 8px; overflow: hidden; color: #667268; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-photo .delete-photo { position: absolute; top: 6px; right: 6px; width: 29px; height: 29px; border: 1px solid #ffffffbb; border-radius: 50%; color: #8b584a; background: #ffffffed; font-size: 17px; }
.photo-empty { padding: 20px 14px; border: 1px dashed #e0e6df; border-radius: 8px; color: #969f98; font-size: 11px; text-align: center; }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 25px; max-width: calc(100% - 32px); padding: 10px 15px; border-radius: 8px; color: white; background: #26372c; font-size: 11px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.customer-page { background: #fff; }
.customer-topbar { padding-right: max(24px, calc((100vw - 1260px) / 2)); padding-left: max(24px, calc((100vw - 1260px) / 2)); }
.customer-main { width: min(1260px, 100%); margin: 0 auto; padding: 0 34px 36px; }
.customer-message { max-width: 530px; margin: 15vh auto; text-align: center; }
.customer-message h1 { margin-bottom: 8px; font-size: 32px; }
.customer-message p { font-size: 13px; }
.customer-hero { padding: 55px 0 30px; }
.customer-hero .eyebrow { margin-bottom: 10px; }
.customer-hero h1 { max-width: 850px; margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; overflow-wrap: anywhere; }
.customer-hero .muted { margin: 12px 0 15px; font-size: 13px; }
.customer-meta { display: flex; gap: 9px; align-items: center; color: #818c83; font-size: 11px; }
.meta-separator { color: #c2c9c2; }
.customer-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.customer-photo { min-width: 0; overflow: hidden; border: 1px solid #e8ebe6; border-radius: 8px; background: #fff; }
.customer-photo-preview { aspect-ratio: 4 / 3; position: relative; overflow: hidden; display: grid; place-items: center; color: #859187; background: #f0f2ef; }
.customer-photo-preview img { width: 100%; height: 100%; display: block; object-fit: cover; cursor: zoom-in; }
.customer-photo-preview .file-mark { font-size: 30px; }
.download-photo { position: absolute; right: 9px; bottom: 9px; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 6px; display: flex; align-items: center; gap: 6px; color: #34483a; background: #fffffff0; box-shadow: 0 2px 9px #17261d18; font-size: 10px; font-weight: 650; text-decoration: none; }
.download-photo:hover { background: #fff; }
.customer-photo-name { padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #69756c; }
.customer-photo-name span:first-child { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-photo-name span:last-child { flex: none; color: #9aa39b; font-size: 9px; }
.customer-footer { padding: 35px 0 12px; color: #a0a8a0; font-size: 10px; text-align: center; }
.customer-footer span { padding: 0 4px; }
.customer-footer strong { color: #617567; }
.lightbox { width: min(1100px, calc(100vw - 26px)); max-width: none; max-height: calc(100dvh - 26px); padding: 0; overflow: hidden; border: 1px solid #e4e8e2; border-radius: 11px; background: #fff; }
.lightbox::backdrop { background: #17231dcc; backdrop-filter: blur(3px); }
.lightbox > img { width: 100%; height: min(76dvh, 850px); display: block; object-fit: contain; background: #17211c; }
.lightbox-close { position: absolute; z-index: 1; top: 10px; right: 12px; width: 36px; height: 36px; border: 1px solid #ffffff80; border-radius: 50%; color: #fff; background: #18221c99; font-size: 25px; line-height: 1; }
.lightbox-footer { min-height: 56px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lightbox-footer span { min-width: 0; overflow: hidden; color: #647168; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .page { padding: 30px 20px 55px; }
  .workspace { grid-template-columns: 260px minmax(0, 1fr); }
  .gallery-sidebar { padding: 17px 14px; }
  .gallery-panel { padding: 23px 20px; }
  .gallery-heading { flex-direction: column; }
  .gallery-actions { justify-content: start; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customer-main { padding: 0 23px 30px; }
  .customer-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 650px) {
  .topbar { height: 58px; padding: 0 16px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 28px; height: 28px; }
  .topbar-note { font-size: 8px; letter-spacing: .7px; }
  .logout-button { min-height: 34px; padding: 6px 9px; font-size: 10px; }
  .page { padding: 25px 14px calc(35px + env(safe-area-inset-bottom)); }
  .login-card { margin: 10vh auto; padding: 25px 20px; }
  .login-card h1 { font-size: 29px; }
  .welcome-row { align-items: start; flex-direction: column; gap: 10px; }
  .welcome-row h1 { font-size: 30px; }
  .welcome-row p { max-width: 36em; font-size: 12px; }
  .storage-badge { font-size: 10px; }
  .storage-settings { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 14px; }
  .stats-row { gap: 8px; }
  .stat-card { min-width: 0; flex: 1; padding: 11px 10px; gap: 8px; }
  .stat-icon { width: 30px; height: 30px; }
  .stat-card small { font-size: 9px; }
  .stat-card strong { font-size: 16px; }
  .workspace { display: flex; flex-direction: column; overflow: visible; border: 0; gap: 12px; }
  .gallery-sidebar { padding: 16px; border: 1px solid var(--line); border-radius: 9px; }
  .gallery-panel { padding: 20px 14px; border: 1px solid var(--line); border-radius: 9px; }
  .empty-state { min-height: 250px; }
  .gallery-heading h2 { font-size: 24px; }
  .expiry-field { width: 100%; }
  .gallery-actions { width: 100%; }
  .gallery-actions .button { flex: 1; }
  .share-copy-row { flex-direction: column; }
  .share-copy-row .button { width: 100%; }
  .upload-zone { min-height: 125px; padding: 12px; }
  .upload-zone strong { font-size: 11px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .toast { bottom: calc(18px + env(safe-area-inset-bottom)); }
  .customer-topbar { padding: 0 16px; }
  .customer-main { padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
  .customer-hero { padding: 37px 0 23px; }
  .customer-hero h1 { font-size: clamp(31px, 9vw, 43px); }
  .customer-hero .muted { line-height: 1.6; }
  .customer-photo-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .customer-photo-preview { aspect-ratio: 4 / 3; }
  .customer-message { margin: 13vh auto; }
  .customer-message h1 { font-size: 28px; }
  .lightbox { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); }
  .lightbox > img { height: min(68dvh, 650px); }
  .lightbox-footer { align-items: stretch; flex-direction: column; }
  .lightbox-footer .button { width: 100%; }
}
