:root{--red:#CF2030;--red-d:#a8182a;--ink:#1d1d1f;--grey:#5f6368;--line:#e3e3e6;--bg:#f6f6f7;--ok:#16794a}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg)}
.wrap{max-width:720px;margin:0 auto;padding:0 16px}
[hidden]{display:none!important}
.top{background:#fff;border-bottom:3px solid var(--red);position:sticky;top:0;z-index:5}
.top-in{display:flex;align-items:center;gap:12px;min-height:64px}
.top-in img{border-radius:8px}
.top-t{display:flex;flex-direction:column;line-height:1.15;flex:1}
.top-t b{color:var(--red);font-size:18px}
.top-t span{font-size:13px;color:var(--grey)}
main{padding:16px 16px 120px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;margin:0 0 14px}
h1{font-size:22px;margin:0 0 6px}
h2{font-size:17px;margin:0 0 4px}
.muted{color:var(--grey)}
.small{font-size:13px}
.center{text-align:center}
.hint{font-size:13px;color:var(--grey);margin:0 0 10px}
label{display:block;font-weight:600;font-size:14px;margin:12px 0 6px}
input,textarea{width:100%;font:inherit;font-size:17px;padding:12px;border:1.5px solid #c9c9cf;border-radius:10px;background:#fff;color:var(--ink)}
textarea{font-size:15px;resize:vertical}
input:focus,textarea:focus,button:focus-visible,a:focus-visible,.pick:focus-within{outline:3px solid rgba(207,32,48,.35);outline-offset:1px;border-color:var(--red)}
.pin{letter-spacing:.6em;text-align:center;font-size:24px;max-width:200px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:14px;padding:14px 18px;border:0;border-radius:12px;background:var(--red);color:#fff;font:inherit;font-weight:700;font-size:17px;cursor:pointer}
.btn:hover{background:var(--red-d)}
.btn[disabled]{opacity:.6;cursor:progress}
.btn.ghost{background:#fff;color:var(--red);border:1.5px solid var(--red);width:auto;margin:0;padding:9px 14px;font-size:15px}
.link-btn{background:none;border:0;color:var(--red);font:inherit;font-weight:600;padding:8px 0;cursor:pointer}
.msg{min-height:1.2em;margin:10px 0 0;color:var(--red);font-weight:600;font-size:14px}
.msg.ok{color:var(--ok)}
.who{background:#fdf1f2;border-radius:10px;padding:10px 12px;margin:14px 0 0;font-size:15px}
.login{margin-top:12px}
.hello h1{color:var(--red)}
.info{font-size:14px;background:#fdf1f2;border-left:4px solid var(--red);padding:8px 10px;border-radius:6px;margin:10px 0 0}
.saved{font-size:14px;color:var(--ok);font-weight:600}
.saved:empty{display:none}
.hello .saved{display:block;margin-top:10px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid .card{margin:0 0 14px}
@media (max-width:560px){.grid{grid-template-columns:1fr;gap:0}}
.prev{display:flex;align-items:center;gap:12px;min-height:84px;border:1.5px dashed #d3d3d8;border-radius:12px;padding:10px;background:#fafafa;margin-bottom:10px}
.prev img{max-width:120px;max-height:120px;border-radius:8px;object-fit:contain;background:#fff;border:1px solid var(--line)}
.prev.photo img{width:96px;height:120px;object-fit:cover}
.prev .meta{font-size:14px;min-width:0;overflow-wrap:anywhere}
.prev .meta b{display:block}
.prev .meta a{color:var(--red);font-weight:600}
.prev .empty{color:var(--grey);font-size:14px}
.ficon{flex:none;width:52px;height:64px;border-radius:8px;background:var(--red);color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;text-transform:uppercase}
.acts{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.pick{position:relative;display:inline-flex}
.pick input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.del{background:none;border:0;color:var(--grey);font:inherit;font-size:14px;text-decoration:underline;cursor:pointer;padding:6px 0}
.up .msg{margin-top:8px}
.bar{height:6px;background:#eee;border-radius:3px;overflow:hidden;margin-top:8px}
.bar i{display:block;height:100%;width:0;background:var(--red);transition:width .2s}
.noz{margin:0;padding-left:22px}
.noz li{margin:0 0 8px}
.noz input{font-size:16px;padding:10px}
.noz li::marker{color:var(--red);font-weight:700}
.savebar{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:10px 16px calc(10px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:12px;justify-content:center;z-index:6}
.savebar .btn{margin:0;width:auto;min-width:160px}
.foot{font-size:13px;color:var(--grey);padding-bottom:90px}
.foot a{color:var(--grey)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.up .msg:empty,#noz-msg:empty{display:none}
.up .acts{margin-bottom:2px}
