/* PL Paint: the screen is four things (top strip, one slim floating sidebar, floating cards, bottom toolbars). Everything else is canvas.
   Inner tongue (pl-os): dark glass, his hand for labels, the gold from the Design Kit (kit.css) for the active tool. */
* { box-sizing: border-box; -webkit-user-select: none; user-select: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ground, #0e0c09); color: var(--text, #efe9dc); font: calc(15px * var(--psytext, 1))/1.3 'PL Hand', system-ui, sans-serif; touch-action: none; overscroll-behavior: none; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .28; cursor: default; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

#top { position: fixed; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; gap: 2px; padding: 0 10px; background: rgba(16, 14, 11, .92); border-bottom: 1px solid rgba(255, 255, 255, .06); z-index: 5; }
#top .grow { flex: 1; text-align: center; opacity: .55; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
#top .txt { padding: 0 12px; height: 34px; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }
button.ic { width: 40px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
button.ic:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
button.ic.on, button.ic.open { color: var(--accent); background: rgba(201, 168, 76, .14); }
#b-color { width: 40px; height: 36px; display: grid; place-items: center; }
#swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); background: #000; }

#side { position: fixed; left: 10px; top: 25%; width: 44px; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; background: rgba(16, 14, 11, .88); border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; z-index: 5; }
#side.right { left: auto; right: 10px; }
#side button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
#side #b-modify { border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 8px; }
#side #b-modify.on { color: var(--accent); border-color: var(--accent); }
.slider { position: relative; width: 24px; height: 170px; border-radius: 12px; background: rgba(255, 255, 255, .07); overflow: hidden; touch-action: none; }
.slider i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(201, 168, 76, .28); pointer-events: none; }
.slider i::after { content: ''; position: absolute; left: 3px; right: 3px; top: -3px; height: 6px; border-radius: 3px; background: var(--text); }
.slider.h { width: 100%; height: 24px; }
.slider.h i { top: 0; bottom: 0; right: auto; left: 0; }
.slider.h i::after { left: auto; top: 3px; bottom: 3px; right: -3px; width: 6px; height: auto; }
#bubble { position: fixed; z-index: 6; pointer-events: none; border-radius: 50%; border: 1.5px solid var(--text); background: rgba(255, 255, 255, .12); transform: translate(-50%, -50%); }

.card { position: fixed; top: 52px; z-index: 7; width: 300px; max-height: calc(100vh - 70px); overflow: auto; padding: 14px 14px 12px; background: rgba(22, 19, 15, .94); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .09); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
#c-actions { left: 56px; }
#c-layers, #c-color, #c-brush { right: 10px; }
.card h2 { margin: 0 0 8px; font-size: 19px; font-weight: normal; letter-spacing: .04em; display: flex; align-items: center; justify-content: space-between; }
.card h3 { margin: 12px 0 4px; font-size: 12px; font-weight: normal; letter-spacing: .12em; text-transform: uppercase; opacity: .55; display: flex; justify-content: space-between; align-items: center; }
.row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 9px; text-align: left; }
button.row:hover, label.row:hover { background: rgba(255, 255, 255, .06); }
.row span { opacity: .45; font-size: 12px; }
.keys { margin: 4px 0 0; font-size: 12px; line-height: 1.5; opacity: .6; font-family: system-ui, sans-serif; }
.small { width: 30px; height: 28px; }
.txtb { width: auto; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); }
select, input[type=text], #hex { font: 13px system-ui; color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; padding: 3px 6px; }
#hex { width: 90px; }
.hexrow { display: flex; align-items: center; justify-content: space-between; margin: 6px 0; }
#wheel { display: block; margin: 0 auto; width: 260px; height: 260px; touch-action: none; }
.pair b { display: inline-block; width: 30px; height: 20px; border-radius: 5px; margin-left: 4px; border: 1px solid rgba(255, 255, 255, .5); }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatches b { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); cursor: pointer; }

#l-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow: auto; }
.lrow { display: grid; grid-template-columns: 46px 1fr 18px 22px; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); cursor: pointer; }
.lrow.on { background: var(--accent); color: #0e0c09; }
.lrow canvas { width: 46px; height: 34px; border-radius: 5px; background: repeating-conic-gradient(#555 0 25%, #777 0 50%) 0 0 / 10px 10px; }
.lrow em { font-style: normal; font-size: 12px; opacity: .7; text-align: center; }
.lrow input, .bgrow input { width: 18px; height: 18px; accent-color: var(--accent); }
.lfoot { display: flex; justify-content: space-between; margin: 8px 0; }
.bgrow { margin-top: 8px; background: rgba(255, 255, 255, .05); }
.chip { width: 40px; height: 24px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .4); display: inline-block; cursor: pointer; }
#brush-list { display: flex; flex-direction: column; gap: 4px; }
.brow { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); cursor: pointer; text-align: left; }
.brow.on { outline: 1.5px solid var(--accent); }
.brow canvas { width: 120px; height: 34px; }

#debug { position: fixed; left: 70px; bottom: 12px; z-index: 9; margin: 0; padding: 8px 10px; font: 12px/1.45 ui-monospace, Consolas, monospace; color: #9fe3a8; background: rgba(0, 0, 0, .72); border-radius: 8px; pointer-events: none; white-space: pre; }
#nodebar { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 11; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(22, 19, 15, .95); border: 1px solid rgba(245, 197, 66, .5); font-size: 14px; }
#nodebar[hidden] { display: none; }
#nodebar button { min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: inherit; font: inherit; }
#nodebar #nb-done { background: #f5c542; color: #1a1510; border-color: #f5c542; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 10; padding: 8px 16px; border-radius: 12px; background: rgba(22, 19, 15, .95); border: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
[hidden] { display: none !important; }

.inl { display: flex; align-items: center; gap: 6px; font-size: 13px; opacity: .85; }
.card .row select { max-width: 150px; }

#tl-view { position: fixed; inset: 0; z-index: 20; background: rgba(10, 9, 7, .96); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
#tl-cv { max-width: 92vw; max-height: 78vh; background: #fff; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.tlbar { display: flex; align-items: center; gap: 12px; width: min(720px, 90vw); }
.tlbar input[type=range] { flex: 1; accent-color: var(--accent); }
.tlbar .txtb { height: 34px; width: auto; padding: 0 14px; }

#seltb, #trtb { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 8; padding: 8px 10px 10px; background: rgba(22, 19, 15, .94); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 8px; align-items: center; }
#seltb .seg, #trtb .seg { display: flex; gap: 4px; padding: 3px; background: rgba(255, 255, 255, .06); border-radius: 12px; }
#seltb .seg button, #trtb .seg button { padding: 6px 14px; border-radius: 9px; font-size: 14px; }
#seltb .acts, #trtb .acts { display: flex; gap: 4px; }
#seltb .acts button, #trtb .acts button { padding: 6px 12px; border-radius: 9px; font-size: 13px; opacity: .9; }
#seltb button:hover, #trtb button:hover { background: rgba(255, 255, 255, .08); }
#seltb button.on, #trtb button.on { background: var(--accent); color: #0e0c09; }

#studio { position: fixed; inset: 0; z-index: 25; background: rgba(14, 12, 9, .985); display: flex; flex-direction: column; }
.st-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.st-top .grow { flex: 1; text-align: center; opacity: .5; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }
.st-top input { font: 20px 'PL Hand', sans-serif; width: 220px; color: var(--text); background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .2); padding: 4px 2px; }
.st-top .txtb { height: 34px; padding: 0 16px; width: auto; }
.st-top .gold { background: var(--accent); color: #0e0c09; }
.st-body { flex: 1; display: grid; grid-template-columns: 210px minmax(300px, 1fr) minmax(300px, 46vw); min-height: 0; }
#st-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid rgba(255, 255, 255, .06); overflow: auto; }
#st-nav button { text-align: left; padding: 10px 14px; border-radius: 10px; font-size: 16px; }
#st-nav button:hover { background: rgba(255, 255, 255, .06); }
#st-nav button.on { background: var(--accent); color: #0e0c09; }
#st-ctl { padding: 16px 22px; overflow: auto; }
#st-ctl h2 { margin: 0 0 14px; font-weight: normal; font-size: 22px; }
.strow { display: grid; grid-template-columns: 150px 1fr 64px; align-items: center; gap: 12px; padding: 9px 0; font-size: 15px; }
.strow input[type=range] { accent-color: var(--accent); width: 100%; }
.strow select { grid-column: 2 / 4; }
.pill { text-align: center; padding: 3px 0; border-radius: 999px; background: rgba(255, 255, 255, .08); font: 12px system-ui, sans-serif; }
.st-pad { padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 0; }
#st-pad { width: 100%; max-height: calc(100vh - 150px); aspect-ratio: 1 / 1; object-fit: contain; background: #1b1815; border-radius: 12px; touch-action: none; cursor: crosshair; }

.lfoot2 { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.small2 { width: auto; height: 28px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.small2.on { background: var(--accent); color: #0e0c09; }
.mthumb { width: 28px; height: 21px; vertical-align: middle; border: 1px solid rgba(255, 255, 255, .45); border-radius: 3px; background: #000; margin-left: 4px; }
.mthumb.on { outline: 2px solid #3b82f6; }

#qmenu { position: fixed; inset: 0; z-index: 30; }
#qmenu button { position: fixed; transform: translate(-50%, -50%); min-width: 124px; padding: 10px 12px; border-radius: 12px; background: rgba(22, 19, 15, .96); border: 1px solid rgba(255, 255, 255, .16); font-size: 15px; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
#qmenu button:hover { background: var(--accent); color: #0e0c09; }
.qm-c { position: fixed; transform: translate(-50%, -50%); padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; cursor: pointer; }
.row input { font: 13px system-ui; color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; padding: 3px 6px; width: 140px; }

#c-adjust { left: 100px; }
#c-adjust .row input[type=range] { accent-color: var(--accent); width: 140px; }
#c-adjust .hint { font-size: 12px; opacity: .55; margin: 8px 0 0; }

#newdoc { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
#newdoc[hidden] { display: none; }
.nd-box { width: min(440px, 92vw); max-height: 92vh; overflow: auto; padding: 18px; border-radius: 16px; background: rgba(22, 19, 15, .98); border: 1px solid rgba(255, 255, 255, .14); }
.nd-box h2 { margin: 0 0 10px; font-size: 20px; font-weight: normal; letter-spacing: .04em; }
#nd-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.nd-box .hint { font-size: 12px; opacity: .6; margin: 6px 0; }
.nd-box .row input { width: 110px; }

#gallery { position: fixed; inset: 0; z-index: 34; background: #12100d; overflow: auto; padding: 18px 22px 40px; }
#gallery[hidden] { display: none; }
.g-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.g-head h2 { margin: 0; font-size: 24px; font-weight: normal; letter-spacing: .05em; }
#g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.g-card { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 10px; cursor: pointer; }
.g-card.on { border-color: var(--accent); }
.g-card:hover { background: rgba(255, 255, 255, .09); }
.g-new { display: grid; place-items: center; min-height: 200px; font-size: 18px; letter-spacing: .06em; opacity: .8; border-style: dashed; }
.g-thumb { aspect-ratio: 4 / 3; border-radius: 9px; background: #fff center / contain no-repeat; }
.g-name { margin-top: 8px; font-size: 16px; }
.g-meta { font-size: 12px; opacity: .55; margin: 2px 0 8px; }
.g-bar { display: flex; flex-wrap: wrap; gap: 5px; }

.bchip { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 12px; vertical-align: -1px; border: 1px solid rgba(255, 255, 255, .5); }

.crow { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.cswatches { display: flex; flex-wrap: wrap; gap: 5px; }
.csw { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); padding: 0; }
.csw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.crow input[type=color] { width: 56px; height: 30px; padding: 0; border: 0; background: none; }

#c-tweak { left: 64px; top: 120px; width: 280px; }
#c-tweak .strow { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 8px 0; }
#c-tweak .strow input[type=range] { grid-column: 1 / 3; accent-color: var(--accent); width: 100%; }

.lrow.ingrp { margin-left: 18px; }
.lrow.grow { background: rgba(255, 255, 255, .09); font-weight: 600; }
.lrow.grow.on { background: var(--accent); color: #0e0c09; }
.gfold { font-size: 12px; opacity: .85; white-space: nowrap; }
.rtag { font-size: 10px; padding: 1px 5px; border-radius: 6px; background: rgba(255, 255, 255, .22); margin-left: 4px; }
#l-ref.on { background: var(--accent); color: #0e0c09; }

#gest, #sync, #send, #tilecheck { position: fixed; inset: 0; z-index: 36; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
#gest[hidden], #sync[hidden], #send[hidden], #tilecheck[hidden] { display: none; }
#tc-box { max-width: min(94vw, 760px); max-height: 92vh; overflow: auto; }
#tc-cv { width: 100%; height: auto; display: block; border-radius: 8px; background: #000; }
#gest .row select { max-width: 190px; }
.gbtns { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }

#study { position: fixed; inset: 0; z-index: 37; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
#study[hidden] { display: none; }
#study .nd-box { width: min(560px, 94vw); }
#study .row input[type=text], #study .row input:not([type]) { flex: 1; min-width: 0; margin-left: 10px; }
.study-row { display: flex; justify-content: space-between; align-items: center; text-align: left; width: 100%; }
.study-row small { display: block; opacity: .55; font-size: 11.5px; margin-top: 2px; font-weight: normal; }
.study-row.on { outline: 2px solid var(--accent); } .study-row.done b { text-decoration: line-through; opacity: .6; }
#study-dot { position: fixed; top: 8px; right: 12px; z-index: 12; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255, 80, 70, .6); background: rgba(40, 14, 12, .85); color: #ff8a80; font-size: 12px; }
#study-bar { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 11; display: flex; gap: 10px; align-items: center; max-width: min(900px, 92vw); padding: 8px 12px; border-radius: 14px; background: rgba(22, 19, 15, .94); border: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
#study-bar[hidden] { display: none; } #study-bar .sb-t { flex: 1; } #study-bar .sb-n { color: var(--accent); white-space: nowrap; }

.tw-seg { display: flex; gap: 4px; padding: 3px; background: rgba(255, 255, 255, .06); border-radius: 12px; margin: 4px 0 8px; }
.tw-seg button { flex: 1; padding: 6px 10px; border-radius: 9px; font-size: 13px; }
.tw-seg button.on { background: var(--accent); color: #0e0c09; }
#c-tweak { max-height: calc(100vh - 140px); }

#echo-bar { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 9; display: flex; gap: 14px; align-items: center; padding: 9px 14px; border-radius: 16px; background: rgba(22, 19, 15, .95); border: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
#echo-bar[hidden] { display: none; } #echo-bar label { display: flex; gap: 6px; align-items: center; } #echo-bar input { width: 90px; } #a-echo.on { background: var(--accent); color: #0e0c09; }
/* S335: the Echo bar wraps instead of running off the screen (founder's phone screenshot: 'ECH' cut at the right edge) */
#echo-bar { max-width: calc(100vw - 16px); box-sizing: border-box; flex-wrap: wrap; justify-content: center; row-gap: 8px; max-height: 45vh; overflow-y: auto; }
@media (max-width: 700px) { #echo-bar { left: 8px; right: 8px; transform: none; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); } #echo-bar > b { flex: 1 1 100%; } #echo-bar label { flex: 1 1 44%; min-width: 0; } #echo-bar input { flex: 1 1 auto; min-width: 0; width: auto; } #echo-bar .txtb { min-height: 44px; } }

#a-lights.on, #a-lightone.on { background: var(--accent); color: #0e0c09; }

#lift { position: fixed; inset: 0; z-index: 38; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
#lift[hidden] { display: none; }
#lift .nd-box { width: min(560px, 94vw); }
#lift-cv { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; background: repeating-conic-gradient(#555 0 25%, #777 0 50%) 0 0 / 14px 14px; margin-bottom: 8px; }
#lift .row input[type=range] { flex: 1; margin: 0 10px; }

#g-daily { margin: 6px 0 16px; } .dm-sum { font-size: 13px; opacity: .75; margin-bottom: 6px; } .dm-grid { display: flex; gap: 3px; } .dm-col { display: flex; flex-direction: column; gap: 3px; } .dm-col i { display: block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); } .dm-col i.dm-off { background: #fff; } .dm-col i.dm-future { background: transparent; }

.lrow { touch-action: none; }
#l-oppop { position: fixed; z-index: 40; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(22, 19, 15, .96); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; }
#l-oppop input { width: 140px; } #l-oppop b { min-width: 40px; text-align: right; }

.g-stack { outline: 2px solid rgba(255, 255, 255, .18); outline-offset: 3px; }

/* the handbook, in front of everything */
#hb { position: fixed; inset: 0; z-index: 9000; background: var(--ground, #0e0c08); }
#hb iframe { width: 100%; height: 100%; border: 0; display: block; }
#hb-x { position: fixed; top: 10px; right: 14px; z-index: 9001; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--accent, #c9a84c); background: #1a1710; color: var(--text, #efe9dc); font: 16px 'PL Hand', system-ui; }

#sync input[type=text], #sync input[type=password], #send input[type=text] { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line, #2c2718); background: #1a1710; color: var(--text, #efe9dc); font: 14px system-ui; }
#sync .row, #send .row { gap: 10px; }

/* brush colours: a swatch per colour of a many-coloured brush, and colourways from the house palettes */
.qc { margin: 2px 0 10px; } .qc[hidden] { display: none; }
.qc-head { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .55; margin: 6px 0 4px; }
.qc-row { display: flex; gap: 6px; flex-wrap: wrap; }
.qc-sw { display: flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid transparent; font-size: 13px; min-height: 36px; }
.qc-sw i { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .3); }
.qc-sw.on { border-color: var(--accent); background: rgba(201, 168, 76, .14); }
.qc-ways { display: flex; gap: 6px; flex-wrap: wrap; }
.qc-way { display: flex; padding: 4px; border-radius: 9px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); min-height: 32px; align-items: center; }
.qc-way i { width: 14px; height: 22px; } .qc-way i:first-child { border-radius: 5px 0 0 5px; } .qc-way i:last-child { border-radius: 0 5px 5px 0; }
.qc-way:hover { border-color: var(--accent); }
#bcur { position: fixed; z-index: 15; pointer-events: none; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .35); transform: translate(-50%, -50%); box-sizing: border-box; }
#bcur[hidden] { display: none; }

/* S334: psyglass adapter. The kit (glass.css, glass.js) owns every value; this file only says which PL Paint parts are which kit part (glass.js tags them at load), plus the layout PL Paint's own rows need. */
.row { min-height: 44px; }
.card { padding: var(--psygutter); }
.nd-box .row, .card .row { border-radius: var(--psyglass-r-row); }
.row:has(input[type=checkbox]) > span { opacity: .9; font-size: 13px; }
.row input[type=checkbox].psyswitch { margin-left: auto; }
.row input[type=range].psyslide, .nd-box .row input[type=range].psyslide, .card .row input[type=range].psyslide { border: 0; background: transparent; padding: 0; width: 100%; margin: 0; }
.nd-box .row:has(input[type=range]) { display: grid; grid-template-columns: 7.5em 1fr 3em; gap: 10px; align-items: center; }
.nd-box .row:has(input[type=range]) > span { text-align: right; opacity: .6; }
select { font-family: inherit; font-size: 13px; text-overflow: ellipsis; }
.psybutton.small2 { height: 28px; } .txtb.psybutton { width: auto; }
button.ic.psycapsule.on, button.ic.psycapsule.open { color: var(--psyglass-accent); }
.act-tabs.psysegment { margin: 0 0 8px; overflow-x: auto; max-width: 100%; }
.act-tabs.psysegment > button { white-space: nowrap; padding: 0 7px; font-size: 12px; }
.act-tabs.psysegment > button.on { margin: 0; padding: 0 9px; background: rgba(217, 177, 59, .26); color: var(--psyglass-accent); }
/* S334 full pass: active options are gold-tinted capsules (not solid blocks), toasts and hints are glass pills */
#st-nav button, #seltb button, #trtb button, .tw-seg button, .small2 { border-radius: 999px; }
#st-nav button.on, #seltb button.on, #trtb button.on, .tw-seg button.on, .small2.on { background: rgba(217, 177, 59, .26); color: var(--psyglass-accent); box-shadow: var(--psyedge-control); }
#toast.psyglass { border-radius: 999px; padding: 10px 18px; color: var(--psyladder-1); }
button.ic.psycapsule { border-radius: 50%; }
#qmenu button.psybutton { -webkit-backdrop-filter: blur(var(--psyglass-blur)) saturate(var(--psyglass-sat)); backdrop-filter: blur(var(--psyglass-blur)) saturate(var(--psyglass-sat)); background: var(--psyglass-fill); border: 1px solid var(--psyglass-edge); }
/* S334 Settings card: the kit panel sits inside PL Paint's own card, so its sections drop their second glass layer */
#psysettings.psysettings { padding: 0; gap: 4px; }
#psysettings .psysettings-card { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; }

/* S335 (his phone, portrait): the studio was three fixed columns (210 + 300 + 300 wide), so on a phone the sliders sat off screen. Narrow screens get
   a short name list beside the controls, with the practice pad underneath, and each control's name stacked over its slider. */
@media (max-width: 700px) {
  .st-top { gap: 6px; padding: 8px 10px; }
  .st-top input { width: 112px; font-size: 17px; }
  .st-top .grow { display: none; }
  .st-top .txtb { padding: 0 10px; height: 34px; font-size: 13px; }
  .st-body { grid-template-columns: 124px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 34vh; }
  #st-nav { padding: 6px; }
  #st-nav button { font-size: 13px; padding: 8px 8px; }
  #st-ctl { padding: 10px 12px; }
  .strow { grid-template-columns: minmax(0, 1fr) 54px; gap: 2px 10px; padding: 7px 0; font-size: 14px; }
  .strow > :first-child { grid-column: 1 / 3; }
  .strow select { grid-column: 1 / 3; }
  .st-pad { grid-column: 1 / 3; padding: 6px; flex-direction: row; justify-content: center; }
  #st-pad { width: auto; height: calc(34vh - 20px); max-height: none; }
}
/* S335: Actions tabs in Procreate's order: seven tabs scroll sideways on a phone instead of squeezing */
.act-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .act-tabs::-webkit-scrollbar { display: none; } .act-tabs button { flex: 0 0 auto; }
