/* Тональность и темп песни */
.tk-drop { position: relative; display: grid; justify-items: center; gap: 14px; padding: clamp(40px, 6vw, 80px) 24px; border-radius: 24px; cursor: pointer; text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' fill='none' rx='24' ry='24' stroke='%23EFE8DC' stroke-opacity='.22' stroke-width='1.5' stroke-dasharray='6%2C 9'/%3E%3C/svg%3E");
  transition: background-color .3s var(--ease), transform .4s var(--slow); }
.tk-drop:hover, .tk-drop.is-over { background-color: rgba(239,232,220,.03); }
.tk-drop.is-over { transform: scale(1.01); }
.tk-drop__ico { color: var(--ivory-2); transition: transform .5s var(--spring); }
.tk-drop.is-over .tk-drop__ico { transform: translateY(-6px); }
.tk-drop__t { font: 300 clamp(26px, 3vw, 40px)/1.1 var(--f-display); letter-spacing: -.04em; }
.tk-drop__f { font: 400 12px/1.5 var(--f-mono); color: var(--mute); letter-spacing: .02em; }
.tk-demo { text-align: center; margin: 20px 0 0; }
.tk[data-state="empty"] .tk-work { display: none; }
.tk:not([data-state="empty"]) .tk-drop, .tk:not([data-state="empty"]) .tk-demo { display: none; }
.tk-work > * { animation: st-rise .7s var(--slow) both; }
.tk-work > :nth-child(2) { animation-delay: .06s; } .tk-work > :nth-child(3) { animation-delay: .12s; } .tk-work > :nth-child(4) { animation-delay: .18s; } .tk-work > :nth-child(5) { animation-delay: .24s; }

.tk-file { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--hair); }
.tk-file__n { margin: 0; font: 400 clamp(19px, 1.6vw, 24px)/1.3 var(--f-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tk-file__m { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font: 400 13px/1.4 var(--f-mono); color: var(--mute); }
.tk-file__m b { color: var(--ivory); font-weight: 500; }
.tk-file__m .sep { opacity: .4; }

.tk-ctrls { display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(40px, 6vw, 96px); padding-top: clamp(28px, 3.4vw, 44px); }
.tk-c { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.tk-big { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }
.tk-num { min-width: 3.2ch; text-align: center; font: 200 clamp(76px, 8vw, 120px)/.9 var(--f-display); letter-spacing: -.06em; color: var(--ivory); }
.tk-num.is-bump { animation: mt-bump .32s var(--slow); }
@keyframes mt-bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: none; } }
.tk-sub { margin: 0; font: 300 15px/1.4 var(--f-text); color: var(--ivory-2); min-height: 1.4em; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tk-arrow b { color: var(--ivory); font-weight: 400; }
.tk-arrow b.is-changed { animation: st-mark 1.6s var(--ease) both; border-radius: 4px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-fine { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 420px; }
.tk-fine .st-range { flex: 1; }
.tk-fine output { min-width: 48px; font: 500 13px/1 var(--f-mono); color: var(--ivory-2); text-align: right; }
.tk-target__in { width: 80px; height: 38px; padding: 0 2px; background: transparent; border: 0; border-bottom: 1px solid var(--hair-2); color: var(--ivory); font: 400 18px/1 var(--f-mono); text-align: center; outline: 0; border-radius: 0; }
.tk-target__in:focus { border-color: var(--ivory); }
.tk-target__in:disabled { opacity: .4; }

.tk-opts { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: clamp(28px, 3vw, 40px); padding-top: 22px; border-top: 1px solid var(--hair); }

.tk-player { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-top: clamp(28px, 3vw, 40px); }
.tk-play { width: 72px; height: 72px; border-radius: 50%; background: var(--ivory) !important; color: var(--ink) !important; display: grid; place-items: center; transition: transform .25s var(--ease), background .2s; }
.tk-play:hover { background: #fff !important; }
.tk-play:active { transform: scale(.94); }
.tk-play .i-pause { display: none; }
.tk-play[aria-pressed="true"] .i-play { display: none; } .tk-play[aria-pressed="true"] .i-pause { display: inline; }
.tk-tl-wrap { min-width: 0; }
.tk-times { display: flex; justify-content: space-between; font: 400 12.5px/1 var(--f-mono); color: var(--mute); margin-bottom: 10px; }
.tk-tl { position: relative; height: 36px; cursor: pointer; touch-action: none; outline: none; }
.tk-tl__track, .tk-tl__fill, .tk-tl__loop { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; }
.tk-tl__track { right: 0; background: rgba(239,232,220,.14); }
.tk-tl__fill { background: var(--ivory); width: 0; }
.tk-tl__loop { height: 22px; margin-top: -11px; border-radius: 6px; background: rgba(227,6,19,.12); box-shadow: inset 0 0 0 1px rgba(227,6,19,.38); display: none; }
.tk-tl__head { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ivory); box-shadow: 0 0 0 4px var(--wall); left: 0; }
.tk-tl__h { position: absolute; top: -6px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #1C1916; box-shadow: 0 0 0 1px rgba(227,6,19,.6); display: none; place-items: center; font: 500 10px/1 var(--f-mono); color: var(--red-ink); cursor: ew-resize; z-index: 2; }
.tk.is-loop .tk-tl__loop { display: block; }
.tk.is-loop .tk-tl__h { display: grid; }
.tk-loop { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 14px; }
.tk-loop [data-ramp] { transition: opacity .3s; }
.tk:not(.is-loop) .tk-loop [data-ramp] { opacity: .4; pointer-events: none; }

.tk-export { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px 32px; margin-top: clamp(32px, 4vw, 52px); padding: clamp(22px, 2.6vw, 32px) 0 0; border-top: 1px solid var(--hair); }
.tk-export .st-label { margin: 0 0 8px; }
.tk-export__n { margin: 0; font: 400 clamp(17px, 1.4vw, 20px)/1.35 var(--f-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tk-export__n.is-changed { animation: st-mark 1.6s var(--ease) both; border-radius: 4px; }
.tk-export__m { margin: 6px 0 0; font: 400 12.5px/1.4 var(--f-mono); color: var(--mute); }
.tk-export__r { display: grid; gap: 10px; justify-items: end; }
.tk-prog { width: 220px; height: 3px; border-radius: 3px; background: rgba(239,232,220,.12); overflow: hidden; opacity: 0; transition: opacity .3s; }
.tk-prog i { display: block; height: 100%; width: 100%; background: var(--ivory); transform: scaleX(0); transform-origin: 0 50%; transition: transform .2s linear; }
.tk-prog.is-on { opacity: 1; }

@media (max-width: 860px) {
  .tk-ctrls { grid-template-columns: 1fr; }
  .tk-export__r { justify-items: stretch; width: 100%; }
  .tk-prog { width: 100%; }
  .tk-player { grid-template-columns: 1fr; }
  .tk-play { justify-self: center; }
}
@media (max-width: 640px) {
  .tk-num { font-size: 64px; min-width: 0; flex: 1; }
  .tk-big { width: 100%; justify-content: space-between; gap: 8px; }
  .tk-big .st-round { width: 46px; height: 46px; flex: none; }
  .tk-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
  [data-t-chips] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tk-chips .st-chip { padding: 0; justify-content: center; font-size: 12.5px; }
}
.tk-export__fmt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.tk-export__fmt .tk-export__m { margin: 0; }
.tk-export__fmt .st-seg button { font: 500 12.5px/1 var(--f-mono); letter-spacing: .02em; }
/* Двойник «Замедлить или ускорить песню»: темп первым */
.tk[data-focus="tempo"] .tk-ctrls > .tk-c:first-child { order: 2; }
