/* Kit/type/tool.css — the shared dark panel look of Peter's type tools (Token Boxes, Word Pop): stage on the left,
   settings panel on the right, sticky record bar. App-only styles go in the app's own stylesheet. */
:root {
  --bg: #19191b; --panel: #222225; --line: #34343a; --text: #e9e7e2; --dim: #9a9890; --accent: #ffd84d; --red: #ff4d4f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif; }
body { display: flex; overflow: hidden; }

#stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 28px; min-width: 0; }
#c { display: block; box-shadow: 0 10px 40px rgba(0,0,0,.45); touch-action: none; }
#hint { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; color: var(--dim); font-size: 11px; pointer-events: none; }


#panel { width: 360px; flex: none; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding-bottom: 40px; }
header { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 6px; }
h1 { font-size: 15px; margin: 0; letter-spacing: .02em; }
#stats { color: var(--dim); font-variant-numeric: tabular-nums; }

#recbar { position: sticky; top: 0; z-index: 2; background: var(--panel); display: flex; gap: 6px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
#recTime { font-variant-numeric: tabular-nums; color: var(--red); min-width: 34px; }
#note { padding: 0 16px; color: var(--dim); font-size: 12px; }
#note:not(:empty) { padding: 8px 16px; }
#note a { color: var(--accent); cursor: pointer; text-decoration: underline; }

button { font: inherit; color: var(--text); background: #2e2e33; border: 1px solid #3c3c43; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
button:hover { background: #38383e; }
button.rec { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
button.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
button.rec.on { background: var(--red); border-color: var(--red); color: #fff; }
button.rec.on .dot { background: #fff; border-radius: 2px; }
button:disabled { opacity: .45; cursor: default; }

.sec { border-bottom: 1px solid var(--line); }
.sec h2 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 12px 16px; cursor: pointer; user-select: none; display: flex; justify-content: space-between; }
.sec h2::after { content: "+"; }
.sec.open h2::after { content: "–"; }
.sec .body { display: none; padding: 0 16px 14px; }
.sec.open .body { display: block; }

textarea { width: 100%; resize: vertical; background: #141416; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px; font: 14px/1.45 -apple-system, sans-serif; margin: 8px 0; }
textarea:focus { outline: 1px solid var(--accent); }
.small { color: var(--dim); font-size: 11px; margin: 6px 0 0; }

.row { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 8px; margin: 7px 0; }
.row > label { color: var(--dim); }
.row.buttons { display: flex; gap: 6px; }
.row.check { grid-template-columns: 1fr; }
.row.check label { color: var(--text); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.ctl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctl input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.ctl .val { width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); font-size: 12px; }
.ctl select { flex: 1; min-width: 0; }
select, input[type=number], input[type=text] { font: inherit; background: #141416; color: var(--text); border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; }
input[type=number] { width: 64px; }
input[type=color] { width: 40px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: none; cursor: pointer; }
.ctl .hex { color: var(--dim); font-size: 12px; font-family: ui-monospace, monospace; }

.seg { display: inline-flex; border: 1px solid #3c3c43; border-radius: 6px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: #2a2a2e; padding: 5px 10px; }
.seg button + button { border-left: 1px solid #3c3c43; }
.seg button.on { background: var(--accent); color: #111; font-weight: 600; }



/* palettes.js editor (Kit/type/palettes.js) */
.pal { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.pal-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pal-sw { position: relative; width: 30px; height: 30px; border-radius: 7px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.pal-sw input[type=color] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pal-sw .pal-x { position: absolute; top: -6px; right: -6px; width: 15px; height: 15px; line-height: 14px; text-align: center; font-size: 11px;
  border-radius: 50%; background: #2a2a2a; color: #ddd; display: none; cursor: pointer; }
.pal-sw:hover .pal-x { display: block; }
.pal-add { width: 30px; height: 30px; border-radius: 7px; padding: 0; font-size: 16px; }
.pal-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pal-chip { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 5px; text-align: left; position: relative; }
.pal-strip { display: flex; height: 12px; border-radius: 3px; overflow: hidden; }
.pal-strip i { flex: 1; }
.pal-name { font-size: 11px; opacity: .8; }
.pal-chip .pal-x { position: absolute; top: 2px; right: 5px; cursor: pointer; opacity: .7; }
.pal-save { display: flex; gap: 6px; }
.pal-save input { flex: 1; min-width: 0; }

/* Kit/type/player.js: the usual play / pause bar (2026-11-18, first in Punch Wall) */
.kit-playbar { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 0; }
.kit-playbar .kp-buttons { display: flex; gap: 6px; }
.kit-playbar .kp-play { flex: 1; font-size: 14px; font-weight: 600; padding: 8px; }
.kit-playbar .kp-play.on { background: var(--accent); color: #111; }
.kit-playbar .kp-time { display: flex; align-items: center; gap: 8px; }
.kit-playbar .kp-scrub { flex: 1; }
.kit-playbar .kp-val { color: var(--dim); font-size: 12px; min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
/* Layout.spacingRows: the box beside a slider for typing an exact value (2026-11-24) */
.ctl input.num { width: 58px; flex: none; background: transparent; color: inherit; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px; padding: 3px 5px; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
