:root{--paper:#faf8f4;--ink:#4d4059;--muted:#93859d;--lavender:#a68abd;--soft:#f1eaf7;--white:#fffefa;color-scheme:light}
html,body{height:100%;width:100%;overflow:hidden}body{position:fixed;inset:0;background:#f8f5f9;background-image:none;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif}button,input,a{-webkit-tap-highlight-color:transparent}button{transition:background .16s,transform .16s}button:active:not(:disabled){transform:scale(.98)}.icon-button{width:44px;height:44px;display:grid;place-items:center;flex-shrink:0;background:transparent;border-radius:14px;color:#6c597e}.icon-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.home-screen{max-width:1040px;height:100dvh;display:flex;flex-direction:column;margin:auto;padding:max(18px,env(safe-area-inset-top)) 34px max(12px,env(safe-area-inset-bottom));overflow:hidden;user-select:none;-webkit-user-select:none}.home-topbar{display:flex;align-items:center;justify-content:space-between;min-height:52px;flex-shrink:0;margin-bottom:20px}.home-brand{display:flex;align-items:center;gap:12px}.home-brand img{border-radius:13px;box-shadow:0 4px 10px #8b719220}.home-brand strong{font-size:19px;letter-spacing:1px;display:block}.home-brand span{display:block;font-size:8px;letter-spacing:1.6px;color:#a095aa;margin-top:5px}.home-scroll{overflow-y:auto;overscroll-behavior:none;touch-action:pan-y;min-height:0;padding:0 0 20px;scrollbar-width:thin;scrollbar-color:#d9c9e1 transparent}.new-work{display:flex;position:relative;isolation:isolate;align-items:center;width:100%;min-height:218px;text-align:left;overflow:hidden;border-radius:27px;background:linear-gradient(120deg,#eae0f2,#f5eaf1 68%,#f5e3dc);color:#5e4671;padding:26px 32px;box-shadow:inset 0 1px 0 #ffffff90}.new-work:before{content:'';position:absolute;right:-30px;top:-90px;width:300px;height:300px;border:1px solid #ffffff70;border-radius:50%;z-index:-1}.new-work-copy{position:relative;z-index:2;display:block}.new-work-copy>small{font-size:11px;color:#97839f;letter-spacing:.3px}.new-work-copy>strong{display:block;font-size:31px;line-height:1.4;letter-spacing:1px;margin:12px 0 21px}.create-label{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:600;background:#fffdf5e8;padding:11px 17px;border-radius:13px;box-shadow:0 3px 10px #92769c0c}.welcome-cake{position:absolute;right:22px;width:270px;height:224px;bottom:-4px;pointer-events:none;transform:rotate(-7deg)}.library-section{padding-top:29px}.library-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px}.library-heading h1{font-size:20px;letter-spacing:.5px;margin:0 0 6px;font-weight:700}.library-heading h1>span{display:inline-flex;align-items:center;justify-content:center;min-width:23px;height:21px;padding:0 6px;font-size:11px;font-weight:500;background:#eae3f0;border-radius:7px;color:#9277a8;margin-left:5px;vertical-align:3px}.library-heading p{font-size:11px;margin:0;color:#a195a8}.text-button{font-size:11px;color:#967baa;background:#eee7f3;padding:9px 12px;border-radius:10px;min-height:40px}.library-search{display:flex;align-items:center;gap:8px;background:#f0ebf3;border-radius:13px;padding:0 13px;margin-bottom:17px;min-height:43px}.library-search svg{width:17px;height:17px;fill:none;stroke:#a695b1;stroke-width:1.7;stroke-linecap:round;flex-shrink:0}.library-search input{background:none;border:0;outline:none;width:100%;font-size:14px;padding:11px 0;color:#61516f;user-select:text;-webkit-user-select:text}.library-search input::placeholder{color:#a99aaf;font-size:12px}.work-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.work-card{overflow:hidden;background:#fffefd;border:1px solid #eee7f0;border-radius:20px;box-shadow:0 3px 12px #7e638d05;min-width:0}.work-preview{position:relative;width:100%;aspect-ratio:4/3;overflow:hidden;background:#f6f0f3;padding:0;display:block}.work-preview img{display:block;width:100%;height:100%;object-fit:cover}.work-preview .preview-placeholder{object-fit:contain;padding:10%}.work-details{display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:center;padding:7px 9px 13px 14px}.work-title{background:none;text-align:left;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:8px 0;min-height:36px;font-weight:600;color:#655070}.work-menu{display:grid;place-items:center;background:none;width:38px;height:38px;border-radius:10px;color:#a294ab}.work-menu svg{width:20px;height:20px;fill:currentColor}.work-date{grid-column:1/-1;font-size:10px;color:#aaa0af}.library-placeholder{padding:37px 10px 30px;text-align:center;color:#a99bb0;font-size:12px}.library-placeholder h2{font-size:15px;color:#8f7c9b;font-weight:550;margin:13px 0 7px}.library-placeholder p{font-size:11px;line-height:1.9;margin:0}.library-placeholder .soft-button{max-width:260px;margin:16px auto}.empty-line-icon{display:inline-grid;place-items:center;border:1px dashed #d4c5dd;background:#f2ecf5;width:49px;height:49px;border-radius:17px;font-size:26px;color:#b49cc5}.loading-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#b095c6;margin-right:9px;animation:pulse 1s infinite alternate}.home-storage-note{font-size:10px;color:#b2a6b8;text-align:center;padding:24px 0 0;margin:0}.home-storage-note span{display:inline-block;width:5px;height:5px;border-radius:50%;background:#b0bea1;margin-right:6px}
.studio{max-width:1240px;display:flex;flex-direction:column;height:100dvh;padding:max(12px,env(safe-area-inset-top)) 22px max(12px,env(safe-area-inset-bottom));gap:12px;overflow:hidden}.editor-topbar{margin:0;min-height:52px;gap:7px;flex-shrink:0}.editor-identity{flex:1;min-width:0}.editor-identity>button{display:flex;align-items:center;gap:6px;max-width:100%;background:none;padding:0;text-align:left;min-height:25px}.editor-identity strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-weight:650}.editor-identity svg{width:13px;height:13px;stroke:#a898b1;fill:none;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}#saveStatus{display:flex;align-items:center;gap:5px;font-size:10px;color:#a595ad;line-height:1.6}#saveStatus:before{content:'';width:4px;height:4px;border-radius:50%;background:#c8b5d5}#saveStatus[data-state=saved]:before{background:#a3b895}#saveStatus[data-state=saving]:before{background:#cfb480;animation:pulse .6s infinite alternate}#saveStatus[data-state=error]{color:#b06d75}#saveStatus[data-state=error]:before{background:#bd7d84}.editor-topbar .finish{min-width:64px;min-height:40px;border-radius:13px;box-shadow:0 2px 6px #a58ac01a;padding:10px 18px;background:#a184ba;border:0;font-size:13px}.workspace{flex:1;min-height:0;grid-template-columns:minmax(0,1fr) 360px;gap:18px;overflow:hidden;align-items:stretch}.canvas-column{background:none;min-height:0;display:flex;flex-direction:column}.canvas-card{border:1px solid #e3d9e8;border-radius:24px;box-shadow:0 3px 15px #74578505;display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden;background:#f6f0f3}.canvas-bar{background:#fffcf8;border-bottom:1px solid #efe7ee;padding:5px 8px}.board-wrap{flex:1;aspect-ratio:auto;min-height:180px;background:#f6f0f3}.canvas-actions{background:#fffcf8;border-color:#eee5ed;min-height:38px;flex-shrink:0}.canvas-bar #rotateView{min-width:80px;background:#f3edf7;border-color:#e6d9ec}.canvas-bar #rotateView[aria-pressed=true]{background:#a184ba;border-color:#a184ba;color:white}.canvas-bar .zoom-controls{background:#f4eef8;border-color:#e7dced}.canvas-bar .zoom-controls button+button{border-color:#e7dced}.materials{height:auto;max-height:none;border:1px solid #e6dfea;background:#fffdfb;border-radius:24px;box-shadow:0 3px 15px #74578504}.tabs{background:#fffdfb;border-color:#eee8f0;gap:3px;padding:5px 8px}.tabs button{border-radius:12px;min-height:40px;color:#a99bb0;font-size:12px}.tabs button[aria-selected=true]{background:#eee5f5;color:#85649d}.tabs button[aria-selected=true]:after{display:none}.panel-title{margin:0 0 14px}.panel-title h2{font-size:16px}.panel-title p{font-size:11px}.shape-option,.flavor,.decor-option,.character-grid .decor-option{background:#fffdfb;border-color:#e8e1e9;box-shadow:none}.shape-option[aria-pressed=true],.flavor[aria-pressed=true],.decor-option[aria-pressed=true]{background:#f1e9f7;border-color:#bea7ce;box-shadow:none}.decor-search{background:#f7f3f8;border-color:transparent}.decor-categories{border:0;background:#f3eef6;padding:3px;border-radius:12px}.decor-categories button{border-radius:9px;min-height:36px;padding:7px 4px}.decor-categories button[aria-pressed=true]{background:#fffdfc;box-shadow:0 2px 7px #81608d0b;color:#86679a}.object-tools{border-color:#e9dff0;border-radius:15px;background:#f3edf7}.primary{border:0;background:#a184ba;box-shadow:0 2px 4px #a184ba12;border-radius:13px}.primary:active{box-shadow:none}.soft-button{background:#f4edf8;border-color:#dfd1e7;border-radius:12px}.tool-badge{background:#fffcf3dc;border-color:#e5d8e7;color:#9b86a6}.empty-invite button{background:#fffcf7;border-color:#cab4d8;font-size:12px}.empty-invite>span{color:#a790b3}.status{bottom:43px}.text-input{border-color:#e0d6e6;border-radius:13px;background:#fffefd}
.app-sheet{position:fixed;inset:auto 0 0;margin:0 auto;max-height:85dvh;width:min(100%,480px);border:0;border-radius:28px 28px 0 0;padding:10px 23px max(24px,env(safe-area-inset-bottom));background:#fffdf9;color:var(--ink);box-shadow:0 -10px 60px #49375112;overscroll-behavior:none;overflow-y:auto}.app-sheet::backdrop{background:#42314f55;backdrop-filter:blur(4px)}.sheet-handle{width:32px;height:4px;background:#e3d9e7;border-radius:9px;margin:0 auto 6px}.app-sheet header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 7px}.app-sheet h2{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.app-sheet .icon-button{font-size:26px;color:#b29cbb}.app-sheet h3{font-size:13px;margin:18px 0 8px}.sheet-note{color:#a394ab;line-height:1.85;font-size:12px;margin:12px 0}.sheet-action{display:flex;width:100%;align-items:center;gap:12px;min-height:53px;padding:10px 7px;text-align:left;font-size:14px;color:#705b7e;background:transparent;border-bottom:1px solid #f1eaf1}.sheet-action .action-icon{width:22px;height:22px;flex-shrink:0}.action-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.sheet-action.danger{color:#bc818c}.rename-form .text-label{font-size:12px;margin:12px 0 8px}.rename-form .primary{margin:20px 0 8px}.trash-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid #eee5ef;padding:12px 0}.trash-row strong{font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.trash-row button{width:auto;min-width:65px;padding:9px 15px}.offline-status{font-size:11px;background:#f3f4ea;border-radius:11px;padding:12px;color:#9a9c7f;line-height:1.7}.app-toast{position:fixed;z-index:500;left:50%;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:15px;max-width:calc(100% - 32px);width:max-content;background:#665370f0;color:#fffafc;border-radius:15px;padding:14px 17px;box-shadow:0 5px 20px #55405d22;font-size:12px;line-height:1.5}.app-toast button{background:none;font-size:12px;font-weight:700;color:#e9d5ff;white-space:nowrap;min-height:30px;padding:0 4px}.modal{background:#42314f55}.export-card{background:#fffaf5;border-radius:26px}.export-card h2{font-size:23px}.export-card img{border-radius:18px;border-color:#e9dfe9}.export-secondary{display:flex;justify-content:space-between;gap:14px;margin-top:8px}.export-secondary .quiet{font-size:12px;min-height:44px;margin:0;text-decoration:none}#shareImage{margin-top:10px;min-height:44px}.export-card .save-hint{font-size:11px}
@keyframes pulse{from{opacity:.45}to{opacity:1}}
@media(max-width:800px){.home-screen{max-width:560px;padding:max(14px,env(safe-area-inset-top)) 21px max(9px,env(safe-area-inset-bottom))}.home-topbar{margin-bottom:18px}.home-brand{gap:10px}.home-brand strong{font-size:18px}.home-brand span{font-size:7px;letter-spacing:1.2px}.new-work{min-height:216px;padding:23px 22px;border-radius:24px}.new-work-copy>small{font-size:10px;letter-spacing:0}.new-work-copy>strong{font-size:27px;margin:10px 0 18px;letter-spacing:.5px}.welcome-cake{width:190px;height:172px;right:-26px;bottom:-2px;opacity:.94}.new-work-copy{max-width:220px}.create-label{font-size:11px;padding:10px 13px;border-radius:11px}.library-section{padding-top:27px}.library-heading{margin-bottom:17px}.library-heading h1{font-size:19px}.work-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.work-card{border-radius:18px}.work-details{padding:5px 7px 12px 11px;grid-template-columns:minmax(0,1fr) 32px}.work-menu{width:32px}.work-title{font-size:12px}.work-date{font-size:9px}.library-search input{font-size:16px}.studio{max-width:560px;padding:max(6px,env(safe-area-inset-top)) 10px max(8px,env(safe-area-inset-bottom));gap:8px}.editor-topbar{min-height:50px;gap:4px}.editor-topbar .icon-button{width:36px;min-width:36px}.editor-identity strong{font-size:15px}.editor-topbar .finish{min-width:60px;min-height:40px;padding:10px 16px}.workspace{gap:9px}.canvas-column{display:block;flex:0 0 auto;padding:0}.canvas-card{border-radius:20px;display:block}.board-wrap{min-height:0;height:clamp(180px,30dvh,285px);display:block}.canvas-bar{padding:3px 5px}.canvas-actions{min-height:34px}.canvas-bar .view-controls{gap:4px}.canvas-bar .view-controls button{padding:8px 11px}.materials{border-radius:21px;height:auto;flex:1;min-height:0}.tabs{padding:5px 7px}.tabs button{font-size:12px;min-height:38px;padding:8px 0}.panel{padding:12px 13px 18px}.panel-title{display:none}.status{bottom:38px;font-size:10px}.decor-categories button{font-size:10px}.home-storage-note{font-size:9px}.app-sheet{padding-left:21px;padding-right:21px}.export-card{padding:28px 20px 16px}.export-card .primary{min-height:44px}}
@media(max-width:360px){.home-screen{padding-left:16px;padding-right:16px}.new-work{padding:20px;min-height:204px}.new-work-copy>strong{font-size:25px}.new-work-copy>small{font-size:9px}.welcome-cake{width:170px;right:-25px;bottom:0}.studio{padding-left:8px;padding-right:8px}.canvas-bar .view-controls{gap:2px}.canvas-bar .view-controls>button{padding-left:8px;padding-right:8px}.canvas-bar #rotateView{min-width:73px}.editor-identity strong{font-size:14px}.work-grid{gap:10px}}
@media(max-height:650px) and (max-width:800px){.board-wrap{height:155px}.studio{gap:5px}.editor-topbar{min-height:46px}.workspace{gap:7px}.home-topbar{margin-bottom:12px}.new-work{min-height:182px}.new-work-copy>strong{font-size:24px;margin:8px 0 15px}.welcome-cake{height:150px;width:175px}.library-section{padding-top:22px}}
@media(max-height:450px) and (max-width:800px){.board-wrap{height:105px}.canvas-actions{display:none}.editor-topbar{min-height:42px}.canvas-bar .view-controls button{min-height:36px;padding-top:4px;padding-bottom:4px}.canvas-bar .zoom-controls button{min-height:34px}.tabs{padding-top:2px;padding-bottom:2px}.tabs button{min-height:34px}.studio{padding-top:2px;padding-bottom:2px;gap:3px}.workspace{gap:5px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media(max-width:800px){.section-label{font-size:12px}.section-label small{font-size:10px}.shape-option,.flavor{font-size:11px}.decor-option,.character-grid .decor-option{font-size:11px}.canvas-actions .history span,.canvas-actions .quiet{font-size:11px}.work-count{font-size:10px}.range-row,.layer-chip{font-size:12px}.decor-categories button{font-size:11px}.decor-meta{font-size:10px}.text-label{font-size:12px}.segmented button{font-size:12px}.object-title{font-size:12px}.object-controls label,.object-controls button{font-size:11px}.work-menu{width:38px;min-height:44px}.work-details{grid-template-columns:minmax(0,1fr) 38px}.editor-topbar .icon-button{width:40px;min-width:40px}}

/* Touch screens keep one scroll surface without a persistent scroll rail. */
@media (max-width:800px), (pointer:coarse){
  .home-scroll,.panel-scroller,.app-sheet,.export-card{scrollbar-width:none}
  .home-scroll::-webkit-scrollbar,.panel-scroller::-webkit-scrollbar,.app-sheet::-webkit-scrollbar,.export-card::-webkit-scrollbar{display:none;width:0;height:0}
}
