:root {
    --ink:#233f3a;
    --muted:#627970;
    --green:#216e58;
    --mint:#e8f2dd;
    --line:#dfe7dc;
    --paper:#f6f8f2;
    --orange:#f0a654;
    --white:#fffef9;
    font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
    color:var(--ink);
    background:var(--paper);
    font-synthesis:none;
}
* {
    box-sizing:border-box;
}
body {
    margin:0;
}
button,a {
    -webkit-tap-highlight-color:transparent;
}
button {
    font:inherit;
    cursor:pointer;
    touch-action:manipulation;
}
button:disabled {
    cursor:default;
}
button:focus-visible,a:focus-visible {
    outline:3px solid #d38a29;
    outline-offset:4px;
}
button,a {
    color:inherit;
}
button {
    min-height:48px;
}
a {
    text-decoration:none;
}
[hidden] {
    display:none!important;
}
.topbar {
    position:sticky;
    top:0;
    z-index:20;
    height:84px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--line);
    padding:0 max(24px,calc((100vw - 1240px)/2));
    gap:16px;
    background:var(--white);
}
.back {
    display:flex;
    align-items:center;
    gap:12px;
    font-size:14px;
    min-height:48px;
}
.brand {
    display:flex;
    align-items:center;
    gap:9px;
    font-weight:850;
    font-size:21px;
    letter-spacing:1px;
}
.brand-mark {
    font-size:38px;
    color:var(--green);
    line-height:1;
}
.brand small {
    font-size:12px;
    border:1px solid #b8cbbb;
    border-radius:6px;
    padding:2px 5px;
    vertical-align:middle;
    margin-left:4px;
    letter-spacing:0;
}
.quiet-btn {
    border:1px solid var(--line);
    background:transparent;
    border-radius:24px;
    padding:0 17px;
    font-size:16px;
}
.quiet-btn span {
    font-size:12px;
    margin-left:5px;
}
.workshop {
    max-width:1240px;
    margin:auto;
    padding:35px 24px 18px;
}
.intro {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:28px;
}
.eyebrow {
    font-size:12px;
    font-weight:650;
    letter-spacing:1px;
    color:var(--muted);
    margin:0 0 10px;
}
.eyebrow>span {
    display:inline-block;
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--green);
    margin-right:7px;
}
h1 {
    font-size:clamp(25px,3.1vw,40px);
    letter-spacing:-1.4px;
    margin:0;
    font-weight:850;
    line-height:1.4;
}
h1 em {
    font-style:normal;
    color:var(--green);
}
.intro-copy {
    font-size:13px;
    color:var(--muted);
    margin:10px 0 0;
}
.maker-stamp {
    border:1px dashed #abc5a9;
    border-radius:50%;
    width:98px;
    height:98px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    transform:rotate(10deg);
    margin-right:14px;
    color:var(--green);
}
.maker-stamp span {
    font-size:27px;
    line-height:1.1;
}
.maker-stamp b {
    font-size:13px;
    margin:3px;
}
.maker-stamp small {
    font-size:10px;
}
.model-tabs {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin-bottom:22px;
}
.model-tab {
    display:flex;
    align-items:center;
    text-align:left;
    position:relative;
    min-width:0;
    border:1px solid var(--line);
    border-radius:16px;
    background:var(--white);
    padding:8px 12px;
    gap:10px;
    min-height:89px;
    transition:background .2s,border .2s;
}
.model-tab[aria-pressed=true] {
    background:#e8f0df;
    border:2px solid #5f8f63;
    padding:7px 11px;
}
.model-tab img {
    width:92px;
    height:67px;
    object-fit:contain;
    flex-shrink:0;
}
.model-tab strong {
    font-size:15px;
    display:block;
}
.model-tab small {
    display:block;
    font-size:11px;
    color:var(--muted);
    margin-top:5px;
}
.model-tab .tab-check {
    position:absolute;
    right:9px;
    top:7px;
    font-size:13px;
    color:var(--green);
}
.workspace {
    display:grid;
    grid-template-columns:minmax(0,1fr) 318px;
    min-height:535px;
    border:1px solid #d6e1d2;
    border-radius:24px;
    overflow:hidden;
    background:var(--white);
    box-shadow:0 9px 32px #30452b06;
}
.scene-panel {
    position:relative;
    display:flex;
    flex-direction:column;
    min-width:0;
    background:radial-gradient(ellipse at 55% 48%,#f8faf0 0,#e9f0df 70%);
    overflow:hidden;
}
.scene-panel:before {
    content:"";
    position:absolute;
    inset:0;
    background-image:radial-gradient(#78957935 .85px,transparent .85px);
    background-size:22px 22px;
    pointer-events:none;
}
.scene-heading {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    padding:25px 26px 0;
    z-index:1;
    pointer-events:none;
}
.scene-heading h2 {
    font-size:22px;
    margin:0;
    letter-spacing:-.7px;
}
.scene-heading .eyebrow {
    font-size:10px;
    margin-bottom:7px;
}
.scene-heading p:last-child {
    color:var(--muted);
    font-size:12px;
    margin:8px 0 0;
}
.level {
    font-size:11px;
    background:#ffffff80;
    border:1px solid #d1dfc6;
    border-radius:20px;
    padding:7px 12px;
    white-space:nowrap;
}
.scene {
    position:relative;
    flex:1;
    min-height:330px;
    touch-action:none;
    overflow:hidden;
}
#stage {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    touch-action:none;
    z-index:2;
    cursor:grab;
}
#stage:active {
    cursor:grabbing;
}
.orbit {
    position:absolute;
    left:50%;
    top:59%;
    border:1px solid #a5b99c55;
    width:72%;
    height:43%;
    border-radius:50%;
    transform:translate(-50%,-50%);
    pointer-events:none;
}
.orbit-two {
    width:89%;
    height:55%;
    border-style:dashed;
    border-color:#a5b99c44;
}
.ground-shadow {
    position:absolute;
    width:47%;
    height:13%;
    left:27%;
    top:73%;
    border-radius:50%;
    background:#4b64501a;
    filter:blur(13px);
    pointer-events:none;
}
.scene-tag {
    position:absolute;
    left:24px;
    bottom:5px;
    font-size:10px;
    letter-spacing:1px;
    color:#7c9175;
    pointer-events:none;
}
.targets {
    position:absolute;
    inset:0;
    z-index:3;
    pointer-events:none;
}
.target {
    position:absolute;
    width:48px;
    height:48px;
    border:0;
    background:transparent;
    padding:0;
    transform:translate(-50%,-50%);
    pointer-events:auto;
    touch-action:none;
    display:grid;
    place-items:center;
}
.target span {
    display:grid;
    place-items:center;
    width:24px;
    height:24px;
    font-size:11px;
    font-weight:800;
    border-radius:50%;
    background:#fffefaee;
    color:#527956;
    border:1px solid #9eb88e;
    box-shadow:0 2px 4px #28482c12;
}
.target.hinted span {
    background:var(--green);
    color:white;
    box-shadow:0 0 0 7px #216e5820;
    border-color:var(--green);
    animation:hint-pulse 1.4s ease infinite;
}
.target:focus-visible {
    outline:0;
}
.target:focus-visible span {
    outline:3px solid var(--orange);
}
.scene-bottom {
    padding:9px 20px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    z-index:4;
    gap:8px;
}
.gesture-tip {
    font-size:11px;
    color:#657c5c;
}
.gesture-tip i {
    font-style:normal;
    margin:0 6px;
}
.view-tools {
    display:flex;
    gap:4px;
    background:#fffefa;
    border:1px solid #d9e3d0;
    border-radius:16px;
    padding:2px;
}
.view-tools button {
    width:48px;
    border:0;
    background:transparent;
    font-size:20px;
    border-radius:12px;
}
.view-tools button:hover {
    background:#edf2e7;
}
.parts-panel {
    padding:25px 22px 19px;
    display:flex;
    flex-direction:column;
    min-width:0;
    border-left:1px solid var(--line);
}
.parts-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.parts-heading .eyebrow {
    font-size:10px;
}
.parts-heading h2 {
    font-size:19px;
    letter-spacing:-.4px;
    margin:8px 0 18px;
}
.parts-heading h2 span {
    font-size:11px;
    background:#edf0e6;
    border-radius:6px;
    padding:3px 6px;
    vertical-align:middle;
    margin-left:4px;
}
.tiny-cube {
    font-size:30px;
    color:#79926d;
}
.progress-label {
    display:flex;
    justify-content:space-between;
    color:var(--muted);
    font-size:11px;
    margin-bottom:8px;
}
.progress-label span:last-child {
    color:var(--green);
    font-weight:750;
}
.progress {
    height:6px;
    background:#ecf0e6;
    border-radius:10px;
    overflow:hidden;
}
.progress>span {
    display:block;
    width:0;
    height:100%;
    background:#77a36c;
    border-radius:10px;
    transition:width .3s;
}
.instruction {
    font-size:12px;
    line-height:1.7;
    min-height:41px;
    color:#58704e;
    margin:14px 0 10px;
}
.parts-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    align-content:start;
    flex:1;
}
.part {
    border:1px solid #e5e9df;
    background:#f7f8f2;
    border-radius:13px;
    padding:6px 2px 7px;
    position:relative;
    min-width:0;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
}
.part img {
    width:100%;
    height:52px;
    object-fit:contain;
    pointer-events:none;
}
.part .part-name {
    display:block;
    font-size:10px;
    white-space:nowrap;
}
.part .part-number {
    position:absolute;
    left:6px;
    top:5px;
    font-size:9px;
    color:#65785b;
}
.part[aria-pressed=true] {
    border:2px solid var(--green);
    padding:5px 1px 6px;
    background:#eaf1e0;
}
.part.placed {
    background:#f0f4eb;
    border-color:#e9ede3;
    opacity:.5;
}
.part.placed .part-number {
    color:var(--green);
}
.parts-actions {
    display:flex;
    gap:8px;
    margin-top:16px;
}
.primary,.outline {
    border-radius:12px;
    padding:10px 15px;
    font-size:12px;
    font-weight:700;
    min-height:48px;
}
.primary {
    background:var(--green);
    border:1px solid var(--green);
    color:white;
}
.primary:hover {
    background:#185740;
}
.primary:disabled {
    opacity:.45;
}
.outline {
    background:var(--white);
    border:1px solid #ccd9c5;
}
.outline[aria-pressed=true] {
    background:#fff0d6;
    border-color:#d6a566;
}
.parts-actions .primary {
    flex:1;
}
.workshop-footer {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:7px 4px;
    color:var(--muted);
    font-size:11px;
}
.text-btn {
    border:0;
    background:transparent;
    color:var(--muted);
    font-size:12px;
    padding:0 8px;
}
.small-note {
    text-align:center;
    font-size:10px;
    letter-spacing:1px;
    color:#8d9b82;
    margin:8px;
}
.completion {
    padding-top:10px;
    text-align:center;
}
.completion-star {
    font-size:34px;
    color:#dfa146;
}
.completion h3 {
    margin:6px 0;
    font-size:21px;
}
.completion p {
    font-size:12px;
    color:var(--muted);
}
.completion button {
    width:100%;
}
.is-complete .parts-grid {
    display:none;
}
.is-complete .parts-actions {
    margin-top:auto;
}
.is-complete .completion {
    margin:auto 0;
}
.error-panel,.loading {
    position:absolute;
    inset:12px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    background:#f7faf0ed;
    z-index:8;
    text-align:center;
    border-radius:20px;
    padding:20px;
    font-size:13px;
}
.error-panel>span {
    font-size:40px;
}
.error-panel p {
    max-width:270px;
    line-height:1.7;
}
.loading {
    color:var(--muted);
}
.modal,.rest-reminder {
    position:fixed;
    inset:0;
    z-index:100;
    background:#18362e66;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    backdrop-filter:blur(5px);
}
.modal-card,.reminder-content {
    width:360px;
    max-width:100%;
    padding:30px;
    background:var(--white);
    border-radius:24px;
    text-align:center;
    box-shadow:0 22px 80px #163b3033;
}
.modal-card h2 {
    font-size:22px;
}
.modal-card p,.reminder-content p {
    font-size:13px;
    line-height:1.8;
    color:var(--muted);
}
.modal-card>div {
    display:flex;
    gap:10px;
    margin-top:24px;
}
.modal-card button {
    flex:1;
}
.modal-icon {
    font-size:36px;
    color:var(--green);
}
.reminder-content button {
    border:0;
    border-radius:12px;
    background:var(--green);
    color:white;
    padding:12px 20px;
}
.reminder-icon {
    font-size:36px;
}
.confetti {
    position:fixed;
    top:35%;
    left:50%;
    z-index:9;
    pointer-events:none;
    width:9px;
    height:14px;
    border-radius:3px;
    animation:confetti 1.4s ease-out forwards;
}
@keyframes confetti {
    to {
        transform:translate(var(--x),var(--y)) rotate(var(--r));
        opacity:0;
    }
}
@keyframes hint-pulse {
    50% {
        box-shadow:0 0 0 11px #216e5810;
    }
}
@media(min-width:1100px) {
    .workspace {
        min-height:550px;
    }
    .parts-grid {
        gap:10px;
    }
    .part img {
        height:56px;
    }
}
@media(max-width:1000px) {
    .model-tab img {
        width:64px;
    }
    .model-tab {
        gap:3px;
        padding:8px;
    }
    .model-tab[aria-pressed=true] {
        padding:7px;
    }
    .model-tab strong {
        font-size:13px;
    }
    .workspace {
        grid-template-columns:minmax(0,1fr) 280px;
    }
    .parts-panel {
        padding:20px 16px;
    }
    .scene-heading {
        padding:22px 20px 0;
    }
    .scene-heading h2 {
        font-size:20px;
    }
    .level {
        padding:6px 8px;
    }
}
@media(max-width:699px) {
    .topbar {
        gap:8px;
        height:63px;
        padding:0 16px;
        padding-top:env(safe-area-inset-top);
        height:calc(63px + env(safe-area-inset-top));
    }
    .back {
        font-size:12px;
        gap:5px;
        white-space:nowrap;
    }
    .back span {
        display:inline;
    }
    .brand {
        font-size:17px;
        gap:5px;
    }
    .brand-mark {
        display:none;
    }
    .brand small {
        font-size:10px;
    }
    .quiet-btn {
        border:0;
        padding:0 6px;
    }
    .quiet-btn span {
        display:none;
    }
    .workshop {
        padding:20px 14px calc(16px + env(safe-area-inset-bottom));
    }
    .intro {
        margin-bottom:18px;
    }
    .intro .eyebrow {
        font-size:10px;
        margin-bottom:5px;
    }
    h1 {
        font-size:26px;
        letter-spacing:-1px;
    }
    .intro-copy {
        font-size:11px;
        margin-top:6px;
    }
    .maker-stamp {
        display:none;
    }
    .model-tabs {
        gap:7px;
        margin-bottom:14px;
    }
    .model-tab {
        display:flex;
        flex-direction:column;
        justify-content:center;
        text-align:center;
        border-radius:13px;
        gap:0;
        padding:5px 2px;
        min-height:94px;
    }
    .model-tab[aria-pressed=true] {
        padding:4px 1px;
    }
    .model-tab img {
        width:70px;
        height:45px;
    }
    .model-tab strong {
        font-size:11px;
    }
    .model-tab small {
        font-size:9px;
        margin-top:3px;
    }
    .model-tab .tab-check {
        font-size:10px;
        right:5px;
        top:3px;
    }
    .workspace {
        display:flex;
        flex-direction:column;
        border-radius:20px;
        min-height:0;
    }
    .scene-heading {
        padding:16px 16px 0;
    }
    .scene-heading .eyebrow {
        font-size:9px;
        margin-bottom:4px;
    }
    .scene-heading h2 {
        font-size:19px;
    }
    .scene-heading p:last-child {
        font-size:10px;
        margin-top:5px;
    }
    .scene {
        height:clamp(235px,34vh,330px);
        min-height:235px;
        flex:auto;
    }
    .scene-bottom {
        padding:3px 12px 9px;
    }
    .gesture-tip {
        font-size:10px;
    }
    .view-tools {
        gap:0;
        border-radius:13px;
    }
    .view-tools button {
        width:48px;
        min-height:48px;
    }
    .scene-tag {
        left:16px;
        font-size:9px;
        bottom:0;
    }
    .parts-panel {
        padding:15px 15px 13px;
        border-left:0;
        border-top:1px solid var(--line);
    }
    .parts-heading h2 {
        font-size:16px;
        margin:0 0 10px;
    }
    .parts-heading .eyebrow,.tiny-cube {
        display:none;
    }
    .progress-label {
        font-size:10px;
        margin-bottom:6px;
    }
    .instruction {
        font-size:11px;
        min-height:0;
        margin:10px 0;
    }
    .parts-grid {
        display:flex;
        overflow-x:auto;
        padding:2px 2px 7px;
        gap:8px;
        scrollbar-width:thin;
        scrollbar-color:#b2c6a8 transparent;
    }
    .part {
        flex:0 0 80px;
        min-height:83px;
    }
    .part img {
        height:46px;
    }
    .part .part-name {
        font-size:10px;
    }
    .parts-actions {
        margin-top:7px;
    }
    .parts-actions .primary {
        flex:1;
    }
    .parts-actions .outline {
        min-width:90px;
    }
    .workshop-footer {
        font-size:10px;
        padding-top:1px;
    }
    .text-btn {
        font-size:11px;
    }
    .small-note {
        font-size:9px;
        margin:0;
    }
    .completion {
        padding:12px 0;
    }
    .is-complete .parts-actions {
        margin-top:4px;
    }
}
@media(max-height:550px) and (orientation:landscape) {
    .topbar {
        height:54px;
    }
    .workshop {
        padding-top:12px;
    }
    .intro,.small-note {
        display:none;
    }
    .model-tabs {
        margin-bottom:10px;
    }
    .model-tab {
        min-height:62px;
        flex-direction:row;
    }
    .model-tab img {
        height:45px;
    }
    .workspace {
        display:grid;
        grid-template-columns:minmax(0,1fr) 270px;
    }
    .scene {
        height:255px;
        min-height:210px;
    }
    .parts-panel {
        border-left:1px solid var(--line);
        border-top:0;
        padding:14px;
    }
    .parts-grid {
        display:grid;
        grid-template-columns:repeat(3,1fr);
        max-height:190px;
        overflow-y:auto;
        overflow-x:hidden;
    }
    .part {
        min-height:72px;
    }
    .part img {
        height:36px;
    }
    .parts-heading h2 {
        margin-bottom:10px;
    }
    .scene-heading {
        padding-top:14px;
    }
    .parts-actions {
        margin-top:10px;
    }
    .instruction {
        font-size:11px;
        min-height:0;
        margin:8px 0;
    }
}
.back,.brand {
    min-width:48px;
    min-height:48px;
}
@media(prefers-reduced-motion:reduce) {
    *,*:before,*:after {
        animation:none!important;
        transition:none!important;
    }
    .confetti {
        display:none;
    }
}
/* 复杂拼装：模型库、名称偏好与有界零件盒。 */
.catalog-heading,.parts-options,.parts-pager,.gallery-top {display:flex;align-items:center;justify-content:space-between;gap:8px}
.catalog-heading {font-size:12px;color:var(--muted);margin-bottom:10px;flex-wrap:wrap}
.catalog-actions {display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}
#open-ultraman {color:var(--green);border-color:var(--green)}
.parts-options {font-size:11px;flex-wrap:wrap;margin-top:12px}
.parts-options label {display:flex;align-items:center;gap:5px;min-height:48px;cursor:pointer}
.parts-options input {width:19px;height:19px;accent-color:var(--green)}
.parts-options select {font:inherit;min-height:48px;max-width:94px;padding:0 8px;color:var(--ink);border:1px solid var(--line);border-radius:9px;background:var(--white)}
.parts-pager {margin-top:6px;font-size:11px;color:var(--muted)}
.parts-pager button {width:48px;border:1px solid var(--line);background:var(--white);border-radius:10px;font-size:18px}
.parts-pager button:disabled {opacity:.3}
.parts-grid {flex:0 0 auto;min-height:255px}
.part {height:84px}
.is-complete .parts-pager,.is-complete .parts-options {display:none}
.gallery-card {width:min(900px,100%);max-height:90vh;overflow-y:auto;background:var(--paper);border-radius:24px;padding:24px;overscroll-behavior:contain}
.gallery-top h2 {margin:0;font-size:25px}
.gallery-top {margin-bottom:16px}
.search-label {display:flex;gap:12px;align-items:center;font-size:12px}
.search-label input {flex:1;min-width:0;min-height:48px;font:inherit;font-size:14px;border:1px solid var(--line);border-radius:12px;padding:0 14px;background:white}
.categories {display:flex;gap:6px;overflow-x:auto;margin:14px 0}
.categories button {flex-shrink:0;border:1px solid var(--line);border-radius:12px;background:var(--white);padding:0 12px;font-size:12px}
.categories button[aria-pressed=true] {color:white;background:var(--green)}
.gallery-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.gallery-grid .model-tab {flex-direction:column;text-align:center;padding:10px;gap:3px}
.gallery-grid .model-tab img {width:140px;height:90px;max-width:100%}
@media(max-width:699px){
    .catalog-heading {margin-bottom:8px}
    .catalog-heading .outline {font-size:11px}
    .parts-options {margin-top:6px}
    .parts-grid {min-height:96px}
    .gallery-card {padding:16px;max-height:90vh;border-radius:18px}
    .gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
    .gallery-grid .model-tab img {height:90px}
    .gallery-grid .model-tab strong {font-size:13px}
    .gallery-grid .model-tab small {font-size:11px}
    .intro-copy {line-height:1.7}
}
@media(max-height:550px) and (orientation:landscape){.parts-grid{min-height:170px;max-height:190px}.part{height:75px}}
.target-connectors {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}
.target-connectors line {stroke:#719168;stroke-width:1;stroke-opacity:.5;stroke-dasharray:3 3}

.difficulty-panel {margin:0 0 20px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--white)}
.difficulty-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;font-size:14px}
.difficulty-heading span {font-size:12px;color:var(--muted)}
.difficulty-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.difficulty-options button {display:flex;align-items:center;justify-content:center;gap:12px;min-height:58px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink)}
.difficulty-options button span {font-size:12px}
.difficulty-options button[aria-pressed=true] {background:var(--green);border-color:var(--green);color:white}
.difficulty-panel p {margin:10px 0 0;font-size:12px;line-height:1.6;color:var(--muted)}
.completion button {margin:4px}
@media(max-width:699px){
    .difficulty-panel {padding:12px;margin-bottom:14px}
    .difficulty-options button {flex-direction:column;gap:3px;padding:8px 4px}
    .difficulty-options strong {font-size:14px}
}

/* 完成作品：暖色收藏入口与可以再次表演的小展台。 */
.collection-entry{width:100%;display:flex;align-items:center;gap:16px;text-align:left;border:1px solid #ead8af;border-radius:18px;background:#fff7e6;padding:16px 20px;margin:0 0 24px;box-shadow:0 3px 0 #f1e8d3;}
.collection-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#f7dda0;color:#77561f;font-size:30px;flex-shrink:0;}
.collection-entry>span:nth-child(2){flex:1;min-width:0;}
.collection-entry strong{display:block;font-size:17px;}
.collection-entry b{display:inline-block;background:var(--ink);color:white;border-radius:20px;padding:2px 9px;font-size:12px;margin-left:7px;}
.collection-entry small{display:block;font-size:12px;line-height:1.6;color:#79684c;margin-top:5px;}
.collection-entry>span:last-child{font-size:13px;font-weight:700;white-space:nowrap;}
.blessing{background:#fff5de;border:1px solid #efdfb9;border-radius:16px;padding:16px 18px;line-height:1.9;font-size:15px;color:#6b5326;text-align:left;}
.completion .blessing{line-height:1.8;margin:12px 0;color:#6b5326;font-size:14px;}
.collection-status,.voice-status{font-size:12px;line-height:1.6;color:var(--muted);}
.completion .collection-status,.completion .voice-status{font-size:12px;line-height:1.6;margin:8px 0;}
.voice-status:empty{display:none;}
.celebration-actions{display:flex;gap:8px;flex-wrap:wrap;}
.completion .celebration-actions button{flex:1;min-width:110px;width:auto;font-size:13px;padding:8px;}
.works-open{overflow:hidden;}
.works-card{overscroll-behavior:contain;}
.collection-note{font-size:12px;line-height:1.7;color:var(--muted);background:#f0f3ed;border-radius:10px;padding:10px 12px;margin:6px 0 20px;}
#works-summary{font-size:13px;color:var(--muted);}
.works-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.work-card{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;border:1px solid var(--line);border-radius:18px;background:var(--white);padding:8px 12px 17px;transition:border-color .15s,transform .15s;}
.work-card:hover{border-color:#90b89a;transform:translateY(-2px);}
.work-card img{width:100%;height:145px;object-fit:contain;}
.work-card strong{font-size:15px;line-height:1.5;}
.work-card>span{font-size:11px;color:var(--green);background:#edf4e6;border-radius:7px;padding:5px 8px;margin:9px 0;}
.work-card small{font-size:11px;color:var(--muted);}
.works-empty{text-align:center;padding:20px 8px;}
.works-empty>span{display:block;font-size:70px;line-height:1.1;color:#8da488;}
.works-empty p{font-size:14px;color:var(--muted);line-height:1.9;}
.works-empty button{padding:10px 20px;}
.work-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;}
.work-heading h3{font-size:23px;margin:12px 0 4px;}
#work-badges{font-size:12px;font-weight:650;color:var(--green);}
#work-date{margin:6px 0 12px;}
.work-scene{position:relative;height:340px;border:1px solid #dfebda;border-radius:22px;background:radial-gradient(ellipse at 50% 40%,#fffef9 25%,#eaf1de 100%);overflow:hidden;touch-action:none;user-select:none;}
.work-scene canvas{position:relative;width:100%;height:100%;display:block;z-index:1;}
.work-scene .ground-shadow{bottom:15%;}
.work-motion-status{position:absolute;bottom:10px;left:0;right:0;z-index:2;pointer-events:none;text-align:center;color:var(--green);font-size:12px;font-weight:650;}
.work-gesture{font-size:11px;color:var(--muted);text-align:center;margin:10px 0;}
.work-controls{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:14px;}
.work-controls button{padding:10px 18px;font-size:14px;}
.performing::after{content:'✦　✧　✦';position:absolute;top:12%;left:12%;right:12%;text-align:center;font-size:22px;letter-spacing:15px;color:#d4a540;pointer-events:none;z-index:3;animation:work-sparkle 1.25s ease-in-out infinite alternate;}
@keyframes work-sparkle{from{opacity:.25;transform:translateY(4px)}to{opacity:.9;transform:translateY(-4px)}}
@media(max-width:600px){
    .collection-entry{gap:10px;padding:12px;margin-bottom:18px;flex-wrap:wrap;}
    .collection-entry>span:last-child{font-size:11px;margin-left:auto;}
    .collection-entry strong{font-size:15px;}
    .collection-entry small{font-size:11px;}
    .works-card{padding:18px;}
    .works-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
    .work-card{padding:5px 7px 13px;}
    .work-card img{height:108px;}
    .work-card strong{font-size:13px;}
    .work-card>span{font-size:10px;padding:4px;}
    .work-card small{font-size:10px;}
    .work-scene{height:280px;}
    .work-controls{gap:8px;}
    .work-controls button{padding:8px 12px;font-size:13px;flex:1;min-width:90px;}
    .work-heading h3{font-size:20px;}
    .blessing{font-size:14px;padding:12px 14px;}
}
@media(prefers-reduced-motion:reduce){.performing::after{animation:none;}.work-card{transition:none;}.work-card:hover{transform:none;}}
.work-voice-row{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.work-voice-row .voice-status{flex:1;}
.work-voice-row button{white-space:nowrap;margin-left:auto;}

/* 点选后把零件拿到模型旁；拖动与卡片滚动各有明确反馈。 */
.selection-shelf{position:relative;z-index:4;display:flex;align-items:center;gap:8px;min-height:78px;margin:2px 18px 10px;border:1px dashed #b8caae;border-radius:14px;padding:4px 10px;background:#fffdf5ba;}
.selection-shelf>p{font-size:12px;line-height:1.7;color:var(--muted);margin:8px auto;text-align:center;}
.selection-shelf.has-selection{border:2px solid var(--green);background:#fffbee;padding:3px 9px;}
.held-piece{display:flex;align-items:center;flex:1;min-width:0;gap:8px;background:none;border:0;padding:2px;text-align:left;touch-action:none;user-select:none;cursor:grab;}
.held-piece img{width:62px;height:62px;object-fit:contain;pointer-events:none;flex-shrink:0;}
.held-piece span{min-width:0;}
.held-piece strong{display:block;font-size:13px;color:var(--green);line-height:1.4;}
.held-piece small{display:block;font-size:11px;line-height:1.5;color:var(--muted);margin-top:4px;}
#clear-selection{flex-shrink:0;min-width:48px;}
.selection-badge{display:none;position:absolute;top:3px;right:3px;border-radius:7px;background:var(--green);color:white;padding:3px 5px;font-size:9px;pointer-events:none;}
.part[aria-pressed=true] .selection-badge{display:block;}
.part[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--green),0 3px 8px #216e5822;background:#e1efce;}
.target span{width:32px;height:32px;font-size:14px;border:2px solid #759461;}
.target.snap-ready span{width:40px;height:40px;background:var(--green);color:white;border:3px solid white;box-shadow:0 0 0 7px #216e5833;}
.drag-feedback{position:fixed;z-index:90;pointer-events:none;transform:translate(-50%,-100%);padding:5px 8px;border:2px solid var(--green);border-radius:12px;background:#fffef8f5;box-shadow:0 4px 14px #1d493325;text-align:center;}
.drag-feedback img{display:block;width:75px;height:65px;object-fit:contain;margin:auto;}
.drag-feedback span{display:block;white-space:nowrap;font-size:11px;color:var(--green);font-weight:750;}
.drag-feedback.over-scene img{display:none;}
.drag-feedback.ready{background:var(--green);}
.drag-feedback.ready span{color:white;}
.performing[data-performance=hero]::after{content:'✧　⚡　✧';color:#49b5d0;}
.performing[data-performance=princess]::after{content:'✧　✿　✧';color:#c471ad;}
.performing[data-performance=mermaid]::after{content:'◦　✧　◦';color:#67b1c4;}
@media(max-width:699px){.selection-shelf{margin:2px 12px 8px;min-height:78px;}.held-piece strong{font-size:12px;}.held-piece small{font-size:10px;}.held-piece img{width:54px;height:60px;}.catalog-actions{flex-wrap:wrap;justify-content:flex-end;}}

@media(max-width:699px){.parts-panel .parts-grid{order:-2;margin-bottom:4px;}.parts-panel .parts-pager{order:-1;margin-bottom:14px;}}

/* 全部卡片自然换行；只滚动页面，不把卡片藏在横滑、裁切或分页后。 */
.parts-panel .parts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:auto;min-height:0;max-height:none;overflow:visible;gap:8px;flex:0 0 auto;}
.parts-panel .part{height:96px;min-height:96px;min-width:0;}
.parts-panel.is-complete .parts-grid{display:none;}
@media(max-width:699px){.parts-panel .parts-grid{order:0;margin-bottom:8px;}.parts-panel .part img{height:54px;}}
@media(min-width:700px){.scene-panel{align-self:start;}.scene{height:380px;flex:none;}}
@media(max-height:550px) and (orientation:landscape){.scene{height:255px;}}
