:root {
  font-family: "Microsoft YaHei", sans-serif;
  color-scheme: dark;
  color: rgb(var(--mdui-color-on-background, 230, 225, 229));
  background: rgb(var(--mdui-color-background, 28, 27, 31));
}
* { box-sizing: border-box; }
.material-symbols-outlined { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; font-feature-settings: 'liga'; -webkit-font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.site-footer { margin-top: auto; padding: 20px 34px; text-align: center; color: rgb(var(--mdui-color-on-surface-variant)); border-top: 1px solid rgb(var(--mdui-color-outline-variant)); font-size: 13px; }
.site-footer a, .footer-link { color: inherit; }
.footer-link { padding: 0; border: 0; background: none; text-decoration: underline; cursor: pointer; }
.footer-sep { margin: 0 .55em; }
.guide-dialog::part(panel) { width: min(960px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
.guide-dialog::part(body) { padding-top: 0; }
.guide-dialog::part(action) { justify-content: flex-start; }
.guide-header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guide-title { min-width: 0; font-size: var(--mdui-typescale-headline-small-size, 1.5rem); font-weight: var(--mdui-typescale-headline-small-weight, 400); line-height: 1.3; }
.guide-close { flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: rgb(var(--mdui-color-on-surface)); background: rgb(var(--mdui-color-surface-container-high)); cursor: pointer; }
.guide-close .material-symbols-outlined { font-size: 20px; }
/* dvh 要较新的内核，先给 vh 兜底，再让支持 dvh 的浏览器覆盖。 */
.guide-frame { display: block; width: 100%; height: min(72vh, 760px); height: min(72dvh, 760px); border: 0; background: #fff; }
.update-logs { width: min(760px, 100%); margin: 0 auto; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; margin: 0; padding: 0 0 28px 28px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 0; width: 2px; background: rgb(var(--mdui-color-outline-variant)); }
.timeline li:last-child::before { bottom: auto; height: 0; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: rgb(var(--mdui-color-primary)); }
.timeline h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.timeline time { display: block; margin: 4px 0 8px; color: rgb(var(--mdui-color-on-surface-variant)); font-size: 14px; }
.timeline p { margin: 0; color: rgb(var(--mdui-color-on-surface)); line-height: 1.7; white-space: pre-line; }
button, input { font: inherit; }
/* z-index 必須高於 .page-loading（20）：頂欄內的下拉菜單等浮層向下延伸會進入遮罩區域，
   若頂欄層疊低於遮罩，浮層會被蓋住導致「加載時頂欄組件點了沒反應」。 */
.topbar { position: sticky; top: 0; z-index: 30; min-height: 72px; border-bottom: 1px solid rgb(var(--mdui-color-outline-variant)); background: rgb(var(--mdui-color-surface)); display: flex; align-items: center; gap: 16px; padding: 16px 34px; }
.brand { display: block; min-width: 0; flex: 0 1 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 23px; line-height: 1.2; color: rgb(var(--mdui-color-primary)); text-decoration: none; }
.bar-spacer { flex: 1 1 0; min-width: 0; }
.topbar-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 4px; }
.topbar-actions > #openSearch[hidden], .topbar > #previousPage[hidden] { display: none; }
.language-dropdown { flex: 0 0 auto; min-width: 0; }
.topbar mdui-button[icon-only], .topbar-actions mdui-button[icon-only] { flex: 0 0 40px; width: 40px; min-width: 40px; max-width: 40px; height: 40px; padding: 0; margin: 0; --shape-corner: 50%; }
.topbar mdui-button[icon-only]::part(button), .topbar-actions mdui-button[icon-only]::part(button) { width: 40px; min-width: 40px; max-width: 40px; height: 40px; padding: 0; margin: 0; border-radius: 50%; }
.topbar mdui-button[icon-only] .material-symbols-outlined, .topbar-actions mdui-button[icon-only] .material-symbols-outlined { width: 24px; height: 24px; overflow: hidden; }
#previousPage { flex: 0 0 40px; width: 40px; min-width: 40px; max-width: 40px; }
.language-menu { max-height: min(60vh, 360px); overflow-y: auto; overscroll-behavior: contain; }
.eyebrow, a { color: rgb(var(--mdui-color-primary)); }
.brand:hover, .brand:focus-visible { text-decoration: none; }
.profile { margin-left: auto; font-size: 14px; }
.profile, .intro p, .stage-head, .hint, .status, .upload { color: rgb(var(--mdui-color-on-surface-variant)); }
.page { width: 100%; padding: 36px 34px; }
/* inset 要 Chromium 87+/Safari 14.1+，前面用四个方向属性兜底。 */
.page-loading { position: fixed; z-index: 20; top: 72px; right: 0; bottom: 0; left: 0; inset: 72px 0 0; display: grid; place-items: center; background: rgba(var(--mdui-color-background), 0.72); }
.page-loading[hidden] { display: none; }
.page-loading mdui-circular-progress { width: 48px; height: 48px; color: rgb(var(--mdui-color-primary)); }
.page-loading-body { display: grid; place-items: center; gap: 12px; padding: 0 24px; }
.page-loading-text { margin: 0; max-width: 480px; text-align: center; font-size: 14px; line-height: 1.5; color: rgb(var(--mdui-color-on-surface-variant)); }
.page-loading-text[hidden] { display: none; }
/* 省略号靠 JS 逐帧改写文本做循环动画：固定宽度避免后续文字左右抖动。 */
.page-loading-dots { display: inline-block; min-width: 1.5em; text-align: left; }
.page-loading-percent { margin-left: 6px; font-variant-numeric: tabular-nums; }
.page-loading-percent[hidden] { display: none; }
/* 停滞提示：进度 10 秒没动过才出现，刷新按钮走原生 location.reload。 */
.page-loading-stuck { display: grid; place-items: center; gap: 8px; }
.page-loading-stuck[hidden] { display: none; }
.page-loading-stuck-text { margin: 0; max-width: 480px; text-align: center; font-size: 14px; line-height: 1.5; color: rgb(var(--mdui-color-on-surface-variant)); }
.page-loading-refresh { --mdui-color-primary: rgb(var(--mdui-color-primary)); }
/* 拖入图片提示：拖到编辑页任意位置时铺满视口，松开或拖出后立即消失。
   pointer-events:none 让拖放事件继续落到页面上，提示本身不参与命中。 */
.drop-import-hint { position: fixed; z-index: 3000; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 20px; font-weight: 600; letter-spacing: .04em; text-align: center; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s ease; }
.drop-import-hint.active { opacity: 1; visibility: visible; }
/* 拖到预览里的人物框上时调淡遮罩，让目标高亮与人物本身看得清。 */
.drop-import-hint.over-target { background: rgba(0, 0, 0, .22); }
.drop-import-hint.over-target::before { border-color: rgba(255, 255, 255, .32); }
.drop-import-hint::before { content: ''; position: absolute; inset: 16px; border: 2px dashed rgba(255, 255, 255, .55); border-radius: 18px; }
.drop-import-hint .material-symbols-outlined { flex: none; font-size: 30px; }
/* 重绘遮罩：只盖住预览卡片。切换双层皮肤厚度等设置会触发整幅画布同步重算，
   先显示转圈再重绘，避免页面看起来像卡死。 */
.render-loading { position: absolute; z-index: 5; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: grid; place-items: center; border-radius: var(--mdui-shape-corner-large, 16px); background: rgba(var(--mdui-color-background), 0.72); }
.render-loading[hidden] { display: none; }
.render-loading-body { display: grid; place-items: center; gap: 10px; padding: 0 16px; }
.render-loading mdui-circular-progress { width: 44px; height: 44px; color: rgb(var(--mdui-color-primary)); will-change: transform; }
.render-loading-text { margin: 0; text-align: center; font-size: 13px; line-height: 1.5; color: rgb(var(--mdui-color-on-surface-variant)); }
.random-loading { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 0; }
.random-loading mdui-circular-progress { flex: 0 0 40px; width: 40px; height: 40px; color: rgb(var(--mdui-color-primary)); }
.external-link-url { overflow-wrap: anywhere; white-space: pre-wrap; user-select: text; }
.header-search-form { display: flex; align-items: center; gap: 8px; }
.header-search-form mdui-text-field { flex: 1 1 auto; min-width: 0; }
.header-search-form mdui-button { flex: 0 0 auto; }
.list-loading { display: grid; min-height: 180px; place-items: center; color: rgb(var(--mdui-color-primary)); }
.list-loading[hidden] { display: none; }
.list-loading mdui-circular-progress { width: 40px; height: 40px; }
/* 静态预渲染正文：只给不执行 JavaScript 的抓取与脚本失败时兜底，应用启动后由脚本移除。 */
.prerender { margin-bottom: 26px; padding: 18px; border-radius: 16px; background: rgb(var(--mdui-color-surface-container-high)); line-height: 1.7; }
.prerender p { margin: 8px 0; }
.prerender-preview { margin: 12px 0; }
.prerender-preview img { display: block; width: 100%; max-width: 480px; height: auto; border-radius: 12px; }
.prerender-list { display: grid; gap: 6px; margin: 12px 0; padding-left: 22px; }
.prerender-links a { color: rgb(var(--mdui-color-primary)); }
.intro { display: flex; justify-content: space-between; align-items: end; margin-bottom: 26px; gap: 16px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; font-weight: 700; }
.intro h1 { font-size: 38px; margin: 8px 0; }
.intro p { margin: 0; line-height: 1.7; }
.save { flex-shrink: 0; }
/* 左右两栏各自独立：align-items: start 让两栏按自身内容高度排布，互不拉伸；
   右栏卡片不再被 flex: 1 撑高，任一侧内容变化都不会拉长另一侧的卡片。 */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.workspace > * { min-width: 0; }
.right > .panel { display: block; }
.preview-column { display: grid; gap: 16px; min-width: 0; }
.skin-panel { width: 100%; }
.panel, .stage { display: block; width: 100%; padding: 18px; --shape-corner: var(--mdui-shape-corner-large); }
/* 重绘遮罩绝对定位在预览卡片内，需要卡片自身成为包含块。 */
.stage { position: relative; }
.panel h2 { font-size: 14px; margin: 0 0 15px; }
#shareWallpaper { margin-top: 10px; }
#fullscreenPreview { margin-top: 10px; }
/* 全屏预览：展示导出那张成品图（同格式同分辨率），但不执行导出。
   卡片整体进全屏，实时预览画布与热点让位给成品图画布。 */
.exit-fullscreen { position: fixed; z-index: 12; top: 12px; left: 12px; display: none; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px 6px 8px; border: 0; border-radius: 999px; color: rgb(var(--mdui-color-on-primary)); background: rgb(var(--mdui-color-primary)); font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.exit-fullscreen .material-symbols-outlined { font-size: 20px; }
/* 成品图画布平时不占布局，只在全屏时显示。 */
.fullscreen-canvas { display: none; }
.stage:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 16px; background: rgb(var(--mdui-color-background)); }
/* 全屏态只留成品图：标题行、实时预览、缩放控件与提示都是页面级控件，占满屏幕反而挡画面。 */
.stage:fullscreen .stage-head, .stage:fullscreen .zoom-controls, .stage:fullscreen .zoom-hint, .stage:fullscreen .head-hover, .stage:fullscreen .canvas-wrap { display: none; }
/* 成品图按原始比例缩放到屏幕内，居中显示。 */
.stage:fullscreen .fullscreen-canvas { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
/* 全屏时显示左上角退出按钮。 */
.stage:fullscreen .exit-fullscreen { display: inline-flex; }
#exportFormat, #exportResolution { display: block; width: 100%; margin-bottom: 12px; }
.template-metadata p { margin: 7px 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.template-metadata strong { color: rgb(var(--mdui-color-on-surface)); font-weight: 600; }
.source-disclosure { display: block; margin-top: 16px; border: 1px solid rgb(var(--mdui-color-outline)); border-radius: 8px; overflow: hidden; }
.source-disclosure mdui-collapse-item::part(header) { padding: 0; }
.source-disclosure mdui-collapse-item::part(icon) { display: none; }
.source-disclosure mdui-collapse-item::part(body) { padding: 0; min-height: 0; }
.source-collapse-header { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 12px 14px; }
.source-collapse-arrow { flex: 0 0 auto; width: 0; height: 0; margin: 0 2px 0 12px; border-top: 7px solid rgb(var(--mdui-color-on-surface)); border-right: 6px solid transparent; border-left: 6px solid transparent; transition: transform 140ms ease; }
#sourceCollapseItem.open .source-collapse-arrow { transform: rotate(180deg); }
#templateSource { padding: 0 14px 12px; }
@media (prefers-reduced-motion: reduce) { .source-collapse-arrow { transition: none; } }
mdui-divider { display: block; margin: 20px 0; }
.upload { display: block; width: 100%; padding: 14px 10px; margin-bottom: 12px; }
.arm-toggle { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-top: 14px; }
#skinSection { display: block; width: 100%; }
#skinSection mdui-collapse-item::part(header) { padding: 0; border: 1px solid rgb(var(--mdui-color-outline)); border-radius: 8px; }
#skinSection mdui-collapse-item::part(icon) { display: none; }
#skinSection mdui-collapse-item::part(body) { padding: 0; }
.skin-collapse-header { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 12px 14px; }
.share-url { display: block; width: 100%; margin-top: 16px; cursor: pointer; }
.share-url::part(input) { pointer-events: none; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-url::part(end-icon) { pointer-events: none; cursor: pointer; }
.skin-collapse-arrow { width: 0; height: 0; margin: 0 2px 0 12px; border-top: 7px solid rgb(var(--mdui-color-on-surface)); border-right: 6px solid transparent; border-left: 6px solid transparent; transition: transform 140ms ease; }
#skinCollapseItem.open .skin-collapse-arrow { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .skin-collapse-arrow { transition: none; } }
.effect-controls { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.effect-controls mdui-checkbox { max-width: 100%; overflow-wrap: anywhere; }
.skin-overlays { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.skin-overlays mdui-checkbox { flex: 1 1 120px; min-width: min(120px, 100%); }
.skin-scale-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.skin-scale-controls mdui-select, .skin-scale-controls mdui-text-field { flex: 1 1 180px; min-width: 0; max-width: 100%; }
.skin-scale-controls .status { flex-basis: 100%; margin: 0; }
/* 自定义像素数的上下键：竖排在输入框右侧，与输入框等高，方便触屏点按微调。 */
.custom-stepper { display: flex; flex: 0 0 auto; flex-direction: column; gap: 2px; align-self: stretch; }
.custom-stepper[hidden] { display: none; }
.custom-stepper-button { display: flex; flex: 1 1 0; align-items: center; justify-content: center; min-width: 36px; padding: 0; border: 1px solid rgb(var(--mdui-color-outline)); border-radius: 6px; background: rgb(var(--mdui-color-surface)); color: rgb(var(--mdui-color-on-surface)); cursor: pointer; touch-action: manipulation; }
.custom-stepper-button:hover { background: rgb(var(--mdui-color-surface-variant)); }
.custom-stepper-button:active { background: rgb(var(--mdui-color-secondary-container)); }
.custom-stepper-button .material-symbols-outlined { font-size: 18px; }
.upload strong { display: block; color: rgb(var(--mdui-color-on-surface)); margin-bottom: 8px; }
.upload input { width: 100%; font-size: 12px; }
.upload small { display: block; margin-top: 8px; overflow-wrap: anywhere; }
.person-selector { padding: 6px 12px; }
.person-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 auto; }
.person-nav > * { flex: 0 0 auto; }
.person-nav mdui-button.person-arrow { width: 40px; }
.person-nav mdui-button.set-person-skin { --background-color: rgb(var(--mdui-color-primary)); --text-color: rgb(var(--mdui-color-on-primary)); }
.person-nav-label { min-width: 120px; text-align: center; font-size: 13px; }
.skin-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 8px; }
.skin-name-row small { display: block; flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-name-row mdui-button.remove-skin { flex: 0 0 40px; width: 40px; height: 40px; min-width: 40px; border-radius: 50%; --shape-corner: 50%; padding: 0; }
.head-icon { display: block; flex: 0 0 auto; width: 18px; height: 18px; image-rendering: pixelated; }
.dialog-head-preview { flex-direction: row-reverse; margin-bottom: 12px; }
.skin-dialog .dialog-head-preview { flex-direction: row; }
.bulk-skin-action { margin-top: 8px; }
/* 批量设定皮肤的目标人物列表：人多的模板会出现滚动条，右侧显示该人物当前的皮肤名。 */
.bulk-targets { display: grid; gap: 2px; max-height: 240px; margin: 8px 0 4px; overflow-y: auto; }
.bulk-target { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px 0; cursor: pointer; }
.bulk-target mdui-checkbox { flex: 0 0 auto; }
.bulk-target small { flex: 1 1 auto; min-width: 0; text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(var(--mdui-color-on-surface-variant)); }
.dialog-head-preview .head-icon { width: 22px; height: 22px; }
.skin-dialog::part(panel) { width: min(680px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
.skin-dialog::part(action) { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skin-dialog .keep-dialog-open { margin-right: auto; }
.skin-dialog::part(body) { min-width: 0; overflow-y: auto; }
/* 内容在当前尺寸里放不下时，脚本会给窗口加上 fullscreen（面板铺满整个网页）：
   面板按对话框自身容器（fixed inset:0）取 100%，不依赖 vh/dvh，移动端地址栏变化也不会算错高度；
   容器再留 overflow 兜底，万一内容仍超出也能滚动，不会出现上下都点不到的情况；
   标题、正文、操作栏各自限宽居中，宽屏下表单不会被拉成一整行。 */
.skin-dialog[fullscreen] { padding: 0; align-items: stretch; overflow-y: auto; }
.skin-dialog[fullscreen]::part(panel) { width: 100%; max-width: 100%; height: 100%; max-height: 100%; }
.skin-dialog[fullscreen]::part(header),
.skin-dialog[fullscreen]::part(body),
.skin-dialog[fullscreen]::part(action) { width: 100%; max-width: 720px; margin-inline: auto; }
.skin-dialog[fullscreen]::part(body) { min-height: 0; }
.skin-dialog-header { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.skin-dialog-title { min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-dialog-header mdui-button { width: 40px; min-width: 40px; height: 40px; padding: 0; }
.skin-dialog h3 { font-size: 16px; line-height: 1.6; margin: 0 0 16px; }
/* 本地皮肤 / 在线获取选项卡：标题栏贴住弹窗顶部，面板内容与标题栏之间留出间距。 */
.skin-tab-bar { display: flex; width: 100%; border-bottom: 1px solid rgb(var(--mdui-color-outline-variant)); }
.skin-tab { flex: 1 1 0; min-width: 0; position: relative; padding: 12px 8px; border: 0; background: transparent; color: rgb(var(--mdui-color-on-surface-variant)); font: inherit; font-size: 14px; cursor: pointer; }
.skin-tab:hover { color: rgb(var(--mdui-color-on-surface)); }
.skin-tab.active { color: rgb(var(--mdui-color-primary)); }
.skin-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: rgb(var(--mdui-color-primary)); }
.skin-tab:focus-visible { outline: 2px solid rgb(var(--mdui-color-primary)); outline-offset: -2px; }
.skin-tab-panel { padding-top: 12px; }
.player-skin-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.player-skin-controls mdui-select { flex: 1 1 140px; min-width: min(140px, 100%); }
.player-skin-controls mdui-text-field { flex: 2 1 220px; min-width: min(220px, 100%); }
/* 皮肤来源与自定义皮肤站地址各自独占一行；hidden 属性要压过组件自身的 display 设定。 */
.player-skin-controls .skin-source-field, .player-skin-controls .custom-site-field { flex: 1 1 100%; }
.player-skin-controls mdui-select[hidden], .player-skin-controls mdui-text-field[hidden] { display: none; }
/* 获取皮肤按钮：默认按内容宽度，换到独立一行时由 flex-grow 铺满整行。 */
.player-skin-controls mdui-button { flex: 1 1 auto; }
.player-skin-controls mdui-button mdui-circular-progress { width: 18px; height: 18px; }
.online-history-title { font-size: 14px; line-height: 1.6; margin: 12px 0 8px; }
/* 标题行：左标题右「清除」，按钮在没有记录时由脚本置灰。 */
.online-history-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.online-history-header .online-history-title { flex: 1 1 auto; min-width: 0; }
.online-history-header .clear-history { flex: 0 0 auto; }
/* 历史列表固定为单列且列宽可压缩：grid 列默认按内容撑开，
   长文件名（本地上传的哈希名）会把条目顶出弹窗，这里用 minmax(0, 1fr) 把它压回可用宽度，
   超出部分由条目的 text-overflow 显示省略号。 */
.online-history { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
/* 没有历史记录时的居中灰字占位。 */
.online-history-empty { margin: 4px 0; text-align: center; font-size: 13px; color: rgb(var(--mdui-color-on-surface-variant)); }
/* 每行 = 套用按钮 + 删除按钮；删除按钮不能嵌进条目按钮里，只能做兄弟节点。 */
.online-history-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.online-history-row .online-history-item { flex: 1 1 0; width: auto; }
.online-history-remove { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgb(var(--mdui-color-on-surface-variant)); cursor: pointer; }
.online-history-remove:hover { background: rgb(var(--mdui-color-surface-container-highest)); color: rgb(var(--mdui-color-error)); }
.online-history-remove:focus-visible { outline: 2px solid rgb(var(--mdui-color-primary)); outline-offset: 1px; }
.online-history-remove .material-symbols-outlined { font-size: 18px; }
.online-history-item { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid rgb(var(--mdui-color-outline)); border-radius: var(--mdui-shape-corner-small, 8px); background: rgb(var(--mdui-color-surface-container-low)); color: rgb(var(--mdui-color-on-surface)); font: inherit; text-align: left; cursor: pointer; }
.online-history-item:hover { background: rgb(var(--mdui-color-surface-container-high)); }
.online-history-item:focus-visible { outline: 2px solid rgb(var(--mdui-color-primary)); outline-offset: 1px; }
.online-history-name { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.online-history-edition { flex: 0 0 auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: rgb(var(--mdui-color-on-surface-variant)); }
/* 历史超过 3 条时默认折叠，展开/收起按钮居中排在列表末尾，箭头上下浮动提示还有更多。 */
.online-history-more-actions { display: flex; align-items: center; justify-content: center; gap: 8px; }
.online-history-more { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border: 0; border-radius: var(--mdui-shape-corner-small, 8px); background: transparent; color: rgb(var(--mdui-color-primary)); font: inherit; font-size: 13px; cursor: pointer; }
.online-history-more:hover { background: rgb(var(--mdui-color-surface-container-high)); }
.online-history-more:focus-visible { outline: 2px solid rgb(var(--mdui-color-primary)); outline-offset: 1px; }
.online-history-more:disabled { opacity: 0.5; cursor: default; }
.online-history-more .material-symbols-outlined { font-size: 18px; animation: online-history-more-arrow 1.2s ease-in-out infinite; }
.online-history-less .material-symbols-outlined { animation: none; }
@keyframes online-history-more-arrow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
/* 新展开的历史行从上方滑入，配合逐条延迟形成向下展开的动作；收起时反向滑出。 */
.online-history-row.is-revealing { animation: online-history-row-in 260ms ease-out both; }
@keyframes online-history-row-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.online-history-row.is-collapsing { animation: online-history-row-out 180ms ease-in both; pointer-events: none; }
@keyframes online-history-row-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .online-history-more .material-symbols-outlined { animation: none; } .online-history-row.is-revealing, .online-history-row.is-collapsing { animation: none; } }
.search-row { display: flex; align-items: end; gap: 12px; margin-top: 18px; }
.template-search { display: block; flex: 1 1 0; min-width: 0; }
/* 搜索范围：搜索框下方的复选框，勾选具体字段时只在这些字段里匹配；都不勾选则等同「全部」。 */
.search-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.search-scope-label { font-size: 13px; color: rgb(var(--mdui-color-on-surface-variant)); }
/* 排序按钮：空间足够时在图标右侧显示当前排序方式的文字，空间不足时只留图标。
   是否收成纯图标由脚本按搜索框剩余空间切换 is-icon-only。 */
.sort-dropdown { flex: 0 0 auto; }
.sort-dropdown mdui-button { height: 48px; }
.sort-dropdown mdui-button::part(button) { height: 48px; padding: 0 16px; }
.sort-dropdown.is-icon-only mdui-button { width: 48px; min-width: 48px; }
.sort-dropdown.is-icon-only mdui-button::part(button) { width: 48px; min-width: 48px; padding: 0; }
.sort-label { margin-left: 8px; font-size: 14px; white-space: nowrap; }
.sort-dropdown.is-icon-only .sort-label { display: none; }
.sort-dropdown .material-symbols-outlined { font-size: 22px; }
.filters { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; margin: 8px 0; }
.filters mdui-select { flex: 1 1 220px; min-width: min(220px, 100%); }
.filters mdui-select::part(menu), .player-skin-controls mdui-select::part(menu) {
  max-height: min(320px, 40vh);
  max-height: min(320px, 40dvh);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.filters mdui-button { flex: 0 0 auto; }
/* 清除筛选始终贴在最右侧：同一行时吃掉剩余空间，换行单独成行时也靠右对齐。 */
.filters #clearFilters { margin-left: auto; }
/* 标签筛选：触发器就是只读的 MDUI 文本框，展开/收起动画由 mdui-dropdown 提供，与 mdui-select 一致。 */
.filters .tag-filter-trigger { flex: 1 1 220px; min-width: min(220px, 100%); }
.filters .tag-filter-trigger::part(input) { pointer-events: none; cursor: pointer; }
.tag-filter-arrow { font-size: 24px; }
.tag-filter-panel { display: flex; flex-direction: column; width: 320px; max-width: calc(100vw - 32px); max-height: min(420px, 70vh); max-height: min(420px, 70dvh); overflow: hidden; border-radius: var(--mdui-shape-corner-extra-small, 4px); background: rgb(var(--mdui-color-surface-container)); box-shadow: var(--mdui-elevation-level2); }
.tag-filter-search { display: block; flex: 0 0 auto; margin: 8px 8px 4px; }
.tag-filter-list { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 8px; }
.tag-filter-option { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 12px; border: 0; background: transparent; color: rgb(var(--mdui-color-on-surface)); font: inherit; font-size: var(--mdui-typescale-label-large-size, 14px); font-weight: var(--mdui-typescale-label-large-weight, 500); letter-spacing: var(--mdui-typescale-label-large-tracking, .1px); text-align: left; cursor: pointer; }
/* 与 mdui-menu 的选中图标一致：未选中时只占位不显示，选中后才出现勾。 */
.tag-filter-check { flex: 0 0 auto; width: 24px; font-size: 24px; line-height: 24px; color: rgb(var(--mdui-color-on-surface-variant)); visibility: hidden; }
.tag-filter-option.selected .tag-filter-check { visibility: visible; }
.tag-filter-label { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tag-filter-option:hover, .tag-filter-option:focus-visible { background: rgba(var(--mdui-color-on-surface), .08); outline: none; }
.tag-filter-option.selected { background: rgba(var(--mdui-color-primary), .12); }
.tag-filter-empty { margin: 6px 12px 12px; font-size: 13px; color: rgb(var(--mdui-color-on-surface-variant)); }
/* 随机模板和以图找模板共用一行并平分横向空间；空间不够时允许换行。 */
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.home-actions #openLens,
.home-actions #randomTemplate { display: block; flex: 1 1 220px; width: auto; margin: 0; white-space: nowrap; }
#openLens::part(button),
#randomTemplate::part(button) { width: 100%; justify-content: center; }
.templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; padding: 4px; margin: 8px -4px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination mdui-button { min-width: 40px; }
.page-menu { max-height: min(60vh, 360px); overflow-y: auto; overscroll-behavior: contain; }
.template { display: block; width: 100%; --shape-corner: var(--mdui-shape-corner-small, 8px); }
.template-link { display: block; color: rgb(var(--mdui-color-on-surface)); text-decoration: none; }
.template-link:hover { background: rgb(var(--mdui-color-surface-container-highest)); }
.template img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.template span, .template small { display: block; padding: 8px 10px 0; overflow-wrap: anywhere; }
.template small { padding-top: 4px; padding-bottom: 10px; color: rgb(var(--mdui-color-on-surface-variant)); }
.template .template-original-title { padding-bottom: 0; font-size: 12px; color: #b0b0b0; }
/* 创作者跟在人数/标签下一行；没有创作者的模板不渲染这一行，所以底部间距交给后面的兄弟处理。 */
.template .template-artist { padding-top: 0; font-size: 12px; color: rgb(var(--mdui-color-on-surface-variant)); }
/* 支持3D皮肤层：卡片最底部的醒目徽标，用主色描边与人数/标签、创作者行区分开。 */
.template .template-layers3d { padding-top: 6px; padding-bottom: 10px; font-size: 12px; font-weight: 600; color: rgb(var(--mdui-color-primary)); }
/* 编辑页底部的相关模板：与编辑工作区之间留出距离，卡片网格直接复用 .templates。 */
.related-templates { margin-top: 34px; }
.related-templates h2 { margin: 0 0 12px; font-size: 18px; }
.stage-head { display: flex; justify-content: space-between; font-size: 12px; margin: 0 0 13px; gap: 10px; }
/* 高度由 JS 按画布原始比例写 aspect-ratio 锁定（模板未加载时回退 min-height），缩放只在框内平移，不会把下方内容顶开。 */
/* 放大后滚动到预览边界时把剩余滚动接力给页面，避免手势在框内被吃掉。 */
.canvas-wrap { overflow: auto; border-radius: var(--mdui-shape-corner-medium, 12px); background: rgb(var(--mdui-color-surface-container-highest)); min-height: 240px; display: flex; overscroll-behavior: auto; touch-action: pan-y; }
.canvas-wrap[style*="aspect-ratio"] { min-height: 0; }
/* 双指缩放需要接管触摸手势；未开启缩放时保留 pan-y，手指仍能纵向滚动页面。 */
/* 缩放开启后仍交给浏览器原生单指滚动（两轴都允许），滑动到顶或底时浏览器会自然把滚动接力给页面；
   只屏蔽双指缩放，避免浏览器缩放与下面的 JS 捏合逻辑抢手势。 */
.canvas-wrap.zoomable { touch-action: pan-x pan-y; }
.canvas-wrap.pannable { cursor: grab; }
.canvas-wrap.panning { cursor: grabbing; }
.canvas-wrap.panning * { cursor: grabbing; }
.zoom-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 12px 4px 0; }
/* 缩放操作提示：两行小字分别说明 Ctrl + 滚轮与双指捏合，居中并弱化成次要信息。 */
.zoom-hint { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 6px 13px 0; font-size: 12px; line-height: 1.6; text-align: center; color: rgb(var(--mdui-color-on-surface-variant)); }
/* hidden 属性必须显式覆盖 display: flex 才生效；关闭缩放时整段提示一起隐藏。 */
.zoom-hint[hidden] { display: none; }
.zoom-slider { display: flex; align-items: center; gap: 4px; margin-left: auto; }
/* 缩放百分比可手动输入：输入框只放数字，% 作为静态单位贴在右侧，避免出现原生步进箭头挤压。 */
.zoom-field { display: inline-flex; align-items: center; gap: 2px; }
.zoom-input { width: 56px; padding: 4px 2px; border: 1px solid rgb(var(--mdui-color-outline)); border-radius: 6px; background: rgb(var(--mdui-color-surface)); color: rgb(var(--mdui-color-on-surface)); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; -moz-appearance: textfield; }
.zoom-input::-webkit-outer-spin-button, .zoom-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.zoom-input:focus-visible { outline: 2px solid rgb(var(--mdui-color-primary)); outline-offset: 1px; }
.zoom-input:disabled { opacity: .5; }
.zoom-unit { font-size: 13px; color: rgb(var(--mdui-color-on-surface-variant)); }
/* 缩放通过外壳宽度百分比实现，画布与头部热点一起放大；margin: auto 在溢出时自动归零，不会裁剪左侧内容。 */
.preview-surface { position: relative; width: 100%; flex: 0 0 auto; margin: auto; }
#headTargets { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; pointer-events: none; }
.head-target { position: absolute; pointer-events: auto; display: grid; place-items: center; padding: 0; min-width: 24px; min-height: 24px; border: 2px dashed rgb(var(--mdui-color-primary)); border-radius: 8px; background: transparent; color: transparent; font-size: 12px; font-weight: 700; cursor: pointer; transition: background 120ms, border-color 120ms, box-shadow 120ms; }
.head-target:hover, .head-target:focus-visible { background: rgba(var(--mdui-color-primary), .18); box-shadow: 0 0 0 3px rgba(var(--mdui-color-primary), .2); }
.head-target:active, .head-target.selected, .head-target.drop-hover { border-style: solid; background: rgba(var(--mdui-color-primary), .32); box-shadow: 0 0 0 4px rgba(var(--mdui-color-primary), .25); }
/* 可替换贴图的热点用点线方框与 tertiary 色，和人物头部的虚线框明显区分。 */
.image-target { position: absolute; pointer-events: auto; display: grid; place-items: center; padding: 0; min-width: 24px; min-height: 24px; border: 2px dotted rgb(var(--mdui-color-tertiary)); border-radius: 4px; background: transparent; color: transparent; font-size: 12px; font-weight: 700; cursor: pointer; transition: background 120ms, border-color 120ms, box-shadow 120ms; }
.image-target:hover, .image-target:focus-visible { background: rgba(var(--mdui-color-tertiary), .18); box-shadow: 0 0 0 3px rgba(var(--mdui-color-tertiary), .2); }
.image-target:active, .image-target.selected { border-style: dashed; background: rgba(var(--mdui-color-tertiary), .32); box-shadow: 0 0 0 4px rgba(var(--mdui-color-tertiary), .25); }
/* 头部开关浮在对应方框旁边，独立于画布缩放，保持可点击的控件尺寸。 */
.head-hover { position: fixed; z-index: 11; width: 240px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; margin: 0; padding: 10px 13px; }
.head-hover .skin-overlays { gap: 2px 8px; }
.head-hover .skin-overlays mdui-checkbox { flex: 1 1 88px; min-width: 0; }
.head-hover h3 { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: rgb(var(--mdui-color-on-surface-variant)); }
.head-hover .arm-toggle { margin-top: 6px; }
/* 悬停面板里的名牌设置：面板本身只有 240px，标题与微调行压紧，滑块独占一行避免挤爆。 */
.head-hover .dialog-settings { margin-top: 10px; }
.head-hover .dialog-settings > h3 { margin: 0 0 6px; }
.head-hover .nameplate-adjust { margin-top: 8px; gap: 4px 8px; }
.head-hover .nameplate-adjust > label { font-size: 12px; }
.head-hover .nameplate-adjust-input { flex: 1 1 64px; min-width: 64px; max-width: 96px; }
.head-hover .nameplate-adjust-slider { flex: 1 1 100%; min-width: 0; }
.dialog-settings { margin-top: 20px; }
/* 名牌手动微调：每个参数一个块，块内 label+输入框+滑块 flex-wrap 换行；空间不够时文字与控件自动折行。 */
.nameplate-adjust { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 14px; }
.nameplate-adjust > label { flex: 0 0 auto; color: rgb(var(--mdui-color-on-surface)); font-size: 14px; }
.nameplate-adjust-input { flex: 1 1 72px; min-width: 72px; max-width: 120px; --mdui-comp-rich-text-field-container-height: 28px; font-size: 12px; }
.nameplate-adjust-slider { flex: 2 1 160px; min-width: 140px; }
@media (prefers-reduced-motion: reduce) { .head-target, .image-target { transition: none; } }
.canvas-wrap canvas { display: block; width: 100%; height: auto; }
.hint { text-align: center; font-size: 12px; margin: 13px; line-height: 1.6; }
.skin-select-hint { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 12px 14px; background: rgb(var(--mdui-color-primary-container)); color: rgb(var(--mdui-color-on-primary-container)); font-size: 16px; line-height: 1.55; }
.skin-select-hint .material-symbols-outlined { font-size: 24px; line-height: 1.15; flex: 0 0 auto; }
.status { font-size: 12px; margin-top: 11px; line-height: 1.65; overflow-wrap: anywhere; }
/* 无匹配模板：错误图标居上、文案在下，整体放大居中，避免被当成普通状态行忽略 */
#empty { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 32px auto; padding: 28px 16px; font-size: 17px; line-height: 1.7; text-align: center; }
#empty .empty-state-icon { font-size: 56px; width: 56px; height: 56px; line-height: 1; color: rgb(var(--mdui-color-error)); }
#empty .empty-state-text { margin: 0; }
.skin-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.skin-ratio-warning { display: inline-flex; align-items: center; gap: 4px; color: rgb(var(--mdui-color-error)); font-size: 12px; }
.skin-ratio-warning .material-symbols-outlined { font-size: 18px; flex: none; }
.export-warning { color: #ffb300; display: flex; align-items: center; gap: 4px; }
.export-warning .material-symbols-outlined { font-size: 18px; flex: none; }
#export .material-symbols-outlined { font-size: 20px; margin-right: 6px; }
/* share / fullscreen 字形本身比 download 占满更多字框，调小一档让三个按钮图标视觉大小一致 */
#shareWallpaper .material-symbols-outlined, #fullscreenPreview .material-symbols-outlined { font-size: 18px; margin-right: 6px; }
/* 图标作为弹性子项时默认顶部对齐，改 inline-flex 让它和文字垂直居中 */
#export .material-symbols-outlined, #shareWallpaper .material-symbols-outlined, #fullscreenPreview .material-symbols-outlined { display: inline-flex; align-items: center; }
/* 像素字体字形在行框内偏下，把这两个按钮的文字上提 1px 与图标对齐 */
#shareWallpaper > span:not(.material-symbols-outlined), #fullscreenPreview > span:not(.material-symbols-outlined) { position: relative; top: -1px; }
.error { color: rgb(var(--mdui-color-error, 255, 180, 171)); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid rgb(var(--mdui-color-primary)); outline-offset: 2px; }
mdui-button:not(:defined) { display: inline-block; opacity: .5; padding: 12px 18px; border: 1px solid currentColor; border-radius: 20px; }
[hidden] { display: none !important; }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 250px; }
}
@media (max-width: 720px) {
  /* 小屏幕默认把整站界面缩到 94%：字号、按钮、图标和间距一起变小，避免内容挤在一起；
     zoom 只改变显示尺寸，画布合成与导出像素不变。不支持 zoom 的内核按 100% 显示。 */
  html { zoom: .94; }
  /* 全屏皮肤窗口要贴满视口四边：只要存在全屏弹窗就取消整页缩放，弹窗关闭或销毁后自动恢复。 */
  html:has(.skin-dialog[fullscreen]) { zoom: 1; }
  .topbar { min-height: 56px; gap: 10px; padding: 10px 12px; }
  .brand { font-size: 18px; }
  .topbar mdui-button[icon-only], .topbar-actions mdui-button[icon-only], #previousPage { flex-basis: 36px; width: 36px; min-width: 36px; max-width: 36px; height: 36px; }
  .topbar mdui-button[icon-only]::part(button), .topbar-actions mdui-button[icon-only]::part(button) { width: 36px; min-width: 36px; max-width: 36px; height: 36px; }
  .topbar mdui-button[icon-only] .material-symbols-outlined, .topbar-actions mdui-button[icon-only] .material-symbols-outlined { width: 20px; height: 20px; font-size: 20px; }
  .page-loading { top: 56px; right: 0; bottom: 0; left: 0; inset: 56px 0 0; }
  .profile { font-size: 12px; }
  .page { padding: 16px 12px; }
  .site-footer { padding: 14px 12px; font-size: 12px; }
  .guide-dialog::part(panel) { width: min(960px, calc(100vw - 20px)); max-width: calc(100vw - 20px); }
  /* 小屏幕上按钮独占一行并靠右：文字块占满整行，按钮自动换到下一行，用 margin-left:auto 贴着右边。 */
  .intro { display: flex; flex-wrap: wrap; margin-bottom: 16px; gap: 10px; }
  .intro > div { flex: 1 1 100%; min-width: 0; }
  .intro h1 { font-size: 26px; margin: 4px 0; }
  .save { margin-left: auto; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .preview-column { gap: 12px; }
  .panel, .stage { padding: 12px; }
  .panel h2 { margin-bottom: 10px; }
  #exportFormat, #exportResolution { margin-bottom: 8px; }
  .source-disclosure { margin-top: 12px; }
  .source-collapse-header, .skin-collapse-header { min-height: 40px; padding: 8px 10px; }
  #templateSource { padding: 0 10px 10px; }
  mdui-divider { margin: 14px 0; }
  .upload { padding: 10px 8px; margin-bottom: 8px; }
  .arm-toggle { gap: 8px; margin-top: 10px; }
  .share-url { margin-top: 12px; }
  .effect-controls, .skin-overlays { gap: 2px 10px; }
  .skin-scale-controls { gap: 6px; margin-top: 8px; }
  .person-selector { padding: 4px 8px; }
  .person-nav { gap: 6px; }
  .person-nav mdui-button.person-arrow { width: 36px; }
  .person-nav-label { min-width: 96px; font-size: 12px; }
  .skin-name-row mdui-button.remove-skin { flex-basis: 36px; width: 36px; height: 36px; min-width: 36px; }
  .skin-dialog::part(panel) { width: min(680px, calc(100vw - 20px)); max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
  .skin-dialog-header { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 6px; }
  .skin-dialog-header mdui-button { width: 36px; min-width: 36px; height: 36px; }
  .skin-dialog h3 { font-size: 15px; margin-bottom: 12px; }
  .player-skin-controls { gap: 8px; }
  .search-row { gap: 8px; margin-top: 12px; }
  .sort-dropdown.is-icon-only mdui-button { width: 40px; min-width: 40px; height: 40px; }
  .sort-dropdown.is-icon-only mdui-button::part(button) { width: 40px; min-width: 40px; height: 40px; }
  .sort-dropdown .material-symbols-outlined { font-size: 20px; }
  .filters { gap: 10px; margin: 6px 0; }
  .templates { gap: 12px; margin: 6px -4px; }
  .pagination { gap: 6px; margin-top: 16px; }
  .pagination mdui-button { min-width: 36px; }
  .template span, .template small { padding: 6px 8px 0; }
  .template small { padding-bottom: 8px; }
  .stage-head { margin-bottom: 8px; }
  .canvas-wrap { min-height: 180px; }
  .skin-select-hint { gap: 8px; margin-bottom: 8px; padding: 10px 12px; font-size: 14px; }
  .skin-select-hint .material-symbols-outlined { font-size: 20px; }
  .dialog-settings { margin-top: 14px; }
  .hint { margin: 10px; }
  .zoom-hint { margin: 5px 10px 0; }
  .status { margin-top: 8px; }
}
