.paint-studio,.paint-studio.is-expanded{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:14px;max-width:1100px}.studio-header{display:flex;align-items:center;gap:16px;position:relative}.studio-title{flex:1;text-align:center}.studio-title h1{font:400 clamp(28px,4vw,50px) Georgia,serif;margin:0}.studio-title .kicker{font-size:10px;margin:0 0 5px}.studio-home{display:flex;flex-direction:column;align-items:center;text-decoration:none;font-size:32px;min-width:60px}.studio-home span{font-size:13px}.picture-name{display:block;margin:3px 0 0;font-size:13px}.paint-studio button,.paint-studio summary{touch-action:manipulation}.paint-studio button:not([data-color]),.picture-menu summary,.more-tools summary{font:inherit;cursor:pointer;border:1px solid #e5bdcc;background:#fff7f5;color:#522445;border-radius:18px;min-height:48px;padding:10px 18px;box-sizing:border-box}.paint-paper,.is-expanded .paint-paper{height:clamp(320px,64dvh,850px);min-width:0;min-height:0;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:8px}.paint-paper canvas{flex:none;max-width:100%;max-height:100%}.paint-controls,.is-expanded .paint-controls{position:relative;top:auto;width:100%;max-height:none;overflow:visible;background:#fff4f1;border:1px solid #efccd3;border-radius:25px;padding:16px 20px;box-sizing:border-box}.palette,.is-expanded .palette{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;padding:5px;margin-bottom:16px}.palette button,.is-expanded .palette button{width:100%;height:auto;aspect-ratio:1;max-width:62px;justify-self:center;border:3px solid white}.tray-tools{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.paint-tools,.paint-actions{display:flex;gap:10px;flex-wrap:nowrap;margin:0}.paint-tools{flex:1}.paint-tools button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1}.paint-tools button span{font-size:25px}.paint-tools button[aria-pressed=true],#paint-save{background:#a45370;color:white}.paint-actions button{min-width:95px}.more-tools summary{font-size:14px;list-style:none}.more-tools[open]{flex-basis:100%}.more-tools label{display:inline-block;margin:12px}.more-tools input{max-width:250px;vertical-align:middle}#paint-reset{margin:12px}#paint-status{font-size:12px;min-height:18px;line-height:1.5;margin:10px 0 0}.picture-menu summary{list-style:none;text-align:center;font-size:16px}.picture-menu[open]{margin:0}.picture-menu[open] .picture-picker{position:absolute;right:0;top:100%;z-index:20;width:min(520px,88vw);background:#fffaf3;border:1px solid #dab3c0;border-radius:18px;box-shadow:0 8px 28px #52244525;padding:14px;box-sizing:border-box}.picture-picker,.is-expanded .picture-picker{grid-template-columns:repeat(4,minmax(0,1fr));max-height:45dvh}.picture-picker button{min-width:0!important;padding:6px!important;font-size:12px!important}.picture-picker img,.is-expanded .picture-picker img{height:85px}.paint-studio :is(button,summary,input,a):focus-visible{outline:3px solid #522445;outline-offset:3px}.paint-studio.is-expanded{max-width:none;height:100dvh;padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));gap:10px}.is-expanded .paint-paper{height:100%}.is-expanded .studio-title .kicker{display:none}.is-expanded .studio-title h1{font-size:30px}.is-expanded .palette button{max-width:52px}.is-expanded .paint-controls{padding:10px 18px;max-height:45dvh;overflow:auto}.is-expanded .picture-picker{max-height:55dvh}#main.section-main{padding-top:12px}.back-link{margin-bottom:10px!important}
@media(max-width:700px){.studio-header{gap:8px;flex-wrap:wrap}.studio-title .kicker{display:none}.studio-title h1{font-size:30px}.studio-home{min-width:42px}.studio-home span{font-size:11px}.paint-studio button:not([data-color]),.picture-menu summary,.more-tools summary{padding:8px 12px;font-size:14px}.picture-menu{margin-left:auto}.palette{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:12px}.palette button{max-width:46px}.paint-controls{padding:12px}.tray-tools{gap:10px}.paint-tools{flex-basis:100%}.paint-actions{flex:1}.paint-actions button{flex:1}.paint-paper{height:58dvh}.is-expanded .palette{grid-template-columns:repeat(12,minmax(0,1fr));gap:7px}.is-expanded .palette button{border-width:2px;min-height:0}.is-expanded .paint-tools{flex-basis:auto}.is-expanded .paint-tools button span{display:none}.is-expanded .tray-tools{gap:6px}.is-expanded .paint-tools,.is-expanded .paint-actions{gap:5px}.is-expanded .paint-actions button{min-width:0}.is-expanded .paint-controls{padding:10px}.is-expanded #paint-status{font-size:11px}}
/* Keep the artwork and paint tray together within the screen. */
.masthead{display:none}.paint-studio{height:calc(100dvh - 90px);min-height:620px}.paint-paper{height:100%}.paint-studio.is-expanded{height:100dvh;min-height:0}.studio-title h1{line-height:1.15}@media(max-width:700px){.paint-studio{min-height:650px}.paint-studio.is-expanded{min-height:0}.paint-studio:not(.is-expanded) .palette{grid-template-columns:repeat(6,minmax(0,1fr))}.is-expanded .studio-header{gap:6px}.is-expanded .studio-title h1{font-size:24px}}
/* Always-open painting workspace with a truly centered banner. */
.paint-studio.is-expanded{padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:radial-gradient(ellipse at 50% 0,#fbe6ec 0,transparent 48%),#fff9f3}.studio-header,.is-expanded .studio-header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;min-height:76px}.studio-title{grid-column:2;justify-self:center}.studio-title h1,.is-expanded .studio-title h1{font-size:clamp(26px,3.6vw,42px);line-height:1.1}.studio-back{justify-self:start;display:flex;align-items:center;gap:8px;text-decoration:none;color:#522445;min-height:48px;padding:0 12px;font-size:24px}.studio-back span{font-size:14px}.header-actions{justify-self:end;display:flex;gap:10px}.header-actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:24px!important;padding:6px 14px!important;min-width:62px}.header-actions button span{font-size:12px}.character-chip{display:inline-flex;align-items:center;gap:8px;border-radius:30px;background:#fcebf0;padding:3px 14px 3px 4px;margin-top:5px;min-height:34px;font-size:14px}.character-chip img{border-radius:50%;width:34px;height:34px;object-fit:cover;object-position:50% 30%;background:white;border:1px solid #edced9}.picture-menu{position:relative;flex-shrink:0}.picture-menu[open] .picture-picker{top:auto;bottom:calc(100% + 12px);left:0;right:auto}.paint-controls .paint-tools{flex:1}.is-expanded .paint-paper{width:100%;margin:0}.is-expanded .paint-controls{overflow:visible}.paint-controls #paint-status{pointer-events:none}.paint-expanded .back-link,.paint-expanded .site-footer{display:none}@media(max-width:700px){.studio-header,.is-expanded .studio-header{gap:4px;min-height:76px}.header-actions{gap:5px}.header-actions button{min-width:44px;padding:5px 8px!important}.studio-back{padding:0 4px}.studio-back span{display:none}.studio-title h1,.is-expanded .studio-title h1{font-size:26px}.character-chip{font-size:12px;padding-right:10px}.character-chip img{width:28px;height:28px}.paint-controls .picture-menu{margin:0}.is-expanded .tray-tools{flex-wrap:wrap}.is-expanded .paint-tools{flex-basis:auto}.is-expanded .paint-controls{max-height:46dvh}.picture-menu summary{font-size:12px!important;padding:8px!important}.is-expanded .palette{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.is-expanded .palette button{max-width:36px}.paint-controls .more-tools{margin-left:auto}}
.avatar-frame{display:block;width:34px;height:34px;border-radius:50%;overflow:hidden;background:white;flex:none;border:1px solid #edced9}.character-chip .avatar-frame img{border:0;border-radius:0;max-width:none;width:100%;height:100%;object-fit:cover;object-position:50% 30%;transform:scale(2);transform-origin:50% 30%}.character-chip{padding-left:3px}@media(max-width:700px){.avatar-frame{width:28px;height:28px}}
/* Navigation stays in the banner, away from the painting tools. */
.header-left{display:flex;gap:10px;justify-self:start;align-items:center;min-width:0}.header-left .studio-back,.header-left .picture-menu summary{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-width:62px;min-height:58px;padding:6px 14px!important;border:1px solid #e5bdcc;border-radius:18px;background:#fff7f5;color:#522445;box-sizing:border-box;font-size:12px!important;line-height:1.3;text-decoration:none}.header-left .button-icon{font-size:24px!important;line-height:1.1}.header-left .studio-back span{display:block;font-size:12px}.header-left .picture-menu{margin:0}.header-left .picture-menu[open] .picture-picker{top:calc(100% + 12px);bottom:auto;left:0;right:auto}.is-expanded .tray-tools{display:block}.paint-controls .paint-tools{width:100%}.paint-controls .paint-tools button{min-height:48px}.header-actions button{min-height:58px!important}@media(max-width:700px){.header-left{gap:5px}.header-left .studio-back,.header-left .picture-menu summary{min-width:44px;min-height:54px;padding:5px 7px!important;font-size:11px!important}.header-left .studio-back span{font-size:11px}.header-left .button-icon{font-size:22px!important}.header-actions button{min-height:54px!important}.studio-title h1,.is-expanded .studio-title h1{font-size:clamp(18px,4.5vw,26px)}.character-chip{gap:4px;font-size:11px}.studio-header,.is-expanded .studio-header{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.is-expanded .paint-tools{display:flex}}

.header-actions #paint-reset{margin:0}.header-actions #paint-reset>span[aria-hidden]{font-size:24px;line-height:1}.header-actions #paint-reset>span:last-child{font-size:12px;white-space:nowrap}@media(max-width:550px){.studio-header,.is-expanded .studio-header{grid-template-columns:1fr 1fr}.studio-title{grid-row:1;grid-column:1/-1}.header-left{grid-row:2;grid-column:1}.header-actions{grid-row:2;grid-column:2}.studio-header{min-height:0}.header-actions #paint-reset{min-width:54px}}

/* Compact picker: original character portraits, the same size as the title badge. */
.header-left .picture-menu[open] .picture-picker{width:min(312px,calc(100vw - 32px));grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 4px;padding:10px;max-height:min(260px,55dvh);overflow:auto;margin:0}
.picture-picker button,.is-expanded .picture-picker button{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:5px;background:transparent!important;border:0!important;border-radius:10px!important;min-height:64px!important;padding:4px 2px!important;font-size:11px!important;line-height:1.2;box-shadow:none}
.picture-picker img,.is-expanded .picture-picker img{display:block;width:34px;height:34px;object-fit:cover;border-radius:50%;border:1px solid #e4bccb;box-sizing:border-box;margin:0;background:white}
.picture-picker button[aria-pressed=true]{outline:0}
.picture-picker button[aria-pressed=true] img{outline:2px solid #a45370;outline-offset:2px}
.character-chip .avatar-frame img{transform:none;object-fit:cover;object-position:center}
@media(max-width:700px){.avatar-frame{width:34px;height:34px}.character-chip img{width:34px;height:34px}}
.studio-header,.is-expanded .studio-header{z-index:30}.header-left .picture-menu[open]{z-index:31}

.header-left .puzzle-menu{margin:0}.header-left .puzzle-menu summary{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:68px;min-height:58px;padding:6px 14px;border:1px solid #e5bdcc;border-radius:18px;background:#fff7f5;color:#522445;box-sizing:border-box;font-size:12px;line-height:1.3;list-style:none;cursor:pointer}.puzzle-menu summary::-webkit-details-marker{display:none}.puzzle-menu[open] .puzzle-picker,.header-left .picture-menu[open] .picture-picker{position:absolute;z-index:35;top:calc(100% + 12px);left:0;right:auto;width:min(460px,calc(100vw - 24px));max-height:55dvh;overflow:auto;background:#fff9f3;border:1px solid #dab3c0;border-radius:20px;box-shadow:0 8px 25px #52244525;padding:15px;margin:0;display:block}.puzzle-picker a,.header-left .picture-picker button,.is-expanded .picture-picker button{display:block!important;width:100%;text-align:left;margin:7px 0;font:inherit!important;font-size:16px!important;line-height:1.3!important;color:#522445;background:#fff7f5!important;border:1px solid #e5bdcc!important;border-radius:16px!important;padding:10px 14px!important;min-height:46px!important;text-decoration:none;box-sizing:border-box}.header-left .picture-picker img{display:none!important}.header-left details[open] summary{background:#f3dce8;border-color:#b57c9b}@media(max-width:700px){.header-left .puzzle-menu summary{min-width:44px;min-height:54px;padding:5px 7px;font-size:11px}}@media(max-width:550px){.header-left{gap:4px}.header-left .studio-back,.header-left .picture-menu summary,.header-left .puzzle-menu summary{min-width:42px;padding:5px!important}.header-actions{gap:3px}.header-actions button{min-width:38px!important;padding:5px!important;font-size:10px!important}.header-actions #paint-reset{min-width:45px!important}.header-actions #paint-reset>span:last-child{font-size:10px}}
.header-left .picture-menu,.header-left .puzzle-menu{position:static}

.header-left .picture-picker .print-at-home-option{display:block;width:100%;margin:12px 0 2px;border-top:1px solid #dab3c0;padding:15px 14px 6px;color:#733e5c;text-decoration:none;text-align:left;font-size:16px;line-height:1.3;min-height:46px}.print-at-home-option:focus-visible{outline:3px solid #522445;outline-offset:2px}
