/* 11/20 stage 1 of the 304 look (owner picked 304 + the current product's bottom part = 602). Loaded after twotone.css.
   Colours: every value comes from theme.mjs THEMES via --tt-* (ground, ink, ink2, ink3, hair, hair2, soft, strip, rec, now).
   Rules are 0.5px (--rule-w). ink2 = secondary words (>= 4.5:1), ink3 = small helper labels only (>= 3:1).
   Not here on purpose (later stages): octave dotted lines, right-end note names, frame and chord column lines, top ruler
   removal (stage 2, chart JS); chord row inside the figure (stage 3). No 304 example readouts (v3 C4->D4, 2.2.3, 8 voices). */
:root{--rule-w:.5px;--tt-ink2:var(--tt-ink);--tt-ink3:var(--tt-ink);--tt-hair:var(--tt-ink);--tt-hair2:var(--tt-ink);--tt-soft:var(--tt-ground);--tt-strip:var(--tt-ground);--tt-now:var(--tt-ink)}
html[data-design]{--ink2:var(--tt-ink2);--ink3:var(--tt-ink3);--rule:var(--tt-hair);--hair:var(--tt-hair);--hair2:var(--tt-hair2);--soft:var(--tt-soft);--head-dim:var(--tt-ink2);--head-line:var(--tt-hair);--foot:var(--tt-ink2);
 --mono:Mono,"IBM Plex Sans JP",ui-monospace,monospace;--cw:500;--cs:32px;--ct:-.04em}

/* ---------- header: 0.5px rule under it, light BPM, mono caps labels, the Frond mark ---------- */
html[data-design] #app header.top{border-bottom:var(--rule-w) solid var(--tt-hair)!important;padding-bottom:14px!important;margin-bottom:14px!important}
html[data-design] #app .instrument.product31>.progression{border-top:0!important}
html[data-design] #app .wordmark{display:flex!important;align-items:center!important;gap:7px!important}
html[data-design] #app .wordmark .frond-mark{width:17px;height:17px;flex:none;margin:0 1px 0 4px;position:relative;top:1px}
html[data-design] #app .wordmark .frond-mark path{fill:var(--tt-ink)!important}
html[data-design] #app .wordmark>span{font:400 12px Geist,"IBM Plex Sans JP",sans-serif!important;letter-spacing:0!important;color:var(--tt-ink)!important}
html[data-design] #app header.top #tempo{font:300 24px Geist,sans-serif!important;letter-spacing:-.02em!important;border-bottom:0!important;width:54px!important}
html[data-design] #app header.top .header-actions label:has(#tempo){font:400 9.5px var(--mono)!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:var(--tt-ink2)!important;align-items:baseline!important}
html[data-design] #app header.top .sound-k{font:400 9.5px var(--mono)!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:var(--tt-ink2)!important}
html[data-design] #app header.top :is(#preset-open,#sound-pick){box-shadow:inset 0 calc(-1 * var(--rule-w)) var(--tt-hair2)!important}
html[data-design] #app header.top :is(#preset-open,#sound-pick,#undo,#redo,#project-open,#help-toggle):hover:not(:disabled){box-shadow:inset 0 -1px var(--tt-ink)!important}
html[data-design] #app header.top #redo:disabled{color:var(--tt-ink3)!important;opacity:1!important}
html[data-design] #app header.top #midi-drop-zone{border:var(--rule-w) solid var(--tt-hair2)!important}
html[data-design] #app header.top .language-switch button[aria-pressed=false]{color:var(--tt-ink2)!important}

/* ---------- [ FIG. 0x ] labels ---------- */
html[data-design] #app .edit-heading>div:first-child::before{content:"[ FIG. 01 ]";font:400 9.5px var(--mono);letter-spacing:.08em;color:var(--tt-ink3);margin-right:14px;white-space:pre;align-self:center}
/* the panel is a CSS grid: the label must not become a grid item (it pushed the tabs into a 6px row at 1200 wide), so it sits absolutely in extra top padding */
html[data-design] #app #pitch-panel{padding-top:34px!important}
html[data-design] #app #pitch-panel::before{content:"[ FIG. 02 ]";position:absolute;top:12px;left:var(--fig2-left,24px);font:400 9.5px var(--mono);letter-spacing:.08em;color:var(--tt-ink3);white-space:pre;pointer-events:none}
@media(max-width:1000px){html[data-design] #app #pitch-panel{--fig2-left:12px;padding-top:28px!important}html[data-design] #app #pitch-panel::before{top:8px}}
html[data-design] #app .delivery::before{content:"[ FIG. 03 ]";font:400 9.5px var(--mono);letter-spacing:.08em;color:var(--tt-ink3);white-space:pre;flex:none;align-self:center;margin-right:14px}
html[data-design][lang=ja] #app .edit-heading>div:first-child::before{content:"[ 図 01 ]"}
html[data-design][lang=ja] #app #pitch-panel::before{content:"[ 図 02 ]"}
html[data-design][lang=ja] #app .delivery::before{content:"[ 図 03 ]"}
@media(max-width:1000px){html[data-design] #app .delivery::before{display:none}html[data-design] #app .edit-heading>div:first-child::before{margin-right:8px}}

/* ---------- chord row (stays where it is in stage 1): Medium names, mono position and length ---------- */
html[data-design] #app #chords .chord{border-right:var(--rule-w) solid var(--tt-hair)!important}
html[data-design] #app #chords .chord :is(small,em){font-family:var(--mono)!important;font-size:10px!important;letter-spacing:.02em!important;color:var(--tt-ink2)!important}
html[data-design] #app #chords .chord[data-current=true]:not(#chords.is-live .chord){background-color:var(--tt-soft)!important}

/* ---------- figure: pitch labels and ruler in mono, the chosen chord's column in soft, play position in "now" ---------- */
html[data-design] #app #score text{font-family:var(--mono)!important;font-size:10px;fill:var(--tt-ink2)!important}
html[data-design] #app #score .chord-current{fill:var(--tt-soft)!important;fill-opacity:1!important}
html[data-design] #app #stage #score .play-marker :is(path,circle,line,rect,g){fill:var(--tt-now)!important;stroke:var(--tt-now)!important}   /* 3 ids: beats twotone's ':is(#app,body) #score path' */
html[data-design] #app #stage #score .play-marker .cursor-line{stroke-width:1.25px!important;fill:none!important}
html[data-design] #app #stage #cursor-handle::before,html[data-design] #app #stage #cursor-handle::after{background:var(--tt-now)!important;border-color:var(--tt-now)!important;border-radius:1px!important}
html[data-design] #app #edit-hint{color:var(--tt-ink2)!important}
html[data-design] #app #position{font-family:var(--mono)!important;font-size:11px!important;color:var(--tt-ink2)!important}

/* ---------- right panel: tabs, category row, Apply to / Pick, framed numbered tiles ---------- */
html[data-design] #app #pitch-panel{border-left:var(--rule-w) solid var(--tt-hair)!important}
html[data-design] #app #pitch-panel .library-tabs{border-bottom:var(--rule-w) solid var(--tt-hair)!important}
html[data-design] #app #pitch-panel .library-tabs button{font:400 15px Geist,"IBM Plex Sans JP",sans-serif!important;color:var(--tt-ink2)!important}
html[data-design] #app #pitch-panel .library-tabs button[aria-pressed=true]{font-weight:500!important;color:var(--tt-ink)!important;box-shadow:inset 0 -1px var(--tt-ink)!important}
html[data-design] #app #rich-index button{color:var(--tt-ink2)!important}
html[data-design] #app #rich-index button[aria-current=true]{color:var(--tt-ink)!important;font-weight:500!important;box-shadow:inset 0 -1px var(--tt-ink)!important}
html[data-design] #app #rich-index button small{font:400 8.5px var(--mono)!important;vertical-align:super;margin-left:2px!important;color:var(--tt-ink3)!important}
html[data-design] #app #pitch-panel :is(.scope-chips,.stack-row) .sc-k{font:400 9.5px var(--mono)!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:var(--tt-ink2)!important}
html[data-design] #app #pitch-panel :is(.scope-chips,.stack-row) button:not([aria-checked=true]):not([aria-pressed=true]){border:var(--rule-w) solid var(--tt-hair2)!important}
html[data-design] #app #preset-grid{counter-reset:tile}
html[data-design] #app #pitch-panel #preset-grid .recipe{counter-increment:tile;position:relative;padding-top:13px!important;box-shadow:inset 0 0 0 var(--rule-w) var(--tt-hair2)!important}
html[data-design] #app #pitch-panel #preset-grid .recipe::before{content:counter(tile,decimal-leading-zero);position:absolute;left:6px;top:4px;font:400 8.5px var(--mono);letter-spacing:.02em;color:var(--tt-ink3);pointer-events:none}
html[data-design] #app #pitch-panel #preset-grid .recipe:hover{box-shadow:inset 0 0 0 1px var(--tt-ink)!important}
html[data-design] #app #pitch-panel #preset-grid .recipe:is([aria-pressed=true],[aria-current=true],[aria-selected=true],.selected,.is-selected)::before{color:var(--tt-ground)}
html[data-design] #app #rich-range{font-family:var(--mono)!important;font-size:10.5px!important;color:var(--tt-ink2)!important}

/* ---------- bottom (stays as the product): only the rule weight and helper greys ---------- */
html[data-design] #app .delivery{border-top:var(--rule-w) solid var(--tt-hair)!important}
html[data-design] #app .instrument.product31>footer :is(span,output),html[data-design] #app #length-info{color:var(--tt-ink2)!important}

/* ---------- the colour chips: ground with an ink dot, the chosen one ringed in the page's ink ---------- */
html[data-design] body #theme-chips{display:inline-flex!important;align-items:center;gap:2px;padding:0 2px;min-height:30px;flex:none}
html[data-design] body #theme-chips .tc{all:unset;box-sizing:border-box;width:23px;height:26px;display:grid;place-items:center;cursor:pointer;border-radius:50%;background:transparent!important;box-shadow:none!important;-webkit-tap-highlight-color:transparent}
html[data-design] body #theme-chips .tc .tc-sw{width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background-color:var(--c-g)!important;box-shadow:inset 0 0 0 1px var(--tt-hair2)!important;transition:transform .16s cubic-bezier(.3,1.5,.5,1),box-shadow .16s ease}
html[data-design] body #theme-chips .tc .tc-sw i{display:block;width:6px;height:6px;border-radius:50%;background-color:var(--c-i)!important;transition:transform .16s cubic-bezier(.3,1.5,.5,1)}
html[data-design] body #theme-chips .tc:hover .tc-sw{transform:scale(1.12)}
html[data-design] body #theme-chips .tc:active .tc-sw{transform:scale(.9)}
html[data-design] body #theme-chips .tc[aria-pressed=true] .tc-sw{box-shadow:inset 0 0 0 1px var(--tt-hair2),0 0 0 2px var(--tt-ground),0 0 0 3px var(--tt-ink)!important}
html[data-design] body #theme-chips .tc[aria-pressed=true] .tc-sw i{transform:scale(1.4)}
html[data-design] body #theme-chips .tc:focus-visible{outline:1.5px solid var(--tt-ink)!important;outline-offset:0!important}
/* fallback only (theme.mjs measures): the header cannot hold the chips even after shrinking -> top right of the panel */
html[data-design][data-chips=panel] #app #pitch-panel>#theme-chips{position:absolute;top:3px;right:0;min-height:22px}
/* the switch: a short cross-fade of the ground and the ink (only while .theme-fading is on; theme.mjs skips it for reduced motion) */
html.theme-fading[data-design] body,html.theme-fading[data-design] body *,html.theme-fading[data-design] body *::before,html.theme-fading[data-design] body *::after{transition:color .26s ease,background-color .26s ease,border-color .26s ease,fill .26s ease,stroke .26s ease,box-shadow .26s ease!important}
@media (prefers-reduced-motion:reduce){html[data-design] body #theme-chips .tc .tc-sw,html[data-design] body #theme-chips .tc .tc-sw i{transition:none!important}html[data-design] body #theme-chips .tc:is(:hover,:active) .tc-sw{transform:none}}
/* owner 11/20: the chosen Flow icon (icon-512.svg, "voice ribbons") at the left of the header, in the theme's ink + record red */
html[data-design] #app .wordmark .flow-icon{width:26px;height:26px;flex:none;margin-right:6px;position:relative;top:1px}
html[data-design] #app .wordmark .flow-icon :is(rect,path){fill:var(--tt-ink)!important;stroke:none!important}
html[data-design] #app .wordmark .flow-icon .flow-icon-red{fill:var(--tt-ink)!important}   /* owner 11/20: the red cell is ink too */
/* narrow windows (940-1000 wide): the header must still hold everything — "frond grid" goes, marks and chips get smaller */
@media(min-width:1301px){html[data-design] #app header.top{column-gap:16px!important}}
@media(max-width:1300px){html[data-design] #app .wordmark .frond-mark{display:none}html[data-design] #app .wordmark{gap:4px!important}html[data-design] #app .wordmark .flow-icon{width:20px;height:20px;margin-right:2px}}
@media(max-width:1000px){
 html[data-design] #app .wordmark .flow-icon{width:20px;height:20px;margin-right:2px}
 html[data-design] #app .wordmark .frond-mark{width:14px;height:14px;margin-left:2px}
 html[data-design] #app header.top #tempo{font-size:19px!important;width:40px!important}
 html[data-design] body #theme-chips{gap:0;padding:0}
 html[data-design] body #theme-chips .tc{width:20px;height:22px}
 html[data-design] body #theme-chips .tc .tc-sw{width:14px;height:14px}
 html[data-design] body #theme-chips .tc .tc-sw i{width:5px;height:5px}
 html[data-design] #app #pitch-panel .library-tabs button{font-size:13px!important}
}
@media(max-width:1250px) and (min-width:1001px){html[data-design] #app #pitch-panel .library-tabs button{font-size:13px!important}}
/* the category counts: shown as mono superscripts only where the row has room (rich-list.css hides them at 1000px and below) */
@media(min-width:1001px){html[data-design] #app #rich-index button small{display:inline!important}}

/* ---------- stage 2 (chart): dotted octaves, frame, chord column lines, right-end note names, the play strip on top ---------- */
html[data-design] #app #stage #score .oct-line{stroke:var(--tt-hair2)!important;stroke-width:.5px!important;stroke-dasharray:1.5 3!important;fill:none!important}
html[data-design] #app #stage #score .fig-frame{stroke:var(--tt-ink)!important;stroke-width:var(--rule-w)!important;fill:none!important}
html[data-design] #app #stage #score .chord-edge{stroke:var(--tt-hair2)!important;stroke-width:var(--rule-w)!important;fill:none!important}
html[data-design] #app #stage #score text.end-note{fill:var(--tt-ink2)!important;font-family:var(--mono)!important;font-size:10px}
html[data-design] #app #stage #score .ruler-band{fill:transparent!important;stroke:none!important;cursor:pointer}
/* small panels: the tile numbers go (1.0.1 showed 1-12 of 62 at 940x660; with the number row only 1-8 fitted) */
@media(max-width:1000px){html[data-design] #app #pitch-panel #preset-grid .recipe{padding-top:2px!important}html[data-design] #app #pitch-panel #preset-grid .recipe::before{display:none}}
/* ---------- stage-3 PROTOTYPE (html.stage3-live, comparison only): the chord row as the figure's column heads ---------- */
html.stage3-live[data-design] #app #chords{padding-top:8px!important;padding-bottom:0!important;height:100%;box-sizing:border-box}
html.stage3-live[data-design] #app #chords .chord{border-right:0!important;background-color:transparent!important;padding-top:4px!important;padding-bottom:4px!important;padding-left:10px!important}
html.stage3-live[data-design] #app #chords .chord .chord-name{--cs:34px;letter-spacing:-.045em!important}
/* owner 11/20: chips stay in the header as far down in width as possible — the header's own spacing shrinks first */
@media(max-width:1300px){
 html[data-design] #app header.top{column-gap:10px!important}
 html[data-design] #app .wordmark>span{display:none!important}   /* 'frond grid' goes before the chips do */
 html[data-design] #app header.top .header-actions{gap:4px!important}
 html[data-design] body #theme-chips{gap:0;padding:0}
 html[data-design] body #theme-chips .tc{width:20px;height:24px}
 html[data-design] body #theme-chips .tc .tc-sw{width:15px;height:15px}
 html[data-design] body #theme-chips .tc .tc-sw i{width:5.5px;height:5.5px}
}
@media(max-width:1100px){
 html[data-design] #app header.top{column-gap:4px!important}
 html[data-design] #app header.top .header-actions{gap:1px!important}
 html[data-design] #app header.top :is(#undo,#redo,#project-open,#help-toggle){padding-left:4px!important;padding-right:4px!important}
 html[data-design] #app header.top :is(#preset-open,#sound-pick){padding:0 4px!important}
 html[data-design] #app header.top #animate{min-width:0!important;padding:0 12px!important}
 html[data-design] #app header.top #tempo{font-size:18px!important;width:36px!important}
 html[data-design] #app header.top .header-actions label:has(#tempo){gap:2px!important}
 html[data-design] #app header.top #sync{padding-left:2px!important;padding-right:2px!important}
 html[data-design] #app header.top .language-switch{gap:2px!important}
 html[data-design] #app header.top .language-switch button{padding-left:3px!important;padding-right:3px!important}
 html[data-design] body #theme-chips .tc{width:18px}
 html[data-design] body #theme-chips .tc .tc-sw{width:13px;height:13px}
 html[data-design] body #theme-chips .tc .tc-sw i{width:5px;height:5px}
}
/* ---------- 11/20 soft-figure variants (html[data-figure=s1..s8]; none = stage-2 figure). No blur, shadow or glow. ---------- */
/* shared pieces */
html[data-figure=s1] #app #stage #score path[fill="#171717"],html[data-figure=s4] #app #stage #score path[fill="#171717"],html[data-figure=s7] #app #stage #score path[fill="#171717"],html[data-figure=s8] #app #stage #score path[fill="#171717"]{stroke:var(--tt-ink)!important;stroke-width:.35px!important;stroke-linejoin:round!important;stroke-linecap:round!important}
html:is([data-figure=s1],[data-figure=s6],[data-figure=s8]) #app #stage #score .play-marker .cursor-line{stroke-width:.8px!important;stroke-linecap:round!important}
html:is([data-figure=s6],[data-figure=s8]) #app #stage #cursor-handle::before{inset:11px 12px!important;border-radius:50%!important}
/* s2: the ink a little lighter (overlaps read darker), helper lines one step fainter */
html[data-figure=s2] #app #stage #score path[fill="#171717"]{opacity:.72!important}
html[data-figure=s2] #app #stage #score .fig-frame{stroke:var(--tt-hair2)!important}
html[data-figure=s2] #app #stage #score .chord-edge{stroke:var(--tt-hair)!important}
html:is([data-figure=s2],[data-figure=s3],[data-figure=s8]) #app #stage #score .oct-line{stroke:var(--tt-hair)!important}
/* s3: helper lines gone (no frame, no dividers), octave dots faint */
html[data-figure=s3] #app #stage #score .fig-frame{stroke:none!important}
/* s5: the figure gets its own plane (a hair darker than the page), no outline, rounded corners; chord ticks only */
html:is([data-figure=s5],[data-figure=s8]) #app #stage #score .fig-frame{stroke:none!important}
html[data-design] #app #stage #score .fig-plane{fill:var(--tt-plane)!important;stroke:none!important}
/* s6: round note dots — the live notes hollow and smaller, the handle a dot */
html[data-figure=s6] #app #stage #score .play-marker .live-notes circle{fill:var(--tt-ground)!important;stroke:var(--tt-now)!important;stroke-width:1px!important;r:2.5px}
/* s7: one very faint layer between the outer voices */
html[data-figure=s7] #app #stage #score .fig-layer{fill:var(--tt-ink)!important;fill-opacity:.045!important;stroke:none!important}
/* s8: s1 + s4 + s5 together, ink slightly lighter */
html[data-figure=s8] #app #stage #score path[fill="#171717"]{opacity:.86!important}
/* ---------- 11/20 t1..t4: no chord dividers in the figure (owner), frame/dots as s3 ---------- */
html[data-design] #app #stage #score .fig-frame.is-off{stroke:none!important}
html:is([data-figure=t1],[data-figure=t2],[data-figure=t3],[data-figure=t4]) #app #stage #score .oct-line{stroke:var(--tt-hair)!important}
/* t2: the chosen chord's band goes; one very faint band follows the chord being heard (the chosen chord when stopped) */
html[data-figure=t2] #app #stage #score .chord-current{display:none}
html[data-design] #app #stage #score .live-band{fill:var(--tt-soft)!important;fill-opacity:.7!important;stroke:none!important}
/* t3: lines outside the live section a little lighter, full ink inside it */
html[data-figure=t3] #app #stage #score .voices-dim{opacity:.5}
/* t4: the chord row carries the boundaries — no divider lines, a short tick at the start of every chord under its name */
html[data-figure=t4][data-design] #app #chords .chord{border-right:0!important;position:relative}
html[data-figure=t4][data-design] #app #chords .chord::after{content:"";position:absolute;left:0;bottom:0;width:var(--rule-w);height:10px;background:var(--tt-ink)!important}
/* ---------- 11/20 p1..p3: the 1.0.1 figure back (owner 「前のやつの方が…良かった」). Geometry in product31.mjs (FIGV old:true). ---------- */
/* p1 = exactly the 1.0.1 figure: Geist labels in full ink (ruler in Mono), no band for the chosen chord, ink playhead .65px with the
   rounded 1.0.1 handle; and no [ FIG. 01 ] label over the figure */
html[data-figure=p1] #app #stage #score text{font-family:Geist,Arial,sans-serif!important;fill:var(--tt-ink)!important}
html[data-figure=p1] #app #stage #score text.mono{font-family:Mono,monospace!important}
html[data-figure=p1] #app #stage #score .chord-current{fill:none!important}
html[data-figure=p1] #app #stage #score .play-marker :is(path,circle,line,rect,g){fill:var(--tt-ink)!important;stroke:var(--tt-ink)!important}
html[data-figure=p1] #app #stage #score .play-marker .cursor-line{stroke-width:.65px!important}
html[data-figure=p1] #app #stage #cursor-handle::before,html[data-figure=p1] #app #stage #cursor-handle::after{background:var(--tt-ink)!important;border-color:var(--tt-ink)!important;border-radius:3px!important}
html[data-figure=p1] #app .edit-heading>div:first-child::before{content:none!important}
/* p2 = the stage-1 figure (1.0.1 geometry + stage-1 styles: mono ink2 labels, soft band for the chosen chord, "now" playhead) — nothing extra */
/* p3 = 1.0.1 figure, with only the new screen's type (mono labels in ink2) and the theme's "now" playhead; no band, thin playhead */
html[data-figure=p3] #app #stage #score .chord-current{fill:none!important}
html[data-figure=p3] #app #stage #score .play-marker .cursor-line{stroke-width:.8px!important}
/* 11/20 owner 17:31: the sounding notes as moving dots on the playhead — round, ink, a thin ring of the ground so they show on lines of the same ink */
html[data-design] #app #stage #score .play-marker .live-notes circle.live-dot{fill:var(--tt-ink)!important;stroke:var(--tt-ground)!important;stroke-width:3px!important;paint-order:stroke!important}
