.tl-b {
  --tl-ink: #25354a;
  color: var(--tl-ink);
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  font-family: inherit;
}
.tl-b *, .tl-b *::before, .tl-b *::after { box-sizing: border-box; }
.tl-b button, .tl-b input { font: inherit; }
.tl-b button { touch-action: manipulation; }
.tl-b button:focus-visible, .tl-b input:focus-visible, .tl-b [tabindex]:focus-visible { outline: 3px solid #25354a; outline-offset: 4px; }
.tl-b .toy-hint, .tl-b .toy-status { line-height: 1.65; margin: 0; }
.tl-b .toy-hint { font-size: .93em; max-width: 68ch; }
.tl-b .tl-b-status { min-height: 3.2em; border-left: 3px solid #8eb79f; padding-left: 13px; }
.tl-b .tl-b-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tl-b .toy-button { min-height: 44px; border: 1.5px solid #25354a; border-radius: 16px; background: #fff9eb; color: #25354a; padding: 11px 17px; cursor: pointer; }
.tl-b .toy-button:hover { background: #f4e9ce; }
.tl-b .toy-button:disabled { opacity: .55; cursor: default; }
.tl-b .tl-b-primary { background: #efd05c; box-shadow: 0 3px 0 #25354a; }
.tl-b .tl-b-primary:hover { background: #f5da76; }
.tl-b .tl-b-sliders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tl-b .tl-b-slider { display: grid; min-width: 0; gap: 7px; align-content: start; }
.tl-b .tl-b-slider-caption { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; line-height: 1.4; font-size: .9em; }
.tl-b .tl-b-slider output { font-variant-numeric: tabular-nums; }
.tl-b .tl-b-slider input { width: 100%; height: 44px; accent-color: #4f7967; cursor: pointer; margin: 0; }
.tl-b .tl-b-color-pad { position: relative; width: 100%; min-height: 230px; height: clamp(230px, 36vw, 320px); overflow: hidden; border: 2px solid #25354a; border-radius: 36px 36px 64px 24px; cursor: crosshair; touch-action: none; background: hsl(var(--color-hue, 100) 67% 79%); }
.tl-b .tl-b-color-pad svg { display: block; width: 100%; height: 100%; }
.tl-b .tl-b-color-marker { position: absolute; width: 47px; height: 47px; border: 3px solid #25354a; border-radius: 50%; background: #fff9ebdb; transform: translate(-50%, -50%); box-shadow: 0 0 0 9px #fff9eb42; pointer-events: none; }
.tl-b .tl-b-color-label { position: absolute; top: 15px; left: 17px; background: #fff9eb; border: 1px solid #25354a; border-radius: 20px; padding: 6px 13px; font-size: .9em; pointer-events: none; }
.tl-b .tl-b-color-pad.is-on .tl-b-color-marker { box-shadow: 0 0 0 16px #fff9eb66; }
.tl-b .tl-b-notes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tl-b .tl-b-note { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; min-width: 0; min-height: 102px; border-radius: 28px 28px 18px 18px; padding: 12px 5px; background: var(--note-color); border: 2px solid #25354a; box-shadow: 0 5px 0 #25354a; color: #25354a; }
.tl-b .tl-b-note:hover { background: var(--note-color); filter: brightness(1.04); }
.tl-b .tl-b-note.is-on { box-shadow: 0 1px 0 #25354a, 0 0 0 5px #fff9ebaa; transform: translateY(4px); filter: brightness(1.1); }
.tl-b .tl-b-note-name { font-size: 1.25em; }
.tl-b .tl-b-key { font: .72em/1.2 system-ui, sans-serif; opacity: .8; }
.tl-b .tl-b-motif, .tl-b .tl-b-response { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 56px; padding: 10px 12px; border: 1px dashed #a0b3b4; border-radius: 16px; background: #fff9eb99; }
.tl-b .tl-b-tone-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 34px; padding: 5px 9px; border-radius: 20px; background: var(--note-color); border: 1px solid #25354a; font-size: .8em; }
.tl-b .tl-b-empty { font-size: .85em; color: #4d5b64; line-height: 1.5; }
.tl-b .tl-b-echo-field { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 290px; border-radius: 60px 28px 60px 28px; border: 1px solid #9fb9ca; background: radial-gradient(ellipse at 50% 20%, #f1e6fb 0, #dcecf4 55%, #b9dae4 100%); overflow: hidden; padding: 40px 24px; }
.tl-b .tl-b-echo-rings { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.tl-b .tl-b-echo-ring { position: absolute; left: var(--echo-x); top: var(--echo-y, 50%); width: var(--echo-size); height: var(--echo-size); border: 4px solid var(--note-color); border-radius: 50%; transform: translate(-50%, -50%); opacity: .7; }
.tl-b .tl-b-echo-dots { width: 100%; gap: 14px; align-items: center; }
.tl-b .tl-b-echo-dots .tl-b-note { aspect-ratio: 1; min-height: 0; border-radius: 50%; }
.tl-b.tl-b-echo .tl-b-sliders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-b .tl-b-listen-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 210px; padding: 18px; border-radius: 40px 60px 34px 50px; background: #dce9ca; border: 1px solid #afc098; }
.tl-b .tl-b-ear-mark { width: 145px; height: 120px; }
.tl-b .tl-b-ear-mark svg { width: 100%; height: 100%; overflow: visible; fill: #efd05c; stroke: #25354a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tl-b .tl-b-ear-mark path + path { fill: none; }
.tl-b .tl-b-target-trail { display: flex; justify-content: center; gap: 13px; }
.tl-b .tl-b-target-dot { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #6c8063; border-radius: 50%; color: #425638; background: #f8f7e8; font: .8em/1 system-ui, sans-serif; }
.tl-b .tl-b-target-dot.is-played { background: var(--note-color); border-color: #25354a; }
.tl-b .tl-b-lengths { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-b .tl-b-lengths button { font-size: .8em; min-height: 44px; padding: 8px 13px; border-color: #99aa96; background: transparent; }
.tl-b .tl-b-lengths button[aria-pressed=true] { background: #dce9ca; border-color: #25354a; }
.tl-b.is-matched .tl-b-listen-stage { box-shadow: inset 0 0 0 3px #7fac83; }
@media (max-width: 580px) {
  .tl-b { gap: 15px; }
  .tl-b .tl-b-sliders { grid-template-columns: 1fr; gap: 9px; }
  .tl-b.tl-b-echo .tl-b-sliders { grid-template-columns: 1fr; }
  .tl-b .tl-b-echo-field { min-height: 220px; padding: 30px 13px; border-radius: 36px 22px; }
  .tl-b .tl-b-notes, .tl-b .tl-b-echo-dots { gap: 7px; }
  .tl-b .tl-b-note { min-height: 84px; border-radius: 20px 20px 14px 14px; padding: 9px 3px; }
  .tl-b .tl-b-note-name { font-size: 1em; }
  .tl-b .tl-b-echo-dots .tl-b-note { min-height: 56px; aspect-ratio: auto; border-radius: 24px; }
  .tl-b .tl-b-key { font-size: .65em; }
  .tl-b .toy-button { padding: 10px 12px; }
  .tl-b .tl-b-color-pad { border-radius: 28px 28px 45px 18px; }
}
@media (max-width: 400px) {
  .tl-b .tl-b-notes { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
  .tl-b .tl-b-note { min-width: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tl-b .tl-b-color-marker, .tl-b .tl-b-note { transition: transform .12s, box-shadow .12s; }
  .tl-b .tl-b-echo-ring { animation: tl-b-ripple .9s ease-out forwards; }
  .tl-b .tl-b-ear-mark.is-on { animation: tl-b-listen .35s ease-out; }
}
@keyframes tl-b-ripple { from { transform: translate(-50%, -50%) scale(.5); opacity: .85; } to { transform: translate(-50%, -50%) scale(4); opacity: 0; } }
@keyframes tl-b-listen { 50% { transform: rotate(-5deg) scale(1.06); } }
