:root{--bg:#050505;--panel:#0d0d0f;--card:#121214;--line:#29292d;--text:#f5f5f6;--muted:#a8a8ae;--red:#d02130;--red-bg:#2a1114}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:13px Inter,Segoe UI,sans-serif}.app-shell{display:flex;min-height:100vh}.sidebar{width:238px;background:var(--panel);border-right:1px solid #252527;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;z-index:3}.brand{height:74px;display:flex;gap:10px;align-items:center;padding:0 23px;font-size:20px;font-weight:700;border-bottom:1px solid #252527}.brand-mark{display:grid;place-items:center;width:28px;height:28px;background:var(--red);border-radius:9px;font-size:15px}nav{padding:12px 0}.nav{border:0;border-left:4px solid transparent;color:#c7c7cb;background:transparent;width:100%;display:flex;gap:15px;align-items:center;text-align:left;padding:12px 18px;font:500 14px inherit;cursor:pointer}.nav:hover{background:#202022;color:white}.nav.active{background:var(--red-bg);color:white;border-left-color:var(--red);font-weight:700}.sidebar-bottom{margin-top:auto;border-top:1px solid #252527;padding:10px 0}.sidebar-bottom p{padding:7px 22px;margin:0;color:#8a8a90;font-size:11px;line-height:1.6}.main{margin-left:238px;width:calc(100% - 238px);min-width:0;padding:0 34px 34px}.topbar{height:52px;margin:0 -34px 30px;padding:0 34px;border-bottom:1px solid #252527;background:#0d0d0f;color:#aaaab0;display:flex;align-items:center;gap:9px;font-size:12px}.top-spacer{flex:1}.avatar{border:0;width:30px;height:30px;border-radius:50%;background:#6a2e37;color:#fff;font-weight:700;cursor:pointer}.page{display:none;max-width:1520px;margin:0 auto}.page.active{display:block}h1{font-size:28px;letter-spacing:-.6px;margin:0 0 6px}h2{font-size:17px;margin:0 0 7px}p{color:var(--muted);margin:0;line-height:1.55}.library-heading,.page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.button,.icon-button,.chip,.text-button,select{border:1px solid #38383d;background:#1b1b1e;color:#ededee;border-radius:9px;font:500 13px inherit;cursor:pointer}.button{display:inline-flex;gap:8px;align-items:center;padding:10px 14px}.button:hover,.icon-button:hover,.chip:hover{background:#28282c}.primary{background:var(--red);border-color:#e22d3c;color:#fff}.primary:hover{background:#e02a39}.icon-button{width:44px;height:42px;display:grid;place-items:center}.search-row{display:flex;gap:10px;margin-bottom:15px}.search{height:44px;flex:1;display:flex;align-items:center;gap:10px;background:#101012;border:1px solid #303035;border-radius:10px;padding:0 12px;color:#9b9ba1}.search:focus-within{border-color:#74747a}.search input{background:transparent;border:0;outline:0;color:white;width:100%;font:14px inherit}.search kbd{font:11px inherit;border:1px solid #3a3a3e;border-radius:5px;padding:2px 5px;color:#9f9fa5}.filter-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:28px}.filter-row>span{flex:1}.chip{padding:7px 12px;border-radius:20px;background:transparent;color:#c9c9ce}.chip b{font-size:11px;padding-left:4px}.chip.selected{background:#2a1114;border-color:#783039;color:#fff}.text-button{border:0;background:transparent;display:inline-flex;align-items:center;gap:2px;color:#c8c8cd;padding:8px}.section-date{border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:15px;font-size:15px;font-weight:600;display:flex;justify-content:space-between}.section-date small{color:var(--muted);font-size:12px;font-weight:400}.gallery{columns:5 190px;column-gap:12px}.media-card{break-inside:avoid;position:relative;margin-bottom:12px;overflow:hidden;border-radius:10px;background:#17171a;cursor:pointer;min-height:110px}.media-card img{width:100%;display:block;transition:transform .25s}.media-card:hover img{transform:scale(1.035)}.media-card:hover .media-overlay{opacity:1}.media-overlay{position:absolute;inset:auto 0 0;padding:28px 11px 10px;background:linear-gradient(transparent,rgba(0,0,0,.8));opacity:0;transition:.2s;font-size:12px}.media-overlay small{display:block;color:#ccc;margin-top:2px}.status{color:#a8a8ae;margin:18px 0;font-size:12px}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#4ba66a;margin-right:7px}.card{background:var(--card);border:1px solid var(--line);border-radius:14px}.notice{display:flex;gap:20px;align-items:center;padding:20px 22px;margin-bottom:30px}.notice>div{flex:1}.people-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:24px}.person{border:0;background:transparent;color:#eee;cursor:pointer;text-align:center;font:inherit}.person img{width:150px;aspect-ratio:1;object-fit:cover;border-radius:50%;border:3px solid #252529;padding:3px}.person span{display:block;font-weight:600;margin-top:10px}.person small{color:var(--muted)}.collection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(265px,1fr));gap:16px}.collection{padding:18px;min-height:174px;cursor:pointer}.collection:hover{border-color:#54545a}.collection-art{display:flex;height:78px;gap:3px;margin-bottom:16px;overflow:hidden;border-radius:8px}.collection-art img{width:33.3%;object-fit:cover}.collection p{font-size:12px}.empty,.vault-lock{text-align:center;max-width:560px;margin:82px auto;padding:38px 24px}.empty>span,.vault-lock>span{font-size:38px;color:#c4c4c9;margin-bottom:10px}.empty h2,.vault-lock h2{font-size:19px}.empty .button,.vault-lock .button{margin-top:20px}.settings-stack{display:grid;gap:16px}.settings-card{min-height:118px;padding:20px 22px;display:flex;align-items:center;gap:28px}.settings-card>div{flex:1}.settings-card select{padding:10px;min-width:210px}.folder-row{margin-top:13px;border:1px solid #29292e;border-radius:8px;padding:9px;display:flex;align-items:center;gap:8px;color:#d7d7db}.folder-row .text-button{margin-left:auto}.check{display:block;margin:13px 0;color:#e8e8ec}.check input{accent-color:var(--red);margin-right:8px}.material-symbols-rounded{font-size:20px;vertical-align:middle}.muted{color:#8f8f95}dialog{border:1px solid #343439;border-radius:15px;background:#111113;color:white;box-shadow:0 20px 70px #000b;padding:0}dialog::backdrop{background:rgba(0,0,0,.78)}#viewer{width:min(96vw,1100px);height:min(92vh,800px);background:#050505;overflow:hidden}#viewer img{width:100%;height:100%;object-fit:contain}.viewer-close,.dialog-close{position:absolute;right:12px;top:8px;z-index:2;border:0;border-radius:50%;background:#25252a;color:#fff;font-size:25px;width:36px;height:36px;cursor:pointer}.viewer-nav{position:absolute;top:50%;transform:translateY(-50%);border:0;background:#16161ace;color:#fff;border-radius:50%;width:45px;height:45px;font-size:33px;cursor:pointer}.previous{left:15px}.next{right:15px}.viewer-caption{position:absolute;bottom:0;left:0;right:0;padding:28px 24px 17px;background:linear-gradient(transparent,#000);display:flex;flex-direction:column;gap:4px}.viewer-caption span{color:#bbb;font-size:12px}#modal{width:min(92vw,440px);padding:28px}#modal h2{font-size:21px;margin:0 0 7px}#modal p{margin-bottom:20px}#modal input{width:100%;background:#09090b;border:1px solid #38383e;border-radius:8px;color:white;padding:11px;font:inherit;margin:8px 0 14px}#toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,100px);background:#eee;color:#111;padding:11px 16px;border-radius:8px;font-weight:600;transition:.25s;z-index:8}#toast.show{transform:translate(-50%,0)}.light{--bg:#f6f6f7;--panel:#fff;--card:#fff;--line:#dedee2;--text:#161618;--muted:#696970;--red-bg:#f9e6e8}.light .topbar{background:#fff}.light .search{background:#fff}.light .media-card{background:#e7e7e9}
@media(max-width:760px){.sidebar{width:64px}.brand{padding:0;justify-content:center}.brand>span:last-child,.nav:not(.active){font-size:0}.nav{justify-content:center;padding:14px 0;border-left-width:3px}.nav .material-symbols-rounded{font-size:23px}.sidebar-bottom p{display:none}.main{margin-left:64px;width:calc(100% - 64px);padding:0 16px 25px}.topbar{margin:0 -16px 22px;padding:0 16px}.library-heading,.page-title{align-items:flex-start;gap:13px}.library-heading .button{font-size:0}.gallery{columns:2 130px;column-gap:8px}.media-card{margin-bottom:8px}.notice,.settings-card{flex-direction:column;align-items:flex-start}.settings-card .button{align-self:flex-end}.filter-row{margin-bottom:18px}.filter-row>span{display:none}.people-grid{grid-template-columns:repeat(2,1fr)}.person img{width:120px}.topbar>span:not(.material-symbols-rounded),.topbar .icon-button{display:none}}

/* Desktop Album fidelity overrides */
.sidebar{width:232px}.brand{height:80px;padding:22px 18px 0;border:0}.brand img{width:34px;height:34px;object-fit:contain}.private-label{color:#b0b0b5;font-size:12px;padding:20px 18px 6px}.sidebar-bottom{border:0}.main{margin-left:232px;width:calc(100% - 232px);padding:22px 28px 14px}.topbar{display:none}.library-search{margin:0}.search{border-radius:8px;padding:0 6px;gap:6px}.bare-icon{display:grid;place-items:center;width:42px;height:40px;border:0;background:transparent;color:#e7e7ea;border-radius:8px;cursor:pointer}.bare-icon:hover{background:#252527}.gallery-switch{width:50px;height:44px}.folder-button{background:#202023;border-color:#37373c}.folder-button:hover{background:#2b2b2f}.gallery{padding-top:4px}.media-card{border-radius:0}.status{margin:8px 0 0}.light .topbar{display:none}#editor{width:100vw;height:100vh;max-width:none;max-height:none;border:0;border-radius:0;background:#050505}#editor[open]{display:grid;grid-template-rows:54px minmax(0,1fr) auto auto;overflow:hidden}.editor-bar,.editor-bottom{height:54px;display:flex;align-items:center;gap:8px;padding:6px 12px;background:#0d0d0f}.editor-bar strong{margin-left:6px}.editor-bar>span,.editor-bottom>span{flex:1}.active-tool{background:#2a1114;color:#fff}.canvas-wrap{height:auto;min-height:0;display:grid;place-items:center;overflow:hidden;background:#080808}.canvas-wrap canvas{max-width:100%;max-height:100%;touch-action:none}.editor-bottom{border-top:1px solid #29292d;color:#bbb}.editor-bottom #zoom-label{flex:0;min-width:45px;text-align:center}.editor-bottom label{display:flex;align-items:center;gap:7px}.editor-bottom input[type=color]{border:0;background:transparent;width:30px;height:28px}.editor-bottom input[type=range]{accent-color:#d02130}
.viewer-edit{position:absolute;right:56px;top:6px;z-index:3}
.viewer-actions{position:absolute;right:58px;top:6px;z-index:3;display:flex;gap:2px}.viewer-edit{position:static}
.library-search{margin-bottom:16px}.square-gallery{columns:unset;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}.square-gallery .media-card{margin:0;aspect-ratio:1}.square-gallery .media-card img{height:100%;object-fit:cover}.line-svg{width:21px;height:21px;display:block}.editor-toolstrip{display:flex;justify-content:center;gap:20px;min-height:106px;padding:12px;background:#101012}.editor-tool{width:82px;border:0;background:transparent;color:#e7e7ea;display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;font:12px Inter}.editor-tool:hover{color:#fff}.editor-tool .line-svg{width:28px;height:28px}.editor-tabs{display:flex;justify-content:center;gap:10px;background:#101012;padding:0 0 8px}.editor-tabs button{border:1px solid #36363b;background:transparent;color:#ddd;border-radius:15px;padding:5px 18px;cursor:pointer}.editor-tabs button.active{background:#2a1114;border-color:#783039}.editor-adjustments{display:none;align-items:center;justify-content:center;gap:18px;min-height:106px;background:#101012;color:#ddd}.editor-adjustments.show{display:flex}.editor-adjustments input{accent-color:#d02130;width:min(45vw,360px)}
#viewer{position:fixed;inset:0;width:100vw;height:100vh;max-width:none;max-height:none;border:0;border-radius:0;background:#050505}#viewer img{height:calc(100vh - 104px);margin-top:52px}.viewer-caption{height:52px;padding:8px 68px;top:0;bottom:auto;background:#0d0d0f;justify-content:center}.viewer-caption span{display:none}.viewer-close{left:12px;right:auto;top:8px;background:transparent}.viewer-actions{top:6px}.viewer-nav{top:50%;background:transparent}.editor-toolstrip{border-top:1px solid #29292d}.editor-markup{min-height:106px;align-items:center;justify-content:center;gap:14px;background:#101012}.editor-markup[hidden]{display:none}.editor-markup input[type=color]{width:34px;height:34px;border:0;background:transparent}.editor-markup input[type=range]{accent-color:#d02130;width:170px}.editor-adjustments{padding:14px 28px;overflow-x:auto;align-items:flex-start}.adjust-card{border:0;background:transparent;color:#e7e7ea;font:12px Inter;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:104px}.adjust-card img{width:82px;height:82px;border-radius:50%;object-fit:cover}.adjust-card input{width:85px}.adjust-card.selected{color:#fff}.editor-tabs button{border:1px solid #3a3a3f;background:transparent;border-radius:18px;padding:6px 20px}.editor-tabs button.active{background:#2a1114;border-color:#d02130;color:#fff}

/* Phone layout mirrors Album's content-first desktop browsing model. */
@media (max-width: 620px){
  body{font-size:14px;padding-bottom:76px}.sidebar{display:none}.main{margin:0;width:100%;padding:16px 14px 22px}.page-title{margin:8px 2px 20px}.page-title h1{font-size:25px}.page-title p{font-size:13px}.library-search{position:sticky;top:0;z-index:4;padding:3px 0 13px;background:linear-gradient(var(--bg) 82%,transparent)}.search{height:48px}.gallery{columns:2 145px;column-gap:6px}.media-card{margin-bottom:6px;border-radius:7px}.media-overlay{display:none}.gallery.square-gallery{grid-template-columns:repeat(2,1fr);gap:6px}.notice,.settings-card{padding:17px;gap:14px}.settings-card{border-radius:12px}.settings-card .button{width:100%;justify-content:center}.folder-row{align-items:flex-start;flex-wrap:wrap}.folder-row .text-button{margin-left:0;width:100%;justify-content:flex-start}.people-grid{gap:20px 10px}.person img{width:min(36vw,140px)}.mobile-nav{position:fixed;z-index:7;inset:auto 0 0;height:68px;padding:6px max(10px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));display:grid;grid-template-columns:repeat(5,1fr);background:rgba(13,13,15,.96);border-top:1px solid #29292d;backdrop-filter:blur(16px)}.mobile-nav button{border:0;background:transparent;color:#a8a8ae;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:10px Inter,sans-serif}.mobile-nav .line-svg,.mobile-nav .material-symbols-rounded{width:21px;height:21px;font-size:21px}.mobile-nav button.active{color:#fff}.mobile-nav button.active .line-svg{color:var(--red)}#viewer{padding:0}.viewer-actions{right:8px}.viewer-actions .bare-icon{width:36px;height:36px}.viewer-nav{display:none}.viewer-caption{padding-right:50px}#editor .editor-bar .button:not(.primary){display:none}.editor-toolstrip{justify-content:flex-start;overflow-x:auto;gap:3px;padding:10px 8px;min-height:90px}.editor-tool{min-width:68px;width:68px}.editor-markup{overflow-x:auto;padding:10px}.editor-adjustments{justify-content:flex-start}}
@media (min-width:621px){.mobile-nav{display:none}}

/* Album desktop editor: the image stays central; tools belong to one compact dock. */
#editor[open]{display:flex;flex-direction:column;overflow:hidden}
.editor-bar{flex:0 0 54px;border-bottom:1px solid #222227}.editor-bar>span{flex:1}
.canvas-wrap{position:relative;flex:1 1 auto;min-height:0;height:auto;background:#050505}
.canvas-wrap canvas{display:block;max-width:100%;max-height:100%;object-fit:contain}
.editor-deck{flex:0 0 auto;background:#101012;border-top:1px solid #29292d}
.editor-toolstrip,.editor-adjustments,.editor-markup,.editor-text{height:158px;min-height:158px;padding:15px 24px;background:#101012}
.editor-toolstrip{display:flex;align-items:center;justify-content:center;gap:18px}
.editor-tool{width:84px;min-width:72px;font-size:12px;line-height:1.15}.editor-tool .material-symbols-rounded{font-size:29px}
.editor-tabs{height:44px;min-height:44px;padding:4px 0 9px;border-top:0}
.editor-adjustments{display:none;align-items:center;justify-content:center}.editor-adjustments.show{display:flex}
#adjust-browser{display:flex;align-items:center;justify-content:center;gap:18px;max-width:100%;overflow-x:auto;padding:0 8px}
.adjust-card{min-width:91px}.adjust-card img{width:72px;height:72px}.adjust-card span{white-space:nowrap}
#adjust-focus{width:min(620px,94%);display:flex;align-items:center;gap:16px}.editor-adjustments #adjust-focus[hidden]{display:none}
#adjust-label{font-weight:600;min-width:92px}#adjust-slider{flex:1;accent-color:var(--red)}#adjust-value{width:38px;text-align:right;color:#c9c9ce}
.crop-context{height:58px;padding:8px 20px;display:flex;align-items:center;gap:9px;background:#161619;border-bottom:1px solid #303035}.crop-context[hidden]{display:none}.crop-context>span{flex:1}
.crop-ratios{display:flex;align-items:center;gap:6px;overflow-x:auto}.crop-ratios span{color:#aaaab0;font-size:12px;margin-right:5px}.crop-ratios button{border:1px solid #39393e;border-radius:14px;background:transparent;color:#e8e8ea;padding:5px 9px;white-space:nowrap;cursor:pointer}.crop-ratios button.active{background:#2a1114;border-color:#9c3742}
#crop-overlay{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.52);pointer-events:none;z-index:2}.crop-grid{width:100%;height:100%;background:linear-gradient(to right,transparent 33%,rgba(255,255,255,.65) 33.5%,transparent 34%),linear-gradient(to right,transparent 66%,rgba(255,255,255,.65) 66.5%,transparent 67%),linear-gradient(to bottom,transparent 33%,rgba(255,255,255,.65) 33.5%,transparent 34%),linear-gradient(to bottom,transparent 66%,rgba(255,255,255,.65) 66.5%,transparent 67%)}
.editor-markup,.editor-text{display:flex;align-items:center;justify-content:center;gap:12px;overflow-x:auto}.editor-markup[hidden],.editor-text[hidden]{display:none}.editor-markup .editor-tool{width:68px;min-width:62px}.editor-range{display:flex;flex-direction:column;gap:5px;color:#bbb;font-size:12px;min-width:140px}.editor-range input{accent-color:var(--red)}.color-swatches{display:flex;gap:7px}.color-swatches button{width:24px;height:24px;border-radius:50%;border:2px solid #555;background:var(--swatch);cursor:pointer}.color-swatches button.active{outline:2px solid white;outline-offset:2px}.editor-text select{background:#1d1d20;border:1px solid #3b3b40;border-radius:7px;color:white;padding:9px}.text-style{width:35px;height:35px;border:1px solid #424247;border-radius:7px;background:#1b1b1e;color:white;cursor:pointer}.text-style.active{border-color:#d02130;background:#2a1114}.text-hint{color:#a8a8ae;white-space:nowrap}.text-entry{position:absolute;z-index:3;min-width:120px;min-height:42px;padding:3px 6px;outline:1px dashed rgba(255,255,255,.75);color:white;white-space:pre;cursor:text}.text-entry:focus{outline:2px solid #d02130}
@media(max-width:620px){#editor .editor-bar{padding:6px 8px}.editor-bar strong{font-size:12px}.editor-bar .bare-icon{width:38px}.editor-bar .button{padding:8px 10px}.editor-deck{max-width:100vw}.editor-toolstrip,.editor-adjustments,.editor-markup,.editor-text{height:132px;min-height:132px;padding:12px 10px}.editor-toolstrip{justify-content:flex-start;gap:4px;overflow-x:auto}.editor-tool{width:66px;min-width:66px;font-size:11px}.editor-tool .material-symbols-rounded{font-size:26px}.editor-tabs{height:40px;min-height:40px}.crop-context{height:auto;min-height:58px;padding:8px 10px}.crop-context>span{display:none}.crop-ratios{max-width:calc(100vw - 140px)}.crop-context .button{padding:7px 9px}.editor-markup,.editor-text{justify-content:flex-start}.editor-range{min-width:110px}.text-hint{display:none}#adjust-browser{justify-content:flex-start;gap:12px}.adjust-card{min-width:72px}.adjust-card img{width:56px;height:56px}#adjust-focus{min-width:520px}.canvas-wrap canvas{max-height:100%;max-width:100%}}

/* Markup is an overlay, never pixels erased from the photograph. */
#edit-ink{position:absolute;z-index:1;pointer-events:none;touch-action:none}#text-layer{position:absolute;inset:0;z-index:3;pointer-events:none}#text-layer .text-entry{pointer-events:auto}
.editor-tool.active-tool{color:#fff;background:#2a1114;border:1px solid #9c3742;border-radius:10px;padding:8px 4px}.editor-tool.active-tool .material-symbols-rounded{color:#f14755}.editor-markup .mode-done,.editor-text .mode-done{flex:0 0 auto;border:1px solid #3c3c41;background:#1b1b1e}.editor-markup .color-swatches{padding:6px 8px;border:1px solid #343439;border-radius:22px;background:#19191c}

/* Audited against the current Album desktop editor (desktop.py / D:\Album build). */
html.album-editing,html:has(body.album-editing),body.album-editing{overflow:hidden!important;height:100%}body.album-editing .mobile-nav{display:none!important}
#editor{inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;overflow:hidden!important;border:0;border-radius:0;font:13px "Segoe UI",sans-serif}
#editor[open]{display:flex;flex-direction:column}
#editor .editor-bar{flex:0 0 52px;height:52px;padding:6px 12px}
#editor .canvas-wrap{flex:1 1 0;height:auto;min-height:0;overflow:hidden;touch-action:none}
#editor .editor-deck{box-sizing:border-box;display:flex;flex:0 0 226px;height:226px;min-height:226px;flex-direction:column;gap:8px;padding:8px 28px 12px;background:#101012;overflow:hidden}
#editor .editor-toolstrip,#editor .editor-adjustments,#editor .editor-markup,#editor .editor-text{box-sizing:border-box;flex:0 0 158px;height:158px;min-height:158px;padding:0;background:transparent}
#editor .editor-tabs{box-sizing:border-box;display:flex;flex:0 0 40px;height:40px;min-height:40px;padding:2px 8px;background:transparent}
#editor [hidden]{display:none!important}
#editor .editor-toolstrip{border:0;gap:0}
#editor .editor-tool{box-sizing:border-box;width:96px;min-width:96px;height:78px;padding:6px;border:0;border-radius:0;background:transparent;color:#f0f0f2;font-size:14px;transition:none;justify-content:center}
#editor .editor-tool:hover{background:transparent;color:#fff}
#editor .editor-tool:focus-visible,#editor .bare-icon:focus-visible,#editor .color-swatches button:focus-visible{outline:2px solid #e9e9eb;outline-offset:2px}
#editor .editor-toolstrip .editor-tool:active{transform:none;color:#fff}
#editor .button{min-height:20px;padding:10px 14px;border:1px solid #3a3a3f;border-radius:9px;background:#29292c;color:#e9e9eb;font-weight:600}#editor .button:hover{background:#37373b}#editor .button.primary{background:#9d101b;border-color:#b51624;color:#fff}#editor .button.primary:hover{background:#b51624}
#editor .editor-tabs button{min-width:76px;padding:5px 14px;border:1px solid #45454a;background:transparent;color:#e9e9eb}
#editor .editor-tabs button:hover{background:#37373b}
#editor .editor-tabs button.active{background:#9d101b;border:2px solid #e9e9eb;color:#fff;font-weight:700}
#editor .crop-context{box-sizing:border-box;display:flex;flex:0 0 52px;height:52px;min-height:52px;padding:6px 10px;border:1px solid #29292d;border-radius:0;background:#121214}
#editor .crop-context[hidden]{display:none!important}
#crop-overlay{box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.59);cursor:move}
.crop-handle{position:absolute;display:block;width:12px;height:12px;margin:-6px 0 0 -6px;border:2px solid #08080a;border-radius:50%;background:#fff;box-shadow:0 0 0 1px rgba(255,255,255,.6)}
.crop-lt{left:0;top:0;cursor:nwse-resize}.crop-t{left:50%;top:0;cursor:ns-resize}.crop-rt{left:100%;top:0;cursor:nesw-resize}.crop-r{left:100%;top:50%;cursor:ew-resize}.crop-rb{left:100%;top:100%;cursor:nwse-resize}.crop-b{left:50%;top:100%;cursor:ns-resize}.crop-lb{left:0;top:100%;cursor:nesw-resize}.crop-l{left:0;top:50%;cursor:ew-resize}
#editor .editor-markup{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;overflow:hidden}
#editor .markup-tools{display:flex;align-items:center;gap:10px}
#editor .editor-markup .editor-tool{width:92px;min-width:92px;height:72px;font-size:14px}
#editor .editor-markup .editor-tool.active-tool{border:0;border-radius:0;background:transparent;color:#f0f0f2;padding:6px}
.markup-icon{display:block;width:30px;height:30px;color:var(--active-tool-color,#e7e7ea);font-size:30px!important;line-height:30px}
#editor .markup-size{display:grid;grid-template-columns:auto 170px auto;align-items:center;gap:9px;min-width:auto;color:#e7e7ea;font-size:13px}
#editor .markup-size input{width:170px;accent-color:#d02130}#editor .markup-size output{min-width:24px;color:#aaaab0}
#editor .color-swatches{display:flex;align-items:center;gap:2px;padding:0;border:0;border-radius:0;background:transparent}
#editor .color-swatches button{box-sizing:border-box;width:38px;height:38px;min-width:38px;border:2px solid #67676d;border-radius:50%;background:var(--swatch);transition:border-color 100ms ease,transform 100ms ease}
#editor .color-swatches button:hover{border-color:#f4f4f5;transform:none}
#editor .color-swatches button.active{border:3px solid #f4f4f5;outline:2px solid var(--swatch);outline-offset:1px}
#editor #adjust-browser{display:flex;width:100%;min-width:0;height:100%;align-items:center;justify-content:flex-start;gap:20px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:clamp(10px,4vw,48px);padding-inline:clamp(10px,4vw,48px);scrollbar-width:thin;scrollbar-color:#555 transparent}#editor #adjust-browser::-webkit-scrollbar{height:5px}#editor #adjust-browser::-webkit-scrollbar-thumb{background:#555;border-radius:10px}#editor .adjust-card{scroll-snap-align:start;flex:0 0 auto}

/* Desktop Album photo-information editor, adapted one-for-one for the browser. */
#modal.metadata-dialog{width:min(820px,calc(100vw - 32px));height:min(720px,calc(100vh - 32px));max-width:none;padding:0;overflow:hidden}#modal.metadata-dialog form{height:100%;display:flex;flex-direction:column;padding:22px 24px 16px}.metadata-head{display:flex;align-items:flex-start;gap:20px;padding-right:34px;margin-bottom:12px}.metadata-head>div{flex:1}.metadata-head h2{margin:0 0 6px!important}.metadata-head p{margin:0!important}.metadata-scroll{min-height:0;overflow:auto;display:grid;gap:16px;padding:4px 4px 12px 0}.metadata-card{background:#171719;border:1px solid #303034;border-radius:12px;padding:18px;display:grid;gap:10px}.metadata-card h3{font-size:15px;margin:0}.metadata-card>p{font-size:12px}.metadata-card label,.metadata-tag-field{display:grid;gap:6px;color:#d8d8dc}.metadata-card textarea{width:100%;border:1px solid #3a3a3f;border-radius:8px;background:#0b0b0d;color:#f5f5f6;padding:10px;font:13px/1.45 Inter,Segoe UI,sans-serif;resize:vertical;min-height:64px}.metadata-tags{display:flex;flex-wrap:wrap;gap:8px}.metadata-tags button{border:2px solid #7294e8;border-radius:16px;background:transparent;color:#8eacf4;padding:5px 11px;cursor:pointer}.metadata-tags button:hover{background:#7294e822}.metadata-tags .metadata-add-tag{width:34px;height:32px;padding:0;border-color:#4a4a50;color:#ddd;font-size:18px}.metadata-card pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#c8c8cd;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace}.metadata-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:12px}
[data-metadata-tags="colors"] button{border-color:#7294e8!important;color:#8eacf4!important}[data-metadata-tags="tags"] button{border-color:#35b85a!important;color:#61d77c!important}[data-metadata-tags="objects"] button{border-color:#d9ad25!important;color:#efca50!important}[data-metadata-tags="emotions"] button{border-color:#e58b38!important;color:#f0a65f!important}@media(max-width:620px){#modal.metadata-dialog{width:100vw;height:100dvh;max-height:none;border:0;border-radius:0}#modal.metadata-dialog form{padding:18px 14px 12px}.metadata-head{display:grid;padding-right:34px}.metadata-head .button{width:max-content}.metadata-card{padding:14px}.metadata-actions .button{flex:1;justify-content:center}}
#editor .adjust-card{box-sizing:border-box;width:122px;min-width:122px;height:134px;padding:5px;border:0;background:transparent;color:#f0f0f2;font-size:14px}
#editor .adjust-card:hover{background:transparent;color:#fff}#editor .adjust-card img{width:92px;height:92px;border:0;border-radius:50%;object-fit:cover}
#editor #adjust-focus{display:flex;width:100%;height:100%;align-items:center;gap:14px}#editor #adjust-label{min-width:140px;font-weight:500}#editor #adjust-slider{flex:1;accent-color:#d02130}
#editor #edit-ink{pointer-events:none}

@media(max-width:760px){
  #editor .editor-bar{flex-basis:50px;height:50px;padding:5px 8px}#editor .editor-bar strong{max-width:28vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#editor .editor-bar .button{display:inline-flex!important;padding:7px 9px;font-size:11px}
  #editor .editor-deck{flex-basis:176px;height:176px;min-height:176px;gap:4px;padding:5px 8px 7px}
  #editor .editor-toolstrip,#editor .editor-adjustments,#editor .editor-markup,#editor .editor-text{flex-basis:132px;height:132px;min-height:132px}
  #editor .editor-tabs{flex-basis:32px;height:32px;min-height:32px;padding:0}
  #editor .editor-toolstrip{justify-content:flex-start;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity}#editor .editor-toolstrip::-webkit-scrollbar{display:none}
  #editor .editor-tool{width:74px;min-width:74px;height:68px;font-size:11px;scroll-snap-align:start}
  #editor .crop-context{flex-basis:58px;height:58px;min-height:58px;padding:6px 8px;gap:6px}.crop-ratios{max-width:none;flex:1;scrollbar-width:none}.crop-ratios::-webkit-scrollbar{display:none}.crop-ratios span{display:none}#editor .crop-context .button{padding:7px 8px;font-size:11px}
  .crop-handle{width:16px;height:16px;margin:-8px 0 0 -8px}
  #editor .editor-markup{display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:72px 52px;gap:3px 7px;justify-content:stretch;overflow:hidden}
  #editor .editor-markup .mode-done{grid-row:1;grid-column:1;width:38px}.markup-tools{grid-row:1;grid-column:2;overflow-x:auto;scrollbar-width:none}.markup-tools::-webkit-scrollbar{display:none}#editor .editor-markup .editor-tool{width:68px;min-width:68px;height:66px;font-size:11px}
  #editor .markup-size{grid-row:2;grid-column:1/3;grid-template-columns:auto minmax(70px,1fr) auto;min-width:0}#editor .markup-size input{width:100%}
  #editor .editor-markup .color-swatches{position:absolute;right:8px;bottom:8px;max-width:52vw;overflow-x:auto;scrollbar-width:none;background:#101012;padding-left:8px}#editor .editor-markup .color-swatches::-webkit-scrollbar{display:none}#editor .color-swatches button{width:30px;height:30px;min-width:30px}
  #editor #adjust-browser{justify-content:flex-start;gap:8px;padding:0 4px;scroll-snap-type:x proximity}#editor .adjust-card{width:82px;min-width:82px;height:116px;scroll-snap-align:start;font-size:11px}#editor .adjust-card img{width:70px;height:70px}
  #editor #adjust-focus{min-width:0;display:grid;grid-template-columns:38px 1fr auto;grid-template-rows:38px 42px;gap:4px 8px}#editor #adjust-back{grid-column:1}#editor #adjust-label{grid-column:2;min-width:0}#editor #adjust-reset-one{grid-column:3;padding:7px;font-size:10px}#editor #adjust-slider{grid-column:1/4;grid-row:2;width:100%}
}

/* Desktop parity: Album's gallery is filename-free and only reveals selection affordances. */
.media-card img{transition:none!important}.media-card:hover img{transform:none!important}.media-overlay{display:none!important}
.media-selector{position:absolute;top:9px;left:9px;width:28px;height:28px;border:2px solid rgba(255,255,255,.92);border-radius:50%;display:grid;place-items:center;padding:0;background:rgba(8,8,10,.58);color:#fff;cursor:pointer;opacity:0;transition:opacity .15s,border-color .15s,background .15s;transition-delay:0s;backdrop-filter:blur(6px)}
.media-card:hover .media-selector,.media-card:focus-within .media-selector,.media-card.selected .media-selector{opacity:1}.media-card:hover .media-selector{transition-delay:.5s}.media-card.selected .media-selector{transition-delay:0s;background:var(--red);border-color:var(--red)}.media-selector .material-symbols-rounded{font-size:18px}.media-card.selected::after{content:"";position:absolute;inset:0;border:3px solid var(--red);border-radius:inherit;pointer-events:none}

.selection-bar{min-height:52px;margin-bottom:14px;padding:7px 10px 7px 16px;border:1px solid var(--line);border-radius:10px;background:#151517;display:flex;align-items:center;gap:8px}.selection-bar[hidden]{display:none}.selection-bar>span{flex:1}.selection-bar .danger{color:#ff6875}.settings-actions{display:flex;gap:8px;flex-wrap:wrap}.source-empty{margin-top:12px}
#viewer{width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;display:grid;grid-template-rows:54px minmax(0,1fr) 62px}#viewer:not([open]){display:none}.viewer-header{display:flex;align-items:center;gap:12px;padding:6px 10px;border-bottom:1px solid #252527;background:#0d0d0f}.viewer-header #viewer-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.viewer-header .viewer-actions{position:static;margin-left:auto;display:flex}.viewer-close{position:static!important;flex:0 0 auto;background:transparent!important}.viewer-canvas{min-height:0;display:grid;place-items:center;overflow:hidden;background:#050505}.viewer-canvas img{width:100%;height:100%;object-fit:contain}.viewer-footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:7px 16px;border-top:1px solid #252527;background:#0d0d0f;color:#bbb}.viewer-nav{position:static!important;transform:none!important;width:42px;height:42px;font-size:28px}.viewer-footer .previous{justify-self:start}.viewer-footer .next{justify-self:end}
@media(max-width:760px){.selection-bar{overflow-x:auto;padding-left:10px}.selection-bar strong{white-space:nowrap}.selection-bar .text-button{white-space:nowrap}.viewer-header{padding-inline:6px}.viewer-header #viewer-name{font-size:12px}.viewer-actions .bare-icon{width:34px}.viewer-footer{padding-inline:10px}.settings-card{align-items:stretch;flex-direction:column}.settings-actions{width:100%}.settings-actions .button{flex:1}.media-selector{width:30px;height:30px;opacity:1;background:rgba(8,8,10,.45)}}

.empty{border-style:dashed!important}.empty>span{display:none!important}.gallery-empty{column-span:all;width:min(560px,100%)}

/* Keep Album's phone navigation attached to the live visual viewport while
   mobile browser chrome expands and collapses. */
@media(max-width:620px){
  html,body{min-height:100%;overscroll-behavior-y:none}
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .mobile-nav{
    top:auto!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    height:calc(68px + env(safe-area-inset-bottom));
    padding-bottom:calc(6px + env(safe-area-inset-bottom));
    transform:translate3d(0,0,0);
    backface-visibility:hidden;
    contain:layout paint;
  }
}
