:root{--paper:#f4f2ec;--panel:#f8f6f1;--line:#d9d6cd;--ink:#2a2a28;--muted:#7c7b76;--faint:#9a988f;--soft:#edeae2;color-scheme:light}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{height:100%;background:#cfcdc7}
body{margin:0;min-height:100%;padding:20px;display:grid;place-items:center;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;color:var(--ink);-webkit-font-smoothing:antialiased}
button,a,input{-webkit-appearance:none;font:inherit}
button,a{touch-action:manipulation}
button{cursor:pointer;color:inherit}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible{outline:2px solid var(--ink);outline-offset:5px}
h1,h2,h3,p{margin:0}
.phone{width:100%;max-width:560px;height:min(880px,92dvh);min-height:540px;background:var(--paper);position:relative;overflow:hidden}
.screen{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;animation:appear .25s ease}
@keyframes appear{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
.cover{padding:32px 26px 24px;text-align:center;display:flex;flex-direction:column;align-items:center}
.wordmark{font-size:66px;font-weight:850;letter-spacing:-3px;line-height:1}
.cover-sub{font-size:22px;font-weight:600;line-height:1.5;margin-top:16px}
.dog-stage{width:210px;height:210px;flex-shrink:0;margin:16px auto 6px;display:grid;place-items:center}
.dog-art{width:100%;height:100%;overflow:visible;display:block}
.dog-eye{transform-box:fill-box;transform-origin:center;animation:blink 5s infinite}
.dog-tail{transform-box:fill-box;transform-origin:left bottom;animation:sway 3s ease-in-out infinite alternate}
@keyframes blink{0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.08)}}
@keyframes sway{from{transform:rotate(-4deg)}to{transform:rotate(5deg)}}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;border:1px solid var(--ink);background:var(--ink);color:var(--paper);padding:16px 32px;min-height:54px;font-weight:600;font-size:16px;transition:background .15s,transform .15s}
.btn:hover{background:#40403b}
.btn:active{transform:scale(.98)}
.btn.ghost{background:transparent;color:var(--ink)}
.btn.ghost:hover{background:var(--soft)}
.cover>.btn{padding-inline:44px}
.hint,.cover-count{font-size:12px;color:var(--faint);line-height:1.8;margin-top:16px}
.cover-count{margin-top:8px}
.cover-links{display:flex;flex-wrap:wrap;justify-content:center;gap:20px;margin-top:18px}
.text-button{border:0;background:none;padding:6px 0;color:var(--muted);font-size:12px;text-underline-offset:4px}
.text-button:hover{text-decoration:underline;color:var(--ink)}
.cover-foot{margin-top:auto;padding-top:30px;color:var(--faint);font-size:11px;line-height:1.8;letter-spacing:.03em}
.quiz{padding:22px 24px;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:23px;margin-bottom:8px;font-size:13px;color:var(--faint);font-weight:600;letter-spacing:.05em}
.back{border:0;background:none;padding:2px 4px;font-size:19px;line-height:1;color:var(--ink);min-width:28px;min-height:28px}
.bar{height:4px;background:var(--line);flex-shrink:0}
.bar>i{display:block;background:var(--ink);height:100%;transition:width .2s}
.q-card{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;margin:8px 0 20px;min-height:220px}
.q-dog{width:132px;height:132px;flex-shrink:0;margin-bottom:10px}
.q-label{font-size:11px;letter-spacing:.22em;font-weight:600;text-align:center;margin-bottom:14px}
.q-title{font-size:29px;font-weight:800;line-height:1.4;letter-spacing:-.02em;text-align:center;outline:none}
.opts{display:flex;flex-direction:column;gap:11px}
.opt{width:100%;border:1px solid var(--line);background:var(--panel);min-height:58px;display:flex;align-items:center;gap:12px;text-align:left;padding:16px 18px;line-height:1.6;font-size:16px;transition:border-color .15s,background .15s}
.opt:hover,.opt.selected{border-color:var(--ink);background:var(--soft)}
.dot{width:10px;height:10px;flex-shrink:0;border-radius:50%;background:var(--line)}
.selected .dot{background:var(--ink)}
.quiz-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;font-size:11px;color:var(--faint)}
.result{padding-bottom:26px}
.result-top{padding:18px 24px 0;display:flex;justify-content:space-between;align-items:center;color:var(--faint);font-size:12px}
.res-hero{padding:8px 24px 24px;text-align:center}
.res-dog{width:150px;height:150px;margin:0 auto 10px}
.res-label{font-size:11px;letter-spacing:.24em;color:var(--muted)}
.res-name{font-size:44px;font-weight:800;line-height:1.4;margin-top:8px}
.res-title{font-size:17px;font-weight:600;margin-top:6px;line-height:1.6}
.tags{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:18px}
.tag{padding:6px 13px;border:1px solid var(--line);background:var(--soft);font-size:12px;color:var(--muted)}
.res-body{padding:0 24px}
.panel{border:1px solid var(--line);background:var(--panel);padding:20px;margin-bottom:14px}
.res-desc{font-size:15px;line-height:1.95;color:var(--muted)}
.section-label{font-size:12px;font-weight:600;margin-bottom:10px;letter-spacing:.04em}
.advice{font-size:14px;line-height:1.9;color:var(--muted)}
.chart{display:flex;gap:7px;align-items:flex-end;margin-top:18px}
.bar-item{flex:1;min-width:0;text-align:center}
.bar-val{font-size:10px;color:var(--muted);margin-bottom:6px}
.bar-track{height:100px;background:var(--soft);display:flex;align-items:flex-end}
.bar-fill{background:var(--ink);width:100%;min-height:2px}
.bar-label{font-size:10px;color:var(--muted);margin-top:8px;white-space:nowrap}
.chart-note{font-size:11px;line-height:1.8;color:var(--faint);margin-top:14px}
.pair{background:var(--soft);border:1px solid var(--line);padding:14px 16px;margin-bottom:10px;font-size:13px;color:var(--muted);line-height:1.9}
.pair b{color:var(--ink);font-weight:600}
.actions{display:flex;flex-direction:column;gap:10px;margin:22px 24px 0}
.action-row{display:flex;gap:10px}
.action-row>*{flex:1;padding-inline:10px;font-size:14px}
.result-note{text-align:center;margin:20px 24px 0;font-size:11px;line-height:1.8;color:var(--faint)}
.result-dogs{display:flex;justify-content:center;margin:0 auto 12px}
.result-dog{width:150px;height:150px;flex-shrink:0}
.result-dogs.multiple{display:grid;grid-template-columns:repeat(auto-fit,minmax(85px,1fr));max-width:400px;gap:8px;margin-bottom:24px}
.multiple .result-dog{width:100%;height:auto;text-align:center;max-width:150px;justify-self:center}
.multiple .result-dog span{display:block;font-size:12px;color:var(--muted);line-height:1.6}
.score-summary{font-size:12px;line-height:1.9;color:var(--muted);margin-bottom:14px;text-align:center}
.tie-story{padding:20px;border:1px solid var(--line);background:var(--panel);margin-bottom:14px}
.tie-story h3{font-size:15px;margin-bottom:10px}
.tie-story p{font-size:14px;line-height:1.95;color:var(--muted)}
.tie-story .tie-advice{margin-top:12px;font-size:13px}
.res-name{overflow-wrap:anywhere}
.text-button{min-height:44px;min-width:44px}
.back{min-height:44px;min-width:44px}
.page{padding:20px 24px 28px}
.page-head{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.page-head h1{font-size:19px;font-weight:650}
.page-head .back{border:1px solid var(--line);font-size:13px;padding:8px 12px}
.gallery-list{display:grid;gap:14px}
.g-card{padding:18px;border:1px solid var(--line);background:var(--panel)}
.g-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.g-dog{width:66px;height:66px;flex-shrink:0}
.g-card h2{font-size:17px;margin-bottom:6px}
.g-title{font-size:12px;color:var(--muted)}
.g-card .tags{justify-content:flex-start;margin:10px 0}
.g-card .tag{font-size:10px;padding:3px 8px}
.g-desc{font-size:13px;line-height:1.9;color:var(--muted)}
.vote-note,.muted{color:var(--muted);font-size:13px;line-height:1.8;margin-bottom:16px}
.vote-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;border:1px solid var(--line);padding:18px 16px;background:var(--panel);margin-bottom:12px;font-size:15px;line-height:1.7}
.vote-item.chosen{border-color:var(--ink);background:var(--soft)}
.vote-status{white-space:nowrap;font-size:12px;color:var(--muted)}
.prose{font-size:14px;line-height:2;color:var(--muted)}
.prose p+p{margin-top:16px}
.prose strong{color:var(--ink)}
.toast{position:fixed;bottom:max(28px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,12px);max-width:calc(100vw - 32px);width:max-content;pointer-events:none;background:var(--ink);color:var(--paper);padding:12px 18px;font-size:13px;line-height:1.6;opacity:0;transition:opacity .2s,transform .2s;z-index:10}
.toast.show{opacity:1;transform:translate(-50%,0)}
dialog{border:1px solid var(--line);background:var(--paper);color:var(--ink);padding:20px;width:min(440px,calc(100vw - 32px));max-height:90dvh;overflow:auto}
dialog::backdrop{background:#23232199}
.dialog-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}
.dialog-head h2{font-size:17px}
#poster-image{display:block;width:100%;height:auto;margin-bottom:16px}
#download-poster{width:100%}
@media(max-width:600px){body{padding:0;background:var(--paper)}html{background:var(--paper)}.phone{max-width:560px;height:100dvh;min-height:0}.cover{padding-top:calc(32px + env(safe-area-inset-top));padding-bottom:calc(24px + env(safe-area-inset-bottom))}.quiz{padding-top:calc(20px + env(safe-area-inset-top));padding-bottom:calc(20px + env(safe-area-inset-bottom))}.q-title{font-size:clamp(22px,6.3vw,29px)}.page{padding-top:calc(20px + env(safe-area-inset-top))}.res-name{font-size:38px}}
@media(max-height:700px){.quiz .q-card{min-height:140px;margin-bottom:16px}.quiz .q-dog{width:90px;height:90px;margin-bottom:6px}.quiz .q-title{font-size:24px}.quiz .opt{min-height:52px;padding:12px 14px}.cover-foot{padding-top:18px}.dog-stage{width:180px;height:180px}.wordmark{font-size:60px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
