:root{--bg:#FFFFFF;--surface:#FFFFFF;--surface-2:#EDF7FD;--rail:#F7FBFE;--rail-text:#15294A;--rail-muted:#526A82;--text:#15294A;--muted:#526A82;--border:#C9DFEE;--accent:#2B6D99;--accent-fill:#89CFF0;--accent-ink:#15294A;--brand-color:#2B6D99;--rail-brand-color:#2B6D99;--radius:7px;--font-display:'Fraunces',Georgia,serif;--font-body:'Manrope',Inter,system-ui,sans-serif}
body{background:var(--bg);color:var(--text);font-family:var(--font-body)}
button,input,select,textarea{font-family:var(--font-body)}
.brand-icon{width:42px;height:42px;object-fit:contain;flex:0 0 auto}
.wordmark-text{font-family:var(--font-display);font-style:normal!important;font-weight:600!important}
.theme-launcher{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:7px;padding:10px 14px;background:var(--surface);color:var(--text);font:600 13px var(--font-body);cursor:pointer;white-space:nowrap}
.theme-launcher:before{content:'';display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-radius:50%;background:linear-gradient(90deg,var(--accent) 50%,transparent 50%)}
.theme-launcher:hover{border-color:var(--accent)}
.theme-floating{position:fixed;bottom:20px;right:20px;z-index:300}
.lensentra-theme-dialog{width:min(860px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:30px;border:1px solid var(--border);border-radius:14px;background:var(--bg);color:var(--text);box-sizing:border-box;overflow-y:auto;z-index:1000}
.lensentra-theme-dialog::backdrop{background:#071222b3;backdrop-filter:blur(5px)}
.theme-dialog-heading{display:flex;justify-content:space-between;gap:20px;margin-bottom:24px}
.theme-dialog-heading h2{font:500 32px/1.2 var(--font-display);margin:6px 0 9px}
.theme-dialog-heading p{color:var(--muted);font-size:13px;margin:0;line-height:1.6}
.theme-dialog-heading .theme-eyebrow{font:700 10px var(--font-body);letter-spacing:.18em;color:var(--accent)}
.theme-close{align-self:flex-start;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:50%;width:34px;height:34px;font-size:23px;cursor:pointer}
.theme-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.theme-choice{border:1px solid var(--border);border-radius:9px;padding:8px;background:var(--surface);color:var(--text);text-align:left;cursor:pointer;min-width:0;transition:border-color .15s,box-shadow .15s}
.theme-choice[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.theme-choice strong{display:block;font:700 11px var(--font-body);margin:10px 1px 5px}
.theme-choice small{display:block;font:400 10px/1.5 var(--font-body);color:var(--muted);min-height:30px}
.theme-preview{display:flex;height:82px;background:var(--preview-bg);border-radius:5px;overflow:hidden}
.theme-preview>i{width:23%;background:var(--preview-rail)}
.theme-preview>span{flex:1;padding:12px 10px;display:flex;gap:5px;flex-wrap:wrap;align-content:flex-start}
.theme-preview b{height:5px;width:80%;background:var(--preview-accent);border-radius:3px;margin-bottom:7px}
.theme-preview em{height:25px;width:40%;background:var(--preview-accent);opacity:.32;border-radius:2px}
.theme-selection-status{font-size:12px;color:var(--muted);min-height:18px;margin:20px 0 0}
.lensentra-theme-dialog :focus-visible,.theme-launcher:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
/* Shared public-site and sign-in surfaces follow the same palette as the workspace. */
header.nav{background:var(--rail);border-bottom:1px solid var(--border)}
header.nav .theme-launcher{background:transparent;color:var(--rail-text);border-color:#ffffff30}
.auth-card,.auth-panel,.modal-card,.auth-box{background:var(--surface);color:var(--text);border-color:var(--border)}
.btn,.auth-card button{border-radius:7px}
.site-watermark{position:absolute;right:-8%;top:10%;width:50%;opacity:.045;pointer-events:none}
@media(max-width:760px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.lensentra-theme-dialog{padding:22px}.theme-dialog-heading h2{font-size:27px}.theme-preview{height:72px}.theme-choice strong{font-size:12px}.theme-choice small{font-size:11px;min-height:18px}}
@media(prefers-reduced-motion:reduce){.theme-choice{transition:none}}

@media(max-width:760px){header.nav .nav-inner{height:auto;min-height:65px;padding-top:13px;padding-bottom:13px;flex-wrap:wrap;gap:10px}header.nav .nav-actions{width:100%;justify-content:space-between}header.nav .theme-launcher{font-size:11px;padding:8px 10px}header.nav .btn.sm{padding:8px 12px}}

.brand-icon,.brand-mark{display:inline-block;flex:0 0 auto;background:var(--brand-color);mask:url('/assets/lensentra-icon.svg') center/contain no-repeat;-webkit-mask:url('/assets/lensentra-icon.svg') center/contain no-repeat}
header.nav .brand-icon,#topbar .brand-icon,.rail .brand-icon{background:var(--rail-brand-color)}
.btn:not(.ghost):not(.outline),.welcome-btn:not(.secondary),.lgw-root .button.primary,.c-ok.save,.calendar-day.selected{background:var(--accent-fill,var(--accent));color:var(--accent-ink);border-color:var(--accent)}
.lgw-root .photo-card.selected .selection-badge{background:var(--accent-fill,var(--accent));border-color:var(--accent);color:var(--accent-ink)}
.site-settings{position:relative;color:var(--rail-text);font:600 12px var(--font-body)}
.site-settings summary{list-style:none;cursor:pointer;padding:10px 14px;border:1px solid currentColor;border-radius:7px}
.site-settings summary::-webkit-details-marker{display:none}
.site-settings>div{position:absolute;right:0;top:calc(100% + 8px);z-index:250;padding:6px;background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 40px #0002;min-width:160px}
.site-settings .theme-launcher{width:100%;color:var(--text);background:var(--surface);border:0;justify-content:flex-start}
.settings-floating{position:fixed;bottom:20px;right:20px;z-index:300;color:var(--text);background:var(--surface);border-radius:7px}
.settings-floating>div{top:auto;bottom:calc(100% + 8px)}
.lensentra-password-dialog{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:26px;font-family:var(--font-body)}
.lensentra-password-dialog::backdrop{background:#071222a6;backdrop-filter:blur(4px)}
.password-heading{display:flex;gap:16px;align-items:center;justify-content:space-between}
.password-heading h2{font:500 29px var(--font-display);margin:0}
.password-heading>button{border:0;background:var(--surface-2);color:var(--text);border-radius:50%;width:32px;height:32px;font-size:23px;cursor:pointer}
.password-copy{font-size:12px;color:var(--muted);line-height:1.7}
.lensentra-password-dialog form{display:grid;gap:8px}
.lensentra-password-dialog label{font-size:12px;font-weight:600}
.lensentra-password-dialog input{width:100%;border:1px solid var(--border);border-radius:6px;padding:11px;background:var(--bg);color:var(--text);font-size:14px}
.password-rules{margin:2px 0 12px;padding:0;list-style:none;font-size:11px;line-height:1.8;color:var(--muted)}
.password-rules [data-met=true]{color:var(--ok)}
.password-status{font-size:12px;line-height:1.6;min-height:19px;color:var(--text)}
.password-status[data-error=true]{color:var(--danger)}
.password-actions{display:flex;justify-content:flex-end;gap:9px}
.password-actions>button{padding:10px 14px;border:1px solid var(--border);border-radius:6px;cursor:pointer;background:var(--surface);color:var(--text)}
.password-actions [type=submit]{background:var(--accent-fill,var(--accent));color:var(--accent-ink);border-color:var(--accent)}

header.nav .site-settings .theme-launcher{background:var(--surface);color:var(--text);border:0}

body .manage-btn{background:var(--accent-fill,var(--accent));color:var(--accent-ink)}

/* Field-only tokens: Default colors are explicit; Custom uses the saved palette. */
:root{--field-bg:#FFFFFF;--field-border:#C9D6E3;--field-focus:#14233A;--field-placeholder:#6B7785}
:root[data-theme-mode=dark]{--field-bg:var(--surface,#1C304A);--field-border:var(--border,#3E5872);--field-focus:var(--text,#F5F9FC);--field-placeholder:var(--muted,#ADCAE0)}
:root[data-theme=custom]{--field-bg:var(--surface);--field-border:color-mix(in srgb,var(--text) 24%,var(--surface));--field-focus:var(--text);--field-placeholder:color-mix(in srgb,var(--text) 68%,var(--surface))}
:root[data-theme=custom][data-theme-mode=dark]{--field-bg:color-mix(in srgb,var(--bg) 90%,var(--text))}
html :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=submit],[type=reset],[type=image]),select,textarea){background-color:var(--field-bg)!important;color:var(--text,#14233A)!important;border:1px solid var(--field-border)!important}
html :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=submit],[type=reset],[type=image]),select,textarea)::placeholder{color:var(--field-placeholder)!important;opacity:1!important}
html :is(input:not([type=hidden],[type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=submit],[type=reset],[type=image]),select,textarea):focus{border-color:var(--field-focus)!important;outline:2px solid var(--field-focus)!important;outline-offset:2px!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--field-focus) 18%,transparent)!important}
/* Gallery search is a single composite field with an icon, not two nested boxes. */
html .lgw-root .controls .search{background-color:var(--field-bg)!important;border:1px solid var(--field-border)!important}
html .lgw-root .controls .search:focus-within{border-color:var(--field-focus)!important;outline:2px solid var(--field-focus)!important;outline-offset:2px!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--field-focus) 18%,transparent)!important}
html .lgw-root .controls .search input{background-color:transparent!important;border:0!important;outline:0!important;box-shadow:none!important}
