/* A quiet palette playground: tactile yarn, petal swatches, and a little space to play. */
.yarn-studio{--ys-color-0:#b64759;--ys-color-1:#f7e0e5;--ys-color-2:#719271;--ys-ink:#3b3a38;position:relative;isolation:isolate;container-type:inline-size;height:420px;min-height:420px;color:var(--ys-ink);font-family:'Nunito Sans',Arial,sans-serif}
.ys-scene{position:absolute;inset:0;overflow:hidden;border:1px solid #dbe2e5;border-radius:22px 40px 22px 40px;background:radial-gradient(ellipse at 26% 37%,rgba(247,224,229,.8),transparent 52%),radial-gradient(ellipse at 78% 40%,rgba(225,237,235,.75),transparent 56%),#f2f7fa;touch-action:pan-y;outline:none;cursor:grab;user-select:none;-webkit-user-select:none}
.ys-scene:focus-visible{outline:3px solid #b64759;outline-offset:4px}.ys-scene.ys-grabbing{cursor:grabbing}
.ys-canvas{position:absolute;inset:18px -2% 137px;opacity:0;transition:opacity .6s ease;pointer-events:none}.ys-canvas.ys-ready{opacity:1}.ys-canvas canvas{display:block;width:100%;height:100%;max-width:none}
.ys-topline{position:absolute;top:19px;left:22px;right:22px;display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;line-height:1.3;pointer-events:none;color:#63585b}.ys-petal{width:23px;height:23px;color:#b64759;flex:none}.ys-render-label{margin-left:auto;font-size:11px;font-weight:600;color:#786e72;background:rgba(255,255,255,.55);border-radius:20px;padding:5px 9px}
.ys-orbit-cue{position:absolute;top:59px;right:24px;display:flex;align-items:center;gap:7px;color:#756b70;font-size:11px;line-height:1.3;pointer-events:none}.ys-orbit-cue svg{flex:none}
.ys-palette-panel{position:absolute;left:50%;bottom:93px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px)}
.ys-panel-label{display:block;margin-bottom:6px;text-align:center;font-size:11px;font-weight:700;line-height:1.3;color:#756b70}.ys-palettes{display:flex;gap:7px}
.ys-palette{appearance:none;border:1px dashed #c9bec4;border-radius:10px;background:rgba(255,255,255,.66);padding:7px 13px;min-height:50px;min-width:92px;font:700 11px/1.3 'Nunito Sans',Arial,sans-serif;color:#62565c;display:flex;flex-direction:column;gap:4px;align-items:center;cursor:pointer;transition:background .2s,border-color .2s,transform .2s,box-shadow .2s}
.ys-palette:hover{background:#fff;transform:translateY(-2px);box-shadow:0 3px 8px #55333c0c}.ys-palette[aria-pressed=true]{border-style:solid;border-color:#b64759;background:#fff4f7;color:#8c3046;box-shadow:0 0 0 2px #b647590a}.ys-palette:focus-visible,.ys-controls button:focus-visible{outline:3px solid #b64759;outline-offset:3px}
.ys-palette-dots{display:flex;align-items:center;height:18px;padding-inline:5px}.ys-palette-dots i{display:block;width:18px;height:18px;background:var(--swatch);border:1px solid #66535c20;border-radius:60% 48% 60% 48%;transform:rotate(-25deg);margin-left:-3px;box-shadow:inset 0 1px 1px #ffffff38}.ys-palette-dots i:nth-child(2){transform:rotate(25deg);z-index:1}.ys-palette-dots i:nth-child(3){transform:rotate(65deg)}
.ys-controls{position:absolute;left:50%;bottom:32px;transform:translateX(-50%);display:flex;align-items:center;gap:3px;max-width:calc(100% - 24px);padding:4px 5px;background:rgba(255,255,255,.8);border:1px solid #e2d9df;border-radius:13px;box-shadow:0 3px 12px #55333c05}
.ys-controls button{appearance:none;border:0;border-radius:9px;background:transparent;width:50px;height:44px;min-width:44px;padding:3px 1px;color:#62565c;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:700 10px/1.1 'Nunito Sans',Arial,sans-serif;white-space:nowrap;cursor:pointer;transition:background .18s,color .18s,transform .18s}.ys-controls button svg{width:16px;height:16px;flex:none}.ys-controls button:hover{background:#f7e0e5;color:#8c3046;transform:translateY(-1px)}.ys-controls button:active{transform:scale(.94)}.ys-controls button[aria-pressed=false]{background:#e6eeeb;color:#496b61}
.ys-caption{position:absolute;left:18px;right:18px;bottom:10px;text-align:center;margin:0;font-size:10px;line-height:1.4;color:#786e72;pointer-events:none}
.ys-screen-reader{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ys-fallback{position:absolute;inset:18% 14% 40%;transition:transform .3s ease,opacity .6s ease;transform-origin:50% 70%;pointer-events:none}.yarn-studio[data-renderer=webgl] .ys-fallback{opacity:0}
.ys-fallback-ball{position:absolute;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 32% 24%,rgba(255,255,255,.35),transparent 50%),radial-gradient(circle at 66% 82%,rgba(71,47,44,.22),transparent 62%),var(--ball);box-shadow:inset -8px -8px 25px rgba(71,47,44,.13),0 25px 24px -18px rgba(71,47,44,.24);color:rgba(71,47,44,.6);overflow:hidden}
.ys-fallback-ball svg{width:100%;height:100%;mix-blend-mode:soft-light}.ys-fallback-large{--ball:var(--ys-color-0);width:49%;left:8%;top:12%;z-index:2;transform:rotate(-24deg)}.ys-fallback-medium{--ball:var(--ys-color-1);width:39%;right:7%;top:12%;z-index:1;transform:rotate(21deg)}.ys-fallback-small{--ball:var(--ys-color-2);width:28%;right:9%;bottom:-2%;z-index:3;transform:rotate(-13deg)}
.ys-fallback-hook{position:absolute;z-index:1;width:68%;height:8px;left:15%;top:25%;border-radius:8px;background:linear-gradient(#d7b18a,#a77954);transform:rotate(-24deg);box-shadow:0 3px 4px rgba(71,47,44,.13)}.ys-fallback-hook:before{content:'';position:absolute;left:0;width:42%;top:-7px;height:22px;border-radius:50px;background:linear-gradient(#b1845f,#805b40)}.ys-fallback-hook:after{content:'';position:absolute;right:-6px;top:-9px;width:21px;height:18px;border:6px solid #c39b72;border-left:0;border-bottom:0;border-radius:0 15px 0 0}
@container(max-width:480px){.ys-palette{min-width:88px;padding-inline:8px}.ys-controls button{width:46px}.ys-topline{left:17px;right:17px}.ys-orbit-cue{right:18px;top:58px}.ys-fallback{inset:23% 8% 42%}.ys-canvas{inset:34px -6% 147px}}
@media(max-width:700px){.yarn-studio{height:450px;min-height:450px}.ys-scene{border-radius:20px 34px 20px 34px}.ys-canvas{inset:42px -6% 150px}.ys-fallback{inset:23% 8% 42%}.ys-palette-panel{bottom:98px}.ys-controls{bottom:34px}.ys-caption{bottom:11px;font-size:10px}}
@container(max-width:340px){.ys-palette-panel{max-width:calc(100% - 24px)}.ys-palettes{gap:5px}.ys-palette{min-width:78px;padding:7px 6px;font-size:10px}.ys-controls{gap:1px;padding-inline:3px}.ys-controls button{width:44px;font-size:9px}.ys-topline{font-size:12px;gap:6px;left:14px;right:14px}.ys-petal{width:21px;height:21px}.ys-render-label{font-size:9px;padding:5px 7px}.ys-orbit-cue{right:15px;font-size:10px}.ys-caption{left:10px;right:10px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.ys-canvas,.ys-fallback,.ys-palette,.ys-controls button{transition:none!important}.ys-palette:hover,.ys-controls button:hover{transform:none}}
/* Compact hosts need two rows so every control remains reachable. */
@container(max-width:300px){.ys-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:calc(100% - 24px);max-width:none;gap:2px;padding:5px;bottom:32px}.ys-controls button{width:100%;min-width:44px;font-size:10px}.ys-palette-panel{bottom:145px;width:calc(100% - 24px);max-width:none}.ys-palettes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.ys-palette{min-width:0;width:100%;padding:7px 3px;font-size:10px}.ys-canvas{inset:32px -6% 193px}.ys-fallback{inset:21% 8% 48%}}
