/* Local Free Tools preview shell. Source demo styles and engines remain embedded. */
:root{--bg:#f6f5f1;--ink:#151515;--dim:#51514d;--faint:#696963;--hair:#cecdc5;--neutral:#33332f;--accent:#c43b20;--serif:Arial,Helvetica,sans-serif;--sans:Arial,Helvetica,sans-serif;--panel:#eeede7;--gold:#906309;--teal:#17797c;--violet:#72528f;color-scheme:light}
:root[data-theme=dark]{--bg:#151615;--ink:#f0eee7;--dim:#bdbeb6;--faint:#a3a49e;--hair:#3d403b;--neutral:#cecec5;--accent:#f27656;--panel:#1c1e1c;--gold:#e0b44e;--teal:#5fbfc2;--violet:#a184c8;color-scheme:dark}
*{box-sizing:border-box}
html{height:auto;min-height:100%;background:var(--bg)}
body{height:auto;min-height:100vh;margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif;-webkit-text-size-adjust:100%}
a{color:inherit;text-decoration:none}a:hover{color:var(--accent)}
button,a,input{ -webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:2px solid var(--accent)!important;outline-offset:4px}
.puja-nav{min-height:88px;padding:18px max(24px,calc((100vw - 1240px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--hair)}
.puja-logo{font-size:27px;font-weight:700;letter-spacing:-1.2px;white-space:nowrap}.puja-logo span{color:var(--accent)}
.puja-nav-right{display:flex;align-items:center;gap:30px;font-size:14px}
#puja-theme-toggle{font:inherit;border:1px solid var(--hair);border-radius:0;background:transparent;color:var(--ink);padding:10px 16px;min-width:78px;min-height:44px;cursor:pointer}
.stage{display:flex;flex-direction:column;align-items:stretch;gap:22px;width:calc(100% - 80px);max-width:1040px;height:auto;min-height:0;max-height:none;overflow:visible;margin:0 auto;padding:48px 0 56px;position:relative}
.stage>.title,.screen .title{font-family:Arial,Helvetica,sans-serif;font-style:normal;font-size:clamp(38px,5vw,68px);font-weight:500;letter-spacing:-.055em;line-height:1.06;text-align:left;margin:0 0 4px;color:var(--ink);opacity:1;text-wrap:balance}
.stage .subtitle,.stage .explain,.stage .caption,.stage .lede,.stage .hint{font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.6;letter-spacing:0;color:var(--dim);text-align:left;max-width:820px;margin:0}
.stage .readout{text-align:left;white-space:normal;overflow:visible;border-top:1px solid var(--hair);padding-top:16px}
.stage .readout .big,.stage .label .ratio{font-family:Arial,Helvetica,sans-serif;font-style:normal;font-size:clamp(30px,4vw,48px);font-weight:500;letter-spacing:-.04em;line-height:1.15;color:var(--ink)!important}
.stage .readout .mid,.stage .readout .small,.stage .label .name,.stage .label .hz{font-family:Arial,Helvetica,sans-serif;font-size:13px;letter-spacing:0;line-height:1.5;color:var(--dim)}
.stage .controls,.stage .row,.stage .modes,.stage .chips,.stage .guess{justify-content:flex-start;gap:8px}
.stage .btn,.stage .chip,.stage .quiet,.stage .ans,.stage .rung,.stage .wide,.stage .skip,.stage .hchip{font-family:Arial,Helvetica,sans-serif;font-style:normal;letter-spacing:0;border-radius:0;background:transparent;color:var(--ink);border:1px solid var(--hair);min-height:44px;box-shadow:none;text-shadow:none}
.stage .btn:hover,.stage .chip:hover,.stage .quiet:hover,.stage .ans:hover,.stage .rung:hover,.stage .wide:hover,.stage .skip:hover,.stage .hchip:hover{border-color:var(--accent);color:var(--accent)}
.stage .btn-play,.stage .btn-run,.stage .chip.is-on,.stage .chip[aria-pressed=true],.stage .ans.is-on{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.stage .btn svg,.stage .chip svg{fill:currentColor}
.stage input[type=range]{height:44px;accent-color:var(--ink);touch-action:pan-y}
.stage input[type=range]::-webkit-slider-runnable-track{background:var(--hair)}
.stage input[type=range]::-moz-range-track{background:var(--hair)}
.stage input[type=range]::-webkit-slider-thumb{background:var(--ink);box-shadow:none}
.stage input[type=range]::-moz-range-thumb{background:var(--ink);box-shadow:none}
/* Existing drawing wrappers are kept at definite sizes. Their original resize
   functions can measure these boxes without feeding canvas sizes back into CSS. */
.stage :is(.figwrap,.stringwrap,.wheelwrap,.combwrap,.picwrap,.specwrap,.latwrap,.clockwrap,.ringwrap,.ringswrap,.wavewrap,.linewrap,.envwrap,.planewrap,.cvwrap,.curvewrap){flex:0 0 auto;min-height:320px;height:clamp(320px,39vw,440px);width:100%;max-width:none;overflow:hidden;background:var(--panel);border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.stage :is(.axiswrap,.bandwrap,.stripwrap,.chartwrap,.rulerwrap,.mapwrap,.keywrap,.dirwrap,.sliderwrap){flex:0 0 auto;min-height:130px;height:clamp(130px,24vw,240px);width:100%;max-width:none;overflow:hidden;background:var(--panel);border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.stage .axiswrap .label{background:transparent}
.stage canvas{max-width:100%}
/* Paint colors are adapted in free-tool-canvas-palette.js; canvas pixels are
   never filtered, so gold/teal and the visual meaning of each mark remain. */
.stage canvas{filter:none}
.stage .controls{flex-wrap:wrap;min-width:0}
.stage .controls>*{max-width:100%}
.stage.puja-endless .dirwrap{flex:1 1 280px;width:auto;max-width:100%;height:auto;min-height:44px;overflow:visible;background:transparent;border:0}
.stage.puja-endless .controls{justify-content:flex-start}
.stage .note,.stage .num,.stage .cap,.stage .txt{color:var(--dim);font-family:Arial,Helvetica,sans-serif}
.stage .screen[hidden],.stage [hidden]{display:none!important}
.puja-footer{max-width:1040px;width:calc(100% - 80px);margin:0 auto;padding:24px 0 32px;border-top:1px solid var(--hair);display:flex;justify-content:space-between;gap:20px;color:var(--faint);font:13px Arial,Helvetica,sans-serif}
@media(max-width:700px){.puja-nav{min-height:74px;padding:14px 20px}.puja-logo{font-size:23px}.puja-nav-right{gap:14px;font-size:12px}#puja-theme-toggle{padding:9px 12px;min-width:65px}.stage{width:calc(100% - 40px);padding:30px 0 40px;gap:18px}.stage>.title,.screen .title{font-size:clamp(38px,9vw,52px)}.stage .subtitle,.stage .explain,.stage .caption,.stage .lede,.stage .hint{font-size:14px}.stage :is(.figwrap,.stringwrap,.wheelwrap,.combwrap,.picwrap,.specwrap,.latwrap,.clockwrap,.ringwrap,.ringswrap,.wavewrap,.linewrap,.envwrap,.planewrap,.cvwrap,.curvewrap){height:340px;min-height:340px}.stage :is(.axiswrap,.bandwrap,.stripwrap,.chartwrap,.rulerwrap,.mapwrap,.keywrap,.dirwrap,.sliderwrap){height:150px;min-height:150px}.puja-footer{width:calc(100% - 40px);font-size:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Reserve enough space for paired pitch wheels without intrinsic-size collapse. */
.stage .wheels{height:380px;min-height:380px;flex:0 0 auto}
@media(max-width:700px){.stage .wheels{height:230px;min-height:230px}}
