:root { --paper:#fffaf5; --surface:#fff; --ink:#352b29; --muted:#80726e; --coral:#e87554; --line:#eadfd7; --safe-b:env(safe-area-inset-bottom,0px); font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; color:var(--ink); background:#f4e8df; }
* { box-sizing:border-box; }
body { margin:0; font-size:15px; line-height:1.6; }
button,input { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.5; }
[hidden] { display:none!important; }
button:focus-visible,a:focus-visible,input:focus-visible { outline:3px solid #bb573a; outline-offset:3px; }
#app { max-width:480px; min-height:100dvh; background:var(--paper); margin:auto; box-shadow:0 0 80px #714e3610; }
.app-header { position:sticky; top:0; z-index:5; padding:calc(12px + env(safe-area-inset-top,0px)) 20px 12px; display:flex; align-items:center; justify-content:space-between; background:#fffaf5f5; border-bottom:1px solid var(--line); }
.brand { color:var(--ink); text-decoration:none; font-weight:800; font-size:18px; display:flex; align-items:center; gap:9px; }
.brand-icon { display:grid; place-items:center; color:#fff; background:var(--coral); width:30px; height:30px; border-radius:10px; }
.brand-icon svg { width:21px; height:21px; }
main { padding:0 20px 24px; }
h1,h2,p { margin:0; }
h1 { font-size:27px; line-height:1.3; letter-spacing:-.5px; margin:14px 0; }
h2 { font-size:18px; }
p { margin:10px 0; }
.eyebrow { font-size:10px; font-weight:700; letter-spacing:2.2px; color:var(--coral); }
.intro { padding:35px 8px 20px; }
.intro h1 { font-size:39px; line-height:1.35; margin:14px 0; }
.intro p { color:var(--muted); }
.card { background:var(--surface); padding:22px; border:1px solid var(--line); border-radius:20px; margin:16px 0; box-shadow:0 8px 28px #714e3607; }
.muted { color:var(--muted); font-size:14px; }
.small { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
label { display:block; font-size:13px; font-weight:700; margin:16px 0 8px; }
input[type=text] { width:100%; min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--paper); padding:14px 10px; color:var(--ink); font-size:16px; letter-spacing:.6px; }
.btn-primary { display:block; width:100%; padding:14px 16px; border:0; border-radius:12px; font-weight:700; background:var(--coral); color:white; min-height:48px; }
.btn-primary:hover:not(:disabled) { background:#d96647; }
.btn-mini { background:white; border:1px solid var(--line); color:var(--ink); border-radius:9px; padding:6px 12px; font-size:12px; min-height:34px; }
.btn-ghost { background:none; border:0; color:var(--muted); padding:12px 0; min-height:44px; }
.card>.btn-ghost { width:100%; }
.btn-link { border:0; background:none; color:var(--muted); text-decoration:underline; padding:8px; }
.btn-danger { width:100%; border:1px solid #e7c3bc; background:none; color:#a34834; border-radius:12px; padding:12px; margin-top:24px; }
.error { color:#b4422f; min-height:24px; font-size:13px; }
.notice { color:#87543e; background:#fff0e5; border-radius:12px; font-size:13px; padding:12px 14px; margin:12px 0; overflow-wrap:anywhere; }
#network-banner { margin:0; border-radius:0; text-align:center; }
.home-title { margin-top:26px; display:flex; align-items:center; gap:10px; justify-content:space-between; }
.home-title h1 { font-size:25px; }
.pill { color:#a25038; background:#ffeddf; font-size:11px; font-weight:600; padding:6px 10px; border-radius:20px; flex-shrink:0; }
.hero-image { position:relative; height:260px; border-radius:20px; overflow:hidden; background:#e7dacd; }
.hero-image>img { width:100%; height:100%; object-fit:cover; object-position:center 30%; }
.hero-image>div { position:absolute; bottom:0; padding:36px 20px 17px; width:100%; background:linear-gradient(transparent,#211711bc); color:white; }
.hero-image span,.hero-image p { font-size:12px; }
.hero-image p { margin:5px 0 0; }
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:27px 0 14px; }
.history { display:grid; gap:10px; }
.history-item { display:block; text-align:left; width:100%; background:#fff; border:1px solid var(--line); border-radius:14px; padding:15px 16px; color:var(--ink); }
.history-item b { display:block; font-size:15px; }
.history-item span { display:block; font-size:12px; color:var(--muted); margin-top:5px; }
.empty { text-align:center; padding:30px 16px; border:1px dashed var(--line); border-radius:14px; color:var(--muted); font-size:13px; }
.photo-preview { display:block; width:100%; max-height:340px; object-fit:contain; border-radius:12px; background:var(--paper); }
fieldset { border:0; padding:0; margin:20px 0 12px; }
legend { font-size:14px; font-weight:700; padding:0 0 8px; }
.group-options { display:flex; gap:10px; }
.group-options button { flex:1; padding:11px; border:1px solid var(--line); color:var(--ink); background:white; border-radius:10px; }
.group-options button[aria-pressed=true] { color:#a54429; background:#fff0e5; border-color:var(--coral); }
.progress-card h1 { margin-top:9px; }
progress { display:block; height:9px; width:100%; border:0; border-radius:8px; overflow:hidden; accent-color:var(--coral); background:#f2e8de; }
progress::-webkit-progress-bar { background:#f2e8de; }
progress::-webkit-progress-value { background:var(--coral); border-radius:8px; }
.save-reminder { position:sticky; top:calc(64px + env(safe-area-inset-top,0px)); z-index:4; font-weight:700; }
.result-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px; }
.result-tile { min-width:0; border:1px solid var(--line); border-radius:14px; padding:0; overflow:hidden; background:white; color:var(--ink); text-align:left; }
.tile-image { display:block; width:100%; aspect-ratio:1; background-color:#f1e8df; background-repeat:no-repeat; }
.tile-label { display:block; padding:9px 10px; font-size:12px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.tile-placeholder { display:grid; place-items:center; height:100%; font-size:12px; color:var(--muted); }
footer { display:flex; align-items:center; flex-direction:column; padding:8px 16px calc(22px + var(--safe-b)); font-size:11px; color:var(--muted); }
dialog { width:min(94vw,460px); max-height:92dvh; border:0; border-radius:20px; background:var(--paper); color:var(--ink); padding:20px; overflow:auto; box-shadow:0 15px 60px #0004; }
dialog::backdrop { background:#2419169c; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.detail-image { display:block; width:100%; max-height:60dvh; object-fit:contain; border-radius:10px; user-select:auto; -webkit-touch-callout:default; }
.detail-nav { display:flex; gap:8px; align-items:center; margin-top:14px; }
.detail-nav>.btn-primary { flex:1; width:auto; padding:12px 8px; }
.detail-nav>.btn-mini { flex:none; }
.privacy-list { padding-left:18px; font-size:13px; }
.privacy-list li { margin:14px 0; }
.privacy-list b { display:block; }
#toast { position:fixed; left:50%; bottom:calc(28px + var(--safe-b)); transform:translateX(-50%); width:max-content; max-width:88vw; padding:12px 18px; border-radius:12px; z-index:20; color:white; background:#352b29ee; font-size:13px; text-align:center; }
@media(max-width:360px) { main { padding-inline:14px; } .card { padding:17px; } .intro h1 { font-size:34px; } .home-title { flex-wrap:wrap; } }
@media(prefers-reduced-motion:no-preference) { .view { animation:appear .18s ease; } @keyframes appear { from { opacity:.6; transform:translateY(4px); } to { opacity:1; transform:none; } } }
