:root{--paper:#faf7ee;--card:#fffdf8;--ink:#31251b;--muted:#695945;--yellow:#f1cd5d;--selected:#f8e3a3;--border:#e2d4b3;--soft:#f4efe1}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.5 system-ui,"PingFang TC","Microsoft JhengHei",sans-serif}
[hidden]{display:none!important}
header{display:flex;justify-content:center;align-items:center;gap:10px;background:var(--card);font-weight:740;padding:9px;border-bottom:1px solid var(--border);font-size:18px}header img{height:30px;width:30px;object-fit:contain}
.shell{margin:auto;max-width:1160px;display:grid;grid-template-columns:170px 1fr;gap:16px;padding:16px}main{min-width:0}
nav{display:flex;flex-direction:column;gap:6px}nav button{text-align:left;background:var(--card)}
.panel,.card,.entry{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:12px;margin-bottom:10px}
button,input,textarea,select{font:inherit;color:inherit;border:1px solid var(--border);border-radius:8px;padding:8px;background:#fff}
button{cursor:pointer}button.primary,.selected{background:var(--selected)}button.primary{background:var(--yellow);font-weight:700}
.entry{display:block;width:100%;text-align:left;background:#fbf0d0}.entry:nth-of-type(2){background:#edf0d9}.entry:nth-of-type(3){background:var(--card)}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.card{padding:0;overflow:hidden;margin-bottom:0}
.card button{border:0;background:none;width:100%;text-align:left;padding:0} .card img,.blank{width:100%;aspect-ratio:4/3;display:block;object-fit:cover;background:var(--soft)}
.cap{padding:8px;display:block;overflow-wrap:anywhere}small{display:block;color:var(--muted)}h1,h2,p{margin:0 0 10px}h1{font-size:21px}h2{font-size:17px}
.row,.actions{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.row button{border-radius:18px;background:var(--soft)}.row button.selected{background:var(--selected)}
label{display:grid;gap:3px;margin:6px 0}input,textarea,select{min-width:0;width:100%}textarea{min-height:72px}
.gallery{display:flex;gap:8px;overflow:auto}.gallery img{display:block;width:min(350px,75vw);aspect-ratio:4/3;object-fit:cover;border-radius:8px}
#notice{position:fixed;bottom:65px;right:12px;max-width:72vw;background:var(--ink);color:white;border-radius:8px;padding:8px;z-index:2}#notice:empty{display:none}
@media(max-width:680px){.shell{display:block;padding:12px 12px 76px}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}nav:empty{display:none}nav{position:fixed;z-index:1;bottom:0;left:0;right:0;padding:5px 6px calc(5px + env(safe-area-inset-bottom));display:flex;flex-direction:row;background:var(--card);border-top:1px solid var(--border);justify-content:space-around}nav button{border:0;padding:8px 7px}}

header{justify-content:flex-start;padding:13px max(16px,calc((100vw - 1200px)/2));position:sticky;top:0;z-index:3}
.shell{max-width:1200px;grid-template-columns:140px minmax(0,1fr);gap:24px;padding:24px 16px}
nav:not(:empty){align-self:start;position:sticky;top:79px;border:1px solid var(--border);border-radius:16px;padding:8px;background:var(--card)}
nav button{display:flex;gap:10px;align-items:center;border:0;font-weight:600;padding:12px}
nav button[aria-current=page]{background:var(--selected)}.nav-icon{font-size:20px;line-height:1;width:21px;text-align:center}
.hero{background:linear-gradient(115deg,#fff0bc,#f7d67b);border:1px solid #ead082;border-radius:23px;padding:clamp(14px,4vw,34px);margin-bottom:23px}
.hero h1{font-size:clamp(22px,4vw,39px);letter-spacing:.01em;margin:0 0 6px}.hero p{margin:0;color:var(--muted)}
.hub{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hub .entry{display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:14px;border-radius:17px;margin:0;min-height:133px}
.entry strong{font-size:17px}.entry-icon{background:#fff8;border-radius:10px;width:32px;height:32px;display:grid;place-items:center;font-size:20px}.entry-count{margin-top:auto;font-weight:700}
.panel{border-radius:16px;padding:15px}.vocab{margin:6px 0;border-bottom:1px solid var(--border)}.vocab:last-child{border:0}
.vocab summary{cursor:pointer;padding:11px 2px;font-weight:650}
.branch{margin:7px 0 7px 10px;padding:6px 0 6px 10px;border-left:2px solid var(--border)}
.branch small{font-weight:650}.row button{min-height:36px}.slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.photo-slot{border-style:dashed;min-height:56px;background:#fbf0d0;font-weight:650}.hint{color:var(--muted)}
@media (min-width:681px) and (max-width:1024px){
 .shell{grid-template-columns:67px minmax(0,1fr);gap:15px;padding-top:16px}
 nav button{flex-direction:column;gap:4px;padding:8px 2px;font-size:12px}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
 .shell{display:block;padding:13px 12px 87px}.hub{grid-template-columns:1fr;gap:8px}.hub .entry{display:grid;grid-template-columns:32px 1fr auto;gap:2px 10px;align-items:center;min-height:0}
 .entry-icon{grid-row:span 2}.entry small{grid-column:2}.entry-count{grid-column:3;grid-row:1/span 2;margin:auto 0}
 nav:not(:empty){position:fixed;top:auto;padding:6px 8px calc(6px + env(safe-area-inset-bottom));border-radius:0}
 nav button{flex-direction:column;gap:3px;padding:7px 10px;font-size:12px}.slots{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.entry-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.entry-choices .entry-choice{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-height:105px;margin:0;padding:17px;text-align:left;border-radius:14px;background:#fffaf0}.entry-choices .entry-choice:hover,.entry-choices .entry-choice:focus-visible{background:#f8e9be;border-color:#b69546}.entry-choice strong{font-size:1.12rem}.entry-choice small{font-size:.9rem;font-weight:400;color:var(--muted)}.photo-slot{background:#fff9e9;border-radius:13px;text-align:left;padding:12px}.photo-slot:hover{background:#fbf0d0}.entry-icon{font-size:19px}.actions{padding:8px;background:#fff8e6;border-radius:10px}.actions label{flex:1 1 12em}
@media(max-width:560px){.entry-choices{grid-template-columns:1fr}}

.search-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 16px}
.search-mode{width:100%;min-height:76px;border:1px solid #ddcba3;background:#fffdf8;text-align:left;padding:12px 15px;border-radius:14px}
.search-mode strong{display:block;font-size:19px;line-height:1.25}
.search-mode small{margin-top:5px;font-size:12px;line-height:1.35}
.search-mode[aria-pressed="true"]{background:#f8e1a2;border-color:#b68b39;box-shadow:inset 0 -3px 0 #ba8e3e}
.row button.show-options{background:#fffdf8;border-color:#bda16d;color:#654613}

.photo-panel{background:linear-gradient(155deg,#fffdf7,#fcf5e6);padding:14px}
.photo-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding-bottom:12px;border-bottom:1px solid #eddfbe}
.photo-heading h2,.photo-heading p{margin:0}.photo-heading p{font-size:13px;color:#695945;margin-top:2px}
.photo-art{display:grid;place-items:center;color:#785628;background:#faeccd;border-radius:12px;width:39px;height:39px;flex-shrink:0}
.photo-camera{background:#f3d58b}.photo-total{font-size:12px;white-space:nowrap;color:#704e21;background:#faedca;padding:3px 7px;border-radius:99px}
.photo-group{margin-top:12px}.photo-group h3{font-size:13px;margin:0 0 6px;color:#68543d;font-weight:650}
.photo-panel .photo-slot{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px;min-height:56px;border:1px solid #e9dab7;background:#fffdf8;border-radius:12px;color:#3f2f22}
.photo-panel .photo-slot:hover,.photo-panel .photo-slot:focus-visible{background:#fbefcf;border-color:#b99858}.photo-panel .has-photos{border-color:#c4a45e;background:#fff7dc}
.photo-slot strong{font-size:14px;line-height:1.15;word-break:keep-all}.photo-slot small{font-size:11px;margin-top:3px;font-weight:500}
.photo-add{color:#805b22;background:#f8edcd;display:grid;place-items:center;border-radius:99px;width:22px;height:22px;line-height:1;font-size:16px}
.art-5,.art-6,.art-7{background:#eeedde;color:#5e6241}
@media (min-width:681px) and (max-width:980px){.photo-panel .slots{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:370px){.photo-panel .photo-art{width:30px;height:30px}.photo-panel .photo-art svg{width:23px;height:23px}.photo-panel .photo-slot{gap:5px;padding:6px}.photo-slot strong{font-size:13px}}

.photo-panel .photo-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
.hub .entry-pr{grid-column:1/-1;background:#f8e7af;border-color:#d7b85f;min-height:106px}
.quick-options{margin:11px 0;display:grid;gap:6px}
.quick-options legend{font-weight:700;padding:0 0 4px}
fieldset.quick-options{border:0;padding:0;min-width:0}
.quick-options .choice-list{display:flex;flex-wrap:wrap;gap:6px}
.choice-list button{margin:0;min-height:38px;padding:6px 10px}
.choice-list button[aria-pressed="true"]{background:#f4dfa0;border-color:#a37c29;font-weight:700}
.form-details{margin:10px 0}
@media(max-width:650px){.hub .entry-pr{min-height:0}.choice-list button{min-height:42px}.quick-options{margin:9px 0}}
.flat-filter h3{font-size:.95rem;margin:9px 0 1px}
.flat-filter .root-branch > .row{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding:3px 2px 6px;margin-bottom:3px}
.flat-filter .root-branch > .row button{flex:none;margin:0;min-height:39px}
.flat-filter .detail-filter{margin-left:8px}
.secondary-filters{margin:8px 0 10px;border-bottom:1px solid var(--line,#ddd1b4)}
.secondary-filters > details.vocab{margin:0;padding:0;border:0;border-top:1px solid var(--line,#ddd1b4)}
.secondary-filters > details > summary{padding:9px 2px;cursor:pointer}
.album-group{border-top:1px solid #ddd1b4;margin-top:12px;padding-top:9px}
.album-group h3{font-size:1rem;margin:0 0 6px}
.album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,106px),1fr));gap:8px}
.album-grid img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}
.album-grid .album-thumb{padding:0;margin:0;overflow:hidden}
.edit-album{padding:13px;border:1px solid #e5dac1;border-radius:16px;background:#fffdf8}
.edit-album.is-unclassified{background:#f9f1df;border-color:#e6d4ac}
.edit-album-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.edit-album-heading h3{margin:0}
.edit-album-count{flex:none;border-radius:20px;background:#eee4ce;color:#5c462b;padding:3px 9px;font-size:.82rem;font-weight:700}
.edit-album label{margin:0 0 10px;font-size:.86rem;color:#695945}
.edit-album .album-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,134px),1fr));gap:10px}
.album-item{min-width:0;border:1px solid #e9dec6;border-radius:12px;background:#fffdf8;overflow:hidden}
.album-item img{border-radius:0}
.album-item-actions{padding:6px}
.album-item .row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px;margin:0}
.album-item button{font-size:.82rem;padding:4px 6px;margin:0}
.album-item .row button{min-height:38px;background:transparent;border-color:transparent;color:#654d32}
.album-item .row button[aria-pressed="true"]{color:#72511c;background:#f7efdc}
.album-item .move-photo{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding-inline:10px;background:#f5e5b9;border:0;font-size:.9rem;font-weight:700}
.photo-move{position:fixed;width:min(calc(100% - 24px),460px);max-height:85dvh;padding:18px;border:1px solid #dbcba8;border-radius:22px;background:#fffdf8;color:#31251b;box-shadow:0 16px 52px #31251b38}
.photo-move::backdrop{background:#271d146e}
.photo-move-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.photo-move h2{font-size:1.27rem;margin:0}
.photo-move-heading button{margin:0;min-height:44px;border-color:transparent;background:transparent;color:#695945}
.photo-move-source{display:flex;align-items:center;gap:12px;margin:6px 0 14px;padding:8px;background:#f7eedb;border-radius:12px}
.photo-move-source img{width:54px;height:54px;border-radius:8px;object-fit:cover}
.photo-move-source small,.photo-move-source strong{display:block}
.photo-move-source small{color:#695945}
.photo-move-group{margin:0 0 9px}
.photo-move-group h3{margin:0 0 5px;color:#695945;font-size:.84rem}
.photo-move-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.photo-move-options button,.photo-move-reset{display:flex;align-items:center;gap:8px;margin:0;padding:5px 8px;min-height:44px;background:#fff;border:1px solid #e8ddc4;text-align:left;font-weight:700}
.photo-move-options button:hover,.photo-move-reset:hover{background:#f6e7c0;border-color:#c6a76d}
.photo-move-options .photo-art{width:29px;height:29px;border-radius:8px}
.photo-move-options svg{width:20px;height:20px}
.photo-move-reset{width:100%;color:#695945;background:#f9f3e7}
@media(max-width:360px){.edit-album .album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.album-item .row button{padding-inline:2px;font-size:.75rem}}
@media(max-width:650px){.photo-move{width:100%;max-width:100%;inset:auto 0 0;margin:0;border-radius:22px 22px 0 0;padding:14px 16px max(16px,env(safe-area-inset-bottom))}}
.photo-viewer{max-width:min(92vw,780px);width:100%;max-height:92dvh;border:1px solid #ddd1b4;border-radius:14px;background:#fffdf8;color:#31251b;padding:12px;box-sizing:border-box}
.photo-viewer::backdrop{background:#1d160dc9}
.viewer-image{display:block;width:100%;height:min(60dvh,550px);object-fit:contain}
.viewer-position{text-align:center;margin:5px 0}
.photo-viewer .row{justify-content:space-between}
 .search-heading,.filter-heading,.filter-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.search-heading h1,.filter-heading h2{margin:0}.search-heading{margin-bottom:12px}
.filter-toggle{display:inline-flex;align-items:center;gap:7px;flex:none;min-height:44px;padding:0 15px;margin:0;border:1px solid #a78139;border-radius:12px;background:#f1d381;color:#3c2c15;font-size:1rem;font-weight:750}
.filter-toggle:hover{background:#eac36b}
.keyword-search input{font-size:16px}
.photo-credit-frame{position:relative;display:block}
.photo-credit{position:absolute;right:5px;bottom:5px;max-width:calc(100% - 10px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 6px;border-radius:4px;background:#251b14db;color:white;font-size:.72rem;font-weight:600;pointer-events:none}
.search-filters{padding:0;border:1px solid #e1d4b2;border-radius:22px;width:min(calc(100% - 24px),590px);height:min(90dvh,800px);max-height:90dvh;overflow:hidden;box-sizing:border-box;color:var(--ink);background:#f7f1e4;box-shadow:0 16px 48px #3b291e40}
.search-filters[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto}
.search-filters::backdrop{background:#2b211777}
.filter-heading{padding:17px 18px 12px;background:#fffdf8}
.filter-heading h2{font-size:1.35rem}
.filter-heading button{margin:0;min-height:44px;background:#f7f0e0}
.filter-modes{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:0 16px 10px;border-radius:13px;background:#eadfc4}
.filter-modes button{min-height:44px;margin:0;border:0;border-radius:10px;background:transparent;color:#5d4f3e}
.filter-modes button[aria-pressed="true"]{background:#fffdf8;color:#342719;font-weight:750;box-shadow:0 1px 4px #4c381d24}
.filter-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 16px 12px}
.search-filters .secondary-filters{display:grid;gap:8px;border:0;margin:0}
.search-filters .secondary-filters > details.vocab{border:1px solid #e8dcc2;border-radius:13px;background:#fffdf8;padding:0 12px}
.search-filters .secondary-filters > details > summary{min-height:44px;padding:11px 2px;box-sizing:border-box;font-weight:650}
.search-filters .secondary-filters > details[open]{padding-bottom:8px}
.search-filters .secondary-filters[hidden]{display:none}
.search-filters .filter-basic{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:10px}
.search-filters .filter-basic > details.vocab{border:1px solid #e0c998;background:#fbefce}
.search-filters .filter-basic > details.vocab:nth-child(even){border-color:#d7dfc5;background:#edf2e0}
.search-filters .filter-basic > details > summary{min-height:62px;padding:18px 2px;line-height:1.4}
.search-filters .filter-basic > details[open]{grid-column:1/-1;background:#fffdf8}
.search-filters .filter-basic > details[open] > summary{min-height:48px;padding:12px 2px}
.search-filters .filter-advanced > details.vocab{border-left:4px solid #bcaa85}
.search-filters .filter-advanced > details > summary{min-height:54px;padding:15px 2px}
.search-filters .filter-body .row button.selected{background:#edd48f;border-color:#987437;color:#342719}
@media(max-width:330px){.search-filters .filter-basic{grid-template-columns:1fr}}

.filter-actions{padding:10px 16px max(10px,env(safe-area-inset-bottom));background:#fffdf8;border-top:1px solid #e1d4b2}
.filter-actions button{min-height:44px;margin:0}
.filter-actions .primary{flex:1;background:#43331e;color:#fffdf8;border-color:#43331e}
@media(max-width:650px){.search-filters{margin:auto 0 0;width:100%;max-width:100%;height:90dvh;border-radius:22px 22px 0 0}}
.work-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:29px 20px;border-radius:20px;color:#fff8e6;background:radial-gradient(ellipse at top right,#775633,#3a2b20 69%)}
.work-hero h1{margin:0;color:inherit;font-size:clamp(1.75rem,6vw,2.4rem)}
.work-hero .work-add{margin:0;min-height:44px;border-color:#f3d67e;background:#f3d67e;color:#322219;font-weight:700}
.work-switches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 15px}
.work-switches .work-tile{display:grid;gap:6px;text-align:left;min-width:0;padding:11px;margin:0;border:1px solid #e3d8bf;border-radius:14px;color:#342719;font-weight:700}
.work-tile.work-drafts{background:#f7ebcb}.work-tile.work-published{background:#eaf0df}.work-tile.work-likes{background:#f5e7e2}
.work-switches .work-tile[aria-pressed="true"]{border-color:#86704b;box-shadow:inset 0 -3px #9c8253}
.work-count{font-size:1.55rem;line-height:1.1;font-variant-numeric:tabular-nums}
.work-list{border:1px solid #e3d8bf;border-radius:18px;padding:14px;background:#fffdf8}
.work-list h2{margin:0 0 12px;font-size:1.16rem}
.work-empty{border-radius:12px;background:#f8f2e5;padding:12px;color:var(--muted)}
.work-empty p{margin:0 0 8px}.work-empty button{margin:0;min-height:42px}
.work-draft-list{display:grid;gap:10px}
.work-draft{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px;border:1px solid #e3d8bf;border-radius:13px;background:#fff}
.work-draft img,.work-draft-placeholder{display:block;width:64px;height:64px;border-radius:9px;object-fit:cover;background:#f5edd9}
.work-draft-placeholder{display:grid;place-items:center;color:#695945;font-size:.75rem}
.work-draft h3,.work-draft p{margin:0;overflow-wrap:anywhere}
.work-draft h3{font-size:1rem}.work-draft p{margin-top:3px;color:var(--muted);font-size:.82rem}
.work-draft .work-draft-check{color:#78511c}
.work-draft button{min-height:44px;margin:0;white-space:nowrap}
@media(max-width:380px){.work-draft{grid-template-columns:52px minmax(0,1fr);gap:8px}.work-draft img,.work-draft-placeholder{width:52px;height:52px}.work-draft button{grid-column:2;justify-self:start}}
.product-notes label{gap:8px;font-weight:700}
.product-notes textarea{display:block;min-height:104px;padding:12px;background:#fff;border:1px solid #b5a57f;border-radius:10px;font-size:16px;font-weight:400;line-height:1.5;resize:vertical}
.product-notes textarea:focus{outline:2px solid #8c6b2e;outline-offset:2px}
body.auth-mode>header,
body.auth-mode nav{display:none}
body.auth-mode .shell{display:block;max-width:none;padding:clamp(14px,4vw,36px) clamp(12px,4vw,28px) 28px}
.preview-auth{width:100%;max-width:640px;margin:0 auto}
.preview-auth .auth-banner{position:relative;isolation:isolate;overflow:hidden;background:#f5d573;padding:clamp(22px,5vw,38px) clamp(20px,5.5vw,40px) clamp(35px,6vw,52px);border-radius:24px 24px 0 0}
.auth-banner::before{content:'';position:absolute;width:clamp(170px,40vw,340px);aspect-ratio:1;border:clamp(14px,3vw,28px) solid #ffecae;opacity:.58;border-radius:50%;right:-80px;top:-178px;z-index:-1}
.auth-banner h1{margin:10px 0 4px;font-size:clamp(1.7rem,5.5vw,2.5rem);overflow-wrap:anywhere;line-height:1.2}
.auth-banner p{margin:0;font-size:1rem;color:#614c2a}
.auth-wordmark{display:inline-flex;align-items:center;gap:7px;color:#a62c26;font-size:.78rem;font-weight:750;letter-spacing:.07em;white-space:nowrap}
.auth-wordmark strong{background:#b82524;color:white;border-radius:5px;padding:5px 7px}
.auth-card{position:relative;margin-top:-18px;background:#fffefa;border:1px solid #e9ddc5;border-radius:20px;padding:clamp(20px,5vw,36px);box-shadow:0 5px 16px #6b4c1714}
.auth-card h2{margin:0 0 11px;padding-left:11px;border-left:5px solid #f0ca55;font-size:clamp(1.35rem,3vw,1.65rem)}
.auth-card p{margin:8px 0 15px}
.auth-card label{font-size:1rem;font-weight:650;margin:14px 0 0;gap:6px}
.auth-card input{min-height:52px;padding:11px 13px;margin:0;font-size:1.0625rem;background:white;border-radius:12px}
.auth-card form>button{width:100%;min-height:54px;margin:20px 0 0;border:0;border-radius:999px;font-size:1.12rem;font-weight:750}
.auth-footer{margin-top:19px;padding:10px 0 1px;border-top:1px solid #f0e8d7;text-align:center;font-size:.95rem;color:#695945}
.auth-footer button{min-height:44px;border:0;padding:6px 3px;background:none;color:#795311;font-weight:750}
.auth-demo,.preview-privacy{border-radius:9px;background:#f8eed5;color:#5a4429;margin:8px 0 13px;padding:10px;font-size:.95rem}
.preview-auth .hint{font-size:.875rem;line-height:1.5}
/* Brand colors from the approved cover. Functional colors use the same warm palette. */
:root{
  --paper:#fff7e4;--card:#fffdf6;--ink:#4f200e;--muted:#71503a;
  --yellow:#ffcf49;--selected:#ffe29a;--border:#e8c67f;--soft:#fff0cb;
  --vi-brown:#561904;--vi-border:#b87134;
}
body{font-family:system-ui,"PingFang SC","Microsoft YaHei",sans-serif}
body>header{color:var(--vi-brown);background:var(--yellow);border-bottom:1px solid #d49a43}
body>header small{color:#643a19}
.panel,.card,.entry,.work-list{border-radius:18px}
.hero,.preview-auth .auth-banner,.work-hero{color:var(--vi-brown);background:#ffd24f;border:1px solid #e4ad4e}
.hero,.preview-auth .auth-banner{display:grid;grid-template-columns:minmax(0,1fr) clamp(86px,20vw,156px);align-items:center;gap:14px}
.hero{min-height:154px}
.hero h1,.auth-banner h1,.work-hero h1{font-weight:850;letter-spacing:-.015em}
.vi-cover{width:100%;height:auto;aspect-ratio:1;object-fit:cover;display:block;border-radius:19%;box-shadow:0 3px 10px #913d1515}
.auth-wordmark{color:var(--vi-brown)}
.auth-wordmark strong{background:var(--vi-brown);color:#fff4cd}
.auth-card h2{border-color:var(--yellow)}
.auth-card{background:var(--card);border-color:var(--border)}
button.primary,.row button.primary,.filter-actions .primary,.work-hero .work-add,.filter-toggle,
.album-item .move-photo{background:var(--yellow);border-color:#d29a37;color:var(--vi-brown);font-weight:750}
button.primary:hover,.filter-toggle:hover{background:#ffc637}
nav:not(:empty),.search-filters,.photo-move,.photo-panel{background:var(--card);border-color:var(--border)}
nav button[aria-current=page],.choice-list button[aria-pressed=true],.filter-modes button[aria-pressed=true],
.search-mode[aria-pressed=true]{background:var(--selected);color:var(--vi-brown);border-color:#bd7836}
.nav-icon{color:var(--vi-brown)}
.hub .entry-pr,.hub .entry-global,.hub .entry-customer,.entry-choices .entry-choice{
  background:#fff2cf;border-color:var(--border);color:var(--vi-brown)
}
.hub .entry-pr,.entry-choices .entry-choice:hover{background:#ffe8a7;border-color:#d7a354}
.entry-icon,.photo-art,.photo-move-options .photo-art{background:#ffe39a;color:var(--vi-brown)}
.work-tile.work-drafts,.work-tile.work-published,.work-tile.work-likes{background:#fff0cb}
.work-switches .work-tile[aria-pressed=true]{background:#ffe29a;border-color:#b97c37}
.photo-slot,.edit-album,.photo-move-source{border-color:var(--border)}
.edit-album.is-unclassified,.photo-move-source,.auth-demo,.preview-privacy{background:#fff0cb;color:#674020}
.card img,.album-grid img{background:#fff3d2}
input:focus-visible,textarea:focus-visible,button:focus-visible,select:focus-visible,summary:focus-visible{
  outline:2px solid #8f4d1f;outline-offset:2px
}
@media(max-width:420px){
  .hero,.preview-auth .auth-banner{gap:9px;grid-template-columns:minmax(0,1fr) 78px}
  .hero{min-height:126px}
  .preview-auth .auth-banner h1{font-size:clamp(1.25rem,6.4vw,1.7rem)}
}

html {-webkit-text-size-adjust:100%; text-size-adjust:100%}
main, .panel, .shell {min-width:0}
@media(max-width:680px) {input,textarea,select {font-size:16px}}
.admin-check {display:inline-flex;align-items:center;gap:.35rem;margin:.35rem 0}
.admin-check input {width:auto;min-height:0;accent-color:#815321}
.admin-members {list-style:none;padding:0}
.admin-members li {display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-bottom:1px solid #eddbab}
.admin-members small {display:block;overflow-wrap:anywhere}
.admin-terms {max-height:18rem;overflow:auto;line-height:1.8}
.auth-mode-switch{display:flex;gap:8px;margin:4px 0 8px}
.auth-mode-switch button{flex:1;min-height:42px;border:1px solid #e9ddc5;border-radius:10px;background:#fffefa;color:#795311;font-weight:650;cursor:pointer}
.auth-mode-switch button.active{background:#f0ca55;border-color:#e0b83f;color:#4a3410}
.auth-hint{margin:2px 0 6px;color:#695945;font-size:.92rem}
.panel .row .admin-check{margin-right:.75rem}
/* 删除功能：危险按钮 + 二次确认弹窗 */
button.danger{background:#fff2f0;color:#b3261e;border-color:#e7b5b0}
.row button.danger{background:#fff2f0;color:#b3261e;border-color:#e7b5b0}
button.danger.primary{background:#b3261e;color:#fff;border-color:#b3261e;font-weight:700}
.confirm-dialog{border:1px solid var(--border,#e3d3a8);border-radius:16px;background:#fffdf8;color:#43331e;
  padding:22px;max-width:min(92vw,380px);box-shadow:0 12px 40px rgba(0,0,0,.2)}
.confirm-dialog::backdrop{background:rgba(40,30,15,.45)}
.confirm-dialog h2{margin:0 0 12px;font-size:1.25rem}
.confirm-dialog p{margin:0 0 10px;line-height:1.6}
.confirm-dialog .hint{color:#8a7355;font-size:.9rem}
.confirm-dialog .row{justify-content:flex-end;margin:16px 0 0}
.confirm-dialog .row button{min-height:44px;padding:8px 18px}
/* 必填项标记 */
summary .req{color:#c62828;font-weight:700}
/* 多语言切换按钮 */
.hero-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.lang-switch{display:inline-flex;gap:6px;margin-left:4px}
.lang-btn{min-height:30px;padding:3px 9px;border:1.5px solid #b98a1f;border-radius:8px;
  background:#fffdf5;color:#7a5a12;font-size:.8rem;font-weight:650;line-height:1.2}
.lang-btn.active{background:#f0c94f;border-color:#b98a1f;color:#3d2a06}
@media(max-width:680px){.lang-btn{min-height:28px;padding:2px 7px;font-size:.74rem}}

/* 部门标签与成员使用分析 */
.admin-depts{list-style:none;margin:8px 0;padding:0;display:grid;gap:4px}.admin-depts li{padding:5px 0;border-bottom:1px solid #eddbab;font-size:.9rem}
.analytics-content{display:grid;gap:10px}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.metric{display:grid;gap:2px;padding:12px;background:var(--soft);border:1px solid var(--border);border-radius:12px;text-align:center}
.metric strong{font-size:1.35rem;color:#7a5a12}.metric span{font-size:.78rem;color:var(--muted)}
.bar-list{display:grid;gap:7px}.bar-row{display:grid;grid-template-columns:minmax(90px,32%) 1fr 46px;gap:8px;align-items:center;font-size:.86rem}
.bar-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bar-track{height:12px;background:#efe4c8;border-radius:8px;overflow:hidden}
.bar-fill{height:100%;background:linear-gradient(90deg,#f1cd5d,#c99722);border-radius:8px}.bar-value{text-align:right;font-weight:700;color:#7a5a12}
.trend-chart{width:100%;overflow:hidden}.trend-chart svg{width:100%;height:auto;display:block}
@media(max-width:680px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bar-row{grid-template-columns:minmax(70px,36%) 1fr 38px}}

/* 载入失败兜底：避免保存后刷新时整页空白 */
.page-body{min-height:60px}
.load-failed{display:grid;gap:8px;justify-items:start;padding:16px;border:1px solid #e7b5b0;border-radius:12px;background:#fff6f4;color:#8a2c22}
.load-failed p{margin:0}
