#fjPhotoDialog{--ph-ink:#183c35;--ph-muted:#47645d;--ph-bg:#f5faf8;--ph-card:#fff;--ph-border:#aecbc0;--ph-accent:#225f4d;--ph-on:#fff;box-sizing:border-box;position:fixed!important;inset:3dvh 0 auto!important;width:min(40rem,calc(100vw - 1rem));max-height:92dvh;margin:0 auto!important;padding:1.1rem;border:1px solid var(--ph-border);border-radius:1.1rem;background:var(--ph-bg);color:var(--ph-ink);overflow:auto;overscroll-behavior:contain;box-shadow:0 1.5rem 5rem #0005;font-family:inherit}
html[data-theme=dark] #fjPhotoDialog{--ph-ink:#f0f7f5;--ph-muted:#c0d6ce;--ph-bg:#142b36;--ph-card:#203b45;--ph-border:#547773;--ph-accent:#94ddc2;--ph-on:#123c30}
#fjPhotoDialog::backdrop{background:#081e2bb5;backdrop-filter:blur(3px)}
#fjPhotoDialog [hidden]{display:none!important}
#fjPhotoDialog .fj-photo-close{position:static!important;inset:auto!important;float:none!important;display:block!important;width:auto!important;max-width:none!important;max-height:none!important;min-width:4.5rem;min-height:44px;padding:.55rem .8rem!important;margin:0 0 .5rem auto!important;font-family:inherit!important;font-size:1rem!important;font-weight:700!important;border-radius:.65rem!important;background:transparent!important;color:var(--ph-ink)!important;border:1px solid var(--ph-border)!important;cursor:pointer}
.fj-photo{font-size:1rem;line-height:1.5;color:var(--ph-ink)}
#fjPhotoDialog .fj-photo :is(h2,h3,p,label,summary,li,small){color:var(--ph-ink)!important;opacity:1!important;text-shadow:none!important}
.fj-photo h2{font-size:1.35rem;line-height:1.25;margin:.1rem 0 .8rem}
.fj-photo h3{font-size:1.18rem;line-height:1.4;margin:.3rem 0 .75rem;overflow-wrap:anywhere}
.fj-photo p{margin:.6rem 0 .9rem}
#fjPhotoDialog .fj-photo :is(.fj-photo-note,.fj-photo-privacy,small){color:var(--ph-muted)!important;font-size:.9rem}
.fj-photo-preview{display:block;width:100%;max-height:270px;object-fit:contain;border-radius:.8rem;background:#0d1b23;margin:.8rem 0}
.fj-photo-status{min-height:1.5em;font-weight:650}
#fjPhotoDialog .fj-photo button{min-height:46px;padding:.65rem .9rem;border:1px solid var(--ph-accent)!important;border-radius:.7rem;background:var(--ph-accent)!important;color:var(--ph-on)!important;font-family:inherit;font-size:1rem;font-weight:700;line-height:1.35;cursor:pointer;touch-action:manipulation;white-space:normal}
#fjPhotoDialog .fj-photo button.secondary{background:transparent!important;color:var(--ph-ink)!important;border-color:var(--ph-border)!important}
.fj-photo button:disabled{opacity:.5;cursor:default}
.fj-photo-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:.85rem 0}
.fj-photo-actions>button{flex:1 1 180px}
.fj-photo label{display:block;margin:.8rem 0 .35rem;font-weight:650}
.fj-photo label span{font-size:.8rem;font-weight:400;margin-left:.35rem}
#fjPhotoDialog :is(input:not([type=file]),textarea,select){box-sizing:border-box;min-width:0;min-height:46px;width:100%;padding:.65rem .75rem;border:1px solid var(--ph-border);border-radius:.6rem;background:var(--ph-card)!important;color:var(--ph-ink)!important;font:inherit}
.fj-photo textarea{resize:vertical}
.fj-photo-badge{display:inline-block;border:1px solid var(--ph-border);border-radius:2rem;padding:.2rem .7rem;font-weight:750;font-size:.85rem}
.fj-photo :is(.fj-photo-items,.fj-photo-assumptions ul){padding-left:1.3rem;margin:.65rem 0}
.fj-photo li{margin:.3rem 0}
.fj-photo :is(.fj-photo-edit,.fj-photo-assumptions){margin:.85rem 0;padding:.75rem;border:1px solid var(--ph-border);border-radius:.7rem;background:var(--ph-card)}
.fj-photo summary{min-height:34px;font-weight:700;cursor:pointer;list-style:revert}
.fj-photo-nutrients{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
.fj-photo-nutrients label{font-size:.85rem;margin:.35rem 0}
.fj-photo-nutrients small{display:block;margin:.3rem 0;line-height:1.35}
.fj-photo a{color:var(--ph-accent)!important;text-decoration:underline}
.fj-photo-privacy,.fj-photo-limits{border-top:1px solid var(--ph-border);padding-top:.85rem;margin-top:1.2rem!important}
.fj-photo-error{font-weight:700}
.fj-photo :is(button,input,textarea,select,a,summary):focus-visible,#fjPhotoDialog .fj-photo-close:focus-visible{outline:3px solid #efb75b;outline-offset:3px}
.fj-capture-entry{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;margin:.65rem 0}
.fj-capture-entry :is(#fjScanBarcode,#fjEstimatePhoto){display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:50px;width:100%;font:inherit;font-weight:700;touch-action:manipulation;white-space:normal}
.fj-capture-entry svg{width:1.4rem;height:1.4rem;flex:none}
.fj-photo-day-note{padding:.8rem 1rem;margin:.8rem 0;border:1px solid #6b8e84;border-radius:.7rem;font-size:.9rem;line-height:1.5}
@media(max-width:420px){#fjPhotoDialog{padding:.8rem}.fj-capture-entry{grid-template-columns:1fr}.fj-photo-nutrients{gap:.55rem}}
