/* Wah-Kit Radio, "My music": a cassette deck that plays songs from this phone or computer. */
.rd-mode { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #EFE4D2; border: 1px solid #D9C7AA; margin: 0 0 16px; }
.rd-mode button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: none; font: 700 15px var(--font-body); color: #5A3B28; cursor: pointer; }
.rd-mode button[aria-selected="true"] { background: #3A1F10; color: #FFF4D6; box-shadow: 0 2px 6px rgba(0,0,0,.2); }

.tp { --wood1: #8A5232; --wood2: #6A3B22; --wood3: #4E2914; --brass1: #F5D995; --brass2: #C9993C; --brass3: #7A5418; --ink-w: #2B1A10; --soft-w: #5A3B28;
  display: flex; flex-direction: column; gap: 16px; color: var(--ink-w); }
.tp-deck { position: relative; border-radius: 28px; background: linear-gradient(160deg, var(--wood1) 0%, var(--wood2) 45%, var(--wood3) 100%);
  box-shadow: 0 26px 50px rgba(60,30,10,.32), inset 0 2px 0 rgba(255,220,180,.25), inset 0 -6px 0 rgba(0,0,0,.25); padding: 22px 26px 24px; display: grid; gap: 18px; margin-bottom: 14px; }
.tp-deck::before { content: ""; position: absolute; inset: 10px; border-radius: 20px; border: 2px solid rgba(255,214,160,.16); pointer-events: none; }
.tp-deck::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -14px; height: 14px; background: linear-gradient(90deg, #3A1F10 0 64px, transparent 64px calc(100% - 64px), #3A1F10 calc(100% - 64px)); border-radius: 0 0 12px 12px; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.tp-plate { padding: 5px 14px 6px; border-radius: 10px; background: linear-gradient(180deg, #F7DE9E, #C9993C 55%, #9C7022); box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.6);
  font: 800 17px Georgia, serif; color: #3A220C; white-space: nowrap; }
.tp-plate .rd-bar { display: inline-block; width: .6em; height: .22em; border-radius: .11em; background: #F2552C; margin: 0 .1em; vertical-align: .2em; }
.tp-plate small { font: 800 10px var(--font-body); letter-spacing: .2em; color: #5A3B28; margin-left: 8px; }
.tp-lamps { display: flex; align-items: center; gap: 14px; font: 800 11px var(--font-body); letter-spacing: .14em; color: #F3D9A4; }
.tp-lamp { display: inline-flex; align-items: center; gap: 6px; }
.tp-lamp i { width: 10px; height: 10px; border-radius: 50%; background: #5A2A14; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.tp-lamp.on i { background: #FF5A36; box-shadow: 0 0 8px #FF7A50, inset 0 1px 2px rgba(255,255,255,.4); }
.tp-counter { display: inline-flex; gap: 2px; padding: 3px; border-radius: 6px; background: #1A0F08; }
.tp-counter span { width: 14px; height: 20px; border-radius: 3px; background: linear-gradient(180deg, #F4F1EA, #CFC8BA); font: 700 14px/20px 'Courier New', monospace; color: #222; text-align: center; }

/* the cassette bay */
.tp-bay { position: relative; border-radius: 16px; padding: 16px 18px; background: linear-gradient(180deg, #1D140E, #2A1D14); box-shadow: inset 0 6px 18px rgba(0,0,0,.6), 0 1px 0 rgba(255,220,180,.15); min-height: 250px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
.tp-bay::after { content: ""; position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(115deg, rgba(255,255,255,.10), rgba(255,255,255,0) 40%); pointer-events: none; }
.tp-bay { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px) minmax(0, 1fr); gap: 16px; align-items: center; }
.tp-mid { display: flex; justify-content: center; min-width: 0; grid-column: 2; }
.tp-j { align-self: stretch; max-height: 320px; display: flex; flex-direction: column; min-width: 0; border-radius: 6px; background: #FBF6EA; box-shadow: 0 4px 12px rgba(0,0,0,.45); padding: 10px 10px 8px;
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(31,58,138,.12) 27px 28px); position: relative; }
.tp-j:first-child { grid-column: 1; transform: rotate(-1.2deg); }
.tp-j:last-child { grid-column: 3; transform: rotate(1deg); }
.tp-j-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; border-bottom: 3px solid #F26B3A; padding-bottom: 4px; margin-bottom: 4px; }
.tp-j-h b { font: 900 13px Georgia, serif; letter-spacing: .12em; color: #2B1A10; }
.tp-j-h span { font: 700 11px var(--font-body); color: #8A6A4E; }
.tp-j-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; scrollbar-width: thin; }
.tp-j-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; width: 100%; min-height: 28px; padding: 3px 4px; border: 0; border-radius: 4px; background: none; cursor: pointer; text-align: left;
  font: 400 15px 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', 'Marker Felt', cursive; color: #1F3A8A; }
.tp-j-row:hover { background: rgba(242,107,58,.12); }
.tp-j-row .n { font: 700 12px 'Courier New', monospace; color: #8A6A4E; text-align: right; }
.tp-j-row .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-j-row .d { font: 11px 'Courier New', monospace; color: #8A6A4E; }
.tp-j-row.cur { background: #1F3A8A; color: #fff; }
.tp-j-row.cur .n, .tp-j-row.cur .d { color: #FFD27A; }
.tp-empty { text-align: center; color: #F3D9A4; display: grid; gap: 12px; justify-items: center; padding: 10px; }
.tp-empty b { font: 800 20px var(--font-display, Georgia); color: #FFF4D6; }
.tp-empty span { font-size: 14px; color: #E6CFA0; max-width: 360px; }
.tp-cass { width: min(100%, 470px); aspect-ratio: 100 / 63; position: relative; border-radius: 4.5% / 7%; background: linear-gradient(180deg, #2E2E34, #1E1E22); box-shadow: 0 8px 22px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .55s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.tp-cass.out { transform: translateY(-118%); }
.tp-cass.flip { animation: tpFlip .7s ease-in-out; }
@keyframes tpFlip { 0% { transform: rotateY(0) } 50% { transform: rotateY(90deg) scale(.96) } 100% { transform: rotateY(0) } }
.tp-screw { position: absolute; width: 3.2%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #CFCFD6, #6E6E78); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.tp-screw::after { content: ""; position: absolute; left: 20%; right: 20%; top: 45%; height: 10%; background: #444; transform: rotate(35deg); }
.tp-label { position: absolute; left: 6%; right: 6%; top: 7%; height: 62%; border-radius: 3% / 5%; background: linear-gradient(180deg, #FBF6EA 0 18%, #F26B3A 18% 23%, #FBF6EA 23% 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); overflow: hidden; }
.tp-label::before { content: ""; position: absolute; left: 0; right: 0; top: 27%; height: 1px; background: repeating-linear-gradient(90deg, #C9C2B2 0 6px, transparent 6px 9px); }
.tp-name { position: absolute; left: 13%; right: 14%; top: 3%; height: 14%; border: 0; background: none; padding: 0; font: 400 clamp(14px, 3.6vw, 22px) 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', 'Marker Felt', cursive; color: #1F3A8A; outline: none; text-overflow: ellipsis; }
.tp-name:focus { background: rgba(31,58,138,.06); border-radius: 4px; }
.tp-side { position: absolute; left: 3%; top: 1%; font: 900 clamp(16px, 4vw, 26px) Georgia, serif; color: #2B1A10; }
.tp-art { position: absolute; right: 3%; top: 3%; height: 15%; aspect-ratio: 1; border-radius: 3px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tp-window { position: absolute; left: 22%; right: 22%; top: 31%; height: 30%; border-radius: 40px; background: linear-gradient(180deg, rgba(40,30,25,.85), rgba(20,14,10,.9)); box-shadow: inset 0 2px 6px rgba(0,0,0,.7), 0 0 0 2px rgba(255,255,255,.35); overflow: hidden; }
.tp-window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(170deg, rgba(255,255,255,.18), rgba(255,255,255,0) 45%); pointer-events: none; }
.tp-pack { position: absolute; top: 50%; border-radius: 50%; background: radial-gradient(circle, #3B2418 40%, #24150D 70%); transform: translate(-50%, -50%); }
.tp-reel { position: absolute; top: 50%; width: 22%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.tp-reel svg { width: 100%; height: 100%; display: block; }
.tp-tape { position: absolute; left: 6%; right: 6%; bottom: 7%; height: 22%; clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, #3A3A42, #2A2A30); }
.tp-tape::before { content: ""; position: absolute; left: 14%; right: 14%; top: 22%; height: 9%; background: #4A2A18; }
.tp-tape i { position: absolute; bottom: 18%; width: 5%; aspect-ratio: 1; border-radius: 50%; background: #111; box-shadow: inset 0 0 0 2px #555; }

/* title, time and seek */
.tp-info { display: grid; gap: 8px; padding: 12px 16px; border-radius: 12px; background: linear-gradient(180deg, #FFF4D6, #F1D9A2); box-shadow: inset 0 2px 6px rgba(80,50,10,.35); color: #3A220C; min-width: 0; }
.tp-title { font: italic 700 20px Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-sub { font-size: 13.5px; color: #6B4E3A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-seek { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font: 700 13px 'Courier New', monospace; }
.tp-seek input { width: 100%; accent-color: #C23A14; }

/* VU meters, keys and volume */
.tp-low { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.tp-vus { display: flex; gap: 8px; }
.tp-vu { width: 92px; height: 58px; border-radius: 8px; position: relative; overflow: hidden; background: linear-gradient(180deg, #FFF3D0, #F0D592); box-shadow: inset 0 0 0 3px #B8892F, inset 0 3px 8px rgba(0,0,0,.25); }
.tp-vu svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tp-vu b { position: absolute; left: 6px; bottom: 3px; font: 800 9px var(--font-body); color: #6B4E3A; }
.tp-keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; padding: 6px; border-radius: 10px; background: #1A0F08; box-shadow: inset 0 2px 6px rgba(0,0,0,.7); }
.tp-key { min-height: 54px; border: 0; border-radius: 4px 4px 8px 8px; background: linear-gradient(180deg, #EDE6D8 0%, #CFC6B4 70%, #A69C88 100%); box-shadow: 0 5px 0 #6B6352, 0 6px 8px rgba(0,0,0,.4);
  font: 700 18px var(--font-body); color: #2B1A10; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transform: translateY(-3px); transition: transform .06s, box-shadow .06s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
.tp-key small { font: 800 9px var(--font-body); letter-spacing: .12em; color: #6B5A44; }
.tp-key:hover { filter: brightness(1.04); }
.tp-key.down, .tp-key:active { transform: translateY(2px); box-shadow: 0 0 0 #6B6352, 0 1px 2px rgba(0,0,0,.4); background: linear-gradient(180deg, #D9D1C0, #BDB3A0); }
.tp-key.play.down { color: #1B7F4A; }
.tp-key:disabled { opacity: .55; cursor: default; }
.tp-vol { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 800 10px var(--font-body); letter-spacing: .14em; color: #F3D9A4; }
.tp-vol input { width: 110px; accent-color: #C9993C; }

/* below the deck */
.tp-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tp-opts .rd-chip select { border: 0; background: none; font: inherit; color: inherit; padding: 0; height: auto; width: auto; cursor: pointer; }
.tp-share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tp-share .note { font-size: 13px; color: #6B4E3A; flex-basis: 100%; margin: 0; }
.tp-wa { background: #1B7F4A; color: #fff; } .tp-wa:hover { background: #146A3D; color: #fff; }
.tp-panel { background: #FFFBF3; border: 1px solid #E3D3B8; border-radius: 16px; padding: 18px; display: grid; gap: 12px; }
.tp-panel h2 { font-size: 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.tp-panel h2 small { font: 600 14px var(--font-body); color: #6B4E3A; }
.tp-insert { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tp-list .side { font: 800 12px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #8A6A4E; padding: 10px 6px 4px; }
.tp-row { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; cursor: pointer; }
.tp-row:hover { background: #F3E8D6; }
.tp-row.cur { background: #3A1F10; color: #FFF4D6; }
.tp-row.cur .a, .tp-row.cur .d { color: #E6CFA0; }
.tp-row .n { font: 700 13px 'Courier New', monospace; text-align: right; color: #8A6A4E; }
.tp-row.cur .n { color: #FFD27A; }
.tp-row img, .tp-row .noart { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #E9DCC4; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tp-row .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-row .a { font-size: 13px; color: #6B4E3A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-row .d { font: 13px 'Courier New', monospace; color: #6B4E3A; }
.tp-row .x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: inherit; font-size: 16px; cursor: pointer; opacity: .6; }
.tp-row .x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.tp-msg { font-size: 14px; font-weight: 600; color: #5A3B28; min-height: 20px; margin: 0; }
.tp-msg.warn { color: #B42318; }
.tp-drop { outline: 3px dashed #C9993C; outline-offset: 6px; }
.tp-clip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

@media (max-width: 760px) {
  .tp-deck { padding: 16px 14px 18px; gap: 14px; border-radius: 22px; }
  .tp-head { flex-wrap: wrap; }
  .tp-plate { font-size: 15px; } .tp-plate small { display: none; }
  .tp-lamps { gap: 10px; font-size: 10px; }
  .tp-bay { padding: 10px; min-height: 200px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .tp-mid { grid-column: 1 / -1; grid-row: 1; }
  .tp-j { max-height: 170px; padding: 8px 8px 6px; }
  .tp-j:first-child { grid-column: 1; grid-row: 2; } .tp-j:last-child { grid-column: 2; grid-row: 2; }
  .tp-bay.one-side .tp-j:first-child { grid-column: 1 / -1; }
  .tp-j-row { font-size: 13.5px; min-height: 30px; grid-template-columns: 18px minmax(0, 1fr); } .tp-j-row .d { display: none; }
  .tp-title { font-size: 17px; }
  .tp-low { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .tp-keys { grid-column: 1 / -1; order: -1; }
  .tp-key { min-height: 50px; font-size: 16px; }
  .tp-vu { width: 76px; height: 48px; }
  .tp-vol input { width: 96px; }
  .tp-row { grid-template-columns: 22px 36px minmax(0, 1fr) auto; } .tp-row .d { display: none; }
  .tp-row img, .tp-row .noart { width: 36px; height: 36px; }
}
