#themeDialog{width:min(760px,94vw);max-height:90dvh;overflow:auto;box-sizing:border-box;border:2px solid #756449;border-radius:6px;background:#f7f0df;color:#463e32;padding:24px;font:16px/1.5 Georgia,'ZCOOL KuaiLe',serif;box-shadow:0 16px 70px #201c1766}
#themeDialog::backdrop{background:#151f29bb;backdrop-filter:blur(5px)}
#themeDialog header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #cbbd9e;padding-bottom:12px}
#themeDialog h2{margin:5px 0;font-size:30px}#themeDialog small{font:11px/1.5 sans-serif;letter-spacing:2px;color:#7a6b52}
#themeClose{font-size:26px;border:0;background:none;color:inherit;min-width:44px;min-height:44px;cursor:pointer}
.theme-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.theme-card{background:#fff9e9;border:1px solid #c5b795;overflow:hidden;box-shadow:3px 4px 0 #dacfb6}.theme-card img{display:block;width:100%;height:auto}.theme-card>div{padding:16px}.theme-card h3{font-size:25px;margin:5px 0}.theme-card p{font-size:14px;min-height:42px}.theme-card button{width:100%;padding:12px;border:1px solid #6c7f67;border-radius:4px;background:#536e5a;color:#fff7de;font:inherit;cursor:pointer}.theme-card.ink button{background:#923e34;border-color:#923e34}.theme-note{font-size:13px;color:#746950;border-top:1px solid #cbbd9e;padding-top:14px}
#themeBadge{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);z-index:15;pointer-events:none;background:#f7ecd7ee;color:#493d31;border:1px solid #8a7757;padding:5px 12px;font:12px/1.4 Georgia,'ZCOOL KuaiLe',serif;white-space:nowrap}
body[data-td-theme] #hud .pill,body[data-td-theme] #weaponPill,body[data-td-theme] #hint,body[data-td-theme] #banner{background:#f5e8ccee;color:#4c4535;border-color:#9c8b63;box-shadow:2px 3px 0 #65553c44;border-radius:5px}
body[data-td-theme] #hpFill{background:#b65d46}body[data-td-theme] #pauseBtn{background:#f4e7ca;color:#514333;border:2px solid #998263;border-radius:50%}
body[data-td-theme="ink"] #hud .pill,body[data-td-theme="ink"] #hint,body[data-td-theme="ink"] #weaponPill{border-radius:1px;border-color:#6a7366;background:#e9e2d0ee;color:#303c35}
body[data-td-theme="ink"] #banner{border-left:6px solid #a74435;background:#e9e2d0ee}
@media(max-width:560px){#themeDialog{padding:16px}.theme-cards{grid-template-columns:1fr;gap:14px}.theme-card{display:grid;grid-template-columns:40% 60%}.theme-card img{height:100%;object-fit:cover}.theme-card>div{padding:12px}.theme-card h3{font-size:21px}.theme-card small{font-size:9px;letter-spacing:1px}.theme-card p{min-height:0}.theme-card button{font-size:14px;padding:10px 6px}#themeBadge{bottom:6px;font-size:11px}}
.theme-card button:disabled{opacity:.6;cursor:wait}
body[data-td-theme] .icon-btn{background:#eee0c5eb;color:#4d4031;border:1px solid #8d7857;border-radius:5px}
body[data-td-theme="ink"] .icon-btn{border-color:#5c6157;color:#303b34;background:#e9e1cfed}
body[data-td-theme] #weaponPill{color:#77482f}
.theme-card button+button{margin-top:8px}
/* 剪纸主题的大字横幅：米色纸条 + 黑字 + 金黄细边，去掉原来那圈厚黑描边（在米色底上发糊）；只用米、白、黑、黄 */
body[data-td-theme="paper"] #banner{background:#f8efd9;color:#2a241c;border:0;border-radius:4px;padding:10px 26px 12px;
  font-size:38px;letter-spacing:4px;text-shadow:0 2px 0 #ffffff;
  box-shadow:inset 0 0 0 3px #f8efd9,inset 0 0 0 5px #d9a634,3px 5px 0 #2a241c40}
body[data-td-theme="paper"] #banner.boss{background:#2a241c;color:#f6c843;text-shadow:0 2px 0 #000;box-shadow:inset 0 0 0 3px #2a241c,inset 0 0 0 5px #f6c843,3px 5px 0 #00000055}
body[data-td-theme="paper"] #banner.good{background:#f6c843;color:#2a241c;text-shadow:0 2px 0 #fbe7a6;box-shadow:inset 0 0 0 3px #f6c843,inset 0 0 0 5px #fffaf0,3px 5px 0 #2a241c40}
.touch-ui body[data-td-theme="paper"] #banner{font-size:30px;padding:8px 20px 10px;letter-spacing:3px}

/* 剪纸主题卡：手机上图在左边竖长条里，<picture> 换成整张竖图；picture 不占格子，让 img 直接当格子 */
.theme-card picture{display:contents}.theme-card picture source{display:none}
@media(max-width:560px){.theme-card.paper img{object-position:50% 40%}}
