:root{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","PingFang SC",sans-serif;color:#111;background:#f7f7f9;color-scheme:light;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0}button,input,a,summary{-webkit-tap-highlight-color:transparent}button,a{color:inherit}button{font:inherit;cursor:pointer;border:0;background:none;padding:0}input{font:inherit;color:inherit;border:0;border-radius:0;background:transparent;min-width:0;outline:none;padding:0}input:focus{box-shadow:0 1px 0 #008cff}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #008cff;outline-offset:3px}button:disabled{opacity:.4;cursor:wait}button img,a img{width:24px;height:24px;display:block}a{text-decoration:none}main{max-width:520px;margin:0 auto;min-height:100dvh;background:#f7f7f9}.topbar{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;background:#fff;font-size:16px}.topbar a{padding:10px 0}.topbar button,.blue{color:#008cff}.photo-stage{width:100%;aspect-ratio:1;background:#ececee;position:relative;display:grid;place-items:center;overflow:hidden}#preview{width:100%;height:100%;object-fit:cover;display:block}#placeholder{text-align:center;padding:30px 20px}#placeholder>img{width:36px;height:36px;opacity:.4}h1{font-size:25px;font-weight:500;line-height:1.5;letter-spacing:-.6px;margin:16px 0}#placeholder p{font-size:15px;color:#888}#placeholder button{display:block;margin:22px auto 14px;color:#008cff;font-size:17px}#placeholder small{font-size:12px;color:#96969b}#preview-unavailable{position:absolute;bottom:12px;padding:12px;max-width:90%;background:#ffffffdd;border-radius:12px;font-size:13px;color:#555}.photo-strip{display:flex;gap:8px;padding:10px 17px;overflow:auto;background:#fff}.photo-strip button{flex:0 0 46px;height:48px;border-radius:8px;overflow:hidden;opacity:.5;background:#e9e9ec}.photo-strip button.selected{opacity:1;outline:2px solid #008cff;outline-offset:2px}.photo-strip img{width:100%;height:100%;object-fit:cover}.caption{padding:16px 17px;background:#fff;min-height:48px;border-bottom:1px solid #e5e5e8}.caption input{width:100%;font-size:16px}.caption input::placeholder{color:#c4c4c8}.info-sheet{padding:16px 17px calc(125px + env(safe-area-inset-bottom))}.date-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;min-height:24px}.date-row button:first-child{text-align:left}#filename{font-size:14px;color:#909095;margin:5px 0 17px;overflow-wrap:anywhere}.camera-card{border-radius:10px;overflow:hidden;background:#ebebef;color:#8e8e93}.camera-top{display:flex;align-items:center;gap:5px;background:#dedee3;border-bottom:1px solid #d4d4d8;padding:7px;color:#111;min-height:31px}.camera-top input{font-size:16px}.camera-top [data-field=make]{width:42px}.camera-top [data-field=model]{flex:1;width:0}.camera-top #format{font-size:12px;color:#fff;background:#c9c9ce;border-radius:4px;padding:2px 5px;flex-shrink:0}.camera-main{padding:7px 7px 10px;line-height:1.6}.camera-main input{display:block;width:100%;font-size:14px}.camera-main button{display:block;text-align:left;font-size:14px;letter-spacing:.1px;margin-top:2px;color:#8e8e93}.exposure-row{display:grid;grid-template-columns:1fr 1fr .85fr .85fr 1.1fr;border-top:1px solid #d4d4d8;padding:7px 0;font-size:12px;align-items:center}.exposure-row label{display:flex;align-items:center;justify-content:center;gap:2px;min-width:0;padding:0 4px;position:relative}.exposure-row label+label:before{content:"";position:absolute;left:0;height:10px;width:1px;background:#d4d4d8}.exposure-row input{width:100%;max-width:40px;font-size:12px;text-align:center;field-sizing:content}.exposure-row [data-field=iso]{max-width:30px}.exposure-row [data-field=ev],.exposure-row [data-field=aperture]{max-width:27px}.wide{width:100%;border-radius:11px;background:#e8e8ed;margin-top:18px;min-height:47px;padding:13px 16px;font-size:16px}.reference-preset{display:flex;align-items:center;gap:12px;text-align:left;background:#ebebef;color:#111;font-size:14px;min-height:64px}.reference-preset>img:first-child{width:32px;height:32px}.reference-preset>img:last-child{width:14px;height:14px;margin-left:auto;opacity:.35;transform:rotate(-90deg)}.reference-preset small{display:block;color:#8e8e93;font-size:11px;margin-top:4px}details{margin-top:18px;border-radius:11px;background:#ebebef}summary{list-style:none;color:#008cff;text-align:center;padding:16px;font-size:15px;cursor:pointer}summary::-webkit-details-marker{display:none}.detail-editor,.date-editor{padding:14px;font-size:14px;background:#ebebef;border-radius:11px}.date-editor{margin:10px 0}.detail-editor label,.date-editor label{display:flex;align-items:center;gap:8px;margin-bottom:14px}.detail-editor label input:not([type=checkbox]),.date-editor input{background:#fff;border-radius:7px;padding:8px;width:100%;font-size:16px}.date-editor label{display:block}.date-editor input{display:block;margin-top:6px}input[type=checkbox]{width:18px;height:18px;accent-color:#008cff;flex-shrink:0}.detail-editor .toggle{font-size:13px}.detail-editor p,.privacy-note,#results p{font-size:12px;line-height:1.7;color:#909095;margin-bottom:0}.dimensions{display:flex;align-items:center;gap:10px}.dimensions label{min-width:0;flex:1;display:block}.dimensions input{display:block;margin-top:7px}#resolution-editor{margin-top:12px}.privacy-note{padding:0 4px;margin-top:18px}.bottom-tools{position:fixed;z-index:10;bottom:calc(20px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 34px);max-width:480px;display:flex;justify-content:space-between;align-items:center;gap:12px;pointer-events:none}.bottom-tools>*{pointer-events:auto;background:#fafaffcc;border:1px solid #fff;box-shadow:0 8px 40px #26263617,inset 0 1px 2px #fff;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.round{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;flex-shrink:0}.round img{width:28px;height:28px}.glass-pill{display:flex;align-items:center;justify-content:space-around;gap:18px;height:54px;padding:0 18px;border-radius:40px}.glass-pill button{width:34px;height:42px;display:grid;place-items:center}.glass-pill .info-button{font-family:Georgia,serif;font-weight:bold;font-size:20px;border-radius:50%;background:#080808;color:#fff;width:26px;height:26px}#status{position:fixed;bottom:calc(92px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#222e;color:white;padding:10px 17px;border-radius:14px;font-size:13px;max-width:90%;z-index:30;text-align:center}#results{padding:14px;margin-top:16px;background:#fff;border-radius:12px}#results h2{font-size:16px;font-weight:500;margin:0 0 12px}#download{display:inline-block;color:#008cff;padding:8px 16px 8px 0}#auth{position:fixed;inset:0;z-index:100;background:#f7f7f9;display:grid;place-items:center}#auth>div{width:280px;text-align:center}#keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}#keypad button{background:white;border-radius:18px;min-height:55px;font-size:22px}#dots{min-height:24px}#auth-error{color:#a33}#export.busy img{animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.4;transform:translateY(-3px)}}[hidden]{display:none!important}@media(min-width:768px){body{padding:24px}main{box-shadow:0 4px 60px #0000000c;border-radius:24px;overflow:hidden}.bottom-tools{max-width:470px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}
/* Compact photo workspace: regular document flow, with room for Safari chrome. */
#preview{position:absolute;inset:0;object-fit:contain;min-height:0}
main{min-height:0}.photo-stage{height:clamp(145px,27svh,240px);aspect-ratio:auto}#preview{object-fit:contain}#placeholder{padding:12px}#placeholder>img,#placeholder h1,#placeholder p{display:none}#placeholder button{margin:10px auto}#placeholder small{font-size:12px}.photo-strip{gap:6px;padding:5px 14px}.photo-strip button{height:32px;flex-basis:32px;border-radius:6px}.caption{min-height:0;padding:8px 14px}.info-sheet{padding:10px 14px calc(10px + env(safe-area-inset-bottom))}.date-row{min-height:28px}.date-row input{width:100%;height:28px;font-size:16px;text-align:left;-webkit-appearance:none;appearance:none}.date-row input::-webkit-date-and-time-value{text-align:left}#filename{display:block;width:100%;height:25px;font-size:16px;color:#909095;margin:2px 0 9px}.camera-main{padding:6px 7px}.camera-main input{font-size:16px}.camera-main button{font-size:13px}.exposure-row{padding:7px 0;font-size:12px}.exposure-row input{font-size:16px;max-width:48px}.exposure-row [data-field=iso]{max-width:35px}.exposure-row [data-field=ev],.exposure-row [data-field=aperture]{max-width:30px}.wide{margin-top:8px;min-height:34px;padding:8px 12px;font-size:14px}.reference-preset{min-height:43px;font-size:13px;gap:9px}.reference-preset>img:first-child{width:25px;height:25px}.reference-preset small{margin-top:2px;font-size:10px}details{margin-top:8px}summary{padding:8px;font-size:13px}.detail-editor{padding:10px}.detail-editor label{margin-bottom:9px}.compact-actions{display:flex;align-items:center;gap:8px;margin-top:10px;min-height:36px}.compact-actions>a,.compact-actions>button{display:grid;place-items:center;min-height:36px;flex-shrink:0}.compact-actions img{width:20px;height:20px}.compact-actions>a,.compact-actions>button:not(.blue):not(.save-button){width:30px}.compact-actions .blue{font-size:13px;margin-left:auto}.compact-actions .save-button{font-size:14px;background:#008cff;color:#fff;border-radius:12px;padding:0 12px;min-width:85px}#export.busy{animation:pulse 1s infinite}#results{margin-top:8px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px}#download-list{display:flex;align-items:center;gap:12px;font-size:13px;min-width:0}#download{padding:0;color:#008cff}#share-all,#share{font-size:13px}#status{bottom:auto;top:calc(8px + env(safe-area-inset-top));pointer-events:none;font-size:12px;padding:8px 12px}body{padding:0}@media(min-width:768px){body{padding:20px}.photo-stage{height:240px}}@media(max-width:360px){.compact-actions{gap:5px}.exposure-row{font-size:10px}.exposure-row label{padding:0 2px;gap:1px}.exposure-row input{letter-spacing:-.6px}.reference-preset small{font-size:9px}}
/* iPhone 15 Pro: square preview fits the small Safari viewport; keyboard never sets its size. */
body{padding-top:env(safe-area-inset-top)}
main{position:relative;min-height:calc(100svh - env(safe-area-inset-top));padding-top:12px}
.photo-stage{width:min(100%,max(160px,calc(100svh - 500px - env(safe-area-inset-top) - env(safe-area-inset-bottom))));height:auto;aspect-ratio:1 / 1;margin:0 auto;border-radius:14px;flex-shrink:0}
#preview{object-fit:contain}
.photo-strip{padding:8px 16px;gap:10px;margin-top:4px;justify-content:flex-start;background:transparent}
.photo-strip button{height:36px;flex-basis:36px;border-radius:8px}
.caption{padding:10px 16px;margin-top:6px}
.info-sheet{padding:12px 16px calc(14px + env(safe-area-inset-bottom))}
#filename{margin-bottom:12px}
.wide{margin-top:12px;min-height:40px;padding:10px 14px}
.reference-preset{min-height:48px}
summary{padding:10px}
#more-settings{margin-top:12px}
.compact-actions{gap:12px;margin-top:14px;min-height:40px}
.compact-actions>a,.compact-actions>button{min-height:40px}
.compact-actions .save-button{min-height:40px;padding:0 16px;border-radius:14px}
#results{margin-top:12px;padding:8px;gap:8px;border-radius:16px;min-height:48px}
#download-list{gap:8px;flex-wrap:wrap}
#download{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 13px;border-radius:12px;background:#008cff;color:#fff;font-size:14px;font-weight:500}
#share,#share-all{min-height:36px;padding:0 6px}
.floating-add{position:fixed;top:calc(12px + env(safe-area-inset-top));right:max(14px,calc((100vw - 520px)/2 + 14px));z-index:20;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#fafaffb8;border:1px solid #ffffffdd;box-shadow:0 6px 26px #26263617,inset 0 1px 2px #fff;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.floating-add img{width:25px;height:25px}
#status{max-width:calc(100% - 140px)}
@media(min-width:768px){body{padding:20px}.photo-stage{width:min(100%,max(240px,calc(100svh - 540px)));height:auto}.floating-add{top:32px}}
@media(prefers-reduced-transparency:reduce){.floating-add{background:#f7f7fb;backdrop-filter:none;-webkit-backdrop-filter:none}}
#download-list{display:flex;width:100%;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:16px}
.result-name{min-width:0;overflow-wrap:anywhere;font-size:14px;color:#68686e;text-align:left}
#share{flex:none;min-height:44px;padding:0 12px;white-space:nowrap;font-size:14px}
#preset-dialog{--preset-row:min(36px,calc((100dvh - 160px)/12));width:min(390px,calc(100% - 24px));max-height:none;max-width:none;padding:0;border:0;border-radius:28px;background:#f7f7f9f5;color:#3c3c43;box-shadow:0 18px 65px #17172324;overflow:hidden;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
#preset-dialog[open]{animation:preset-in .24s cubic-bezier(.2,.8,.2,1) both}
#preset-dialog::backdrop{background:#19192328;backdrop-filter:blur(3px);animation:preset-backdrop-in .24s ease both}
#preset-dialog header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px 10px;gap:16px}
#preset-dialog h2{font-size:16px;margin:0;font-weight:500;color:#26262a}
#preset-close{color:#008cff;min-height:38px;padding:0 17px;border:0;border-radius:20px;background:#fff9;box-shadow:0 2px 9px #2525350c;font-size:14px;transition:background .15s,transform .15s}
#preset-close:active{transform:scale(.96);background:#fff}
#preset-close:focus-visible{outline:none;background:#fff;box-shadow:0 3px 12px #25253520;color:#006dc7}
#preset-list{display:grid;grid-auto-rows:var(--preset-row);height:calc(12 * var(--preset-row));overflow-y:auto;overscroll-behavior:contain;gap:0;padding:0 10px;scrollbar-width:thin;margin-bottom:12px}
#preset-list button{display:block;width:100%;min-width:0;height:var(--preset-row);line-height:var(--preset-row);white-space:pre;text-align:left;padding:0 10px;background:transparent;border-radius:11px;font-size:12px;font-weight:400;letter-spacing:0;transition:background .15s}
#preset-list button:nth-child(odd){background:#fff8}
#preset-list button:hover,#preset-list button:focus-visible{background:#e8e8ef}
#preset-list button:active{background:#dddde8}
#preset-list .compact-text{font-size:11px}
#preset-list .small-text{font-size:10px}
#preset-dialog.closing{animation:preset-out .16s ease both}
#preset-dialog.closing::backdrop{animation:preset-backdrop-out .16s ease both}
@keyframes preset-in{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes preset-out{to{opacity:0;transform:translateY(8px) scale(.98)}}
@keyframes preset-backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes preset-backdrop-out{to{opacity:0}}
#results{display:block;background:transparent;padding:0}
#download-list{display:grid;gap:8px;width:100%}
.download-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:6px 12px;background:#fff;border-radius:16px;min-width:0}
.save-photo{flex:none;min-height:44px;padding:0 4px;white-space:nowrap;font-size:14px}
.result-name{font-size:12.6px;line-height:1.5}
.exposure-row input{font-size:12.8px;letter-spacing:0}
.exposure-row [data-field=ev]{max-width:40px}
.exposure-row{font-size:9.6px}
.camera-top input{font-size:13.6px}
.camera-top [data-field=make]{width:36px}
.camera-top #format{font-size:10.2px}
.camera-main input{font-size:13.6px}
.date-row{padding:4px 10px;background:#fff9;border-radius:12px;box-shadow:0 2px 9px #2525350b;margin-bottom:5px}
.date-row input,#filename{font-size:14.4px}

/* 卡片信息层级：普通文字缩小，时间与曝光参数保持醒目。 */
.caption input{font-size:14.4px}
.camera-top input{font-size:12.24px}
.camera-main input{font-size:12.24px}
.camera-main button{font-size:11.7px}
.date-row,.date-row input,#filename{font-size:15.55px}
.exposure-row{font-size:10.37px}
.exposure-row input{font-size:12.44px}

.location-editor{display:flex;align-items:center;gap:5px;color:#8e8e93;font-size:12px;margin-top:4px}.location-editor input{display:inline!important;width:80px!important;font-size:12px!important;color:inherit}.location-pin{font-size:16px}.location-adjust{margin-left:auto;color:#008cff}

.location-card{margin-top:12px;border-radius:22px;overflow:hidden;background:#f0f0f5}.map-placeholder{height:145px;background:linear-gradient(135deg,#d9edc4,#b9d9ec 55%,#8ed0e4);display:grid;place-items:center;color:#68747b;font-size:15px}.location-card{transform:scale(.96);transform-origin:top center;margin-bottom:-5px}.location-row{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;color:#1683ed;font-size:12px}.location-row button{color:#1683ed;font-size:12px}

.location-row input{flex:1;min-width:0;background:transparent;color:#1683ed;font:inherit;outline:none}.location-row input::placeholder{color:#1683ed}

#location-map{height:145px;background:#dceccb}.location-placeholder{display:grid;place-items:center}#location-suggestions{background:#fff;max-height:150px;overflow:auto}#location-suggestions button{display:block;width:100%;padding:8px 14px;text-align:left;color:#555;border-top:1px solid #eee;font-size:12px}

/* iPhone 可用视口：选择区与预览固定为居中的 1:1 方形。 */
.photo-stage{height:auto;aspect-ratio:1/1;max-height:none;background:#ececee}
#preview{width:100%;height:100%;object-fit:contain;object-position:center}
#placeholder{width:100%;height:100%;display:grid;place-items:center;padding:20px}
.info-sheet{padding-top:8px}
.date-row{margin-bottom:3px}
.camera-card{margin-top:4px}
.wide{margin-top:7px}
.reference-preset{min-height:40px}
details{margin-top:7px}
.compact-actions{margin-top:8px}
@media(min-width:768px){.photo-stage{height:auto;max-height:none}}

/* 照片容器本身（含背景留白）严格保持宽高相等。 */
.photo-stage{width:100%;height:0!important;padding:0!important;aspect-ratio:1/1;display:grid;overflow:hidden}
.photo-stage>#preview,.photo-stage>#placeholder{grid-area:1/1;width:100%;height:100%;min-width:0;min-height:0}

/* 修正方形容器高度计算，确保区域正常显示。 */
.photo-stage{height:auto!important;min-height:0;aspect-ratio:1/1}

/* 预览框改为比正方形矮 10%，图片完整居中显示。 */
.photo-stage{aspect-ratio:1/0.9;height:auto!important}
.photo-stage>#preview{object-fit:contain}

/* 预览框再降低 5%，图片铺满容器，允许边缘裁切。 */
.photo-stage{aspect-ratio:1/0.85}
.photo-stage>#preview{object-fit:cover}
#lens-edit { font-size:12px; padding:6px 0; text-align:left; }
#lens-editor:not([hidden]) { display:grid; grid-template-columns:2fr 1fr 1fr; gap:10px; padding:12px 0; }
#lens-editor label { min-width:0; font-size:12px; }
#lens-editor select,#lens-editor input { box-sizing:border-box; width:100%; margin-top:6px; border:0; border-radius:10px; padding:8px; background:#fff; font-size:16px; }
#lens-done { grid-column:1/-1; justify-self:end; border:0; border-radius:18px; padding:8px 22px; box-shadow:0 2px 8px #0001; }

/* Mobile audit pass: balance the photo preview and editing controls on iPhone widths. */
@media(max-width:699px){
  main{padding-top:calc(8px + env(safe-area-inset-top))}
  .photo-stage{height:clamp(260px,36svh,304px)!important;aspect-ratio:auto;width:100%;border-radius:0 0 20px 20px}
  .photo-stage>#preview,.photo-stage>#placeholder{height:100%;width:100%}
  .photo-strip{padding:7px 14px;gap:8px;margin-top:2px}
  .caption{padding:8px 14px;margin-top:4px}
  .info-sheet{padding:10px 14px calc(16px + env(safe-area-inset-bottom))}
  .date-row{min-height:44px;padding:4px 10px;margin-bottom:5px}
  .date-row input{height:34px}
  .camera-card{border-radius:16px;margin-top:5px}
  .wide{min-height:44px;margin-top:10px;padding:10px 13px}
  .reference-preset{min-height:50px;padding:8px 10px}
  details{margin-top:9px}
  summary{min-height:44px;padding:12px}
  .compact-actions{min-height:44px;gap:8px;margin-top:10px}
  .compact-actions>a,.compact-actions>button{min-height:44px}
  .compact-actions .save-button{min-height:44px}
}

/* Visual polish pass: bring the photo workspace into the same cream surface system. */
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;background:#f3f2f7;color:#242329}
main{background:#f3f2f7}
.photo-stage{background:#ebeaf0;box-shadow:inset 0 -1px 0 rgba(36,31,24,.04)}
.caption,.info-sheet{background:transparent}
.date-row,.camera-card,.wide,.reference-preset,details,#results,.download-row{border:1px solid rgba(36,31,24,.055);box-shadow:0 2px 7px rgba(36,31,24,.035),0 12px 26px rgba(36,31,24,.045)}
.date-row{background:#fffdfa}
.camera-card{background:#f5f3f0}
.camera-top{background:#ebe8e3;border-bottom-color:rgba(36,31,24,.06)}
.camera-main{background:#f8f6f3}
.wide,.reference-preset,details,#results,.download-row{background:#fffdfa}
.wide:disabled,.reference-preset:disabled{opacity:.68}
.reference-preset>img:first-child{opacity:.72}
.compact-actions>a,.compact-actions>button{transition:background .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
.compact-actions .save-button{box-shadow:0 4px 12px rgba(0,122,255,.16)}
@media(max-width:699px){
  .photo-stage{border-radius:0 0 22px 22px}
  .info-sheet{padding-top:12px}
  .date-row{border-radius:14px}
  .camera-card,.wide,.reference-preset,details,#results,.download-row{border-radius:17px}
}

/* Edit pixel dimensions directly beside the file-size label. */
.resolution-row{display:flex;align-items:center;gap:4px;max-width:100%;min-height:24px;margin-top:2px;font-size:11.7px;line-height:1.6;color:#8e8e93;white-space:nowrap}
.resolution-row #resolution{display:inline-flex;align-items:center;flex:none;margin:0;min-height:22px;font:inherit;color:inherit;letter-spacing:0}
.resolution-row :is(#resolution-width,#resolution-height){display:inline-block;width:5.6ch;max-width:5.6ch;height:22px;min-height:0;padding:0;flex:none;font:inherit;color:inherit;text-align:center;appearance:textfield;-moz-appearance:textfield}
.resolution-row input::-webkit-inner-spin-button,.resolution-row input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.resolution-row #photo-size{flex:none}

/* Generated photos stay still; only the row the user clicks gives feedback. */
body:has(.photo-stage) #download-list .download-row{
 animation:none;animation-delay:0s;transition:transform 100ms linear;
}
body:has(.photo-stage) #download-list .download-row.is-pressed{transform:translateY(1.5px)}
body:has(.photo-stage) #download-list .download-row .save-photo:active{transform:none}
@media(prefers-reduced-motion:reduce){body:has(.photo-stage) #download-list .download-row.is-pressed{transform:none}}

/* Native share recovery: show the original without changing the editor. */
.preview-photo{flex:none;min-height:36px;padding:0 3px;font-size:11px;white-space:nowrap}
.download-row:has(.preview-photo:not([hidden])){gap:8px}
#photo-save-dialog{width:min(420px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 48px);padding:16px;border:0;border-radius:22px;background:#fffdf8;color:#625d54;box-shadow:0 12px 40px #382b2424;overflow-y:auto}
#photo-save-dialog::backdrop{background:#24201a40}
#photo-save-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#photo-save-dialog h2{font-size:15px;font-weight:500;margin:0}
#photo-save-close{min-height:36px;padding:0 12px;color:#7c8c73;border-radius:12px;background:#f1eee7;font-size:12px}
#photo-save-name{font-size:12px;overflow-wrap:anywhere;margin:8px 0}
#photo-save-help{font-size:12px;color:#91897c;line-height:1.6;margin:8px 0 12px}
#photo-save-preview{display:block;width:100%;height:auto;max-height:50dvh;object-fit:contain;border-radius:12px;-webkit-user-select:auto;user-select:auto;-webkit-touch-callout:default}
#photo-save-download,#photo-save-retry{display:block;min-height:40px;margin:12px auto 0;padding:0 16px;font-size:12px}

/* Keep labels fixed while every numeric date/time segment has a text cursor. */
.date-row{display:flex;align-items:center;gap:6px;padding:5px 8px}
.date-row .date-parts,.date-row .time-parts{display:flex;align-items:center;gap:1px;min-width:0}
.date-row .time-parts{margin-left:auto}
.date-row .date-parts span,.date-row .time-parts span{font-size:10px;color:#a29b91;white-space:nowrap}
.date-row input[data-date-part]{width:2.1ch;min-width:0;height:28px;padding:0;text-align:center;font-size:inherit;font-variant-numeric:tabular-nums;box-shadow:none;border:0;outline:none}
.date-row input[data-date-part="year"]{width:4.2ch}
.date-row #date-picker-open{display:grid;place-items:center;width:26px;height:28px;flex:none;margin:0;padding:0;border-radius:8px;background:#f0ece4}
#date-picker-open img{width:15px;height:15px;opacity:.55}
#photo-archive.floating-add{right:max(62px,calc((100vw - 520px)/2 + 62px))}
#photo-archive.has-draft::after{content:"";position:absolute;right:5px;top:5px;width:5px;height:5px;border-radius:50%;background:#91a182}
#date-picker-dialog,#archive-dialog{width:min(390px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 48px);padding:16px;border:0;border-radius:22px;background:#fffdf8;color:#625d54;box-shadow:0 12px 40px #382b2424;overflow:auto}
#date-picker-dialog::backdrop,#archive-dialog::backdrop{background:#24201a40}
#date-picker-dialog header,#archive-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#date-picker-dialog h2,#archive-dialog h2{font-size:15px;font-weight:500;margin:0}
#date-picker-dialog p,#archive-dialog p{font-size:12px;line-height:1.7;color:#91897c}
#date-picker-done,#archive-close,#archive-apply{min-height:36px;padding:0 12px;border-radius:12px;background:#f1eee7;color:#8b7563;font-size:12px}
#archive-apply{display:block;width:100%;margin-top:14px}
#date-picker-dialog input{display:block;width:100%;padding:10px;margin-top:12px;font-size:16px;border-radius:10px;background:#f5f1e9}
@media(max-width:350px){.date-row{gap:3px;padding-inline:6px}.date-row .date-parts span,.date-row .time-parts span{font-size:9px}.date-row input[data-date-part]{font-size:13px}.date-row #date-picker-open{width:23px}}
