.tw { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.tw-stage { position: sticky; top: 96px; }
.tw-phone { position: relative; border-radius: 34px; padding: 10px; background: linear-gradient(160deg, #2a2b2f, #0c0c0e 40%, #1d1e21); box-shadow: 0 40px 80px -20px rgba(12,14,13,.45), inset 0 0 0 1px rgba(255,255,255,.08); }
.tw-phone canvas { display: block; width: 100%; height: auto; aspect-ratio: 9/16; border-radius: 26px; background: #111; touch-action: none; cursor: grab; }
.tw-phone canvas:active { cursor: grabbing; }
.tw-drop { position: absolute; inset: 10px; border-radius: 26px; display: grid; place-content: end center; padding-bottom: 60px; justify-items: center; gap: 8px; text-align: center; cursor: pointer; padding: 20px;
  background: linear-gradient(180deg, rgba(10,10,11,0) 40%, rgba(10,10,11,.55)); border: 1px dashed rgba(255,255,255,.3); transition: background .2s; }
.tw-drop:hover, .tw-drop.over { background: rgba(10,10,11,.25); }
.tw-drop { color: #fff; }
.tw-drop strong { font: 800 1.4rem/1 var(--display); text-transform: uppercase; }
.tw-drop > span:last-child { font-size: .85rem; color: #c7c9ce; }
.tw-drop-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ball); color: var(--ink); margin-bottom: 6px; }
.tw-drop-icon svg { width: 30px; height: 30px; }
.tw-hint { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 14px; }
.tw-panel { display: grid; gap: 14px; }
.tw-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.tw-step h2 { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; margin-bottom: 16px; }
.tw-step h2 span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--ball); font: 700 .85rem/1 var(--mono); }
.tw-step .field + .field { margin-top: 14px; }
.tw-frames { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tw-frame { position: relative; display: grid; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; text-align: center; color: var(--muted); font: 600 .74rem/1.2 var(--body); }
.tw-frame canvas { width: 100%; height: auto; aspect-ratio: 9/16; border-radius: 10px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s, transform .2s var(--ease); background: #1a1a1d; }
.tw-frame:hover canvas { transform: translateY(-2px); }
.tw-frame[aria-checked="true"] { color: var(--text); }
.tw-frame[aria-checked="true"] canvas { outline-color: var(--ink); outline-width: 3px; }
.tw-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tw-zoom { margin-top: 16px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--bg-2); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--bg-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); margin-top: -10px; border: 3px solid var(--ball); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); border: 3px solid var(--ball); }
input[type=range]:disabled { opacity: .4; }
@media (max-width: 860px) {
  .tw { grid-template-columns: minmax(0, 1fr); }
  .tw-panel, .tw-step { min-width: 0; }
  .tw-stage { position: static; max-width: 340px; margin: 0 auto; width: 100%; }
  .tw-frames { grid-template-columns: repeat(5, minmax(78px, 1fr)); overflow-x: auto; margin-inline: -24px; padding: 4px 24px 6px; scrollbar-width: none; }
}
