/* The music programs on the Diver's desktop: Sonar (find songs), Torch (burn a mix), the CD player, My Page.
   Same window frame, buttons and fonts as everything else on this computer; each program wears its own skin inside,
   the way programs did. Sonar is file-sharing green, Torch is burner charcoal and flame, My Page is whatever you pick. */
@import url("https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap");

.win .pane { display: grid; gap: 6px; }
.win .pane[hidden] { display: none; }
.sk-head { display: flex; align-items: center; gap: 8px; margin: -8px -8px 7px; padding: 5px 8px; }
.sk-head b { font: 26px/1 var(--readout); letter-spacing: 3px; text-transform: uppercase; }
.sk-logo { width: 30px; height: 30px; flex: none; image-rendering: pixelated; }
.sk-list { height: 150px; overflow-y: auto; }
.sk-list table { width: 100%; }
.win .guide.bg { margin-top: 7px; }
.grow { flex: 1; }
.skin-sonar input[type="text"], .skin-torch input[type="text"], .skin-me input[type="text"] { flex: 1; min-width: 0; font: 12px var(--ui); padding: 4px 6px; border: 0; background: #fbf8ef; color: var(--ink);
  box-shadow: inset 1px 1px 0 var(--putty-deep), inset -1px -1px 0 var(--putty-hi), inset 2px 2px 0 var(--putty-lo); }

/* ---- Sonar: the file-sharing program ---- */
.skin-sonar .body { background: #0b1410; color: #c9f7d6; }
.skin-sonar .sk-head { background: linear-gradient(90deg, #062014, #17603a 70%, #2bd46a); color: #b6ffcf; text-shadow: 0 0 8px rgba(43,212,106,.7); }
.skin-sonar #sn-stat { margin-left: auto; font-size: 10px; color: #04140b; text-shadow: none; }
.tabs { display: flex; gap: 2px; }
.tabs button { font: 11px var(--ui); padding: 4px 10px 3px; border: 1px solid #2f6b47; border-bottom: 0; background: #0f2218; color: #9fe8b8; cursor: pointer; }
.tabs button:hover { background: #17382a; }
.tabs button[aria-selected="true"] { background: #2bd46a; color: #04140b; font-weight: bold; }
.tabs button:focus-visible { outline: 1px dotted #fff; outline-offset: -3px; }
.tabs i { font-style: normal; margin-left: 5px; }
.skin-sonar .sk-list { background: #050c09; border: 1px solid #2f6b47; }
.skin-sonar table.finds th { background: #12301f; color: #9fe8b8; box-shadow: none; text-align: left; position: sticky; top: 0; }
.skin-sonar table.finds td { color: #c9f7d6; border-bottom: 1px solid #0f2218; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.skin-sonar table.finds tr:hover td { background: #0f2a1c; }
.skin-sonar table.finds td.dim { color: #5fa57c; }
.skin-sonar .btn.get { min-height: 19px; padding: 1px 8px; font-size: 10px; min-width: 52px; }
.skin-sonar .btn.get:disabled { color: #3c6b4f; background: #0f2218; box-shadow: none; cursor: default; }
.skin-sonar .hint { color: #5fa57c; }
.xfer { display: grid; grid-template-columns: minmax(0, 1fr) 150px 64px; gap: 8px; align-items: center; padding: 4px 8px; border-bottom: 1px solid #0f2218; font-size: 11px; }
.xfer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xfer .xbar { height: 10px; background: #0f2218; border: 1px solid #2f6b47; }
.xfer .xbar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #2bd46a 0 5px, #17603a 5px 7px); }
.xfer.done .xbar i { background: #8dffb0; }
.sk-empty { padding: 14px 10px; color: #5fa57c; font-size: 11px; }

/* ---- Torch: the burner ---- */
.skin-torch .body { background: #1b1917; color: #f1e8d2; }
.skin-torch .sk-head { background: linear-gradient(90deg, #120c08, #5a1c0c 60%, #c8402c); color: #ffd23f; text-shadow: 0 0 10px rgba(255,140,40,.8); }
.steps { display: flex; gap: 0; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 10px; counter-reset: st; }
.steps li { counter-increment: st; padding: 3px 8px; color: #b98a6a; background: rgba(0,0,0,.35); border-left: 1px solid #5a1c0c; }
.steps li::before { content: counter(st) ". "; }
.steps li[aria-current="step"] { background: #ffd23f; color: #2a1206; font-weight: bold; text-shadow: none; }
.steps li.past { color: #f08a24; }
.skin-torch .hint { color: #b9a98c; }
.skin-torch h3, .skin-me h3 { margin: 0 0 3px; font: bold 11px var(--ui); }
.drive { position: relative; height: 176px; background: linear-gradient(180deg, #2a2724, #121110); border: 1px solid #3c3833; overflow: hidden; }
.drive-face { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(180deg, #d6cfbd, #a9a28e); box-shadow: inset 0 1px 0 #f6f1e4; }
.drive-face i { position: absolute; right: 44px; top: 11px; width: 8px; height: 8px; background: #2c8a3c; box-shadow: 0 0 6px #54e36b; }
.drive-face b { position: absolute; right: 12px; top: 9px; width: 22px; height: 11px; background: #8d8571; box-shadow: inset 1px 1px 0 #f6f1e4, inset -1px -1px 0 #474233; }
.cdtray { position: absolute; left: 50%; bottom: 26px; width: 230px; height: 150px; margin-left: -115px; background: linear-gradient(180deg, #3a3632, #24211e); border: 1px solid #55504a; transform: translateY(8px); transition: transform .9s cubic-bezier(.5,0,.2,1); }
.cdtray.in { transform: translateY(170px); }
.cdtray.out { transform: translateY(8px); }
.disc { position: absolute; left: 50%; top: 8px; width: 132px; height: 132px; margin-left: -66px; border-radius: 50%;
  background: radial-gradient(circle, #1b1917 0 9px, #cfd8d6 10px 13px, #f4f1ea 14px 19px, transparent 20px), conic-gradient(from 20deg, #dfe6e4, #f6d3ff, #c9f7ff, #fffbd0, #dfe6e4, #ffd9c9, #d5ffe0, #dfe6e4);
  box-shadow: inset 0 0 0 1px #8d9795, 0 2px 6px rgba(0,0,0,.6); }
.disc.done { background: radial-gradient(circle, #1b1917 0 9px, #cfd8d6 10px 13px, transparent 14px), radial-gradient(circle, #fbf8ef 0 62px, #dfe6e4 63px); }
.disc.done span { position: absolute; left: 8px; right: 8px; top: 24px; text-align: center; font: 15px/1.05 "Permanent Marker", "Comic Sans MS", cursive; color: #17233c; transform: rotate(-6deg); overflow-wrap: anywhere; }
.disc.coaster { filter: grayscale(1) brightness(.6); }
.tc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-cols ul, #tc-log, #cd-tracks { margin: 0; padding: 0; list-style: none; height: 118px; overflow-y: auto; background: #0e0d0c; border: 1px solid #3c3833; }
.tc-cols li, #tc-log li { display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 7px; border-bottom: 1px solid #24211e; font-size: 11px; }
.tc-cols li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-cols li em { font-style: normal; color: #b9a98c; }
.tc-cols li .btn { min-height: 19px; padding: 1px 7px; font-size: 10px; }
.tc-cols li .btn:disabled { color: #8d8571; cursor: default; }
.tc-cols li.none { color: #b9a98c; padding: 10px 8px; display: block; }
.cap { height: 14px; background: #0e0d0c; border: 1px solid #3c3833; padding: 2px; }
.cap-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd23f, #f08a24 70%, #c8402c); transition: width .3s; }
.field { display: grid; gap: 4px; border: 0; padding: 0; margin: 0; font-size: 11px; }
.field legend { padding: 0; margin-bottom: 3px; }
#tc-speed label { display: flex; align-items: center; gap: 5px; }
#tc-now { margin: 0; font: 18px/1.1 var(--readout); color: #ffd23f; text-shadow: 0 0 8px rgba(255,140,40,.7); }
.skin-torch .bar-fill { background: repeating-linear-gradient(90deg, #f08a24 0 9px, transparent 9px 11px); transition: width .12s linear; }
.buf { width: 120px; height: 10px; background: #0e0d0c; border: 1px solid #3c3833; }
.buf i { display: block; height: 100%; width: 90%; background: #54e36b; transition: width .2s; }
.warnline { color: #ff8a5c; font-size: 11px; }
#tc-log { height: 74px; }
#tc-log li.ok { color: #9fe8b8; } #tc-log li.bad { color: #ff8a5c; }
#tc-done { margin: 0; font-size: 12px; }

/* ---- CD player ---- */
.skin-cd .body { background: #0a0f14; color: #d6f7f0; }
#cd-viz { display: block; width: 100%; height: auto; background: #030809; box-shadow: inset 1px 1px 0 var(--putty-deep), inset -1px -1px 0 var(--putty-hi); margin-bottom: 6px; }
.skin-cd .row { margin-bottom: 6px; }
.skin-cd .hint { color: #7fb9ae; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cd-tracks { height: 96px; margin-bottom: 6px; background: #05090c; border-color: #1d3a44; counter-reset: tr; }
#cd-tracks li { counter-increment: tr; display: flex; gap: 6px; padding: 2px 8px; font-size: 11px; cursor: pointer; border-bottom: 1px solid #0d1a20; }
#cd-tracks li::before { content: counter(tr) "."; color: #4f9c8a; min-width: 16px; }
#cd-tracks li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cd-tracks li em { font-style: normal; color: #4f9c8a; }
#cd-tracks li:hover { background: #0d1f26; }
#cd-tracks li[aria-current="true"] { background: var(--phosphor); color: #02100c; } #cd-tracks li[aria-current="true"] em, #cd-tracks li[aria-current="true"]::before { color: #0c3a30; }
#cd-tracks li.none { cursor: default; color: #7fb9ae; padding: 10px 8px; } #cd-tracks li.none::before { content: ""; min-width: 0; }

/* ---- My Page ---- */
.skin-me .body { color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.7); background: #0b2a3a; }
.me[data-bg="water"] { background: linear-gradient(180deg, #1d6a70, #06202c); }
.me[data-bg="stars"] { background: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 90px 80px, #fff, transparent), radial-gradient(2px 2px at 150px 20px, #ffe9a8, transparent), radial-gradient(1px 1px at 60px 120px, #cfe, transparent), #0a0820; background-size: 180px 140px; }
.me[data-bg="flames"] { background: repeating-linear-gradient(100deg, rgba(255,210,63,.25) 0 6px, transparent 6px 18px), linear-gradient(0deg, #ffd23f, #f0641e 30%, #7a1408 65%, #150504); }
.me[data-bg="plaid"] { background: repeating-linear-gradient(0deg, rgba(255,255,255,.14) 0 6px, transparent 6px 26px), repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 10px, transparent 10px 30px), #7a1f2b; }
.me[data-bg="bubblegum"] { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.5) 0 5px, transparent 6px) 0 0 / 44px 44px, linear-gradient(135deg, #ff7ac8, #b86bff); }
.me[data-bg="matrix"] { background: repeating-linear-gradient(90deg, rgba(43,212,106,.22) 0 2px, transparent 2px 11px), #020a05; }
.me-top { display: flex; gap: 10px; align-items: center; }
.me-pic { width: 62px; height: 62px; flex: none; background: #06191c; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #000; }
.me-pic img { width: 48px; height: 48px; image-rendering: pixelated; }
.me-who { flex: 1; min-width: 0; display: grid; gap: 4px; }
.me-who input, .me-who strong { font: 22px/1.1 var(--readout); letter-spacing: 1px; }
.me-who strong { font-weight: normal; }
.me-who p { margin: 0; font-size: 11px; }
.me-bgs { display: flex; gap: 5px; align-items: center; font-size: 11px; }
.me-bgs button { width: 26px; height: 20px; border: 2px solid #fff; cursor: pointer; padding: 0; box-shadow: 0 0 0 1px #000; }
.me-bgs button[aria-pressed="true"] { border-color: var(--tether); box-shadow: 0 0 0 1px #000, 0 0 8px var(--tether); }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; min-height: 96px; max-height: 196px; overflow-y: auto; padding: 8px; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.5); }
.shelf .case { position: relative; display: grid; justify-items: center; gap: 3px; padding: 5px 2px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.4); color: #fff; cursor: pointer; font: 11px var(--ui); text-shadow: inherit; }
.shelf .case:hover { background: rgba(255,255,255,.26); }
.shelf .case:hover .mini { transform: rotate(40deg); }
.shelf .mini { width: 52px; height: 52px; border-radius: 50%; transition: transform .5s; background: radial-gradient(circle, #111 0 4px, #cfd8d6 5px 7px, #fbf8ef 8px 15px, transparent 16px), conic-gradient(from 20deg, #dfe6e4, #f6d3ff, #c9f7ff, #fffbd0, #dfe6e4, #ffd9c9, #d5ffe0, #dfe6e4); box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.shelf .case b { font: 12px/1.05 "Permanent Marker", "Comic Sans MS", cursive; font-weight: normal; text-align: center; overflow-wrap: anywhere; }
.shelf .case small { opacity: .85; }
.shelf .toss { position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; padding: 0; line-height: 14px; border: 1px solid #fff; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 11px; }
.shelf .none { grid-column: 1 / -1; align-self: center; text-align: center; font-size: 12px; }
.skin-me .hint { color: #fff; }
.skin-me .row { margin-top: 2px; }

/* the Start menu: every program on this computer */
#startmenu { position: absolute; left: 3px; bottom: 30px; z-index: 40; width: 190px; padding: 3px; background: var(--putty); display: grid;
  box-shadow: inset 1px 1px 0 var(--putty-hi), inset -1px -1px 0 var(--putty-deep), inset -2px -2px 0 var(--putty-lo), 3px 4px 0 rgba(0,0,0,.35); }
#startmenu[hidden] { display: none; }
#startmenu button { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 0; background: none; text-align: left; cursor: pointer; font: 12px var(--ui); color: var(--ink); }
#startmenu button:hover, #startmenu button:focus-visible { background: var(--water-1); color: #fff; outline: none; }
#startmenu button span { width: 20px; height: 20px; flex: none; image-rendering: pixelated; }

@media (prefers-reduced-motion: reduce) { .cdtray, .cap-fill, .buf i, .shelf .mini { transition: none; } }

/* buttons keep the computer's own ink on every skin */
.skin-sonar .btn, .skin-torch .btn, .skin-cd .btn, .skin-me .btn { color: var(--ink); text-shadow: none; }

/* the label you write yourself: a disc to draw on, and the drawing wherever that disc shows up */
.tc-name { display: flex; gap: 12px; align-items: flex-start; }
.tc-namecol { flex: 1; min-width: 0; display: grid; gap: 7px; }
.tc-namecol .hint .btn { min-height: 19px; padding: 1px 7px; font-size: 10px; margin-left: 4px; }
.padwrap { position: relative; width: 150px; height: 150px; flex: none; }
.padwrap .disc { position: absolute; left: 0; top: 0; width: 150px; height: 150px; margin: 0; background: radial-gradient(circle, #1b1917 0 10px, #cfd8d6 11px 15px, transparent 16px), radial-gradient(circle, #fbf8ef 0 70px, #dfe6e4 71px); }
.padwrap canvas { position: absolute; inset: 0; width: 150px; height: 150px; border-radius: 50%; cursor: crosshair; touch-action: none; }
.disc.done canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; }
.shelf .mini { position: relative; } .shelf .miniart { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Torch's mascot (Chris's pixel flame holding a CD) */
.g-torch { background: no-repeat center/contain url("../img/torch-mascot-96.png"); image-rendering: auto; }
.skin-torch .sk-logo { width: 44px; height: 44px; margin: -6px 0 -8px; background-image: url("../img/torch-mascot.png"); filter: drop-shadow(0 0 8px rgba(255,140,40,.7)); }

/* Hear: 30 seconds of a song before you get it or burn it */
.acts { display: inline-flex; gap: 4px; }
.btn.hear { min-width: 40px; }
.btn.hear[aria-pressed="true"] { background: var(--tether); }
.tc-cols li .btn.hear { min-height: 19px; padding: 1px 7px; font-size: 10px; }

/* a stack of CD cases: each mix is a spine with its name written on it; press one and its tray slides out */
.stack { display: grid; gap: 3px; align-content: start; }
.stack .none { margin: 8px 0; text-align: center; }
.spine { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 10px; border: 1px solid rgba(255,255,255,.7); border-left: 12px solid rgba(18,18,22,.9); border-radius: 2px; cursor: pointer; text-align: left;
  color: #17233c; text-shadow: none; font: 15px/1.1 "Permanent Marker", "Comic Sans MS", cursive; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.1) 34%, rgba(0,0,0,.14)), var(--paper);
  transform: translateX(var(--dx)) rotate(var(--rot)); box-shadow: 0 2px 3px rgba(0,0,0,.5); transition: transform .16s ease; touch-action: manipulation; }
.spine:hover { transform: translateX(calc(var(--dx) + 9px)) rotate(0deg); }
.spine[aria-expanded="true"] { transform: translateX(12px); box-shadow: 0 0 0 2px #ffd23f, 0 3px 8px rgba(0,0,0,.6); }
.spine:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.spine .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; text-transform: none; }
.spine .s { flex: none; font: 11px var(--ui); opacity: .8; letter-spacing: 0; text-transform: none; }
.tray { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 3px 0 8px 14px; padding: 9px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.45); color: #fff; }
.tray[hidden] { display: none; }
.tray .tinfo { flex: 1 1 130px; min-width: 0; font: 11px var(--ui); line-height: 1.35; text-shadow: none; }
.tray .tinfo b { display: block; font: 15px/1.1 "Permanent Marker", "Comic Sans MS", cursive; font-weight: normal; overflow-wrap: anywhere; }
.tray .tbtns { display: flex; flex-wrap: wrap; gap: 5px; flex: 1 1 100%; }
.cdpic { position: relative; width: 84px; height: 84px; flex: none; border-radius: 50%; background: radial-gradient(circle, #111 0 6px, #cfd8d6 7px 9px, transparent 10px), radial-gradient(circle, #fbf8ef 0 39px, #dfe6e4 40px); box-shadow: 0 2px 6px rgba(0,0,0,.65); }
.cdpic canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.cdpic i { position: absolute; left: 9px; right: 9px; top: 15px; text-align: center; font: 11px/1.05 "Permanent Marker", cursive; font-style: normal; color: #17233c; overflow-wrap: anywhere; letter-spacing: 0; text-transform: none; text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .spine { transition: none; } }

.shelf.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 10px 18px 10px 12px; }
.skin-sonar .stack { height: 150px; overflow-y: auto; padding: 8px 18px 8px 10px; background: #050c09; border: 1px solid #2f6b47; }
.skin-sonar .tray .btn, .skin-me .tray .btn { min-height: 21px; }
.rack-sort { display: flex; gap: 4px; align-items: center; font-size: 11px; color: #9fe8b8; }

.tc-cols h3 .btn { min-height: 17px; padding: 0 7px; font-size: 10px; font-weight: normal; margin-left: 6px; }

/* quick buttons on the taskbar: the house, the Diver, the burner */
#quick { display: flex; gap: 2px; padding: 0 5px; margin: 0 2px; border-left: 2px groove var(--putty-hi); border-right: 2px groove var(--putty-hi); }
#quick .btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 4px; font-size: 11px; white-space: nowrap; text-decoration: none; color: var(--ink); }
#quick .btn span { width: 16px; height: 16px; flex: none; image-rendering: pixelated; }
#quick .g-torch { image-rendering: auto; }
#desktop[data-res="640"] #quick .btn { padding: 2px 4px; font-size: 10px; }

/* arriving at the burner's address: its icon is picked on the desktop before the program opens */
.icon.picked { border-color: var(--tether); background: rgba(13,43,58,.8); box-shadow: 0 0 22px rgba(255,210,63,.6); animation: iconpick 1.1s ease-out; }
.icon.picked span:last-child { background: #0b2a3a; }
@keyframes iconpick { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .icon.picked { animation: none; } }

/* the tray starts empty: a blank disc drops into it when you put one in, then the tray shuts */
#tc-tray::before { content: ""; position: absolute; left: 50%; top: 8px; width: 132px; height: 132px; margin-left: -66px; box-sizing: border-box; border-radius: 50%; border: 2px dashed rgba(255,255,255,.18); background: radial-gradient(circle, #0c0b0a 0 10px, #2a2724 11px 16px, rgba(0,0,0,.3) 17px); }
#tc-tray .disc { opacity: 0; transform: translateY(-160px) rotate(-30deg); transition: transform .6s cubic-bezier(.3,1.25,.5,1), opacity .12s; }
#tc-tray.has .disc { opacity: 1; transform: none; }
#tc-name.need { outline: 2px solid #c8402c; outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { #tc-tray .disc { transition: none; } }

/* the play order on the disc, and a new name for a CD on the shelf */
#tc-disc .btn.mv { min-width: 0; padding: 0 4px; font-size: 9px; line-height: 1; } #tc-disc .btn.mv:disabled { opacity: .35; }
.tinfo input.rename { display: block; width: 100%; box-sizing: border-box; margin-bottom: 3px; padding: 3px 5px; font: 14px "Permanent Marker", cursive; color: #17233c; background: #fbf8ef; border: 2px solid #c8402c; }

/* the name on a case is the thing you tap to change it; the button sits right under it */
.tinfo b.editable { cursor: text; border-bottom: 1px dashed currentColor; }
.tinfo .btn { display: inline-block; margin-top: 4px; }
