*{box-sizing:border-box}
:root{font-family:system-ui,"Microsoft YaHei",sans-serif;color:#193227;background:#f7f2e9;--ink:#193227;--line:#e4dccd;--white:#fffdf7}
body{margin:0;min-width:300px}
[hidden]{display:none!important}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;border-radius:10px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #987740;outline-offset:2px}
.top{height:72px;padding:0 max(5vw,20px);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px}
.brand{display:inline-flex;align-items:center;gap:10px;font-weight:850;text-decoration:none;color:inherit}
.mark{width:32px;height:32px;border-radius:9px;background:var(--ink);display:grid;align-content:center;gap:2px;padding:7px}
.mark i{height:2px;background:#ff846f;border-radius:10px}.mark i:nth-child(2){width:85%;background:#ffaf72}.mark i:nth-child(3){width:70%;background:#f9d27a}.mark i:nth-child(4){width:55%;background:#dce68b}.mark i:nth-child(5){width:40%;background:#a9d9ad}
#save-state{font-size:.87rem;color:#53675a}
main{max-width:1200px;margin:auto;padding:46px 30px 55px}
.heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:26px}
h1,h2,p{margin:0}h1{font-size:clamp(2.9rem,8vw,6rem);letter-spacing:-.09em;line-height:.98;font-weight:950}h1 span{color:#bd4e36}
.heading p{margin-top:15px;color:#58685b}
.primary,.secondary{min-height:44px;padding:10px 18px;font-weight:750}
.primary{background:var(--ink);color:var(--white)}.primary:hover{background:#2b4a39}.primary:disabled{opacity:.6}
.secondary{background:#efe8da}.text{background:none;color:#486153;min-height:42px;padding:6px 8px;text-decoration:underline;text-underline-offset:3px}.danger{color:#9e3c2e}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,320px);align-items:start;gap:18px}
.paper{border:1px solid var(--line);background:var(--white);border-radius:18px;box-shadow:0 12px 30px #4b3e2510}
.chart{overflow:hidden}
.chart-header,.tray{padding:20px}.chart-header label{display:block;font-size:.875rem;color:#556759}
input:not([type=checkbox]):not([type=file]),select{border:1px solid #d9d1c2;border-radius:8px;background:#fcf8ef;padding:9px 11px;width:100%}
#board-title{font-weight:800;font-size:1.45rem;border-color:transparent;background:transparent;padding:4px 0;margin-top:3px}
.row{display:grid;grid-template-columns:minmax(74px,108px) minmax(0,1fr);min-height:89px;border-top:1px solid var(--line)}
.row input.tier-name{font-size:1rem;font-weight:900;text-align:center;background:var(--tier);border:0;border-radius:0;padding:7px 3px;min-width:0}
.cards{display:flex;align-content:center;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;padding:10px;min-height:68px;transition:background-color .12s}
.row .cards{background:color-mix(in srgb,var(--tier) 16%,var(--white))}
.cards.over{background:#dfebe0;box-shadow:inset 0 0 0 2px #557962}
.card{display:flex;align-self:center;max-width:100%;min-width:0;align-items:stretch;border-radius:10px;border:1px solid #ded6c7;background:#f7f2e9;position:relative}
.card.before{box-shadow:-4px 0 var(--ink)}.card.origin{opacity:.35}
.card-edit{background:none;font-weight:700;padding:7px 8px;border-radius:8px;min-width:0;overflow-wrap:anywhere}
.card-edit img{display:block;width:86px;height:86px;object-fit:cover;border-radius:6px;margin:0 auto 5px}
.card-edit.photo{width:104px;display:block}
.grip{touch-action:none;align-self:stretch;border-left:1px solid #ded6c7;padding:0 7px;background:none;border-radius:0 8px 8px 0;color:#56705f;cursor:grab;font-size:1.2rem}
.tray-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}
.tray h2,dialog h2{font-size:1.125rem}
#count,.chart-foot{color:#56695d;font-size:.88rem}
.chart-foot{padding:13px 16px;border-top:1px solid var(--line)}
#pool{border:1px dashed #d8ccba;border-radius:12px;min-height:100px;margin-bottom:12px;justify-content:flex-start}
.empty{color:#5e7065;font-size:.89rem}.add{width:100%}.tray-tools{display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:8px}
dialog{max-width:min(460px,calc(100vw - 28px));width:100%;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--white);color:var(--ink)}
dialog::backdrop{background:#152d25a0}
.dialog-head,.dialog-buttons{display:flex;justify-content:space-between;align-items:center;gap:10px}
.dialog-head{margin-bottom:12px}.dialog-buttons{justify-content:flex-end;margin-top:12px;flex-wrap:wrap}
dialog label{display:block;margin:10px 0 4px;font-weight:650}
dialog p{margin-top:10px;line-height:1.55;color:#4c6054}
.picture{display:flex;gap:12px;align-items:center;margin:10px 0}.picture img{width:96px;height:96px;border-radius:8px;object-fit:cover}
#link-output{margin-top:10px}
#notice{position:fixed;bottom:14px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;border-radius:10px;padding:9px 14px;z-index:4;max-width:90vw}
#notice:empty{display:none}
.ghost{pointer-events:none;position:fixed;z-index:5;transform:translate(-50%,-112%);background:var(--ink);color:white;border-radius:10px;padding:8px;max-width:130px;text-align:center;box-shadow:0 8px 20px #182c2455}
.ghost img{display:block;width:68px;height:68px;border-radius:6px;object-fit:cover;margin:auto auto 4px}
body.dragging{user-select:none}
@media(max-width:740px){.top{height:60px}main{padding:28px 14px 38px}.heading{align-items:center;gap:10px;margin-bottom:20px}.heading .primary{padding-inline:12px;white-space:nowrap}.workspace{grid-template-columns:1fr;gap:12px}.row{grid-template-columns:78px minmax(0,1fr);min-height:67px}.chart-header,.tray{padding:14px}.card-edit img{width:70px;height:70px}.card-edit.photo{width:84px}.grip{padding-inline:9px}}
